Minimizer
Date: 2019-10-22

org.jmol.minimize

## Class Minimizer

- java.lang.Object
- - org.jmol.minimize.Minimizer

-     public class Minimizer
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac`
    `private int[]` | `atomMap`
    `Atom[]` | `atoms`
    `private int` | `bondCount`
    `Bond[]` | `bonds`
    `javajs.util.BS` | `bsAtoms`
    `private javajs.util.BS` | `bsFixed`
    `private javajs.util.BS` | `bsFixedDefault`
    `javajs.util.BS` | `bsMinFixed`
    `private javajs.util.BS` | `bsSelected`
    `private javajs.util.BS` | `bsTaint`
    `private java.util.Map<java.lang.String,MMConstraint>` | `constraintMap`
    `javajs.util.Lst<MMConstraint>` | `constraints`
    `(package private) double[][]` | `coordSaved`
    `private double` | `crit`
    `private int` | `elemnoMax`
    `private java.lang.String` | `ff`
    `private boolean` | `isSilent`
    `MinAngle[]` | `minAngles`
    `MinAtom[]` | `minAtoms`
    `MinBond[]` | `minBonds`
    `private boolean` | `minimizationOn`
    `private MinimizationThread` | `minimizationThread`
    `MinPosition[]` | `minPositions`
    `MinTorsion[]` | `minTorsions`
    `double[]` | `partialCharges`
    `private ForceField` | `pFF`
    `int` | `rawBondCount`
    `private int` | `steps`
    `java.lang.String` | `units`
    `Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Minimizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addConstraint(java.lang.Object[] o)`
    `void` | `calculatePartialCharges(ModelSet ms, javajs.util.BS bsAtoms, javajs.util.BS bsReport)`
    `private void` | `clear()`
    `void` | `endMinimization()`
    `void` | `getAngles()`
    `private void` | `getBonds()`
    `private void` | `getEnergyOnly()`
    `ForceField` | `getForceField(java.lang.String ff)`
    `java.lang.Object` | `getProperty(java.lang.String propertyName, int param)`
    `JmolThread` | `getThread()`
    `void` | `getTorsions()`
    `boolean` | `minimizationOn()`
    `boolean` | `minimize(int steps, double crit, javajs.util.BS bsSelected, javajs.util.BS bsFixed, boolean haveFixed, boolean forceSilent, java.lang.String ff)`
    `private void` | `minimizeWithoutThread()`
    `void` | `report(java.lang.String msg, boolean isEcho)`
    `private void` | `reportEnergy()`
    `private void` | `restoreCoordinates()`
    `private void` | `saveCoordinates()`
    `private void` | `setAtomPositions()`
    `private void` | `setEnergyUnits()`
    `private void` | `setMinimizationOn(boolean minimizationOn)`
    `private boolean` | `setModel(javajs.util.BS bsElements)`
    `Minimizer` | `setProperty(java.lang.String propertyName, java.lang.Object value)`
    `private boolean` | `setupMinimization()`
    `boolean` | `startMinimization()`
    `boolean` | `stepMinimization()`
    `void` | `stopMinimization(boolean coordAreOK)`
    `(package private) void` | `updateAtomXYZ()`

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

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

- - ### Field Detail

    - #### vwr

          public Viewer vwr

    - #### atoms

          public Atom[] atoms

    - #### bonds

          public Bond[] bonds

    - #### rawBondCount

          public int rawBondCount

    - #### minAtoms

          public MinAtom[] minAtoms

    - #### minBonds

          public MinBond[] minBonds

    - #### minAngles

          public MinAngle[] minAngles

    - #### minTorsions

          public MinTorsion[] minTorsions

    - #### minPositions

          public MinPosition[] minPositions

    - #### bsMinFixed

          public javajs.util.BS bsMinFixed

    - #### ac

          private int ac

    - #### bondCount

          private int bondCount

    - #### atomMap

          private int[] atomMap

    - #### partialCharges

          public double[] partialCharges

    - #### steps

          private int steps

    - #### crit

          private double crit

    - #### units

          public java.lang.String units

    - #### pFF

          private ForceField pFF

    - #### ff

          private java.lang.String ff

    - #### bsTaint

          private javajs.util.BS bsTaint

    - #### bsSelected

          private javajs.util.BS bsSelected

    - #### bsAtoms

          public javajs.util.BS bsAtoms

    - #### bsFixedDefault

          private javajs.util.BS bsFixedDefault

    - #### bsFixed

          private javajs.util.BS bsFixed

    - #### constraints

          public javajs.util.Lst<MMConstraint> constraints

    - #### isSilent

          private boolean isSilent

    - #### constraintMap

          private java.util.Map<java.lang.String,MMConstraint> constraintMap

    - #### elemnoMax

          private int elemnoMax

    - #### minimizationOn

          private boolean minimizationOn

    - #### minimizationThread

          private MinimizationThread minimizationThread

    - #### coordSaved

          double[][] coordSaved

  - ### Constructor Detail

    - #### Minimizer

          public Minimizer()

  - ### Method Detail

    - #### setProperty

          public Minimizer setProperty(java.lang.String propertyName,
                                       java.lang.Object value)

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String propertyName,
                                              int param)

      Parameters:
        `propertyName` -
        `param` -
      Returns:
        Object

    - #### addConstraint

          private void addConstraint(java.lang.Object[] o)

      Parameters:
        `o` - [ [natoms a1 a2 a3...] value ]

    - #### clear

          private void clear()

    - #### minimize

          public boolean minimize(int steps,
                                  double crit,
                                  javajs.util.BS bsSelected,
                                  javajs.util.BS bsFixed,
                                  boolean haveFixed,
                                  boolean forceSilent,
                                  java.lang.String ff)
                           throws JmolAsyncException

      Throws:
        `JmolAsyncException`

    - #### setEnergyUnits

          private void setEnergyUnits()

    - #### setupMinimization

          private boolean setupMinimization()
                                     throws JmolAsyncException

      Throws:
        `JmolAsyncException`

    - #### setModel

          private boolean setModel(javajs.util.BS bsElements)
                            throws JmolAsyncException

      Throws:
        `JmolAsyncException`

    - #### setAtomPositions

          private void setAtomPositions()

    - #### getBonds

          private void getBonds()

    - #### getAngles

          public void getAngles()

    - #### getTorsions

          public void getTorsions()

    - #### getForceField

          public ForceField getForceField(java.lang.String ff)
                                   throws JmolAsyncException

      Throws:
        `JmolAsyncException`

    - #### minimizationOn

          public boolean minimizationOn()

    - #### getThread

          public JmolThread getThread()

    - #### setMinimizationOn

          private void setMinimizationOn(boolean minimizationOn)

    - #### getEnergyOnly

          private void getEnergyOnly()

    - #### reportEnergy

          private void reportEnergy()

    - #### startMinimization

          public boolean startMinimization()

    - #### stepMinimization

          public boolean stepMinimization()

    - #### endMinimization

          public void endMinimization()

    - #### saveCoordinates

          private void saveCoordinates()

    - #### restoreCoordinates

          private void restoreCoordinates()

    - #### stopMinimization

          public void stopMinimization(boolean coordAreOK)

    - #### updateAtomXYZ

          void updateAtomXYZ()

    - #### minimizeWithoutThread

          private void minimizeWithoutThread()

    - #### report

          public void report(java.lang.String msg,
                             boolean isEcho)

    - #### calculatePartialCharges

          public void calculatePartialCharges(ModelSet ms,
                                              javajs.util.BS bsAtoms,
                                              javajs.util.BS bsReport)
                                       throws JmolAsyncException

      Throws:
        `JmolAsyncException`