Package ffx.potential.parameters
Class StretchBendType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.StretchBendType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="strbnd",
clazz=java.lang.String.class,
propertyGroup=PotentialFunctionParameter,
description="[3 integers and 2 reals]\nProvides the values for a single stretch-bend cross term potential parameter.\nThe integer modifiers give the atom class numbers for the three kinds of atoms involved in the angle which is to be defined.\nThe real number modifiers give the force constant values for the first bond (first two atom classes) with the angle, and the second bond with the angle, respectively.\nThe default units for the stretch-bend force constant are kcal/mole/Ang-radian, but this can be controlled via the strbndunit keyword.\n")
public final class StretchBendType
extends BaseType
implements Comparator<String>
The StretchBendType class defines one out-of-plane angle bending energy type.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionfinal int[]
Atom class for this stretch-bend type.static final double
Constantunits=PI / 180.0
final double[]
Force constants (Kcal/mole/Angstrom-Degrees).double
-
Constructor Summary
ConstructorDescriptionStretchBendType
(int[] atomClasses, double[] forceConstants) StretchBendType Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic StretchBendType
average
(StretchBendType stretchBendType1, StretchBendType stretchBendType2, int[] atomClasses) average.int
boolean
static Element
getXMLForce
(Document doc, ForceField forceField) Create an AmoebaStretchBendForce element.int
hashCode()
void
incrementClasses
(int increment) Increment the atom classes by a given value.static StretchBendType
Construct a StretchBendType 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 as: min, c[1], maxtoString()
Write StretchBendType 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_STRBND_UNIT
public static final double DEFAULT_STRBND_UNITConstantunits=PI / 180.0
- See Also:
-
strbndunit
@FFXProperty(name="strbndunit", propertyGroup=EnergyUnitConversion, defaultValue="(Pi/180)", description="Sets the scale factor needed to convert the energy value computed by the bond stretching-angle bending cross\nterm potential into units of kcal/mole. The correct value is force field dependent and typically provided\nin the header of the master force field parameter file.\n") public double strbndunit -
atomClasses
public final int[] atomClassesAtom class for this stretch-bend type. -
forceConstants
public final double[] forceConstantsForce constants (Kcal/mole/Angstrom-Degrees).
-
-
Constructor Details
-
StretchBendType
public StretchBendType(int[] atomClasses, double[] forceConstants) StretchBendType Constructor.- Parameters:
atomClasses
- int[]forceConstants
- double[]
-
-
Method Details
-
average
public static StretchBendType average(StretchBendType stretchBendType1, StretchBendType stretchBendType2, int[] atomClasses) average.- Parameters:
stretchBendType1
- aStretchBendType
object.stretchBendType2
- aStretchBendType
object.atomClasses
- an array ofinvalid reference
int
- Returns:
- a
StretchBendType
object.
-
parse
Construct a StretchBendType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- a StretchBendType instance.
-
sortKey
This method sorts the atom classes as: min, c[1], max- Parameters:
c
- atomClasses- Returns:
- lookup key
-
compare
- Specified by:
compare
in interfaceComparator<String>
-
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 given value.- Parameters:
increment
- The increment to apply 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
StretchBendType
object.
-
toString
Basic toString method.
Nicely formatted Stretch-Bend string.
-
getXMLForce
Create an AmoebaStretchBendForce element.- Parameters:
doc
- the Document instance.forceField
- the ForceField to grab constants from.- Returns:
- the AmoebaStretchBendForce element.
-
toXML
Write StretchBendType to OpenMM XML format.
-