CMMotionRemover

class 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, other)CMMotionRemover

Create a CMMotionRemover.

Methods

__init__(-> CMMotionRemover)

Create a CMMotionRemover.

getForceGroup(self)

Get the force group this Force belongs to.

getFrequency(self)

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

getName(self)

Get the name of this Force.

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

setName(self, name)

Set the name of this Force.

usesPeriodicBoundaryConditions(self)

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

Attributes

thisown

The membership flag

property thisown

The membership flag

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.

getName(self)std::string const &

Get the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.

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

setName(self, name)

Set the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.