OpenMM
 All Classes Namespaces Functions Variables Pages
CustomGBForce Class Reference

This class implements complex, multiple stage nonbonded interactions between particles. More...

+ Inheritance diagram for CustomGBForce:

Public Member Functions

def __del__
 del(OpenMM::CustomGBForce self) More...
 
def getNumParticles
 getNumParticles(CustomGBForce self) -> int More...
 
def getNumExclusions
 getNumExclusions(CustomGBForce self) -> int More...
 
def getNumPerParticleParameters
 getNumPerParticleParameters(CustomGBForce self) -> int More...
 
def getNumGlobalParameters
 getNumGlobalParameters(CustomGBForce self) -> int More...
 
def getNumTabulatedFunctions
 getNumTabulatedFunctions(CustomGBForce self) -> int More...
 
def getNumFunctions
 getNumFunctions(CustomGBForce self) -> int More...
 
def getNumComputedValues
 getNumComputedValues(CustomGBForce self) -> int More...
 
def getNumEnergyTerms
 getNumEnergyTerms(CustomGBForce self) -> int More...
 
def getNonbondedMethod
 getNonbondedMethod(CustomGBForce self) -> OpenMM::CustomGBForce::NonbondedMethod More...
 
def setNonbondedMethod
 setNonbondedMethod(CustomGBForce self, OpenMM::CustomGBForce::NonbondedMethod method) More...
 
def getCutoffDistance
 getCutoffDistance(CustomGBForce self) -> double More...
 
def setCutoffDistance
 setCutoffDistance(CustomGBForce self, double distance) More...
 
def addPerParticleParameter
 addPerParticleParameter(CustomGBForce self, std::string const & name) -> int More...
 
def getPerParticleParameterName
 getPerParticleParameterName(CustomGBForce self, int index) -> std::string const & More...
 
def setPerParticleParameterName
 setPerParticleParameterName(CustomGBForce self, int index, std::string const & name) More...
 
def addGlobalParameter
 addGlobalParameter(CustomGBForce self, std::string const & name, double defaultValue) -> int More...
 
def getGlobalParameterName
 getGlobalParameterName(CustomGBForce self, int index) -> std::string const & More...
 
def setGlobalParameterName
 setGlobalParameterName(CustomGBForce self, int index, std::string const & name) More...
 
def getGlobalParameterDefaultValue
 getGlobalParameterDefaultValue(CustomGBForce self, int index) -> double More...
 
def setGlobalParameterDefaultValue
 setGlobalParameterDefaultValue(CustomGBForce self, int index, double defaultValue) More...
 
def addParticle
 addParticle(CustomGBForce self, vectord parameters) -> int More...
 
def getParticleParameters
 getParticleParameters(CustomGBForce self, int index) More...
 
def setParticleParameters
 setParticleParameters(CustomGBForce self, int index, vectord parameters) More...
 
def addComputedValue
 addComputedValue(CustomGBForce self, std::string const & name, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) -> int More...
 
def getComputedValueParameters
 getComputedValueParameters(CustomGBForce self, int index) More...
 
def setComputedValueParameters
 setComputedValueParameters(CustomGBForce self, int index, std::string const & name, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) More...
 
def addEnergyTerm
 addEnergyTerm(CustomGBForce self, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) -> int More...
 
def getEnergyTermParameters
 getEnergyTermParameters(CustomGBForce self, int index) More...
 
def setEnergyTermParameters
 setEnergyTermParameters(CustomGBForce self, int index, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) More...
 
def addExclusion
 addExclusion(CustomGBForce self, int particle1, int particle2) -> int More...
 
def getExclusionParticles
 getExclusionParticles(CustomGBForce self, int index) More...
 
def setExclusionParticles
 setExclusionParticles(CustomGBForce self, int index, int particle1, int particle2) More...
 
def addTabulatedFunction
 addTabulatedFunction(CustomGBForce self, std::string const & name, TabulatedFunction function) -> int More...
 
def getTabulatedFunction
 getTabulatedFunction(CustomGBForce self, int index) -> TabulatedFunction getTabulatedFunction(CustomGBForce self, int index) -> TabulatedFunction More...
 
