MADNESS 0.10.1
lda.h File Reference
#include <madness/mra/mra.h>
#include <madness/world/MADworld.h>
#include <math.h>
#include <madness/madness_config.h>
#include <cmath>
Include dependency graph for lda.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define max(a, b)

Typedefs

typedef double doublereal
typedef MADNESS_FORINT integer
typedef int logical

Functions

int c_rks_vwn5__ (const double *r__, double *f, double *dfdra)
int c_uks_vwn5__ (double *ra, double *rb, double *f, double *dfdra, double *dfdrb)
template<int NDIM>
void dft_xc_lda_ene (const Key< NDIM > &key, Tensor< double > &t)
template<int NDIM>
void dft_xc_lda_V (const Key< NDIM > &key, Tensor< double > &t)
static double pow (const double *a, const double *b)
int rks_c_vwn5__ (integer *ideriv, integer *npt, doublereal *rhoa1, doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa, doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa, doublereal *v2sigmaaa2)
int rks_x_lda__ (integer *ideriv, integer *npt, doublereal *rhoa1, doublereal *sigmaaa1, doublereal *zk, doublereal *vrhoa, doublereal *vsigmaaa, doublereal *v2rhoa2, doublereal *v2rhoasigmaaa, doublereal *v2sigmaaa2)
void wst_munge_grho (int npoint, double *rho, double *grho)
void wst_munge_rho (int npoint, double *rho)
int x_rks_s__ (const double *r__, double *f, double *dfdra)
int x_uks_s__ (double *ra, double *rb, double *f, double *dfdra, double *dfdrb)
void xc_rks_generic_lda (Tensor< double > rho_alpha, Tensor< double > f, Tensor< double > df_drho)

Variables

static double c_b14 = 1.333333333333333333333333333333
static double c_b2 = .333333333333333333333333333333333
static double c_b7 = .333333333333333333333333333333
static double c_b8 = .5
const double THRESH_GRHO = 1e-20
const double THRESH_RHO = 1e-8

Macro Definition Documentation

◆ max

Typedef Documentation

◆ doublereal

typedef double doublereal

◆ integer

typedef MADNESS_FORINT integer

◆ logical

typedef int logical

Function Documentation

◆ c_rks_vwn5__()

int c_rks_vwn5__ ( const double * r__,
double * f,
double * dfdra )
inline

References a2, c_b7, c_b8, f, and pow().

Referenced by ldaeop(), and ldaop().

◆ c_uks_vwn5__()

int c_uks_vwn5__ ( double * ra,
double * rb,
double * f,
double * dfdra,
double * dfdrb )
inline

References a1, a2, c_b14, c_b7, f, f1, f2, f3, pow(), ss1, v, and zeta.

◆ dft_xc_lda_ene()

template<int NDIM>
void dft_xc_lda_ene ( const Key< NDIM > & key,
Tensor< double > & t )
inline

References copy(), V(), and xc_rks_generic_lda().

◆ dft_xc_lda_V()

template<int NDIM>
void dft_xc_lda_V ( const Key< NDIM > & key,
Tensor< double > & t )
inline

References copy(), V(), and xc_rks_generic_lda().

◆ pow()

double pow ( const double * a,
const double * b )
inlinestatic

References a, b, and pow().

