Here is my code snippet computing the relaxed energy to compute the dipole moment and polarizability using the pyhton interface:
psi4.set_options({
'perturb_h': True,
'perturb_with': 'dipole',
'perturb_dipole':h.tolist(), # h is a np array of size 3 containing the field strength
})
E_perturbed = psi4.energy('scf') #- mol.nuclear_repulsion_energy()
return E_perturbed
How can I compute the unrelaxed energies for the same purpose?
I don’t understand what an “unrelaxed energy” is in this context.
Normally, the distinction between “relaxed” and “unrelaxed” properties (and I’m assuming you want to calculate these by finite difference of energies) is only meaningful for electronic structure methods that do not variationally optimize the orbitals.
Perhaps @maalle is interested in computing the energy that would be obtained without relaxation of the wave function under the perturbation? This would be given by the electronic energy E_nopert plus the interaction energy, which is given by the trace of the product of the dipole moment and the density matrix. The easiest way to get the matrix elements of the perturbation might be to ask Psi4 for the core Hamiltonian with the perturbation and without it and to take the difference.