def getTabulatedFunctionName
 getTabulatedFunctionName(CustomGBForce self, int index) -> std::string const & More...
 
def addFunction
 addFunction(CustomGBForce self, std::string const & name, vectord values, double min, double max) -> int More...
 
def getFunctionParameters
 getFunctionParameters(CustomGBForce self, int index) More...
 
def setFunctionParameters
 setFunctionParameters(CustomGBForce self, int index, std::string const & name, vectord values, double min, double max) More...
 
def updateParametersInContext
 updateParametersInContext(CustomGBForce self, Context context) More...
 
def __init__
 init(OpenMM::CustomGBForce self) -> CustomGBForce init(OpenMM::CustomGBForce self, CustomGBForce other) -> CustomGBForce 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
 

Static Public Attributes

 NoCutoff = _openmm.CustomGBForce_NoCutoff
 
 CutoffNonPeriodic = _openmm.CustomGBForce_CutoffNonPeriodic
 
 CutoffPeriodic = _openmm.CustomGBForce_CutoffPeriodic
 
 SingleParticle = _openmm.CustomGBForce_SingleParticle
 
 ParticlePair = _openmm.CustomGBForce_ParticlePair
 
 ParticlePairNoExclusions = _openmm.CustomGBForce_ParticlePairNoExclusions
 

Detailed Description

This class implements complex, multiple stage nonbonded interactions between particles.

It is designed primarily for implementing Generalized Born implicit solvation models, although it is not strictly limited to that purpose. The interaction is specified as a series of computations, each defined by an arbitrary algebraic expression. It also allows tabulated functions to be defined and used with the computations. It optionally supports periodic boundary conditions and cutoffs for long range interactions.

The computation consists of calculating some number of per-particle computed values, followed by one or more energy terms. A computed value is a scalar value that is computed for each particle in the system. It may depend on an arbitrary set of global and per-particle parameters, and well as on other computed values that have been calculated before it. Once all computed values have been calculated, the energy terms and their derivatives are evaluated to determine the system energy and particle forces. The energy terms may depend on global parameters, per-particle parameters, and per-particle computed values.

When specifying a computed value or energy term, you provide an algebraic expression to evaluate and a computation type describing how the expression is to be evaluated. There are two main types of computations:

  • Single Particle: The expression is evaluated once for each particle in the System. In the case of a computed value, this means the value for a particle depends only on other properties of that particle (its position, parameters, and other computed values). In the case of an energy term, it means each particle makes an independent contribution to the System energy.

  • Particle Pairs: The expression is evaluated for every pair of particles in the system. In the case of a computed value, the value for a particular particle is calculated by pairing it with every other particle in the system, evaluating the expression for each pair, and summing them. For an energy term, each particle pair makes an independent contribution to the System energy. (Note that energy terms are assumed to be symmetric with respect to the two interacting particles, and therefore are evaluated only once per pair. In contrast, expressions for computed values need not be symmetric and therefore are calculated twice for each pair: once when calculating the value for the first particle, and again when calculating the value for the second particle.)

Be aware that, although this class is extremely general in the computations it can define, particular Platforms may only support more restricted types of computations. In particular, all currently existing Platforms require that the first computed value must be a particle pair computation, and all computed values after the first must be single particle computations. This is sufficient for most Generalized Born models, but might not permit some other types of calculations to be implemented.

This is a complicated class to use, and an example may help to clarify it. The following code implements the OBC variant of the GB/SA solvation model, using the ACE approximation to estimate surface area:

