Self-Consistent Field method for converging electronic state. More...
#include <SCF.h>
Public Member Functions | |
SCF (Everything &e) | |
void | minimize () |
Minimizes residual to achieve self-consistency. | |
Public Member Functions inherited from Pulay< SCFvariable > | |
Pulay (const PulayParams &pp) | |
double | minimize (double Eprev=+DBL_MAX, std::vector< string > extraNames=std::vector< string >(), std::vector< double > extraThresh=std::vector< double >()) |
Minimize energy using a self-consistent iteration. More... | |
void | loadState (const char *filename) |
Load the state from a single binary file. | |
void | saveState (const char *filename) const |
Save the state to a single binary file. | |
void | clearState () |
remove past variables and residuals | |
Static Public Member Functions | |
static double | eigDiffRMS (const std::vector< diagMatrix > &, const std::vector< diagMatrix > &, const Everything &e) |
weigted RMS difference between two sets of eigenvalues | |
Protected Member Functions | |
double | sync (double x) const |
Override to synchronize scalars over MPI processes (if the same minimization is happening in sync over many processes) | |
double | cycle (double dEprev, std::vector< double > &extraValues) |
Single cycle of the self-consistency loop. In each subsequent cycle, Pulay will try to zero the difference between getVariable() before and after the cycle. The implementation should only do the work of computing the updated variable; debug printing and I/O, if any, should occur in report() instead. More... | |
void | report (int iter) |
Override to perform optional reporting. | |
void | axpy (double alpha, const SCFvariable &X, SCFvariable &Y) const |
Scaled accumulate on variable. | |
double | dot (const SCFvariable &X, const SCFvariable &Y) const |
Euclidean dot product. Metric applied separately for efficiency. | |
size_t | variableSize () const |
Number of bytes per variable. | |
void | readVariable (SCFvariable &, FILE *) const |
Read variable from stream. | |
void | writeVariable (const SCFvariable &, FILE *) const |
SCFvariable | getVariable () const |
Write variable to stream. More... | |
void | setVariable (const SCFvariable &) |
Set the state of system to specified variable. | |
SCFvariable | precondition (const SCFvariable &) const |
Apply preconditioner to variable/residual. | |
SCFvariable | applyMetric (const SCFvariable &) const |
Apply metric to variable/residual. | |
Protected Member Functions inherited from Pulay< SCFvariable > | |
virtual SCFvariable | getResidual () const |
Get the current residual from state of system (override if not an SCF) | |
Self-Consistent Field method for converging electronic state.
|
protectedvirtual |
Single cycle of the self-consistency loop. In each subsequent cycle, Pulay will try to zero the difference between getVariable() before and after the cycle. The implementation should only do the work of computing the updated variable; debug printing and I/O, if any, should occur in report() instead.
dEprev | energy change at previous cycle, which may be used to adjust accuracy of any inner optimizations |
extraValues | Specify the values of any extra convergence parameters specified in minimize() |
Implements Pulay< SCFvariable >.
|
protectedvirtual |
Write variable to stream.
Get the current variable from state of system
Implements Pulay< SCFvariable >.