Class AngleType

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

@FFXProperty(name="angle",clazz=java.lang.String.class,propertyGroup=PotentialFunctionParameter,description="[3 integers and 4 reals]\nProvides the values for a single bond angle bending parameter.\nThe integer modifiers give the atom class numbers for the three kinds of atoms involved in the angle which is to be defined.\nThe real number modifiers give the force constant value for the angle and up to three ideal bond angles in degrees.\nIn most cases only one ideal bond angle is given, and that value is used for all occurrences of the specified bond angle.\nIf all three ideal angles are given, the values apply when the central atom of the angle is attached to 0, 1 or 2 additional hydrogen atoms, respectively.\nThis \"hydrogen environment\" option is provided to implement the corresponding feature of the AMOEBA force field.\nThe default units for the force constant are kcal/mole/radian^2, but this can be controlled via the angleunit keyword.\n") @FFXProperty(name="anglep",clazz=java.lang.String.class,propertyGroup=PotentialFunctionParameter,description="[3 integers and 3 reals]\nProvides the values for a single projected in-plane bond angle bending parameter.\nThe integer modifiers give the atom class numbers for the three kinds of atoms involved in the angle which is to be defined.\nThe real number modifiers give the force constant value for the angle and up to two ideal bond angles in degrees.\nIn most cases only one ideal bond angle is given, and that value is used for all occurrences of the specified bond angle.\nIf all two ideal angles are given, the values apply when the central atom of the angle is attached to 0 or 1 additional hydrogen atoms, respectively.\nThis \"hydrogen environment\" option is provided to implement the corresponding feature of the AMOEBA force field.\nThe default units for the force constant are kcal/mole/radian^2, but this can be controlled via the angleunit keyword.\n") public final class AngleType extends BaseType implements Comparator<String>
The AngleType class defines one harmonic angle bend energy term.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details

    • DEFAULT_ANGLE_UNIT

      public static final double DEFAULT_ANGLE_UNIT
      Default convert angle bending energy to kcal/mole.
    • DEFAULT_ANGLE_CUBIC

      public static final double DEFAULT_ANGLE_CUBIC
      Default cubic coefficient in angle bending potential.
      See Also:
    • DEFAULT_ANGLE_QUARTIC

      public static final double DEFAULT_ANGLE_QUARTIC
      Default quartic coefficient in angle bending potential.
      See Also:
    • DEFAULT_ANGLE_PENTIC

      public static final double DEFAULT_ANGLE_PENTIC
      Default pentic coefficient in angle bending potential.
      See Also:
    • DEFAULT_ANGLE_SEXTIC

      public static final double DEFAULT_ANGLE_SEXTIC
      Default quintic coefficient in angle bending potential.
      See Also:
    • angleUnit

      @FFXProperty(name="angleunit", propertyGroup=EnergyUnitConversion, defaultValue="(Pi/180)^2", description="Sets the scale factor needed to convert the energy value computed by the bond angle bending potential into units of kcal/mole.\nThe correct value is force field dependent and typically provided in the header of the master force field parameter file.\n") public double angleUnit
      Convert angle bending energy to kcal/mole.
    • cubic

      @FFXProperty(name="angle-cubic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the cubic term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the cube of the deviation of the bond angle from its ideal value gives the cubic contribution to the angle bending energy.\nThe default value in the absence of the angle-cubic keyword is zero; i.e., the cubic angle bending term is omitted.\n") public double cubic
      Cubic coefficient in angle bending potential.
    • quartic

      @FFXProperty(name="angle-quartic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the quartic term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the forth power of the deviation of the bond angle from its ideal value gives the quartic contribution to the angle bending energy.\nThe default value in the absence of the angle-quartic keyword is zero; i.e., the quartic angle bending term is omitted.\n") public double quartic
      Quartic coefficient in angle bending potential.
    • pentic

      @FFXProperty(name="angle-pentic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the fifth power term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the fifth power of the deviation of the bond angle from its ideal value gives the pentic contribution to the angle bending energy.\nThe default value in the absence of the angle-pentic keyword is zero; i.e., the pentic angle bending term is omitted.\n") public double pentic
      Pentic coefficient in angle bending potential.
    • sextic

      @FFXProperty(name="angle-sextic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the sixth power term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the sixth power of the deviation of the bond angle from its ideal value gives the sextic contribution to the angle bending energy.\nThe default value in the absence of the angle-sextic keyword is zero; i.e., the sextic angle bending term is omitted.\n") public double sextic
      Sextic coefficient in angle bending potential.
    • atomClasses

      public final int[] atomClasses
      Atom classes that for this Angle type.
    • forceConstant

      public final double forceConstant
      Force constant (Kcal/mole/radian^2).
    • angle

      public final double[] angle
      Equilibrium angle (degrees). There can be up to three equilibrium angles, depending on the number of attached hydrogens (0, 1, or 2).
    • angleMode

      public final AngleType.AngleMode angleMode
      The angle mode in use.
    • angleFunction

      public AngleType.AngleFunction angleFunction
      The angle function in use.
  • Constructor Details

    • AngleType

      public AngleType(int[] atomClasses, double forceConstant, double[] angle)
      The default AngleType constructor defines use of the Sextic AngleFunction.
      Parameters:
      atomClasses - an array of int.
      forceConstant - a double.
      angle - an array of double.
    • AngleType

      public AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode)
      Constructor for In-Plane AngleType.
      Parameters:
      atomClasses - an array of int.
      forceConstant - a double.
      angle - an array of double.
      angleMode - the AngleMode to apply.
    • AngleType

      public AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode, AngleType.AngleFunction angleFunction)
      Constructor for In-Plane AngleType.
      Parameters:
      atomClasses - an array of int.
      forceConstant - a double.
      angle - an array of double.
      angleMode - the AngleMode to apply.
      angleFunction - the AngleFunction to use.
  • Method Details

    • average

      public static AngleType average(AngleType angleType1, AngleType angleType2, int[] atomClasses)
      Average two AngleType instances. The atom classes that define the new type must be supplied.
      Parameters:
      angleType1 - a AngleType object.
      angleType2 - a AngleType object.
      atomClasses - an array of
      invalid reference
      int
      objects.
      Returns:
      a AngleType object.
    • parse

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

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

      public static String sortKey(int[] c)
      This method sorts the atom classes as: min, c[1], max
      Parameters:
      c - atomClasses
      Returns:
      lookup key
    • compare

      public int compare(String key1, String key2)
      Specified by:
      compare in interface Comparator<String>
    • 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 add to each atom class.
    • patchClasses

      public AngleType 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 AngleType object.
    • setAngleFunction

      public void setAngleFunction(AngleType.AngleFunction angleFunction)
      Set the AngleFunction.
      Parameters:
      angleFunction - the AngleFunction.
    • toString

      public String toString()

      Basic toString method.

      Nicely formatted Angle bending string.

      Overrides:
      toString in class BaseType
    • getXMLForce

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

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