Molscript, Bobscript and Raster3d Aims and Objectives

This session provides an introduction to drawing publication quality cartoons of protein structures.

At the end of the session the students should know

1. How to start the programs MOLSCRIPT, BOBSCRIPT and Raster3D
  1. How to set up a simple drawing
  2. Where to get further information on the programs in order to carry out more complicated drawings
Function and History

Molscript is probably the most widely used package for producing figures for publication derived from a PDB file normally as a postscript file on a white background. It was written by Per Kraulis at the University of Uppsala as part of his Ph.D. with Prof Alwyn Jones (of O fame). It was designed to produce figures in the style originally used by Jane Richardson with a helices as helical ribbons and b sheets as ribbon like arrows (see Fig 1)

Figure 1 A typical drawing (of PDB File 1PDA (porphobilogen deaminase) coloured by secondary structure elements ) produced by Molscript

(Note: Molscript originally and primarily produces postscript files. The picture above is in JPEG format, which can be displayed directly by the browser. The default background in Molscript2 for this format is black and the line colour white so "background white;" and "set linecolour black;" have been added to the command file to get closer to the postscript appearance click here(1pda2.ps) to look at the postscript file if your browser is configured to display it using an auxiliary program)

It was released in 1991 and the reference is

Per J. Kraulis MOLSCRIPT: A Program to Produce Both Detailed and Schematic Plots of Protein Structures. Journal of Applied Crystallography (1991) 24, 946-950.

Due to it being a condition of the license that this reference is quoted in every paper using figures from Molscript it is already an Institute of Scientific Information citation classic (around 4000 references by Oct 1998). As can be seen from its level of use it is a very good piece of software and simple to use. It produces excellent printed figures, which even photocopy moderately well out of journals. However it does not produce the moodily lit and silkily rendered slides on a black background as well as say photographing the screen in O, or in a number of packages popular in the States. Lighting is a good way of presenting depth in a picture. Raster3D was developed by Merrit and Murphy to do this and was redesigned to take the output from Molscript as one possible implementation. Figure 2 shows the Raster3D version of Figure1. There are programs in the raster3d package to assemble cartoons straight from PDB file and the output of other packages can be rendered using it but I will not be going into this in this session.

Figure 2 A typical drawing (of PDB File ) produced by Molscript followed by Raster3D

Note. This is a GIF file generated by 'xv' from the rgb file from raster3D. Click here.(snap.rgb) to see if your machine will display the real output (probably only SGI machines)

The references for Raster3D are

Ethan A. Merrit and Michael E.P. Murphy Raster3D Version 2.0 A Program for Photorealistic Molecular Graphics Acta Cryst. (1994) D50, 869-873

D. Bacon and W.F.Anderson A fast algorithm for rendering space-filling molecule pictures. Journal of Molecular Graphics (1988) 6, 219-220

There are inevitably limitations to any software and a major limitation to Molscript was that electron density could not be drawn. Robert Esnouf (then at Oxford) adapted the code of Molscript to include map drawing routines (from a range of formats). He named this modified software Bobscript. He also included colour ramping that allows smooth changes of colouring of the molecule. This means that the molecule can be followed from beginning to end along a rainbow of colours. It also allows smooth colouring of the molecule by B factor, so that the most mobile bits can be say red and the least mobile bits blue. (Other properties can be substituted for B factor in the input file). Stereo plotting is carried out more explicitly. Figures 3 shows a Bobscript picture with a region of map, figure 4 shows a colour ramped molecule and figure 5 a B factor coloured molecule.

Figure 3 Bobscript output of a small region of RhoGDI(1RHO) with its map. (Original file bobdemo.ps)

Figure 4 Colour ramped version of Figure 1. It is blue at the N terminus through green to red at the C terminus. (Original file 1pda4.ps)

Note Capturing the postscript file displayed with 'xpsview' as an rgb file using 'snapshot' and converting to a gif file with 'xv' gives a better reproduction of what would print than jpeg straight from molscript

Figure 5 Temperature factor coloured version of Figure1. Blue is low through white to red for high B factor residues. (Original 1pda5.ps)

The reference for Bobscript is

R.M. Esnouf An extensively modified version of MolScript that includes greatly enhanced coloring capabilities. Journal of Molecular Graphics (1997), 15, 132-134

