Class Angle

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

public class Angle extends BondedTerm
The Angle class represents an angle formed between three linearly bonded atoms.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • Field Details

    • angleType

      public AngleType angleType
      Force field parameters to compute the angle bending energy.
    • nh

      public int nh
      Number of hydrogen on the central atom that are not part of this Angle.
  • Constructor Details

    • Angle

      public Angle(Bond b1, Bond b2)
      Angle constructor
      Parameters:
      b1 - Bond that forms one leg of the angle
      b2 - Bond that forms the other leg of the angle
  • Method Details

    • logNoAngleType

      public static void logNoAngleType(Atom a1, Atom a2, Atom a3, ForceField forceField)
      Log that no AngleType exists.
      Parameters:
      a1 - Atom 1.
      a2 - Atom 2.
      a3 - Atom 3.
    • compareTo

      public int compareTo(BondedTerm a)
      Specified by:
      compareTo in interface Comparable<BondedTerm>
      Overrides:
      compareTo in class BondedTerm
    • energy

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

      Evaluate this Angle energy.

      Parameters:
      gradient - If true, compute the gradient.
      threadID - The thread ID.
      grad - a AtomicDoubleArray3D object.
      lambdaGrad - a AtomicDoubleArray3D object.
      Returns:
      a double.
    • get1_3

      public Atom get1_3(Atom a)
      If the specified atom is not the central atom of this angle, the atom of the opposite leg is returned. These atoms are said to be 1-3 to each other.
      Parameters:
      a - Atom
      Returns:
      Atom
    • getAngleMode

      public AngleType.AngleMode getAngleMode()
      Getter for the field angleMode.
      Returns:
      a AngleType.AngleMode object.
    • getAngleType

      public AngleType getAngleType()
      Get the AngleType for this angle.
      Returns:
      This angle's AngleType.
    • setAngleType

      public void setAngleType(AngleType a)
      Set a reference to the force field parameters for this Angle.
      Parameters:
      a - a AngleType object.
    • getAtom4

      public Atom getAtom4()
      Getter for the field atom4.
      Returns:
      a Atom object.
    • getCentralAtom

      public Atom getCentralAtom()
      getCentralAtom.
      Returns:
      a Atom object.
    • log

      public void log()
      Log details for this Angle energy term.
    • setConstraint

      public void setConstraint(Constraint c)
      Description copied from class: BondedTerm
      Sets the Constraint on this bond (clearing it if null). May recursively set the Constraint on component terms (i.e. an Angle will call setConstraint on its component Bonds).
      Overrides:
      setConstraint in class BondedTerm
      Parameters:
      c - Constraint or null to clear.
    • setRigidScale

      public void setRigidScale(double rigidScale)
      Setter for the field rigidScale.
      Parameters:
      rigidScale - a double.
    • 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
    • getFourthAtomOfTrigonalCenter

      public Atom getFourthAtomOfTrigonalCenter()
      If the central atom of the angle is trigonal, the 4th member of the trigonal center (that is not a part of the angle) will be returned.
      Returns:
      The 4th atom of a trigonal center.