CustomGBForce* custom = new CustomGBForce();
custom->addPerParticleParameter("q");
custom->addPerParticleParameter("radius");
custom->addPerParticleParameter("scale");
custom->addGlobalParameter("solventDielectric", obc->getSolventDielectric());
custom->addGlobalParameter("soluteDielectric", obc->getSoluteDielectric());
custom->addComputedValue("I", "step(r+sr2-or1)*0.5*(1/L-1/U+0.25*(1/U^2-1/L^2)*(r-sr2*sr2/r)+0.5*log(L/U)/r+C);"
"U=r+sr2;"
"C=2*(1/or1-1/L)*step(sr2-r-or1);"
"L=max(or1, D);"
"D=abs(r-sr2);"
"sr2 = scale2*or2;"
"or1 = radius1-0.009; or2 = radius2-0.009", CustomGBForce::ParticlePairNoExclusions);
custom->addComputedValue("B", "1/(1/or-tanh(1*psi-0.8*psi^2+4.85*psi^3)/radius);"
"psi=I*or; or=radius-0.009", CustomGBForce::SingleParticle);
custom->addEnergyTerm("28.3919551*(radius+0.14)^2*(radius/B)^6-0.5*138.935456*(1/soluteDielectric-1/solventDielectric)*q^2/B",
CustomGBForce::SingleParticle);
custom->addEnergyTerm("-138.935456*(1/soluteDielectric-1/solventDielectric)*q1*q2/f;"
"f=sqrt(r^2+B1*B2*exp(-r^2/(4*B1*B2)))", CustomGBForce::ParticlePair);

It begins by defining three per-particle parameters (charge, atomic radius, and scale factor) and two global parameters (the dielectric constants for the solute and solvent). It then defines a computed value "I" of type ParticlePair. The expression for evaluating it is a complicated function of the distance between each pair of particles (r), their atomic radii (radius1 and radius2), and their scale factors (scale1 and scale2). Very roughly speaking, it is a measure of the distance between each particle and other nearby particles.

Next a computation is defined for the Born Radius (B). It is computed independently for each particle, and is a function of that particle's atomic radius and the intermediate value I defined above.

Finally, two energy terms are defined. The first one is computed for each particle and represents the surface area term, as well as the self interaction part of the polarization energy. The second term is calculated for each pair of particles, and represents the screening of electrostatic interactions by the solvent.

After defining the force as shown above, you should then call addParticle() once for each particle in the System to set the values of its per-particle parameters (q, radius, and scale). The number of particles for which you set parameters must be exactly equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

CustomGBForce also lets you specify "exclusions", particular pairs of particles whose interactions should be omitted from calculations. This is most often used for particles that are bonded to each other. Even if you specify exclusions, however, you can use the computation type ParticlePairNoExclusions to indicate that exclusions should not be applied to a particular piece of the computation.

Expressions may involve the operators + (add), - (subtract), * (multiply), / (divide), and ^ (power), and the following functions: sqrt, exp, log, sin, cos, sec, csc, tan, cot, asin, acos, atan, sinh, cosh, tanh, erf, erfc, min, max, abs, step, delta. All trigonometric functions are defined in radians, and log is the natural logarithm. step(x) = 0 if x is less than 0, 1 otherwise. delta(x) = 1 if x is 0, 0 otherwise. In expressions for particle pair calculations, the names of per-particle parameters and computed values have the suffix "1" or "2" appended to them to indicate the values for the two interacting particles. As seen in the above example, an expression may also involve intermediate quantities that are defined following the main expression, using ";" as a separator.

In addition, you can call addTabulatedFunction() to define a new function based on tabulated values. You specify the function by creating a TabulatedFunction object. That function can then appear in expressions.

Constructor & Destructor Documentation

def __del__ (   self)

del(OpenMM::CustomGBForce self)

References simtk.openmm.openmm.stripUnits().

def __init__ (   self,
  args 
)

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

Create a CustomGBForce.

References simtk.openmm.openmm.stripUnits().

Member Function Documentation

def addComputedValue (   self,
  args 
)

addComputedValue(CustomGBForce self, std::string const & name, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) -> int

Add a computed value to calculate for each particle.

Parameters
namethe name of the value
expressionan algebraic expression to evaluate when calculating the computed value. If the ComputationType is SingleParticle, the expression is evaluated independently for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and previous computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every other particle in the system and summed to get the final value. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and previous computed values for each of them. Append "1" to a variable name to indicate the parameter for the particle whose value is being calculated, and "2" to indicate the particle it is interacting with.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def addEnergyTerm (   self,
  args 
)

addEnergyTerm(CustomGBForce self, std::string const & expression, OpenMM::CustomGBForce::ComputationType type) -> int

Add a term to the energy computation.

Parameters
expressionan algebraic expression to evaluate when calculating the energy. If the ComputationType is SingleParticle, the expression is evaluated once for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every pair of particles in the system. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and computed values for each of them. Append "1" to a variable name to indicate the parameter for the first particle in the pair and "2" to indicate the second particle in the pair.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def addExclusion (   self,
  args 
)

