Package ffx.xray
Class ScaleBulkMinimize
java.lang.Object
ffx.xray.ScaleBulkMinimize
- All Implemented Interfaces:
Terminatable
,OptimizationListener
ScaleBulkMinimize class.
- Since:
- 1.0
- Author:
- Timothy D. Fenn
-
Constructor Summary
ConstructorDescriptionScaleBulkMinimize
(ReflectionList reflectionList, DiffractionRefinementData refinementData, CrystalReciprocalSpace crystalReciprocalSpace, ParallelTeam parallelTeam) Constructor for ScaleBulkMinimize. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getCoordinates
(double[] x) getCoordinates.int
getNumberOfVariables.void
ksbsGridOptimizeminimize()
minimizeminimize
(double eps) minimizeminimize
(int m, double eps) minimizeboolean
optimizationUpdate
(int iter, int nBFGS, int nfun, double grms, double xrms, double f, double df, double angle, LineSearch.LineSearchResult info) This method is called by the optimizer after each step.void
This should be implemented as a blocking interrupt; when the method returns theTerminatable
algorithm has reached a clean termination point.
-
Constructor Details
-
ScaleBulkMinimize
public ScaleBulkMinimize(ReflectionList reflectionList, DiffractionRefinementData refinementData, CrystalReciprocalSpace crystalReciprocalSpace, ParallelTeam parallelTeam) Constructor for ScaleBulkMinimize.- Parameters:
reflectionList
- aReflectionList
object.refinementData
- aDiffractionRefinementData
object.crystalReciprocalSpace
- aCrystalReciprocalSpace
object.parallelTeam
- the ParallelTeam to execute the ScaleBulkMinimize.
-
-
Method Details
-
getCoordinates
public double[] getCoordinates(double[] x) getCoordinates.- Parameters:
x
- an array ofinvalid reference
double
- Returns:
- an array of
invalid reference
double
-
getNumberOfVariables
public int getNumberOfVariables()getNumberOfVariables.- Returns:
- a int.
-
ksbsGridOptimize
public void ksbsGridOptimize()ksbsGridOptimize -
minimize
minimize- Returns:
- a
ScaleBulkEnergy
object.
-
minimize
minimize- Parameters:
eps
- a double.- Returns:
- a
ScaleBulkEnergy
object.
-
minimize
minimize- Parameters:
m
- a int.eps
- a double.- Returns:
- a
ScaleBulkEnergy
object.
-
optimizationUpdate
public boolean optimizationUpdate(int iter, int nBFGS, int nfun, double grms, double xrms, double f, double df, double angle, LineSearch.LineSearchResult info) 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.
- Specified by:
optimizationUpdate
in interfaceOptimizationListener
- Parameters:
iter
- Number of iterations.nBFGS
- Number of L-BFGS correction vectors.nfun
- Number of function evaluations.grms
- RMS gradient at current solution.xrms
- RMS coordinate change at current solution.f
- Function value at current solution.df
- Change in the function value compared to the previous solution.angle
- Current angle between gradient and search direction.info
- Result of the line search (null at iteration == 0).- Returns:
- A return value of false will terminate the optimization.
-
terminate
public void terminate()This should be implemented as a blocking interrupt; when the method returns theTerminatable
algorithm has reached a clean termination point. For example, between minimize or molecular dynamics steps.- Specified by:
terminate
in interfaceTerminatable
-