Conversation
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
# Conflicts: # openfe/tests/conftest.py # openfe/tests/protocols/openmm_rfe/test_relative.py
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
atravitz
left a comment
There was a problem hiding this comment.
with the addition of this test data, we should revisit our "what to zip" conversation.
| raise RuntimeError(f"Inconsistent CMAPTorsionForce between end states expected to be present in both" | ||
| f"but found in old: {bool(cmap_old)} and new: {bool(cmap_new)}") | ||
|
|
||
| if cmap_new == cmap_old is None: |
There was a problem hiding this comment.
You check this both here and here, so this code path will likely not be hit by tests.
There was a problem hiding this comment.
Reworked slightly to only check in the main _handle_cmap_torsion_force function.
openfe/tests/data/htf/t4_lysozyme_data/t4_lysozyme_solvated.pdb
Outdated
Show resolved
Hide resolved
|
|
||
| @staticmethod | ||
| def _verify_cmap_compatibility( | ||
| cmap_old: openmm.CMAPTorsionForce | None, |
There was a problem hiding this comment.
Could not account for the None? Also, indentation is odd here, did ruff formatting pass?
There was a problem hiding this comment.
Somehow ruff did work :/, not sure what you mean with regards to the None.
There was a problem hiding this comment.
Since you're testing for None before you get to this method, I was wondering if it made sense for you to not do that in both places. So technically if you wanted, you could just assume that these parameters are never None and that you did the checking ahead of time?
There was a problem hiding this comment.
Alternatively, just don't check for None in the method that calls this method.
|
|
||
| # verify compatibility and extract numbers of maps and torsions | ||
| ( | ||
| cmap_old, |
There was a problem hiding this comment.
It's unclear to me, why return the input cmaps?
There was a problem hiding this comment.
Just so we don't have to pull them out twice, but happy to change this if it makes it easier to follow?
There was a problem hiding this comment.
I'm confused, why would we be pulling them twice? I.e. aren't they just the same as what we give in the input?
There was a problem hiding this comment.
Ohh you mean the force objects rather than the cmap grids, yeah we can stop returning the forces as well!
There was a problem hiding this comment.
I think this is left over from the first design where the systems are passed in and these are extracted good catch!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1695 +/- ##
==========================================
- Coverage 95.41% 93.15% -2.27%
==========================================
Files 185 187 +2
Lines 16045 16231 +186
==========================================
- Hits 15310 15120 -190
- Misses 735 1111 +376
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
IAlibay
left a comment
There was a problem hiding this comment.
One question about that sigma_old change - my understanding is that it doesn't matter because the LJ component should be zeroed out with epsilon set to zero (and you have to keep sigma non zero because otherwise all the problems happen). But it's unclear to me if there's an ulterior motive behind the change.
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
|
No API break detected ✅ |
No thats correct, this is from the other general tests that I was doing on the HTF, I set it to what I expected it to be but as you point out this does not change the result as the energy is always zero with epsilon set to zero. |
Adds support for CMAPTorsionForce in relative hybrid topology simulations. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com> Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>
Fixes #1658 by adding support for
CMAPTorsionForcenot in the alchemical region for the relative hybrid topology protocol. Tests developed in jthorton/htf-tinker#2 are also included to add better coverage of the factory here.Checklist
newsentry, or the changes are not user-facing.pre-commit.ci autofixbefore requesting review.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