Class PhMinimize

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

public class PhMinimize extends Object implements OptimizationListener, Terminatable
Minimize the potential energy of a system to an RMS gradient per atom convergence criteria.
Since:
1.0
Author:
Michael J. Schnieders
  • Field Details Link icon

    • molecularAssembly Link icon

      protected final MolecularAssembly molecularAssembly
      The MolecularAssembly being operated on.
    • potential Link icon

      protected final Potential potential
      The potential energy to optimize.
    • esvSystem Link icon

      protected final ExtendedSystem esvSystem
      The extended system that contains the fictitious particle
    • algorithmListener Link icon

      protected final AlgorithmListener algorithmListener
      The AlgorithmListener to update the UI.
    • n Link icon

      protected final int n
      Number of variables.
    • nESV Link icon

      protected final int nESV
      Number of Extended System variables.
    • x Link icon

      protected final double[] x
      Current value of each variable.
    • theta Link icon

      protected double[] theta
      Current value of each Extended System variable.
    • grad Link icon

      protected final double[] grad
      The gradient.
    • gradESV Link icon

      protected double[] gradESV
      The gradient.
    • scaling Link icon

      protected final double[] scaling
      Scaling applied to each variable.
    • done Link icon

      protected boolean done
      A flag to indicate the algorithm is done.
    • terminate Link icon

      protected boolean terminate
      A flag to indicate the algorithm should be terminated.
    • time Link icon

      protected long time
      Minimization time in nanoseconds.
    • energy Link icon

      protected double energy
      The final potential energy.
    • status Link icon

      protected int status
      The return status of the optimization.
    • nSteps Link icon

      protected int nSteps
      The number of optimization steps taken.
  • Constructor Details Link icon

  • Method Details Link icon

    • getEnergy Link icon

      public double getEnergy()
      Getter for the field energy.
      Returns:
      a double.
    • getRMSGradient Link icon

      public double getRMSGradient()
      getRMSGradient.
      Returns:
      a double.
    • getStatus Link icon

      public int getStatus()
      Getter for the field status.
      Returns:
      The status of the optimization.
    • minimizeCoordinates Link icon

      public Potential minimizeCoordinates()
      minimize
      Returns:
      a Potential object.
    • minimizeCoordinates Link icon

      public Potential minimizeCoordinates(double eps)
      minimize
      Parameters:
      eps - The convergence criteria.
      Returns:
      a Potential object.
    • minimizeCoordinates Link icon

      public Potential minimizeCoordinates(double eps, int maxIterations)
      minimize
      Parameters:
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      a Potential object.
    • minimizeCoordinates Link icon

      public Potential minimizeCoordinates(int m, double eps, int maxIterations)
      minimize
      Parameters:
      m - The number of previous steps used to estimate the Hessian.
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      a Potential object.
    • minimizeTitration Link icon

      public Potential minimizeTitration(double eps, int maxIterations)
      minimize
      Parameters:
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      a Potential object.
    • minimizeTitration Link icon

      public Potential minimizeTitration(int m, double eps, int maxIterations)
      minimize
      Parameters:
      m - The number of previous steps used to estimate the Hessian.
      eps - The convergence criteria.
      maxIterations - The maximum number of iterations.
      Returns:
      a Potential object.
    • optimizationUpdate Link icon

      public boolean optimizationUpdate(int iteration, int nBFGS, int functionEvaluations, double rmsGradient, double rmsCoordinateChange, double energy, double energyChange, double angle, LineSearch.LineSearchResult lineSearchResult)
      This method is called by the optimizer after each step.

      It can be used to log status messages, update the user interface, or gracefully terminate the optimizer.

      Implement the OptimizationListener interface.

      Specified by:
      optimizationUpdate in interface OptimizationListener
      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
    • terminate Link icon

      public void terminate()
      This should be implemented as a blocking interrupt; when the method returns the Terminatable algorithm has reached a clean termination point. For example, between minimize or molecular dynamics steps.
      Specified by:
      terminate in interface Terminatable