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
fix: correct usage of nonbond energy for close contacts #368
Conversation
@cbaakman , do you think we need to create a test to check that the correct parameters are used? Do you have an idea how to do this in a simple way? |
We could at least check the output of the function |
I see that numpy is still used here. I wonder whether we could use torch instead. |
I actually since noticed that in PR #348 , you added tests for exactly this (although the function used there is not part of the PR, maybe you forgot to push that file?). I am guessing you looked at the structure by eye and found residues at different covalent bonding distances to test individually. I can indeed use those same residues to test the output of It would be even nicer to test whether the output of |
What would the advantage be? Speed? |
Yes, we could use the GPU. As I understand, numpy is always CPU. |
@cbaakman , can you please re-review this, as it is now a completely different PR than it was the first time you looked at it. |
|
For the test, we should compare with real force field calculations. For example, for l LYS A 3 C TYR B 72 CZ 8.363386 the CNS calculated Eelec energy using OPLS force field is:
Also, for the attached pdb file, the inter-chain energy should be: Evdw = -33.1338 with hydrogens (or -29.729 without hydrogens), Eelec = -8.87. I think we should move to openMM soon to avoid all these... |
Given that we are planning to move to openMM within a reasonable amount of time, do you think it's ok to leave the tests as they are for now, rather than spend time on doing it as you suggest here? |
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.
Nicely done!
Previously, a distinct set of parameters was used to calculate Van der Waals energy, depending on whether atoms are part of the same residue or not. Electrostatic energy was calculated in the same way for any atom pair.
In the current PR, this is changed such that:
See feat: redefine potential energy terms between atom pairs, depending on bond distance #357 for more details
Tests were adjusted and added according to above rules.
Also, nomenclature has been improved for: