Package ffx.openmm
Class CMMotionRemover
java.lang.Object
ffx.openmm.Force
ffx.openmm.CMMotionRemover
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.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the OpenMM CMMotionRemover.int
Get the frequency (in time steps) at which center of mass motion should be removed.void
setFrequency
(int freq) Set the frequency (in time steps) at which center of mass motion should be removed.boolean
Returns whether or not this force makes use of periodic boundary conditions.Methods inherited from class ffx.openmm.Force
getForceGroup, getForceIndex, getName, getPointer, setForceGroup, setForceIndex, setName
-
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. -
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 classForce
- Returns:
- true if force uses PBC and false otherwise
-