DIIS - Direct Inversion in the Iterative Subspace and ADIIS. More...
#include <diis.h>
Public Member Functions | |
DIIS (const arma::mat &S, const arma::mat &Sinvh, bool usediis, bool c1diis, double diiseps, double diisthr, bool useadiis, bool verbose, size_t imax) | |
Constructor. | |
virtual | ~DIIS () |
Destructor. | |
virtual void | clear ()=0 |
Clear Fock matrices and errors. | |
double | get_E_adiis (const arma::vec &x) const |
Compute energy with contraction coefficients ![]() | |
arma::vec | get_dEdx_adiis (const arma::vec &x) const |
Compute derivative of energy wrt contraction coefficients. | |
Protected Member Functions | |
virtual arma::vec | get_energies () const =0 |
Get energies. | |
virtual arma::mat | get_diis_error () const =0 |
Get errors. | |
virtual void | erase_last ()=0 |
Reduce size of stack by one. | |
arma::vec | get_w () |
Compute weights. | |
arma::vec | get_w_diis () const |
Compute DIIS weights. | |
arma::vec | get_w_diis_wrk (const arma::mat &err) const |
Compute DIIS weights, worker routine. | |
arma::vec | get_w_adiis () const |
Compute ADIIS weights. | |
arma::vec | get_c_adiis (bool verbose=false) const |
Solve coefficients. | |
Protected Attributes | |
arma::mat | S |
Overlap matrix. | |
arma::mat | Sinvh |
Half-inverse overlap matrix. | |
bool | usediis |
Use DIIS? | |
bool | c1diis |
C1-DIIS? | |
bool | useadiis |
Use ADIIS? | |
bool | verbose |
Verbose operation? | |
double | diiseps |
When to start using DIIS weights. | |
double | diisthr |
When to start using DIIS exclusively. | |
int | cooloff |
Counter for not using DIIS. | |
size_t | imax |
Maximum amount of matrices to store. | |
arma::vec | PiF |
< P_i - P_n | F(D_n) > or < Pa_i - Pa_n | Fa(P_n) > + < Pb_i - Pb_n | Fb(P_n) > | |
arma::mat | PiFj |
< P_i - P_n | F(D_j) - F(D_n) > or < Pa_i - Pa_n | Fa(P_j) - Fa(P_n) > + < Pb_i - Pb_n | Fb(P_j) - Fb(P_n) > | |
DIIS - Direct Inversion in the Iterative Subspace and ADIIS.
This class contains the DIIS and ADIIS convergence accelerators.
The original DIIS (C1-DIIS) is based on the articles
P. Pulay, "Convergence acceleration of iterative sequences. The case of SCF iteration", Chem. Phys. Lett. 73 (1980), pp. 393 - 398
and
P. Pulay, "Improved SCF Convergence Acceleration", J. Comp. Chem. 3 (1982), pp. 556 - 560.
Using C1-DIIS is, however, not recommended. What is used by default, instead, is C2-DIIS, which is documented in the article
H. Sellers, "The C2-DIIS convergence acceleration algorithm", Int. J. Quant. Chem. 45 (1993), pp. 31 - 41
The ADIIS algorithm is described in
X. Hu and W. Yang, "Accelerating self-consistent field convergence with the augmented Roothaan–Hall energy function", J. Chem. Phys. 132 (2010), 054109.