MADNESS  0.10.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
xc_functor< NDIM > Class Template Reference

Functor for the exchange correlation potential. More...

Inheritance diagram for xc_functor< NDIM >:
Inheritance graph
[legend]
Collaboration diagram for xc_functor< NDIM >:
Collaboration graph
[legend]

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 More...
 
- 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 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, double *fvals, int npts) const
 
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
virtual bool screened (const Vector< double, NDIM > &c1, const Vector< double, NDIM > &c2) const
 Can we screen this function based on the bounding box information? More...
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale More...
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6) More...
 
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply. More...
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()? More...
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from madness::FunctionFunctorInterface< double, NDIM >
typedef GenTensor< double > coeffT
 
typedef Key< NDIMkeyT
 
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

Member Function Documentation

◆ density()

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

forms the density

◆ 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.

◆ operator()()

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

returns the slater potential

Implements madness::FunctionFunctorInterface< double, NDIM >.

◆ 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 pow().

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.


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