pytc.solver.bug_core.check_stop¶
- pytc.solver.bug_core.check_stop(step, scale, valid, e_hist, tol, *, conv, amplitude_tol=None)[source]¶
The stop rule of every BUG solver; returns the reason, or
Noneto go on.stepis||T' - T||(for CCSD also+ ||t1' - t1||),scalethe matching amplitude norm, andvalidisFalsewhen the step came from a roundoff-negative Gram difference. The run stops onstep < conv('amplitude-step') or on the energy settling belowtolover three iterations ('energy-plateau');amplitude_tol, when given, additionally requiresstep < amplitude_tol * scalefor either route.- Parameters:
step (float)
scale (float)
valid (bool)
tol (float)
conv (float)
amplitude_tol (float | None)