Here’s a little project that I’ve been meaning to finish for awhile now, to aid my own learning and anybody else who is interested: it’s a Maple script for a restricted closed-shell Hartree Fock program, which you can download here. (To open, right-click the link, save it locally, and then open with Maple – else you just get a bunch of XML) I wrote it using Maple 16, so it should work in v16 or later. Maple is inexpensive for those working in education, and it includes loads of convenient mathematics functions that are transparent and easily call-able, which saves lots of work!

At the moment, it uses an SCF procedure to solve a simple HeH+ wave function in a basis set of contracted Gaussian functions. It includes detailed comments, and follows closely the text on p 106 – 176 of the book ‘Modern Quantum Chemistry’ (MQC) by Szabo & Ostlund. This Maple script could easily be extended to larger molecular systems, but the time required to calculate the two-electron integrals will mean that you’ll spend a lot of time staring at your computer screen! Incidentally, it turns out that Maple 16′s standard integrate command is pretty speedy for evaluating the overlap & kinetic energy integrals. For two-electron and nuclear repulsion integrals, it’s not so good! So I’ve used the analytical formulas in Appendix A of MQC.