Skip to content
Back to skills

Custom Forces Integrators

ASecurity

"Implement and debug OpenMM custom expression forces,

  • 247 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 8, 2026
developmentgoc++expresstestingapiperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill custom-forces-integrators --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Custom Forces Integrators?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Custom Forces Integrators
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-custom-forces-integrators/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-custom-forces-integrators)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: custom-forces-integrators
description: "Implement and debug OpenMM custom expression forces,
  CustomIntegrator algorithms, force groups, runtime parameters, tabulated
  functions, and serialization-aware custom systems."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT, GPL, LGPL
---

# Custom Forces and Integrators

Use this sub-skill when the task involves OpenMM `Custom*Force` classes, `CustomIntegrator`, force groups, global/per-element parameter updates, tabulated functions, expression parsing, or smoke-testing a hand-built custom `System`.

## Route Tasks

- For selecting a custom force class, expression variables, parameters, exclusions, cutoffs, interaction groups, tabulated functions, or serialization behavior, read `references/custom-force-api.md`.
- For `CustomIntegrator` algorithms, constraints, random variables, force-group-specific `f0`/`energy0` expressions, MTS patterns, or aMD-style boosts, read `references/custom-integrator-recipes.md`.
- For parse errors, undefined variables, parameter update mistakes, unit/count mismatches, nonbonded double counting, force-group queries, stochastic reproducibility, or serialization failures, read `references/troubleshooting.md`.
- For a quick installed OpenMM sanity check, run `scripts/custom_force_smoke.py`; it builds a two-particle `CustomBondForce` on the Reference platform and asserts finite energy.

## Core Workflow

1. Choose the narrowest `Custom*Force` class that matches the interaction geometry, then write the expression in OpenMM algebra syntax with class-specific variables.
2. Add all global, per-particle, per-bond, per-angle, per-torsion, donor/acceptor, group, or computed parameters before adding interaction records.
3. Ensure every required element count matches the `System` before creating a `Context`; for `CustomNonbondedForce`, add one particle parameter record for every system particle.
4. Prefer `Context.setParameter()` for frequently tuned globals; use `set*Parameters()` plus `updateParametersInContext()` for changed per-element values; reserve `Context.reinitialize()` for topology/count/force-definition changes.
5. Assign force groups deliberately when querying energy pieces, excluding query-only forces from integration, or implementing MTS/custom algorithms.
6. Validate on the `Reference` platform with explicit positions, finite energy/force assertions, and XML serialization round trips when systems must be portable.

## Boundaries

- Use `../force-fields-modeling/` for ForceField XML authoring, template matching, residue modeling, and parameter file selection.
- Use `../platforms-performance/` for CUDA/OpenCL/HIP/CPU/Reference platform selection, precision, determinism, and performance tuning.
- Use `../development-extensions/` for implementing new platform kernels, C++ plugins, or new core OpenMM force classes.

Files in this skill

  • SKILL.md2.8 KB
  • references/custom-force-api.md6.6 KB
  • references/custom-integrator-recipes.md6.9 KB
  • references/troubleshooting.md7 KB
  • scripts/custom_force_smoke.py1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.