# AmoebaInPlaneAngleForce¶

class simtk.openmm.openmm.AmoebaInPlaneAngleForce(*args)

This class implements an interaction at trigonal centers corresponding to the projected in-plane angle bend energy between four particles. The interaction is defined by a 6th order polynomial in the angle between them. Only the quadratic term is set per-angle. The coefficients of the higher order terms each have a single value that is set globally.

To use it, create an AmoebaInPlaneAngleForce object then call addAngle() once for each angle. After an angle has been added, you can modify its force field parameters by calling setAngleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

__init__(self) → AmoebaInPlaneAngleForce

__init__(self, other) -> AmoebaInPlaneAngleForce

Create an AmoebaAngleForce.

Methods

 __init__((self) -> AmoebaInPlaneAngleForce) __init__(self, other) -> AmoebaInPlaneAngleForce addAngle((self, particle1, particle2, ...) Add an angle term to the force field. getAmoebaGlobalInPlaneAngleCubic(...) Get the global cubic term getAmoebaGlobalInPlaneAnglePentic(...) Get the global pentic term getAmoebaGlobalInPlaneAngleQuartic(...) Get the global quartic term getAmoebaGlobalInPlaneAngleSextic(...) Get the global sextic term getAngleParameters(self, index) Get the force field parameters for an angle term. getForceGroup((self) -> int) Get the force group this Force belongs to. getNumAngles((self) -> int) Get the number of in-plane angle terms in the potential function setAmoebaGlobalInPlaneAngleCubic(self, cubicK) Set the global cubic term setAmoebaGlobalInPlaneAnglePentic(self, penticK) Set the global pentic term setAmoebaGlobalInPlaneAngleQuartic(self, ...) Set the global quartic term setAmoebaGlobalInPlaneAngleSextic(self, sexticK) Set the global sextic term setAngleParameters(self, index, particle1, ...) Set the force field parameters for an angle term. setForceGroup(self, group) Set the force group this Force belongs to. setUsesPeriodicBoundaryConditions(self, periodic) Set whether this force should apply periodic boundary conditions when calculating displacements. updateParametersInContext(self, context) Update the per-angle parameters in a Context to match those stored in this Force object. usesPeriodicBoundaryConditions((self) -> bool) Returns whether or not this force makes use of periodic boundary conditions.
getNumAngles(self) → int

Get the number of in-plane angle terms in the potential function

setAmoebaGlobalInPlaneAngleCubic(self, cubicK)

Set the global cubic term

Parameters: cubicK (double) – the cubic force constant for the angle
getAmoebaGlobalInPlaneAngleCubic(self) → double

Get the global cubic term

Returns: global cubicK term double
setAmoebaGlobalInPlaneAngleQuartic(self, quarticK)

Set the global quartic term

Parameters: quarticK (double) – the quartic force constant for the angle
getAmoebaGlobalInPlaneAngleQuartic(self) → double

Get the global quartic term

Returns: global quartic term double
setAmoebaGlobalInPlaneAnglePentic(self, penticK)

Set the global pentic term

Parameters: penticK (double) – the pentic force constant for the angle
getAmoebaGlobalInPlaneAnglePentic(self) → double

Get the global pentic term

Returns: global penticK term double
setAmoebaGlobalInPlaneAngleSextic(self, sexticK)

Set the global sextic term

Parameters: sexticK (double) – the sextic force constant for the angle
getAmoebaGlobalInPlaneAngleSextic(self) → double

Get the global sextic term

Returns: global sextic term double
addAngle(self, particle1, particle2, particle3, particle4, length, quadraticK) → int

Add an angle term to the force field.

Parameters: particle1 (int) – the index of the first particle connected by the angle particle2 (int) – the index of the second particle connected by the angle particle3 (int) – the index of the third particle connected by the angle particle4 (int) – the index of the fourth particle connected by the angle length (double) – the equilibrium angle, measured in radians quadraticK (double) – the quadratic force constant for the angle measured in kJ/mol/radian^2 the index of the angle that was added int
getAngleParameters(self, index)

Get the force field parameters for an angle term.

Parameters: index (int) – the index of the angle for which to get parameters particle1 (int) – the index of the first particle connected by the angle particle2 (int) – the index of the second particle connected by the angle particle3 (int) – the index of the third particle connected by the angle particle4 (int) – the index of the fourth particle connected by the angle length (double) – the equilibrium angle, measured in radians quadraticK (double) – the quadratic force constant for the angle measured in kJ/mol/radian^2
setAngleParameters(self, index, particle1, particle2, particle3, particle4, length, quadraticK)

Set the force field parameters for an angle term.

Parameters: index (int) – the index of the angle for which to set parameters particle1 (int) – the index of the first particle connected by the angle particle2 (int) – the index of the second particle connected by the angle particle3 (int) – the index of the third particle connected by the angle particle4 (int) – the index of the fourth particle connected by the angle length (double) – the equilibrium angle, measured in radians quadraticK (double) – the quadratic force constant for the angle, measured in kJ/mol/radian^2
updateParametersInContext(self, context)

Update the per-angle 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 setAngleParameters() to modify this object’s parameters, then call updateParametersInContext() to copy them over to the Context.

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

setUsesPeriodicBoundaryConditions(self, periodic)

Set whether this force should apply periodic boundary conditions when calculating displacements. Usually this is not appropriate for bonded forces, but there are situations when it can be useful.

usesPeriodicBoundaryConditions(self) → bool

Returns whether or not this force makes use of periodic boundary conditions.

Returns: true if force uses PBC and false otherwise bool
__copy__(self) → Force
getForceGroup(self) → int

Get the force group this Force belongs to.

setForceGroup(self, group)

Set the force group this Force belongs to.

Parameters: group (int) – the group index. Legal values are between 0 and 31 (inclusive).