Package ffx.openmm
Class VariableLangevinIntegrator
java.lang.Object
ffx.openmm.Integrator
ffx.openmm.VariableLangevinIntegrator
This class implements a Langevin integrator with variable time stepping.
The integrator automatically adjusts the step size to maintain a specified
error tolerance, making it suitable for systems with widely varying time scales.
The variable step size algorithm monitors the local truncation error and adjusts the step size accordingly. This can lead to more efficient integration for systems where different parts evolve on different time scales, such as systems with both fast vibrations and slow conformational changes.
-
Field Summary
Fields inherited from class ffx.openmm.Integrator
pointer
-
Constructor Summary
ConstructorsConstructorDescriptionVariableLangevinIntegrator
(double temperature, double frictionCoeff, double errorTol) Create a VariableLangevinIntegrator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the integrator.double
Get the error tolerance for adaptive step sizing.double
Get the friction coefficient which determines how strongly the system is coupled to the heat bath (in 1/ps).double
Get the maximum step size the integrator is allowed to use (in ps).int
Get the random number seed.double
Get the temperature of the heat bath (in Kelvin).void
setErrorTolerance
(double tol) Set the error tolerance for adaptive step sizing.void
setFriction
(double coeff) Set the friction coefficient which determines how strongly the system is coupled to the heat bath (in 1/ps).void
setMaximumStepSize
(double size) Set the maximum step size the integrator is allowed to use (in ps).void
setRandomNumberSeed
(int seed) Set the random number seed.void
setTemperature
(double temp) Set the temperature of the heat bath (in Kelvin).void
step
(int steps) Advance a simulation through time by taking a series of time steps.void
stepTo
(double time) Advance the simulation by integrating until a specified time is reached.Methods inherited from class ffx.openmm.Integrator
getConstraintTolerance, getIntegrationForceGroups, getPointer, getStepSize, setConstraintTolerance, setIntegrationForceGroups, setPointer, setStepSize
-
Constructor Details
-
VariableLangevinIntegrator
public VariableLangevinIntegrator(double temperature, double frictionCoeff, double errorTol) Create a VariableLangevinIntegrator.- Parameters:
temperature
- The temperature of the heat bath (in Kelvin).frictionCoeff
- The friction coefficient which couples the system to the heat bath (in 1/ps).errorTol
- The error tolerance for adaptive step sizing.
-
-
Method Details
-
destroy
public void destroy()Destroy the integrator.- Specified by:
destroy
in classIntegrator
-
getErrorTolerance
public double getErrorTolerance()Get the error tolerance for adaptive step sizing.- Returns:
- The error tolerance.
-
getFriction
public double getFriction()Get the friction coefficient which determines how strongly the system is coupled to the heat bath (in 1/ps).- Returns:
- The friction coefficient.
-
getMaximumStepSize
public double getMaximumStepSize()Get the maximum step size the integrator is allowed to use (in ps).- Returns:
- The maximum step size.
-
getRandomNumberSeed
public int getRandomNumberSeed()Get the random number seed. See setRandomNumberSeed() for details.- Returns:
- The random number seed.
-
getTemperature
public double getTemperature()Get the temperature of the heat bath (in Kelvin).- Returns:
- The temperature of the heat bath.
-
setErrorTolerance
public void setErrorTolerance(double tol) Set the error tolerance for adaptive step sizing.- Parameters:
tol
- The error tolerance.
-
setFriction
public void setFriction(double coeff) Set the friction coefficient which determines how strongly the system is coupled to the heat bath (in 1/ps).- Parameters:
coeff
- The friction coefficient.
-
setMaximumStepSize
public void setMaximumStepSize(double size) Set the maximum step size the integrator is allowed to use (in ps).- Parameters:
size
- The maximum step size.
-
setRandomNumberSeed
public void setRandomNumberSeed(int seed) Set the random number seed. The precise meaning of this parameter is undefined, and is left up to each Platform to interpret in an appropriate way. It is guaranteed that if two simulations are run with different random number seeds, the sequence of random numbers will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically.If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context is created from this Force. This is done to ensure that each Context receives unique random seeds without you needing to set them explicitly.
- Parameters:
seed
- The random number seed.
-
setTemperature
public void setTemperature(double temp) Set the temperature of the heat bath (in Kelvin).- Parameters:
temp
- The temperature of the heat bath.
-
step
public void step(int steps) Advance a simulation through time by taking a series of time steps.- Overrides:
step
in classIntegrator
- Parameters:
steps
- The number of time steps to take.
-
stepTo
public void stepTo(double time) Advance the simulation by integrating until a specified time is reached.- Parameters:
time
- The time to which the simulation should be advanced (in ps).
-