occ
Loading...
Searching...
No Matches
occ::opt::LbfgsOptimizer Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ LbfgsOptimizer()

occ::opt::LbfgsOptimizer::LbfgsOptimizer ( const core::Molecule & mol,
const ConvergenceCriteria & criteria = ConvergenceCriteria{},
const LbfgsSettings & settings = LbfgsSettings{} )

Member Function Documentation

◆ current_energy()

double occ::opt::LbfgsOptimizer::current_energy ( ) const
inline

◆ current_step()

int occ::opt::LbfgsOptimizer::current_step ( ) const
inline

◆ get_next_geometry()

core::Molecule occ::opt::LbfgsOptimizer::get_next_geometry ( ) const

◆ is_converged()

bool occ::opt::LbfgsOptimizer::is_converged ( ) const
inline

◆ num_stored()

int occ::opt::LbfgsOptimizer::num_stored ( ) const
inline

◆ shift_energy_reference()

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.

◆ step()

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).

◆ trust_radius()

double occ::opt::LbfgsOptimizer::trust_radius ( ) const
inline

◆ update()

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().


The documentation for this class was generated from the following file: