Class ImproperTorsionType

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

@FFXProperty(name="imptors", clazz=java.lang.String.class, propertyGroup=PotentialFunctionParameter, description="[4 integers and up to 3 real/real/integer triples]\nProvides the values for a single AMBER-style improper torsional angle parameter.\nThe first four integer modifiers give the atom class numbers for the atoms involved in the improper torsional angle to be defined.\nBy convention, the third atom class of the four is the trigonal atom on which the improper torsion is centered.\nThe torsional angle computed is literally that defined by the four atom classes in the order specified by the keyword.\nEach of the remaining triples of real/real/integer modifiers give the half-amplitude,\nphase offset in degrees and periodicity of a particular improper torsional term, respectively.\nPeriodicities through 3-fold are allowed for improper torsional parameters.\n") public final class ImproperTorsionType extends BaseType implements Comparator<String>
The ImproperTorsionType class defines an improper torsion.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details

    • atomClasses

      public final int[] atomClasses
      Atom classes that for this Improper Torsion angle.
    • k

      public final double k
      Force constant in kcal/mol.
    • phase

      public final double phase
      Phases in degrees.
    • periodicity

      public final int periodicity
      Periodicity (should be 2 for an Improper Torsion).
    • cos

      public final double cos
      Value of cos(toRadians(phase)).
    • sin

      public final double sin
      Value of sin(toRadians(phase)).
    • impTorUnit

      @FFXProperty(name="imptorunit", propertyGroup=EnergyUnitConversion, defaultValue="1.0", description="Sets the scale factor needed to convert the energy value computed by the AMBER-style improper\ntorsional angle 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 impTorUnit
      Convert angle bending energy to kcal/mole.
    • DEFAULT_IMPTOR_UNIT

      public static final double DEFAULT_IMPTOR_UNIT
      See Also:
  • Constructor Details

    • ImproperTorsionType

      public ImproperTorsionType(int[] atomClasses, double k, double phase, int periodicity)
      TorsionType Constructor.
      Parameters:
      atomClasses - Atom classes.
      k - Force constant.
      phase - The phase.
      periodicity - The periodicity.
  • Method Details

    • average

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

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

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

      public boolean assigned(int[] inputClasses, boolean allowInitialWildCards, boolean allowFinalWildCard)
      Returns true if the atoms can be assigned this improperTorsionType.
      Parameters:
      inputClasses - The atom classes will be re-ordered if its member atoms match this ImproperTorsionType. The trigonal atom will not change position.
      allowInitialWildCards - Allow wildcard match to first two classes.
      allowFinalWildCard - Allow wildcard match for final class.
      Returns:
      True if this torsionType is assignable to the atom array.
    • compare

      public int compare(String s1, String s2)

      Implements the Comparator interface.

      Specified by:
      compare in interface Comparator<String>
      Since:
      1.0
    • equals

      public boolean equals(Object o)

      Override the default equals method.

      Specified by:
      equals in interface Comparator<String>
      Overrides:
      equals in class Object
      Since:
      1.0
    • hashCode

      public int hashCode()

      Implementation of the hashCode method.

      Overrides:
      hashCode in class Object
      Since:
      1.0
    • incrementClasses

      public void incrementClasses(int increment)
      incrementClasses
      Parameters:
      increment - The increment to add to the atom classes.
    • noZeroClasses

      public boolean noZeroClasses()
      Check if this Improper Torsion Type is defined by 1 or more atom classes equal to zero.
      Returns:
      True if there are no zero "wildcard" atom classes for this type.
    • 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 angle.

      Overrides:
      toString in class BaseType
      Since:
      1.0