Class TorsionTorsion

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

public class TorsionTorsion extends BondedTerm implements LambdaInterface
The TorsionTorsion class represents two adjacent torsional angles formed by five bonded atoms.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • torsions

      public final Torsion[] torsions
      The two torsions that are coupled.
    • torsionTorsionType

      public TorsionTorsionType torsionTorsionType
      The force field Torsion-Torsion type in use.
  • Constructor Details

    • TorsionTorsion

      public TorsionTorsion(Bond firstBond, Angle angle, Bond lastBond, boolean reversed)
      Torsion-Torsion constructor.
      Parameters:
      firstBond - a Bond object.
      angle - a Angle object.
      lastBond - a Bond object.
      reversed - a boolean.
  • Method Details

    • torsionTorsionFactory

      public static TorsionTorsion torsionTorsionFactory(Bond firstBond, Angle angle, Bond lastBond, ForceField forceField)
      torsionTorsionFactory.
      Parameters:
      firstBond - the first Bond.
      angle - the Angle.
      lastBond - the last Bond.
      forceField - the ForceField parameters to apply.
      Returns:
      the new TorsionTorsion, or null.
    • energy

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

      Evaluate the Torsion-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.
    • getChiralAtom

      public Atom getChiralAtom()
      getChiralAtom.
      Returns:
      a Atom object.
    • 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 Torsion-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