OpenMM
|
This class prevents the center of mass of a System from drifting. More...
#include <CMMotionRemover.h>
Public Member Functions | |
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. | |
Public Member Functions inherited from Force | |
Force () | |
virtual | ~Force () |
int | getForceGroup () const |
Get the force group this Force belongs to. | |
void | setForceGroup (int group) |
Set the force group this Force belongs to. | |
Protected Member Functions | |
ForceImpl * | createImpl () const |
When a Context is created, it invokes this method on each Force in the System. | |
Protected Member Functions inherited from Force | |
ForceImpl & | getImplInContext (Context &context) |
Get the ForceImpl corresponding to this Force in a Context. | |
ContextImpl & | getContextImpl (Context &context) |
Get the ContextImpl corresponding to a Context. | |
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.
|
explicit |
Create a CMMotionRemover.
|
protectedvirtual |
|
inline |
Get the frequency (in time steps) at which center of mass motion should be removed.
|
inline |
Set the frequency (in time steps) at which center of mass motion should be removed.