Hi.
I need to do a TD-DFT calculation and I need that the program plot me:
1)The total dipole moment of each state
2)The transition dipole matrix. Even the matrix where only the 0–> n terms are present is ok for me.
Can someone help me ?
This is my input now:
import numpy as np
import psi4
from psi4.driver.procrouting.response.scf_response import tdscf_excitations
from psi4.driver.p4util import spectrum
psi4.set_memory(600000000)
molecule {
0 1
O -6.67828 -0.24214 0.00000
H -5.70828 -0.24214 0.00000
H -7.00161 0.29040 0.74348
}
set {
basis def2-TZVP
}
psi4.set_options({
‘save_jk’: True,
})
e, wfn = psi4.energy(“B2PLYP”, return_wfn=True)
res = tdscf_excitations(wfn, states=12)
I don’t know how to do that but if you need the dipole of the molecule you can use a checkpoint file and a post-processing method to compute a dipole. Do, psi4.fchk(wfn,‘H2Opostprocess.fchk’). In IQMol, you can open the resulting checkpoint file and compute a dipole in the left dropdown menu.
I think you might be confused because I don’t think that what you’re asking for is possible in a quantum calculation because individual states can’t diverge. The wavefunction is closed under momentum and attraction to nuclei so it can’t have a dipole. You can only take the products of states to do this. Viz the dipole operator moment in infrared states spanning the totally symmetric irreducible representation psi1* mu psi0 in dipole mu_(1,0) = integration (psi1* mu psi dtau) I think you can take a dot product between vectors in the psi4.gradient() to represent a dipole between excited states since these should change distances by the Franck-Condon principle as gradient returns Hartree/Bohr change of your geometry.
My bad, it might be easier than that. I missed it was TD-DFT, try calling psi4.hessian() on the instantaneous geometry of your choice. Linked documentation below:
https://psicode.org/psi4manual/master/api/psi4.driver.hessian.html