I am trying to calculate the dipole moment and energy of a diatomic molecule, magnesium fluoride, using PsiAPI. The manual formats the code for this as follows:
E, wfn = energy('hf', return_wfn=True) oeprop(wfn, 'DIPOLE', 'QUADRUPOLE', title='H3O+ SCF')
My code is very similar to this, it’s laid out as follows:
E, wfn = psi4.energy('scf', bsse_type='nocp', return_wfn='on') data[1,i] = 27.211*E data[9,i] = psi4.oeprop(wfn, 'DIPOLE')
(Note that both the energy and the dipole moments are being calculated at different molecular separations using a for loop, and the results are being saved as entries in the
data matrix.) However, when I try to run this code, I get the following error message:
Fatal Error: Wavefunction::Ca: Unable to obtain MO coefficients. Error occurred in file: D:\a\1\s\psi4\src\psi4\libmints\wavefunction.cc on line: 828
Does anyone know what this means, and what I can do about it? I’m a novice to Psi4 so I apologize if I require additional explanation to understand the issue here. I appreciate any response you can offer me.