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

Expand water virtual site tests #680

Merged
merged 6 commits into from
Jan 19, 2024
Merged

Expand water virtual site tests #680

merged 6 commits into from
Jan 19, 2024

Conversation

IAlibay
Copy link
Member

@IAlibay IAlibay commented Jan 5, 2024

Adds more checks #678

TODO:

  • Add test to check if the vs particle parameters are as expected.

Developers certificate of origin

@pep8speaks
Copy link

pep8speaks commented Jan 5, 2024

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

Line 499:62: E225 missing whitespace around operator

Comment last updated at 2024-01-15 23:19:32 UTC

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5f4cc01) 91.40% compared to head (4a5da20) 91.43%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
+ Coverage   91.40%   91.43%   +0.02%     
==========================================
  Files         132      132              
  Lines        9109     9140      +31     
==========================================
+ Hits         8326     8357      +31     
  Misses        783      783              
Flag Coverage Δ
fast-tests 91.43% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IAlibay
Copy link
Member Author

IAlibay commented Jan 5, 2024

@hannahbaumann this is another good one to review if you want to get familiar with a specific section of the HTF.

vs_weights, [0.786646558, 0.106676721, 0.106676721]
)
c, s, e = nonbond.getParticleParameters(entry)
assert ensure_quantity(c, 'openff').m == pytest.approx(-1.04844)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we look at contributing some sort of assert_quantity_equal(val, expected_mag, expected_unit) to openff units?

Copy link
Member Author

Choose a reason for hiding this comment

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

If Matt wants to? We could also just make our own tooling if it's necessary.

@@ -458,7 +461,58 @@ def test_dry_run_ligand_tip4p(benzene_system, toluene_system,
with tmpdir.as_cwd():
sampler = dag_unit.run(dry=True)['debug']['sampler']
assert isinstance(sampler, MultiStateSampler)
assert sampler._factory.hybrid_system

# Get the htf and check
Copy link
Contributor

Choose a reason for hiding this comment

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

is it going to be a pain to make this a fixture and make these three tests individual?

Copy link
Member Author

Choose a reason for hiding this comment

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

Would have to try, but iirc tmpdir is function scoped, so you can't use it in a module scoped fixture - at least I remember this being a thing in the past. (definitely wouldn't recommend this being function scoped, it's super slow)

Copy link
Contributor

Choose a reason for hiding this comment

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

ah yeah, there's tmp_path_factory which has longer scope

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@richardjgowers richardjgowers merged commit 8a61d1d into main Jan 19, 2024
9 checks passed
@richardjgowers richardjgowers deleted the env-vs branch January 19, 2024 10:52
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.

3 participants