ICAMS / python-ace

Other
71 stars 19 forks source link

Gradients of B-Basis Projections #14

Closed Basti1211 closed 11 months ago

Basti1211 commented 2 years ago

Hello,

your tool allows obtaining the projections of the B-basis for configurations. Does your tool also support retrieving the gradients of the B-basis functions at specific positions? I need those for a GPR-based approach to construct force kernels.

Best Regards!

mikejwaters commented 1 year ago

I think I would also like this feature for my workflow. I'm still learning the internals though.

pmrv commented 1 year ago

It'd be nice to have them, but looking at the current code, I guess the issue is that the ace evaluator never explicitly saves them.

If I understand it correctly the relevant parts are here and here. In a custom program, it shouldn't too hard to change this part and just drop the multiplication with the weights*(), but making it available via the ASE calculator nicely seems to be a bit harder.

yury-lysogorskiy commented 1 year ago

We implemented them recently, just need some time to move it to public branch

pmrv commented 1 year ago

I understand that exposing all B basis derivatives is much more memory heavy than doing the summation inline, but at least for my application it would already be enough to get the pairwise forces between atoms. Though now that I think about it, I'm not sure how you'd define those in terms of higher n-body correlations. I guess for the virial that the calculator outputs this has to be done somehow?

yury-lysogorskiy commented 1 year ago

@pmrv @Basti1211 @mikejwaters @jmgoff I prototyped linear ACE fit (i.e. by calcualtion of separated B-func derivatives) in this branch https://github.com/ICAMS/python-ace/tree/feature/linear-fit

mikejwaters commented 1 year ago

Hi @yury-lysogorskiy, sorry for the delay but this is great news!

Ralf just gave a talk at my university and he spoke very highly of you. If I ever have free time again, maybe I can work on implementing hyperactive learning (also called GOFEE, or uncertainty biased molecular dynamics) with some oversight from you.

jmgoff commented 1 year ago

This is excellent, thank you! I've been looking into it some more, and it looks very clean and easy to use. I look forward to adding some of this to LAMMPS.