Gradient of forces with respect to positions #321
-
Hi, I am working on a project where I need to compute the gradient forces with respect to particle coordinates. Right now, I am thinking to do this numerically, but it is less elegant than doing it through directly. Is there a simple way to achieve this with the current version of nequip/allegro? And if not, is there a simple way to implement this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @sigbjobo , I think this should be addressed by #292 (comment). Please note that since that post the I'd still be happy to accept a PR adding this and don't think it should be too much work. (Fair warning, 2nd derivatives in PyTorch were, at least last time I checked, not particularly fast.) |
Beta Was this translation helpful? Give feedback.
Hi @sigbjobo ,
I think this should be addressed by #292 (comment). Please note that since that post the
functorch
/torch.autograd.functional
APIs have evolved and matured somewhat, and there may be better / faster ways to do it, such as trying withvectorize=True
.I'd still be happy to accept a PR adding this and don't think it should be too much work. (Fair warning, 2nd derivatives in PyTorch were, at least last time I checked, not particularly fast.)