Package ffx.openmm
Class LangevinMiddleIntegrator
java.lang.Object
ffx.openmm.Integrator
ffx.openmm.LangevinMiddleIntegrator
- Direct Known Subclasses:
LangevinIntegrator
This is an Integrator which simulates a System using Langevin dynamics, with
the LFMiddle discretization (J. Phys. Chem. A 2019, 123, 28, 6056-6079).
This method tend to produce more accurate configurational sampling than other
discretizations, such as the one used in LangevinIntegrator.
The algorithm is closely related to the BAOAB discretization (Proc. R. Soc. A. 472: 20160138). Both methods produce identical trajectories, but LFMiddle returns half step (leapfrog) velocities, while BAOAB returns on-step velocities. The former provide a much more accurate sampling of the thermal ensemble.
-
Field Summary
Fields inherited from class ffx.openmm.Integrator
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionLangevinMiddleIntegrator
(double dt, double temp, double gamma) Create a LangevinMiddleIntegrator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the integrator.double
Get the friction coefficient.int
Get the random number seed.double
Get the temperature.void
setFriction
(double gamma) Set the friction coefficient.void
setRandomNumberSeed
(int seed) Set the random number seed.void
setTemperature
(double temp) Set the temperature.void
step
(int steps) Step the integrator.Methods inherited from class ffx.openmm.Integrator
getConstraintTolerance, getIntegrationForceGroups, getPointer, getStepSize, setConstraintTolerance, setIntegrationForceGroups, setPointer, setStepSize
-
Constructor Details
-
LangevinMiddleIntegrator
public LangevinMiddleIntegrator(double dt, double temp, double gamma) Create a LangevinMiddleIntegrator.- Parameters:
dt
- the step size with which to integrate the system (in picoseconds)temp
- the temperature of the heat bath (in Kelvin)gamma
- the friction coefficient which couples the system to the heat bath (in inverse picoseconds)
-
-
Method Details
-
destroy
public void destroy()Destroy the integrator.- Specified by:
destroy
in classIntegrator
-
getFriction
public double getFriction()Get the friction coefficient.- Returns:
- The friction coefficient in inverse picoseconds.
-
getRandomNumberSeed
public int getRandomNumberSeed()Get the random number seed.- Returns:
- The random number seed.
-
getTemperature
public double getTemperature()Get the temperature.- Returns:
- The temperature in Kelvin.
-
setFriction
public void setFriction(double gamma) Set the friction coefficient.- Parameters:
gamma
- The friction coefficient in inverse picoseconds.
-
setRandomNumberSeed
public void setRandomNumberSeed(int seed) Set the random number seed.- Parameters:
seed
- The random number seed.
-
setTemperature
public void setTemperature(double temp) Set the temperature.- Parameters:
temp
- The temperature in Kelvin.
-
step
public void step(int steps) Step the integrator.- Overrides:
step
in classIntegrator
- Parameters:
steps
- The number of steps to take.
-