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
  • Field Details

    • DEFAULT_BOND_UNIT

      public static final double DEFAULT_BOND_UNIT
      See Also:
    • DEFAULT_BOND_CUBIC

      public static final double DEFAULT_BOND_CUBIC
      Default cubic coefficient in bond stretch potential.
      See Also:
    • DEFAULT_BOND_QUARTIC

      public static final double DEFAULT_BOND_QUARTIC
      Default 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 bondUnit
      Convert 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 cubic
      Cubic 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 quartic
      Quartic coefficient in bond stretch potential.
    • atomClasses

      public final int[] atomClasses
      Atom classes that form this bond stretch.
    • forceConstant

      public final double forceConstant
      Force constant (Kcal/mol).
    • distance

      public final double distance
      Equilibrium separation (Angstroms).
    • flatBottomRadius

      public final double flatBottomRadius
      Radius of a flat bottom where energy and force is 0; typically used for restraints. Will almost always be 0.
    • bondFunction

      public BondType.BondFunction 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 - double
      distance - double
    • BondType

      public BondType(int[] atomClasses, double forceConstant, double distance, BondType.BondFunction bondFunction)
      BondType constructor.
      Parameters:
      atomClasses - int[]
      forceConstant - double
      distance - double
      bondFunction - 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 - double
      distance - double
      bondFunction - the BondFunction type to apply.
      flatBottomRadius - a double.
  • Method Details

    • average

      public static BondType average(BondType bondType1, BondType bondType2, int[] atomClasses)
      Average two BondType instances. The atom classes that define the new type must be supplied.
      Parameters:
      bondType1 - a BondType object.
      bondType2 - a BondType object.
      atomClasses - an array of
      invalid reference
      int
      objects.
      Returns:
      a BondType object.
    • parse

      public static BondType parse(String input, String[] tokens)
      Construct a BondType from an input string.
      Parameters:
      input - The overall input String.
      tokens - The input String tokenized.
      Returns:
      a BondType instance.
    • sortKey

      public static String sortKey(int[] c)
      This method sorts the atom classes as: min, max
      Parameters:
      c - atomClasses
      Returns:
      lookup key
    • compare

      public int compare(String key1, String key2)
      Specified by:
      compare in interface Comparator<String>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Comparator<String>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • incrementClasses

      public void incrementClasses(int increment)
      incrementClasses
      Parameters:
      increment - The increment to apply to the atom classes.
    • patchClasses

      public BondType patchClasses(HashMap<AtomType,AtomType> typeMap)
      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

      public void setBondFunction(BondType.BondFunction bondFunction)
    • toString

      public String toString()

      Basic toString method.

      Nicely formatted bond stretch string.

      Overrides:
      toString in class BaseType