CMMotionRemover

class simtk.openmm.openmm.CMMotionRemover(*args)

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.

__init__(self, frequency=1) → CMMotionRemover

__init__(self) -> CMMotionRemover __init__(self, other) -> CMMotionRemover

Create a CMMotionRemover.

Methods

__init__((self[, frequency]) __init__(self) -> CMMotionRemover
getForceGroup((self) -> int) Get the force group this Force belongs to.
getFrequency((self) -> int) Get the frequency (in time steps) at which center of mass motion should be removed
setForceGroup(self, group) Set the force group this Force belongs to.
setFrequency(self, freq) Set the frequency (in time steps) at which center of mass motion should be removed
usesPeriodicBoundaryConditions((self) -> bool) Returns whether or not this force makes use of periodic boundary conditions.
getFrequency(self) → int

Get the frequency (in time steps) at which center of mass motion should be removed

setFrequency(self, freq)

Set the frequency (in time steps) at which center of mass motion should be removed

usesPeriodicBoundaryConditions(self) → bool

Returns whether or not this force makes use of periodic boundary conditions.

Returns:true if force uses PBC and false otherwise
Return type:bool
__copy__(self) → Force
getForceGroup(self) → int

Get the force group this Force belongs to.

setForceGroup(self, group)

Set the force group this Force belongs to.

Parameters:group (int) – the group index. Legal values are between 0 and 31 (inclusive).