Skip to content

Decouple the solvent and vacuum lambda schedules for the AHFE Protocol and remove redundant windows. - #2241

Merged
IAlibay merged 12 commits into
mainfrom
fix-ahfe-lambdas
Oct 7, 2026
Merged

IAlibay merged 12 commits into
mainfrom
fix-ahfe-lambdas

Conversation

@IAlibay

@IAlibay IAlibay commented Oct 5, 2026

Copy link
Copy Markdown
Member

Description

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes / no
If yes, please provide details here:

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.
  • Adhered to the contribution guidelines
  • Filled in the AI generated code disclosure.

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

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.32258% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.37%. Comparing base (b917eda) to head (216410b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...enfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2241      +/-   ##
==========================================
- Coverage   95.13%   90.37%   -4.76%     
==========================================
  Files         224      224              
  Lines       22009    22086      +77     
==========================================
- Hits        20938    19961     -977     
- Misses       1071     2125    +1054     
Flag Coverage Δ
fast-tests 90.37% <90.32%> (?)
slow-tests ?

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

☔ View full report in Codecov by Harness.
📢 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.

@IAlibay

IAlibay commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

pre-commit.ci autofix

0.0, 0.25, 0.5, 0.75, 1.0,
],
lambda_vdw=[
0.0, 0.0, 0.0, 0.0, 1.0,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could also do all 0.0, but I thought adding at least a 1.0 would make sure the system is exactly the same (i.e. the parameters in the custom nonbonded are the same) as the end state in solvent.

# When annihilating sterics, the intramolecular LJ interactions
# are also turned off, so the vacuum leg needs intermediate vdw windows
vacuum_lambda_vdw = self.settings.vacuum_lambda_settings.lambda_vdw
if self.settings.alchemical_settings.annihilate_sterics and not any(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Leaving this outside of validate_lambda_schedule since it's very specific to just the vacuum vdw.

@IAlibay

IAlibay commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

pre-commit.ci autofix

Comment thread pyproject.toml
license-files = [ "LICENSE" ]
authors = [ { name = "The OpenFE developers", email = "openfreeenergy@omsf.io" } ]
requires-python = ">=3.11"
requires-python = ">=3.11,<3.15"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@atravitz FYI - pre-commit wanted to add py3.15 to the classifiers, so I'm forcing it not to do that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

FYI - I'm generating a new file, just going to a take a little bit of time.

@IAlibay
IAlibay marked this pull request as ready for review October 6, 2026 09:34
@IAlibay IAlibay mentioned this pull request Oct 6, 2026
9 tasks
Comment on lines 46 to 51
@pytest.mark.parametrize(
"val",
[
{"elec": [0.0, 1.0], "vdw": [1.0, 1.0], "restraints": [0.0, 0.0]},
],
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did we lose a confirguration here for the parametrize flag or should this be removed for:

  • test_validate_lambda_schedule_naked_charge
  • test_validate_lambda_schedule_nreplicas
  • test_validate_lambda_schedule_nwindows
  • test_validate_lambda_schedule_nonzero_restraints

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sorry not fully sure what you mean here - is the question about why there's only one entry in the parameterize?

@jthorton jthorton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeeey more settings, minor test things to maybe change but I'll approve early!

@hannahbaumann hannahbaumann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @IAlibay , lgtm!

@IAlibay

IAlibay commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Going to merge as completed, benchmarks might come in the next 24h or so, but there's issues with HPC3. It shouldn't hold off the release though.

@IAlibay
IAlibay merged commit d2e25c4 into main Oct 7, 2026
8 of 9 checks passed
@IAlibay
IAlibay deleted the fix-ahfe-lambdas branch October 7, 2026 13:46
atravitz pushed a commit that referenced this pull request Oct 7, 2026
…l and remove redundant windows. (#2241)

* Remove redundant gas phase lambda windows from the AHFE protocol
* Decouple gas and solve phase lambda windows in the AHFE protocol settings.
atravitz added a commit that referenced this pull request Oct 7, 2026
* add --name option to setup-task-campaign

* Apply suggestion from @hannahbaumann

Co-authored-by: Hannah Baumann <43765638+hannahbaumann@users.noreply.github.com>

* Allow reading of legacy restraint settings for SepTop (#2237)

* Add fix for issue-2236

* Decouple the solvent and vacuum lambda schedules for the AHFE Protocol and remove redundant windows. (#2241)

* Remove redundant gas phase lambda windows from the AHFE protocol
* Decouple gas and solve phase lambda windows in the AHFE protocol settings.

* main name arg required

---------

Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
Co-authored-by: Hannah Baumann <43765638+hannahbaumann@users.noreply.github.com>
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