-
Notifications
You must be signed in to change notification settings - Fork 0
Ani numeric differentiation #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ANI-Integration-Check
Are you sure you want to change the base?
Conversation
- Pass variable in which AEV is to be stored as reference - Added edge case handling in which no atoms lie within the cutoff radius of each other
… the atom along + and - x, y and axes and finding derivative by first principle
- Added tests for ANI Convenience functions - Added python wrappers and python tests for the convenience functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looks good. a few suggestions here
auto initEnergy = this->dp_forceField->calcEnergy(pos); | ||
|
||
// + - x movement | ||
pos[3 * this->d_atomIdx] += 1e-5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the displacement amount a const so that you don't have to keep repeating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you pick the value 1e-5
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came up with 1e-5 with a little bit of experimentation.
I tried smaller values but anything lesser didn't really improve the accuracy from the torchani derivatives.
This PR implements the minimization of atomic conformations using the gradients calculated using numeric differentiation from the ANI force field.
The Numeric Differentiation code is in the getGrad function in Code/ForceField/ANI/AtomicContrib.cpp.
The corresponding convenience functions are present in Code/GraphMol/ForceFieldHelpers/ANI/ANI.h.
The python wrappers have also been implemented.