Unlike the Hartree-Fock energy, correlation energies like the MP2 energy are usually expressed in terms of MO-basis quantities (integrals, MO energies). The most expensive part of the calculation is the transformation of the two-electron integrals from the AO to the MO basis representation. The purpose of this project is to understand this transformation and fundamental techniques for its efficient implementation. The theoretical background and a concise set of instructions for this project may be found here.
The Mulliken-ordered integrals are defined as:
Concise instructions for this step can be found in Project #3.
Use the values you computed in the Hartree-Fock program of Project #3.
The most straightforward expression of the AO/MO integral transformation is
This approach is easy to implement (hence the word “noddy” above), but is expensive due to its N8 computational order. Nevertheless, you should start with this algorithm to get your code working, and run timings (use the UNIX “time” command) for the test cases below to get an idea of its computational cost.
Notice that none of the C coefficients in the above expression have any indices in common. Thus, the summation could be rearranged such that:
This means that each summation within brackets could be carried out separately, starting from the innermost summation over σ, if we store the results at each step. This reduces the N8 algorithm above to four N5 steps.
Be careful about the permutational symmetry of the integrals and intermediates at each step: while the AO-basis integrals have eight-fold permutational symmetry, the partially transformed integrals have much less symmetry.
After you have the noddy algorithm working and timed, modify it to use this smarter algorithm and time the test cases again. Enjoy!
where i and j denote doubly-occupied orbitals and a and b unoccupied orbitals, and the denominator involves the MO energies.