Class RestraintTorsion

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

public class RestraintTorsion extends BondedTerm implements LambdaInterface
See Also:
  • Field Details

    • torsionType

      public final TorsionType torsionType
    • units

      public final double units
  • Constructor Details

    • RestraintTorsion

      public RestraintTorsion(Atom a1, Atom a2, Atom a3, Atom a4, TorsionType tType, boolean lamEnabled, boolean revLam, double units)
  • Method Details

    • energy

      public double energy(boolean gradient, int threadID, AtomicDoubleArray3D grad, AtomicDoubleArray3D lambdaGrad)
      Description copied from interface: BondedEnergy
      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.
    • getLambda

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

      public Atom[] getAtoms()
      Description copied from class: BondedTerm
      Returns a reference to the Atoms contained in this BondedTerm, regardless of whether they are child nodes in the tree structure.
      Overrides:
      getAtoms in class BondedTerm
      Returns:
      Atoms in this BondedTerm
    • getAtom

      public Atom getAtom(int index)
      Description copied from class: BondedTerm
      Get the constituent Atom specified by index.
      Overrides:
      getAtom in class BondedTerm
      Parameters:
      index - The index of the Atom to return.
      Returns:
      a Atom object.
    • applyLambda

      public boolean applyLambda()
      Description copied from class: BondedTerm
      Check if any atom of this BondedTerm has the Lambda flag set.
      Overrides:
      applyLambda in class BondedTerm
      Returns:
      True if Lambda is applied to one of the BondedTerm atoms.
    • setLambda

      public void setLambda(double lambda)
      Description copied from interface: LambdaInterface
      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()
      Description copied from interface: LambdaInterface
      Get the 2nd partial derivative of the energy with respect to lambda.
      Specified by:
      getd2EdL2 in interface LambdaInterface
      Returns:
      d2EdL2
    • getdEdL

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

      public double mapLambda(double lambda)
    • getdEdXdL

      public void getdEdXdL(double[] gradient)
      Description copied from interface: LambdaInterface
      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).
    • toString

      public String toString()
      Description copied from class: BondedTerm

      Overridden toString method returns the MSNode's name

      Overridden toString Method returns the Term's id.

      Overrides:
      toString in class BondedTerm