-
Notifications
You must be signed in to change notification settings - Fork 25
Make PACKMOL wrappers public #1252
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
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1252 +/- ##
==========================================
+ Coverage 93.57% 93.85% +0.27%
==========================================
Files 72 73 +1
Lines 6228 6234 +6
==========================================
+ Hits 5828 5851 +23
+ Misses 400 383 -17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No idea why the docs aren't building ... works for me locally with a fresh environment 😕 |
4c823b2 to
dfabd05
Compare
|
j-wags
left a comment
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 haven't looked at the docs (sorry, maybe something @Yoshanuikabundi would be more efficient at) but once those build get fixed this PR looks good to me!
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 have serious misgivings about the way we currently add a buffer around the packmol box, and then try to remove it by growing the box to account for it. I'd like to discuss the issue synchronously before merging please!
Edit: but I did fix the docs issue!
| The path to the output file. | ||
|
|
||
| """ | ||
| box_size = (box_size - tolerance).m_as("angstrom") |
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 think this line has been the source of much confusion in the packmol wrapper. The notes on the public functions state:
When calling Packmol, each linear dimension of the box is scaled up by 10%. However, Packmol by default adds a small buffer (defined by the tolerance argument which otherwise defines the minimum distance, default 2 Angstrom) at the end of the packed box, which causes small voids when tiling copies of each periodic image. This void is removed in hopes of faster equilibration times but the box density is slightly increased as a result.
That small buffer isn't added by packmol, it's added by me, here. I expected that at high (eg, biological) densities you might get clashes because packmol doesn't account for PBCs, and so I added a small, tunable buffer region. This box size refers to the size of the box that packmol fills with solvent, not the simulation box (which packmol has no knowledge of and is set on the topology itself). A lot of the complex code for handling PBCs in this module is to get everything into a single rectangular prism so that packmol can just treat it as a box. This allows the packmol wrapper to be used for both NVT and NVP simulations in arbitrary triclinic boxes without the user having any surprises, and in my experience the time taken to fill the box in NVT is very small (though I admit full equilibration might take longer).
If this buffer region isn't needed or desired, I would strongly prefer we remove it and remove the code enlarging the box by 10% than leave things as they are. This buffer region doesn't disrupt any of the users expectations - Packmol boxes are expected to need thorough equilibration anyway.
If this doesn't make sense or @mattwthompson disagrees, I would like to ask that we delay merging this until we can discuss it synchronously please!
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 am splitting this change off into a separate PR
Description
Resolves #1170
Checklist