|
MADNESS 0.10.1
|
A Gaussian basis function used by chemistry electronic structure codes. More...
#include <gaussian.h>


Public Member Functions | |
| GaussianFunction () | |
| Default constructor: Make the function 0. | |
| 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 orbitals). | |
| GaussianFunction (const GaussianType type, const std::array< double, 3 > ¢er, const std::vector< double > &expcoeff, const std::vector< double > &coeff) | |
| Create a Gaussian orbital (uncontracted or contracted) from quantum chemistry codes. | |
| double | operator() (const madness::coord_3d &r) const |
| Evaluate the Gaussian function at the specified point. | |
| virtual double | operator() (const std::array< double, 3 > &x) const override |
| Evaluate the Gaussian function at the specified point. | |
| GaussianFunction | operator* (const double rhs) const |
| Multiply the GaussianFunction by a scalar. | |
| GaussianFunction | operator* (const GaussianFunction &rhs) const |
| Multiply two GaussianFunctions. | |
| GaussianFunction & | operator*= (const double rhs) |
| Multiply the GaussianFunction by a scalar. | |
| GaussianFunction & | operator*= (const GaussianFunction &rhs) |
| Multiply the GaussianFunction by another. | |
| GaussianFunction | operator+ (const GaussianFunction &rhs) const |
| Add two GaussianFunction objects, resulting in a new one. | |
| GaussianFunction & | operator+= (const GaussianFunction &rhs) |
| Add a GaussianFunction to this GaussianFunction. | |
| GaussianFunction | operator- () const |
| Additive inverse of the GaussianFunction (deep copy). | |
| GaussianFunction | operator- (const GaussianFunction &rhs) const |
| Subtract a GaussianFunction from this one, returning the difference. | |
| GaussianFunction & | operator-= (const GaussianFunction &rhs) |
| Subtract a GaussianFunction from this one. | |
| GaussianFunction | operator/ (const double rhs) const |
| Divide the GaussianFunction by a scalar. | |
| GaussianFunction & | operator/= (const double rhs) |
| Divide the GaussianFunction by a scalar. | |
| Public Member Functions inherited from slymer::BasisFunction | |
| virtual | ~BasisFunction ()=default |
Public Attributes | |
| std::array< double, 3 > | center |
| The center of the gaussian. | |
| std::vector< double > | expcoeff |
| The exponent coefficients. | |
Protected Types | |
| using | TermT = std::pair<double, PrimitiveGaussian> |
| Helper class for storing terms in the sum of Gaussian primitives. | |
Protected Member Functions | |
| void | removeSmallTerms (const double eps=1.e-6) |
| Removes terms with very small linear expansion coefficients. | |
Protected Attributes | |
| std::forward_list< TermT > | terms |
| The list of terms in the sum of Gaussian primitives. | |
A Gaussian basis function used by chemistry electronic structure codes.
This basis function has the form
![\[\sum_j c_j x^{l_j} y^{m_j} z^{n_j} \exp[f_j(\vec{x})],
\]](form_283.png)
where 
|
protected |
Helper class for storing terms in the sum of Gaussian primitives.
|
inline |
Default constructor: Make the function 0.
Referenced by GaussianFunction(), GaussianFunction(), operator*(), operator*(), operator*=(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), and operator/=().
| slymer::GaussianFunction::GaussianFunction | ( | const GaussianType | type, |
| const std::array< double, 3 > & | center, | ||
| const std::vector< double > & | expcoeff, | ||
| const std::vector< double > & | coeff ) |
Create a Gaussian orbital (uncontracted or contracted) from quantum chemistry codes.
Both Cartesian and spherical orbitals are supported. The expcoeff and coeff parameters must be arrays. If the orbital is uncontracted, the arrays will be length 1.
All uncontracted primitive Gaussian orbitals used underneath the GaussianFunction are normalized.
| invalid_argument | If a non-positive exponential coefficient is passed or if the lengths of expcoeff and coeff are not equal. |
| [in] | type | The orbital type (from enum OrbitalType). |
| [in] | center | The center of the Gaussian orbital. |
| [in] | expcoeff | Array of coefficients in the exponents of the primitive Gaussians. |
| [in] | coeff | Array of linear expansion coefficients of the primitive Gaussians. |
References GaussianFunction(), center, expcoeff, slymer::PrimitiveGaussian(), removeSmallTerms(), and terms.
|
inline |
Create an uncontracted Gaussian orbital (shortcut to the more general constructor for Gaussian orbitals).
| [in] | type | The orbital type (from enum OrbitalType). |
| [in] | center | The center of the Gaussian orbital. |
| [in] | expcoeff | The coefficient in the exponent of the primitive Gaussian. |
References GaussianFunction(), center, and expcoeff.
|
inline |
Evaluate the Gaussian function at the specified point.
| [in] | x | The point. |
References operator()().
|
overridevirtual |
Evaluate the Gaussian function at the specified point.
| [in] | x | The point. |
Implements slymer::BasisFunction.
References terms.
Referenced by operator()().
|
inline |
Multiply the GaussianFunction by a scalar.
| [in] | rhs | The scalar multiplicative factor. |
References GaussianFunction().
Referenced by operator*().
| GaussianFunction slymer::GaussianFunction::operator* | ( | const GaussianFunction & | rhs | ) | const |
Multiply two GaussianFunctions.
| [in] | rhs | The right-hand GaussianFunction object. |
References GaussianFunction(), operator*(), removeSmallTerms(), and terms.
| GaussianFunction & slymer::GaussianFunction::operator*= | ( | const double | rhs | ) |
Multiply the GaussianFunction by a scalar.
| [in] | rhs | The scalar multiplicative factor. |
References GaussianFunction(), operator*=(), removeSmallTerms(), and terms.
Referenced by operator*=(), and operator/=().
|
inline |
Multiply the GaussianFunction by another.
| [in] | rhs | The right-hand GaussianFunction object. |
References GaussianFunction(), and terms.
| GaussianFunction slymer::GaussianFunction::operator+ | ( | const GaussianFunction & | rhs | ) | const |
Add two GaussianFunction objects, resulting in a new one.
| [in] | rhs | The right-hand GaussianFunction. |
References GaussianFunction(), operator+(), and terms.
Referenced by operator+().
| GaussianFunction & slymer::GaussianFunction::operator+= | ( | const GaussianFunction & | rhs | ) |
Add a GaussianFunction to this GaussianFunction.
| [in] | rhs | The right-hand GaussianFunction. |
References GaussianFunction(), operator+=(), and terms.
Referenced by operator+=(), and operator-=().
| GaussianFunction slymer::GaussianFunction::operator- | ( | ) | const |
Additive inverse of the GaussianFunction (deep copy).
References GaussianFunction(), and terms.
|
inline |
Subtract a GaussianFunction from this one, returning the difference.
| [in] | rhs | The GaussianFunction to be subtracted. |
References GaussianFunction().
|
inline |
Subtract a GaussianFunction from this one.
| [in] | rhs | The GaussianFunction to be subtracted. |
References GaussianFunction(), and operator+=().
|
inline |
Divide the GaussianFunction by a scalar.
| [in] | rhs | The scalar factor. |
References GaussianFunction().
|
inline |
Divide the GaussianFunction by a scalar.
Does not check that the scalar is nonzero.
| [in] | rhs | The scalar factor. |
References GaussianFunction(), and operator*=().
|
inlineprotected |
Removes terms with very small linear expansion coefficients.
| [in] | eps | The threshold for "small". Defaults to 1.e-6. |
References std::abs(), and terms.
Referenced by GaussianFunction(), operator*(), and operator*=().
| std::array<double, 3> slymer::GaussianFunction::center |
The center of the gaussian.
Referenced by GaussianFunction(), GaussianFunction(), and GaussianFunction().
| std::vector<double> slymer::GaussianFunction::expcoeff |
The exponent coefficients.
Referenced by GaussianFunction(), and GaussianFunction().
|
protected |
The list of terms in the sum of Gaussian primitives.
Referenced by GaussianFunction(), GaussianFunction(), operator()(), operator*(), operator*=(), operator*=(), operator+(), operator+=(), operator-(), and removeSmallTerms().