Beruflich Dokumente
Kultur Dokumente
Yu Austin Liu
January 4, 2015
The Hartree-Fock method is a well known method for calculating energy levels in many-electron
atoms. For the final project, I first calculated the energy levels of helium.
For helium, the Hamiltonian can be written as :
2
=H
1 + H
2 + e
H
r12
(1)
2 2 Ze2
i = h
H
2me i
ri
(2)
where
Hartree-Fock method
To make the problem tractable, assume that the spatial part of the wavefunction can be made
separable. Since electrons are fermions, we need to include a separate spin coordinate, , in
addition to the spatial coordinates r, , so let x = (r, )
(3)
However, by the Pauli exclusion principle, the wavefunction must be antisymmetric, i.e. we
have to take a linear combination of both Hartree products by choosing:
1 1 (x1 ) 2 (x1 )
1
(x1 , x2 ) = [1 (x1 )2 (x2 ) 1 (x2 )2 (x1 )] =
2
2 1 (x2 ) 2 (x2 )
1
(4)
Following the notation in [2, p. 152], [1] and [3, p. 68], closely, we take
1 u(r)
1 (x) =
()
4 r
(5)
1 u(r)
2 (x) =
()
4 r
(6)
and
(7)
Since the Hamiltonian does not involve spin (in non-relativistic quantum mechanics), we
= E and now write:
use the Schr
odinger equation, H
e2 u(r1 )u(r2 )
u(r1 )u(r2 )
H1 + H2 +
=E
r12
4r1 r2
4r1 r2
(8)
4r12
u (r1 )
r1
Z
2
u(r1 )u(r2 )
u (r1 ) u(r1 )u(r2 )
1 + H
2 + e
H
dr1 = E
4r12
dr1
r12
4r1 r2
r1
4r1 r2
0
(9)
Let
E Z
D
1H
11 =
1 (u(r1 )) dr1
u (r1 )H
(10)
Hence obtain:
2
Z
E u(r )
D
u(r2 )
u(r2 )
e
u(r2 )
2
1H
1
+
h1
|
1i
H
+
u
(r
)
u(r
)dr
=
E
h1
|
1i
1
2
1
1
1
r2
r2
r2
r12
r2
0
(11)
Let
Z
u (r1 )
e2
r12
u(r1 )dr1 = h1 | V | 1i
(12)
Now expand the Hamiltonian and formulating the equation in terms of a Schrodinger-like
equation [3, p. 69], we obtain:
E 1
D
1
u(r2 )
u(r2 )
= E 1 H1 1 h1 | V | 1i
H2 + h1 | V | 1i
2
r2
2
r2
(13)
Let
2 =
E 1
D
E 1 H1 1 h1 | V | 1i
2
(14)
Note that this choice of V essentially splits the electron-electron repulsion term into two,
so that the raising of the ground state energies due to the inter-electron repulsion term is split
evenly between the two electrons and both 1 and 2 give the ground state energy of a helium
electron in the ground state.
Using Equation (2), and the formula for the Laplacian in spherical coordinates, we obtain:
2
Z
h2 d2
e
u(r2 )
Ze2 1
u(r2 )
+
u (r1 )
= 2
(15)
u(r2 ) +
u(r1 )dr1
2
2mr2 dr2
r2
2 0
r12
r2
r2
Interchanging indices gives a similar eigenvalue equation for u(r1 ). Simplifying:
2
Z
h2 d2
Ze2 1
e
u
(r
)
+
u(r
)dr
1
1
1 u(r2 ) = 2 u(r2 )
2m dr22
r2
2 0
r12
(16)
Assuming spherical symmetry, let the charge density of electron 1 due to its wavefunction
be
(r1 ) =
u (r1 )u(r1 )
4r12
(17)
Then the potential due to this electron (note that r12 = |r2 r1 |, and factors of 4r12 cancel)
is given by:
Z
(r1 )
2
V (r2 ) = e
dr1
(18)
|r2 r1 |
0
The potential is solved using Poissons equation [3, p. 49]. The 2 subscript is dropped for
clarity.
1 d
r2 dr
d
r
V (r) = 4e2 (r)
dr
2
(19)
(20)
u(r) = Eu(r)
(21)
+ V +
2m dr2
2m r2
Note that for helium, l = 0 for both of the electrons since both are in the n = 0 shell [2, p. 161,164].
Numerov method
The Numerov method is a numerical method for solving equations of the form:
u00 (r) + w(r)u(r) = s(r)
(22)
2m
[E V (r)]
h2
(23)
(24)
(25)
(26)
so
u(4)
n =
(27)
Inserting Equation (27) into Equation (25), we can manipulate and obtain:
h2
5h2
h2
h2
1 + wn+1 un+1 2 1
wn un + 1 + wn1 un1 =
(sn+1 + 10sn + sn1 )+O(h6 )
12
12
12
12
(28)
This can be further manipulated to get a recursion relation forward or backward for un+1
or un1 . The Numerov algorithm is first tested on the hydrogen atom to trace the 1s wavefunction
in htest.cpp, the first program in the source code listing. The forward Numerov method is used for
the first half of the wavefunction starting from r = 0 and the backward Numerov method is used
for the second half starting from r = 3.0, the cutoff radius. The plot is shown in Figure 1.
Figure 1: Plot of numerical and analytical radial hydrogen wavefunction (after normalization with
Y00 (, ) = 14 term
The energy calculation subroutine is also tested on the 1s hydrogen wavefunction, giving
-13.605 eV for the total energy and a ratio of 0.4997 for the kinetic to potential energy ratio. We
expect a ratio of 0.5 by the virial theorem though there may be roundoff error that has accumulated
due to the integration using Simpsons rule.
Self-consistency calculations
One variational treatment uses a trial wavefunction which is of the form of that of the hydrogen
atom, parameterized by the effective charge, Z .
u(r) = 2
Z
a
1/2
Z r Z r/a
e
a
(29)
The iteration scheme outlined by Koonin in [3, p. 74] can be summarized as follows:
1. Guess an initial wavefunction
2. Use the normalization condition for the wavefunction to solve for the potential generated by
the initial wavefunction and calculate the total energy of the sustem.
3. Find a new wavefunction and its eigenvalue by solving the Schrodinger equation with the new
potential and normalizing it again.
4. Calculate the new potential and new total energy, then repeat 3. and 4. until the total energy
has converged within the required tolerance.
The procedure outlined above is done in hf1d he.cpp, the second program in the source code listing.
First a trial wavefunction of the form in Equation (29) is chosen with Z = 2. Testing with different
values of Z still gives the same converged result. Next, the self-consistency loop is run until the
energy converges to a minimum value and the old and new energies are within 0.001 eV of each
other. These energies are tabulated in Table 1. Note that the energy given is the energy per
electron and must be multiplied by two to get the ground state energy of helium.
Stepsize
0.004
0.002
0.001
0.0005
Cutoff radius
4.0
4.0
4.0
4.0
Energy (eV)
-40.14
-39.28
-38.887
-38.7
|Ek /Ep |
0.556
0.55
0.548
0.547
C. W. David. A Hartree Fock example using Helium. [Online; accessed 2014-12-10]. 2006. url:
http://digitalcommons.uconn.edu/chem_educ/.
[2]
D.J. Griffiths. Introduction to Quantum Mechanics. Upper Saddle River, NJ, USA: Pearson
Prentice Hall, 2005.
10
void writetofile(){
ofstream fp;
fp.open("hf1d_h.dat");
if (fp.fail()){
cout << "cannot open file" << endl;
}
for (i=0; i<N; i++){
fp << r[i] << setw(15) << R[i] << setw(15)
<< Rnum[i] << endl;
}
}
/* Solve for the hydrogenic wavefunction numerically */
void calcu(){
// trace forward for first half
for (i= 1; i<N/2; i++){
numerovf(i, u, w);
}
// trace backward for second half
for (i= N-2; i>N/2; i--){
numerovb(i, u, w);
}
// normalization required
for (i=0; i<N; i++){
usq[i]= u[i]*u[i];
}
double m = sqrt(simpint(usq));
cout << "norm. const. = " << m << endl;
for (i=0; i<N; i++){
u[i]/= m;
usq[i]= u[i]*u[i];
}
cout << "normalized to: " << simpint(usq) << endl;
}
11
int main(){
initialize(r,w);
set_ics(u);
// for (i= 1; i<N-1; i++){
//
numerovf(i, u, w);
// }
calcu();
updateusq();
Ep= calcEp(u);
Ek= calcEk(u);
E= Ep+Ek;
cout << "kinetic energy is: " << Ek << endl;
cout << "potential energy is: " << Ep << endl;
cout << "total energy is: " << E << endl;
// generate Rnum values for comparison
for (i= 1; i<N; i++){
Rnum[i] = u[i]/(r[i]*sqrt(4*pi));
}
Rnum[0] = 2*Rnum[1]-Rnum[2];
writetofile();
return (EXIT_SUCCESS);
} // end main()
12
<iostream>
<fstream>
<sstream>
<iomanip>
13
14
15
16
17
18
int main(){
// normalization test
initialize();
writeutofile(); // write initial u
Eold= -50.0; // start E at some value
E= 0.0;
while (abs(E-Eold) > 0.001 && numiter < 15){
Eold= E;
scfiter();
}
Ep= calcEp(u);
Ek= calcEk(u);
E= Ep+Ek;
cout << "final kinetic energy is: " << Ek << endl;
cout << "final potential energy is: " << Ep << endl;
cout << "Ek/Ep is: " << Ek/Ep << endl;
cout << "final total energy is: " << E << endl;
cout << "stepsize was: " << h << endl;
cout << "cutoff radius was: " << rf << endl;
writeRtofile();
return(EXIT_SUCCESS);
} // end main()
19