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

Move things to utils, test interchange creation #47

Merged
merged 42 commits into from
Oct 7, 2024

Conversation

hannahbaumann
Copy link
Contributor

@hannahbaumann hannahbaumann commented Sep 25, 2024

@pep8speaks
Copy link

pep8speaks commented Sep 25, 2024

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

Line 77:80: E501 line too long (83 > 79 characters)
Line 111:80: E501 line too long (81 > 79 characters)
Line 169:80: E501 line too long (85 > 79 characters)

Line 13:80: E501 line too long (86 > 79 characters)

Line 25:80: E501 line too long (82 > 79 characters)
Line 35:80: E501 line too long (84 > 79 characters)
Line 57:80: E501 line too long (82 > 79 characters)

Comment last updated at 2024-09-26 12:24:25 UTC

Base automatically changed from protocol_updates to main September 25, 2024 12:11
smc_components = {}
prot_settings = GromacsMDProtocol.default_settings()
# The function expects a settings dict
settings = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

create_openmm_systems takes in a settings dict, which in the protocol is created using the _handle_settings function. This makes this test not so pretty, as I have to create the dictionary. Should I change the function to instead take in the actual settings objects? Or is this ok?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I would encourage changing the method to not take in the whole dictionary unless you can avoid it. If you only rely on a couple of settings, it can make life a lot easier (if it's a whole bunch of settings then that's a different issue).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this to instead pass in the individual settings. Alternatively, I was thinking we could also have an SystemCreationSettings class that contains the settings necessary to create the OpenMM system to distinguish with the settings that are related to Gromacs. But I'm not sure if that would be confusing to the user.

@hannahbaumann hannahbaumann changed the title [ WIP ] Move things to utils, test interchange creation Move things to utils, test interchange creation Sep 27, 2024
smc_components = {}
prot_settings = GromacsMDProtocol.default_settings()
# The function expects a settings dict
settings = {}
Copy link
Member

Choose a reason for hiding this comment

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

Yes, I would encourage changing the method to not take in the whole dictionary unless you can avoid it. If you only rely on a couple of settings, it can make life a lot easier (if it's a whole bunch of settings then that's a different issue).

openfe_gromacs/protocols/gromacs_utils/write_mdp.py Outdated Show resolved Hide resolved
openfe_gromacs/tests/protocols/test_create_systems.py Outdated Show resolved Hide resolved
openfe_gromacs/tests/conftest.py Show resolved Hide resolved
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 98.05825% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.29%. Comparing base (33a5cfa) to head (9ec736c).
Report is 45 commits behind head on main.

Additional details and impacted files

Copy link
Member

@IAlibay IAlibay 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! just a couple of issues worth raising for future work.

@hannahbaumann hannahbaumann merged commit a4496dd into main Oct 7, 2024
9 checks passed
@hannahbaumann hannahbaumann deleted the move_things2utils branch October 7, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment