Package ffx.potential.parameters
Class BondType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.BondType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="bond",
clazz=java.lang.String.class,
propertyGroup=PotentialFunctionParameter,
description="[2 integers and 2 reals]\nProvides the values for a single bond stretching parameter.\nThe integer modifiers give the atom class numbers for the two kinds of atoms involved in the bond which is to be defined.\nThe real number modifiers give the force constant value for the bond and the ideal bond length in Angstroms.\nThe default value of 1.0 is used, if the bondunit keyword is not given in the force field parameter file or the keyfile.\n")
public final class BondType
extends BaseType
implements Comparator<String>
The BondType class defines one harmonic bond stretch energy term.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Describes the function used by the bond. -
Field Summary
Modifier and TypeFieldDescriptionfinal int[]
Atom classes that form this bond stretch.The function used by the bond: harmonic or quartic with flat-bottom variants.double
Convert bond stretch energy to kcal/mole.double
Cubic coefficient in bond stretch potential.static final double
Default cubic coefficient in bond stretch potential.static final double
Default quartic coefficient in bond stretch potential.static final double
final double
Equilibrium separation (Angstroms).final double
Radius of a flat bottom where energy and force is 0; typically used for restraints.final double
Force constant (Kcal/mol/A^2).double
Quartic coefficient in bond stretch potential. -
Constructor Summary
ConstructorDescriptionBondType
(int[] atomClasses, double forceConstant, double distance) The default BondType constructor defines use of the Quartic BondFunction.BondType
(int[] atomClasses, double forceConstant, double distance, BondType.BondFunction bondFunction) BondType constructor.BondType
(int[] atomClasses, double forceConstant, double distance, BondType.BondFunction bondFunction, double flatBottomRadius) BondType constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic BondType
Average two BondType instances.int
boolean
static Element
getXMLForce
(Document doc, ForceField forceField) int
hashCode()
void
incrementClasses
(int increment) incrementClassesstatic BondType
Construct a BondType from an input string.patchClasses
(HashMap<AtomType, AtomType> typeMap) Remap new atom classes to known internal ones.void
setBondFunction
(BondType.BondFunction bondFunction) static String
sortKey
(int[] c) This method sorts the atom classes as: min, maxtoString()
Write BondType 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_BOND_UNIT
public static final double DEFAULT_BOND_UNIT- See Also:
-
DEFAULT_BOND_CUBIC
public static final double DEFAULT_BOND_CUBICDefault cubic coefficient in bond stretch potential.- See Also:
-
DEFAULT_BOND_QUARTIC
public static final double DEFAULT_BOND_QUARTICDefault quartic coefficient in bond stretch potential.- See Also:
-
bondUnit
@FFXProperty(name="bondunit", propertyGroup=EnergyUnitConversion, defaultValue="1.0", description="Sets the scale factor needed to convert the energy value computed by the bond stretching 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 bondUnitConvert bond stretch energy to kcal/mole. -
cubic
@FFXProperty(name="bond-cubic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the cubic term in the Taylor series expansion form of the bond stretching potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the bond stretching energy unit conversion factor, the force constant,\nand the cube of the deviation of the bond length from its ideal value gives the cubic contribution to the bond stretching energy.\nThe default value in the absence of the bond-cubic keyword is zero; i.e., the cubic bond stretching term is omitted.\n") public double cubicCubic coefficient in bond stretch potential. -
quartic
@FFXProperty(name="bond-quartic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the quartic term in the Taylor series expansion form of the bond stretching potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the bond stretching energy unit conversion factor, the force constant,\nand the forth power of the deviation of the bond length from its ideal value gives the quartic contribution to the bond stretching energy.\nThe default value in the absence of the bond-quartic keyword is zero; i.e., the quartic bond stretching term is omitted.\n") public double quarticQuartic coefficient in bond stretch potential. -
atomClasses
public final int[] atomClassesAtom classes that form this bond stretch. -
forceConstant
public final double forceConstantForce constant (Kcal/mol/A^2). -
distance
public final double distanceEquilibrium separation (Angstroms). -
flatBottomRadius
public final double flatBottomRadiusRadius of a flat bottom where energy and force is 0; typically used for restraints. Will almost always be 0. -
bondFunction
The function used by the bond: harmonic or quartic with flat-bottom variants.
-
-
Constructor Details
-
BondType
public BondType(int[] atomClasses, double forceConstant, double distance) The default BondType constructor defines use of the Quartic BondFunction.- Parameters:
atomClasses
- int[]forceConstant
- doubledistance
- double
-
BondType
public BondType(int[] atomClasses, double forceConstant, double distance, BondType.BondFunction bondFunction) BondType constructor.- Parameters:
atomClasses
- int[]forceConstant
- doubledistance
- doublebondFunction
- the BondFunction type to apply.
-
BondType
public BondType(int[] atomClasses, double forceConstant, double distance, BondType.BondFunction bondFunction, double flatBottomRadius) BondType constructor.- Parameters:
atomClasses
- int[]forceConstant
- doubledistance
- doublebondFunction
- the BondFunction type to apply.flatBottomRadius
- a double.
-
-
Method Details
-
average
Average two BondType instances. The atom classes that define the new type must be supplied. -
parse
Construct a BondType from an input string.- Parameters:
input
- The overall input String.tokens
- The input String tokenized.- Returns:
- a BondType 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 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
BondType
object.
-
setBondFunction
-
toString
Basic toString method.
Nicely formatted bond stretch string.
-
getXMLForce
-
toXML
Write BondType to OpenMM XML format.
-