MADNESS 0.10.1
xc_functor< NDIM > Class Template Reference

Functor for the exchange correlation potential. More...

Inheritance diagram for xc_functor< NDIM >:
Collaboration diagram for xc_functor< NDIM >:

Public Member Functions

 xc_functor ()
 xc_functor (std::vector< atom_information< NDIM > > atoms)
double operator() (const Vector< double, NDIM > &r) const
 returns the slater potential
Public Member Functions inherited from madness::FunctionFunctorInterface< double, NDIM >
 FunctionFunctorInterface ()
virtual ~FunctionFunctorInterface ()
virtual coeffT coeff (const keyT &) const
virtual void operator() (const Vector< double *, 1 > &, double *, int) const
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values?
virtual bool screened (const Vector< double, NDIM > &, const Vector< double, NDIM > &) const
 Can we screen this function based on the bounding box information?
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale
virtual Level special_level () const
 Override this to change the minimum level of refinement at special points (default is 6).
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply.
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()?
virtual coeffT values (const keyT &, const Tensor< double > &) const

Private Member Functions

double density (const Vector< double, NDIM > &r) const
 forms the density
double get_distance (Vector< double, NDIM > elec, Vector< double, NDIM > nuc) const
 computes distance between coordinate of electron and coordinate of nucleus
double xc_potential (const Vector< double, NDIM > &r) const
 equation for the slater potential

Private Attributes

std::vector< atom_information< NDIM > > atoms
 Needed information about the molecule to apply asymtotic correction.

Additional Inherited Members

Public Types inherited from madness::FunctionFunctorInterface< double, NDIM >
typedef GenTensor< double > coeffT
typedef Key< NDIM > keyT
typedef double value_type
Public Attributes inherited from madness::FunctionFunctorInterface< double, NDIM >
Level special_level_

Detailed Description

template<unsigned long int NDIM>
class xc_functor< NDIM >

Functor for the exchange correlation potential.

Asymptotic correction for DFT. In the correction the xc-potential is replaced by an 1/r term far away from the nuclei to give the correct asymptotic behavior. Close to the nuclei the standard xc-potential is used. The transition between the different potentials is achieved via a linear interpolation. This is a test code to compute the corrected potential in 1D or 2D. The density functional is computed using the slater potential. The orbitals have to be inserted manually in the xc_functor class in the density() function. The molecule/atom has to be initialized manually in the main function and has to be stored as a vector of atom_information.

Constructor & Destructor Documentation

◆ xc_functor() [1/2]

template<unsigned long int NDIM>
xc_functor< NDIM >::xc_functor ( )
inline

◆ xc_functor() [2/2]

template<unsigned long int NDIM>
xc_functor< NDIM >::xc_functor ( std::vector< atom_information< NDIM > > atoms)
inline

References atoms.

Member Function Documentation

◆ density()

template<unsigned long int NDIM>
double xc_functor< NDIM >::density ( const Vector< double, NDIM > & r) const
inlineprivate

forms the density

References atoms, density(), and get_distance().

Referenced by density(), and xc_potential().

◆ get_distance()

template<unsigned long int NDIM>
double xc_functor< NDIM >::get_distance ( Vector< double, NDIM > elec,
Vector< double, NDIM > nuc ) const
inlineprivate

computes distance between coordinate of electron and coordinate of nucleus

References madness::distance(), and NDIM.

Referenced by density().

◆ operator()()

template<unsigned long int NDIM>
double xc_functor< NDIM >::operator() ( const Vector< double, NDIM > & r) const
inline

returns the slater potential

References xc_potential().

◆ xc_potential()

template<unsigned long int NDIM>
double xc_functor< NDIM >::xc_potential ( const Vector< double, NDIM > & r) const
inlineprivate

equation for the slater potential

References density(), and pow().

Referenced by operator()().

Member Data Documentation

◆ atoms

template<unsigned long int NDIM>
std::vector<atom_information<NDIM> > xc_functor< NDIM >::atoms
private

Needed information about the molecule to apply asymtotic correction.

Referenced by xc_functor(), and density().


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