addExclusion(CustomGBForce self, int particle1, int particle2) -> int

Add a particle pair to the list of interactions that should be excluded.

Parameters
particle1the index of the first particle in the pair
particle2the index of the second particle in the pair

References simtk.openmm.openmm.stripUnits().

def addFunction (   self,
  args 
)

addFunction(CustomGBForce self, std::string const & name, vectord values, double min, double max) -> int

Add a tabulated function that may appear in expressions.

References simtk.openmm.openmm.stripUnits().

def addGlobalParameter (   self,
  args 
)

addGlobalParameter(CustomGBForce self, std::string const & name, double defaultValue) -> int

Add a new global parameter that the interaction may depend on.

Parameters
namethe name of the parameter
defaultValuethe default value of the parameter

References simtk.openmm.openmm.stripUnits().

def addParticle (   self,
  args 
)

addParticle(CustomGBForce self, vectord parameters) -> int

Add the nonbonded force parameters for a particle. This should be called once for each particle in the System. When it is called for the i'th time, it specifies the parameters for the i'th particle.

Parameters
parametersthe list of parameters for the new particle

References simtk.openmm.openmm.stripUnits().

Referenced by NonbondedForce.addParticle_usingRVdw().

def addPerParticleParameter (   self,
  args 
)

addPerParticleParameter(CustomGBForce self, std::string const & name) -> int

Add a new per-particle parameter that the interaction may depend on.

Parameters
namethe name of the parameter

References simtk.openmm.openmm.stripUnits().

def addTabulatedFunction (   self,
  args 
)

addTabulatedFunction(CustomGBForce self, std::string const & name, TabulatedFunction function) -> int

Add a tabulated function that may appear in expressions.

Parameters
namethe name of the function as it appears in expressions
functiona TabulatedFunction object defining the function. The TabulatedFunction should have been created on the heap with the "new" operator. The Force takes over ownership of it, and deletes it when the Force itself is deleted.
def getComputedValueParameters (   self,
  args 
)

getComputedValueParameters(CustomGBForce self, int index)

Get the properties of a computed value.

Parameters
indexthe index of the computed value for which to get parameters
namethe name of the value
expressionan algebraic expression to evaluate when calculating the computed value. If the ComputationType is SingleParticle, the expression is evaluated independently for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and previous computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every other particle in the system and summed to get the final value. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and previous computed values for each of them. Append "1" to a variable name to indicate the parameter for the particle whose value is being calculated, and "2" to indicate the particle it is interacting with.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def getCutoffDistance (   self)

getCutoffDistance(CustomGBForce self) -> double

Get the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

References simtk.openmm.openmm.stripUnits().

def getEnergyTermParameters (   self,
  args 
)

getEnergyTermParameters(CustomGBForce self, int index)

Get the properties of a term to the energy computation.

Parameters
indexthe index of the term for which to get parameters
expressionan algebraic expression to evaluate when calculating the energy. If the ComputationType is SingleParticle, the expression is evaluated once for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every pair of particles in the system. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and computed values for each of them. Append "1" to a variable name to indicate the parameter for the first particle in the pair and "2" to indicate the second particle in the pair.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def getExclusionParticles (   self,
  args 
)

getExclusionParticles(CustomGBForce self, int index)

Get the particles in a pair whose interaction should be excluded.

Parameters
indexthe index of the exclusion for which to get particle indices
particle1the index of the first particle in the pair
particle2the index of the second particle in the pair

References simtk.openmm.openmm.stripUnits().

def getFunctionParameters (   self,
  args 
)

getFunctionParameters(CustomGBForce self, int index)

Get the parameters for a tabulated function that may appear in expressions.

References simtk.openmm.openmm.stripUnits().

def getGlobalParameterDefaultValue (   self,
  args 
)

getGlobalParameterDefaultValue(CustomGBForce self, int index) -> double

Get the default value of a global parameter.

Parameters
indexthe index of the parameter for which to get the default value

References simtk.openmm.openmm.stripUnits().

def getGlobalParameterName (   self,
  args 
)

