Class PiOrbitalTorsion

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

public class PiOrbitalTorsion extends BondedTerm implements LambdaInterface
The Pi-Orbital Torsion class.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • piOrbitalTorsionType

      public PiOrbitalTorsionType piOrbitalTorsionType
      A reference to the Pi-Torsion type in use.
  • Constructor Details

    • PiOrbitalTorsion

      public PiOrbitalTorsion(Bond middleBond)
      Pi-Orbital Torsion constructor.
      Parameters:
      middleBond - a Bond object.
  • Method Details

    • getMiddleBond

      public Bond getMiddleBond()
      Get the middle bond that the Pi-Orbital Torsion is formed around.
      Returns:
      The middle bond.
    • setPiOrbitalTorsionType

      public void setPiOrbitalTorsionType(PiOrbitalTorsionType piOrbitalTorsionType)
      Set the PiOrbitalTorsionType.
      Parameters:
      piOrbitalTorsionType - The PiOrbitalTorsionType.
    • piOrbitalTorsionFactory

      public static PiOrbitalTorsion piOrbitalTorsionFactory(Bond bond, ForceField forceField)
      Attempt to create a new PiOrbitalTorsion based on the supplied bond and forceField.
      Parameters:
      bond - the Bond to create a PiOrbitalTorsion around.
      forceField - the ForceField parameters to use.
      Returns:
      a new PiOrbitalTorsion, or null.
    • energy

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

      Evaluate the Pi-Orbital 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.
    • 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 Pi-Orbital Torsion energy term.
    • toString

      public String toString()

      Overridden toString method returns the MSNode's name

      Overridden toString Method returns the Term's id.

      Over-ridden toString Method returns the Term's id.

      Overrides:
      toString in class BondedTerm