|
occ
|
L-BFGS geometry optimizer in Cartesian coordinates. More...
#include <lbfgs_optimizer.h>
Public Member Functions | |
| LbfgsOptimizer (const core::Molecule &mol, const ConvergenceCriteria &criteria=ConvergenceCriteria{}, const LbfgsSettings &settings=LbfgsSettings{}) | |
| void | update (double energy, const Mat3N &gradient) |
| Energy (Hartree) and Cartesian gradient (Hartree/Bohr, 3 x N) at the geometry last returned by get_next_geometry(). | |
| bool | step () |
| Check convergence at the current point, else take a step. | |
| core::Molecule | get_next_geometry () const |
| void | shift_energy_reference (double shift) |
| Energies are not used by the step, so this only keeps the reported energy change on one surface. | |
| bool | is_converged () const |
| double | current_energy () const |
| int | current_step () const |
| double | trust_radius () const |
| int | num_stored () const |
L-BFGS geometry optimizer in Cartesian coordinates.
Ported from klasp: the two-loop recursion with H0 = (s.y / y.y) I from the latest pair (or a model Hessian, see LbfgsSettings::precondition), pairs with y.s <= 0 skipped and a fall back to steepest descent (history cleared) when the direction goes uphill. In place of a line search the step is scaled to a trust radius on the largest atomic displacement. Convergence is checked with the same per-atom criteria as GeometryOptimizer.
| occ::opt::LbfgsOptimizer::LbfgsOptimizer | ( | const core::Molecule & | mol, |
| const ConvergenceCriteria & | criteria = ConvergenceCriteria{}, | ||
| const LbfgsSettings & | settings = LbfgsSettings{} ) |
|
inline |
|
inline |
| core::Molecule occ::opt::LbfgsOptimizer::get_next_geometry | ( | ) | const |
|
inline |
|
inline |
| void occ::opt::LbfgsOptimizer::shift_energy_reference | ( | double | shift | ) |
Energies are not used by the step, so this only keeps the reported energy change on one surface.
| bool occ::opt::LbfgsOptimizer::step | ( | ) |
Check convergence at the current point, else take a step.
Returns true when converged (the geometry is then left where it is).
|
inline |
| void occ::opt::LbfgsOptimizer::update | ( | double | energy, |
| const Mat3N & | gradient ) |
Energy (Hartree) and Cartesian gradient (Hartree/Bohr, 3 x N) at the geometry last returned by get_next_geometry().