Class Integrator

java.lang.Object
ffx.algorithms.dynamics.integrators.Integrator
Direct Known Subclasses:
BetterBeeman, Respa, Stochastic, VelocityVerlet

public abstract class Integrator extends Object
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 Details

    • constraintTolerance

      protected final double constraintTolerance
      Numerical tolerance (as a fraction of bond length) permitted for numerical solutions to constraints.
      See Also:
    • state

      protected final SystemState state
      The MDState class contains the current state of the Molecular Dynamics simulation.
    • dt

      protected double dt
      Time step (psec).
    • constraints

      protected List<Constraint> constraints
      Any geometric constraints to apply during integration.
    • useConstraints

      protected boolean useConstraints
      If there are constraints present.
  • Constructor Details

    • Integrator

      public Integrator(SystemState state)
      Constructor for Integrator.
      Parameters:
      state - The MD state to operate on.
  • Method Details

    • parseIntegrator

      public static IntegratorEnum parseIntegrator(String str)
      Parse an integrator String into an instance of the IntegratorEnum enum.
      Parameters:
      str - Integrator string.
      Returns:
      Integrator enum.
    • addConstraints

      public void addConstraints(List<Constraint> addedConstraints)
      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

      public List<Constraint> 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

      public abstract void preForce(Potential potential)
      Integrator pre-force evaluation operation.
      Parameters:
      potential - the Potential this integrator operates on.