Class MinimizeOpenMM

java.lang.Object
ffx.algorithms.optimize.Minimize
ffx.algorithms.optimize.MinimizeOpenMM
All Implemented Interfaces:
Terminatable, OptimizationListener

public class MinimizeOpenMM extends Minimize
Given a Context, this class searches for a new set of particle positions that represent a local minimum of the potential energy. The search is performed with the L-BFGS algorithm. Distance constraints are enforced during minimization by adding a harmonic restraining force to the potential function. The strength of the restraining force is steadily increased until the minimum energy configuration satisfies all constraints to within the tolerance specified by the Context's Integrator.

Energy minimization is done using the force groups defined by the Integrator. If you have called setIntegrationForceGroups() on it to restrict the set of forces used for integration, only the energy of the included forces will be minimized.

Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • MinimizeOpenMM

      public MinimizeOpenMM(MolecularAssembly molecularAssembly)
      MinimizeOpenMM constructor.
      Parameters:
      molecularAssembly - the MolecularAssembly to optimize.
    • MinimizeOpenMM

      public MinimizeOpenMM(MolecularAssembly molecularAssembly, OpenMMEnergy openMMEnergy)
      MinimizeOpenMM constructor.
      Parameters:
      molecularAssembly - the MolecularAssembly to optimize.
      openMMEnergy - the OpenMM potential energy function.
    • MinimizeOpenMM

      public MinimizeOpenMM(MolecularAssembly molecularAssembly, OpenMMEnergy openMMEnergy, AlgorithmListener algorithmListener)
      MinimizeOpenMM constructor.
      Parameters:
      molecularAssembly - the MolecularAssembly to optimize.
      openMMEnergy - the OpenMM potential energy function.
      algorithmListener - report progress using the listener.
  • Method Details

    • minimize

      public Potential minimize(int m, double eps, int maxIterations)
      Note the OpenMM L-BFGS minimizer does not accept the parameter "m" for the number of previous steps used to estimate the Hessian.
      Overrides:
      minimize in class Minimize
      Parameters:
      m - The number of previous steps used to estimate the Hessian (ignored).
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      The potential.
    • minimize

      public Potential minimize(double eps, int maxIterations)
      minimize
      Overrides:
      minimize in class Minimize
      Parameters:
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      a Potential object.
    • optimizationUpdate

      public boolean optimizationUpdate(int iteration, int nBFGS, int functionEvaluations, double rmsGradient, double rmsCoordinateChange, double energy, double energyChange, double angle, LineSearch.LineSearchResult lineSearchResult)
      MinimizeOpenMM does not support the OptimizationListener interface.
      Specified by:
      optimizationUpdate in interface OptimizationListener
      Overrides:
      optimizationUpdate in class Minimize
      Parameters:
      iteration - Number of iterations.
      nBFGS - Number of L-BFGS correction vectors.
      functionEvaluations - Number of function evaluations.
      rmsGradient - RMS gradient at current solution.
      rmsCoordinateChange - RMS coordinate change at current solution.
      energy - Function value at current solution.
      energyChange - Change in the function value compared to the previous solution.
      angle - Current angle between gradient and search direction.
      lineSearchResult - Result of the line search (null at iteration == 0).
      Returns:
      A return value of false will terminate the optimization.
      Since:
      1.0