brucefan1983 / NEP_CPU

CPU version of NEP
GNU General Public License v3.0
49 stars 15 forks source link

Feature request: Descriptor gradients #20

Open NicklasOsterbacka opened 1 year ago

NicklasOsterbacka commented 1 year ago

I would like to be able to access gradients of descriptors w.r.t. atomic coordinates for some prototype work I am doing with Calorine. Would it be possible to write a function for this in NEP_CPU, @brucefan1983? From what I can tell, the gradients are currently baked directly into the force expressions which makes it hard for me to see which bits would go where.

brucefan1983 commented 1 year ago

Could you specify the exact quantity you need? Is it

$$ \frac{\partial q{\nu}^i} {\partial \vec{r}{ij}} $$

for all the atoms $i$ and all the neighbors $j$, and all the descriptor component $\nu$?

I am also curious what will be the usage.

NicklasOsterbacka commented 1 year ago

Yes, those should be the quantities I would like to access!

I have sent you an email with the details. Hope that's alright!