|
MADNESS 0.10.1
|
struct for running a protocol of subsequently tightening precision More...
#include <SCFProtocol.h>

Public Member Functions | |
| SCFProtocol (World &w, const CalculationParameters ¶m) | |
| bool | approx (const double a, const double b) const |
| compare two positive doubles to be equal | |
| void | drop_last_rung () |
| drop the last rung, i.e. stop one step short of the full precision | |
| bool | finished () const |
| void | infer_thresholds (const double prec) |
| infer thresholds for a given rung of the ladder | |
| void | initialize () |
| bool | on_last_rung () const |
| true if the current rung is the last one | |
| SCFProtocol & | operator++ () |
| go to the next rung of the ladder | |
| void | set_start_index (const std::size_t i) |
| start at a given rung rather than at the first | |
| std::size_t | size () const |
| number of rungs in the ladder | |
| std::size_t | start_index () const |
| index of the rung this protocol will start at | |
Public Attributes | |
| bool | converged |
| flag if protocol has converged | |
| double | current_prec |
| current precision | |
| double | dconv |
| density convergence of SCF calculations | |
| double | econv |
| energy convergence of SCF calculations | |
| double | end_prec |
| final precision | |
| double | start_prec |
| starting precision, typically 1.e-4 | |
| double | thresh |
| numerical precision of representing functions | |
| World & | world |
Private Attributes | |
| std::size_t | index |
| current rung | |
| std::vector< double > | protocol |
| the ladder, from CalculationParameters | |
| double | user_dconv |
| density convergence provided by user | |
| double | user_econv |
| energy convergence provided by user | |
struct for running a protocol of subsequently tightening precision
The ladder is CalculationParameters::protocol() and nothing else – the same list moldft walks, so both engines refine through identical steps and k follows from SCF::set_protocol's thresh->k table. econv and dconv are convergence criteria applied at each rung, relaxed to the rung's own threshold the way SCF::solve already relaxes dconv: you cannot converge a quantity tighter than the basis represents it.
|
inline |
References current_prec, end_prec, infer_thresholds(), MADNESS_CHECK_THROW, madness::nonlinear_vector_solver(), protocol, and start_prec.
compare two positive doubles to be equal
References a, std::abs(), and b.
|
inline |
drop the last rung, i.e. stop one step short of the full precision
used for cheap pre-iterations; never empties the ladder
References end_prec, index, protocol, and set_start_index().
infer thresholds for a given rung of the ladder
The rung sets the representation threshold. econv and dconv are the user's, but never tighter than the rung can support.
dconv needs care. The BSH residual cannot fall much below the threshold the orbitals are represented at, and nemo tests bsh_norm < dconv strictly, so a dconv equal to the rung's threshold is unreachable and the rung burns maxiter without converging. Intermediate rungs therefore use the long-standing 0.1*sqrt(thresh) relaxation – 1e-3 at thresh 1e-4, 1e-4 at thresh 1e-6 – which is comfortably looser than the rung; they are only a stepping stone, so there is nothing to gain from converging them tightly. The last rung is the answer, so it honours the user's dconv (never demanding tighter than the representation supports).
References dconv, econv, madness::nonlinear_vector_solver(), on_last_rung(), thresh, user_dconv, and user_econv.
Referenced by SCFProtocol(), initialize(), operator++(), and set_start_index().
|
inline |
|
inline |
true if the current rung is the last one
References index, and protocol.
Referenced by infer_thresholds().
|
inline |
go to the next rung of the ladder
References converged, current_prec, index, infer_thresholds(), and protocol.
|
inline |
start at a given rung rather than at the first
used to skip rungs a restart has already converged through
References current_prec, index, infer_thresholds(), MADNESS_CHECK_THROW, protocol, and start_prec.
Referenced by drop_last_rung().
|
inline |
number of rungs in the ladder
References protocol.
|
inline |
index of the rung this protocol will start at
References index.
| bool madness::SCFProtocol::converged |
flag if protocol has converged
Referenced by finished(), initialize(), and operator++().
| double madness::SCFProtocol::current_prec |
current precision
Referenced by SCFProtocol(), initialize(), operator++(), and set_start_index().
| double madness::SCFProtocol::dconv |
density convergence of SCF calculations
Referenced by infer_thresholds(), and initialize().
| double madness::SCFProtocol::econv |
energy convergence of SCF calculations
Referenced by infer_thresholds(), and initialize().
| double madness::SCFProtocol::end_prec |
final precision
Referenced by SCFProtocol(), drop_last_rung(), and initialize().
|
private |
current rung
Referenced by drop_last_rung(), initialize(), on_last_rung(), operator++(), set_start_index(), and start_index().
|
private |
the ladder, from CalculationParameters
Referenced by SCFProtocol(), drop_last_rung(), initialize(), on_last_rung(), operator++(), set_start_index(), and size().
| double madness::SCFProtocol::start_prec |
starting precision, typically 1.e-4
Referenced by SCFProtocol(), and set_start_index().
| double madness::SCFProtocol::thresh |
numerical precision of representing functions
Referenced by infer_thresholds(), and initialize().
|
private |
density convergence provided by user
Referenced by infer_thresholds().
|
private |
energy convergence provided by user
Referenced by infer_thresholds().
| World& madness::SCFProtocol::world |
Referenced by initialize().