Chazin Home Chazin Home | Ca-binding Protein DB | Vanderbilt Home Vanderbilt Home
Research Description | Publications | Wisdom | Search
How to contribute | About this page

Randy's DISCOM Tips

collected and edited by Randal R. Ketchem
last updated Wed Aug 28 19:44:33 PDT 1996

For a much better explanation of DDM's, see Melanie Nelson's DISCOM wisdom.

This is a collection of a few hints that I discovered while running DISCOM recently on four structure families. I had to run DISCOM and the other helper programs six separate times to cover all possible family pairs, so I wrote a few simple scripts to help me. I'll show the scripts and how I used them in hopes that they will help you. In the interest of space I will only show the comparison of two familes.

Generally, DISCOM creates ad.mtx and dd.mtx files. DISCOM helper programs strip the labels from these files and merge them into full matrices. The dd.mtx matrix contains the average distance differences in the upper triangle and the RMS distance differences in the lower triangle. The ad.mtx matrix contains the absolute values of the distance differences.

The manual is a good place to start. It is located at:
/nmr/dg/bin/src/gap/help/discom.help

First I created a shell script to run discom and discom.strip:

-----
#!/bin/sh

discom -sf1 mol1 -sf2 mol2 -for PDB -sub N,CA,C,H,O -mat 0
discom.strip dd.mtx > dd.strip
-----
discom.strip strips away the atom identifiers.

Next comes Mathematica. From within Mathematica load the math script:
math: <<math.inp
where math.inp is:

-----
disdif = ReadList["dd.strip", Number, RecordLists -> True] ;
disdifplt = Raster[disdif, ColorFunction -> (RGBColor[If[#<0,-#,0],If[#>0,#,0],1]&)] ;
Display["dd.rawps", Show[Graphics[disdifplt, AspectRatio -> 1, Frame -> True, Ticks -> Automatic, PlotRegion -> {{0.1,0.9},{0.1,0.9}}, DisplayFunction -> Identity]]]
-----
This creates a Mathematica PostScript file that does not have all of the necessary macros. Mathematica supplies a fixer program called psfix. Run it as:
/tsri/math/Bin.SPARC/Display/psfix dd.rawps > dd.ps
This PostScript file can then be viewed or sent to a printer. If you want to view the image directly from Mathematica without saving the raw PostScript, change the Display line to read:
Show[Graphics[disdifplt, AspectRatio -> 1, Frame -> True, Ticks -> Automatic, PlotRegion -> {{0.1,0.9},{0.1,0.9}}]]
That is all there is to creating the matrix plots. Pretty easy unless you want to change the color scale. Mathematica understands 0-1.

Next comes Grasp. Grasp will display the molecule and lines connected the distance difference atoms. These lines can be color coded and size coded to represent the distance differences. Take a look at the file HOWTO.ddm_in_grasp. It will explain the things I leave out. Well, perhaps it will just confuse you more.

First create a resmap file. One line for each residue. Capitalized 3 letter codes. This file should list all of the residues in the pdb file(s) in their correct order. You can grab them with awk or something. You only need a single list, not one for each file.

Next generate the pairwise interactions.

unix> discom2grasp dd.strip resmap 0.5 > discom2grasp.out
where 0.5 is the cutoff value.

Get the max and min for the color mapping.

unix> discom.pos_neg discom.strip.out
Now the color macro has to be edited. It looks like:
Macro Name: color_ddm
line :ic=11,ip=(1.0,10.0)
line :ic=12,ip=(0.8,1.0)
line :ic=13,ip=(0.6,0.8)
line :ic=14,ip=(0.4,0.6)
line :ic=16,ip=(0.0,0.4)
Macro End
Also, the colors have to be set in the Grasp file defcol.dat. Grasp can output this file, you can edit it so that the corresponding lines in defcol.dat match the required ic lines in color_ddm macro, and then quit and run Grasp again to read in the new colors.

In Grasp, read the pdb file and the pairwise interaction file discom2grasp.out. If the colors are set in the color macro, read the macro and execute the macro.

Here is a Grasp history file that can be read and executed with little modification:

-----
GRASP HISTORY FILE
Fri Aug 16 12:01:36 1996
Key  :Control X
Menu Cascade Begin
menu :GRASP | Read
menu :Read Submenu | PDB File
menu :Enter/List | Enter File Name
line :avgref_iupac.pdb
Menu Cascade End
Menu Cascade Begin
menu :GRASP | Read
menu :Read Submenu | Pair Wise Interactions
menu :Name of File | Let me Enter It
line :discom2grasp.out
Menu Cascade End
Menu Cascade Begin
menu: GRASP | Read
menu :Read Submenu | Grasp Macro File
line :color_ddm.graspmac
Menu Cascade End
Menu Cascade Begin
menu :GRASP | Macros
menu :Macrolisting | color_ddm
Menu Cascade End
ROT: X= -90.0
Key  :Control R
 DRAW
-----
That's it.