Package ffx.potential

Class ForceFieldEnergyOpenMM.State

java.lang.Object
ffx.potential.ForceFieldEnergyOpenMM.State
Enclosing class:
ForceFieldEnergyOpenMM

public class ForceFieldEnergyOpenMM.State extends Object
Retrieve state information from an OpenMM Simulation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Kinetic energy (kcal/mol).
    final double
    Potential energy (kcal/mol).
    final double
    Temperature (K).
    final double
    Total energy (kcal/mol).
  • Constructor Summary

    Constructors
    Constructor
    Description
    State(boolean positions, boolean energies, boolean forces, boolean velocities)
    Construct an OpenMM State with the requested information.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    double[]
    getAccelerations(double[] a)
    The force array contains the OpenMM force information for all atoms.
    double[]
    getGradient(double[] g)
    The force array contains the OpenMM force information for all atoms.
    void
    Read the periodic lattice vectors from a state.
    double[]
    getPositions(double[] x)
    The positions array contains the OpenMM atomic position information for all atoms.
    double[]
    getVelocities(double[] v)
    The positions array contains the OpenMM atomic position information for all atoms.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • potentialEnergy

      public final double potentialEnergy
      Potential energy (kcal/mol).
    • kineticEnergy

      public final double kineticEnergy
      Kinetic energy (kcal/mol).
    • totalEnergy

      public final double totalEnergy
      Total energy (kcal/mol).
    • temperature

      public final double temperature
      Temperature (K).
  • Constructor Details

    • State

      public State(boolean positions, boolean energies, boolean forces, boolean velocities)
      Construct an OpenMM State with the requested information.
      Parameters:
      positions - Retrieve positions.
      energies - Retrieve energies.
      forces - Retrieve forces.
      velocities - Retrieve velocities.
  • Method Details

    • free

      public void free()
    • getAccelerations

      public double[] getAccelerations(double[] a)
      The force array contains the OpenMM force information for all atoms. The returned array a contains accelerations for active atoms only.
      Parameters:
      a - Acceleration components for only active atomic coordinates.
      Returns:
      The acceleration for each active atomic coordinate.
    • getGradient

      public double[] getGradient(double[] g)
      The force array contains the OpenMM force information for all atoms. The returned array g contains components for active atoms only.
      Parameters:
      g - Gradient components for only active atomic coordinates.
      Returns:
      g The gradient includes only active atoms
    • getPeriodicBoxVectors

      public void getPeriodicBoxVectors()
      Read the periodic lattice vectors from a state.

      The crystal instance will be updated, and passed to the ForceFieldEnergy instance.

    • getPositions

      public double[] getPositions(double[] x)
      The positions array contains the OpenMM atomic position information for all atoms. The returned array x contains coordinates only for active atoms.
      Parameters:
      x - Atomic coordinates only for active atoms.
      Returns:
      x The atomic coordinates for only active atoms.
    • getVelocities

      public double[] getVelocities(double[] v)
      The positions array contains the OpenMM atomic position information for all atoms. The returned array x contains coordinates for active atoms only.
      Parameters:
      v - Velocity only for active atomic coordinates.
      Returns:
      v The velocity for each active atomic coordinate.