# Why is my quantum chemistry software not printing as many 2e- integrals as I expect?

Background: In Hartree-Fock theory, the two-electron integral is given by:

$$[ij|kl]$$ = $$\int dx_{1}dx_{2}(\chi_{i}(x_{1})\chi_{j}(x_{1})\frac{1}{r_{12}}\chi_{k}^{*}(x_2)\chi_{l}(x_{2})$$

I am interested in writing out the 2e-integral for the Helium atom (for a given basis set) in PySCF. I want to do this with, and without density-fitting (DF)/resolution-of-identity (RI).

Attempt: In my attempt to produce the 2e-integral from PySCF (without DF/RI), I have used the following code:

from pyscf import gto
mol = gto.M(atom='He 0 0 0', basis='6-31g')
eri = mol.intor('int2e', aosym='s8')
print(eri)

>> [1.54393568 0.78544719 0.42702546 0.80395186 0.47618957 0.61593794]


Background: I was expecting a much larger data set. I also imagined that there should be an SCF loop; however, this is not indicated by the PySCF documentation. Why am I getting unexpected results?

Thank you in advance for any help.

Note: This question is related to the following earlier questions:

• +1. Leave the 3-index integrals (presumably they are talking about the Cholesky decomposition approximation to the true 4-index integrals) and density-fitting for a separate question please. The question "What are the ways to reduce the costs associated with 4-index integrals?" can get answers about density-fitting or Cholesky decomposition or other techniques. About the SCF loop: no it's not necessary for 2e- integrals, there's integrals evaluated before SCF. The reason the other set was so big might be that symmetry: mattermodeling.stackexchange.com/q/1929/5 Are the numbers correct? – Nike Dattani Sep 2 '20 at 14:35
• Hi @NikeDattani. Thank you for your comment. I have made a minor change to the original question, where I have removed the sentence on n-centre integrals. I have also confirmed the numbers in my answer. – Wychh Sep 2 '20 at 14:56
• So the numbers are all correct, there's just not as many numbers? All the missing integrals are duplicates of the ones you show in your question? Then it's just a matter of the symmetry relations in that question I linked right? – Nike Dattani Sep 2 '20 at 14:58
• Hi @NikeDattani. I think I misinterpreted your original question. I thought you were asking if the numbers I had posted in the question were correct. In comparison with the data set (which I unfortunately cannot share), the numbers are different as is the number of numbers. For instance, I have been given a n X n matrix, where all diagonal elements are 1, and some off-diagonal elements are non-zero. – Wychh Sep 2 '20 at 15:13
• @Wychh it sounds like what you have been given is the overlap matrix, based on it having all 1s on the diagonal and it being an n by n matrix. The full set of two electron integrals would be an four dimensional tensor, though its unlikely to be stored that way and you don't need all the elements due to symmetry. – Tyberius Sep 2 '20 at 15:16

The AO two-electron integrals (and actually all the AO integrals used in the SCF procedure) can be generated before doing any cycles. This is because they are just among atomic orbitals, which we know from the beginning of the calculation. In practice, you will probably see two-electron integrals recomputed during the SCF cycle, but this is just to avoid storing ~$$N^4$$ such values, which becomes exorbitant for even fairly small calculations.
This just comes down to symmetry. For $$\ce{He}$$ with the 6-31G basis set, you have two atomic orbitals, which should lead to $$2^4=16$$ two-electron integrals. However, because the integrals have permutational symmetry (see this question on Chem SE), there are actually only 6 unique integrals, which you have written in your question.