ForceField
Date: 2019-10-22

org.jmol.minimize.forcefield

## Class ForceField

- java.lang.Object
- - org.jmol.minimize.forcefield.ForceField

- Direct Known Subclasses:
    ForceFieldMMFF, ForceFieldUFF

      public abstract class ForceField
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ABI_IJ`
    `static int` | `ABI_JK`
    `(package private) javajs.util.BS` | `bsFixed`
    `(package private) Calculations` | `calc`
    `private double[][]` | `coordSaved`
    `private double` | `criterion`
    `(package private) int` | `currentStep`
    `private double` | `dE`
    `private double` | `e0`
    `(package private) static int` | `EANGLE`
    `(package private) static int` | `EBOND`
    `(package private) static int` | `EELECTROSTATIC`
    `(package private) static int` | `ENERGY`
    `(package private) static int` | `EOOP`
    `(package private) static int` | `ESTRBND`
    `(package private) static int` | `ETORSION`
    `(package private) static int` | `EVDW`
    `(package private) MinAngle[]` | `minAngles`
    `(package private) int` | `minAtomCount`
    `(package private) MinAtom[]` | `minAtoms`
    `(package private) int` | `minBondCount`
    `(package private) MinBond[]` | `minBonds`
    `(package private) Minimizer` | `minimizer`
    `(package private) MinPosition[]` | `minPositions`
    `(package private) MinTorsion[]` | `minTorsions`
    `java.lang.String` | `name`
    `static int` | `R3`
    `static int` | `R4`
    `static int` | `R5`
    `static int` | `Raromatic`
    `private int` | `stepMax`
    `static int` | `TBI_AB`
    `static int` | `TBI_BC`
    `static int` | `TBI_CD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ForceField()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `clear()`
    `private void` | `clearForces()`
    `boolean` | `detectExplosion()`
    `(package private) double` | `energyAngle(boolean gradients)`
    `(package private) double` | `energyBond(boolean gradients)`
    `(package private) double` | `energyES(boolean gradients)`
    `double` | `energyFull(boolean gradients, boolean isSilent)`
    `(package private) double` | `energyOOP(boolean gradients)`
    `(package private) double` | `energyStretchBend(boolean gradients)`
    `(package private) double` | `energyTorsion(boolean gradients)`
    `(package private) double` | `energyVDW(boolean gradients)`
    `java.lang.String` | `getAtomList(java.lang.String title)`
    `protected java.io.BufferedReader` | `getBufferedReader(java.lang.String resourceName)`
    `int` | `getCurrentStep()`
    `private double` | `getDE(MinAtom atom, int terms, int i, double delta)`
    `private double` | `getEnergies(int terms, boolean gradients)` Get the energy of a given type or types.
    `double` | `getEnergy()`
    `double` | `getEnergyDiff()`
    `java.lang.String` | `getLogData()`
    `(package private) double` | `getNormalizedDE()`
    `private void` | `linearSearch()`
    `void` | `log(java.lang.String s)`
    `private void` | `restoreCoordinates()`
    `private void` | `saveCoordinates()`
    `void` | `setConstraints(Minimizer m)`
    `private void` | `setForcesUsingNumericalDerivative(MinAtom atom, int terms)`
    `abstract boolean` | `setModel(javajs.util.BS bsElements, int elemnoMax)`
    `protected void` | `setModelFields()`
    `void` | `steepestDescentInitialize(int stepMax, double criterion)`
    `boolean` | `steepestDescentTakeNSteps(int n)`
    `private float` | `toUnits(double energy, java.lang.String units)`
    `float` | `toUserUnits(double energy)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ENERGY

          static final int ENERGY

      See Also:
        Constant Field Values

    - #### EBOND

          static final int EBOND

      See Also:
        Constant Field Values

    - #### EANGLE

          static final int EANGLE

      See Also:
        Constant Field Values

    - #### ESTRBND

          static final int ESTRBND

      See Also:
        Constant Field Values

    - #### ETORSION

          static final int ETORSION

      See Also:
        Constant Field Values

    - #### EOOP

          static final int EOOP

      See Also:
        Constant Field Values

    - #### EVDW

          static final int EVDW

      See Also:
        Constant Field Values

    - #### EELECTROSTATIC

          static final int EELECTROSTATIC

      See Also:
        Constant Field Values

    - #### ABI_IJ

          public static final int ABI_IJ

      See Also:
        Constant Field Values

    - #### ABI_JK

          public static final int ABI_JK

      See Also:
        Constant Field Values

    - #### TBI_AB

          public static final int TBI_AB

      See Also:
        Constant Field Values

    - #### TBI_BC

          public static final int TBI_BC

      See Also:
        Constant Field Values

    - #### TBI_CD

          public static final int TBI_CD

      See Also:
        Constant Field Values

    - #### R3

          public static final int R3

      See Also:
        Constant Field Values

    - #### R4

          public static final int R4

      See Also:
        Constant Field Values

    - #### R5

          public static final int R5

      See Also:
        Constant Field Values

    - #### Raromatic

          public static final int Raromatic

      See Also:
        Constant Field Values

    - #### name

          public java.lang.String name

    - #### calc

          Calculations calc

    - #### criterion

          private double criterion

    - #### e0

          private double e0

    - #### dE

          private double dE

    - #### currentStep

          int currentStep

    - #### stepMax

          private int stepMax

    - #### coordSaved

          private double[][] coordSaved

    - #### minAtomCount

          int minAtomCount

    - #### minBondCount

          int minBondCount

    - #### minAtoms

          MinAtom[] minAtoms

    - #### minBonds

          MinBond[] minBonds

    - #### minAngles

          MinAngle[] minAngles

    - #### minTorsions

          MinTorsion[] minTorsions

    - #### minPositions

          MinPosition[] minPositions

    - #### bsFixed

          javajs.util.BS bsFixed

    - #### minimizer

          Minimizer minimizer

  - ### Constructor Detail

    - #### ForceField

          public ForceField()

  - ### Method Detail

    - #### clear

          public abstract void clear()

    - #### setModel

          public abstract boolean setModel(javajs.util.BS bsElements,
                                           int elemnoMax)
                                    throws JmolAsyncException

      Throws:
        `JmolAsyncException`

    - #### setModelFields

          protected void setModelFields()

    - #### setConstraints

          public void setConstraints(Minimizer m)

    - #### steepestDescentInitialize

          public void steepestDescentInitialize(int stepMax,
                                                double criterion)

    - #### clearForces

          private void clearForces()

    - #### steepestDescentTakeNSteps

          public boolean steepestDescentTakeNSteps(int n)

    - #### getEnergies

          private double getEnergies(int terms,
                                     boolean gradients)

      Get the energy of a given type or types. Note: gradients is always false
      Parameters:
        `terms` -
        `gradients` - ignored (false)
      Returns:

    - #### setForcesUsingNumericalDerivative

          private void setForcesUsingNumericalDerivative(MinAtom atom,
                                                         int terms)

    - #### getDE

          private double getDE(MinAtom atom,
                               int terms,
                               int i,
                               double delta)

    - #### energyFull

          public double energyFull(boolean gradients,
                                   boolean isSilent)

    - #### energyStretchBend

          double energyStretchBend(boolean gradients)

      Parameters:
        `gradients` -
      Returns:
        energy

    - #### energyBond

          double energyBond(boolean gradients)

    - #### energyAngle

          double energyAngle(boolean gradients)

    - #### energyTorsion

          double energyTorsion(boolean gradients)

    - #### energyOOP

          double energyOOP(boolean gradients)

    - #### energyVDW

          double energyVDW(boolean gradients)

    - #### energyES

          double energyES(boolean gradients)

    - #### linearSearch

          private void linearSearch()

    - #### saveCoordinates

          private void saveCoordinates()

    - #### restoreCoordinates

          private void restoreCoordinates()

    - #### detectExplosion

          public boolean detectExplosion()

    - #### getCurrentStep

          public int getCurrentStep()

    - #### getEnergy

          public double getEnergy()

    - #### getAtomList

          public java.lang.String getAtomList(java.lang.String title)

    - #### getEnergyDiff

          public double getEnergyDiff()

    - #### getLogData

          public java.lang.String getLogData()

    - #### getNormalizedDE

          double getNormalizedDE()

    - #### toUserUnits

          public float toUserUnits(double energy)

    - #### toUnits

          private float toUnits(double energy,
                                java.lang.String units)

    - #### log

          public void log(java.lang.String s)

    - #### getBufferedReader

          protected java.io.BufferedReader getBufferedReader(java.lang.String resourceName)
                                                      throws java.io.IOException

      Throws:
        `java.io.IOException`