Kindfield
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Friends
Pages
src
basisfunctions
gaussian
integrals
gaussiancoloumbattractionintegral.cpp
Go to the documentation of this file.
1
#include "
gaussiancoloumbattractionintegral.h
"
2
3
#include <
hermiteintegral.h
>
4
#include <
math/hermiteexpansioncoefficient.h
>
5
#include "
basisfunctions/gaussian/gaussianprimitiveorbital.h
"
6
#include "
math/vector3.h
"
7
8
GaussianColoumbAttractionIntegral::GaussianColoumbAttractionIntegral
(
int
angularMomentumMax) :
9
m_hermiteExpansionCoefficient(angularMomentumMax + 1),
10
m_hermiteIntegral(2 * angularMomentumMax + 1)
11
{
12
13
}
14
15
void
GaussianColoumbAttractionIntegral::set
(
const
Vector3
& corePositionA,
const
Vector3
& corePositionB,
16
const
Vector3
& corePositionC,
17
const
GaussianPrimitiveOrbital
& primitiveA,
18
const
GaussianPrimitiveOrbital
& primitiveB) {
19
double
exponentA = primitiveA.
exponent
();
20
double
exponentB = primitiveB.
exponent
();
21
double
p = exponentA + exponentB;
22
Vector3
P = (exponentA * corePositionA + exponentB * corePositionB) / (exponentA + exponentB);
23
Vector3
PC = P - corePositionC;
24
m_exponentSum
= exponentA + exponentB;
25
int
t = primitiveA.
xExponent
() + primitiveB.
xExponent
();
26
int
u = primitiveA.
yExponent
() + primitiveB.
yExponent
();
27
int
v = primitiveA.
zExponent
() + primitiveB.
zExponent
();
28
m_hermiteIntegral
.
set
(p, PC, t, u, v);
29
m_hermiteExpansionCoefficient
.
set
(exponentA, exponentB, corePositionA, corePositionB,
30
primitiveA.
xExponent
(), primitiveB.
xExponent
(),
31
primitiveA.
yExponent
(), primitiveB.
yExponent
(),
32
primitiveA.
zExponent
(), primitiveB.
zExponent
());
33
}
34
35
double
GaussianColoumbAttractionIntegral::coloumbAttractionIntegral
(
const
GaussianPrimitiveOrbital
& primitiveA,
36
const
GaussianPrimitiveOrbital
& primitiveB)
const
37
{
38
return
coloumbAttractionIntegral
(primitiveA.
xExponent
(), primitiveA.
yExponent
(), primitiveA.
zExponent
(),
39
primitiveB.
xExponent
(), primitiveB.
yExponent
(), primitiveB.
zExponent
());
40
}
41
42
double
GaussianColoumbAttractionIntegral::coloumbAttractionIntegral
(
int
iA,
int
jA,
int
kA,
int
iB,
int
jB,
int
kB)
const
43
{
44
double
result = 0;
45
// const cube &E_x = (*m_hermiteExpansionCoefficient)[0];
46
// const cube &E_y = (*m_hermiteExpansionCoefficient)[1];
47
// const cube &E_z = (*m_hermiteExpansionCoefficient)[2];
48
const
HermiteExpansionCoefficient
&E =
m_hermiteExpansionCoefficient
;
49
double
p =
m_exponentSum
;
50
const
HermiteIntegral
&R =
m_hermiteIntegral
;
51
int
tMax = iA + iB;
52
int
uMax = jA + jB;
53
int
vMax = kA + kB;
54
for
(
int
t = 0; t < tMax + 1; t++) {
55
for
(
int
u = 0; u < uMax + 1; u++) {
56
for
(
int
v = 0; v < vMax + 1; v++) {
57
result += E(iA, jA, kA, iB, jB, kB, t, u, v) * R(0,t,u,v);
58
// result += E_x(iA, iB, t) * E_y(jA, jB, u) * E_z(kA, kB, v) * R(0,t,u,v);
59
}
60
}
61
}
62
result *= 2*M_PI / p;
63
return
result;
64
}
Generated on Sun Jun 22 2014 14:02:46 for Kindfield by
1.8.4