Since moving to LibInt2, the functions that access one-electron integrals, such as ao_overlap(), ao_kinetic(), ... behave differently when given no parameters (so the integrals are computed within the orbital basis set) and when given two basis set parameters (which is e.g. needed to access integrals in an auxiliary basis). The former gives an appropriate symmetric matrix with all integrals filled in. The latter produces a matrix with only the lower triangle filled with integrals and the upper triangle containing zeros. I think it would be better if the integral functions always filled in the other triangle (by symmetry) and returned a symmetric matrix.
Here's the Python code that demonstrates the issue in case of the AO overlap integrals:
import sys
import numpy as np
import psi4
psi4.set_memory('16 GB')
np.set_printoptions(threshold=sys.maxsize)
mol = psi4.geometry("""
0 1
O -0.0669991400 0.0000000000 1.4943547400
H 0.8157342700 0.0000000000 1.8658663900
H 0.0688551000 0.0000000000 0.5391427700
units angstrom
symmetry c1
""")
psi4.set_options({'basis': 'aug-cc-pvdz',
'df_basis_mp2':'aug-cc-pvdz-ri',
})
conv = psi4.core.BasisSet.build(mol,'BASIS', psi4.core.get_global_option('BASIS'))
aux = psi4.core.BasisSet.build(mol,'DF_BASIS_MP2',"", "RIFIT", psi4.core.get_global_option('DF_BASIS_MP2'))
wfn = psi4.core.Wavefunction.build(mol, psi4.core.get_global_option('BASIS'))
mints = psi4.core.MintsHelper(wfn.basisset())
Soo = np.asarray(mints.ao_overlap())
Sxx = np.asarray(mints.ao_overlap(aux,aux))
print("Orbital overlap matrix")
print(Soo)
print("Auxiliary overlap matrix")
print(Sxx)
Since moving to LibInt2, the functions that access one-electron integrals, such as
ao_overlap(),ao_kinetic(), ... behave differently when given no parameters (so the integrals are computed within the orbital basis set) and when given two basis set parameters (which is e.g. needed to access integrals in an auxiliary basis). The former gives an appropriate symmetric matrix with all integrals filled in. The latter produces a matrix with only the lower triangle filled with integrals and the upper triangle containing zeros. I think it would be better if the integral functions always filled in the other triangle (by symmetry) and returned a symmetric matrix.Here's the Python code that demonstrates the issue in case of the AO overlap integrals: