# Force Class Reference

Force objects apply forces to the particles in a System, or alter their behavior in other ways. More...

Inheritance diagram for Force:

List of all members.

## Public Member Functions

def | __init__
def | __del__
| __del__(self)
def | getForceGroup
| getForceGroup(self) -> int
def | setForceGroup
| setForceGroup(self, int group)
def | __copy__
def | __deepcopy__

## Detailed Description

Force objects apply forces to the particles in a System, or alter their behavior in other ways.

This is an abstract class. Subclasses define particular forces.

More specifically, a Force object can do any or all of the following:

- Add a contribution to the force on each particle

- Add a contribution to the potential energy of the System

- Modify the positions and velocities of particles at the start of each time step

- Define parameters which are stored in the Context and can be modified by the user

- Change the values of parameters defined by other Force objects at the start of each time step

Forces may be organized into "force groups". This is used for multiple time step integration, and allows subsets of the Forces in a System to be evaluated at different times. By default, all Forces are in group 0. Call setForceGroup() to change this. Some Force subclasses may provide additional methods to further split their computations into multiple groups. Be aware that particular Platforms may place restrictions on the use of force groups, such as requiring all nonbonded forces to be in the same group.

## Member Function Documentation

def __copy__ | ( |  | self | ) |

def __deepcopy__ | ( |  | self,
|  |  | memo |
| ) |  |  |

def __del__ | ( |  | self | ) |

__del__(self)

Reimplemented in CustomAngleForce, CustomExternalForce, AndersenThermostat, AmoebaBondForce, AmoebaInPlaneAngleForce, HarmonicBondForce, CustomTorsionForce, MonteCarloAnisotropicBarostat, RBTorsionForce, AmoebaGeneralizedKirkwoodForce, AmoebaTorsionTorsionForce, PeriodicTorsionForce, HarmonicAngleForce, CustomNonbondedForce, MonteCarloBarostat, CustomHbondForce, AmoebaOutOfPlaneBendForce, MonteCarloMembraneBarostat, NonbondedForce, CustomBondForce, CustomGBForce, CMAPTorsionForce, GBVIForce, AmoebaAngleForce, DrudeForce, AmoebaMultipoleForce, CMMotionRemover, AmoebaStretchBendForce, AmoebaWcaDispersionForce, AmoebaVdwForce, CustomCompoundBondForce, GBSAOBCForce, CustomManyParticleForce, and AmoebaPiTorsionForce.

def __init__ | ( |  | self,
|  |  | args,
|  |  | kwargs |
| ) |  |  |

def getForceGroup | ( |  | self | ) |

getForceGroup(self) -> int

Get the force group this Force belongs to.

def setForceGroup | ( |  | self,
|  |  | args |
| ) |  |  |

setForceGroup(self, int group)

Set the force group this Force belongs to.

Parameters:

  | group | the group index. Legal values are between 0 and 31 (inclusive).

The documentation for this class was generated from the following file:

- openmm.py