Can one print out only the non-redundant ERIs?


We would like to extract the two-electron integrals from Psi4. This piece of code:

ene,wfn=energy(‘scf’,molecule=mol, return_wfn=True)
mints = MintsHelper(wfn.basisset())
TWO = mints.ao_eri()

prints the entire array, but can we get a folded list of ERIs (i.e. only those that cannot be obtained from symmetry)?


There’s not a special function, but some combination of mints.ao_eri_shell also this and some loops (suggested by Daniel) may get what you want.

    for(int p = 0; p < nmo; p++){
      for(int q = 0; q <= p; q++){
        for(int r = 0; r <= p; r++){
          int smax = (p==r) ? q+1 : r+1;
          for(int s = 0; s < smax; s++){