Optimize the geometry using the L-BFGS function minimizer. This is based on the BFGS optimizer, but it does not store the inverse Hessian, instead it is calculated as needed. Because of this, the L-BFGS method uses very little storage, and is therefore suitable for optimizing very large systems.

The L-BFGS optimizer is the default if 100 or more variables are to be
optimized. For such systems, L-BFGS is more efficient than Baker's
Eigenfollowing, however there is no guarantee that the L-BFGS method will
produce a minimum energy. In systems where two or more species are
present, and only low-energy interactions bind the species together, the L-BFGS
optimizer sometimes fails to produce a minimum energy system .
If this happens, or if for any other reason the L-BFGS is not wanted, add keyword `EF` or
`BFGS`. Both these methods are more
reliable for difficult systems.

The L-BFGS optimization procedure is a limited memory variation of the Broyden-Fletcher-Goldfarb-Shanno (BFGS) quasi-Newton algorithm. Rather than storing the Hessian, the L-BFGS method stores only the gradient vectors for the the last few geometries calculated. In MOPAC, a maximum of 12 gradient vectors are stored. It then uses this set of vectors to approximate individual elements of the Hessian as they are needed. It is good for large systems, such as proteins and other macromolecules and solids. In practice, it also seems to be the best geometry optimizer for systems of thirty or more atoms. Go on-line for more detail on the L-BFGS method

It uses the gradient only, by moving the atoms in the system in the downhill
direction. Although the L-BFGS method does not use the ΔH_{f}, for
most systems it does minimize the ΔH_{f} as a side effect of
minimizing the gradient. Although it is not explicit in the algorithm, the
L-BFGS method, like the other geometry optimizers in MOPAC, does optimize the
geometry to a ground state. There has not yet been a worked example of it
optimizing an unconstrained geometry to a transition state.

Using only the gradient and not the ΔH_{f} has advantages, in that when the
L-BFGS method makes a bad step, it uses the results of that step to work out a
better step. This leads to a more rapid descent to a stationary point on
the Potential Energy Surface.

An unsolved fault in the L-BFGS method as implemented in MOPAC is that, for solids with a very large number of atoms in the cluster, after the geometry has been almost completely optimized, the algorithm starts to move the system away from the minimum, and continues to drift it in a nonsensical manner. This behavior is obviously undesirable. And at present, the cause of this behavior is unknown, however a workaround has been developed to handle this situation.

During a geometry optimization that uses the L-BFGS optimizer, the system
with the lowest ΔH_{f} is stored. At
the beginning of a job, the ΔH_{f}
is calculated and it, and the starting geometry, are stored.
After each subsequent cycle, the ΔH_{f} is compared with the value
in the store.
If it is lower (more negative), then the current geometry and ΔH_{f} are stored.
So that after every cycle the ΔH_{f} and geometry in the store
are always the best values calculated. At the end of the run the working geometry will be replaced by whatever
geometry was in storage if the ΔH_{f} of the working geometry is more positive than
the value for the stored geometry. If that is done, then the ΔH_{f} of the
lowest-energy geometry will be re-evaluated. The final output will then refer to
this geometry.

This workaround is used for all jobs that use the L-BFGS optimizer that end
normally, or if the job runs out of time, or the
SHUT command is issued.
If a large job is restarted using `RESTART` and `1SCF` is specified, then the workaround will not
be used. For large jobs, if a `1SCF ` is wanted, use the final geometry from
the previous run.

For most jobs the final geometry will be the best, and the workaround just
described would not be used, but if the lowest-energy geometry is not the last
geometry calculated by L-BFGS, then the message: "**CURRENT BEST VALUE OF HEAT OF
FORMATION**" will be printed.