Dear Developers,
I found that the Hamiltonians obtained from pyscf and psi4 are different. For example,
from pyscf import gto, scf
import psi4
mol = gto.M(atom='O 0 0 0; H 0 1 0; H 0 0 1', basis='def2-svp')
rhf = scf.RHF(mol)
rhf.kernel()
H_pyscf = rhf.get_hcore()
geom = """
O 0 0 0
H 0 1 0
H 0 0 1
symmetry c1
units angstrom
"""
mol_psi4 = psi4.geometry(geom)
psi4.set_options({'reference': 'rhf', 'basis': 'def2-SVP'})
scf_e, scf_wfn = psi4.energy('scf', molecule=mol_psi4, return_wfn=True)
H_psi4 = scf_wfn.H().np
Since the Hamiltonian is a (24, 24) matrix, I only print the first dimension here:
# H_pyscf[0]
array([-3.29856601e+01, 1.11013177e+01, 5.12600489e+00, 0.00000000e+00,
1.99302401e-02, 1.99302401e-02, 0.00000000e+00, 2.67199490e-03,
2.67199490e-03, 0.00000000e+00, 0.00000000e+00, 7.22474019e-04,
0.00000000e+00, -1.25136171e-03, 1.37360210e+00, 1.96479169e+00,
0.00000000e+00, -2.50325889e+00, 6.39602699e-04, 1.37360210e+00,
1.96479169e+00, 0.00000000e+00, 6.39602699e-04, -2.50325889e+00])
# H_psi4[0]
array([-3.29856601e+01, 1.11013177e+01, 5.12600489e+00, 2.81856159e-02,
0.00000000e+00, 0.00000000e+00, 3.77877143e-03, 0.00000000e+00,
0.00000000e+00, 7.22474018e-04, 0.00000000e+00, 0.00000000e+00,
-1.25136171e-03, 0.00000000e+00, 1.37360210e+00, 1.96479168e+00,
-1.76961906e+00, 0.00000000e+00, -1.77052360e+00, 1.37360210e+00,
1.96479168e+00, -1.76961906e+00, 0.00000000e+00, 1.77052360e+00])
The AOs in pyscf are
['0 O 1s ', '0 O 2s ', '0 O 3s ', '0 O 2px ', '0 O 2py ', '0 O 2pz ', '0 O 3px ', '0 O 3py ', '0 O 3pz ', '0 O 3dxy ', '0 O 3dyz ', '0 O 3dz^2 ', '0 O 3dxz ', '0 O 3dx2-y2', '1 H 1s ', '1 H 2s ', '1 H 2px ', '1 H 2py ', '1 H 2pz ', '2 H 1s ', '2 H 2s ', '2 H 2px ', '2 H 2py ', '2 H 2pz ']
The differences are occured when l>0
but it will not change the eigenvals. So what the difference between the definition of AOs in pyscf and psi4? And how to align the AOs between pyscf and psi4?