Difference between revisions of "DOCK Denovo Run"

From Rizzo_Lab
Jump to: navigation, search
(DOCK Specifying Primary Residues)
(Generating the Grids)
Line 140: Line 140:
  
 
==Generating the Grids==
 
==Generating the Grids==
 +
We must now generate a grid file for each residue. To do so, we will need the aid of another one of Brian's scripts: 1BJU.make_multigrids.qsub.sh. But before we can use his script, we need to generate two input files for Dock. Create a file named 1BJU.multigrid.in with the following inside it:
 +
 +
compute_grids                  yes
 +
grid_spacing                  0.4
 +
output_molecule                yes
 +
contact_score                  no
 +
chemical_score                no
 +
energy_score                  yes
 +
energy_cutoff_distance        9999
 +
atom_model                    a
 +
attractive_exponent            6
 +
repulsive_exponent            9
 +
distance_dielectric            yes
 +
dielectric_factor              4
 +
bump_filter                    yes
 +
bump_overlap                  0.75
 +
receptor_file                  temp.mol2
 +
box_file                      ../001.files/1bju.box.pdb
 +
vdw_definition_file            ../001.files/vdw_AMBER_parm99.defn
 +
chemical_definition_file      ../001.files/chem.defn
 +
score_grid_prefix              temp.rec
 +
receptor_out_file              temp.rec.grid.mol2
 +
 +
Create it in your 007.multigrid folder. It should possess inside it:
 +
 +
cd /gpfs/home/guest43/scratch/denovo/trial_denovo/009.make-mg/
 +
 +
export PRIMARY_RES=` cat ../008.footprint_rescore/1BJU.primary_residues.dat | sed -e 's/\n/ /g' `
 +
export DOCKHOME="/gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/"
 +
python /gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/bin/multigrid_fp_gen.py ../001.files/1BJU.rec.clean.mol2 1BJU.resid 1BJU.multigrid.in ${PRIMARY_RES}
 +
 +
rm temp.mol2
 +
rm 1BJU.resid_*.rec.grid.mol2
 +
 +
/gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/bin/dock6 -i 1BJU.reference_multigridmin.in -o 1BJU.reference_multigridmin.out
 +
mv output_scored.mol2 1BJU.lig.multigridmin.mol2
 +
cp 1BJU.lig.multigridmin.mol2 ../001.files/
 +
 +
Change the path to Dock if necessary and your primary residue file if necessary, and ensure you are using a version of Dock with the Denovo code.
 +
 +
After running this script, you should be given a plethora of different files. If you are still running on the 1BJU system, you should have 19 different residues: 18 individual residues, and a 19th file containing the grid for the rest of the residues. You will have four files for each residue

Revision as of 11:56, 17 November 2016

Dock Denovo Run

The Denovo module of DOCK is a relatively new feature (as of Fall 2016) that constructs new ligand molecules inside a protein active site from a library of user-specified "fragments". These fragments are common chemical functional groups, or building blocks, that are typically selected from a ZINC library of millions of compounds based off of their frequency of appearance. These fragments are classified as scaffolds, linkers, or side chains, according to the number of atomic positions that are permitted to seed growth: 3, 2, and 1 atoms, respectively. Thus, a scaffold could seed growth on three different atoms, having three linkers bonded to each position, and a linker could seed growth on two positions, and a side-chain on one position.

Once the molecules are built within the active site, their interactions with the protein are scored using the user-specified method of scoring. This tutorial will walk through the steps needed to run a Denovo calculation on the Beta Trypsin system from the 2016 DOCK tutorial. This method will utilize the multi-grid scoring function, called through the descriptor score.

Preparing The Files

Before the Denovo module can be run, please ensure you have ran the DOCK 2016 tutorial and have all the resulting files. The tutorial can be accessed through here.

You should have these files in your directory:

001.files:

    1BJU.pdb
    1BJU.lig.mol2
    1BJU.rec.clean.mol2
    1BJU.rec.noH.mol2
    selected_spheres.sph

Additionally, you will also need these parameter files:

zzz.parameters:

    vdw_AMBER_parm99.defn
    flex.defn
    flex_drive.tbl


In order to run Denovo with multigrid scoring, we must first go through several steps:

1). Create a primary residue text file and a reference text file -- selects the primary residues of interest.

2). Make a multigrid file for each specified residue -- forms a grid for each residue specified in previous step.

3). Minimizes ligand mol2 file using multigrids from previous step.

4). Rescores ligand on multigrid to yield a minimized ligand .mol2 file. This serves as the reference ligand for Denovo calculations.

Luckily, our good friend Brian generated some extremely robust scripts to make this process easier. There is one script for each step, but we will only use the simple input files for DOCK. If you are interested in using the scripts (and a lot of debugging), they can be found on lired under: /gfps/home/guest43/scratch/denovo/trial_denovo/run/ .

DOCK Specifying Primary Residues

Create a directory within your working directory titled 008.footprint_rescore. This is where all pertinent files from this step will go, and where we will run our calculation from.

The input file for this step should be titled 1BJU.footpring_rescore.in, and should look like:

