Strange SCF convergence with basis set projection with ECP

Dear Psi4 developers and users,

I have done a B3LYP calculation first on a mixed basis set named LACVPs, with metal using LANL2DZ and other elements using 6-31G*. Then I would like to feed the converged wavefunction (npy file) of B3LYP/LACVPs for a calculation of a different basis set, say B3LYP/def2-SVP, to ensure the two calculations converge to the same electronic state. However, the new B3LYP/def2-SVP calculation is really hard to converge and finally converge to a completely different electronic state (B3LYP/def2-SVP has a <S^2> of 4.61 (absurdly high) and B3LYP/LACVPs has a <S^2> of 1.16, where the expected <S^2> =0.75). I also did another controlled experiment to narrow the range of this problem to the basis set projection with ECP, here specifically LANL2DZ. I define a new mix basis named DEFCVPs, with metal using LANL2DZ and other elements using def2-SVP. Then I repeat the procedure of feeding the npy file of B3LYP/LACVPs for a new calculation of B3LYP/DEFCVPs. This time the calculation proceeds well and converges to the same electronic state and has a <S^2> of 1.15). Any ideas about why this happens would be appreciated. Thank you!

PS: I have attached the two output files just in case anyone is interested to look at them.

Best,
Chenru
output-lacvps-def2svp.dat (25.2 KB) output-lacvps-defcvps.dat (21.2 KB)

Are the def2-ECPs and the LANL ECPs describing a different number of core electrons?

@hokru I think you have a good hunch about this! def2-ECPs and the LANL ECPs do not have the same core electrons (def2 has 10 more than LANL). Do you think the basis set projection, in this case, can still be done? Do I just need to turn on some keywords in Psi4? I tried with another software (closed source) and the same procedure worked there.

I am not sure basis set projection has been tested with differently sized ECPs. So this could be a genuine bug.
Would you mind opening a PR about this?

I think the code doing the projection is at the function scf_helper,

pCa = scf_wfn.basis_projection(Ca_occ, old_wfn.nalphapi(), old_wfn.basisset(), scf_wfn.basisset())
pCb = scf_wfn.basis_projection(Cb_occ, old_wfn.nbetapi(), old_wfn.basisset(), scf_wfn.basisset())

Probably this function won’t work in cases where old_wfn.nalphapi() != scf_wfn.nalphapi(). But I really don’t know much about C to help to fix it…

I meant opening an issue, not pull request! Sorry :slightly_smiling_face:

Otherwise I’ll open one on behalf of this forum thread, but maybe you want to attach your name to it.

Sure I will do it later tonight!