Class AngleTorsion

All Implemented Interfaces:
BondedEnergy, LambdaInterface, ROLS, Serializable, Cloneable, Comparable<BondedTerm>, MutableTreeNode, TreeNode

public class AngleTorsion extends BondedTerm implements LambdaInterface
The AngleTorsion class represents an angle torsion coupling between four bonded atoms.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • angleType1

      public AngleType angleType1
      First angle force field type.
    • angleType2

      public AngleType angleType2
      Second angle force field type.
  • Constructor Details

    • AngleTorsion

      public AngleTorsion(Angle an1, Angle an2)
      AngleTorsion constructor.
      Parameters:
      an1 - Angle that combines to form the Torsional Angle
      an2 - Angle that combines to form the Torsional Angle
    • AngleTorsion

      public AngleTorsion(Bond b1, Bond b2, Bond b3)
      Create a AngleTorsion from 3 connected bonds (no error checking)
      Parameters:
      b1 - Bond
      b2 - Bond
      b3 - Bond
    • AngleTorsion

      public AngleTorsion(String n)
      AngleTorsion Constructor.
      Parameters:
      n - Torsion id
  • Method Details

    • angleTorsionForm

      public static String angleTorsionForm()
      Returns the mathematical form of an angle-torsion as an OpenMM-parsable String.
      Returns:
      Mathematical form of the angle-torsion coupling.
    • compare

      public boolean compare(Atom a0, Atom a1, Atom a2, Atom a3)
      compare
      Parameters:
      a0 - a Atom object.
      a1 - a Atom object.
      a2 - a Atom object.
      a3 - a Atom object.
      Returns:
      a boolean.
    • energy

      public double energy(boolean gradient, int threadID, AtomicDoubleArray3D grad, AtomicDoubleArray3D lambdaGrad)
      energy.

      Evaluate the Angle-Torsion energy.

      Specified by:
      energy in interface BondedEnergy
      Parameters:
      gradient - If true, compute the gradient.
      threadID - The thread ID.
      grad - a AtomicDoubleArray3D object.
      lambdaGrad - a AtomicDoubleArray3D object.
      Returns:
      a double.
    • get1_4

      public Atom get1_4(Atom a)
      If the specified atom is not a central atom of this torsion, the atom at the opposite end is returned. These atoms are said to be 1-4 to each other.
      Parameters:
      a - Atom
      Returns:
      Atom
    • getConstants

      public double[] getConstants()
      Returns the array of stretch-torsion constants, in units of kcal/mol/degree.
      Returns:
      Stretch-torsion constants.
    • getLambda

      public double getLambda()
      Get the current value of the state variable.
      Specified by:
      getLambda in interface LambdaInterface
      Returns:
      state
    • setLambda

      public void setLambda(double lambda)
      Set the current value of the state variable. May be ignored if lambda is not being applied.
      Specified by:
      setLambda in interface LambdaInterface
      Parameters:
      lambda - a double.
    • getd2EdL2

      public double getd2EdL2()
      Get the 2nd partial derivative of the energy with respect to lambda.
      Specified by:
      getd2EdL2 in interface LambdaInterface
      Returns:
      d2EdL2
    • getdEdL

      public double getdEdL()
      Get the partial derivative of the energy with respect to lambda.
      Specified by:
      getdEdL in interface LambdaInterface
      Returns:
      dEdL
    • getdEdXdL

      public void getdEdXdL(double[] gradient)
      Get the gradient of dEdL with respect to each parameter.
      Specified by:
      getdEdXdL in interface LambdaInterface
      Parameters:
      gradient - - A double array of length the number of parameters in the model (commonly 3 * number of atoms).
    • log

      public void log()
      Log details for this Angle-Torsion energy term.
    • toString

      public String toString()

      Overridden toString method returns the MSNode's name

      Overridden toString Method returns the Term's id.

      Overridden toString Method returns the Term's id.

      Overrides:
      toString in class BondedTerm