Package ffx.potential.parameters
Class StretchTorsionType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.StretchTorsionType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="strtors",
clazz=java.lang.String.class,
propertyGroup=PotentialFunctionParameter,
description="[2 integers and 1 real]\nProvides the values for a single stretch-torsion cross term potential parameter.\nThe two integer modifiers give the atom class numbers for the atoms involved in the central bond of the torsional angles to be parameterized.\nThe real modifier gives the value of the stretch-torsion force constant for all torsional angles with the defined atom classes for the central bond.\nThe default units for the stretch-torsion force constant can be controlled via the strtorunit keyword.\n")
public final class StretchTorsionType
extends BaseType
implements Comparator<String>
The StretchTorsionType class defines one stretch-torsion energy type.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionfinal int[]
Atom classes for this stretch-torsion type.static final double
final double[]
Force constants.double
Unit conversion. -
Constructor Summary
ConstructorDescriptionStretchTorsionType
(int[] atomClasses, double[] forceConstants) StretchTorsionType Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic StretchTorsionType
average
(StretchTorsionType stretchTorsionType1, StretchTorsionType stretchTorsionType2, int[] atomClasses) average.int
boolean
static Element
getXMLForce
(Document doc, ForceField forceField) Create an AmoebaStretchTorsionForce Element.int
hashCode()
void
incrementClasses
(int increment) Increment the atom classes by a specified amount.static StretchTorsionType
Construct an StretchTorsionType 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 torsion.toString()
Write StretchTorsionType 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_STRTOR_UNIT
public static final double DEFAULT_STRTOR_UNIT- See Also:
-
strTorUnit
@FFXProperty(name="strtorunit", propertyGroup=EnergyUnitConversion, defaultValue="1.0", description="Sets the scale factor needed to convert the energy value computed by the bond stretching-torsional\nangle cross term potential into units of kcal/mole. The correct value is force field dependent and typically\nprovided in the header of the master force field parameter file.\n") public double strTorUnitUnit conversion. -
atomClasses
public final int[] atomClassesAtom classes for this stretch-torsion type. -
forceConstants
public final double[] forceConstantsForce constants.
-
-
Constructor Details
-
StretchTorsionType
public StretchTorsionType(int[] atomClasses, double[] forceConstants) StretchTorsionType Constructor.- Parameters:
atomClasses
- Atom classes.forceConstants
- Force constant.
-
-
Method Details
-
average
public static StretchTorsionType average(StretchTorsionType stretchTorsionType1, StretchTorsionType stretchTorsionType2, int[] atomClasses) average.- Parameters:
stretchTorsionType1
- aStretchTorsionType
object.stretchTorsionType2
- aStretchTorsionType
object.atomClasses
- an array ofinvalid reference
int
- Returns:
- a
StretchTorsionType
object.
-
parse
Construct an StretchTorsionType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- an StretchTorsionType instance.
-
sortKey
This method sorts the atom classes for the 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) Increment the atom classes by a specified amount.- Parameters:
increment
- The increment to add to the atom classes.
-
patchClasses
Remap new atom classes to known internal ones.- Parameters:
typeMap
- a lookup between new atom types and known atom types.- Returns:
- a
StretchTorsionType
object.
-
toString
Basic toString method.
Nicely formatted Stretch-Torsion string.
-
getXMLForce
Create an AmoebaStretchTorsionForce Element.- Parameters:
doc
- the Document instance.forceField
- the ForceField instance to grab constants from.- Returns:
- the AmoebaStretchTorsionForce Element.
-
toXML
Write StretchTorsionType to OpenMM XML format.- Parameters:
doc
- the Document instance.- Returns:
- the Torsion element.
-