Class StretchBendType

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

@FFXKeyword(name="strbnd", clazz=java.lang.String.class, keywordGroup=PotentialFunctionParameter, description="[3 integers and 2 reals] Provides the values for a single stretch-bend cross term potential parameter. The integer modifiers give the atom class numbers for the three kinds of atoms involved in the angle which is to be defined. The real number modifiers give the force constant values for the first bond (first two atom classes) with the angle, and the second bond with the angle, respectively. The default units for the stretch-bend force constant are kcal/mole/Ang-radian, but this can be controlled via the strbndunit keyword.") public final class StretchBendType extends BaseType implements Comparator<String>
The StretchBendType class defines one out-of-plane angle bending energy type.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details

    • DEFAULT_STRBND_UNIT

      public static final double DEFAULT_STRBND_UNIT
      Constant units=PI / 180.0
      See Also:
    • strbndunit

      @FFXKeyword(name="strbndunit", keywordGroup=EnergyUnitConversion, defaultValue="(Pi/180)", description="Sets the scale factor needed to convert the energy value computed by the bond stretching-angle bending cross term potential into units of kcal/mole. The correct value is force field dependent and typically provided in the header of the master force field parameter file.") public double strbndunit
    • atomClasses

      public final int[] atomClasses
      Atom class for this stretch-bend type.
    • forceConstants

      public final double[] forceConstants
      Force constants (Kcal/mole/Angstrom-Degrees).
  • Constructor Details

    • StretchBendType

      public StretchBendType(int[] atomClasses, double[] forceConstants)
      StretchBendType Constructor.
      Parameters:
      atomClasses - int[]
      forceConstants - double[]
  • Method Details

    • average

      public static StretchBendType average(StretchBendType stretchBendType1, StretchBendType stretchBendType2, int[] atomClasses)
      average.
      Parameters:
      stretchBendType1 - a StretchBendType object.
      stretchBendType2 - a StretchBendType object.
      atomClasses - an array of int objects.
      Returns:
      a StretchBendType object.
    • parse

      public static StretchBendType parse(String input, String[] tokens)
      Construct a StretchBendType from an input string.
      Parameters:
      input - The overall input String.
      tokens - The input String tokenized.
      Returns:
      a StretchBendType 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 - a int.
    • patchClasses

      public StretchBendType 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 StretchBendType object.
    • toString

      public String toString()

      Basic toString method.

      Nicely formatted Stretch-Bend string.

      Overrides:
      toString in class BaseType