# Hartree-Fock Self Consistent Field Procedure

Quick links to the program and files you’ll need

SCF program: scf.py

Overlap integrals: s.dat,

Kinetic Energy integrals:t.dat,

Potential Energy integrals: v.dat,

Nuclear Repulsion: enuc.dat,

Electron Repulsion integrals: eri.dat

I do quite a bit of development work as a graduate student, and one of the most helpful parts of my education was writing a Hartree-Fock SCF (self-consistent field) program from scratch. The SCF procedure is the workhorse of most computational chemistry software packages, as it is generally the first step before doing more advanced calculations (such as MP2, etc). It is also the conceptual basis for molecular orbital theory. I’ve shared my code below, in case you want to try it out for yourself. I wrote it in Python 2.7 (it won’t work in Python 3), utilizing the NumPy package. I find it to be very readable, which makes testing out ideas fast and (relatively) intuitive. The program is written to give an idea how SCF calculations work, so it isn’t that efficient – but I only use it for two electron systems anyway so who cares!

To use it, download the scf.py file to your computer, and put it in a folder along with s.dat, t.dat, v.dat, and enuc.dat. These are the integral values it needs to run: s.dat is the overlap matrix values, t.dat is the kinetic energy matrix, v.dat is the potential energy matrix, and enuc.dat contains the nuclear repulsion energy. You’ll also need the eri.dat, which contains the two electron integrals. All values were taken from Gaussian09 for HeH+ at a bond length of 0.9295 Angstrom with an STO-3G basis set. Once you have those downloaded, fire up your terminal and give it a try! See the example of my terminal below for usage. Just navigate to the folder you have everything in, and type python scf.py then hit Enter!