openmmtools.integrators provides a number of high quality integrators implemented using OpenMM’s CustomIntegrator facility.

The integrators provided in the openmmtools.integrators package subclass the OpenMM CustomIntegrator, providing a more full-featured Pythonic class wrapping the Swig-wrapped CustomIntegrator.


OpenMM’s CompoundIntegrator caches OpenMM Integrator objects, but can only return the SWIG-wrapped base integrator object if you call CompoundIntegrator.getIntegrator() or CompoundIntegrator.getCurrentIntegrator(). If you want to hold onto one of the Python subclasses we make available in openmmtools.integrators, you will need to cache the original Python integrator you create. You can still use either integrator.step() call, but you MUST MAKE SURE THAT INTEGRATOR IS SELECTED currently in CompoundIntegrator.setCurrentIntegrator(index) before calling integrator.step() or else the behavior is undefined.

Langevin integrators

The entire family of Langevin integrators described by Trotter splittings of the propagator is available. These integrators also support multiple-timestep force splittings and Metropolization. In addition, we provide special subclasses for several popular classes of Langevin integrators.


We highly recommend the excellent geodesic BAOAB (g-BAOAB) integrator of Leimkuhler and Matthews for all equilibrium simulations where only equilibrium configurational properties are of interest. This integrator (g-BAOAB) has extraordinarily good properties for biomolecular simulation.

LangevinIntegrator Integrates Langevin dynamics with a prescribed operator splitting.
VVVRIntegrator Create a velocity Verlet with velocity randomization (VVVR) integrator.
BAOABIntegrator Create a BAOAB integrator.
GeodesicBAOABIntegrator Create a geodesic-BAOAB integrator.
GHMCIntegrator Create a generalized hybrid Monte Carlo (GHMC) integrator.

Nonequilibrium integrators

These integrators are available for nonequilibrium switching simulations, and provide additional features for measuring protocol, shadow, and total work.

NonequilibriumLangevinIntegrator Nonequilibrium integrator mix-in.
AlchemicalNonequilibriumLangevinIntegrator Allows nonequilibrium switching based on force parameters specified in alchemical_functions.
ExternalPerturbationLangevinIntegrator LangevinSplittingIntegrator that accounts for external perturbations and tracks protocol work.

Miscellaneous integrators

Other miscellaneous integrators are available.

MTSIntegrator MTSIntegrator implements the rRESPA multiple time step integration algorithm.
DummyIntegrator Construct a dummy integrator that does nothing except update call the force updates.
GradientDescentMinimizationIntegrator Simple gradient descent minimizer implemented as an integrator.
VelocityVerletIntegrator Verlocity Verlet integrator.
AndersenVelocityVerletIntegrator Velocity Verlet integrator with Andersen thermostat using per-particle collisions (rather than massive collisions).
NoseHooverChainVelocityVerletIntegrator Nosé-Hoover chain thermostat, using the reversible multi time step velocity Verlet algorithm detailed in the papers below.
MetropolisMonteCarloIntegrator Metropolis Monte Carlo with Gaussian displacement trials.
HMCIntegrator Hybrid Monte Carlo (HMC) integrator.


A number of useful mix-ins are provided to endow integrators with additional features.

PrettyPrintableIntegrator A PrettyPrintableIntegrator can format the contents of its step program for printing.
RestorableIntegrator A CustomIntegrator that can be restored after being copied.
ThermostatedIntegrator Add temperature functions to a CustomIntegrator.

Base classes

New integrators can inherit from these base classes to inherit extra features

RestorableIntegrator A CustomIntegrator that can be restored after being copied.
ThermostatedIntegrator Add temperature functions to a CustomIntegrator.
NonequilibriumLangevinIntegrator Nonequilibrium integrator mix-in.