Deprecated test class for Hydrogen molecule system.
More...
#include <multihydrogen.h>
Deprecated test class for Hydrogen molecule system.
- Deprecated:
Definition at line 11 of file multihydrogen.h.
MultiHydrogen::MultiHydrogen |
( |
mat |
nucleiPositions) | |
|
Definition at line 11 of file multihydrogen.cpp.
13 m_nNuclei(nucleiPositions.n_rows),
14 m_nOrbitalsPerNuclei(4)
16 alpha = zeros(m_nOrbitalsPerNuclei);
MultiHydrogen::~MultiHydrogen |
( |
) | |
|
|
virtual |
double MultiHydrogen::additionalEnergyTerms |
( |
) | |
|
|
virtual |
Implements ElectronSystem.
Definition at line 51 of file multihydrogen.cpp.
52 double repulsionEnergy = 0;
53 for(uint i = 0; i < m_nNuclei; i++) {
54 for(uint j = i + 1; j < m_nNuclei; j++) {
55 rowvec Rij =
R.row(i) -
R.row(j);
56 repulsionEnergy += 1/sqrt(
dot(Rij, Rij));
59 return repulsionEnergy;
double MultiHydrogen::coupledIntegral |
( |
int |
p, |
|
|
int |
r, |
|
|
int |
q, |
|
|
int |
s |
|
) |
| |
|
virtual |
Implements ElectronSystem.
Definition at line 27 of file multihydrogen.cpp.
28 int pIndex = p % m_nOrbitalsPerNuclei;
29 int qIndex = q % m_nOrbitalsPerNuclei;
30 int rIndex = r % m_nOrbitalsPerNuclei;
31 int sIndex = s % m_nOrbitalsPerNuclei;
33 int Rp = p / m_nOrbitalsPerNuclei;
34 int Rq = q / m_nOrbitalsPerNuclei;
35 int Rr = r / m_nOrbitalsPerNuclei;
36 int Rs = s / m_nOrbitalsPerNuclei;
39 double B = alpha[rIndex] + alpha[sIndex];
41 rowvec Ra = (alpha[pIndex]*
R.row(Rp) + alpha[qIndex]*
R.row(Rq))/A;
42 rowvec Rb = (alpha[rIndex]*
R.row(Rr) + alpha[sIndex]*
R.row(Rs))/B;
45 double t = (A*B/(A + B))*
dot(Ra-Rb,Ra-Rb);
double MultiHydrogen::errorFunction |
( |
double |
arg) | |
|
Definition at line 62 of file multihydrogen.cpp.
70 double f = 1.0/arg * erf(arg) *sqrt(acos(-1))/2.0;
double MultiHydrogen::kineticIntegral |
( |
int |
p, |
|
|
int |
q |
|
) |
| |
|
virtual |
HartreeSolver::kineticIntegral is the solution of the the integral $$ | -{1}{2} ^2 | $$.
- Parameters
-
- Returns
Definition at line 83 of file multihydrogen.cpp.
84 int pIndex = p % m_nOrbitalsPerNuclei;
85 int qIndex = q % m_nOrbitalsPerNuclei;
87 double ap =
alpha(pIndex);
88 double aq =
alpha(qIndex);
90 double factor = ap*aq/(ap+aq);
92 int RpIndex = p / m_nOrbitalsPerNuclei;
93 int RqIndex = q / m_nOrbitalsPerNuclei;
95 rowvec Rp =
R.row(RpIndex);
96 rowvec Rq =
R.row(RqIndex);
98 double Rpq =
dot(Rp-Rq,Rp-Rq);
99 double expTerm = exp(-factor*Rpq);
100 double kin = 0.5*factor*(6-4*factor*Rpq)*pow(acos(-1)/(ap+aq),3.0/2.0)*expTerm;
uint MultiHydrogen::nBasisFunctions |
( |
) | |
|
|
inlinevirtual |
uint MultiHydrogen::nParticles |
( |
) | |
|
|
inlinevirtual |
double MultiHydrogen::nuclearAttractionIntegral |
( |
int |
p, |
|
|
int |
q |
|
) |
| |
|
virtual |
HartreeSolver::kineticIntegral is the solution of the the integral $$ | -{1}{2} ^2 | $$.
- Parameters
-
- Returns
Definition at line 112 of file multihydrogen.cpp.
113 int pIndex = p % m_nOrbitalsPerNuclei;
114 int qIndex = q % m_nOrbitalsPerNuclei;
116 double ap =
alpha(pIndex);
117 double aq =
alpha(qIndex);
119 double apPlusAq = ap + aq;
120 double oneOverApPlusAq = 1.0/(apPlusAq);
122 int RpIndex = p / m_nOrbitalsPerNuclei;
123 int RqIndex = q / m_nOrbitalsPerNuclei;
125 rowvec Rp =
R.row(RpIndex);
126 rowvec Rq =
R.row(RqIndex);
130 double Rpq =
dot(Rp-Rq,Rp-Rq);
131 double expTerm = exp(-ap*aq*oneOverApPlusAq*Rpq);
133 rowvec RP = (ap*Rp + aq*Rq)*oneOverApPlusAq;
135 double errorFunctionSum = 0;
137 for(uint i = 0; i < m_nNuclei; i++) {
141 double nucAtt = -2*Z*oneOverApPlusAq*acos(-1)*expTerm*errorFunctionSum;
double MultiHydrogen::overlapIntegral |
( |
int |
p, |
|
|
int |
q |
|
) |
| |
|
virtual |
Implements ElectronSystem.
Definition at line 146 of file multihydrogen.cpp.
147 int pIndex = p % m_nOrbitalsPerNuclei;
148 int qIndex = q % m_nOrbitalsPerNuclei;
150 double ap =
alpha(pIndex);
151 double aq =
alpha(qIndex);
153 double factor = 1.0/(ap+aq);
155 int RpIndex = p / m_nOrbitalsPerNuclei;
156 int RqIndex = q / m_nOrbitalsPerNuclei;
158 rowvec Rp =
R.row(RpIndex);
159 rowvec Rq =
R.row(RqIndex);
161 double Rpq =
dot(Rp-Rq,Rp-Rq);
162 double expTerm = exp(-ap*aq*factor*Rpq);
163 double overlap = pow(acos(-1)*factor,3.0/2.0)*expTerm;
double MultiHydrogen::uncoupledIntegral |
( |
int |
p, |
|
|
int |
q |
|
) |
| |
|
virtual |
const double MultiHydrogen::powPi5over2 = pow(M_PI, 5./2.) |
The documentation for this class was generated from the following files:
- /home/svenni/Dropbox/projects/programming/hartree-fock/hartree-fock/src/electronsystems/hydrogen/multihydrogen.h
- /home/svenni/Dropbox/projects/programming/hartree-fock/hartree-fock/src/electronsystems/hydrogen/multihydrogen.cpp