|
OpenMM
|
This class prevents the center of mass of a System from drifting. More...
#include <CMMotionRemover.h>
Inheritance diagram for CMMotionRemover:Public Member Functions | |
| CMMotionRemover (int frequency=1) | |
| Create a CMMotionRemover. More... | |
| int | getFrequency () const |
| Get the frequency (in time steps) at which center of mass motion should be removed. More... | |
| void | setFrequency (int freq) |
| Set the frequency (in time steps) at which center of mass motion should be removed. More... | |
| bool | usesPeriodicBoundaryConditions () const |
| Returns whether or not this force makes use of periodic boundary conditions. More... | |
Public Member Functions inherited from Force | |
| Force () | |
| virtual | ~Force () |
| int | getForceGroup () const |
| Get the force group this Force belongs to. More... | |
| void | setForceGroup (int group) |
| Set the force group this Force belongs to. More... | |
Protected Member Functions | |
| ForceImpl * | createImpl () const |
| When a Context is created, it invokes this method on each Force in the System. More... | |
Protected Member Functions inherited from Force | |
| ForceImpl & | getImplInContext (Context &context) |
| Get the ForceImpl corresponding to this Force in a Context. More... | |
| ContextImpl & | getContextImpl (Context &context) |
| Get the ContextImpl corresponding to a Context. More... | |
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.
|
inlinevirtual |
Returns whether or not this force makes use of periodic boundary conditions.
Reimplemented from Force.