Class TorsionTorsionType

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

@FFXProperty(name="tortors", clazz=java.lang.String[][].class, propertyGroup=PotentialFunctionParameter, description="[7 integers, then multiple lines of 2 integers and 1 real]\nProvides the values for a single torsion-torsion parameter.\nThe first five integer modifiers give the atom class numbers for the atoms involved in the two adjacent torsional angles to be defined.\nThe last two integer modifiers contain the number of data grid points that lie along each axis of the torsion-torsion map.\nFor example, this value will be 13 for a 30 degree torsional angle spacing, i.e., 360/30 = 12, but 13\nvalues are required since data values for -180 and +180 degrees must both be supplied.\nThe subsequent lines contain the torsion-torsion map data as the integer values in degrees of each\ntorsional angle and the target energy value in kcal/mole.\n") public final class TorsionTorsionType extends BaseType implements Comparator<String>
The TorsionTorsionType class defines a Torsion-Torsion spline.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details

    • DEFAULT_TORTOR_UNIT

      public static final double DEFAULT_TORTOR_UNIT
      Default units to convert Torsion-Torsion energy to kcal/mole.
      See Also:
    • torTorUnit

      @FFXProperty(name="tortorunit", propertyGroup=EnergyUnitConversion, defaultValue="1.0", description="Sets the scale factor needed to convert the energy value computed by the torsion-torsion 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 torTorUnit
      Convert Torsion-Torsion energy to kcal/mole.
    • atomClasses

      public final int[] atomClasses
      Atom classes that form this Torsion-Torsion type.
    • energy

      public final double[] energy
      Energy values.
    • nx

      public final int nx
      Number of points along x.
    • ny

      public final int ny
      Number of point along y.
    • tx

      public final double[] tx
      Torsion values along x.
    • ty

      public final double[] ty
      Torsion values along y.
    • dx

      public final double[] dx
      First derivative along x.
    • dy

      public final double[] dy
      First derivative along y.
    • dxy

      public final double[] dxy
      Second derivatives.
  • Constructor Details

    • TorsionTorsionType

      public TorsionTorsionType(int[] atomClasses, int[] gridPoints, double[] torsion1, double[] torsion2, double[] energy)
      Constructor for TorsionTorsionType.
      Parameters:
      atomClasses - an array of int.
      gridPoints - an array of int.
      torsion1 - an array of double.
      torsion2 - an array of double.
      energy - an array of double.
  • Method Details

    • average

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

      public static TorsionTorsionType parse(String input, String[] tokens, BufferedReader br)
      Construct a TorsionTorsionType from multiple input lines.
      Parameters:
      input - The overall input String.
      tokens - The input String tokenized.
      br - a BufferedReader instance.
      Returns:
      a TorsionTorsionType instance.
    • parse

      public static TorsionTorsionType parse(String input, String[] tokens)
      Construct a TorsionTorsionType from a single input line.
      Parameters:
      input - The overall input String.
      tokens - The input String tokenized.
      Returns:
      a TorsionTorsionType instance.
    • reverseKey

      public static String reverseKey(int[] c)
      Reversed key for the Torsion-Torsion lookup.
      Parameters:
      c - atomClasses
      Returns:
      lookup key
    • sortKey

      public static String sortKey(int[] c)
      No sorting is done for the Torsion-Torsion lookup.
      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)
      Increment the atom classes by a value.
      Parameters:
      increment - The increment to add to the atom classes.
    • patchClasses

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

      public String toString()

      Basic toString method.

      Nicely formatted torsion-torsion type.

      Overrides:
      toString in class BaseType