Package ffx.openmm

Class CMMotionRemover

java.lang.Object
ffx.openmm.Force
ffx.openmm.CMMotionRemover

public class CMMotionRemover extends Force
This class prevents the center of mass of a System from drifting. At each time step, it calculates the center of mass momentum, then adjusts the individual particle velocities to make it zero.
  • Constructor Details

    • CMMotionRemover

      public CMMotionRemover(int frequency)
      Create a CMMotionRemover.
      Parameters:
      frequency - the frequency (in time steps) at which center of mass motion should be removed
  • Method Details

    • getFrequency

      public int getFrequency()
      Get the frequency (in time steps) at which center of mass motion should be removed.
      Returns:
      the frequency (in time steps) at which center of mass motion should be removed
    • destroy

      public void destroy()
      Destroy the OpenMM CMMotionRemover.
      Specified by:
      destroy in class Force
    • setFrequency

      public void setFrequency(int freq)
      Set the frequency (in time steps) at which center of mass motion should be removed.
      Parameters:
      freq - the frequency (in time steps) at which center of mass motion should be removed
    • usesPeriodicBoundaryConditions

      public boolean usesPeriodicBoundaryConditions()
      Returns whether or not this force makes use of periodic boundary conditions.
      Overrides:
      usesPeriodicBoundaryConditions in class Force
      Returns:
      true if force uses PBC and false otherwise