# 3-index integral schemes for density fitting

Density fitting allows us to approximate the 4-index 2-electron integrals using 3-index integrals:

$$(ij|kl) \approx \sum_{Q}^{N_{aux}} (ij|Q)(Q|kl)$$

My question is, what schemes are used for the evaluation of the 3-index integrals? Do we simply modify existing schemes such as Obara-Saika and McMurchie-Davidson or are completely separate schemes given for this purpose?

• What do you mean with schemes? The algorithms used to solve the integrals? – Martin - マーチン Dec 19 '17 at 10:41
• @Martin-マーチン yeah – obackhouse Dec 19 '17 at 13:13
• DF is never done like this... – Fl.pf. Dec 19 '17 at 13:16
• @Fl.pf. how so? That's not very helpful. – obackhouse Dec 19 '17 at 14:35
• Why don't you take a look at these notes by David Sherrill (main prof. behind Psi4). From what I can gather, there are many possible schemes because one uses the auxiliary basis to minimize some functional which gives the coefficients in an expansion of an electron density. There are multiple possible functionals one might choose. From here, the 4-index integrals are approximately reconstructed from the 3-index integrals which one gets from the fitting process. This is the bird's-eye view. The details are probably... detailed. – jheindel Dec 19 '17 at 19:36

I think in the early days one really used just the normal integral schemes Obara-Saika, McMurchie-Davidson, Rys where for one exponent just a Gaussian with exponent zero was used. Later the people examined the schemes for this special purpose and modified them for calculating 3 index coulomb integrals. A quite recent paper on this topic can be found in Gyula Samu and Mihály Kállay, J. Chem. Phys. 2017, 146, DOI: 10.1063/1.4983393.

One minor thing I want to point out is that you presented RI/DF in a slightly unusual way (notation). Using RI/DF the integrals are evaluated as

$$(ij|kl) \approx \sum_{PQ}^{N_{aux}} (ij|P)[V^{-1}]_{PQ} (Q|kl)$$

where

$$V_{PQ} = \left(P|Q\right) = \int \int {{\phi_{P}({r_1}) \frac{1}{r_{12}} \phi_{Q}({r_2})}}d{r_1}d{r_2}$$

Of course you can rewrite it a bit with forming $V_{PQ}^{-1/2}$ to arrive at a similar expression as given by you.

I am giving you its solution from this paper by Gyula Samu and Mihály Kállay: Abstract- In this study we pursue the most efficient paths for the evaluation of three-center electron repulsion integrals (ERIs) over solid harmonic Gaussian functions of various angular momenta. First, the adaptation of the well-established techniques developed for four-center ERIs, such as the Obara–Saika, McMurchie–Davidson, Gill–Head-Gordon–Pople, and Rys quadrature schemes, and the combinations thereof for three-center ERIs is discussed. Several algorithmic aspects, such as the order of the various operations and primitive loops as well as prescreening strategies, are analyzed. Second, the number of floating point operations (FLOPs) is estimated for the various algorithms derived, and based on these results the most promising ones are selected. We report the efficient implementation of the latter algorithms invoking automated programming techniques and also evaluate their practical performance. We conclude that the simplified Obara–Saika scheme of Ahlrichs is the most cost-effective one in the majority of cases, but the modified Gill–Head-Gordon–Pople and Rys algorithms proposed herein are preferred for particular shell triplets. Our numerical experiments also show that even though the solid harmonic transformation and the horizontal recurrence require significantly fewer FLOPs if performed at the contracted level, this approach does not improve the efficiency in practical cases. Instead, it is more advantageous to carry out these operations at the primitive level, which allows for more efficient integral prescreening and memory layout.

• @obackhouse-The source of this paper is $\color{aqua}{J. Chem. Phys. 2017, 146, DOI: 10.1063/1.4983393.}$,which I have used here only to solve your problem. – user66827 Aug 11 '18 at 3:27