-
Notifications
You must be signed in to change notification settings - Fork 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
Fix inconsistent units from get_box and nonbondedCutoff #6
Conversation
…that were used to set it up
Fixed issues with testing and removed draft status. Will be merged pending linting passing. Thanks for the PR @rkingsbury! |
Thanks @orionarcher ! This is sufficiently important to get right that I think some follow up work is warranted - e.g. adding a more comprehensive test to confirm that we get the expected density in the expected units (as per the TODO item you added). I will open an issue related to that so we don't lose track. |
The
nonbondedCutoff
in OpenMM must be specified in units of nm, howeverget_box
(which is used byparameterize_system
) returns box dimensions in angstrom. The subsequent calculation at this line thus incorrectly sets thenonbondedCutoff
to either 10 nm (100 Angstrom), or 10x the intended box size.This PR contains a fix for the inconsistent units, calculating the
nonbondedCutoff
as the min of (1 nm) or (1/2 the box size in nm). I still need to add a test.