OpenMM
 All Classes Namespaces Functions Variables Pages
HarmonicBondForce Class Reference

This class implements an interaction between pairs of particles that varies harmonically with the distance between them. More...

+ Inheritance diagram for HarmonicBondForce:

Public Member Functions

def getNumBonds
 getNumBonds(HarmonicBondForce self) -> int More...
 
def addBond
 addBond(HarmonicBondForce self, int particle1, int particle2, double length, double k) -> int More...
 
def getBondParameters
 getBondParameters(HarmonicBondForce self, int index) More...
 
def setBondParameters
 setBondParameters(HarmonicBondForce self, int index, int particle1, int particle2, double length, double k) More...
 
def updateParametersInContext
 updateParametersInContext(HarmonicBondForce self, Context context) More...
 
def __init__
 init(OpenMM::HarmonicBondForce self) -> HarmonicBondForce init(OpenMM::HarmonicBondForce self, HarmonicBondForce other) -> HarmonicBondForce More...
 
def __del__
 del(OpenMM::HarmonicBondForce self) More...
 
- Public Member Functions inherited from Force
def __init__
 
def __del__
 del(OpenMM::Force self) More...
 
def getForceGroup
 getForceGroup(Force self) -> int More...
 
def setForceGroup
 setForceGroup(Force self, int group) More...
 
def __copy__
 
def __deepcopy__
 

Public Attributes

 this
 

Detailed Description

This class implements an interaction between pairs of particles that varies harmonically with the distance between them.

To use it, create a HarmonicBondForce object then call addBond() once for each bond. After a bond has been added, you can modify its force field parameters by calling setBondParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

Constructor & Destructor Documentation

def __init__ (   self,
  args 
)

init(OpenMM::HarmonicBondForce self) -> HarmonicBondForce init(OpenMM::HarmonicBondForce self, HarmonicBondForce other) -> HarmonicBondForce

Create a HarmonicBondForce.

References simtk.openmm.openmm.stripUnits().

def __del__ (   self)

del(OpenMM::HarmonicBondForce self)

References simtk.openmm.openmm.stripUnits().

Member Function Documentation

def addBond (   self,
  args 
)

addBond(HarmonicBondForce self, int particle1, int particle2, double length, double k) -> int

Add a bond term to the force field.

Parameters
particle1the index of the first particle connected by the bond
particle2the index of the second particle connected by the bond
lengththe equilibrium length of the bond, measured in nm
kthe harmonic force constant for the bond, measured in kJ/mol/nm^2

References simtk.openmm.openmm.stripUnits().

Referenced by Topology.createDisulfideBonds(), and Topology.createStandardBonds().

def getBondParameters (   self,
  args 
)

getBondParameters(HarmonicBondForce self, int index)

Get the force field parameters for a bond term.

Parameters
indexthe index of the bond for which to get parameters
particle1the index of the first particle connected by the bond
particle2the index of the second particle connected by the bond
lengththe equilibrium length of the bond, measured in nm
kthe harmonic force constant for the bond, measured in kJ/mol/nm^2

References simtk.openmm.openmm.stripUnits().

def getNumBonds (   self)

getNumBonds(HarmonicBondForce self) -> int

Get the number of harmonic bond stretch terms in the potential function

References simtk.openmm.openmm.stripUnits().

def setBondParameters (   self,
  args 
)

setBondParameters(HarmonicBondForce self, int index, int particle1, int particle2, double length, double k)

Set the force field parameters for a bond term.

Parameters
indexthe index of the bond for which to set parameters
particle1the index of the first particle connected by the bond
particle2the index of the second particle connected by the bond
lengththe equilibrium length of the bond, measured in nm
kthe harmonic force constant for the bond, measured in kJ/mol/nm^2

References simtk.openmm.openmm.stripUnits().

def updateParametersInContext (   self,
  args 
)

updateParametersInContext(HarmonicBondForce self, Context context)

Update the per-bond parameters in a Context to match those stored in this Force object. This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setBondParameters() to modify this object's parameters, then call updateParametersInState() to copy them over to the Context.

The only information this method updates is the values of per-bond parameters. The set of particles involved in a bond cannot be changed, nor can new bonds be added.

References simtk.openmm.openmm.stripUnits().

Member Data Documentation

this

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