Referenced by madness::F12Potentials::F12Potentials(), GaussianPotential::GaussianPotential(), refpotfunctor::refpotfunctor(), A(), A2(), madness::FunctionImpl< T, NDIM >::add_scalar_inplace(), apply_potential(), madness::Specialbox_op< T, NDIM >::box_is_at_boundary(), madness::GFit< T, NDIM >::bsh_fit_ndim(), madness::GFit< T, NDIM >::bsh_spherical_moments(), bshrel_OMEGA(), c_rks_vwn5__(), madness::c_rks_vwn5__(), c_uks_vwn5__(), madness::c_uks_vwn5__(), charge_function(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionCommonFunctionality< T, NDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::coeffs2values(), madness::FunctionImpl< T, LDIM >::coeffs2values(), madness::guessfactory::PolynomialFunctor::compute_value(), madness::guessfactory::PolynomialTrigonometricsFunctor::compute_value(), converge(), convg(), madness::FunctionImpl< T, LDIM >::do_binary_op(), madness::Derivative< double, 1 >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), madness::FunctionImpl< T, LDIM >::do_mul(), Ebar(), Ebark(), madness::FunctionImpl< T, LDIM >::err_box(), errsq(), madness::SeparatedConvolution< double, 3 >::estimate_costs(), fit(), function(), fxexact(), fyexact(), fzexact(), madness::BandlimitedPropagator::g0_filtered(), madness::smooth< T, NDIM >::gauss_norm(), gaussian_3d(), madness::GFit< T, NDIM >::gaussian_spherical_moments(), gdiffuse_000_func3d(), gdiffuse_001_func3d(), gdiffuse_00m1_func3d(), madness::smooth< T, NDIM >::get_density_thresh(), gradPbarA(), gtight_000_func3d(), gtight_00m1_func3d(), madness::Derivative< double, 1 >::initCoefficients(), madness::FunctionImpl< T, LDIM >::inner_ext_recursive(), madness::GaussianConvolution1D< Q >::issmall(), kth_moment_func3d(), logplot(), main(), main(), make_grad_operator(), make_operator(), madness::FunctionImpl< T, LDIM >::mul(), ContractedGaussianShell::normalize(), madness::ContractedGaussianShell::normalize(), madness::FunctionImpl< T, LDIM >::NScoeffs2values(), nuc_func(), nuclear_charge_function(), G::operator()(), GConvGNP::operator()(), GConvGRNP::operator()(), Guess::operator()(), GygiPot::Pow< T, DIM >::operator()(), GygiPot::Pow_beta_one< T, DIM >::operator()(), madness::apply_kernel_helper::slater_kernel::operator()(), madness::BasisFunctions::CartesianGaussian::operator()(), madness::BasisFunctions::SolidHarmonicGaussian::operator()(), madness::FermiNuclearDensityFunctor::operator()(), madness::FunctionImpl< T, NDIM >::do_unary_op_value_inplace< opT >::operator()(), madness::GaussianNuclearDensityPotentialFunctor::operator()(), madness::slater_kernel::operator()(), PotentialBasisFunctor::operator()(), QMtest::operator()(), uexact::operator()(), uexact::operator()(), Uop::operator()(), optimize_coeffs(), madness::FunctionImpl< T, NDIM >::parent_to_child(), PbarA(), madness::PeriodicBSHOp(), madness::PeriodicBSHOpPtr(), madness::PeriodicCoulombOp(), madness::PeriodicCoulombOpPtr(), madness::FunctionImpl< T, NDIM >::phi_for_mul(), plot(), pow(), slymer::PrimitiveGaussian(), madness::GFit< T, NDIM >::print_accuracy(), madness::FunctionImpl< T, NDIM >::project(), random_gaussian(), RandomGaussian(), rho_function(), rho_gaussian_func3d(), madness::Convolution1D< double_complex >::rnlij(), madness::GaussianConvolution1D< Q >::rnlp(), s_13_4177_0(), madness::GFit< T, NDIM >::slater_fit(), madness::smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), smoothing_parameter(), madness::SmoothingOperator(), madness::SmoothingOperator3D(), test(), madness::smooth< T, NDIM >::test_1d(), test_apply_push_1d(), test_basic(), test_bsh(), test_conv(), test_coulomb(), test_diff(), madness::OptimizationTargetInterface::test_gradient(), OptimizationTargetInterface::test_gradient(), test_io(), test_math(), test_op(), test_opdir(), test_periodic(), test_periodic1(), test_plot(), test_proj(), madness::test_rnlij_rangelimited(), madness::test_rnlp_rangelimited(), madness::test_rnlp_rangelimited_erf(), test_xc1(), madness::FunctionImpl< T, NDIM >::trace_local(), madness::FunctionImpl< T, NDIM >::truncate_tol(), uexact(), uinitial(), uinitial(), updatex(), GaussianGuess< T, NDIM >::val(), Fred::value_and_gradient(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionCommonFunctionality< T, NDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2coeffs(), madness::FunctionImpl< T, LDIM >::values2NScoeffs(), Vdynamic(), madness::x_rks_s__(), x_rks_s__(), madness::x_uks_s__(), x_uks_s__(), and xc_functor< NDIM >::xc_potential().

◆ rks_c_vwn5__()

int rks_c_vwn5__ ( integer * ideriv,
integer * npt,
doublereal * rhoa1,
doublereal * sigmaaa1,
doublereal * zk,
doublereal * vrhoa,
doublereal * vsigmaaa,
doublereal * v2rhoa2,
doublereal * v2rhoasigmaaa,
doublereal * v2sigmaaa2 )
inline

References c_b2, e(), and max.

Referenced by xc_rks_generic_lda().

◆ rks_x_lda__()

int rks_x_lda__ ( integer * ideriv,
integer * npt,
doublereal * rhoa1,
doublereal * sigmaaa1,
doublereal * zk,
doublereal * vrhoa,
doublereal * vsigmaaa,
doublereal * v2rhoa2,
doublereal * v2rhoasigmaaa,
doublereal * v2sigmaaa2 )
inline

References c_b2, e(), and max.

Referenced by xc_rks_generic_lda().

◆ wst_munge_grho()

void wst_munge_grho ( int npoint,
double * rho,
double * grho )
inline

References THRESH_GRHO, and THRESH_RHO.

◆ wst_munge_rho()

void wst_munge_rho ( int npoint,
double * rho )
inline

References THRESH_RHO.

Referenced by xc_rks_generic_lda().

◆ x_rks_s__()

int x_rks_s__ ( const double * r__,
double * f,
double * dfdra )
inline

References c_b2, f, and pow().

Referenced by ldaeop(), and ldaop().

◆ x_uks_s__()

int x_uks_s__ ( double * ra,
double * rb,
double * f,
double * dfdra,
double * dfdrb )
inline

References c_b2, f, and pow().

◆ xc_rks_generic_lda()

void xc_rks_generic_lda ( Tensor< double > rho_alpha,
Tensor< double > f,
Tensor< double > df_drho )
inline
Parameters
rho_alphaAlpha-spin density at each grid point
fValue of functional at each grid point
df_drhoDerivative of functional w.r.t. rho_alpha

References f, Tensor< T >::fill(), Tensor< T >::flat(), Tensor< T >::gaxpy(), MADNESS_ASSERT, Tensor< T >::ptr(), rks_c_vwn5__(), rks_x_lda__(), and wst_munge_rho().

Referenced by dft_xc_lda_ene(), and dft_xc_lda_V().

Variable Documentation

◆ c_b14

double c_b14 = 1.333333333333333333333333333333
static

Referenced by c_uks_vwn5__().

◆ c_b2

double c_b2 = .333333333333333333333333333333333
static

◆ c_b7

double c_b7 = .333333333333333333333333333333
static

Referenced by c_rks_vwn5__(), and c_uks_vwn5__().

◆ c_b8

double c_b8 = .5
static

Referenced by c_rks_vwn5__().

◆ THRESH_GRHO

const double THRESH_GRHO = 1e-20

Referenced by wst_munge_grho().

◆ THRESH_RHO

const double THRESH_RHO = 1e-8

Referenced by wst_munge_grho(), and wst_munge_rho().