Package ffx.potential.parameters
Class PiOrbitalTorsionType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.PiOrbitalTorsionType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="pitors",
clazz=java.lang.String.class,
propertyGroup=PotentialFunctionParameter,
description="[2 integers and 1 real]\nProvides the values for a single pi-orbital torsional angle potential parameter.\nThe two integer modifiers give the atom class numbers for the atoms involved in the central bond of the torsional angle to be parameterized.\nThe real modifier gives the value of the 2-fold Fourier amplitude for the torsional angle between p-orbitals centered on the defined bond atom classes.\nThe default units for the stretch-torsion force constant can be controlled via the pitorsunit keyword.\n")
public final class PiOrbitalTorsionType
extends BaseType
implements Comparator<String>
The PiOrbitalTorsionType class defines a Pi-Orbital Torsion energy term.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionfinal int[]
Atom classes that form this Pi-Torsion.static final double
double
Force constant.double
Convert Pi-Torsion energy to kcal/mole. -
Constructor Summary
ConstructorDescriptionPiOrbitalTorsionType
(int[] atomClasses, double forceConstant) PiTorsionType Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PiOrbitalTorsionType
average
(PiOrbitalTorsionType piOrbitalTorsionType1, PiOrbitalTorsionType piOrbitalTorsionType2, int[] atomClasses) Average two PiTorsionType instances.int
boolean
static Element
getXMLElement
(Document doc, ForceField forceField) Create an AmoebaPiTorsionForce Element.int
hashCode()
void
incrementClasses
(int increment) incrementClassesstatic PiOrbitalTorsionType
Construct a PiTorsionType 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, maxtoString()
Write PiOrbitalTorsionType 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_PITORS_UNIT
public static final double DEFAULT_PITORS_UNIT- See Also:
-
piTorsUnit
@FFXProperty(name="pitorsunit", propertyGroup=EnergyUnitConversion, defaultValue="1.0", description="Sets the scale factor needed to convert the energy value computed by the pi-orbital torsional 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 piTorsUnitConvert Pi-Torsion energy to kcal/mole. -
atomClasses
public final int[] atomClassesAtom classes that form this Pi-Torsion. -
forceConstant
public double forceConstantForce constant.
-
-
Constructor Details
-
PiOrbitalTorsionType
public PiOrbitalTorsionType(int[] atomClasses, double forceConstant) PiTorsionType Constructor.- Parameters:
atomClasses
- int[]forceConstant
- double
-
-
Method Details
-
average
public static PiOrbitalTorsionType average(PiOrbitalTorsionType piOrbitalTorsionType1, PiOrbitalTorsionType piOrbitalTorsionType2, int[] atomClasses) Average two PiTorsionType instances. The atom classes that define the new type must be supplied.- Parameters:
piOrbitalTorsionType1
- aPiOrbitalTorsionType
object.piOrbitalTorsionType2
- aPiOrbitalTorsionType
object.atomClasses
- an array ofinvalid reference
int
- Returns:
- a
PiOrbitalTorsionType
object.
-
parse
Construct a PiTorsionType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- a PiTorsionType instance.
-
sortKey
This method sorts the atom classes as: min, 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) incrementClasses- 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
PiOrbitalTorsionType
object.
-
toString
Basic toString method.
Nicely formatted Pi-Torsion type.
-
getXMLElement
Create an AmoebaPiTorsionForce Element.- Parameters:
doc
- the Document instance.forceField
- the ForceField instance to grab constants from.- Returns:
- the AmoebaPiTorsionForce Element.
-
toXML
Write PiOrbitalTorsionType to OpenMM XML format.- Parameters:
doc
- the Document instance.- Returns:
- the PiTorsion Element.
-