### Setup and Execute reduce2.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial3.md Sets up the reduce2.py script for hydrogen addition and optimization. This involves making the script executable and exporting necessary environment variables. Ensure reduce2 and geostd are correctly installed and accessible. ```bash # setting up reduce2 for the first time in the environment reduce2="$(python -c "import site; print(site.getsitepackages()[0])")/mmtbx/command_line/reduce2.py" chmod +x $reduce2 geostd="$(realpath geostd)" export MMTBX_CCP4_MONOMER_LIB=$geostd ``` -------------------------------- ### Install Meeko from source Source: https://github.com/forlilab/meeko/blob/develop/docs/source/installation.md Clone the Meeko repository, checkout the develop branch, and install using pip. This method is suitable for developers who need the latest features or want to contribute. ```bash git clone https://github.com/forlilab/Meeko.git cd Meeko git checkout develop pip install . ``` -------------------------------- ### Install Meeko from GitHub using Pip Source: https://github.com/forlilab/meeko/blob/develop/README.md Install the latest development version of Meeko directly from the GitHub repository using pip. ```bash pip install git+https://github.com/forlilab/meeko ``` -------------------------------- ### Install Meeko using Pip Source: https://github.com/forlilab/meeko/blob/develop/README.md Install Meeko from PyPI for the latest stable release. ```bash pip install meeko ``` -------------------------------- ### Install Local Build Dependencies Source: https://github.com/forlilab/meeko/blob/develop/docs/README.md Installs necessary packages for building the project documentation locally using 'make html'. Micromamba is used for environment management, followed by pip for Python package installation. ```bash micromamba install sphinx pip install sphinx-design sphinx-book-theme ``` -------------------------------- ### Install ProDy optionally with pip Source: https://github.com/forlilab/meeko/blob/develop/docs/source/installation.md Install the ProDy library using pip. ProDy is optional but recommended for parsing PDB and mmCIF files and for tethered docking. ```bash pip install prody ``` -------------------------------- ### Basic Usage of mk_prepare_receptor.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/cli_rec_prep.md Use this command to prepare a receptor from a PDB file and write the output in PDBQT format. This is the most common way to start preparing a receptor. ```bash mk_prepare_receptor.py -i examples/system.pdb --write_pdbqt prepared.pdbqt ``` ```bash mk_prepare_receptor.py -i examples/system.pdb -o prepared -p ``` -------------------------------- ### Install Additional Dependencies Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial4b.md Add scikit-learn, XGBoost, and SHAP to your current micromamba environment. Ensure you replace 'meeko_tutorial_py311' with your actual environment name. ```bash micromamba install -n meeko_tutorial_py311 -c conda-forge scikit-learn xgboost shap ``` -------------------------------- ### Clone Meeko Repository Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Clones the Meeko repository to access example files. Use sparse checkout to only download the example directory. ```bash git clone --branch docwork --depth=1 --filter=tree:0 https://github.com/rwxayheee/Meeko.git cd Meeko; git sparse-checkout set --no-cone example; git checkout; cd .. ``` -------------------------------- ### Example of Residue Selection and Assignment Source: https://github.com/forlilab/meeko/blob/develop/docs/source/cli_rec_prep.md This example demonstrates the combined syntax for selecting residues and assigning them properties like template names. It shows how to handle multiple residues and chains. ```bash "A:5,7=CYX,A:19A,B:17=HID" ``` -------------------------------- ### Install Meeko using Conda/Mamba Source: https://github.com/forlilab/meeko/blob/develop/README.md Install Meeko using conda or mamba for a streamlined dependency management experience. ```bash micromamba install -c conda-forge meeko ``` -------------------------------- ### Install Meeko from source in editable mode Source: https://github.com/forlilab/meeko/blob/develop/docs/source/installation.md Install Meeko from source using pip in editable mode. This allows changes to the source files to take immediate effect without re-installation, which is beneficial for development. ```bash pip install -e . ``` -------------------------------- ### Install OpenFF forcefields with micromamba Source: https://github.com/forlilab/meeko/blob/develop/docs/source/installation.md Install OpenFF forcefields using micromamba. This is useful for development purposes to assign vdW and proper torsion parameters. ```bash micromamba install -c conda-forge "openff-forcefields>=2026" ``` -------------------------------- ### Sample PDBQT File Content Source: https://github.com/forlilab/meeko/blob/develop/docs/source/pdbqt_spec.md An example PDBQT file demonstrating the REMARK records for active torsions, ROOT/ENDROOT and BRANCH/ENDBRANCH definitions for rotatable bonds, ATOM records with coordinates and properties, and the TORSDOF keyword. ```pdbqt REMARK 4 active torsions: REMARK status: ('A' for Active; 'I' for Inactive) REMARK 1 A between atoms: N_1 and CA_5 REMARK 2 A between atoms: CA_5 and CB_6 REMARK 3 A between atoms: CA_5 and C_13 REMARK 4 A between atoms: CB_6 and CG_7 ROOT ATOM 1 CA PHE A 1 25.412 19.595 12.578 1.00 12.96 0.287 C ENDROOT BRANCH 1 2 ATOM 2 N PHE A 1 25.225 18.394 13.381 1.00 13.04 -0.065 N ATOM 3 HN3 PHE A 1 25.856 17.643 13.100 1.00 0.00 0.275 HD ATOM 4 HN2 PHE A 1 25.558 18.517 14.337 1.00 0.00 0.275 HD ATOM 5 HN1 PHE A 1 24.247 18.105 13.350 1.00 0.00 0.275 HD ENDBRANCH 1 2 BRANCH 1 6 ATOM 6 CB PHE A 1 26.873 20.027 12.625 1.00 12.45 0.082 C BRANCH 6 7 ATOM 7 CG PHE A 1 27.286 20.629 13.923 1.00 12.96 -0.056 A ATOM 8 CD2 PHE A 1 27.470 22.001 14.050 1.00 12.47 0.007 A ATOM 9 CE2 PHE A 1 27.877 22.571 15.265 1.00 13.98 0.001 A ATOM 10 CZ PHE A 1 28.108 21.754 16.360 1.00 13.84 0.000 A ATOM 11 CE1 PHE A 1 27.919 20.380 16.242 1.00 13.77 0.001 A ATOM 12 CD1 PHE A 1 27.525 19.821 15.027 1.00 11.32 0.007 A ENDBRANCH 6 7 ENDBRANCH 1 6 BRANCH 1 13 ATOM 13 C PHE A 1 25.015 19.417 11.141 1.00 13.31 0.204 C ATOM 14 O2 PHE A 1 24.659 20.534 10.507 1.00 12.12 -0.646 OA ATOM 15 O1 PHE A 1 25.024 18.283 10.608 1.00 13.49 -0.646 OA ENDBRANCH 1 13 TORSDOF 4 ``` -------------------------------- ### Install Meeko dependencies manually with pip Source: https://github.com/forlilab/meeko/blob/develop/docs/source/installation.md Install core Meeko dependencies like scipy, rdkit, gemmi, and tqdm from PyPI. This is an alternative if not using a package manager that handles dependencies automatically. ```bash pip install scipy rdkit gemmi tqdm ``` -------------------------------- ### PDBQT Flexible Sidechain Example Source: https://github.com/forlilab/meeko/blob/develop/docs/source/flex_rec_pdbqt.md This example demonstrates the PDBQT format for defining flexible sidechains. It includes two amino acids, PHE and ILE, with their respective flexible atoms specified between BEGIN_RES and END_RES records. The ROOT atom serves as the anchor, and BRANCH records define the connectivity and torsion angles of the flexible sidechain. ```default BEGIN_RES PHE A 53 REMARK 2 active torsions: REMARK status: ('A' for Active; 'I' for Inactive) REMARK 1 A between atoms: CA and CB REMARK 2 A between atoms: CB and CG ROOT ATOM 1 CA PHE A 53 25.412 19.595 12.578 1.00 12.96 0.180 C ENDROOT BRANCH 1 2 ATOM 2 CB PHE A 53 26.873 20.027 12.625 1.00 12.45 0.073 C BRANCH 2 3 ATOM 3 CG PHE A 53 27.286 20.629 13.923 1.00 12.96 -0.056 A ATOM 4 CD1 PHE A 53 27.525 19.821 15.027 1.00 11.32 0.007 A ATOM 5 CE1 PHE A 53 27.919 20.380 16.242 1.00 13.77 0.001 A ATOM 6 CZ PHE A 53 28.108 21.754 16.360 1.00 13.84 0.000 A ATOM 7 CE2 PHE A 53 27.877 22.571 15.265 1.00 13.98 0.001 A ATOM 8 CD2 PHE A 53 27.470 22.001 14.050 1.00 12.47 0.007 A ENDBRANCH 2 3 ENDBRANCH 1 2 END_RES PHE A 53 BEGIN_RES ILE A 54 REMARK 2 active torsions: REMARK status: ('A' for Active; 'I' for Inactive) REMARK 3 A between atoms: CA and CB REMARK 4 A between atoms: CB and CG1 ROOT ATOM 9 CA ILE A 54 24.457 20.591 9.052 1.00 12.30 0.180 C ENDROOT BRANCH 9 10 ATOM 10 CB ILE A 54 22.958 20.662 8.641 1.00 11.82 0.013 C ATOM 11 CG2 ILE A 54 22.250 19.367 9.046 1.00 12.63 0.012 C BRANCH 10 12 ATOM 12 CG1 ILE A 54 22.266 21.867 9.298 1.00 13.03 0.002 C ATOM 13 CD1 ILE A 54 20.931 22.246 8.670 1.00 14.42 0.005 C ENDBRANCH 10 12 ENDBRANCH 9 10 END_RES ILE A 54 ``` -------------------------------- ### Create Meeko Tutorial Environment Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Defines the dependencies for the Meeko tutorial environment using micromamba. Activate the environment after creation. ```yaml name: meeko_tutorial_py311 channels: - conda-forge dependencies: - python=3.11 - meeko - numpy - scipy - rdkit - gemmi - vina - pip - molscrub - multiprocess - chemicalite - pip: - ringtail - git+https://github.com/prody/ProDy.git@main#egg=prody ``` ```bash micromamba create -f environment.yaml -y micromamba activate meeko_tutorial_py311 ``` -------------------------------- ### Display Meeko Help Message Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_basic.md Run the `mk_prepare_ligand.py` script with the `-h` option to view its command-line help and available arguments. ```bash mk_prepare_ligand.py -h ``` -------------------------------- ### Prepare Ligand using Meeko Source: https://github.com/forlilab/meeko/blob/develop/README.md Use the `mk_prepare_ligand.py` script to parameterize a ligand from an SDF file and output a PDBQT file. ```bash mk_prepare_ligand.py -i molecule.sdf -o molecule.pdbqt ``` -------------------------------- ### Prepare Receptor for AutoDock-GPU Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Generates receptor PDBQT, GPF, and box files for AutoDock-GPU. Similar to Vina preparation but omits the Vina-style box TXT file. ```bash pdb_file="Meeko/example/tutorial1/input_files/1iep_protein.pdb" lig_file="Meeko/example/tutorial1/input_files/xray-imatinib.pdb" mk_prepare_receptor.py --read_pdb $pdb_file -o rec_1iep -p -g \ --box_enveloping $lig_file --padding 5 ``` ```bash Files written: rec_1iep.pdbqt <-- static (i.e., rigid) receptor input file boron-silicon-atom_par.dat <-- atomic parameters for B and Si (for autogrid) rec_1iep.gpf <-- autogrid input file rec_1iep.box.pdb <-- PDB file to visualize the grid box ``` -------------------------------- ### Install Molscrub Python Package Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Install the Molscrub Python package using pip. This package is available from the Forlilab Molscrub GitHub repository. ```bash pip install molscrub ``` -------------------------------- ### Load Configuration from JSON File via Command Line Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Use the `mk_prepare_ligand.py` script with the `-c` or `--config_file` option to load preparation parameters from a JSON file. ```bash mk_prepare_ligand.py -i mol.sdf -c my_config.json ``` -------------------------------- ### Prepare Ligand with mk_prepare_ligand.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Use `mk_prepare_ligand.py` to prepare a ligand PDBQT file from an SDF input. Specify reactive atoms using SMARTS strings and 1-based indices for specialized docking. ```bash reactive_smarts="COP(=O)([O-])[O-]" reactive_smarts_idx=3 mk_prepare_ligand.py -i AMP.sdf -o AMP.pdbqt \ --reactive_smarts $reactive_smarts \ --reactive_smarts_idx $reactive_smarts_idx ``` -------------------------------- ### Prepare Receptor with Flexible Residues and JSON Output Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Prepares receptor files including a JSON file for flexible/reactive docking. Specifies flexible residues and allows ignoring problematic residues. ```bash pdb_file="Meeko/example/tutorial1/input_files/2hzn_protein.pdb" lig_file="Meeko/example/tutorial1/input_files/xray-imatinib.pdb" mk_prepare_receptor.py --read_pdb $pdb_file -o rec_2hzn -p -v -g -j \ --box_enveloping $lig_file --padding 5 \ -f A:286,359 --allow_bad_res ``` ```bash - Template matching failed for: ['A:238', 'A:262', 'A:263', 'A:264', 'A:281', 'A:356', 'A:462', 'A:466', 'A:502'] Ignored due to allow_bad_res. Flexible residues: chain resnum is_reactive reactive_atom A 359 False A 286 False reactive_flexres=set() Files written: rec_2hzn.json <-- parameterized receptor rec_2hzn_flex.pdbqt <-- flexible receptor input file rec_2hzn_rigid.pdbqt <-- static (i.e., rigid) receptor input file boron-silicon-atom_par.dat <-- atomic parameters for B and Si (for autogrid) rec_2hzn_rigid.gpf <-- autogrid input file rec_2hzn.box.txt <-- Vina-style box dimension file rec_2hzn.box.pdb <-- PDB file to visualize the grid box ``` -------------------------------- ### Install Required Python Packages Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Install core scientific Python packages including cctbx-base, meeko, numpy, scipy, rdkit, gemmi, and autogrid using micromamba from conda-forge. ```bash micromamba install -c conda-forge cctbx-base meeko numpy scipy rdkit gemmi autogrid -y ``` -------------------------------- ### Prepare Ligand PDBQT Files with Meeko Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Converts a multi-molecule SDF file into PDBQT format using mk_prepare_ligand.py. Specify a prefix for the output PDBQT files to manage multiple protomers or conformers. ```bash mk_prepare_ligand.py -i imatinib.sdf --multimol_prefix imatinib_protomer ``` -------------------------------- ### Initialize MoleculePreparation with Parameters Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Configure `MoleculePreparation` by passing parameters during initialization. Defaults are often used, so explicit configuration may not always be necessary. ```python from meeko import MoleculePreparation mk_prep = MoleculePreparation( merge_these_atom_types=("H"), charge_model="gasteiger", ) ``` -------------------------------- ### Download PDB Structure Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial3.md Downloads a PDB structure from RCSB PDB using a provided token. Ensure you have curl installed. ```bash pdb_token="3kgd" curl "http://files.rcsb.org/view/${pdb_token}.pdb" -o "${pdb_token}.pdb" ``` -------------------------------- ### Prepare Ligands in Batch from SMI File Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Use scrub.py to prepare ligands in batch from a .smi file, generating an SDF file with multiple molecules. This helps estimate output file size and system requirements. ```bash smi_file="Meeko/example/tutorial1/input_files/mols.smi" smiprocessing.py $smi_file -o mols.sdf ``` -------------------------------- ### Pass Parameters Directly via Command Line Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Specify preparation parameters directly as command-line arguments to `mk_prepare_ligand.py`. These arguments override settings from a configuration file. ```bash mk_prepare_ligand.py -i mol.sdf --charge_model gasteiger --merge_these_atom_types H ``` -------------------------------- ### Generate Receptor PDBQT and Vina Box Files Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Generate receptor PDBQT and Vina-style box definition files using mk_prepare_receptor.py. The --box_enveloping and --padding options define the box size and center based on a ligand. ```bash pdb_file="Meeko/example/tutorial1/input_files/1iep_protein.pdb" lig_file="Meeko/example/tutorial1/input_files/xray-imatinib.pdb" mk_prepare_receptor.py --read_pdb $pdb_file -o rec_1iep -p -v \ --box_enveloping $lig_file --padding 5 ``` -------------------------------- ### Get Default Atom Types for Ethanol (Python) Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Retrieve and print the default AutoDock4 atom types assigned to an ethanol molecule after preparation using Meeko. ```python from rdkit import Chem from rdkit.Chem import AllChem from meeko import MoleculePreparation ethanol = Chem.MolFromSmiles("CCO") ethanol = Chem.AddHs(ethanol) AllChem.EmbedMolecule(ethanol) mk_prep = MoleculePreparation() molsetup = mk_prep(ethanol)[0] atom_types = [atom.atom_type for atom in molsetup.atoms] print(f"{atom_types=}") ``` -------------------------------- ### Reactive Docking Configuration Output Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md This output details the files generated by mk_prepare_receptor.py, including flexible receptor PDBQT, rigid receptor PDBQT, Autogrid GPF, and reactive configuration files for AutoDock-GPU. ```bash @> 2510 atoms and 1 coordinate set(s) were parsed in 0.01s. Flexible residues: chain resnum is_reactive reactive_atom A 309 True NE2 For reactive docking, pass the configuration file to AutoDock-GPU: autodock_gpu -C 1 --import_dpf 3kgd_receptorH.reactive_config --flexres 3kgd_receptorH_flex.pdbqt -L Files written: 3kgd_receptorH_flex.pdbqt <-- flexible receptor input file 3kgd_receptorH_rigid.pdbqt <-- static (i.e., rigid) receptor input file boron-silicon-atom_par.dat <-- atomic parameters for B and Si (for autogrid) 3kgd_receptorH_rigid.gpf <-- autogrid input file 3kgd_receptorH.box.pdb <-- PDB file to visualize the grid box 3kgd_receptorH.reactive_config <-- reactive parameters for AutoDock-GPU ``` -------------------------------- ### Flexible Receptor PDBQT Structure Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Example of the PDBQT format for a flexible receptor residue, highlighting the reactive atom (His309 NE2) and its coordinates. This file is used by AutoDock-GPU. ```pdbqt BEGIN_RES HIS A 309 REMARK INDEX MAP 3 1 15 2 18 3 19 4 20 5 21 6 22 7 25 8 ROOT ATOM 1 CA HIS A 309 -1.221 -40.602 -5.650 1.00 0.00 0.177 C ENDROOT BRANCH 1 2 ATOM 2 CB HIS A 309 -2.472 -39.882 -5.156 1.00 0.00 0.093 C BRANCH 2 3 ATOM 3 CG HIS A 309 -3.505 -40.770 -4.538 1.00 0.00 0.061 1A3 ATOM 4 ND1 HIS A 309 -3.678 -42.083 -4.910 1.00 0.00 -0.242 1N6 ATOM 5 CD2 HIS A 309 -4.442 -40.512 -3.593 1.00 0.00 0.107 1A2 ATOM 6 CE1 HIS A 309 -4.660 -42.611 -4.192 1.00 0.00 0.196 1A2 ATOM 7 NE2 HIS A 309 -5.152 -41.670 -3.401 1.00 0.00 -0.350 1N1 ATOM 8 HE2 HIS A 309 -5.940 -41.788 -2.748 1.00 0.00 0.167 1H5 ENDBRANCH 2 3 ENDBRANCH 1 2 END_RES HIS A 309 ``` -------------------------------- ### Export Docking Poses with Meeko Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Export docking poses from a DLG file to an SDF file using the Meeko mk_export.py script. This example exports poses with explicit hydrogens. ```bash mk_export.py AMP.dlg -s 3kgd_AMP_adgpu_out.sdf ``` -------------------------------- ### Prepare Covalent Ligand with mk_prepare_ligand.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial3.md Generate a PDBQT file for a covalent ligand using its SDF file and a reference receptor PDB. Attractor atom positions (Cα and Cβ) are sourced from the receptor to maintain their positions. ```bash rec_residue="A:HIS:309" tether_smarts="n1cc(CC)nc1" tether_smarts_indices="5 4" mk_prepare_ligand.py -i HIE_AMP.sdf --receptor 3kgd_receptor.pdb --rec_residue $rec_residue \ --tether_smarts "${tether_smarts}" --tether_smarts_indices $tether_smarts_indices \ -o HIE_AMP.pdbqt ``` -------------------------------- ### CRO_C Residue Template JSON Structure Source: https://github.com/forlilab/meeko/blob/develop/docs/source/py_build_temp.md This JSON structure defines the 'CRO_C' residue template, including its SMILES string, atom names, and link labels for the N-terminus. This is an example of a template that might be generated and exported. ```json { "ambiguous": { "CRO": ["CRO_C"] }, "residue_templates": { "CRO_C": { "smiles": "[H]NC([H])(C1=NC(=C([H])C2=C([H])C([H])=C(O[H])C([H])=C2[H])C(=O)N1C([H])([H])C(=O)[O-])C([H])(O[H])C([H])([H])[H]", "atom_name": ["H", "N1", "CA1", "HA1", "C1", "N2", "CA2", "CB2", "HB2", "CG2", "CD1", "HD1", "CE1", "HE1", "CZ", "OH", "HOH", "CE2", "HE2", "CD2", "HD2", "C2", "O2", "N3", "CA3", "HA31", "HA32", "C3", "O3", "OXT", "CB1", "HB1", "OG1", "HOG1", "CG1", "HG11", "HG12", "HG13"], "link_labels": {"1": "N-term"} } } } ``` -------------------------------- ### Main Script for Ligand Preparation with Multiprocessing Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial4a.md This script orchestrates the ligand preparation process. It sets up multiprocessing, configures scrubbing parameters, creates output directories, reads ligand data from SMILES files, and distributes the processing tasks to multiple worker processes. It limits the number of ligands processed and the number of parallel processes. ```python if __name__ == "__main__": # Multiprocessing options import multiprocessing n_processes = min(multiprocessing.cpu_count(), 8) # Limit processes based on available cores # Scrubbing and ligand preparation options max_attempts = 5 # Maximum attempts for scrubbing each ligand max_ligands = 500 # Limit the number of ligands processed scrub = Scrub(ph_low=7.4, ph_high=7.4, skip_tautomers=True) # Setup scrub instance with pH constraints # Directory creation for ligand sets for ligand_set in ["actives_final", "decoys_final"]: os.makedirs(ligand_set, exist_ok=True) # Create directories for ligands ligand_list = [] with open(f"aces/{ligand_set}.ism", "r") as f: for line in f: if len(line.split()) >= 2: ligand_smi, ligand_name = line.split()[0], line.split()[-1] ligand_list.append((ligand_smi, ligand_name, ligand_set, scrub, max_attempts)) print(f"Found {len(ligand_list)} ligands from {ligand_set}") print(f"Processing {min(max_ligands, len(ligand_list))} ligands with {n_processes} processes") ``` -------------------------------- ### Run Basic Docking with AutoDock-Vina Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Execute a basic docking calculation for a single ligand using AutoDock-Vina. Ensure all required PDBQT files and configuration text files are prepared. ```bash lig_pdbqt="imatinib_protomer-1.pdbqt" rec_pdbqt="rec_1iep.pdbqt" config_txt="rec_1iep.box.txt" ./vina --ligand $lig_pdbqt --receptor $rec_pdbqt --config $config_txt ``` -------------------------------- ### Initialize MoleculePreparation from Configuration Dictionary Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Create a `MoleculePreparation` instance using a configuration dictionary passed to the `from_config` constructor. This is useful for programmatically setting up complex configurations. ```python config_dict = {"merge_these_atom_types": (), "charge_model": "gasteiger"} mk_prep = MoleculePreapration.form_config(config_dict) ``` -------------------------------- ### Generate Receptor PDBQT File Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Prepare a receptor PDBQT file from a PDB input using mk_prepare_receptor.py. The -p flag generates only the receptor PDBQT file. ```bash pdb_file="Meeko/example/tutorial1/input_files/1iep_protein.pdb" mk_prepare_receptor.py --read_pdb $pdb_file -o rec_1iep -p ``` -------------------------------- ### Generate Ligand Conformer with scrub.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial3.md Use scrub.py to generate a 3D conformer of a covalent ligand conjugate from its SMILES string. This command prepares the ligand for tethered docking by creating an SDF file with explicit hydrogens. Use --skip_tautomer and --skip_acidbase flags to control tautomerization and acid-base ionization. ```bash ligand_smiles="c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3)COP(=O)([O-])N1C=C(CC)N=C1)O)O)N" scrub.py $ligand_smiles -o HIE_AMP.sdf --skip_tautomer --skip_acidbase ``` -------------------------------- ### Create Polymer from PDB File or String Source: https://github.com/forlilab/meeko/blob/develop/docs/source/py_rec_prep.md Initialize a Polymer instance either directly from a PDB file path or by reading a PDB file into a string first. Ensure the PDB file exists at the specified path. ```python from meeko import Polymer fn = "AHHY.pdb" polymer = Polymer.from_pdb_file(fn) # alternatively, use PDB string (not file) with open(fn) as f: pdb_string = f.read() polymer = Polymer.from_pdb_string(pdb_string) ``` -------------------------------- ### Process Multi-Molecule SDF for Docking Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Run mk_prepare_ligand.py on a multi-molecule SDF file to generate PDBQT files for each ligand. Consider using a temporary directory for large outputs. ```bash mk_prepare_ligand.py -i mols.sdf --multimol_outdir mols_pdbqt ``` -------------------------------- ### Run Docking Calculation with AutoDock-GPU Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial4a.md Execute docking calculations using the prepared receptor PDBQT file and ligand PDBQT files. Specify the field file and the directory containing the ligand files. ```bash adgpu --ffile 4EY7_receptor.maps.fld --filelist actives_final ``` ```bash adgpu --ffile 4EY7_receptor.maps.fld --filelist decoys_final ``` -------------------------------- ### Run Basic Docking with AutoDock-GPU Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Perform a basic docking calculation for a single ligand using AutoDock-GPU. Requires ligand PDBQT file and receptor map/field files. ```bash lig_name="imatinib_protomer-1" lig_pdbqt="${lig_name}.pdbqt" rec_prefix="rec_1iep" rec_map_fld="${rec_prefix}.maps.fld" ./adgpu --lfile $lig_pdbqt --ffile $rec_map_fld --resnam $lig_name ``` -------------------------------- ### Prepare Receptor with mk_prepare_receptor.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial3.md Prepare the protonated receptor PDB file for docking. Specify flexible residues, default alternate location IDs, and use a ligand PDB for box definition with padding. ```bash flexres="A:309" mk_prepare_receptor.py -i "${pdb_token}_receptorH.pdb" -o "${pdb_token}_receptorH" -p -g \ --default_altloc A -f $flexres \ --box_enveloping "LIG.pdb" --padding 8.0 ``` -------------------------------- ### Prepare Receptor using Meeko Source: https://github.com/forlilab/meeko/blob/develop/README.md Use `mk_prepare_receptor.py` to parameterize a receptor from a CIF file. This command generates both a PDBQT file and a JSON file containing the receptor's datastructure, with an option to specify flexible residues. ```bash mk_prepare_receptor.py -i nucleic_acid.cif -o my_receptor -j -p -f A:42 ``` -------------------------------- ### Create RDKit Molecules from Vina PDBQT File Source: https://github.com/forlilab/meeko/blob/develop/docs/source/export_usage.md Load Vina docking results from a PDBQT file into an RDKit molecule object. Omit `is_dlg=True` for Vina PDBQT files. ```python pdbqt_mol = PDBQTMolecule.from_file("vina_results.pdbqt", skip_typing=True) ``` -------------------------------- ### Prepare Receptor for Docking with mk_prepare_receptor.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Prepare the protonated receptor PDB file for docking. This command defines the reactive site, default alternate location ID, and grid box parameters. ```bash reactive_name_specific="A:309=NE2" mk_prepare_receptor.py -i "${pdb_token}_receptorH.pdb" -o "${pdb_token}_receptorH" -p -g \ --default_altloc A --reactive_name_specific $reactive_name_specific \ --box_enveloping "LIG.pdb" --padding 8.0 ``` -------------------------------- ### Convert PDBQT to SMILES with OpenBabel Source: https://github.com/forlilab/meeko/blob/develop/docs/source/export_usage.md Demonstrates how OpenBabel can infer bond orders from PDBQT, sometimes inaccurately, by converting a SMILES string to PDBQT and back. ```bash obabel -:"C1C=CCO1" -o pdbqt --gen3d | obabel -i pdbqt -o smi [C]1=[C][C]=[C]O1 ``` -------------------------------- ### Customize Atom Parameters with Multiple Files (Python) Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Load atom parameters from a list of files, including packaged Meeko files, OpenFF force fields, and local JSON files. Ensure local files include the .json suffix. ```python param_files = [ "vina_params", # <- packaged with meeko "openff-2.3.0", # <- from openff-forcefields package "/path/to/local_file.json", # <- user created ] mk_prep = MoleculePreparation(load_atom_params=param_files) ``` -------------------------------- ### Run Autogrid Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial_anchored.md Execute `autogrid4` to generate grid maps for docking. Ensure the receptor preparation step included the `-g` option to create the `.gpf` file. ```bash autogrid4 -p rec.gpf -l rec.glg ``` -------------------------------- ### Prepare Molecules using Meeko Python API Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_basic.md Use the Meeko Python API to read molecules from an SDF file, prepare them using default settings, and generate PDBQT strings. Ensure input molecules have real hydrogens and 3D positions. ```python from meeko import MoleculePreparation from meeko import PDBQTWriterLegacy from rdkit import Chem input_filename = "molecules.sdf" # iterate over molecules in SD file for mol in Chem.SDMolSupplier(input_filename, removeHs=False): mk_prep = MoleculePreparation() molsetup_list = mk_prep(mol) molsetup = molsetup_list[0] pdbqt_string = PDBQTWriterLegacy.write_string(molsetup) ``` -------------------------------- ### Write Configuration to JSON File Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Save a configuration dictionary to a JSON file, which can then be used by the `mk_prepare_ligand.py` script. ```python import json with open("my_config.json", "w") as f: json.dump(config_dict, f) ``` -------------------------------- ### Run Reactive Docking with AutoDock-GPU Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Execute reactive docking using AutoDock-GPU. This command requires ligand and receptor PDBQT files, a DPF file, and pre-computed map files. ```bash ./adgpu --lfile AMP.pdbqt --flexres 3kgd_receptorH_flex.pdbqt \ --ffile 3kgd_receptorH_rigid.maps.fld --import_dpf 3kgd_receptorH.reactive_config \ --resnam AMP ``` -------------------------------- ### Identify Active and Decoy Ligands Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial4b.md Uses glob to find active and decoy ligand files and creates lists of their names. This helps in labeling ligands for performance metric calculations. ```python import glob # Keep record of active and decoy ligands active_list = [x.replace("actives_final/", "").replace(".pdbqt", "") for x in glob.glob("actives_final/*.pdbqt")] decoy_list = [x.replace("decoys_final/", "").replace(".pdbqt", "") for x in glob.glob("decoys_final/*.pdbqt")] ``` -------------------------------- ### Run Docking with Contact Analysis Enabled Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial4a.md Execute docking calculations and enable contact analysis during the run by using the -C 1 option. This ensures interactions are written to the dlg file. ```bash adgpu --ffile 4EY7_receptor.maps.fld --filelist actives_final -C 1 ``` -------------------------------- ### Custom Polymer Parameterization with MoleculePreparation Source: https://github.com/forlilab/meeko/blob/develop/docs/source/py_rec_prep.md Configure custom parameterization settings using MoleculePreparation, such as atom parameters, charge models, and rigid macrocycles. Pass this configuration object to the Polymer constructor. ```python from meeko import MoleculePreparation mk_prep = MoleculePreparation( load_atom_params=["openff-2.3.0"], charge_model="nagl", # requires a recent version of OpenFF-toolkit merge_these_atom_types=[], rigid_macrocycles=True, ) polymer = Polymer.from_pdb_string(pdb_string, mk_prep=mk_prep) ``` -------------------------------- ### Create and Activate Virtual Environment Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Use micromamba to create a new virtual environment with Python 3.10 and then activate it. This is recommended for managing project dependencies. ```bash micromamba create -c conda-forge -n meeko_tutorial python=3.10 -y micromamba activate meeko_tutorial ``` -------------------------------- ### Rigidify Bonds using SMARTS and Indices (CLI) Source: https://github.com/forlilab/meeko/blob/develop/docs/source/lig_prep_advanced.md Use the command-line script to specify bonds to be rigidified based on SMARTS patterns and atom indices. Note that command-line indices are 1-based. ```bash mk_prepare_ligand.py \ --rigidify_bonds_smarts "C=CC=C" \ --rigidify_bonds_indices 2 3 \ --rigidify_bonds_smarts "[CX3](=O)[NX3]" \ --rigidify_bonds_indices 1 3 \ -i mol.sdf ``` -------------------------------- ### Generate 3D Conformer with scrub.py Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial2.md Use `scrub.py` to generate a 3D conformer of a ligand from its SMILES string. This command also handles tautomer and acid-base states, outputting an SDF file. ```bash ligand_smiles="c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3)COP(=O)([O-])[O-])O)O)N" scrub.py $ligand_smiles -o AMP.sdf --skip_tautomer --skip_acidbase ``` -------------------------------- ### Prepare Receptor for AutoDock-Vina with AutoGrid Source: https://github.com/forlilab/meeko/blob/develop/docs/source/tutorial1.md Generates receptor PDBQT, GPF, and box files for AutoDock-Vina when using the AutoDock4 Scoring Function. Requires AutoGrid for map computation. ```bash pdb_file="Meeko/example/tutorial1/input_files/1iep_protein.pdb" lig_file="Meeko/example/tutorial1/input_files/xray-imatinib.pdb" mk_prepare_receptor.py --read_pdb $pdb_file -o rec_1iep -p -v -g \ --box_enveloping $lig_file --padding 5 ``` ```bash Files written: rec_1iep.pdbqt <-- static (i.e., rigid) receptor input file boron-silicon-atom_par.dat <-- atomic parameters for B and Si (for autogrid) rec_1iep.gpf <-- autogrid input file rec_1iep.box.txt <-- Vina-style box dimension file rec_1iep.box.pdb <-- PDB file to visualize the grid box ```