JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SCF Class Reference

Self-Consistent Field method for converging electronic state. More...

#include <SCF.h>

Inheritance diagram for SCF:
Pulay< SCFvariable >

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.
 

Detailed Description

Self-Consistent Field method for converging electronic state.

Member Function Documentation

double SCF::cycle ( double  dEprev,
std::vector< double > &  extraValues 
)
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.

Parameters
dEprevenergy change at previous cycle, which may be used to adjust accuracy of any inner optimizations
extraValuesSpecify the values of any extra convergence parameters specified in minimize()
Returns
Energy at end of cycle

Implements Pulay< SCFvariable >.

SCFvariable SCF::getVariable ( ) const
protectedvirtual

Write variable to stream.

Get the current variable from state of system

Implements Pulay< SCFvariable >.


The documentation for this class was generated from the following file: