Changelog¶
All notable changes to fes-ml are listed here.
0.4.0 (2026-12-04)¶
This release adds protocol files, one output file per window, MBAR analysis and provenance records. Energies do not change.
Upgrading¶
- Install h5py, which is now a core dependency (
conda env update -f environment.yaml, orpip install h5py).
Added¶
- Protocol files: a complete run in one YAML file.
fes-ml validatechecks a file and reports every problem with its place.fes-ml runruns all windows or some of them, each in its own directory, and writesresolved.yamlwith every default.fes-ml analyseruns MBAR on the windows. The Python API does not change. Seeexamples/protocol/benzene_hydration.yaml. - Window output files. Each window writes
<output_prefix>_window_<k>.h5, with its reduced potentials, temperature, state labels, lambda schedule and provenance. fes-ml adds a sample at each iteration, and a restart continues the file from the checkpoint.FES(write_window_files=False)turns them off. fes_ml.analysisand thefes-ml-analysecommand. They read the window files, check that the windows belong to one run, and compute the free energies with MBAR. They also read the.npyfiles of earlier versions.- Provenance records. Each time a window starts or restarts,
FESadds a record to<output_prefix>_provenance.jsonand to the checkpoint. A record has the package versions, the host, the platform and its precision, the integrator and its seed, the force settings of the System, and the arguments of the run.fes_ml.provenance.collectmakes a record. - A warning when a run restarts with other package versions, another fes-ml commit, or another platform or integrator.
reportersinequilibrate,run_single_stateandrun_production_batchcan be a function. It gets the window index and gives the reporters of that window, so each window can write its own files.
Known issues¶
- EMLEPotential does not work with the next Sire release, as in 0.3.0.
- EMLE windows are slow, because the EMLE calculator runs in Python at each step.
Fixed¶
- A state with an integrator that has no temperature failed late with an unclear error, for
example
TypeErrorfromsetVelocitiesToTemperature. This happened with the Sire strategy whendynamics_kwargshad notemperature, because Sire then uses a VerletIntegrator. Now the strategy gives aValueErrorbefore it applies the modifications. - A batch run attached the same reporters to every window, and the Simulations kept them after the window finished. Now each window removes its reporters when it finishes.
Removed¶
agg_output.py,analysis.pyandextract.pyin the examples. Usefes-ml-analyse.- The job that published releases to PyPI. fes-ml is not on PyPI yet. Install it from source.
utils/prepare_ligand.py, an old BioSimSpace script that fes-ml does not use.- The
datafolder. The two benzene files that the tests use are now intests/test_data.
0.3.0 (2026-12-04)¶
This release fixes 36 bugs, adds a test suite, and changes how you run and configure fes-ml. Some energies change, but only where they were wrong. Read "Upgrading" before you use it for existing projects.
Upgrading¶
- Pass
strategy_name="sire"if you build the system from Amber files. The default strategy is now OpenFF. Withoutstrategy_name,top_fileandcrd_filegive aValueErrorthat says this. - Call
fes_ml.config_logger()in your scripts to see the progress messages. Importing fes-ml does not configure logging any more. - Recompute results from Sire 2026 or later that use the dispersion correction. Those runs lost the correction, about -207 kJ/mol for benzene in water at a 10 A cutoff.
- Install the extras that you use, for example
pip install -e ".[sire,ml]". Sire, OpenFF, EMLE and the ML packages are optional. - Use
modifications_kwargs={"EMLEPotential": {...}}instead ofemle_kwargs. - Pass alchemical groups as a dict:
alchemical_atoms={"ligand": [...], "cofactor": [...]}. - Set
{"ChargeScaling": {"use_global_parameter": False}}to scale the charges in the System, as in 0.2. The new default uses a global parameter.
Known issues¶
- EMLEPotential does not work with the next Sire release. That release removes the
lambda_interpolateoption of the EMLE calculator, and it keeps the MM charges of the ML atoms. Use the Sire 2026.1 packages, or the older packages on thedevchannel of openbiosim, until fes-ml has its own EMLE force.
Added¶
- A test suite. Each expected energy comes from an independent reference: a closed form, plain OpenMM, Sire or openmm-ml.
shared_context=TrueinFES.create_alchemical_states. All windows use one System and one Context. A window is a set of global parameter values, and each window keeps its own coordinates. For 11 MM windows, setup is 10 times faster and the windows use 6.5 times less GPU memory.- Lambda as OpenMM global parameters:
lambda_sterics(LJSoftCore),lambda_electrostatics(ChargeScaling) andlambda_charge_transfer(ChargeTransfer). MLInterpolation and MLCorrection keeplambda_interpolate. A named group adds the suffix_<group>. To move a Context to another lambda, usecontext.setParameter(...).modification.lambda_parametergives the name. - A modification can keep its lambda outside OpenMM and give a function that sets it. EMLE uses
this, so EMLE windows work with
shared_context=True. - Named alchemical groups. The pairs between two groups use the product of their two lambdas.
Undeclared groups, groups that partly overlap, and atoms that two modifications of one kind
change give a
ValueError. - Each ML group has its own ML forces and its own
lambda_interpolate_<group>parameter. Alchemist.register_modification(name, cls). Entry points can point to the class.Alchemist.application_order(), which shows the order in which modifications are applied.- A modification declares the inputs that it needs, for example
inputs = ("topology",). The strategies give each modification its inputs by name. work_dir=. Each state writes its files to its own directory,tmp_fes_ml_sire_*ortmp_fes_ml_openff_*, or towork_dir. fes-ml never deletes awork_dirthat you give.- A documentation site with a user guide and an API reference, and
CONTRIBUTING.md. - New examples in
examples/: MM, ML/MM with mechanical embedding, ML/MM with EMLE, and ML/MM in vacuum. Each example has a Slurm script for each window and the scripts for the analysis.
Changed¶
- The default creation strategy is
"openff", not"sire". Checkpoints from earlier versions still restart with the Sire strategy. - ChargeScaling uses NonbondedForce parameter offsets by default. On the Reference platform the energies are the same. On CUDA they move by about 4e-4 kJ/mol in double precision, which is less than the difference between CUDA and Reference.
- Checkpoints store counters, reduced potentials, positions, the box and the arguments that
created the states. They do not store the pickled
FESobject. fes-ml still reads checkpoints from earlier versions. import fes_mlneeds only OpenMM, NumPy and networkx. A missing optional package gives an error that names the extra to install, when you use the feature.pyproject.tomldeclares the core dependencies and the extrassire,openff,ml,emle,viz,analysis,tests,devanddocs.environment.yamlneeds OpenMM 8.5 or later and adds pymbar. It pins setuptools below 82, because packmol-memgen needspkg_resources. It pins emle-engine to one commit.- The installation guide explains
CONDA_OVERRIDE_CUDAfor login nodes without a GPU. config_logger()does not hide the messages of other packages unlessFES_ML_FILTER_LOGGERS=1.- The modification order does not depend on the order of the keys in the lambda schedule. Each modification has a phase. Modifications without a dependency between them are ordered by phase, then by name.
- A dependency uses the alchemical atoms of the modification that needs it, unless it has its own
entry in
modifications_kwargs. excludesreplacesskip_dependencies, which still works.pre_dependencies,post_dependenciesandexcludesare tuples.- EMLEPotential without a lambda takes the lambda of the MLInterpolation in its group.
- fes-ml checks the lambda schedule before it builds a state. Empty schedules, rows of different
lengths, values that are not finite numbers, and windows with only
Nonegive aValueError. Values outside 0 to 1 give a warning. - Invalid arguments give
TypeError,ValueErrororRuntimeError, notAssertionError. - The Sire strategy computes the energy decomposition only when
FES_ML_LOG_DEVEL=1.
Removed¶
Alchemist.add_modification_to_graph. Usecreate_alchemical_graph.- The old examples in
examples/sire_strategy,examples/openff_strategyandexamples/additional_scripts.
Fixed¶
- Recent Sire releases dropped the dispersion correction from every state.
- The removal of bonded terms failed or was incomplete for
CustomAngleForce,CustomTorsionForce,RBTorsionForce,CMAPTorsionForceandCustomCompoundBondForce. This changedIntraMolecularBondedRemovaland every ML modification. An unsupported bonded force now givesNotImplementedError. - Softcore systems failed on the OpenMM CPU platform. A ligand-environment pair that the NonbondedForce excludes still got softcore LJ.
- The LJ between two decoupled groups used the lambda of the group that was applied first.
- The OpenFF strategy ignored
partial_charges_methodand always used AM1-BCC charges. emle_kwargswas ignored. It now works and gives aDeprecationWarning.- EMLEPotential added as a dependency of MLInterpolation got no inputs.
- MLCorrection crashed when the Alchemist built its graph.
- With several groups, shared dependencies could run in the wrong order.
- Per-group
alchemical_atomsinmodifications_kwargscrashed, which broke the multi-group example in the README. - Parallel windows overwrote or deleted the files of other windows.
- Checkpoints were written every
checkpoint_frequency - 1iterations, andcheckpoint_frequency=1crashed. A value of 0 turns checkpoints off. - Restarts with
recreate_alchemical_states=Trueused the Sire strategy and lost the arguments of the modifications. FES.set_velocities(window=0)changed every state.MTS.set_force_groupscrashed without aforce_group_dict, and it failed on duplicate force names.energy_decompositionfailed on duplicate force names or more than 32 forces, and it changed the force groups.- ChargeTransfer failed in vacuum.
- The OpenFF strategy failed with
hydrogen_mass=Noneand with a float hydrogen mass and virtual sites. It always made a temporary Context, which can take a GPU. create_alchemical_graphchanged themodifications_kwargsof the caller.- Integer temperatures, frictions, timesteps, pressures and hydrogen masses were rejected.
- A modification made without a name raised
AttributeError, andrepr(Alchemist())raisedTypeError. - A modification that needs a lambda but has none gave an unclear
TypeError. It now gives aValueError. MLPotentialcopied all its arguments, including topologies and Sire objects.- The README examples for
minimizeandrun_single_statewere wrong.