Assuming I want to compute the atomization energy of methane with PyTorch which has an atomization energy of -0.631 Hartree. I compute the total energy with
eng = psi4.energy('b3lyp/6-311G(2DF,P)')
and I use the reference energies for the atoms in Hartree
H: -0.500273
C: -37.846772
By subtracting these reference energies I get an atomization energy of -0.687 Hartree which is a large difference to the expected result.
I’m not familiar with PyTorch. You’re doing both the molecular and the atomic calculations at the same level of theory? Do you need to do open-shell and adjust the spin multiplicity for your atomic calcs?
That’s where multiplicity and open-shell come in. In that paper they use UHF for all the atomic calcs (set reference uhf). And you’ll probably have to adjust multiplicity, too. One place to start is https://github.com/psi4/psi4/blob/master/psi4/src/psi4/libscf_solver/sad.cc#L175-L180 +1 for mult (molecule {\n0 2\n<coordinates>\n} for neutral doublet).
You’ll want to paste the whole input surrounded by triple backticks. For one thing, psi4.energy() doesn’t take a kwarg mol but rather molecule, and set_options had better be before the energy call.
Maybe I did not state it clearly enough before, but I use the python module psi4 inside a python script (import psi4) and I pasted the exact lines of code that I use and that work well for other molecules.
Of course I set up set_options before the energy call.