Skip to content

Protocol files and the fes-ml command - #37

Merged
JMorado merged 3 commits into
mainfrom
feature/protocol
Dec 4, 2026
Merged

JMorado merged 3 commits into
mainfrom
feature/protocol

Conversation

@JMorado

@JMorado JMorado commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Add protocol files: a complete run in one YAML file, with the fes-ml command to check, run and analyse it. The Python API does not change.

Changelog:

  • Added: protocol files (schema version 1) and fes_ml.protocol.
  • Added: fes-ml validate, which reports every problem in a file with its place.
  • Added: fes-ml run, which runs all windows or some of them, each in its own directory, and writes resolved.yaml with every default.
  • Added: fes-ml analyse, which runs MBAR on the windows of a protocol.
  • Added: examples/protocol/benzene_hydration.yaml and a Protocol files page in the guide.
  • Removed: the design draft in docs/design.
  • Fixed: provenance failed on pint quantities, which the OpenFF strategy takes (found by a GPU run of the example protocol).

A protocol file gives a complete run in YAML: the system, the
alchemical groups, the modifications, the lambda schedule, the
dynamics, the sampling and the output. fes-ml validate checks a file
and reports every problem with its place. fes-ml run runs all windows
or some of them, each in its own directory, and writes resolved.yaml
with every default. fes-ml analyse runs MBAR on the windows. Features
that do not exist yet, such as presets and HREMD, give an error.

The protocol builds one LangevinMiddleIntegrator for both strategies,
so temperature, friction and time step mean the same with Sire and
OpenFF. The Python API does not change.
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
/home/runner/micromamba/envs/gha-test-env/lib/python3.12/site-packages/fes_ml
   _optional.py11373%34–36
   analysis.py1587254%48, 52, 72, 76, 80, 83–86, 90, 105–110, 134, 137, 139–143, 157, 159, 163, 186, 189, 191, 193, 211, 216, 218–222, 233–244, 255–277, 281
   checkpoint.py51296%86, 95
   cli.py521277%37, 55, 58, 65–71, 75–76, 80
   fes.py3632693%145–146, 150–153, 168, 333, 356, 371, 546, 548, 594, 599, 640–643, 679–682, 685, 727, 769, 775, 840
   log.py31584%47, 91–92, 95–96
   mts.py621379%63, 65, 68, 70, 111–117, 120, 146
   output.py61493%92–93, 96–97
   protocol.py3695585%142–143, 147–148, 177, 198, 224, 227, 275, 284, 295–296, 301, 303, 333, 348, 355, 367, 372–373, 376, 380, 389–390, 396, 403–404, 413, 415, 422, 425, 429, 431, 448, 461–463, 465, 488–489, 527, 547, 557, 589–593, 598–606
   provenance.py1221191%73, 78, 84, 110, 148–151, 229, 234, 241
   sampling.py52296%52–53
   utils.py481569%92–112
/home/runner/micromamba/envs/gha-test-env/lib/python3.12/site-packages/fes_ml/_compat
   openff.py13130%9–33
/home/runner/micromamba/envs/gha-test-env/lib/python3.12/site-packages/fes_ml/alchemical
   alchemical_factory.py35683%58, 64–67, 90
   alchemical_state.py32681%67, 69, 71, 73, 75, 77
   alchemist.py2301295%103, 107–120, 124, 135, 198, 319, 358
   groups.py31294%56–57
/home/runner/micromamba/envs/gha-test-env/lib/python3.12/site-packages/fes_ml/alchemical/modifications
   base_modification.py1261687%136, 183, 215, 222–225, 235, 240, 245, 268, 292–295, 309, 335
   charge_scaling.py42490%26, 86, 88–89
   charge_transfer.py674730%35, 74–92, 132–193
   custom_lj.py462839%41, 99–168
   emle_potential.py735426%38, 115–220
   intramolecular.py1721293%26, 41, 56, 146–152, 178, 270
   lj_softcore.py98496%27, 97, 128, 181
   ml_base_modification.py46198%92
   ml_correction.py321456%34, 82–102
   ml_interpolation.py31197%34
   ml_potential.py30293%32, 96
/home/runner/micromamba/envs/gha-test-env/lib/python3.12/site-packages/fes_ml/alchemical/strategies
   __init__.py9367%22–24
   base_strategy.py166895%65, 107, 169, 189, 198–199, 212, 332
   openff_strategy.py2432430%3–700
   sire_strategy.py681085%52, 58, 67–71, 188–190
TOTAL298370676% 
Tests Skipped Failures Errors Time
288 4 💤 0 ❌ 0 🔥 3m 47s ⏱️

The OpenFF strategy takes pint quantities, for example in
mdconfig_dict. Their tolist raises, so provenance failed for every
OpenFF run with such arguments. Record their value and unit.
@JMorado
JMorado marked this pull request as ready for review December 4, 2026 18:12
Protocol files need the protocol extra, which a core install does not
have.
@JMorado
JMorado merged commit 0e37d90 into main Dec 4, 2026
5 checks passed
@JMorado
JMorado deleted the feature/protocol branch December 4, 2026 18:19
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.

1 participant