Package ffx.potential.parameters
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 Summary
Modifier and TypeFieldDescriptiondouble
Convert angle-torsion to kcal/mole.final int[]
Atom classes for this stretch-torsion type.static final double
final double[]
Force constants. -
Constructor Summary
ConstructorDescriptionAngleTorsionType
(int[] atomClasses, double[] forceConstants) AngleTorsionType Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic AngleTorsionType
average
(AngleTorsionType angleTorsionType1, AngleTorsionType angleTorsionType2, int[] atomClasses) average.int
boolean
static Element
getXMLForce
(Document doc, ForceField forceField) Create an AmoebaAngleTorsionForce Element.int
hashCode()
void
incrementClasses
(int increment) incrementClassesstatic AngleTorsionType
Construct an AngleTorsionType from an input string.patchClasses
(HashMap<AtomType, AtomType> typeMap) Remap new atom classes to known internal ones.static String
sortKey
(int[] c) This method sorts the atom classes for the angle-torsion.toString()
Write AngleTorsionType to OpenMM XML format.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
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 angtorunitConvert angle-torsion to kcal/mole. -
atomClasses
public final int[] atomClassesAtom classes for this stretch-torsion type. -
forceConstants
public final double[] forceConstantsForce 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
- aAngleTorsionType
object.angleTorsionType2
- aAngleTorsionType
object.atomClasses
- an array ofinvalid reference
int
- Returns:
- a
AngleTorsionType
object.
-
parse
Construct an AngleTorsionType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- an AngleTorsionType instance.
-
sortKey
This method sorts the atom classes for the angle-torsion.- Parameters:
c
- atomClasses- Returns:
- lookup key
- Since:
- 1.0
-
compare
- Specified by:
compare
in interfaceComparator<String>
- Since:
- 1.0
-
equals
- Specified by:
equals
in interfaceComparator<String>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode() -
incrementClasses
public void incrementClasses(int increment) incrementClasses- Parameters:
increment
- the value to increment the atom classes by.
-
patchClasses
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
Basic toString method.
Nicely formatted Angle-Torsion string.
-
getXMLForce
Create an AmoebaAngleTorsionForce Element.- Parameters:
doc
- the Document instance.forceField
- the ForceField instance to grab constants from.- Returns:
- the AmoebaAngleTorsionForce Element.
-
toXML
Write AngleTorsionType to OpenMM XML format.- Parameters:
doc
- the Document instance.- Returns:
- the Torsion element.
-