15 #ifndef __Basis_gaussian_h__
16 #define __Basis_gaussian_h__
18 #include <forward_list>
35 fxxx,
fxxy,
fxxz,
fxyy,
fxyz,
fxzz,
fyyy,
fyyz,
fyzz,
fzzz,
59 hm5,
hm4,
hm3,
hm2,
hm1,
hzero,
hp1,
hp2,
hp3,
hp4,
hp5
64 class GaussianFunction;
99 using CF = std::tuple<PolynomialCoeffs, std::array<double, 3>, std::array<double, 3>, std::array<std::array<double, 3>, 3>>;
120 const std::array<double, 3> ¢er,
const double ec);
141 double operator() (
const std::array<double, 3> &x)
const;
171 using TermT = std::pair<double, PrimitiveGaussian>;
183 [eps](
const TermT &t) {
222 const std::vector<double> &
expcoeff,
const std::vector<double> &coeff);
243 virtual double operator() (
const std::array<double, 3> &x)
const override;
252 return operator()(std::array<double, 3>{{r[0], r[1], r[2]}});
285 return *
this + (-rhs);
358 return (*
this) * (1./rhs);
397 const double log10 = std::log(10.0);
398 const double log2 = std::log(2.0);
401 const double a = expnt*
L*
L;
403 const double fac = 100.0;
404 double n = std::log(
a/(4*
K*
K*(
N*log10+std::log(fac))))/(2*log2);
405 return (n < 2 ? 2.0 : std::ceil(n)+1);
static double get_cell_min_width()
Returns the minimum width of any user cell dimension.
Definition: funcdefaults.h:478
Abstract base class interface required for functors used as input to Functions.
Definition: function_interface.h:68
Abstract base class for generic basis functions.
Definition: basis.h:25
A Gaussian basis function used by chemistry electronic structure codes.
Definition: gaussian.h:167
GaussianFunction operator-(const GaussianFunction &rhs) const
Subtract a GaussianFunction from this one, returning the difference.
Definition: gaussian.h:284
GaussianFunction operator*(const double rhs) const
Multiply the GaussianFunction by a scalar.
Definition: gaussian.h:324
virtual double operator()(const std::array< double, 3 > &x) const override
Evaluate the Gaussian function at the specified point.
Definition: madness/chem/gaussian.cc:1406
std::forward_list< TermT > terms
The list of terms in the sum of Gaussian primitives.
Definition: gaussian.h:174
GaussianFunction operator+(const GaussianFunction &rhs) const
Add two GaussianFunction objects, resulting in a new one.
Definition: madness/chem/gaussian.cc:1422
GaussianFunction & operator+=(const GaussianFunction &rhs)
Add a GaussianFunction to this GaussianFunction.
Definition: madness/chem/gaussian.cc:1430
GaussianFunction & operator*=(const double rhs)
Multiply the GaussianFunction by a scalar.
Definition: madness/chem/gaussian.cc:1440
GaussianFunction(const GaussianType type, const std::array< double, 3 > ¢er, const double expcoeff)
Create an uncontracted Gaussian orbital (shortcut to the more general constructor for Gaussian orbita...
Definition: gaussian.h:233
GaussianFunction & operator-=(const GaussianFunction &rhs)
Subtract a GaussianFunction from this one.
Definition: gaussian.h:294
GaussianFunction & operator*=(const GaussianFunction &rhs)
Multiply the GaussianFunction by another.
Definition: gaussian.h:312
void removeSmallTerms(const double eps=1.e-6)
Removes terms with very small linear expansion coefficients.
Definition: gaussian.h:181
std::array< double, 3 > center
The center of the gaussian.
Definition: gaussian.h:192
std::pair< double, PrimitiveGaussian > TermT
Helper class for storing terms in the sum of Gaussian primitives.
Definition: gaussian.h:171
GaussianFunction operator-() const
Additive inverse of the GaussianFunction (deep copy).
Definition: madness/chem/gaussian.cc:1413
GaussianFunction()
Default constructor: Make the function 0.
Definition: gaussian.h:198
std::vector< double > expcoeff
The exponent coefficients.
Definition: gaussian.h:195
GaussianFunction operator/(const double rhs) const
Divide the GaussianFunction by a scalar.
Definition: gaussian.h:357
GaussianFunction & operator/=(const double rhs)
Divide the GaussianFunction by a scalar.
Definition: gaussian.h:346
Definition: gaussian.h:376
double operator()(const madness::coord_3d &r) const
Definition: gaussian.h:383
GaussianFunction func
Definition: gaussian.h:378
std::vector< madness::coord_3d > special_points() const
Override this to return list of special points to be refined more deeply.
Definition: gaussian.h:387
Gaussian_Functor(GaussianFunction func, std::vector< madness::coord_3d > centers)
Definition: gaussian.h:381
madness::Level special_level()
Override this change level refinement for special points (default is 6)
Definition: gaussian.h:391
std::vector< madness::coord_3d > centers
Definition: gaussian.h:379
Array for storing coefficients of a polynomial of three variables with specified degree.
Definition: polynomial.h:35
A primitive Gaussian function.
Definition: gaussian.h:82
PrimitiveGaussian()
Default constructor: Make the function 1 ( , ).
Definition: gaussian.h:103
PolynomialCoeffs exppoly
Coefficients in the exponent's quadratic function.
Definition: gaussian.h:89
std::tuple< PolynomialCoeffs, std::array< double, 3 >, std::array< double, 3 >, std::array< std::array< double, 3 >, 3 > > CF
Return type for the function's canonical form.
Definition: gaussian.h:99
PrimitiveGaussian operator*(const PrimitiveGaussian &rhs) const
Multiply two primitive Gaussians. The result is another.
Definition: madness/chem/gaussian.cc:1368
double operator()(const std::array< double, 3 > &x) const
Evaluate the Gaussian primitive at the specified point.
Definition: madness/chem/gaussian.cc:1364
PolynomialCoeffs prefactor
Polynomial prefactor ( in the class description).
Definition: gaussian.h:86
Defines common mathematical and physical constants.
vecfuncT K(vecfuncT &ket, vecfuncT &bra, vecfuncT &vf)
Main include file for MADNESS and defines Function interface.
int Level
Definition: key.h:55
std::string type(const PairType &n)
Definition: PNOParameters.h:18
GaussianType
Implemented types of Gaussian orbitals (from quantum chemistry codes).
Definition: gaussian.h:29
GaussianFunction operator*(const double lhs, const GaussianFunction &rhs)
Multiply a GaussianFunction by a scalar.
Definition: gaussian.h:372
static long abs(long a)
Definition: tensor.h:218
static const double a
Definition: nonlinschro.cc:118
static const double L
Definition: rk.cc:46
#define N
Definition: testconv.cc:37