|
MADNESS 0.10.1
|
ABC for the nuclear correlation factors. More...
#include <correlationfactor.h>


Classes | |
| class | R_functor |
| class | RX_functor |
| compute the derivative of R wrt the displacement of atom A, coord axis More... | |
| class | square_times_V_derivative_functor |
| class | square_times_V_functor |
| class | U1_atomic_functor |
| U1 functor for a specific atom. More... | |
| class | U1_dot_U1_functor |
| functor for a local U1 dot U1 potential More... | |
| class | U1_functor |
| functor for the local part of the U1 potential – NOTE THE SIGN More... | |
| class | U1X_functor |
| compute the derivative of U1 wrt the displacement of atom A, coord axis More... | |
| class | U2_atomic_functor |
| U2 functor for a specific atom. More... | |
| class | U2_functor |
| class | U2X_functor |
| compute the derivative of U2 wrt the displacement of atom A More... | |
| class | U3_atomic_functor |
| U3 functor for a specific atom. More... | |
| class | U3_functor |
| class | U3X_functor |
| compute the derivative of U3 wrt the displacement of atom A, coord axis More... | |
Public Types | |
| enum | corrfactype { None , GradientalGaussSlater , GaussSlater , LinearSlater , Polynomial , Slater , poly4erfc , Two , Adhoc } |
| typedef std::shared_ptr< FunctionFunctorInterface< double, 3 > > | functorT |
Public Member Functions | |
| NuclearCorrelationFactor (World &world, const Molecule &mol) | |
| ctor | |
| virtual | ~NuclearCorrelationFactor () |
| virtual destructor | |
| const std::vector< size_t > & | all_atoms () const |
| indices of all atoms | |
| virtual real_function_3d | apply_U (const real_function_3d &rhs) const |
| apply the regularized potential U_nuc on a given function rhs | |
| std::vector< size_t > | atoms_near (const double *x, const double *y, const double *z, const int npts) const |
| atoms whose screening sphere meets the bounding sphere of a set of points | |
| coord_3d | dsmoothed_unitvec (const coord_3d &xyz, const int axis, double smoothing=0.0) const |
| derivative of smoothed unit vector wrt the electronic coordinate | |
| virtual real_function_3d | function () const |
| return the nuclear correlation factor | |
| void | initialize (const double vtol1) |
| initialize the regularized potentials U1 and U2 | |
| virtual real_function_3d | inverse () const |
| return the inverse nuclear correlation factor | |
| virtual double | screening_radius (const double) const |
| distance from nucleus A beyond which its contributions to the functors are negligible | |
| coord_3d | smoothed_unitvec (const coord_3d &xyz, double smoothing=0.0) const |
| smoothed unit vector for the computation of the U1 potential | |
| virtual real_function_3d | square () const |
| return the square of the nuclear correlation factor | |
| virtual real_function_3d | square_times_V_derivative (const int iatom, const int axis) const |
| virtual double | Sr_div_S (const double &r, const double &Z) const =0 |
| virtual double | Srr_div_S (const double &r, const double &Z) const =0 |
| virtual double | Srrr_div_S (const double &r, const double &Z) const =0 |
| virtual corrfactype | type () const =0 |
| virtual const real_function_3d | U1 (const int axis) const |
| return the U1 term of the correlation function | |
| std::vector< real_function_3d > | U1vec () const |
| return the U1 functions in a vector | |
| virtual const real_function_3d | U2 () const |
| return the U2 term of the correlation function | |
| virtual double | U2X_spherical (const double &r, const double &Z, const double &rcut) const |
| derivative of the U2 potential wrt nuclear coordinate X (spherical part) | |
Static Public Attributes | |
| static constexpr int | ncf_special_level =15 |
| projection depth of the factor's functions at the nuclei | |
Protected Attributes | |
| std::vector< real_function_3d > | U1_function |
| the three components of the U1 potential | |
| real_function_3d | U2_function |
| the purely local U2 potential, having absorbed the nuclear pot V_nuc | |
Private Member Functions | |
| virtual double | S (const double &r, const double &Z) const =0 |
| the correlation factor S wrt a given atom | |
| virtual coord_3d | Sp (const coord_3d &vr1A, const double &Z) const =0 |
| the partial derivative of correlation factor S' wrt the cartesian coordinates | |
| virtual double | Spp_div_S (const double &r, const double &Z) const =0 |
| the regularized potential wrt a given atom wrt the cartesian coordinate | |
Private Attributes | |
| std::vector< size_t > | all_atoms_ |
| double | eprec |
| smoothing of the potential/step function | |
| const Molecule & | molecule |
| the molecule | |
| double | vtol |
| the threshold for initial projection | |
| World & | world |
| the world | |
ABC for the nuclear correlation factors.
| typedef std::shared_ptr< FunctionFunctorInterface<double,3> > madness::NuclearCorrelationFactor::functorT |
|
inline |
ctor
| [in] | world | the world |
| [in] | mol | molecule with the sites of the nuclei |
References all_atoms_, eprec, molecule, vtol, and world.
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), madness::GaussSlater::GaussSlater(), madness::GradientalGaussSlater::GradientalGaussSlater(), madness::LinearSlater::LinearSlater(), madness::poly4erfc::poly4erfc(), madness::Polynomial< N >::Polynomial(), madness::PseudoNuclearCorrelationFactor::PseudoNuclearCorrelationFactor(), madness::NuclearCorrelationFactor::R_functor::R_functor(), madness::NuclearCorrelationFactor::RX_functor::RX_functor(), madness::NuclearCorrelationFactor::RX_functor::RX_functor(), madness::Slater::Slater(), madness::NuclearCorrelationFactor::square_times_V_derivative_functor::square_times_V_derivative_functor(), madness::NuclearCorrelationFactor::square_times_V_functor::square_times_V_functor(), madness::NuclearCorrelationFactor::U1_atomic_functor::U1_atomic_functor(), madness::NuclearCorrelationFactor::U1_dot_U1_functor::U1_dot_U1_functor(), madness::NuclearCorrelationFactor::U1_functor::U1_functor(), madness::NuclearCorrelationFactor::U1X_functor::U1X_functor(), madness::NuclearCorrelationFactor::U1X_functor::U1X_functor(), madness::NuclearCorrelationFactor::U2_atomic_functor::U2_atomic_functor(), madness::NuclearCorrelationFactor::U2_functor::U2_functor(), madness::NuclearCorrelationFactor::U2X_functor::U2X_functor(), madness::NuclearCorrelationFactor::U3_atomic_functor::U3_atomic_functor(), madness::NuclearCorrelationFactor::U3_functor::U3_functor(), and madness::NuclearCorrelationFactor::U3X_functor::U3X_functor().
|
inlinevirtual |
virtual destructor
|
inline |
indices of all atoms
References all_atoms_.
|
inlinevirtual |
apply the regularized potential U_nuc on a given function rhs
Reimplemented in madness::PseudoNuclearCorrelationFactor.
References axis, madness::Function< T, NDIM >::compress(), D, madness::free_space_derivative(), madness::Function< T, NDIM >::truncate(), madness::truncate(), U1(), U2(), and world.
|
inline |
atoms whose screening sphere meets the bounding sphere of a set of points
The projection hands a functor all quadrature points of one box at once; an atom screened out here is beyond its screening radius at every one of them.
References d, madness::Atom::get_coords(), lo, molecule, madness::Vector< T, N >::normf(), npts, p(), madness::Atom::q, and screening_radius().
|
inline |
derivative of smoothed unit vector wrt the electronic coordinate
note the sign change for exchanging nuclear and electronic coordinates
![\[ \frac{\partial \vec n}{\partial x} = -\frac{\partial \vec n}{\partial X}
\]](form_284.png)
the derivative wrt x is given by
![\[\frac{\partial\vec n}{\partial x} =
\left\{\frac{\left(r^2-x^2\right) \mathrm{erf}\left(\frac{r}{s}\right)}{r^3}
+\frac{2 x^2 e^{-\frac{r^2}{s^2}}}{\sqrt{\pi } r^2 s},
x y \left(\frac{2 e^{-\frac{r^2}{s^2}}}{\sqrt{\pi } r^2 s}
-\frac{\mathrm{erf}\left(\frac{r}{s}\right)}{r^3}\right),
x z \left(\frac{2 e^{-\frac{r^2}{s^2}}}{\sqrt{\pi } r^2 s}
-\frac{\mathrm{erf}\left(\frac{r}{s}\right)}{r^3}\right)\right\}
\]](form_285.png)
References axis, eprec, madness::Vector< T, N >::normf(), p(), madness::constants::pi, and madness::r2().
|
inlinevirtual |
return the nuclear correlation factor
References madness::FunctionFactory< T, NDIM >::functor(), ncf_special_level, madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::truncate_on_project(), vtol, and world.
|
inline |
initialize the regularized potentials U1 and U2
References axis, madness::FunctionDefaults< NDIM >::special_level, madness::FunctionDefaults< NDIM >::thresh, madness::FunctionDefaults< NDIM >::truncate_on_project, madness::FunctionFactory< T, NDIM >::functor(), madness::FunctionDefaults< NDIM >::get_thresh(), ncf_special_level, madness::Function< T, NDIM >::set_thresh(), madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::truncate_on_project(), U1_function, U2_function, vtol, and world.
|
inlinevirtual |
return the inverse nuclear correlation factor
References madness::FunctionFactory< T, NDIM >::functor(), ncf_special_level, madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::truncate_on_project(), vtol, and world.
|
privatepure virtual |
the correlation factor S wrt a given atom
| [in] | r | the distance of the req'd coord to the nucleus |
| [in] | Z | the nuclear charge |
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
|
inlinevirtual |
distance from nucleus A beyond which its contributions to the functors are negligible
A factor that returns a finite radius guarantees that beyond it S_A - 1 and S'_A/S_A are below ~1e-14 relative to their magnitude at the nucleus, and that S''_A/S_A equals the Coulomb tail -Z_A/r to the same accuracy. Infinite (the default) keeps every atom in every term.
Reimplemented in madness::Slater.
Referenced by atoms_near().
|
inline |
smoothed unit vector for the computation of the U1 potential
note the identity for exchanging nuclear and electronic coordinates (there is a sign change, unlike for the smoothed potential)
![\[ \vec n = \frac{\partial \rho}{\partial x} = -\frac{\partial \rho}{\partial X}
\]](form_282.png)
![\[\vec n = \left\{\frac{x \mathrm{erf}\left(\frac{r}{s}\right)}{r},
\frac{y \mathrm{erf}\left(\frac{r}{s}\right)}{r},
\frac{z \mathrm{erf}\left(\frac{r}{s}\right)}{r}\right\}
\]](form_283.png)
References eprec, molecule, madness::Vector< T, N >::normf(), madness::constants::pi, and xi.
Referenced by madness::GaussSlater::Sp(), madness::GradientalGaussSlater::Sp(), madness::LinearSlater::Sp(), madness::poly4erfc::Sp(), madness::Polynomial< N >::Sp(), and madness::Slater::Sp().
|
privatepure virtual |
the partial derivative of correlation factor S' wrt the cartesian coordinates
| [in] | vr1A | the vector of the req'd coord to the nucleus |
| [in] | Z | the nuclear charge |
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
|
privatepure virtual |
the regularized potential wrt a given atom wrt the cartesian coordinate
S" is the Cartesian Laplacian applied on the NCF. Note the difference to Srr_div_S, which is the second derivative wrt the distance rho. this is: -S"/S - Z/r
| [in] | r | the distance of the req'd coord to the nucleus |
| [in] | Z | the nuclear charge |
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
|
inlinevirtual |
return the square of the nuclear correlation factor
References madness::FunctionFactory< T, NDIM >::functor(), ncf_special_level, R2, madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::truncate_on_project(), vtol, and world.
|
inlinevirtual |
return the square of the nuclear correlation factor multiplied with the derivative of the nuclear potential for the specified atom
References axis, madness::func(), madness::FunctionFactory< T, NDIM >::functor(), molecule, ncf_special_level, R2, madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::truncate_on_project(), vtol, and world.
|
pure virtual |
first derivative of the NCF with respect to the relative distance rho
![\[ \frac{\partial S(\rho)}{\partial \rho} \frac{1}{S(\rho)}
\]](form_276.png)
where the distance of the electron to the nucleus A is given by
![\[ \rho = |\vec r - \vec R_A |
\]](form_277.png)
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
Referenced by madness::GaussSlater::U2X_spherical(), madness::GradientalGaussSlater::U2X_spherical(), madness::Polynomial< N >::U2X_spherical(), and madness::Slater::U2X_spherical().
|
pure virtual |
second derivative of the NCF with respect to the relative distance rho
![\[ \frac{\partial^2 S(\rho)}{\partial \rho^2} \frac{1}{S(\rho)}
\]](form_278.png)
where the distance of the electron to the nucleus A is given by
![\[ \rho = |\vec r - \vec R_A |
\]](form_277.png)
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
Referenced by madness::GaussSlater::U2X_spherical(), madness::GradientalGaussSlater::U2X_spherical(), madness::Polynomial< N >::U2X_spherical(), and madness::Slater::U2X_spherical().
|
pure virtual |
third derivative of the NCF with respect to the relative distance rho
![\[ \frac{\partial^3 S(\rho)}{\partial \rho^3} \frac{1}{S(\rho)}
\]](form_279.png)
where the distance of the electron to the nucleus A is given by
![\[ \rho = |\vec r - \vec R_A |
\]](form_277.png)
Implemented in madness::AdhocNuclearCorrelationFactor, madness::GaussSlater, madness::GradientalGaussSlater, madness::LinearSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References Z.
Referenced by madness::GaussSlater::U2X_spherical(), madness::GradientalGaussSlater::U2X_spherical(), madness::Polynomial< N >::U2X_spherical(), and madness::Slater::U2X_spherical().
|
pure virtual |
|
inlinevirtual |
return the U1 term of the correlation function
References axis, and U1_function.
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), and apply_U().
|
inline |
return the U1 functions in a vector
References U1_function.
|
inlinevirtual |
return the U2 term of the correlation function
Reimplemented in madness::PseudoNuclearCorrelationFactor.
References U2_function.
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), and apply_U().
|
inlinevirtual |
derivative of the U2 potential wrt nuclear coordinate X (spherical part)
need to reimplement this for all derived classes due to the range for r -> 0, where the singular terms cancel. With
![\[ \rho = \left| \vec r- \vec R_A \right|
\]](form_280.png)
returns the term in the parenthesis without the the derivative of rho
![\[\frac{\partial U_2}{\partial X_A} = \frac{\partial \rho}{\partial X}
\left(-\frac{1}{2}\frac{S''' S - S'' S'}{S^2} + \frac{1}{\rho^2}\frac{S'}{S}
- \frac{1}{\rho} \frac{S''S - S'^2}{S^2} + \frac{Z_A}{\rho^2}\right)
\]](form_281.png)
Reimplemented in madness::GaussSlater, madness::GradientalGaussSlater, madness::poly4erfc, madness::Polynomial< N >, madness::PseudoNuclearCorrelationFactor, and madness::Slater.
References MADNESS_EXCEPTION, madness::print(), rcut, world, and Z.
|
private |
Referenced by NuclearCorrelationFactor(), and all_atoms().
|
private |
smoothing of the potential/step function
Referenced by NuclearCorrelationFactor(), dsmoothed_unitvec(), and smoothed_unitvec().
|
private |
|
staticconstexpr |
projection depth of the factor's functions at the nuclei
The functors' default (6) can miss the exp(-a Z r) features, of width 1/(aZ), at a loose threshold for Z above ~30: on NBr3 and PBr3 the k6 rung then starts hundreds of hartree off and never converges. 15 is what the nuclear-potential functors use (potentialmanager.h); it costs seconds per rung.
Referenced by madness::NemoBase::construct_nuclear_correlation_factor(), function(), initialize(), inverse(), square(), and square_times_V_derivative().
|
protected |
the three components of the U1 potential
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), initialize(), U1(), and U1vec().
|
protected |
the purely local U2 potential, having absorbed the nuclear pot V_nuc
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), initialize(), and U2().
|
private |
the threshold for initial projection
Referenced by NuclearCorrelationFactor(), function(), initialize(), inverse(), square(), and square_times_V_derivative().
|
private |
the world
Referenced by madness::AdhocNuclearCorrelationFactor::AdhocNuclearCorrelationFactor(), madness::GaussSlater::GaussSlater(), madness::GradientalGaussSlater::GradientalGaussSlater(), madness::LinearSlater::LinearSlater(), NuclearCorrelationFactor(), madness::poly4erfc::poly4erfc(), madness::Polynomial< N >::Polynomial(), madness::PseudoNuclearCorrelationFactor::PseudoNuclearCorrelationFactor(), madness::Slater::Slater(), apply_U(), function(), initialize(), inverse(), square(), square_times_V_derivative(), and U2X_spherical().