Computational Physics

(Rick Simeone) #1
70 The Hartree–Fock method
fact thatp,qcan be interchanged withr,smeans that the range ofscan be restricted
tos≤q. All in all, a loop over the different two-electron matrix elements, usingK
basis vectors and taking into account all symmetries, reads:
FORp=1TOKDO
FORq=1TOpDO
FORr=1TOp−1DO
FORs=1TOrDO
......
......
END FOR
END FOR
r=p
FORs=1TOqDO
......
......
END FOR
END FOR
END FOR
Suppose we are dealing with a molecule consisting of 6 atoms, each having 12
basis functions, thenK^4 /8 is about 3.4 million. It is not always possible to keep all
these numbers in core-memory, in which case they must be stored on disk. In earlier
days (before about 1975) this was done by storing them in a prescribed order in a
one-dimensional array whose index could be converted into the numbersp,q,rand
s. This was inefficient, however, since because of symmetry, many matrix elements
may vanish or be equal, or matrix elements may vanish because they involve basis
orbitals lying far apart, i.e. having negligible overlap, so nowadays only the non-
negligible matrix elements are stored together with the values of the corresponding
indicesp,q,rands.

4.7.2 General scheme of the HF program
First, we give an outline and then fill in the details [ 6 , 13 ].


  • Input data;

  • Determine matrices;

  • Bring overlap matrix to unit form;

  • Make a first guess for the density matrix;

  • REPEAT

    • Calculate Coulomb and exchange contributions to the Fock matrix;

    • Add these terms to the uncoupled one-electron Hamiltonianhpq;



Free download pdf