Skip to content
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

OpenMMSolvation: Support for non-cubic boxes and defined box properties #673

Merged
merged 41 commits into from
Aug 27, 2024

Conversation

IAlibay
Copy link
Member

@IAlibay IAlibay commented Dec 29, 2023

Fixes #585

In this PR:

  • Allows for defining the additional openmm keywords to addSolvent
  • New OpenMM solvation settings + docstring

Developers certificate of origin

@pep8speaks
Copy link

pep8speaks commented Dec 29, 2023

Hello @IAlibay! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 690:1: W293 blank line contains whitespace

Line 15:80: E501 line too long (83 > 79 characters)
Line 112:80: E501 line too long (80 > 79 characters)
Line 141:80: E501 line too long (139 > 79 characters)

Line 90:42: E225 missing whitespace around operator

Line 453:9: E128 continuation line under-indented for visual indent
Line 473:34: E251 unexpected spaces around keyword / parameter equals
Line 473:36: E251 unexpected spaces around keyword / parameter equals

Comment last updated at 2024-08-27 13:21:57 UTC

@IAlibay IAlibay changed the title Update system creation for new solvent component options Update solvation settings for non-cubic boxes, etc... Jan 29, 2024
@richardjgowers richardjgowers added this to the 1.0.0 milestone Jan 30, 2024
@IAlibay IAlibay mentioned this pull request Jan 30, 2024
1 task
@IAlibay IAlibay changed the title Update solvation settings for non-cubic boxes, etc... OpenMMSolvation: Support for non-cubic boxes and defined box properties Feb 1, 2024
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
environment.yml Outdated
@@ -26,6 +26,7 @@ dependencies:
- click
- typing-extensions
- lomap2>=2.3.0
- openmm>=8.0.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These solvation settings need OpenMM 8.0. Overall supporting multiple major versions of OpenMM is probably unwise as we'll need to test them all so I would suggest bumping up the minimum version?

Otherwise we can add a version check to the validator.

environment.yml Outdated Show resolved Hide resolved
@IAlibay
Copy link
Member Author

IAlibay commented Jul 3, 2024

This is low priority, but it would be amazing if we could get it merged sooner than later.

Copy link
Contributor

@hannahbaumann hannahbaumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Just out of curiosity (might be a dumb question): how would you specify the density of molecules in the box?

openfe/protocols/openmm_utils/omm_settings.py Outdated Show resolved Hide resolved
openfe/tests/protocols/test_openmm_settings.py Outdated Show resolved Hide resolved
openfe/tests/protocols/test_openmmutils.py Outdated Show resolved Hide resolved
Co-authored-by: Hannah Baumann <43765638+hannahbaumann@users.noreply.github.com>
@IAlibay
Copy link
Member Author

IAlibay commented Jul 23, 2024

This looks good to me! Just out of curiosity (might be a dumb question): how would you specify the density of molecules in the box?

I don't think it's a dumb question.

Looks like.. you can't? http://docs.openmm.org/development/api-python/generated/openmm.app.modeller.Modeller.html#openmm.app.modeller.Modeller.addSolvent 🙈

I suspect the answer for setting a given density would be to do it manually, selecting a given box size / vectors and then setting the number of waters added manually?

@IAlibay
Copy link
Member Author

IAlibay commented Jul 23, 2024

This looks good to me! Just out of curiosity (might be a dumb question): how would you specify the density of molecules in the box?

I don't think it's a dumb question.

Looks like.. you can't? http://docs.openmm.org/development/api-python/generated/openmm.app.modeller.Modeller.html#openmm.app.modeller.Modeller.addSolvent 🙈

I suspect the answer for setting a given density would be to do it manually, selecting a given box size / vectors and then setting the number of waters added manually?

No... that doesn't work because it's not allowed. Good question indeed.

Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Two questions, nothing blocking

@@ -27,7 +27,7 @@ dependencies:
- openfe-analysis>=0.2.0
- click
- typing-extensions
- openmm !=8.1.0
- openmm >=8.0.0,!=8.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we document the min version of OpenMM we support? Or which versions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not, but we should!

"""
settings = openmm_rfe.RelativeHybridTopologyProtocol.default_settings()
settings.solvation_settings.solvent_padding = 1.5 * unit.nanometer
settings.solvation_settings.box_shape = 'dodecahedron'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this become our new recommendation? (dodecahedron boxes)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term yes, but we'll need to do some performance benchmarks.

@IAlibay
Copy link
Member Author

IAlibay commented Aug 13, 2024

@hannahbaumann if you have time could you have another look at this? I'd like to get to a point where we can merge this but I definitely want your stamp of approval before we do!

Copy link
Contributor

@hannahbaumann hannahbaumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks @IAlibay !

@mikemhenry mikemhenry self-requested a review August 15, 2024 22:42
Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a changelog entry, otherwise it is good to go!

@IAlibay
Copy link
Member Author

IAlibay commented Aug 21, 2024

This could use a changelog entry, otherwise it is good to go!

Good call, done!

@IAlibay IAlibay merged commit 5745e5e into main Aug 27, 2024
11 checks passed
@IAlibay IAlibay deleted the noncubic-solvent branch August 27, 2024 14:00
@IAlibay IAlibay mentioned this pull request Sep 26, 2024
6 tasks
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.

Solvate with non-cubic boxes
6 participants