Documentation for the HOLE: 6.5 Creating 2D Maps of the internal surface of a pore
Copyright 1997 by Oliver S. Smart

 <<Previous Section Calling Section^  Hole Doc. Index^  HOLE home  OSS home  comments?  Next Section>>

Navigation:

Back to contents
Back to section 6.0 Visualization of results
Back to previous section 5.0 van der Waals radii files
On to next section 7.0 Ancillary programs

6.0 Visualization of results (continued...)


6.5 Creating 2D Maps of the internal surface of a pore

A recent advance allows an alternative view of the internal surface of a pore - from the inside. In this case we set up a cylindrical co-ordinate system working from the pore centreline:

This coordinate system can then be used to display properties of the pore lining in two dimensions. A simple way of imagining how the maps are constructed is to imagine that the internal surface of the pore is cut down a line and then rolled flat. A number of properties of the internal surface of the pore can then be displayed, for instance, whether the surface is lined by oxygen or nitrogen atoms. An example of such a picture is given in the J. Mol. Graphics article which forms part of this documentation.

The change in the residues lining internal surface of phospholamban model structure during a molecular dynamics run (thanks to Mark Sansom for the coordinates). It is immediately apparent that the model is a 5 helix bundle and the changes to which residues line the pore are obvious. This picture was produced using surfer.

Such a map can be left monochrome or coloured according to residue properties. In this case a different colour is used for residues from different chains. Other possibilities are to colour residues according to residue number or charge.

How to produce 2D maps in practice

The routines included in HOLE to produce 2D maps were written to produce files suitable for use with surfer drawing program. This is a very flexible mapping program, primarily used by cartographers, geographers and similar (who know better than most how to make a nice map). It is only available in for pc's running DOS or windows and costs $499. If you want to produce pretty pictures and have the cash you can find further information at http://www.golden.com/. I haven't provided any specific information about how to use the files produced by HOLE with surfer because (a) its pretty obvious once you have worked through the surfer tutorial (b) I seriously doubt whether you are going to shell out the money for the program anyway! E-mail me if you do - and I'll address this deficiency.

Because I know how hard up all you researchers are I have gone to the trouble of digging around for a free more machine independent solution. The best program which I found for the purpose was gnuplot

The first step is to do a hole run in which the 2DMAPS card is specified in the input file. In the ~/hole2/example directory the file "2dmap.inp" shows such an input file (directly adapted from "example.inp"):

! example input file run on Arseniev's gramicidin structure
! Adapted from standard example.inp to produce 2D maps see section 6.5
! of hole documentation for details.
coord  1grm_single.pdb          
radius ~/hole2/rad/simple.rad
cvect  0 1 0                    
cpoint 0 0 3             
sample 0.25                     
endrad 5.

shorto 2            ! cut down on output
2dmaps 2d_example   ! filename root - many files will be produced with
                    ! this as a start
Note that you cannot include the CAPSULE card when producing 2D maps - the routine cannot handle anisotropy.

The end of the output file (included as "2dmap.out") lists what has been produced:

2d_example_touch.grd for map of touching distance
2d_example_capost.dat for Calpha posting info
2d_example_caline.bln for Calpha connecting lines (blanking format)
2d_example_res.bln for contacting residue base map (blanking format)
2d_example_on_map.grd for map Oxygen/Nitrogen neighbour presence
  (value 1 for oxygen, -1 for nitrogen and zero for any other)
2d_example_resno_map.grd for map of residue number
2d_example_polar_map.grd for map of residue polarity
  (1 for glu,asp; -1 for lys/arg; +0.1 tyr,ser,his,gln)
