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
FieldsModifier and TypeFieldDescriptiondoubleConvert angle-torsion to kcal/mole.final int[]Atom classes for this stretch-torsion type.static final doublefinal double[]Force constants. -
Constructor Summary
ConstructorsConstructorDescriptionAngleTorsionType(int[] atomClasses, double[] forceConstants) AngleTorsionType Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic AngleTorsionTypeaverage(AngleTorsionType angleTorsionType1, AngleTorsionType angleTorsionType2, int[] atomClasses) Average two AngleTorsionType instances.intbooleanstatic ElementgetXMLForce(Document doc, ForceField forceField) Create an AmoebaAngleTorsionForce Element.inthashCode()voidincrementClasses(int increment) incrementClassesstatic AngleTorsionTypeConstruct an AngleTorsionType from an input string.patchClasses(HashMap<AtomType, AtomType> typeMap) Remap new atom classes to known internal ones.static StringsortKey(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, waitMethods 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(@Nullable AngleTorsionType angleTorsionType1, @Nullable AngleTorsionType angleTorsionType2, @Nullable int[] atomClasses) Average two AngleTorsionType instances.- Parameters:
angleTorsionType1- First AngleTorsionType.angleTorsionType2- Second AngleTorsionType.atomClasses- Atom classes for the averaged type.- Returns:
- A new AngleTorsionType with averaged force constants, or null if inputs are invalid.
-
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:
comparein interfaceComparator<String>- Since:
- 1.0
-
equals
- Specified by:
equalsin interfaceComparator<String>- Overrides:
equalsin 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
AngleTorsionTypeobject.
-
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.
-