Package ffx.potential.parameters
Class AngleType
java.lang.Object
ffx.potential.parameters.BaseType
ffx.potential.parameters.AngleType
- All Implemented Interfaces:
Comparator<String>
@FFXProperty(name="angle",clazz=java.lang.String.class,propertyGroup=PotentialFunctionParameter,description="[3 integers and 4 reals]\nProvides the values for a single bond angle bending 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 value for the angle and up to three ideal bond angles in degrees.\nIn most cases only one ideal bond angle is given, and that value is used for all occurrences of the specified bond angle.\nIf all three ideal angles are given, the values apply when the central atom of the angle is attached to 0, 1 or 2 additional hydrogen atoms, respectively.\nThis \"hydrogen environment\" option is provided to implement the corresponding feature of the AMOEBA force field.\nThe default units for the force constant are kcal/mole/radian^2, but this can be controlled via the angleunit keyword.\n") @FFXProperty(name="anglep",clazz=java.lang.String.class,propertyGroup=PotentialFunctionParameter,description="[3 integers and 3 reals]\nProvides the values for a single projected in-plane bond angle bending 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 value for the angle and up to two ideal bond angles in degrees.\nIn most cases only one ideal bond angle is given, and that value is used for all occurrences of the specified bond angle.\nIf all two ideal angles are given, the values apply when the central atom of the angle is attached to 0 or 1 additional hydrogen atoms, respectively.\nThis \"hydrogen environment\" option is provided to implement the corresponding feature of the AMOEBA force field.\nThe default units for the force constant are kcal/mole/radian^2, but this can be controlled via the angleunit keyword.\n")
public final class AngleType
extends BaseType
implements Comparator<String>
The AngleType class defines one harmonic angle bend energy term.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAngle function types include harmonic or sextic.static enumAngle modes include Normal or In-Plane -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double[]Equilibrium angle (degrees).The angle function in use.final AngleType.AngleModeThe angle mode in use.doubleConvert angle bending energy to kcal/mole.final int[]Atom classes that for this Angle type.doubleCubic coefficient in angle bending potential.static final doubleDefault cubic coefficient in angle bending potential.static final doubleDefault pentic coefficient in angle bending potential.static final doubleDefault quartic coefficient in angle bending potential.static final doubleDefault quintic coefficient in angle bending potential.static final doubleDefault convert angle bending energy to kcal/mole.final doubleForce constant (Kcal/mole/radian^2).doublePentic coefficient in angle bending potential.doubleQuartic coefficient in angle bending potential.doubleSextic coefficient in angle bending potential. -
Constructor Summary
ConstructorsConstructorDescriptionAngleType(int[] atomClasses, double forceConstant, double[] angle) The default AngleType constructor defines use of the Sextic AngleFunction.AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode) Constructor for In-Plane AngleType.AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode, AngleType.AngleFunction angleFunction) Constructor for In-Plane AngleType. -
Method Summary
Modifier and TypeMethodDescriptionstatic AngleTypeAverage two AngleType instances.intbooleanstatic ElementgetXMLForce(Document doc, ForceField forceField) Create an AmoebaAngleForceinthashCode()voidincrementClasses(int increment) incrementClassesstatic AngleTypeConstruct an AngleType from an input string.static AngleTypeparseInPlane(String input, String[] tokens) Construct an In-Plane AngleType from an input string.patchClasses(HashMap<AtomType, AtomType> typeMap) Remap new atom classes to known internal ones.voidsetAngleFunction(AngleType.AngleFunction angleFunction) Set the AngleFunction.static StringsortKey(int[] c) This method sorts the atom classes as: min, c[1], maxtoString()Write AngleType 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_ANGLE_UNIT
public static final double DEFAULT_ANGLE_UNITDefault convert angle bending energy to kcal/mole. -
DEFAULT_ANGLE_CUBIC
public static final double DEFAULT_ANGLE_CUBICDefault cubic coefficient in angle bending potential.- See Also:
-
DEFAULT_ANGLE_QUARTIC
public static final double DEFAULT_ANGLE_QUARTICDefault quartic coefficient in angle bending potential.- See Also:
-
DEFAULT_ANGLE_PENTIC
public static final double DEFAULT_ANGLE_PENTICDefault pentic coefficient in angle bending potential.- See Also:
-
DEFAULT_ANGLE_SEXTIC
public static final double DEFAULT_ANGLE_SEXTICDefault quintic coefficient in angle bending potential.- See Also:
-
angleUnit
@FFXProperty(name="angleunit", propertyGroup=EnergyUnitConversion, defaultValue="(Pi/180)^2", description="Sets the scale factor needed to convert the energy value computed by the bond angle bending 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 angleUnitConvert angle bending energy to kcal/mole. -
cubic
@FFXProperty(name="angle-cubic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the cubic term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the cube of the deviation of the bond angle from its ideal value gives the cubic contribution to the angle bending energy.\nThe default value in the absence of the angle-cubic keyword is zero; i.e., the cubic angle bending term is omitted.\n") public double cubicCubic coefficient in angle bending potential. -
quartic
@FFXProperty(name="angle-quartic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the quartic term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the forth power of the deviation of the bond angle from its ideal value gives the quartic contribution to the angle bending energy.\nThe default value in the absence of the angle-quartic keyword is zero; i.e., the quartic angle bending term is omitted.\n") public double quarticQuartic coefficient in angle bending potential. -
pentic
@FFXProperty(name="angle-pentic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the fifth power term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the fifth power of the deviation of the bond angle from its ideal value gives the pentic contribution to the angle bending energy.\nThe default value in the absence of the angle-pentic keyword is zero; i.e., the pentic angle bending term is omitted.\n") public double penticPentic coefficient in angle bending potential. -
sextic
@FFXProperty(name="angle-sextic", propertyGroup=LocalGeometryFunctionalForm, defaultValue="0.0", description="Sets the value of the sixth power term in the Taylor series expansion form of the bond angle bending potential energy.\nThe real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient.\nThis term multiplied by the angle bending energy unit conversion factor, the force constant,\nand the sixth power of the deviation of the bond angle from its ideal value gives the sextic contribution to the angle bending energy.\nThe default value in the absence of the angle-sextic keyword is zero; i.e., the sextic angle bending term is omitted.\n") public double sexticSextic coefficient in angle bending potential. -
atomClasses
public final int[] atomClassesAtom classes that for this Angle type. -
forceConstant
public final double forceConstantForce constant (Kcal/mole/radian^2). -
angle
public final double[] angleEquilibrium angle (degrees). There can be up to three equilibrium angles, depending on the number of attached hydrogens (0, 1, or 2). -
angleMode
The angle mode in use. -
angleFunction
The angle function in use.
-
-
Constructor Details
-
AngleType
public AngleType(int[] atomClasses, double forceConstant, double[] angle) The default AngleType constructor defines use of the Sextic AngleFunction.- Parameters:
atomClasses- an array of int.forceConstant- a double.angle- an array of double.
-
AngleType
public AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode) Constructor for In-Plane AngleType.- Parameters:
atomClasses- an array of int.forceConstant- a double.angle- an array of double.angleMode- the AngleMode to apply.
-
AngleType
public AngleType(int[] atomClasses, double forceConstant, double[] angle, AngleType.AngleMode angleMode, AngleType.AngleFunction angleFunction) Constructor for In-Plane AngleType.- Parameters:
atomClasses- an array of int.forceConstant- a double.angle- an array of double.angleMode- the AngleMode to apply.angleFunction- the AngleFunction to use.
-
-
Method Details
-
average
public static AngleType average(@Nullable AngleType angleType1, @Nullable AngleType angleType2, @Nullable int[] atomClasses) Average two AngleType instances. The atom classes that define the new type must be supplied. If the angle modes or angle functions differ, null is returned. -
parse
Construct an AngleType from an input string.- Parameters:
input- The overall input String.tokens- The input String tokenized.- Returns:
- an AngleType instance.
-
parseInPlane
Construct an In-Plane AngleType from an input string.- Parameters:
input- The overall input String.tokens- The input String tokenized.- Returns:
- an AngleType instance.
-
sortKey
This method sorts the atom classes as: min, c[1], max- Parameters:
c- atomClasses- Returns:
- lookup key
-
compare
- Specified by:
comparein interfaceComparator<String>
-
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 add to each atom class.
-
patchClasses
Remap new atom classes to known internal ones.- Parameters:
typeMap- a lookup between new atom types and known atom types.- Returns:
- a
AngleTypeobject.
-
setAngleFunction
Set the AngleFunction.- Parameters:
angleFunction- the AngleFunction.
-
toString
Basic toString method.
Nicely formatted Angle bending string.
-
getXMLForce
Create an AmoebaAngleForce- Parameters:
doc- the Document instance.forceField- the ForceField to define constants from.- Returns:
- the AmoebaAngleForce Element.
-
toXML
Write AngleType to OpenMM XML format.- Parameters:
doc- the Document instance.- Returns:
- the Angle element.
-