AmoebaInPlaneAngleForce

class OpenMM::AmoebaInPlaneAngleForce

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().

Methods

AmoebaInPlaneAngleForce

Create an AmoebaAngleForce.

getNumAngles

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

setAmoebaGlobalInPlaneAngleCubic

Set the global cubic term

getAmoebaGlobalInPlaneAngleCubic

Get the global cubic term

setAmoebaGlobalInPlaneAngleQuartic

Set the global quartic term

getAmoebaGlobalInPlaneAngleQuartic

Get the global quartic term

setAmoebaGlobalInPlaneAnglePentic

Set the global pentic term

getAmoebaGlobalInPlaneAnglePentic

Get the global pentic term

setAmoebaGlobalInPlaneAngleSextic

Set the global sextic term

getAmoebaGlobalInPlaneAngleSextic

Get the global sextic term

addAngle

Add an angle term to the force field.

getAngleParameters

Get the force field parameters for an angle term.

setAngleParameters

Set the force field parameters for an angle term.

updateParametersInContext

Update the per-angle parameters in a Context to match those stored in this Force object.

setUsesPeriodicBoundaryConditions

Set whether this force should apply periodic boundary conditions when calculating displacements.

usesPeriodicBoundaryConditions

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

AmoebaInPlaneAngleForce()

Create an AmoebaAngleForce.

int getNumAngles() const

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

void setAmoebaGlobalInPlaneAngleCubic(double cubicK)

Set the global cubic term

Parameters

  • cubicK – the cubic force constant for the angle

double getAmoebaGlobalInPlaneAngleCubic() const

Get the global cubic term

Returns

global cubicK term

void setAmoebaGlobalInPlaneAngleQuartic(double quarticK)

Set the global quartic term

Parameters

  • quarticK – the quartic force constant for the angle

double getAmoebaGlobalInPlaneAngleQuartic() const

Get the global quartic term

Returns

global quartic term

void setAmoebaGlobalInPlaneAnglePentic(double penticK)

Set the global pentic term

Parameters

  • penticK – the pentic force constant for the angle

double getAmoebaGlobalInPlaneAnglePentic() const

Get the global pentic term

Returns

global penticK term

void setAmoebaGlobalInPlaneAngleSextic(double sexticK)

Set the global sextic term

Parameters

  • sexticK – the sextic force constant for the angle

double getAmoebaGlobalInPlaneAngleSextic() const

Get the global sextic term

Returns

global sextic term

int addAngle(int particle1, int particle2, int particle3, int particle4, double length, double quadraticK)

Add an angle term to the force field.

Parameters

  • particle1 – the index of the first particle connected by the angle

  • particle2 – the index of the second particle connected by the angle

  • particle3 – the index of the third particle connected by the angle

  • particle4 – the index of the fourth particle connected by the angle

  • length – the equilibrium angle, measured in radians

  • quadraticK – the quadratic force constant for the angle measured in kJ/mol/radian^2

Returns

the index of the angle that was added

void getAngleParameters(int index, int &particle1, int &particle2, int &particle3, int &particle4, double &length, double &quadraticK) const

Get the force field parameters for an angle term.

Parameters

  • index – the index of the angle for which to get parameters

  • particle1 – [out] the index of the first particle connected by the angle

  • particle2 – [out] the index of the second particle connected by the angle

  • particle3 – [out] the index of the third particle connected by the angle

  • particle4 – [out] the index of the fourth particle connected by the angle

  • length – [out] the equilibrium angle, measured in radians

  • quadraticK – [out] the quadratic force constant for the angle measured in kJ/mol/radian^2

void setAngleParameters(int index, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK)

Set the force field parameters for an angle term.

Parameters

  • index – the index of the angle for which to set parameters

  • particle1 – the index of the first particle connected by the angle

  • particle2 – the index of the second particle connected by the angle

  • particle3 – the index of the third particle connected by the angle

  • particle4 – the index of the fourth particle connected by the angle

  • length – the equilibrium angle, measured in radians

  • quadraticK – the quadratic force constant for the angle, measured in kJ/mol/radian^2

void updateParametersInContext(Context &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.

void setUsesPeriodicBoundaryConditions(bool 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.

bool usesPeriodicBoundaryConditions() const

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

Returns

true if force uses PBC and false otherwise