Raster3D

Raster3D is a collection of separate molecular grahics programs consisting of "render", "ribbon", "setup", and "rods".

"ribbon", "setup", and "rods" are pre-processors for "render", which actually creates the drawings. These programs (except for "ribbon") can be used to draw small molecules as well as biopolymers.

Space-filling representations

"setup" is used to create space-filling representations:

cat color_file_name pdb_file_name | setup > raster3D_command_file

where "cat" is the Unix command for appending and listing files, "color_file_name" is a file containing RGB color specifications used by "render", "pdb_file_name" is a molecule file in PDB format, "raster3D_command_file" contains the commands used to drive "render", and "|" is the Unix pipe command used to transfer the input data to "setup".

Dreiding and ball-stick representations

"rods" is used to create Dreiding or ball-stick (use the "-b" option) drawings:

cat color_file_name pdb_file_name | rods -b > raster3D_command_file (note that this command creates a ball-stick drawing).

Protein ribbon representations

"ribbon" is used to create protein ribbon drawings:

cat color_file_name pdb_file_name | ribbon > raster3D_command_file

Representations generated by MolScript

MolScript can be used as a pre-processor for "render" (of primary use for proteins). In this case, "raster3D_command_file" is created by first running MolScript, as described elsewhere.

Creating drawings using Raster3D

"render" is used to generate a drawing:

render -sgi output_file.rgb < raster3D_command_file

where "raster3D_command_file" is produced using any of the aforementioned pre-processor programs.

Color

Colors used by Raster3D are described in a file containing RGB values for each element type. The color file is prepended to the PDB file using the Unix "cat" command. This data is "piped" to the Raster3D "setup" program, as previously noted. A sample color file is given below:

COLOUR#######C################   0.250   0.250   0.250  1.65
COLOUR#######N################   0.000   0.000   0.800  1.50
COLOUR#######O################   0.800   0.000   0.000  1.35
COLOUR#######S################   0.125   0.125   0.125  1.70
COLOUR#######H################   1.000   1.000   1.000  1.10
COLOUR#######P################   0.125   0.125   0.125  1.70
COLOUR########################   0.150   0.150   0.150  1.70
A mask is defined to extract the element name of each atom in the PDB file (e.g. "COLOUR#######H################" extracts hydrogen). Masks can be defined to assign colors based on other features of a PDB file, such as residue names.

The first three numbers after the mask specify "R", "G", and "B", respectively. The "cedit" program (SGI) can be used to define colors and determine their corresponding RGB values (note that these values must be divided by 255 for use in the Raster3D color file).

The fourth number is the van der Waals radius of each element.

A method for creating high resolution drawings

Raster3D allows the image size to be specified, and this feature can be used to create drawings similar in quality to PostScript. The trick is to create a large bitmap image (e.g. 4000 x 4000), which is then converted to a normal size PostScript image (e.g. using "tops"). This has the effect of increasing the density of pixels. The following is an excerpt from a raster3D_command_file created by MolScript:

  
MolScript v1.4 (C) 1993 Per Kraulis (Raster3D support E A Merritt 1993)
165 165   tiles in x,y; SGI small screen
24 24     pixels (x,y) per tile
3         3x3 virtual pixels -> 2x2 pixels
0 0 0     RGB background colour; black
F         F = no shadows cast, T = shadows
50        Phong power
0.20      secondary light contribution
0.05      ambient light contribution
0.10      specular reflection component
4.0       eye position
1 1 0.8   main light source position
1 0 0 0   input coord/radius transformation
0 1 0 0
0 0 1 0
0 0 0 1
3         mixed objects
.               .               .

.               .               .

.               .               .
The bitmap size is specified in the second ("tiles in x,y") and third ("pixels (x,y) per tile") lines of the file. The drawing size can be approximately calculated by multiplying the number of tiles by the number of pixels/tile (3960 x 3960 in the above example).

Note that the dimensions of the variables in "render" pertaining to image size will need to be increased to accommodate larger images.