Computational Physics

(Rick Simeone) #1
4.7 The structure of a Hartree–Fock computer program 71


  • Diagonalise the Fock matrix;

  • Construct a new density matrixPfrom the eigenvectors found;

  • UNTIL converged;

  • Output.


Input data:The user provides the coordinates of the positions of the nucleiRn,
the atomic numbersZn, the total number of electronsNand a basis set to be used
(most programs have several basis sets built into them).
Determine matrices:All matrices that do not depend on the eigenvectorsCkcan
be determined here: the overlap matrixSpq, the uncoupled one-electron Hamiltonian
hpq, and the two-electron integrals〈pr|g|qs〉.
Bring overlap matrix to unit form:This is the procedure described in
Section 3.3. It results in a matrixVdefining the basis transformation which brings
Sto unit form.
Make a first guess for the density matrix:It is possible to takePpq=0asa
first guess: this implies that the electrons feel the nuclei but not each other. It is then
expected that the HF self-consistency procedure will converge with this choice.
More elaborate guesses forPcan be used in order to increase the probability of
convergence, but we shall not go into this here.
Calculate Coulomb and exchange contributions to the Fock matrix:This is
the most time-consuming step in the program!
The exchange and Coulomb contributions are stored in a matrixGaccording to the
following formula (see also(4.70)):

Gpq=


rs

Prs

[


〈pr|g|qs〉−

1


2


〈pr|g|sq〉

]


. (4.88)


This is done in a loop of the type displayed in the previous subsection. For each
combination of the indicesp,q,randsoccuring in this loop it must be checked to
which elements ofGthe corresponding two-electron matrix element contributes.
This, however, depends on which of the indices coincide. When all four indices are
different for example, one obtains the following contributions to the matrixG:

Gpq=Gpq+ 2 〈pr|g|qs〉Prs
Grs=Grs+ 2 〈pr|g|qs〉Ppq
Gps=Gps− 1 / 2 〈pr|g|qs〉Pqr
Gqr=Gqr− 1 / 2 〈pr|g|qs〉Pps (4.89)
Gpr=Gpr− 1 / 2 〈pr|g|qs〉Pqs
Gqs=Gqs− 1 / 2 〈pr|g|qs〉Ppr.
Free download pdf