votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::trah::TrustRadius Class Reference

#include <trah.h>

Public Member Functions

 TrustRadius (double radius=0.5, double max_radius=1.0)
double Radius () const
double LastRatio () const
bool Update (double predicted, double actual)
bool Update (double predicted, double actual, double linear, double step_norm)

Static Public Attributes

static constexpr double noise_floor = 1e-10

Private Attributes

double radius_
double max_radius_
double ratio_ = 0.0

Detailed Description

Fletcher's trust-radius update. Returns whether the step is accepted (actual and predicted energy changes of the same sign, or both below noise_floor in magnitude) and adjusts the radius: x0.7 for a rejected step or r <= 0.25, x1.2 (up to max_radius) for r > 0.75, with r = actual / predicted.

Definition at line 113 of file trah.h.

Constructor & Destructor Documentation

◆ TrustRadius()

votca::xtp::trah::TrustRadius::TrustRadius ( double radius = 0.5,
double max_radius = 1.0 )
inlineexplicit

Definition at line 115 of file trah.h.

Member Function Documentation

◆ LastRatio()

double votca::xtp::trah::TrustRadius::LastRatio ( ) const
inline

Definition at line 118 of file trah.h.

◆ Radius()

double votca::xtp::trah::TrustRadius::Radius ( ) const
inline

Definition at line 117 of file trah.h.

◆ Update() [1/2]

bool votca::xtp::trah::TrustRadius::Update ( double predicted,
double actual )

Definition at line 257 of file trah.cc.

◆ Update() [2/2]

bool votca::xtp::trah::TrustRadius::Update ( double predicted,
double actual,
double linear,
double step_norm )

The same, with the linear term g.x and the length |x| of the step: a rejected step then sets the radius from the energy along it, E(t) = E0 + linear t + c t^2 with c = actual - linear, to the minimum t* = -linear / (2c), clamped to [0.1, 0.7] x |x| (else 0.7 x min(radius, |x|)).

Definition at line 242 of file trah.cc.

Member Data Documentation

◆ max_radius_

double votca::xtp::trah::TrustRadius::max_radius_
private

Definition at line 131 of file trah.h.

◆ noise_floor

double votca::xtp::trah::TrustRadius::noise_floor = 1e-10
staticconstexpr

Definition at line 127 of file trah.h.

◆ radius_

double votca::xtp::trah::TrustRadius::radius_
private

Definition at line 130 of file trah.h.

◆ ratio_

double votca::xtp::trah::TrustRadius::ratio_ = 0.0
private

Definition at line 132 of file trah.h.


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