Coloring and Subcluster Matching: Difference between revisions
Line 25: | Line 25: | ||
=== Manual way to modify colored matching spheres === | === Manual way to modify colored matching spheres === | ||
cluster 1 number of spheres in cluster 50 | |||
1 44.17800 39.27200 32.01900 0.700 1 0 1 | |||
5 49.92100 42.48100 40.14300 0.700 5 0 2 | |||
7 44.01400 39.64100 40.42600 0.700 7 0 3 | |||
13 42.63200 39.82900 36.02200 0.700 13 0 4 | |||
15 47.34200 41.02400 42.26600 0.700 15 0 7 | |||
=== Prepare your INDOCK file for color matching === | === Prepare your INDOCK file for color matching === |
Revision as of 17:40, 12 April 2022
Written by Jiankun Lyu on March 31st, 2021. Modified by Jiankun Lyu on April 12th, 2022.
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 . 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
Automatic way to 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.
Manual way to modify colored matching spheres
cluster 1 number of spheres in cluster 50 1 44.17800 39.27200 32.01900 0.700 1 0 1 5 49.92100 42.48100 40.14300 0.700 5 0 2 7 44.01400 39.64100 40.42600 0.700 7 0 3 13 42.63200 39.82900 36.02200 0.700 13 0 4 15 47.34200 41.02400 42.26600 0.700 15 0 7
Prepare your INDOCK file for color matching
cp INDOCK INDOCK_cl
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 ##################################################### # MATCHING k_clusters 1
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_cl 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
cp /mnt/nfs/ex4/work/jklyu/colored_subcluster_matching/scripts/analysis.csh ${workdir} # You have to tweak the analysis script to run on your own system, because the script is designed for running DUDE benchmark on this method # I will revisit this part when I have time csh analysis.csh