In the following we will look at how to do Hartree-Fock calculations more efficiently by means of integral direct algorithms, in which the 4 index integrals are recalculated when needed and not saved on disk. This sounds odd since these integrals don't change, but one hand the disk I/O slows down the HF calculation and on the other hand even for relatively small systems like benzene in a def2-QZVPP basis we end up with terabytes of required storage. Integral direct implementation remove reduce the I/O bottleneck and are better scalable.
In a conventional algorithm the AO integrals \((\mu\nu|\kappa\lambda)\) are calculated once and then read in during each SCF iterations. Although these integrals don't change during the SCF procedure, this kind of algorithm might not be optimal since the constant I/O as well as the integral storage can be a bottleneck.[1]
However, in HF/KS-DFT calculations we actually don't need these integrals. We just need to contract them with the density matrix to obtain the Fock matrix. The storage requirements for the Fock matrix are \(N^2\) instead of \(N^4\) for the 4 index AO integrals. Therefore, we defintely can expect savings if we avoid the storage of the AO integrals. Thus, in direct SCF methods these integrals are re-calculated in each SCF iteration.[1-2] This requires an efficient pre-screening. We should avoid to calculate small integrals let's say \(10^{-10}\). With means of simple mathematical relations there is a tool to achieve this. We recall that the two-electron integrals
are elements of a positive definite matrix with diagonal elements \(g_{abab}\ge 0\). Thus the conditions for an inner product are satisfied and we can use the Cauchy-Schwartz inequality
to get an strict upper bound to the integral! Additionally in case of direct SCF we can exploit that the density matrix is available prior to the integral evaluation and we can use this information for additional screening. The screening is performed on the level of shells. This reduces memory requirements and ensures rotational invariance.
The integral \((\mu\nu|\kappa\lambda)\) is only needed to be evaluated if
where
Furthermore we can use an incremental Fock-build and then use the difference in the density matrix between iterations for screening:
In this way in each iteration more and more integrals are screened away and the SCF iterations become faster and faster.
For the evaluation of the Fock-matrix (RHF) let's recall that
Exploiting permutational symmetry the contributions to the Fock-matrix can be written as
for the Coulomb contributions and
for the Exchange contributions. Thus, if we calculate a shell quadruple we can calculates its contributions to the Fock matrix according to the given recipe. This completely removes the necessity to store the integrals on disk. Note that same programs provide semi integral direct algorithms, in which the most time consuming integrals are stored and read in, in each SCF iteration.
References
- J. Almlöf, K. Faegri Jr., and K. Korsell. Principles for a Direct SCF Approach to LICAO-MO ab-initio Calculations. Journal of Computational Chemistry, 385–399, 1982.
- M. Häser and R. Ahlrichs. Improvements on the Direct SCF Method. Journalof Computational Chemistry, 104–111, 1989.