JDFTx  1.7.0

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, matrix3<> *Exc_RRT=0) const
 
double operator() (const ScalarField &n, ScalarField *Vxc=0, IncludeTXC includeTXC=IncludeTXC(), const ScalarField *tau=0, ScalarField *Vtau=0, matrix3<> *Exc_RRT=0) const
 Unpolarized wrapper to above function.
 
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, ScalarField *sigma_alt=0) const
 
void get_dVxc (const ScalarFieldArray &n, ScalarFieldArray *dVxc, IncludeTXC includeTXC, const ScalarFieldArray *tauPtr, ScalarFieldArray *Vtau, const ScalarFieldArray &dn) const
 Get change in Vxc due to change in density dn.
 
bool needFiniteDifference_dVxc () const
 

Public Attributes

std::shared_ptr< OrbitalDeporbitalDep
 

Friends

struct CommandElecExCorr
 
struct CommandFluidExCorr
 
struct CommandExchangeParameters
 

Detailed Description

Exchange-Correlation energy calculator.

Member Function Documentation

◆ getSecondDerivatives()

void ExCorr::getSecondDerivatives ( const ScalarField n,
ScalarField e_nn,
ScalarField e_sigma,
ScalarField e_nsigma,
ScalarField e_sigmasigma,
double  nCut = 1e-4,
ScalarField sigma_alt = 0 
) 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) By default, sigma will be computed from n, but this can be overridden by specifying sigma_alt.

◆ operator()()

double ExCorr::operator() ( const ScalarFieldArray n,
ScalarFieldArray Vxc = 0,
IncludeTXC  includeTXC = IncludeTXC(),
const ScalarFieldArray tau = 0,
ScalarFieldArray Vtau = 0,
matrix3<> *  Exc_RRT = 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 Optionally compute stress due to XC if Exc_RRT is non-null


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