output exchange energy and potential at each grid point


Click here for full thread
Just Got Here
Dear All,

I would like to output both exchange(correlation) energy density and potential at each grid point.
I guess those quantities are definitely evaluated during the calculation for any DFT.
I looked at /PATH_TO_NWCHEM/src/nwxc/nwxc_x_pbe.F for PBE exchange.
I understand the lines for evaluating the exchange energy.
However, I did not see the codes for evaluating exchange potential.
To calculate GGA exchange potential, two quantities, the laplacian of density and $\nabla\rho \cdot \nabla |\nabla \rho|$, are required based on PRB, 86, 8800 (1986).

I am wondering could anyone with the experience of implementing density functionals in NWChem give me some advice?

Thanks a lot!