sc::Convergence(3)
π sc::Convergence(3) β the MPQC convergence-check bestie π
okay so this is the sc::Convergence(3) page from the MPQC manual, and it's literally the class the optimizer uses to determine when an optimization is converged. no cap, that's the whole vibe. π¦
πΈ NAME πΈ
sc::Convergence β the Convergence class is used by the optimizer to determine when an optimization is converged. bestie, it's the βare we done yet?β detector for your optimization. β¨
π¦ SYNOPSIS π¦
#include <conv.h>
Inherits sc::SavableState.
Inherited by sc::MolEnergyConvergence.
π Public Member Functions π
Convergence (double tolerance)β constructor taking adouble tolerance.Convergence (StateIn &)β constructor from aStateIn &.Convergence (const Ref< KeyVal > &)β constructor from aconst Ref< KeyVal > &; the KeyVal constructor reads the keywords below.void save_data_state (StateOut &)β saves the base classes (withsave_data_state) and the members in the same order that theStateInCTOR initializes them.virtual void get_grad (const Ref< Function > &)β set the current gradient and displacement.virtual void get_x (const Ref< Function > &)β takes aconst Ref< Function > &; that's all this page spells out for it.virtual void set_nextx (const RefSCVector &)β takes aconst RefSCVector &; that's all this page spells out for it.virtual void reset ()β set the current gradient and displacement to null.virtual int converged ()β return nonzero if the optimization has converged.
π«Ά Protected Member Functions π«Ά
void check_conv (const char *heading, double val, double bound, int &pass, int &fail)β this exact signature is what the page gives you, bestie.void set_defaults ()β this exact signature is what the page gives you.
π Protected Attributes π
RefSCVector grad_RefSCVector x_RefSCVector nextx_int use_max_disp_double max_disp_int use_max_grad_double max_grad_int use_rms_disp_double rms_disp_int use_rms_grad_double rms_grad_int use_graddisp_double graddisp_
π Additional Inherited Members π
This heading is here on the page, but no additional inherited members are itemized under it, bestie. π
β¨ Detailed Description β¨
The Convergence class is used by the optimizer to determine when an optimization is converged. yes, it's literally that important. π
The KeyVal input for Convergence is given below. Giving none of these keywords is the same as giving the following input:
conv<Convergence>: (
max_disp = 1.0e-6
max_grad = 1.0e-6
graddisp = 1.0e-6
)
π Constructor & Destructor Documentation π
π sc::Convergence::Convergence (const Ref< KeyVal > &) π
The KeyVal constructor reads the following keywords, bestie:
max_dispβ The value of the maximum displacement must be less than the value of this keyword for the calculation to be converged. The default is to not check this parameter. However, if no other keywords are given, default convergence parameters are chosen as described above. πmax_gradβ The value of the maximum gradient must be less than the value of this keyword for the calculation to be converged. The default is to not check this parameter. However, if no other keywords are given, default convergence parameters are chosen as described above. β¨rms_dispβ The value of the RMS of the displacements must be less than the value of this keyword for the calculation to be converged. The default is to not check this parameter. However, if no other keywords are given, default convergence parameters are chosen as described above. π¦rms_gradβ The value of the RMS of the gradients must be less than the value of this keyword for the calculation to be converged. The default is to not check this parameter. However, if no other keywords are given, default convergence parameters are chosen as described above. πΈgraddispβ The value of the scalar product of the gradient vector with the displacement vector must be less than the value of this keyword for the calculation to be converged. The default is to not check this parameter. However, if no other keywords are given, default convergence parameters are chosen as described above. π
π Member Function Documentation π
π void sc::Convergence::save_data_state (StateOut &) [virtual] π
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. This must be implemented by the derived class if the class has data. πΎ
Reimplemented from sc::SavableState.
β Author β
Generated automatically by Doxygen for MPQC from the source code.
okay that's the whole page, bestie! π
This is from the MPQC manual, version 2.3.1, dated Sun Oct 4 2020. slay. πβ¨
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms