-
Notifications
You must be signed in to change notification settings - Fork 81
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
Water box #1115
Water box #1115
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Tests pass locally but fail on the cloud. I think it is related to using packmol; I'll revise the tests. |
Said failed test:
|
From the documentation about the |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1115 +/- ##
==========================================
+ Coverage 86.89% 87.15% +0.25%
==========================================
Files 61 62 +1
Lines 6319 6422 +103
==========================================
+ Hits 5491 5597 +106
+ Misses 828 825 -3
☔ View full report in Codecov by Sentry. |
Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com>
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.
LGTM! Only minor suggestions regarding docstrings consistency, code styles, etc., but main logic seems great.
Putting a note here in case we need to reference it later. Mamba started pulling protobuf 4.22.5 (rather than 4.21.12). 4.22.5 won't import properly unless you export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python in the shell (telling it to use python, not c++). As such, it appears that the problem may actually lie in libprotobuf (the associated c++ library, based on reported issues from prior versions where this has happened). Co pinned 4.21 and all tests appear to pass without needed to do the export statement. |
It looks like bleeding edge tests are failing because it can't find symengine. I'm guessing this package just hasn't been included in the testing yaml file. |
I included symengine in the environment_dev.yml file (confirmed it got installed by mamba), but bleeding edge tests still seems to be failing because they can't find symengine. . |
Symengine is technically a C++ package and will need its python API ( |
@daico007 I'll revert adding that to the dev.yml and then I think we are ready to merge. |
Sounds cool! |
Water box (mosdef-hub#1115)
PR Summary:
This adds a recipe to efficiently initialize a box of 3-site water molecules at ~1000 kg/m^3. This works by reading in a 4nm x 4nm x 4 nm relaxed water configuration (run in gromacs with tip3p and saved as a .gro file ) and performing any duplication/cropping of the configuration as necessary.
Since initializing water is a very common function, it seems to be a reasonable case to have a prebuilt function, as compared to calling packmol every time, since packmol: (1) will be much slower and (2) will not necessarily generate a low energy state for water.
A few features worth noting:
usage is pretty simple:
`
from mbuild.lib.recipes.water_box import Water3SiteBox
new_box = mb.Box([7.0, 3.0, 6.0])
wb = Water3SiteBox(box=new_box)
`
This also addresses issue #1116 where unbounded sites in the compound got added twice after calling condense. The code will now check to ensure an unbonded particle is not part of a compound we have already added. This bug came up when I tried to initialize a tip4p configuration.
PR Checklist