Zoey's way of retrodocking: Difference between revisions

From DISI
Jump to navigation Jump to search
(Added extraction instructions.)
m (Code block formatting)
Line 13: Line 13:
== Initial protein preparation ==
== Initial protein preparation ==


'''Use Maestro to prepare the protein.''' Cap termini, protonate, minimize hydrogens (but not heavy atoms!), etc. Save as a pdb file: `rec_and_xtal_maestro.pdb1
'''Use Maestro to prepare the protein.''' Cap termini, protonate, minimize hydrogens (but not heavy atoms!), etc. Save as a pdb file: <code>rec_and_xtal_maestro.pdb</code>


'''Split your protein using ChimeraX.''' Separate out the xtal ligand from the rest of the structure. Save as `rec_maestro.pdb` and `xtal_maestro.pdb`. Upload these files to the previously created preparation directory on cluster2.
'''Split your protein using ChimeraX.''' Separate out the xtal ligand from the rest of the structure. Save as <code>rec_maestro.pdb</code> and <code>xtal_maestro.pdb</code>. Upload these files to the previously created preparation directory on cluster2.


'''Prepare your protein using prepare_protein.py.''' See the documentation [[Protein Target Preparation (before Blastermaster)|here]]. My own fork is currently identical to Andrii's script, but I intend to clean up some of the pathways eventually. Run the following:
'''Prepare your protein using prepare_protein.py.''' See the documentation [[Protein Target Preparation (before Blastermaster)|here]]. My own fork is currently identical to Andrii's script, but I intend to clean up some of the pathways eventually. Run the following:
Line 48: Line 48:
   cd ../../retrodocking
   cd ../../retrodocking


'''Prepare your directory.''' Make the requisite directories. Add your own sdi file (formatted where each line is the full path to a tgz package of built molecules) to the sdi folder, and call it `mols.sdi`.
'''Prepare your directory.''' Make the requisite directories. Add your own sdi file (formatted where each line is the full path to a tgz package of built molecules) to the sdi folder, and call it <code>mols.sdi</code>.


   mkdir output ; mkdir sdi
   mkdir output ; mkdir sdi
Line 60: Line 60:
== Retrodocking - extraction ==
== Retrodocking - extraction ==


'''Confirm all jobs have completed.''' Run `squeue -u [your_username]` to check if you have any outstanding jobs. Check the integrity of your OUTDOCK files, and the contents of your `.err` files as well. A simple `wc -l output/*/*err` usually suffices.
'''Confirm all jobs have completed.''' Run <code>squeue -u [your_username]</code> to check if you have any outstanding jobs. Check the integrity of your OUTDOCK files, and the contents of your `.err` files as well. A simple <code>wc -l output/*/*err</code> usually suffices.


'''Generate your dirlist.''' Run the following:
'''Generate your dirlist.''' Run the following:

Revision as of 21:58, 15 October 2026

The instructions detailed here are my adaptation of the Read-The-Dock-Docs standard procedures, which can be found here. The Docs don't fully cover preparation on cluster2 (i.e., gimel), and this wiki page serves to keep track of my own scripts and post-processing files. Also meant to be a quick-and-dirty list of commands for copy/paste-ing.

Directory preparation

We'll make a directory for your protein structure, with subdirectories for each individual step.

 mkdir [protein_name]
 cd [protein_name]
 mkdir preparation
 mkdir blaster
 mkdir retrodocking

Initial protein preparation

Use Maestro to prepare the protein. Cap termini, protonate, minimize hydrogens (but not heavy atoms!), etc. Save as a pdb file: rec_and_xtal_maestro.pdb

Split your protein using ChimeraX. Separate out the xtal ligand from the rest of the structure. Save as rec_maestro.pdb and xtal_maestro.pdb. Upload these files to the previously created preparation directory on cluster2.

Prepare your protein using prepare_protein.py. See the documentation here. My own fork is currently identical to Andrii's script, but I intend to clean up some of the pathways eventually. Run the following:

 python /nfs/home/zdingman/scripts/dockopt/prepare_protein.py --rec rec_maestro.pdb --xtal xtal_maestro.pdb

Blastermaster

Change your directory. Assuming you're still in your preparation folder:

 cp rec.pdb ../blaster ; cp working/rec.crg.pdb ../blaster ; cp xtal-lig.pdb ../blaster
 cd blaster

Source the environment and initialize the job. This is verbatim from Read-The-Dock-Docs:

 source /mnt/nfs/soft/dock/versions/dock385/env.sh
 pydock3 blastermaster - new
 cd blastermaster_job

Modify blastermaster_config.yaml. Make any edits necessary to your blastermaster_config.yaml file now. Typically we adjust the bump_max from 10.0 to 100.0.

Run the job. Run the following:

 pydock3 blastermaster - run

Retrodocking - job launching

Below are the steps for running any sort of dock job on cluster2 -- in this case, a retrodocking job. However, the procedure is identical for any larger job you may wish to submit.

Change to your docking directory. Assuming you're still in the blastermaster folder. Run the following:

  cd ../../retrodocking

Prepare your directory. Make the requisite directories. Add your own sdi file (formatted where each line is the full path to a tgz package of built molecules) to the sdi folder, and call it mols.sdi.

 mkdir output ; mkdir sdi
 cp -r ../blaster/blastermaster/dockfiles/ .
 cp /nfs/home/zdingman/scripts/cluster2_docking/super_gimel_dock38.sh .

Launch the jobs. Run the following:

 sh super_gimel_dock38.sh sdi/mols.sdi output/

Retrodocking - extraction

Confirm all jobs have completed. Run squeue -u [your_username] to check if you have any outstanding jobs. Check the integrity of your OUTDOCK files, and the contents of your `.err` files as well. A simple wc -l output/*/*err usually suffices.

Generate your dirlist. Run the following:

 source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh ; source /nfs/soft/python/envs/complete/current/env.sh
 sh /mnt/nfs/exa/work/ak87/PROGRAM/LSD/make_dirlist.sh
 sh /mnt/nfs/exa/work/ak87/PROGRAM/LSD/cat_getposes.sh dirlist

Extract all outdock files and their corresponding poses. The below script retrieves everything in the dirlist which has a dock score of +100 or less:

 source /mnt/nfs/home/ak87/miniconda3/bin/activate /mnt/nfs/home/ak87/miniconda3/envs/py2
 python $DOCKBASE/analysis/extract_all_blazing_fast.py dirlist extract_all.txt 100
 python $DOCKBASE/analysis/getposes_blazing_faster.py  extract_all.sort.uniq.txt 2000 output_name.mol2 test.mol2.gz

Retrodocking - analysis

(placeholder)