A Python tool to prepare receptor-ligand systems for docking.
-
Step 0: Analyze ligand neighborhood in a receptor
- Detect nearby waters, cofactors, histidines, polar rotors, amide flips, alternative locations, and other protonatable residues.
- Generate PyMOL commands for visualization.
-
Step 1: Prepare system for simulation
- Fix missing atoms/residues using PDBFixer
- Add hydrogens and handle alternative locations
- Include selected waters and cofactors
- Run a short equilibration with OpenMM, equilibrating hydrogen positions
Install the required packages using Micromamba:
micromamba install -c conda-forge openmm openmmtools openff-toolkit openmmforcefields espaloma pdbfixer parmed mdanalysis ambertools rdkit pandas deeptime pyemmamicromamba install -c mdtools cvpackmicromamba install -c conda-forge prodygit clone git@github.com:forlilab/autopath.git
cd autopathgit checkout allison-change
pip install -e .git checkout lipids
pip install -e .git clone git@github.com:forlilab/scrubber.git
cd scrubber
pip install -e .git clone git@github.com:allisonbarkdull/pre-prepare-receptor.git
cd pre-prepare-receptor
pip install -e .pre_prepare_receptor --mode step0 --input_pdb receptor.pdb --ligand_sdf ligand.sdfpre_prepare_receptor --mode step1 --input_pdb receptor.pdb --ligand_sdf ligand.sdf--mode [step0|step1]
Choose the preparation step:
step0 → Analyze ligand neighborhood (waters, cofactors, histidines, alternative locations, flippable residues). Generates PyMOL script.
step1 → Prepare system: fix missing atoms/residues, add hydrogens, include waters/cofactors, set protonation, equilibrate with restraints.
--input_pdb <PDB_FILE>
Path to the receptor PDB file.
--ligand_sdf <SDF_FILE>
Path to the ligand SDF file.
OR
--ligand_pdb <SDF_FILE>
Path to the ligand PDB file. Hydrogens will be added with scrubber in step 1.
OR
--ligand_resname
Ligand residue name in the PDB (e.g., ATP). Hydrogens will be added with scrubber in step 1.
--ligand_chain <CHAIN_ID>
Ligand chain ID in the PDB (e.g., A).
--ligand_resnum
Ligand residue number (overrides resname selection).
--ligand_smiles
Optional SMILES string for the ligand. If SMILES is not passed will fetch from RCSB and hydrogens will be added with scrubber. If the SMILES has explicit hydrogens, this will be the protonaton state simluated
--box_center
Box center (x y z) in Å for Step 0 neighborhood analysis. Pass this instead of a ligand.
--box_lengths
Box side lengths (x y z) in Å for Step 0 neighborhood analysis. Pass this instead of a ligand.
--cutoff
Neighborhood cutoff distance in Å (default: 5.0).
--water_residues <RESNUM_OR_CHAIN:RESNUM>
Residues of waters to keep (e.g., 101 A:105 Z:301).
--cofactor NAME:VAL[:SMILES]
Either extract from input PDB: NAME:CHAIN:RESNUM[:SMILES] optional SMILES
Or provide an SDF: NAME:path/to/file.sdf[:SMILES]
Examples:"
--cofactor NAD:A:301
--cofactor HEM:cofactor_heme.sdf
--cofactor EOH:B:402:'[O-]C([H])([H])C([H])([H])[H]'"
If the SMILES has explicit hydrogens, this will be the protonaton state simulated.
--keep_all keeps all waters and cofactors in the input pdb
--soluble_protein
Set up system for a soluble protein (no membrane). boo, tomato, tomato.
--add-missing-residues
Add missing residues using PDBFixer.
--keep_terminals
Build N- and C-terminal residues (may increase box size).
--altloc CHAIN:RESNUM:ALT
Specify alternative locations for residues. Repeatable.
--set_template RESID:CHAIN:VARIANT
Set residue variants for protonation states.
Format: RESID:CHAIN:VARIANT (repeatable).
RESID must be an integer, CHAIN a single letter, VARIANT the desired residue name.
Example: --set_template 101:B:GLH 45:A HID
--base_out_dir <path/to/dir> Custom output directory for prepared receptor outputs. Default is "pre_prepare_receptor_outputs" in the working directory. Will create dir if it does not exist.