Small helper scripts that extend the standard OpenFE CLI workflow with a few extra utilities for setting up and analysing OpenFE calculations.
Current scripts include:
prep_rbfe_hybridtop.pyfor preparing hybrid-topology RBFE networks and writing transformation JSON filesprep_rbfe_septop.pyfor preparing separated-topology (SepTop) RBFE networks and writing transformation JSON filesworkup.pyfor summarising and analysing completed OpenFE calculationsplot_network.pyfor plotting ligand-network summaries with RBFE results
There is no special installation for this repository.
The scripts are intended to be run from a vanilla OpenFE conda/mamba environment with the usual OpenFE dependencies available, for example:
micromamba activate openfe_envor the equivalent conda environment you already use for OpenFE.
This script prepares an RBFE hybrid-topology setup from:
- a receptor PDB file
- a ligand SDF file
- a selected network-planning mode
It writes:
network_setup/ligand_network.pngnetwork_setup/ligand_network.graphmlnetwork_setup/transformations/*.json- mapping PNG files into
mappings/
Minimal example using the default settings:
python3 prep_rbfe_hybridtop.py \
--rec example_small/structures/5H9P_prepped.pdb \
--ligs example_small/structures/thiodigalactoside_thiolactose_Cfiller.sdf \
--mapper kartograf \
--scorer lomap \
--network minimal_redundant \
--windows 11 \
--windowtime 5 \
--output-dir .Important defaults:
--network minimal_redundant--mapper kartograf--scorer lomap--windows 11--windowtime 5
Argument meanings:
--rec: path to the prepared receptor PDB file--ligs: path to the ligand SDF file--mapper: atom mapper used to generate atom mappings between ligands--scorer: scorer used for automatic network planning; ignored for--network custom--network: network-construction mode, one ofminimal_spanning,minimal_redundant,radial,maximal, orcustom--windows: number of lambda windows and OpenMM replicas--windowtime: production simulation time per window in nanoseconds--output-dir: directory wherenetwork_setup/andmappings/will be written
Additional optional arguments:
--central-ligand: central ligand name for--network radial--custom-network: YAML file with custom ligand pairs for--network custom
You can also define the network explicitly with a YAML file and run:
python3 prep_rbfe_hybridtop.py \
--rec example_small/structures/5H9P_prepped.pdb \
--ligs example_small/structures/thiodigalactoside_thiolactose_Cfiller.sdf \
--network custom \
--custom-network custom_network.yamlAn example file is included in this repository as custom_network.yaml.
The YAML file must contain a top-level edges key with ligand-name pairs:
edges:
- [thiodigalactoside, thiolactose]
- [thiolactose, Cfiller]Ligand names in the YAML must match the molecule names in the input SDF.
To see all available options:
python3 prep_rbfe_hybridtop.py --helpThis script prepares an RBFE separated-topology (SepTop) setup from:
- a receptor PDB file
- a ligand SDF file
- a selected network-planning mode
It writes:
network_setup/ligand_network.pngnetwork_setup/ligand_network.graphmlnetwork_setup/transformations/*.json- mapping PNG files into
mappings/
Unlike the hybrid-topology script, each SepTop transformation JSON represents the full RBFE cycle for one ligand pair. The solvent and complex legs are handled internally by the SepTop protocol, so the script writes one transformation per ligand-network edge with mapping=None.
Minimal example using the default network-planning settings:
python3 prep_rbfe_septop.py \
--rec example_small/structures/5H9P_prepped.pdb \
--ligs example_small/structures/thiodigalactoside_thiolactose_Cfiller.sdf \
--mapper kartograf \
--scorer lomap \
--network minimal_redundant \
--protocol-repeats 1 \
--host-min-distance 0.5 \
--host-max-distance 1.5 \
--output-dir .Useful optional arguments:
--windows: resize the default SepTop lambda schedules and set the replica count--windowtime: set the production length per lambda window in nanoseconds--equilibration-time: set the alchemical equilibration length in nanoseconds--central-ligand: central ligand name for--network radial--custom-network: YAML file with custom ligand pairs for--network custom
SepTop result analysis is best kept in a separate follow-on workflow. The existing workup.py is built around hybrid-topology solvent/complex leg JSONs and does not yet understand SepTop result structure.
For available options:
python3 prep_rbfe_septop.py --help