Hi,

I am currently using the Psi4 Python API for my phd project and I am guessing if it would be possible to obtain the gradient and the laplacian generated by the density from a dft calculation, i.e using the VBase class. Eventually these quantities have to be exported on the numerical integration grid. Any suggestion is welcome and really appreciated. Thank you for your time.

Matteo

This tutorial might help: https://github.com/psi4/psi4numpy/blob/master/Tutorials/04_Density_Functional_Theory/4b_LDA_kernel.ipynb

The extension to derivatives is somewhat straightforward if you know the derivative formulas. I can try to dig up the papers if you need.

Edit here is the C++ code which may help as well: https://github.com/psi4/psi4/blob/master/psi4/src/psi4/libfock/points.cc#L90

If you get a python version working we would love a submission!

Thank you for your reply. If it is possible for you the reference to the papers would be useful.

kind regards.

M

Dear Daniel

which is eventually you preferred approach for a submission ? a fork and a pull ?

@lstorchi Right. We have more detailed instructions here if you need them. Let us know if anything is unclear.

Eq 36/37 here: N.C. Handy, D.J. Tozer, G.J. Laming, C.W. Murray, and R.D. Amos, Israel Journal of Chemistry **33** , 331 (1993).

Eq 6/7/8 here: 1 B.G. Johnson and M.J. Fisch, J. Chem. Phys. **100** , 7429 (1994).

The present them in different ways, but are the same equations. Some are easier to read than others. I think Eq7 in the Fisch paper is particularly clear. It would be good to study the equations and the C++ code in conjunction.