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
 
- 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?
 
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?
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale
 
virtual Level special_level ()
 Override this change level refinement for 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 &key, const Tensor< double > &tensor) 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< 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

◆ 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 xc_functor< NDIM >::density().

◆ 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 xc_functor< NDIM >::density(), and 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.

Referenced by xc_functor< NDIM >::density().


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