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 :

X : array

the starting configuration for the minimization

pot :

the potential object

nsteps : int

the maximum number of iterations

tol : float

the minimization will stop when the rms grad is less than tol

iprint : int

how often to print status information

maxstep : float

the maximum step size

maxErise : float

the maximum the energy is alowed to rise during a step. The step size will be reduced until this condition is satisfied.

M : int

the number of previous iterations to use in determining the optimal step

rel_energy : bool

if True, then maxErise the the relative maximum the energy is allowed to rise during a step

H0 : float

the initial guess for the inverse diagonal Hessian. This particular implementation of LBFGS takes all the inverse diagonal components to be the same.

events : list of callables

these are called after each iteration. events can also be added using attachEvent()

alternate_stop_criterion : callable

this criterion will be used rather than rms gradiant to determine when to stop the iteration

debug :

print debugging information

logger : logger object

messages will be passed to this logger rather than the default

energy, gradient : float, 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.

armijo : bool

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_c : float

This adjusts how strong the armijo rule is. 0 < armijo_c < 1. Default 1e-4

fortran : bool

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

this implemented in a compiled language
a function wrapper


This each iteration of this minimization routine is composed of the following parts

  1. determine a step size and direction using the LBFGS algorithm
  2. ensure the step size is appropriate (see maxErise and maxstep). Reduce the step size until conditions are satisfied.
  3. take step


adjustStepSize(X, E, G, stp) We now have a proposed step.
getStep(X, G) update the LBFGS memory and compute a step direction and size
get_result() return a results object
get_state() return the state of the LBFGS memory
one_iteration() do one iteration of the LBFGS loop
reset() reset the LBFGS memory and H0
run() run the LBFGS minimizer
set_state(state) set the LBFGS memory from the passed state
stop_criterion_satisfied() test the stop criterion
update_coords(X, E, G) change the location of the minimizer manually

Previous topic


Next topic