pele.optimize.LBFGS#
- class pele.optimize.LBFGS(X, pot, maxstep=0.1, maxErise=0.0001, M=4, rel_energy=False, H0=0.1, events=None, alternate_stop_criterion=None, debug=False, iprint=-1, nsteps=10000, tol=1e-05, logger=None, energy=None, gradient=None, armijo=False, armijo_c=0.0001, fortran=False)[source]#
minimize a function using the LBFGS routine
- Parameters:
- Xarray
the starting configuration for the minimization
- pot
the potential object
- nstepsint
the maximum number of iterations
- tolfloat
the minimization will stop when the rms grad is less than tol
- iprintint
how often to print status information
- maxstepfloat
the maximum step size
- maxErisefloat
the maximum the energy is alowed to rise during a step. The step size will be reduced until this condition is satisfied.
- Mint
the number of previous iterations to use in determining the optimal step
- rel_energybool
if True, then maxErise the the relative maximum the energy is allowed to rise during a step
- H0float
the initial guess for the inverse diagonal Hessian. This particular implementation of LBFGS takes all the inverse diagonal components to be the same.
- eventslist of callables
these are called after each iteration. events can also be added using attachEvent()
- alternate_stop_criterioncallable
this criterion will be used rather than rms gradiant to determine when to stop the iteration
- debug
print debugging information
- loggerlogger object
messages will be passed to this logger rather than the default
- energy, gradientfloat, float array
The initial energy and gradient. If these are both not None then the energy and gradient of the initial point will not be calculated, saving one potential call.
- armijobool
Use the Armijo criterion instead of maxErise as the criterion for accepting a step size. The Armijo criterion is the first wolfe criterion and is a condition that the energy decrease sufficiently
- armijo_cfloat
This adjusts how strong the armijo rule is. 0 < armijo_c < 1. Default 1e-4
- fortranbool
use the fortran version of the LBFGS. Only the step which computes the step size and direction from the memory is in fortran.
See also
MYLBFGSthis implemented in a compiled language
pele.optimize.lbfgs_pya function wrapper
Notes
This each iteration of this minimization routine is composed of the following parts
determine a step size and direction using the LBFGS algorithm
ensure the step size is appropriate (see maxErise and maxstep). Reduce the step size until conditions are satisfied.
take step
Methods
|
We now have a proposed step. |
|
|
|
update the LBFGS memory and compute a step direction and size |
return a results object |
|
return the state of the LBFGS memory |
|
do one iteration of the LBFGS loop |
|
|
reset the LBFGS memory and H0 |
|
run the LBFGS minimizer |
|
set the LBFGS memory from the passed state |
test the stop criterion |
|
|
change the location of the minimizer manually |
Attributes