2d_example_chain_map.grd for map of chain id
  (number is the offset ascii value for the character
   i.e. if chain id's go A, B, C numbers will go 1,2,3)
2d_example_for_make_post_map.hole for file to be used with make_post_map to make
 better post map
2d_example_resid.dat for residue patch identities
 HOLE: normal completion
Note all the filenames begin with the root 2d_example as specified by the 2dmaps card. The files can be directly read into surfer. Files of type .grd are grid files which contain information to produce a contour map (or mesh surface). Type .bln ("blanking null") contains information to draw lines on a 2D surface. Type .dat contain information for posting points on a 2D surface and labelling them.

Here is a more detailed description of what each file contains:

  • Files containing map type information:
    fileroot_touch.grd
    This contains information as to distance (in Angstroms) from the centre line to the closest atom surface at that point. Maps can display anisotropic features (such as side opening etc.).

    fileroot_on_map.grd
    This contains information as to whether the closest non-hydrogen atom to the HOLE surface at this coordinate is an oxygen (value +1), a nitrogen (-1) or something else. Used in the gramicidin map example

    fileroot_resno_map.grd
    This contains information as the residue number of the closest non-hydrogen atom to the HOLE surface at this coordinate (value is the residue number).

    fileroot_chain_map.grd
    This contains information as the chain identity of the closest non-hydrogen atom to the HOLE surface at this coordinate. Each chain with have a seperate numberical value starting at 1 and then equal to the ichar(chain_id)-ichar(chain_id_1st_atom)+1 (ichar() is fortran function giving the ascii number for any character). This map is used in picture of phospholamban above.

    fileroot_polar_map.grd
    This contains information as the polarity of the residue for the closest non-hydrogen atom to the HOLE surface at this coordinate. Value 1 for glu,asp; -1 for lys/arg; +0.1 tyr,ser,his,gln.

  • Files containing line drawing information:
    fileroot_res.bln
    This is not a map file but contains information as to the boundaries between different residues. Similar pictures can be gained by drawing maps with chain_id/residue number but the .bln file is neat and easy. In the phospholamban and the gramicidin pictures this is used to draw a black line between different residues in a neat way. This is one of the most useful files if you are limited to using gnuplot (see below).

    fileroot_caline.bln
    This file contains the information for drawing lines connecting the points of projection of Calpha atoms onto the surface. Very useful - shows the relation of the structure to the surface - see pictures of phospholamban above.

  • Files containing information for placing labels:
    fileroot_resid.dat
    This file contains the information for placing labels stating what residue each patch refers to. The label is placed at the centroid of the total positions for that residue. For complex maps in which a single residue has two or more patches this can mean that the label lies outside any of the patches involved. For this reason a way of producing better labels was written:

    fileroot_for_make_post_map.hole
    This file can be used with the seperate program make_post_map (supplied with hole and automatically setup with the package) to produce much better residue id labels than the ones above. To use simply get to the directory containing the file and type "make_post_map" (and the enter key) like in this example:
    jura> cd ~/hole2/example
    jura> ls *.hole
    2d_example_for_make_post_map.hole
    jura> make_post_map
     *** Program make_post_map ***
     
     Copyright 1997 by Oliver Smart and Birkbeck College
     Program modification number 0001 28-2-97
     HOLE release 2beta001 (28 Feb 1997)
     Program linked at Sat Mar  1 19:01:47 GMT 1997  
     Last modified .f files: 
              14 Mar  1 18:59 machine_dep.f -
           15933 Mar  1 18:59 vdwdot.f       
            2970 Mar  1 18:59 vdset.f        
    
     Please enter input hole format (old) filename
     defaults <2d_example_for_make_post_map.hole> ext:<.hole> (abort by EXIT or ^D) :  (hit enter key)
     Please enter output SURFER posting format (new) filename                   
     defaults <2d_example_for_make_post_map.dat> ext:<.dat> (abort by EXIT or ^D) :    (hit enter key)
    
     input file has info for    73 rows and   141 columns 
     Data limits X=   -180.000   180.000
     Data limits Y=    -17.500    17.500
    STOP - make_post_map normal completion.
    jura> 
    	
    In this case a file "2d_example_for_make_post_map.dat" has been produced. This contains sensible labels for each patch on the 2D map "occupied" by a different residue. The label is positioned at the point furthest from any other patch. The label list starts this the largest patch and goes to the smallest. If the map is rather cluttered simply delete the labels at the end of the file.

    fileroot_capost.dat
    This file contains labels for the positions of Calpha atoms projected onto the surface - useful in conjunction with fileroot_caline.bln which draws lines between the points.
  • Using gnuplot to draw maps

    As explained above the 2D map support in HOLE was written for use with the program surfer but because of the cost of the package and its restriction to pc's the use of gnuplot is now supported. It is not as easy to produce really pretty maps with gnuplot but with a bit of effort reasonable results can be obtained.

    Gnuplot is a public domain quite reasonable 2D/3D graph plotter. It is command line driven and is supported on wide range of machines. The examples given here were run with gnuplot unix version 3.5 (pre 3.6) patchlevel beta 332 (run on a sg under IRIX5.2). For more details of gnuplot see the gnuplot homepage, a convenient European place to download the latest version of gnuplot is from this ftp site at the Department of Physics & Astronomy at the University of Southampton, UK.

    In order to use the surfer type files with gnuplot then they must be converted into a form suitable for gnu. Conversion programs are supplied with HOLE and should have been setup automatically with hole. The following table describes how to convert each file produced by HOLE or make_post_map.

    File How to convert (at unix prompt). How to use in gnuplot
    All map type files:
    fileroot_touch.grd, fileroot_on_map.grd,
    fileroot_resno_map.grd, fileroot_chain_map.grd,
    fileroot_polar_map.grd
    grd2gnu < fileroot_***.grd > fileroot_***.gnu splot "fileroot_***.gnu" with lines
    Files containing information for drawing lines
    fileroot_caline.bln (Calpha conecting lines),
    fileroot_res.bln (residue boundaries).
    bln2gnu < fileroot_***.bln > fileroot_***.gnu plot "fileroot_***.gnu" with lines
    or
    splot "fileroot_***.gnu" with lines
    Labels for residue patches
    fileroot_for_make_post_map.dat
    (output of program make_post_map).
    make_post2gnu < fileroot_for_make_post_map.dat > fileroot_for_make_post_map.gnu load "fileroot_for_make_post_map.gnu"
    Labels for Calpha positions
    fileroot_capost.dat
    capost2gnu < fileroot_capost.dat > fileroot_capost.gnu load "fileroot_capost.gnu"

    Note because gnuplot contour plotting allows only very limited features it may be best to concentrate on using the .bln and .dat type files in 2D mode (plot rather than splot).

    Example application

    Example run in ~/hole2/example using files created in HOLE run and make_post_map application described above in this document.

    The first thing to do is convert the files above into a suitable form:

    jura> bln2gnu < 2d_example_caline.bln > 2d_example_caline.gnu
    jura> bln2gnu < 2d_example_res.bln > 2d_example_res.gnu      
    jura> make_post2gnu < 2d_example_for_make_post_map.dat > 2d_example_for_make_post_map.gnu
    jura>
    

    Then simply run gnuplot (!indicates a comment do not enter yourself!!)

    jura> gnuplot
    
            G N U P L O T
            unix version 3.5 (pre 3.6)
            patchlevel beta 332
            last modified Sat Apr 12 06:39:51 BST 1997
    
            Copyright(C) 1986 - 1993, 1997
            Thomas Williams, Colin Kelley and many others
    
            Send comments and requests for help to info-gnuplot@dartmouth.edu
            Send bugs, suggestions and mods to bug-gnuplot@dartmouth.edu
    
    Terminal type set to 'x11'
    gnuplot> load "setup_gnu"  ! setup file - see below
    gnuplot> load "2d_example_for_make_post_map.gnu" ! labels 
    gnuplot> plot "2d_example_res.gnu" with l, "2d_example_caline.gnu" with l linewidth 6  ! plot both residue patch seperators and Ca lines  
    gnuplot> set yrange [-17:17]  ! visual inspection of picture in Xwindow suggests need to reduce range 
    gnuplot> replot ! yes that's better 
    gnuplot> set output "2d_example_gnuplot.ps"
    gnuplot> set term post ! output to postscript file 
    Terminal type set to 'postscript'
    Options are 'landscape noenhanced monochrome dashed defaultplex "Helvetica" 14'
    gnuplot> replot
    gnuplot> exit
    

    The postscript file that results is included in the example directory and basically looks like this:

    Map of the internal surface of Arseniev and co-workers structure for the channel form of gramicidin D. The surface is divided into seperate areas according to the residue of closest atom to the HOLE surface. The dotted line marks the projection that a line joining the alpha carbons of each residue makes in the coordinate space. The head to head dimer nature of the channel is immediately obvious.

    The file "setup_gnu" contains useful commands for using gnuplot with HOLE files. It is included in example directory but for completeness contents listed here:
    # setup commands for using gnuplot with HOLE 
    # to use type 
    # gnuplot> load "setup_gnu"
    # at the gnuplot> prompt 
    # these are only a suggestion to get really pretty output you
    # will probably have to modify them.
    set parametric
    set view 0, 0
    set xtics -180, 90, 180
    set noclabel
    set nokey
    set xlabel "angle from x-axis in degrees"
    set ylabel "z coordinate in angstroms"
    set cntrparam levels auto 30
    set size square
    # for splot do not want original data - only contours
    # n.b. for plotting .bln (residue maps, calpha lines) use plot not splot
    set nosurface
    set contour
    

    GOOD LUCK and let me know of any useful tips!


    Navigation:
    Back to contents
    Back to section 6.0 Visualization of results
    Back to previous section 5.0 van der Waals radii files
    On to next section 7.0 Ancillary programs

     <<Previous Section Calling Section^  Hole Doc. Index^  HOLE home  OSS home  comments?  Next Section>>