JuliaMolSim / DFTK.jl

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

Autodiff #614

Open antoine-levitt opened 2 years ago

antoine-levitt commented 2 years ago

Lots of boxes! Gotta check them all!

Forward mode

Reverse mode

Solvers

Properties

dynamic-queries commented 2 years ago

Hey I would like to contribute to the issues here. (one at a time, at least :D). Could you elaborate on "interfacing libxc" ?

mfherbst commented 2 years ago

Hi @dynamic-queries. Thanks for your interest and sorry it took us so long to get back to you. Pretty busy times at the moment ;) Indeed any help on this is very much welcome!

To answer your question upfront, "interfacing libxc" refers to writing custom rules for forward-mode and adjoint mode for Libxc.jl such that differentiation through this foreign c++ code can be performed. That is actually pretty tricky and would thus not be what I would recommend you to start with if you want to get into the topic. To summarise in one sentence it involves digging into low-level C code and massaging it to work with AD, for which you need a pretty solid idea how XC functionals are usually implemented.

Of course feel free to give that a go, but I just wanted to also give you a few pointers to things that can be tackled more easily and are probably better to get started:

In case any of this interests you, just let us know. I'm happy to provide more details.