Skip to content

Conversation

@jthorton
Copy link
Collaborator

@jthorton jthorton commented Oct 10, 2025

Partially fixes #1562 by fixing the functions highlighted.
We also improve the build time of the HTF by reducing the number of times we iterate over the openmm topology, see figure for average timings.
htf_speed

Tasks:

  • add tests for the old/new positions functions
  • check we have a regression test for the hybrid openmm topology from the HTF

Checklist

  • Added a news entry

Developers certificate of origin

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.36%. Comparing base (d87dd8f) to head (590e41d).
⚠️ Report is 94 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1566      +/-   ##
==========================================
- Coverage   95.31%   93.36%   -1.95%     
==========================================
  Files         172      172              
  Lines       14482    14492      +10     
==========================================
- Hits        13803    13530     -273     
- Misses        679      962     +283     
Flag Coverage Δ
fast-tests 93.36% <100.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.

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.

Just checking.

unit=unit.nanometer)
for idx in range(n_atoms_old):
hyb_idx = self._new_to_hybrid_map[idx]
hyb_idx = self._old_to_hybrid_map[idx]
Copy link
Member

Choose a reason for hiding this comment

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

This is a fix right?

Copy link
Member

Choose a reason for hiding this comment

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

Partially fixes #1562 by fixing the functions highlighted.

I could also just read...

Copy link
Contributor

Choose a reason for hiding this comment

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

# check we can extract the correct positions for the end states
old_positions = htf.old_positions(htf.hybrid_positions)
# check the shape and positions match the input
assert old_positions.shape == (12, 3)
Copy link
Member

Choose a reason for hiding this comment

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

you can assert positions against htf._old_positions (same for the new ones)

@github-actions
Copy link

No API break detected ✅

@jthorton jthorton requested a review from IAlibay October 14, 2025 10:55
@jameseastwood
Copy link
Contributor

How much effort would it be to backport these changes to feflow?

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.

This looks great, but I'm blocking with the idea that we need to backport the fixes to FEFlow so that there's parity and both sets of tests pass.

@atravitz atravitz added this to the v1.7.0 milestone Oct 14, 2025
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.

not merged in feflow, but tests pass

@IAlibay IAlibay merged commit 78aee37 into main Oct 14, 2025
13 checks passed
@IAlibay IAlibay deleted the htf_updates branch October 14, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HybridTopologyFactory missing tests

6 participants