Exchange-Correlation energy calculator. More...
#include <ExCorr.h>
Classes | |
struct | OrbitalDep |
Abstract base class (interface specification) for orbital-dependent potential functionals. More... | |
Public Member Functions | |
ExCorr (ExCorrType exCorrType=ExCorrGGA_PBE, KineticType kineticType=KineticNone) | |
void | setup (const Everything &) |
Initialize. | |
string | getName () const |
Get a description of the DFT functional. | |
double | operator() (const ScalarFieldArray &n, ScalarFieldArray *Vxc=0, IncludeTXC includeTXC=IncludeTXC(), const ScalarFieldArray *tau=0, ScalarFieldArray *Vtau=0) const |
double | operator() (const ScalarField &n, ScalarField *Vxc=0, IncludeTXC includeTXC=IncludeTXC(), const ScalarField *tau=0, ScalarField *Vtau=0) const |
double | exxFactor () const |
retrieve the exact exchange scale factor (0 if no exact exchange) | |
double | exxRange () const |
range parameter (omega) for screened exchange (0 for long-range exchange) | |
bool | needsKEdensity () const |
whether orbital KE density is required as an input (for meta GGAs) | |
bool | hasEnergy () const |
whether functional supports a total energy (if not, only usable in SCF, and no forces) | |
void | getSecondDerivatives (const ScalarField &n, ScalarField &e_nn, ScalarField &e_sigma, ScalarField &e_nsigma, ScalarField &e_sigmasigma, double nCut=1e-4) const |
Public Attributes | |
std::shared_ptr< OrbitalDep > | orbitalDep |
Friends | |
struct | CommandElecExCorr |
struct | CommandFluidExCorr |
struct | CommandExchangeParameters |
Exchange-Correlation energy calculator.
void ExCorr::getSecondDerivatives | ( | const ScalarField & | n, |
ScalarField & | e_nn, | ||
ScalarField & | e_sigma, | ||
ScalarField & | e_nsigma, | ||
ScalarField & | e_sigmasigma, | ||
double | nCut = 1e-4 |
||
) | const |
Compute second derivatives of energy density w.r.t n and sigma=|grad n|^2 by finite difference (supported only for spin-unpolarized internal LDAs and GGAs). All sigma derivatives will be null on output for LDAs. The gradients will be set to zero for regions with n < nCut (useful to reduce numerical sensitivity in systems with empty space)
double ExCorr::operator() | ( | const ScalarFieldArray & | n, |
ScalarFieldArray * | Vxc = 0 , |
||
IncludeTXC | includeTXC = IncludeTXC() , |
||
const ScalarFieldArray * | tau = 0 , |
||
ScalarFieldArray * | Vtau = 0 |
||
) | const |
Compute the exchange-correlation energy (and optionally gradient) for a (spin) density n. includeTXC selects which components to include in result (XC without kinetic by default). Orbital KE density tau must be provided if needsKEdensity() is true (for meta GGAs) and the corresponding gradient will be returned in Vtau if non-null For metaGGAs, Vtau should be non-null if Vxc is non-null
double ExCorr::operator() | ( | const ScalarField & | n, |
ScalarField * | Vxc = 0 , |
||
IncludeTXC | includeTXC = IncludeTXC() , |
||
const ScalarField * | tau = 0 , |
||
ScalarField * | Vtau = 0 |
||
) | const |
Compute the exchange-correlation energy (and optionally gradient) for a unpolarized density n includeTXC selects which components to include in result (XC without kinetic by default). Orbital KE density tau must be provided if needsKEdensity() is true (for meta GGAs) and the corresponding gradient will be returned in Vtau if non-null. For metaGGAs, Vtau should be non-null if Vxc is non-null