Package ffx.openmm
Class Force
java.lang.Object
ffx.openmm.Force
- Direct Known Subclasses:
AndersenThermostat
,CMMotionRemover
,CustomAngleForce
,CustomBondForce
,CustomCentroidBondForce
,CustomCompoundBondForce
,CustomExternalForce
,CustomGBForce
,CustomNonbondedForce
,GeneralizedKirkwoodForce
,GKCavitationForce
,HarmonicBondForce
,MonteCarloBarostat
,MultipoleForce
,NonbondedForce
,PeriodicTorsionForce
,TorsionTorsionForce
,VdwForce
,WcaDispersionForce
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.
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.sun.jna.ptr.PointerByReference
The forcePointer is allocated and deallocated by classes that extend OpenMMForce. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the force group.int
Get the force index.getName()
Get the name of the force.com.sun.jna.ptr.PointerByReference
Get the pointer to the OpenMM Force.void
setForceGroup
(int forceGroup) Set the force group.void
setForceIndex
(int forceIndex) Set the force index.void
Set the name of the force.boolean
Check if the force use periodic boundary conditions.
-
Field Details
-
pointer
protected com.sun.jna.ptr.PointerByReference pointerThe forcePointer is allocated and deallocated by classes that extend OpenMMForce.
-
-
Constructor Details
-
Force
public Force()
-
-
Method Details
-
getPointer
public com.sun.jna.ptr.PointerByReference getPointer()Get the pointer to the OpenMM Force.- Returns:
- The pointer to the OpenMM Force.
-
setForceGroup
public void setForceGroup(int forceGroup) Set the force group.- Parameters:
forceGroup
- The force group.
-
getForceGroup
public int getForceGroup()Get the force group.- Returns:
- The force group.
-
setName
Set the name of the force.- Parameters:
name
- The name of the force.
-
getName
Get the name of the force.- Returns:
- The name of the force.
-
setForceIndex
public void setForceIndex(int forceIndex) Set the force index.- Parameters:
forceIndex
- The force index.
-
getForceIndex
public int getForceIndex()Get the force index.- Returns:
- The force index.
-
usesPeriodicBoundaryConditions
public boolean usesPeriodicBoundaryConditions()Check if the force use periodic boundary conditions. This is a virtual method that must be implemented by classes that extend OpenMMForce.- Returns:
- True if the force uses periodic boundary conditions.
-