JuliaMolSim / DFTK.jl

Density-functional toolkit
https://docs.dftk.org
MIT License
445 stars 89 forks source link

Kinetic Terms #538

Closed cw-tan closed 3 years ago

cw-tan commented 3 years ago

Hi, I'm pretty new to Julia and DFTK but I was hoping to use DFTK for orbital-free benchmarking. I scanned through the documentation but wasn't sure if it had what I wanted.

After getting the results from a self-consistent field calculation, is there a way to access the positive-definite kinetic energy density as defined here, the kinetic energy contribution to the stress, and the Kohn-Sham potential? Thank you!

antoine-levitt commented 3 years ago

Hi and thanks for your interest!

All of this should be relatively easy, but you do have to look at the code a bit. The examples should help you get the structure. If you're stuck let us know and we can help.

May I ask what you want to do exactly? There's an open issue for Thomas-Fermi here: https://github.com/JuliaMolSim/DFTK.jl/issues/122

antoine-levitt commented 3 years ago

Or for the stresses, even simpler: just change the energies.total line in compute_stresses to energies.kinetic

cw-tan commented 3 years ago

Great, thanks! I literally installed Julia yesterday but I'm eager to have a go at it! I'm just hoping to inspect these quantities from Kohn-Sham DFT to possibly give some insight for the development of kinetic energy functional approximations.

antoine-levitt commented 3 years ago

OK, happy discovery :-) I'm closing the issue for bookkeeping purposes, feel free to ask for help, here or on slack.