39 #ifndef MADNESS_INTERIOR_BC_BASISFUNCTION_H__INCLUDED
40 #define MADNESS_INTERIOR_BC_BASISFUNCTION_H__INCLUDED
63 std::vector<double> &exponents,
65 : contract_coeffs(contract_coeffs), exponents(exponents),
76 std::vector<Vector<double, 3> > pts(0);
77 pts.push_back(center);
90 SBF(std::vector<double> &contract_coeffs,
91 std::vector<double> &exponents,
93 :
GaussianBF(contract_coeffs, exponents, center),
94 norms(contract_coeffs.size()) {
99 n = contract_coeffs.size();
100 i = exponents.size();
102 print(
"Error: different number of contraction coefficients " \
109 for(i = 0; i < n; ++i) {
110 norms[i] = pow(8.0*exponents[i]*exponents[i]*exponents[i] /
118 r2 = (center[0] - pt[0])*(center[0] - pt[0]) +
119 (center[1] - pt[1])*(center[1] - pt[1]) +
120 (center[2] - pt[2])*(center[2] - pt[2]);
123 for(
int i = 0; i < n; ++i)
124 ret += contract_coeffs[i] * norms[i] *
125 exp(-exponents[i] * r2);
138 static const int X = 0, Y = 1, Z = 2;
140 PBF(std::vector<double> &contract_coeffs,
141 std::vector<double> &exponents,
143 :
GaussianBF(contract_coeffs, exponents, center),
144 norms(contract_coeffs.size()), dir(dir) {
149 n = contract_coeffs.size();
150 i = exponents.size();
152 print(
"Error: different number of contraction coefficients " \
159 for(i = 0; i < n; ++i) {
160 norms[i] = pow(128.0*exponents[i]*exponents[i]*exponents[i]
161 *exponents[i]*exponents[i] /
170 d[0] = pt[0] - center[0];
171 d[1] = pt[1] - center[1];
172 d[2] = pt[2] - center[2];
174 r2 = d[0]*d[0] + d[1]*d[1] + d[2]*d[2];
177 for(
int i = 0; i < n; ++i)
178 ret += contract_coeffs[i] * norms[i] *
179 exp(-exponents[i] * r2);
204 static const int XX = 0, XY = 1, XZ = 2, YY = 3, YZ = 4, ZZ = 5;
206 DBF(std::vector<double> &contract_coeffs,
207 std::vector<double> &exponents,
209 :
GaussianBF(contract_coeffs, exponents, center),
210 norms(contract_coeffs.size()), dir(dir) {
215 n = contract_coeffs.size();
216 i = exponents.size();
218 print(
"Error: different number of contraction coefficients " \
225 for(i = 0; i < n; ++i) {
226 norms[i] = 2048.0*exponents[i]*exponents[i]*exponents[i]
227 *exponents[i]*exponents[i]*exponents[i]*exponents[i] /
229 if(dir == XX || dir == YY || dir == ZZ)
231 norms[i] = pow(norms[i], 0.25);
239 d[0] = pt[0] - center[0];
240 d[1] = pt[1] - center[1];
241 d[2] = pt[2] - center[2];
243 r2 = d[0]*d[0] + d[1]*d[1] + d[2]*d[2];
246 for(
int i = 0; i < n; ++i)
247 ret += contract_coeffs[i] * norms[i] *
248 exp(-exponents[i] * r2);
275 #endif // MADNESS_INTERIOR_BC_BASISFUNCTION_H__INCLUDED
const mpreal exp(const mpreal &v, mp_rnd_t rnd_mode)
Definition: mpreal.h:2234
const double pi
Mathematical constant pi.
Definition: constants.h:44
std::vector< double > norms
Definition: basisfunction.h:87
Main include file for MADNESS and defines Function interface.
int n
Definition: basisfunction.h:58
std::vector< double > norms
Definition: basisfunction.h:134
PBF(std::vector< double > &contract_coeffs, std::vector< double > &exponents, Vector< double, 3 > ¢er, int dir)
Definition: basisfunction.h:140
virtual ~GaussianBF()
Definition: basisfunction.h:73
int dir
Definition: basisfunction.h:135
std::vector< double > exponents
Definition: basisfunction.h:56
int dir
Definition: basisfunction.h:201
Level special_level()
Override this change level refinement for special points (default is 6)
Definition: basisfunction.h:81
Vector< double, 3 > center
Definition: basisfunction.h:57
Abstract Gaussian basis function. Must be overriden to specify angular momenta (s, p, d, etc.).
Definition: basisfunction.h:50
std::vector< double > norms
Definition: basisfunction.h:200
SBF(std::vector< double > &contract_coeffs, std::vector< double > &exponents, Vector< double, 3 > ¢er)
Definition: basisfunction.h:90
std::vector< double > contract_coeffs
Definition: basisfunction.h:55
int Level
Definition: key.h:58
A p basis function.
Definition: basisfunction.h:132
An s basis function.
Definition: basisfunction.h:85
DBF(std::vector< double > &contract_coeffs, std::vector< double > &exponents, Vector< double, 3 > ¢er, int dir)
Definition: basisfunction.h:206
GaussianBF(std::vector< double > &contract_coeffs, std::vector< double > &exponents, const Vector< double, 3 > &c)
Sets up the basis function data.
Definition: basisfunction.h:62
Abstract base class interface required for functors used as input to Functions.
Definition: function_interface.h:58
void print(const A &a)
Print a single item to std::cout terminating with new line.
Definition: print.h:122
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
const double c
Definition: gfit.cc:200
std::vector< Vector< double, 3 > > special_points() const
Override this to return list of special points to be refined more deeply.
Definition: basisfunction.h:75
A d basis function.
Definition: basisfunction.h:198