When doing a frequency calculation (psi4.frequency(return_wfn="on")), the force constants are printed on the output. Are they stored anywhere on the wfn object? I can extract the frequencies and the hessian matrices from the Wavefunction object, but I don’t see a method for the force constants. Is it possible to extract them into an numpy array?
Are you’re referring to the “force constants” given for each vibrational frequency in the output? To my knowledge, those values are not provided in the wfn object, but they can be calculated from the Hessian and geometry. The process of that calculation is long, depending on your background and interest level, but the details are provided here for the Gaussian code, though the approach is basically the same for all quantum chemistry programs.
It might help to simplify things if you could explain what you want to do with the force constants once you have them. No guarantees, though!
So that means the force constant are calculated internally, but I guess they’re not stored anywhere that can be conveniently accessed through the python API.
I did find a function that sort of does this: psi4.driver.qcdb.vib.harmonic_analysis. It’s not as convenient to use, but one of the dictionary entries it outputs are the force constants.
I am using QC-derived force constants for force-field development.