Class BondType

  • All Implemented Interfaces:
    Comparator<String>

    @FFXKeyword(name="bond",
                clazz=java.lang.String.class,
                keywordGroup=PotentialFunctionParameter,
                description="[2 integers and 2 reals] Provides the values for a single bond stretching parameter. The integer modifiers give the atom class numbers for the two kinds of atoms involved in the bond which is to be defined. The real number modifiers give the force constant value for the bond and the ideal bond length in Angstroms. The default value of 1.0 is used, if the bondunit keyword is not given in the force field parameter file or the keyfile.")
    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 Detail

      • bondUnit

        @FFXKeyword(name="bondunit",
                    keywordGroup=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. The correct value is force field dependent and typically provided in the header of the master force field parameter file.")
        public double bondUnit
        Convert bond stretch energy to kcal/mole.
      • DEFAULT_BOND_CUBIC

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

        public static final double DEFAULT_BOND_QUARTIC
        Default quartic coefficient in bond stretch potential.
        See Also:
        Constant Field Values
      • cubic

        @FFXKeyword(name="bond-cubic",
                    keywordGroup=LocalGeometryFunctionalForm,
                    defaultValue="0.0",
                    description="Sets the value of the cubic term in the Taylor series expansion form of the bond stretching potential energy. The real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient. This term multiplied by the bond stretching energy unit conversion factor, the force constant, and the cube of the deviation of the bond length from its ideal value gives the cubic contribution to the bond stretching energy. The default value in the absence of the bond-cubic keyword is zero; i.e., the cubic bond stretching term is omitted.")
        public double cubic
        Cubic coefficient in bond stretch potential.
      • quartic

        @FFXKeyword(name="bond-quartic",
                    keywordGroup=LocalGeometryFunctionalForm,
                    defaultValue="0.0",
                    description="Sets the value of the quartic term in the Taylor series expansion form of the bond stretching potential energy. The real number modifier gives the value of the coefficient as a multiple of the quadratic coefficient. This term multiplied by the bond stretching energy unit conversion factor, the force constant, and the forth power of the deviation of the bond length from its ideal value gives the quartic contribution to the bond stretching energy. The default value in the absence of the bond-quartic keyword is zero; i.e., the quartic bond stretching term is omitted.")
        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 Detail

      • 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 Detail

      • 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 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
      • hashCode

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

        public void incrementClasses​(int increment)
        incrementClasses
        Parameters:
        increment - a int.
      • 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.
      • toString

        public String toString()

        Basic toString method.

        Nicely formatted bond stretch string.

        Overrides:
        toString in class BaseType