fes-ml¶
fes-ml runs alchemical free-energy simulations with hybrid machine-learning / molecular-mechanics (ML/MM) potentials on top of OpenMM.
You describe what changes between the end states as a λ schedule of named
modifications: decoupling (LJSoftCore, ChargeScaling), MM → ML
interpolation (MLInterpolation, MLCorrection), electrostatic embedding (EMLEPotential), and
others. fes-ml builds one OpenMM System per λ window, samples every window, and returns the reduced
potentials U_kln for MBAR.
Quick start¶
from fes_ml import FES, config_logger
config_logger() # print progress messages
lambda_schedule = {
"LJSoftCore": [1.0, 0.8, 0.6, 0.4, 0.2, 0.0, 0.0, 0.0, 0.0],
"ChargeScaling": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.66, 0.33, 0.0],
}
fes = FES(output_prefix="benzene_water")
fes.create_alchemical_states(
lambda_schedule=lambda_schedule,
alchemical_atoms=list(range(12)), # benzene is the first molecule: atoms 0 to 11
smiles_ligand="c1ccccc1",
smiles_solvent="O",
)
fes.minimize(max_iterations=1000)
fes.equilibrate(100_000) # 100 ps at 1 fs per state
fes.run_production_batch(1000, 1000) # 1000 samples, 1 ps apart; writes benzene_water_window_<k>.h5
Then compute the free energy with MBAR:
fes-ml-analyse benzene_water_window_*.h5 --decorrelate
Where to go next¶
- Installation: which extras you need.
- λ schedules and modifications: what each modification does.
- Running simulations: minimisation, equilibration, production, restarts.
- Creation strategies: Sire or OpenFF, dynamics options and EMLE.
- Alchemical groups and dependencies: several regions in one schedule, and how the modifications are ordered.
- Writing a modification: add your own.
- API reference.