Class StretchTorsion

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

public class StretchTorsion extends BondedTerm implements LambdaInterface
The StretchTorsion class represents a coupling between a torsional angle and the three bonds contained in the torsion, as defined in the 2017 AMOEBA nucleic acid force field.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • bondType1

      public BondType bondType1
      First bond force field type.
    • bondType2

      public BondType bondType2
      Second bond force field type.
    • bondType3

      public BondType bondType3
      Third bond force field type.
  • Method Details

    • stretchTorsionFactory

      public static StretchTorsion stretchTorsionFactory(Torsion torsion, ForceField forceField)
      Attempt to create a new StretchTorsion based on the supplied torsion.
      Parameters:
      torsion - the Torsion.
      forceField - the ForceField parameters to apply.
      Returns:
      a new StretchTorsion, or null.
    • stretchTorsionForm

      public static String stretchTorsionForm()
      Returns the mathematical form of a stretch-torsion as an OpenMM-parsable String.
      Returns:
      Mathematical form of the stretch-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 Stretch-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/A.
      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 Stretch-Torsional Angle 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