Finally about a year ago Per Kraulis released Molscript V2. This adds a large range of output formats including interactive OpenGL (allows rotation and determination of orientation also JPEG , EPS and PNG format outputs) and VRML (Virtual Reality Markup Language). He also implemented his own version of colour ramping. There is also the facility to handle 'external objects' which can be set up to be electron density. This does not appear to match the ease of map plotting in Bobscript. VRML is best appreciated by going to Per's display of the small G protein ras http://www.avatar.se/molscript/examples/ras_vrml.wrl.

Local implementation

All of the programs should run without the need for any further setting up on any of the Unix machines. (There is no need to invoke a use command). The current installed version will be displayed on starting the program. This may not always be the absolutely latest version if you visit the home pages for the software. If there is something you need in a later version you should contact Ian Tickle (i.tickle@mail.cryst.bbk.ac.uk) or Dave Houldershaw (software@mail.cryst.bbk.ac.uk) and ask them nicely to install the upgrade. We do not normally install every minor change of version as it is too time consuming.

To run molscript to produce a postscript file (input.file is discussed below)

molscript -ps < input.file > output.ps

To run molscript to produce an open gl file

molscript -gl <input.file

To run molscript and feed the result to Raster3d to produce a Silicon Graphics rgb file.

molscript -raster3d <input.file | render -sgi output.rgb

To run bobscript

bobscript <input.file>output.ps

A simple example using Rasmol to get initial view and secondary structure

The first stage is to get your PDB file and read it into Rasmol. "rasmol xyz.pdb". You can then rotate your molecule until you get the angle you want for your picture. Then type at the command line (not available via pull-down menus) "write molscript input.file". This will produce a starting file for molscript. Here is mine 1pda.inp
 
! File: 1pda.inp Comments on the file
! Creator: RasMol Version 2.6
! Version: MolScript v1.3
plot
window 73.544; Controls the size of the picture
read mol "1pda.pdb"; Read in the pdb File
transform atom * This section sets up the orientation
by centre position atom * Note only this section does not have semi-colons at the end of every line
by rotation x 180.0 You can add an extra line
by rotation z -98.8356 "By rotation y 90.0"
by rotation y -6.80092 To get the view 90 degrees away. 
by rotation x -94.3826 This is often a better way of showing the structure than a stereo pair
by translation -3.57506 -1.65985 0.0;
coil from 3 to 5; Secondary structure described in sequence order ( It need not be it is just what rasmol does)
strand from 5 to 10; Beta strand
coil from 10 to 14; Coil creates a smooth coil only the first and last alpha carbons positions are used exactly
helix from 14 to 30; Helix
turn residue 31; Turn draws a coil between exact alpha carbon positions but two are needed so this has no effect
turn residue 32; Coil from 30 to 31; Turn from 31 to 33; Coil from 33 to 35;
turn residue 33; Would be an improvement on this section
coil from 30 to 35; Rasmol make sure that there is continuous chain from 30 to 35
strand from 35 to 41;
coil from 41 to 44;
helix from 44 to 47;
turn residue 60;  
turn residue 61;  
turn residue 62;  
coil from 47 to 64;  
helix from 64 to 71;  
coil from 71 to 77;  
strand from 77 to 81;  
coil from 81 to 82;  
helix from 82 to 84;  
turn residue 90;  
turn residue 91;  
turn residue 92;  
coil from 84 to 93;  
strand from 93 to 99;  
coil from 99 to 105;  
strand from 105 to 109;  
turn residue 110;  
turn residue 111;  
turn residue 112;  
coil from 109 to 116;  
helix from 116 to 118;  
turn residue 120;  
turn residue 121;  
turn residue 122;  
coil from 118 to 124;  
strand from 124 to 127;  
coil from 127 to 130;  
helix from 130 to 139;  
turn residue 140;  
turn residue 141;  
turn residue 142;  
coil from 139 to 144;  
strand from 144 to 146;  
coil from 146 to 152;  
helix from 152 to 160;  
coil from 160 to 166;  
strand from 166 to 170;  
coil from 170 to 171;  
helix from 171 to 176;  
coil from 176 to 180;  
helix from 180 to 182;  
coil from 182 to 185;  
strand from 185 to 187;  
coil from 187 to 189;  
helix from 189 to 191;  
turn residue 195;  
turn residue 196;  
turn residue 197;  
turn residue 198;  
turn residue 199;  
coil from 191 to 200;  
strand from 200 to 206;  
turn residue 206;  
turn residue 207;  
turn residue 208;  
coil from 206 to 210;  
helix from 210 to 219;  
coil from 219 to 222;  
helix from 222 to 238;  
turn residue 241;  
turn residue 242;  
turn residue 243;  
coil from 238 to 246;  
strand from 246 to 253;  
turn residue 253;  
turn residue 254;  
turn residue 255;  
coil from 253 to 256;  
strand from 256 to 265;  
turn residue 265;  
turn residue 266;  
turn residue 267;  
coil from 265 to 270;  
strand from 270 to 278;  
coil from 278 to 283;  
helix from 283 to 296;  
coil from 296 to 299;  
helix from 299 to 305;  
coil from 305 to 307;  
coil from 314 to 652; These are the cofactors and the waters. Nothing is drawn.
end_plot  

 