conformer_search_type                                        rigid
use_internal_energy                                          no
ligand_atom_file                                             ${WORKDIR}/001.files/1BJU.lig.mol2
limit_max_ligands                                            no
skip_molecule                                                no
read_mol_solvation                                           no
calculate_rmsd                                               no
use_database_filter                                          no
orient_ligand                                                no
bump_filter                                                  no
score_molecules                                              yes
contact_score_primary                                        no
contact_score_secondary                                      no
grid_score_primary                                           no
grid_score_secondary                                         no
multigrid_score_primary                                      no
multigrid_score_secondary                                    no
dock3.5_score_primary                                        no
dock3.5_score_secondary                                      no
continuous_score_primary                                     no
continuous_score_secondary                                   no
footprint_similarity_score_primary                           yes
footprint_similarity_score_secondary                         no
fps_use_footprint_reference_mol2                             yes
fps_footprint_reference_mol2_filename                        ${WORKDIR}/001.files/1BJU.lig.mol2
fps_foot_compare_type                                        d
fps_normalize_foot                                           no
fps_foot_comp_all_residue                                    no
fps_choose_foot_range_type                                   threshold
fps_vdw_threshold                                            1
fps_es_threshold                                             0.5
fps_hb_threshold                                             0.5
fps_use_remainder                                            yes
fps_receptor_filename                                        ${WORKDIR}/001.files/1BJU.rec.clean.mol2
fps_vdw_att_exp                                              6
fps_vdw_rep_exp                                              12
fps_vdw_rep_rad_scale                                        1
fps_use_distance_dependent_dielectric                        yes
fps_dielectric                                               4.0
fps_vdw_fp_scale                                             1
fps_es_fp_scale                                              1
fps_hb_fp_scale                                              0
descriptor_score_secondary                                   no
gbsa_zou_score_secondary                                     no
gbsa_hawkins_score_secondary                                 no
SASA_descriptor_score_secondary                              no
amber_score_secondary                                        no
minimize_ligand                                              no
atom_model                                                   all
vdw_defn_file                                                ${WORKDIR}/001.files/vdw_AMBER_parm99.defn
flex_defn_file                                               ${WORKDIR}/001.files/flex.defn
flex_drive_file                                              ${WORKDIR}/001.files/flex_drive.tbl
ligand_outfile_prefix                                        output
write_footprints                                             yes
write_hbonds                                                 no
write_orientations                                           no
num_scored_conformers                                        1
rank_ligands                                                 no


This calculation should be done very quickly (<10 seconds), and upon finishing you will have three output files:

1BJU.footprint_rescore.out 
output_footprint_scored.txt
output_scored.mol2


Now, we must declare the primary residues in the active site and generate a grid file for each. Create a new file in the text editor named 1BJU.primary_residues.sh. Write this inside of it (copied from Brian's script *.fpsrescore.qsub.sh):

grep -A 1 "range_union" 1BJU.footprint_rescore.out |
grep -v "range_union" |
grep -v "\-" |
sed -e '{s/,/\n/g}' |
sed -e '{s/ //g}' |
sed '/^$/d' |
sort -n |
uniq > temp.dat
for i in `cat temp.dat`; do printf "%0*d\n" 3 $i; done > 1BJU.primary_residues.dat
for RES in `cat temp.dat`
do
        grep " ${RES} " output_footprint_scored.txt  |
        awk -v temp=${RES} '{if ($2 == temp) print $0;}' |
        awk '{print $1 "  " $3 "  " $4}' >> reference.txt
done
grep "remainder" output_footprint_scored.txt |
sed -e '{s/,/  /g}' |
tr -d '\n' |
awk '{print $2 "  " $3 "  " $6}' >> reference.txt
mv reference.txt 1BJU.reference.txt
rm temp.dat

Run the script and you should have two new files:

1BJU.primary_residues.dat
1BJU.reference.txt 

These are our primary residues! Now we need to generate a grid for each one.

Generating the Grids

We must now generate a grid file for each residue. To do so, we will need the aid of another one of Brian's scripts: 1BJU.make_multigrids.qsub.sh. But before we can use his script, we need to generate two input files for Dock. Create a file named 1BJU.multigrid.in with the following inside it:

compute_grids                  yes
grid_spacing                   0.4
output_molecule                yes
contact_score                  no
chemical_score                 no
energy_score                   yes
energy_cutoff_distance         9999
atom_model                     a
attractive_exponent            6
repulsive_exponent             9
distance_dielectric            yes
dielectric_factor              4
bump_filter                    yes
bump_overlap                   0.75
receptor_file                  temp.mol2
box_file                       ../001.files/1bju.box.pdb
vdw_definition_file            ../001.files/vdw_AMBER_parm99.defn
chemical_definition_file       ../001.files/chem.defn
score_grid_prefix              temp.rec
receptor_out_file              temp.rec.grid.mol2

Create it in your 007.multigrid folder. It should possess inside it:

cd /gpfs/home/guest43/scratch/denovo/trial_denovo/009.make-mg/
export PRIMARY_RES=` cat ../008.footprint_rescore/1BJU.primary_residues.dat | sed -e 's/\n/ /g' `
export DOCKHOME="/gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/"
python /gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/bin/multigrid_fp_gen.py ../001.files/1BJU.rec.clean.mol2 1BJU.resid 1BJU.multigrid.in ${PRIMARY_RES}
rm temp.mol2
rm 1BJU.resid_*.rec.grid.mol2
/gpfs/home/guest43/local/dock.6.7_2015-02-17.denovo_paper.2016.05.04/bin/dock6 -i 1BJU.reference_multigridmin.in -o 1BJU.reference_multigridmin.out
mv output_scored.mol2 1BJU.lig.multigridmin.mol2
cp 1BJU.lig.multigridmin.mol2 ../001.files/

Change the path to Dock if necessary and your primary residue file if necessary, and ensure you are using a version of Dock with the Denovo code.

After running this script, you should be given a plethora of different files. If you are still running on the 1BJU system, you should have 19 different residues: 18 individual residues, and a 19th file containing the grid for the rest of the residues. You will have four files for each residue