Skip to content

Only warn if forces mismatch in hash check#1914

Merged
IAlibay merged 12 commits into
mainfrom
issue-1913
Apr 22, 2026
Merged

Only warn if forces mismatch in hash check#1914
IAlibay merged 12 commits into
mainfrom
issue-1913

Conversation

@IAlibay
Copy link
Copy Markdown
Member

@IAlibay IAlibay commented Apr 3, 2026

Fixes #1913

This unfortunately makes system checking much weaker. I don't think there's much of a way around though:

  1. There's no way for us to know which two forces should match (i.e. we can't rely on names or force groups).
  2. Small changes in floats will change the hash.

That being said, the exact System check is overly cautious. Generally, this mismatch would happen (where the particle numbers match and the number of forces match and the barostat matches) in cases where someone is actively trying to do something bad (i.e. the risk of it happening accidentally is low to non-existent).

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

@IAlibay
Copy link
Copy Markdown
Member Author

IAlibay commented Apr 3, 2026

pre-commit.ci autofix

@IAlibay IAlibay requested a review from jthorton April 3, 2026 00:42
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 16.00000% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.51%. Comparing base (b501e2e) to head (d1a46d3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...fe/tests/protocols/openmm_ahfe/test_ahfe_resume.py 16.00% 21 Missing ⚠️
...sts/protocols/openmm_rfe/test_hybrid_top_resume.py 18.18% 18 Missing ⚠️
...openfe/protocols/openmm_utils/system_validation.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1914      +/-   ##
==========================================
- Coverage   94.69%   90.51%   -4.19%     
==========================================
  Files         210      210              
  Lines       18808    18841      +33     
==========================================
- Hits        17811    17054     -757     
- Misses        997     1787     +790     
Flag Coverage Δ
fast-tests 90.51% <16.00%> (?)
slow-tests ?

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/openfe/protocols/openmm_utils/system_validation.py Outdated
Comment thread src/openfe/tests/protocols/openmm_rfe/test_hybrid_top_resume.py Outdated
@IAlibay
Copy link
Copy Markdown
Member Author

IAlibay commented Apr 8, 2026

pre-commit.ci autofix

Copy link
Copy Markdown
Collaborator

@jthorton jthorton left a comment

Choose a reason for hiding this comment

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

lgtm lets get this in now and look to improve the check later!

@github-actions
Copy link
Copy Markdown

No API break detected ✅

@IAlibay IAlibay merged commit 7959cc6 into main Apr 22, 2026
9 of 10 checks passed
@IAlibay IAlibay deleted the issue-1913 branch April 22, 2026 17:22
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.

Force checks in resume functionality can fail due to machine precision

2 participants