Were you to run this script you would get a black-and -white picture. To colour by secondary structure, I edited all the helix commands and all the strand commands together and at the start of each section added the command "set planecolour colour;". 8 named colours are defined and an infinite number can be generated using numerical representations (see documentation).

Other common commands

Other things that can be shown include atoms as 'ball-and-stick" or "cpk". There are a number of ways to select atoms and residues, which take some practice. A few examples are

Cpk in residue 143;

Ball-and-stick in type ASP;

Sphere position in residue B27 15.0; (Draws all atoms within 15 Å of the centre of residue B27)

(See documentation for full details).
 
 

There are commands "trace", which gives lines through alpha carbons and "bond", which allow line drawings rather than cartoons.

Labels are positioned on certain atoms

Label require atom CA and in residue A203 "C";

And this is preceded by an offset command

set labeloffset -2.0 0.0 0.0;

The values are got by trial-and-error, and is one of the more time consuming stages.

Figure 6. Line drawing structure superposition with labels.

Note The superposition has to be done separately. There are no commands in molscript to do that. Overlaid sets of coordinates have to be read in. More than one pdb file can be read in for each picture. The balls are cpk atoms with the radius set small.

Drawing good pictures

It is fairly easy to produce pictures quickly using molscript, but to convey what you want is much harder. This comes with practice and experience. The best way to learn is to look at other people's pictures. Think about what they show and don't show and whether it conveys what they say it does in the text. Try producing similar diagrams yourself.

More advanced issues

Multiple Pictures and Stereo

Postscript output from Molscript and Bobscript can be positioned and sized on the page using the "area" command. Each command file can produce more than one picture. This is particularly useful for producing stereo pairs. In Bobscript there are explicit "leftstereo" and "rightstereo" commands; in Molscript small (+/- 3.0 degrees) rotations about y need to be added to the orientation commands.

Alternative starting files

Per Kraulis has released a program Molauto, which produces a starting molscript file from your pdb file. There are more options than with rasmol (see documentation (Sweden)). These are all entered on the command line e.g.

Molauto -cpk xyz.pdb > xyz.inp

Means that any ligands are produced as CPK. Indeed the ability to handle ligands makes molauto better than rasmol. However it does not give you the view. To get that you must run molscript interactively

Molscript -gl <xyz.inp

And use the left mouse to print the orientation to your terminal window. This is entered using the "transform rotation" 3x3 matrix"command.

Raster 3d Header

Raster3d used to be controlled by a file called "header.r3d" which had to be manually edited to control background and lighting. This is still required for Bobscript, but Molscript2 controls all these from the command file.

Links to Documentation and further information

Local Version of Molscript 2 HTML documentation. file:/local/doc/molscript/html/index.html

Molscript home page in Sweden http://www.avatar.se/molscript/

Raster 3D home page http://www.bmsc.washington.edu/raster3d/raster3d.html

Bobscript Home Page http://orval.rega.kuleuven.ac.be/~robert/BobScript/

Other Software to produce figures of structures

There are many other programs that people use to produce figure in publications.

O Alwyn Jones program primarily for model building but can produce diagrams via screen photos or oplot http://imsb.au.dk/~mok/o/

SETOR Alternative rendering package http://flint.biochm.uottawa.ca/~setor_docs/

MOLMOL Written by R.Koradi in Kurt Wuthrich's groups in Zurich -good for NMR structures http://www.mol.biol.ethz.ch/wuthrich/software/molmol/

RIBBONS Mike Carson, University of Alabama http://origin.cmc.uab.edu/ribbons/ribbons.html

Commercial modelling packages such as SYBYL, QUANTA and INSIGHT also can be used.

Last revised 1/12/98 Dr Nicholas Keep, Department of Crystallography, Birkbeck College