CMMotionRemover

class 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.

Methods

CMMotionRemover

Create a CMMotionRemover.

getFrequency

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

setFrequency

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

usesPeriodicBoundaryConditions

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

CMMotionRemover(int frequency = 1)

Create a CMMotionRemover().

int getFrequency() const

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

bool usesPeriodicBoundaryConditions() const

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

Returns

true if force uses PBC and false otherwise