does not throw an error, but I cannot find any results under oeprop.Exvals(), oeprop.Eyvals(), oeprop.Ezvals(), or oeprop.Vvals() and I do not see any files written to disk.
I’d be grateful if somebody could point me towards what I’m doing wrong.
Thank you very much for the quick reply (and all your past replies, for that matter)! I forgot to include return_wfn=True when retyping the commands, thanks for pointing that out. And yes, I’m using version 1.3.2. I couldn’t find instructions on how to access PSI variables in the Python API.
I think I don’t understand what you mean with this relating to oeprop.Exvals(), could you please elaborate?
Thank you very much for pointing me in the right direction, this was very helpful. I’ll briefly document my understanding for anyone who stumbles over this post (and possibly my future self).
Exvals(), Eyvals(), and Ezvals() only ever contain the x, y and z components of the electric field, and only if it was previously computed using something like
The values are then computed on the grid specified in grid.dat and are accessible through oeprop.Exvals() etc.
The same goes for oeprop.Vvals(), which contains the electrostatic potential on the given grid if computed with oeprop.add("GRID_ESP"); oeprop.compute().
All other one-electron properties can be computed using the same syntax, which adds them to psi4.core.variables(). They are accessible through psi4.core.variable(<variable_name>).
Also note that in future versions of PSI4 we are switching to wfn.variables(), i.e. variables are local to the wfn object. The psi4.core.variables() are sort of global will be overwrritten if a second calculation is run.