getGlobalParameterName(CustomGBForce self, int index) -> std::string const &

Get the name of a global parameter.

Parameters
indexthe index of the parameter for which to get the name

References simtk.openmm.openmm.stripUnits().

def getNonbondedMethod (   self)

getNonbondedMethod(CustomGBForce self) -> OpenMM::CustomGBForce::NonbondedMethod

Get the method used for handling long range nonbonded interactions.

References simtk.openmm.openmm.stripUnits().

def getNumComputedValues (   self)

getNumComputedValues(CustomGBForce self) -> int

Get the number of per-particle computed values the interaction depends on.

References simtk.openmm.openmm.stripUnits().

def getNumEnergyTerms (   self)

getNumEnergyTerms(CustomGBForce self) -> int

Get the number of terms in the energy computation.

References simtk.openmm.openmm.stripUnits().

def getNumExclusions (   self)

getNumExclusions(CustomGBForce self) -> int

Get the number of particle pairs whose interactions should be excluded.

References simtk.openmm.openmm.stripUnits().

def getNumFunctions (   self)

getNumFunctions(CustomGBForce self) -> int

Get the number of tabulated functions that have been defined.

References simtk.openmm.openmm.stripUnits().

def getNumGlobalParameters (   self)

getNumGlobalParameters(CustomGBForce self) -> int

Get the number of global parameters that the interaction depends on.

References simtk.openmm.openmm.stripUnits().

def getNumParticles (   self)

getNumParticles(CustomGBForce self) -> int

Get the number of particles for which force field parameters have been defined.

References simtk.openmm.openmm.stripUnits().

def getNumPerParticleParameters (   self)

getNumPerParticleParameters(CustomGBForce self) -> int

Get the number of per-particle parameters that the interaction depends on.

References simtk.openmm.openmm.stripUnits().

def getNumTabulatedFunctions (   self)

getNumTabulatedFunctions(CustomGBForce self) -> int

Get the number of tabulated functions that have been defined.

References simtk.openmm.openmm.stripUnits().

def getParticleParameters (   self,
  args 
)

getParticleParameters(CustomGBForce self, int index)

Get the nonbonded force parameters for a particle.

Parameters
indexthe index of the particle for which to get parameters
parametersthe list of parameters for the specified particle

References simtk.openmm.openmm.stripUnits().

def getPerParticleParameterName (   self,
  args 
)

getPerParticleParameterName(CustomGBForce self, int index) -> std::string const &

Get the name of a per-particle parameter.

Parameters
indexthe index of the parameter for which to get the name

References simtk.openmm.openmm.stripUnits().

def getTabulatedFunction (   self,
  args 
)

getTabulatedFunction(CustomGBForce self, int index) -> TabulatedFunction getTabulatedFunction(CustomGBForce self, int index) -> TabulatedFunction

Get a reference to a tabulated function that may appear in expressions.

Parameters
indexthe index of the function to get

References simtk.openmm.openmm.stripUnits().

def getTabulatedFunctionName (   self,
  args 
)

getTabulatedFunctionName(CustomGBForce self, int index) -> std::string const &

Get the name of a tabulated function that may appear in expressions.

Parameters
indexthe index of the function to get

References simtk.openmm.openmm.stripUnits().

def setComputedValueParameters (   self,
  args 
)

setComputedValueParameters(CustomGBForce self, int index, std::string const & name, std::string const & expression, OpenMM::CustomGBForce::ComputationType type)

Set the properties of a computed value.

Parameters
indexthe index of the computed value for which to set parameters
namethe name of the value
expressionan algebraic expression to evaluate when calculating the computed value. If the ComputationType is SingleParticle, the expression is evaluated independently for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and previous computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every other particle in the system and summed to get the final value. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and previous computed values for each of them. Append "1" to a variable name to indicate the parameter for the particle whose value is being calculated, and "2" to indicate the particle it is interacting with.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def setCutoffDistance (   self,
  args 
)

setCutoffDistance(CustomGBForce self, double distance)

Set the cutoff distance (in nm) being used for nonbonded interactions. If the NonbondedMethod in use is NoCutoff, this value will have no effect.

Parameters
distancethe cutoff distance, measured in nm

References simtk.openmm.openmm.stripUnits().

def setEnergyTermParameters (   self,
  args 
)

setEnergyTermParameters(CustomGBForce self, int index, std::string const & expression, OpenMM::CustomGBForce::ComputationType type)

Set the properties of a term to the energy computation.

Parameters
indexthe index of the term for which to set parameters
expressionan algebraic expression to evaluate when calculating the energy. If the ComputationType is SingleParticle, the expression is evaluated once for each particle, and may depend on its x, y, and z coordinates, as well as the per-particle parameters and computed values for that particle. If the ComputationType is ParticlePair or ParticlePairNoExclusions, the expression is evaluated once for every pair of particles in the system. In the latter case, the expression may depend on the distance r between the two particles, and on the per-particle parameters and computed values for each of them. Append "1" to a variable name to indicate the parameter for the first particle in the pair and "2" to indicate the second particle in the pair.
typethe method to use for computing this value

References simtk.openmm.openmm.stripUnits().

def setExclusionParticles (   self,
  args 
)

setExclusionParticles(CustomGBForce self, int index, int particle1, int particle2)

Set the particles in a pair whose interaction should be excluded.

Parameters
indexthe index of the exclusion for which to set particle indices
particle1the index of the first particle in the pair
particle2the index of the second particle in the pair

References simtk.openmm.openmm.stripUnits().

def setFunctionParameters (   self,
  args 
)

setFunctionParameters(CustomGBForce self, int index, std::string const & name, vectord values, double min, double max)

Set the parameters for a tabulated function that may appear in expressions.

References simtk.openmm.openmm.stripUnits().

def setGlobalParameterDefaultValue (   self,
  args 
)

setGlobalParameterDefaultValue(CustomGBForce self, int index, double defaultValue)

Set the default value of a global parameter.

Parameters
indexthe index of the parameter for which to set the default value
namethe default value of the parameter

References simtk.openmm.openmm.stripUnits().

def setGlobalParameterName (   self,
  args 
)

setGlobalParameterName(CustomGBForce self, int index, std::string const & name)

Set the name of a global parameter.

Parameters
indexthe index of the parameter for which to set the name
namethe name of the parameter

References simtk.openmm.openmm.stripUnits().

def setNonbondedMethod (   self,
  args 
)

setNonbondedMethod(CustomGBForce self, OpenMM::CustomGBForce::NonbondedMethod method)

Set the method used for handling long range nonbonded interactions.

References simtk.openmm.openmm.stripUnits().

def setParticleParameters (   self,
  args 
)

setParticleParameters(CustomGBForce self, int index, vectord parameters)

Set the nonbonded force parameters for a particle.

Parameters
indexthe index of the particle for which to set parameters
parametersthe list of parameters for the specified particle

References simtk.openmm.openmm.stripUnits().

def setPerParticleParameterName (   self,
  args 
)

setPerParticleParameterName(CustomGBForce self, int index, std::string const & name)

Set the name of a per-particle parameter.

Parameters
indexthe index of the parameter for which to set the name
namethe name of the parameter

References simtk.openmm.openmm.stripUnits().

def updateParametersInContext (   self,
  args 
)

updateParametersInContext(CustomGBForce self, Context context)

Update the per-particle 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 setParticleParameters() to modify this object's parameters, then call updateParametersInState() to copy them over to the Context.

This method has several limitations. The only information it updates is the values of per-particle parameters. All other aspects of the Force (such as the energy function) are unaffected and can only be changed by reinitializing the Context. Also, this method cannot be used to add new particles, only to change the parameters of existing ones.

References simtk.openmm.openmm.stripUnits().

Member Data Documentation

CutoffNonPeriodic = _openmm.CustomGBForce_CutoffNonPeriodic
static
CutoffPeriodic = _openmm.CustomGBForce_CutoffPeriodic
static
NoCutoff = _openmm.CustomGBForce_NoCutoff
static
ParticlePair = _openmm.CustomGBForce_ParticlePair
static
ParticlePairNoExclusions = _openmm.CustomGBForce_ParticlePairNoExclusions
static
SingleParticle = _openmm.CustomGBForce_SingleParticle
static
this

Referenced by System.__init__().


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