Difference between revisions of "DOCK Denovo Run"

From Rizzo_Lab
Jump to: navigation, search
(Minimizing Ligand on Grids)
(Running Denovo)
Line 357: Line 357:
 
== Running Denovo ==
 
== Running Denovo ==
  
We can finally start running a Denovo calculation! Hooray!
+
We can now run a Denovo calculation! Rejoice!

Revision as of 12:46, 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 which will be called upon by the script. Create a file named 1BJU.multigrid.in inside your 007.multigrid folder 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

Additionally, create a file named 1BJU.reference_multigrid.in:

conformer_search_type                                        rigid
use_internal_energy                                          yes
internal_energy_rep_exp                                      12
internal_energy_cutoff                                       100.0
ligand_atom_file                                             ../001.files/1BJU.lig.mol2
limit_max_ligands                                            no
skip_molecule                                                no
read_mol_solvation                                           no
calculate_rmsd                                               yes
use_rmsd_reference_mol                                       yes
rmsd_reference_filename                                      ../001.files/1BJU.lig.mol2
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                                      yes
multigrid_score_secondary                                    no
multigrid_score_rep_rad_scale                                1
multigrid_score_vdw_scale                                    1
multigrid_score_es_scale                                     1
multigrid_score_number_of_grids                              19
multigrid_score_grid_prefix0                                 ../007.multigrid/1BJU.resid_001
multigrid_score_grid_prefix1                                 ../007.multigrid/1BJU.resid_040
multigrid_score_grid_prefix2                                 ../007.multigrid/1BJU.resid_081
multigrid_score_grid_prefix3                                 ../007.multigrid/1BJU.resid_084
multigrid_score_grid_prefix4                                 ../007.multigrid/1BJU.resid_171
multigrid_score_grid_prefix5                                 ../007.multigrid/1BJU.resid_172
multigrid_score_grid_prefix6                                 ../007.multigrid/1BJU.resid_173
multigrid_score_grid_prefix7                                 ../007.multigrid/1BJU.resid_174
multigrid_score_grid_prefix8                                 ../007.multigrid/1BJU.resid_176
multigrid_score_grid_prefix9                                 ../007.multigrid/1BJU.resid_177
multigrid_score_grid_prefix10                                ../007.multigrid/1BJU.resid_191
multigrid_score_grid_prefix11                                ../007.multigrid/1BJU.resid_192
multigrid_score_grid_prefix12                                ../007.multigrid/1BJU.resid_193
multigrid_score_grid_prefix13                                ../007.multigrid/1BJU.resid_194
multigrid_score_grid_prefix14                                ../007.multigrid/1BJU.resid_196
multigrid_score_grid_prefix15                                ../007.multigrid/1BJU.resid_197
multigrid_score_grid_prefix16                                ../007.multigrid/1BJU.resid_204
multigrid_score_grid_prefix17                                ../007.multigrid/1BJU.resid_206
multigrid_score_grid_prefix18                                /gpfs/home/guest43/scratch/denovo/wiki_denovo/007.multigrid/1BJU.resid_remaining
multigrid_score_fp_ref_mol                                   no
multigrid_score_fp_ref_text                                  yes
multigrid_score_footprint_text                               /gpfs/home/guest43/scratch/denovo/wiki_denovo/008.footprint_rescore/1BJU.reference.txt
multigrid_score_use_euc                                      yes
multigrid_score_use_norm_euc                                 no
multigrid_score_use_cor                                      no
multigrid_vdw_euc_scale                                      1
multigrid_es_euc_scale                                       1
dock3.5_score_secondary                                      no
continuous_score_secondary                                   no
footprint_similarity_score_secondary                         no
ph4_score_secondary                                          no
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                                              yes
simplex_max_iterations                                       1000
simplex_tors_premin_iterations                               0
simplex_max_cycles                                           1
simplex_score_converge                                       0.1
simplex_cycle_converge                                       1.0
simplex_trans_step                                           1.0
simplex_rot_step                                             0.1
simplex_tors_step                                            10.0
simplex_random_seed                                          0
simplex_restraint_min                                        yes
simplex_coefficient_restraint                                5.0
atom_model                                                   all
vdw_defn_file                                                ../001.files/vdw_AMBER_parm99.defn
flex_defn_file                                               ../001.files/flex.defn
flex_drive_file                                              ../001.files/flex_drive.tbl
ligand_outfile_prefix                                        output
write_orientations                                           no
num_scored_conformers                                        1
rank_ligands                                                 no

Now that we have our input files, we can form the script that will call upon them to generate the grid files for each specified residue. Create a blank file named 1BJU.make_multigrids.qsub.sh in your 007.multigrid folder. Then transcribe into 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 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 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: a .bmp file, a .mol2 file, a .nrg file, and a .out file (for each residue!). Additionally you should have two other files: 1BJU.lig.multigridmin.mol2, 1BJU.reference_multigridmin.out. Check your output file for any errors and to make sure everything ran to completion. Visualize your ligand in Chimera to make sure it contains atoms and looks like a real chemical structure. You should have something that looks like this:

1BJU.multigridmin.png

Minimizing Ligand on Grids

We're taking the input here straight from Brian's script for this part (run.003e.mg_rescore.sh). Create an input file named 1BJU.parents_multigridmin.in with this inside it:

conformer_search_type                                        rigid
use_internal_energy                                          yes
internal_energy_rep_exp                                      12
internal_energy_cutoff                                       100.0
ligand_atom_file                                             ../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                                      yes
multigrid_score_secondary                                    no
multigrid_score_rep_rad_scale                                1
multigrid_score_vdw_scale                                    1
multigrid_score_es_scale                                     1
multigrid_score_number_of_grids                              19
multigrid_score_grid_prefix0                                 ../007.multigrid/1BJU.resid_001
multigrid_score_grid_prefix1                                 ../007.multigrid/1BJU.resid_040
multigrid_score_grid_prefix2                                 ../007.multigrid/1BJU.resid_081
multigrid_score_grid_prefix3                                 ../007.multigrid/1BJU.resid_084
multigrid_score_grid_prefix4                                 ../007.multigrid/1BJU.resid_171
multigrid_score_grid_prefix5                                 ../007.multigrid/1BJU.resid_172
multigrid_score_grid_prefix6                                 ../007.multigrid/1BJU.resid_173
multigrid_score_grid_prefix7                                 ../007.multigrid/1BJU.resid_174
multigrid_score_grid_prefix8                                 ../007.multigrid/1BJU.resid_176
multigrid_score_grid_prefix9                                 ../007.multigrid/1BJU.resid_177
multigrid_score_grid_prefix10                                ../007.multigrid/1BJU.resid_191
multigrid_score_grid_prefix11                                ../007.multigrid/1BJU.resid_192
multigrid_score_grid_prefix12                                ../007.multigrid/1BJU.resid_193
multigrid_score_grid_prefix13                                ../007.multigrid/1BJU.resid_194
multigrid_score_grid_prefix14                                ../007.multigrid/1BJU.resid_196
multigrid_score_grid_prefix15                                ../007.multigrid/1BJU.resid_197
multigrid_score_grid_prefix16                                ../007.multigrid/1BJU.resid_204
multigrid_score_grid_prefix17                                ../007.multigrid/1BJU.resid_206
multigrid_score_grid_prefix18                                ../007.multigrid/1BJU.resid_remaining
multigrid_score_fp_ref_mol                                   no
multigrid_score_fp_ref_text                                  yes
multigrid_score_footprint_text                               ../008.footprint_rescore/1BJU.reference.txt
multigrid_score_use_euc                                      yes
multigrid_score_use_norm_euc                                 no
multigrid_score_use_cor                                      no
multigrid_vdw_euc_scale                                      1
multigrid_es_euc_scale                                       1
dock3.5_score_secondary                                      no
continuous_score_secondary                                   no
footprint_similarity_score_secondary                         no
ph4_score_secondary                                          no
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                                              yes
simplex_max_iterations                                       1000
simplex_tors_premin_iterations                               0
simplex_max_cycles                                           1
simplex_score_converge                                       0.1
simplex_cycle_converge                                       1.0
simplex_trans_step                                           1.0
simplex_rot_step                                             0.1
simplex_tors_step                                            10.0
simplex_random_seed                                          0
simplex_restraint_min                                        yes
simplex_coefficient_restraint                                5.0
atom_model                                                   all
vdw_defn_file                                                /gpfs/home/guest43/scratch/denovo/wiki_denovo/001.files/vdw_AMBER_parm99.defn
flex_defn_file                                               /gpfs/home/guest43/scratch/denovo/wiki_denovo/001.files/flex.defn
flex_drive_file                                              /gpfs/home/guest43/scratch/denovo/wiki_denovo/001.files/flex_drive.tbl
ligand_outfile_prefix                                        output
write_orientations                                           no
num_scored_conformers                                        1
rank_ligands                                                 no

After running this you should have an output file (which should be checked for errors, as always) and a .mol2 file named 1BJU.parents_multigridmin.mol2. This is the mol2 file of the ligand minimized using the multigrids. Inspect the file with VI or less to ensure that it has atomic coordinates, and visualize it in Chimera to ensure it looks like a real molecule. This will serve as our reference molecule for guided growth!

Running Denovo

We can now run a Denovo calculation! Rejoice!