Class AngleTorsionType

java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.AngleTorsionType
All Implemented Interfaces:
Comparator<String>

@FFXProperty(name="angtors", clazz=java.lang.String.class, propertyGroup=PotentialFunctionParameter, description="[4 integers and 6 reals]\nProvides the values for a single bond angle bending-torsional angle parameter.\nThe integer modifiers give the atom class numbers for the four kinds of atoms involved in the torsion and its contained angles.\nThe real number modifiers give the force constant values for both angles coupled with 1-, 2- and 3-fold torsional terms.\nThe default units for the force constants are kcal/mole/radian, but this can be controlled via the angtorunit keyword.\n") public final class AngleTorsionType extends BaseType implements Comparator<String>
The AngleTorsionType class defines one angle-torsion energy type.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details

    • DEFAULT_ANGTOR_UNIT

      public static final double DEFAULT_ANGTOR_UNIT
      See Also:
    • angtorunit

      @FFXProperty(name="angtorunit", propertyGroup=EnergyUnitConversion, defaultValue="Pi/180", description="Sets the scale factor needed to convert the energy value computed by the angle bending-torsional angle\ncross term into units of kcal/mole. The correct value is force field dependent and typically provided in the\nheader of the master force field parameter file.\n") public double angtorunit
      Convert angle-torsion to kcal/mole.
    • atomClasses

      public final int[] atomClasses
      Atom classes for this stretch-torsion type.
    • forceConstants

      public final double[] forceConstants
      Force constants.
  • Constructor Details

    • AngleTorsionType

      public AngleTorsionType(int[] atomClasses, double[] forceConstants)
      AngleTorsionType Constructor.
      Parameters:
      atomClasses - Atomic classes.
      forceConstants - Force constants.
  • Method Details

    • average

      public static AngleTorsionType average(AngleTorsionType angleTorsionType1, AngleTorsionType angleTorsionType2, int[] atomClasses)
      average.
      Parameters:
      angleTorsionType1 - a AngleTorsionType object.
      angleTorsionType2 - a AngleTorsionType object.
      atomClasses - an array of
      invalid reference
      int
      objects.
      Returns:
      a AngleTorsionType object.
    • parse

      public static AngleTorsionType parse(String input, String[] tokens)
      Construct an AngleTorsionType from an input string.
      Parameters:
      input - The overall input String.
      tokens - The input String tokenized.
      Returns:
      an AngleTorsionType instance.
    • sortKey

      public static String sortKey(int[] c)
      This method sorts the atom classes for the angle-torsion.
      Parameters:
      c - atomClasses
      Returns:
      lookup key
      Since:
      1.0
    • compare

      public int compare(String s1, String s2)
      Specified by:
      compare in interface Comparator<String>
      Since:
      1.0
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Comparator<String>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • incrementClasses

      public void incrementClasses(int increment)
      incrementClasses
      Parameters:
      increment - the value to increment the atom classes by.
    • patchClasses

      public AngleTorsionType patchClasses(HashMap<AtomType,AtomType> typeMap)
      Remap new atom classes to known internal ones.
      Parameters:
      typeMap - a lookup between new atom types and known atom types.
      Returns:
      a AngleTorsionType object.
    • toString

      public String toString()

      Basic toString method.

      Nicely formatted Angle-Torsion string.

      Overrides:
      toString in class BaseType
    • getXMLForce

      public static Element getXMLForce(Document doc, ForceField forceField)
      Create an AmoebaAngleTorsionForce Element.
      Parameters:
      doc - the Document instance.
      forceField - the ForceField instance to grab constants from.
      Returns:
      the AmoebaAngleTorsionForce Element.
    • toXML

      public Element toXML(Document doc)
      Write AngleTorsionType to OpenMM XML format.
      Parameters:
      doc - the Document instance.
      Returns:
      the Torsion element.