How to obtain the One-electron overlap matrix

How can I obtain the One-electron overlap matrix

wfn.S().to_array()

from the pairwise overlap of the basis functions?

I noticed that the overlap matrix as defined above is zero for basis functions of the same atom.
Is this correct?

wfn.S is your normalized AO overlap matrix that gets added to the core Hamiltonian. Diagonal elements are 1.

Not sure what you mean, but does it answer your question?

Do I understand correctly, that wnf.S() can be computed without the SCF converged coefficients?
How can I then obtain the overlap matrix (for different basis sets) without invoking the time comsuming
SCF method?

you can built a wavefunction object without doing an scf. This works for me:

mol=psi4.geometry('H -.5 0 0\nH .5 0 0')

set global {
basis def2-SVP
}
scf_wfn=psi4.core.Wavefunction.build(mol, psi4.core.get_global_option('BASIS'))
mints = MintsHelper(scf_wfn.basisset())
ao=mints.ao_overlap()
S = np.array(ao)
np.savetxt('overlap', S)

You want to check here: https://github.com/psi4/psi4numpy/blob/master/Self-Consistent-Field/RHF.py

Since you dont get a fully constructed wfn object back as you would from a scf calculation, I dont think that wfn.S works, and you need to use MintsHelper as above. But…I am also a beginner in this :wink:

How can I do the same code in python?

Hmm, for that you need to adapt the syntax. Check instructions and examples here https://github.com/psi4/psi4numpy and here http://www.psicode.org/psi4manual/1.1/psiapi.html