Coloring and Subcluster Matching

From DISI
Revision as of 22:31, 31 March 2021 by Jklyu (talk | contribs)
Jump to navigation Jump to search

Written by Jiankun Lyu on March 31st, 2021.

Generate colored matching spheres

Create a directory and copy necessary files from your original receptor preparation folders

set workdir = /where you want to run your coloring and subcluster matching/
mkdir -p ${workdir}
cd ${workdir}
cp /your receptor preparation folder/dockfiles . -r
cp /your receptor preparation folder/INDOCK INDOCK_ori
cp /your receptor preparation folder/xtal-lig.pdb .
cp /your receptor preparation folder/working/rec.crg.pdb .
cd dockfiles
$DOCKBASE/proteins/showsphere/doshowsph.csh matching_spheres.sph 1 matching_spheres.pdb

Generate colored matching spheres

cd ../
/nfs/soft/chimera/current/bin/chimera --nogui --script "/mnt/nfs/ex5/work/jklyu/color_matching/scripts/color_matching_spheres.py rec.crg.pdb xtal-lig.pdb dockfiles/matching_spheres.pdb"
python /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/scripts/color_matching_spheres_new.py matching_spheres.cl.sph ./dockfiles/matching_spheres.sph
cp matching_spheres.cl.red.sph dockfiles

The script generates two matching sphere files: matching_spheres.vis.sph for visualization in Chimera: spheres with different chemical features such as hbond acceptors/donors etc represent in different colors; matching_spheres.cl.red.sph is the matching sphere file that can be passed to DOCK3.8 and used in the color matching calculation.

Prepare your INDOCK file for color matching

The color codes for matching spheres

positive                       (1)
negative                       (2)
acceptor                       (3)
donor                          (4)
ester_o                        (5)
amide_o                        (6)
neutral                        (7)
not_neutral                    (8)
positive_or_donor              (9)
negative_or_acceptor           (10)
neutral_or_acceptor_or_donor   (11)
donacc                         (12)
positive_or_acceptor           (13)
negative_or_donor              (14)
negative_or_acceptor_or_donor  (15)
positive_or_acceptor_or_donor  (16)

The color codes for atoms in the rigid fragment in db2 files

positive                       (1)
negative                       (2)
acceptor                       (3)
donor                          (4)
ester_o                        (5)
amide_o                        (6)
neutral                        (7)

A match in the section below basically define how ligand atoms should match into matching spheres. The first column of a match means the color code from the ligand atom and the second column means the corresponding color code from the matching spheres. For example, a match (1, 1) means that a positive atom (1) from the ligand should be matched onto a matching sphere that is labeled as positive (1).

Add the section below into your INDOCK file

#####################################################
#                             COLORING
chemical_matching            yes
case_sensitive                no
match                         1 1 
match                         2 2
match                         3 3
match                         4 4
match                         5 5
match                         6 6
match                         7 7
match                         1 8
match                         2 8
match                         3 8
match                         4 8
match                         5 8
match                         6 8
match                         1 9
match                         4 9
match                         2 10
match                         3 10
match                         7 11
match                         3 11
match                         4 11
match                         3 12
match                         4 12
match                         1 13
match                         3 13
match                         2 14
match                         4 14
match                         2 15
match                         3 15
match                         4 15
match                         1 16
match                         3 16
match                         4 16
#####################################################

Make sure your INDOCK parameter points to the colored matching spheres

##################################################### 
## INPUT FILES / THINGS THAT CHANGE
receptor_sphere_file          ../dockfiles/matching_spheres.cl.red.sph

Add the section below if you want to explore subcluster matching as well

#####################################################
#                             DOCKING
docking_mode                   4

Source my DOCKBASE

Since all of these is still in the development stage, you have to use my dev branch to run docking calculations

setenv DOCKBASE /mnt/nfs/home/jklyu/zzz.github/DOCK3/DOCK

Generate colored and clustered matching spheres

Install a conda environment to generate clustered matching spheres

conda env create -f /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/scripts/ClusterDOCK.yml

For more information and more analysis scripts, you can find them on Noam's github repo: https://github.com/noamteyssier/ClusterDock

Generate clustered matching spheres

cd ${workdir}
mkdir cluster_spheres
cd cluster_spheres
mkdir meta
cd meta
cp /where you store ligands and decoys/ligands-decoys.sdi enrichment_sdi
cp /where you store ligands and decoys/ligands.name ligands.names
cp /where you store ligands and decoys/decoys.name decoys.names
cp ${workdir}/INDOCK .
cp ../../dockfiles . -r
cp ../../matching_spheres.cl.red.sph ./dockfiles/matching_spheres.sph
conda activate ClusterDOCK
python /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/ClusterDock/src/ClusterSpheres.py -i meta/ -k {1,2} -n 3 -m
python /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/ClusterDock/src/ClusterSpheres.py -i meta/ -k 3 -n 5 -m
python /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/ClusterDock/src/ClusterSpheres.py -i meta/ -k {4,5} -n 15 -m
python /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/ClusterDock/src/ClusterSpheres.py -i meta/ -k {6,7} -n 30 -m
conda deactivate

Submit enrichment calculations

cd ${workdir}
python $DOCKBASE/docking/setup/setup_db2_zinc15_file_number.py . ligands-decoys_ ligands-decoys.sdi 20 count
cp /where you store ligands and decoys/ligands-decoys.sdi .
cp /where you store ligands and decoys/ligands.name ligands.names
cp /where you store ligands and decoys/decoys.name decoys.names
csh /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/scripts/colored_subcluster_docking/submit.csh ${workdir} ${workdir}/cluster_spheres/

Analyze your enrichment calculations