Skip to content

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

Open
wants to merge 8 commits into
base: ANI-Integration-Check
Choose a base branch
from

Conversation

manangoel99
Copy link
Owner

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.

- 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
Copy link

@greglandrum greglandrum left a 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;

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.

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?

Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants