Class Integrator
java.lang.Object
ffx.algorithms.dynamics.integrators.Integrator
- Direct Known Subclasses:
BetterBeeman
,Respa
,Stochastic
,VelocityVerlet
The Integrator class is responsible for propagation of degrees of freedom through time.
Implementations must define their behavior at pre-force and post-force evaluation time points.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionprotected List
<Constraint> Any geometric constraints to apply during integration.protected final double
Numerical tolerance (as a fraction of bond length) permitted for numerical solutions to constraints.protected double
Time step (psec).protected final SystemState
The MDState class contains the current state of the Molecular Dynamics simulation.protected boolean
If there are constraints present. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConstraints
(List<Constraint> addedConstraints) Adds a set of Constraints that this Integrator must respect.void
Copy acceleration to previous acceleration.Returns a copy of the list of Constraints.double
Get the time step.static IntegratorEnum
parseIntegrator
(String str) Parse an integrator String into an instance of the IntegratorEnum enum.abstract void
postForce
(double[] gradient) Integrator post-force evaluation operation.abstract void
Integrator pre-force evaluation operation.abstract void
setTimeStep
(double dt) Set the time step.
-
Field Details
-
constraintTolerance
protected final double constraintToleranceNumerical tolerance (as a fraction of bond length) permitted for numerical solutions to constraints.- See Also:
-
state
The MDState class contains the current state of the Molecular Dynamics simulation. -
dt
protected double dtTime step (psec). -
constraints
Any geometric constraints to apply during integration. -
useConstraints
protected boolean useConstraintsIf there are constraints present.
-
-
Constructor Details
-
Integrator
Constructor for Integrator.- Parameters:
state
- The MD state to operate on.
-
-
Method Details
-
parseIntegrator
Parse an integrator String into an instance of the IntegratorEnum enum.- Parameters:
str
- Integrator string.- Returns:
- Integrator enum.
-
addConstraints
Adds a set of Constraints that this Integrator must respect.- Parameters:
addedConstraints
- Constraints to add.
-
copyAccelerationToPrevious
public void copyAccelerationToPrevious()Copy acceleration to previous acceleration. -
getConstraints
Returns a copy of the list of Constraints.- Returns:
- All Constraints this Integrator respects.
-
getTimeStep
public double getTimeStep()Get the time step.- Returns:
- the time step (psec).
-
setTimeStep
public abstract void setTimeStep(double dt) Set the time step.- Parameters:
dt
- the time step (psec).
-
postForce
public abstract void postForce(double[] gradient) Integrator post-force evaluation operation.- Parameters:
gradient
- the gradient for the post-force operation.
-
preForce
Integrator pre-force evaluation operation.- Parameters:
potential
- the Potential this integrator operates on.
-