next up gif contents index
Next: Surfaces Up: Tutorials Previous: Tutorials

 

Introduction to spock: movement, coloring

OBJECTIVE: This tutorial will provide an introduction to spock concepts, how to read in and display a molecule, as well as color the molecule in various interesting ways.

Concepts introduced: fetching a PDB file (§5.2.2), mouse control (§4.1), object coloring (§ 5.2.1), the color palette (§6.11.4), selection (§5.3), bond drawing styles (§6.4.1), worm drawing styles (§6.4.3), atom drawing styles (§ 6.4.2).

To begin, simply type:

spock

on the command line. If you've never run spock before, a brief message will be displayed. Click on Dismiss after reading the message. Spock will run through a brief banner display, and then be ready for use, indicated by ``Spock is ready''. appearing in the text window.   First read in a PDB file by typing the command

fetch=1rnt.pdb

in the command entry area at the bottom of spock's window. This command will contact the Brookhaven Protein Data Bank and retrieve for you a copy of the structure for Ribonuclease T1. (If this doesn't work, have your system administrator check the script in $SPOCK/bin/getentry. This script should contact the PDB and download the file.) Spock will then read this PDB file, and display the molecule on screen. First, rotate the molecule on screen by pressing the left mouse button and dragging the mouse around. Left-right mouse motions correspond to rotations around the screen Y axis (the vertical axis), while up-down motions rotate about the screen X axis (the horizontal axis). To rotate about the Z axis, which points into the screen, release the left mouse button, and press the middle mouse button. Moving the mouse left and right now rotates about the screen Z axis. You may have noticed that the cursor shape changes when you press the mouse buttons. The different cursors are intended to indicate the current mode of motion. As you may have noticed when attempting to rotate about the Z axis with the middle mouse button, moving the mouse up and down with this button held down zooms in or out. Finally, pressing the left and middle buttons together translates the molecule on the screen in the screen X and Y directions. Experiment with the mouse control for a while until you're familiar with it. Mouse control is described in detail in §4.1.     Now, go the Graphics menu and choose ``Reset view''. This will remove any rotations and translations you've applied. Now, we will learn how to color the molecule. First, go to the Display menu and turn off the Bonds entry. This should leave just the Worms entry on. By default the worms are a white color. Type

wc=$blue

and the worm representation on screen will become blue. The ``wc'' in the command stands for Worm Color. The ``$'' indicates that blue is a environment variable just like those used in the Unix shells. The spock initialization files (§3) define the following color names as variables: $white, $red, $green, $blue, $yellow, $cyan, $magenta, $orange, $purple, and $sky. Colors may be referred to by these variable names, or by number (from 0 to 100). Color 0 is a special color which indicates that the specified objects should be hidden, or not displayed. Type

wc=3

to color the worm green. The color palette may be displayed using the Color Tool under the Graphics menu, and is described in § 6.11.4.     Spock's command language is divided into two major parts: ``actions'' and ``selections''. Actions are commands that tell spock to do something (like color a residue), while selections limit the action to apply to only certain objects. Actions always come first on the command line, and they are optionally followed by a comma and then a selection string. There's a list of all possible of actions and selections in Appendix D, which is also accessible from within spock by going to the help menu, and choosing ``Quick reference.'' The command language is also described in detail in §5 of the manual, also accessible from within spock via the help menu's ``Command language'' option. Finally, help on any menu may be obtained by pressing the F1 key when the cursor is in that menu.

We can use selections to make a coloring command apply to only a selected set of residues or atoms. Click each end of the helical section of ribonuclease. Strings will be displayed on screen indicating the atoms which are represented by those sections of the ribbon, in this case, SER 13 and ASP 29. To color the helical section a different color, we must limit the coloring command by a selection string. Type

wc=$red,rn=(13,29)

The helix will now be colored red. The rn after the command stands for Residue Number, and indicates that the command should apply only to residues in the range 13-29 inclusive. Pick a few sheet sheet segments out and color them a different color, perhaps $blue. If you make a mistake, you can type wc=u or wc=undo to undo the last command.

Since the worm is now probably colored like a Christmas tree, type

wc=d

to return to the default color scheme (white). To get worm segments color-coded according to the secondary structure type--blue for tex2html_wrap_inline6840 sheet, red for tex2html_wrap_inline6854 helix, purple for turns, and yellow for random coil--type

wc=s or wc=structure.

For this file, spock has taken the secondary structure information from the PDB file's HELIX, SHEET, and TURN records. Not all PDB files supply this information, however, so spock provides several other ways to set the secondary structure (see §8.16).   There's a handy little shortcut that should be introduced here. Make sure bonds are turned on in the ``Display'' menu and type

bc=d

to color them with their default colors. Now, under the ``Picking'' menu, select ``Command''. Enter

look=10

for the command. Now whenever we pick on any object, the display will automatically be centered on the associated atom, and all bonds within 10 Ångstroms of that object will be turned on. Note that you can pick on the backbone worm as well, and see bonds within 10 Ångstroms of that point on the backbone.   Let's alter the appearance of the ribbon. Under the ``Alter'' menu, choose Worm. You may want to ``tear off'' this menu by choosing the dashed line at the top of the menu. This will make the menu stay on screen as a mini-control panel. You can move the menu out of the way by using the standard window-manager methods. Usually, this means clicking the left or middle mouse button on the title bar, and moving the mouse with the button held down.

The Alter worms menu offers a variety of rendering styles for the worms. Try each one in turn. Of particular interest is the Secondary structure representation, which draws a Richardson-style cartoon of the backbone. The ``Variable radius'' option is also interesting. This representation initially has the width of the backbone proportional to the crystallographic temperature factor (B-factor), but the property controlling the width may be changed via the Alter worms menu, described in detail in §6.4.3.   Now, let's turn our attention to the bonds. First, turn bonds back on in the Display menu. The bonds should appear, colored by atom type. Now type

bc=0,r=wat

This hides all the water molecules (r means Residue, referring to the residue name). As you can see, objects with color 0 are not drawn. Objects turned off in the Display menu, however, are not drawn regardless of their color. Type

bc=0,a=sch

This will turn off all side chain atoms. Actually this hides all atoms that are not backbone atoms, and as you can see (or rather as you can't see) the substrate has disappeared as well. We can make the substrate come back with the command

bc=d,r=substrate

This command demonstrates two concepts, first, how to restore the default bond colors (bc=d) and second, the ``substrate'' residue type. This is simply defined as any atom that's not an amino acid, a DNA/RNA base, or water, so any metal ions in your structure will be selected by this command as well. Go ahead and turn off the backbone bonds with the command

bc=0,a=ba

You should now have just the ribbon and the substrate bonds colored. Change the view so that the substrate is in the front.

The bonds are drawn as simple lines. Let's change this. Choose and tear off the Alter tex2html_wrap_inline6800 Bonds menu (§6.4.1). The Primary bond mode options of this menu may be used to change the drawing style of the bonds. Try them all to see the different styles. Lines is by far the fastest to render, followed by sticks. Capped cylinders and Ball-and-stick rendering can be particularly slow and will usually only be used for presentation graphics, not ``real work''.   You may be wondering about the secondary bond modes. It's possible in spock have two different drawing styles for different groups of bonds, in order to highlight important regions. Bonds with ``negative'' colors are drawn in the secondary bond mode. The color is actually taken from the absolute value of the assigned color number, the negative is just a flag to use the secondary bond mode. Turn on all bonds with the

bc=d

command, then enter

bc=i,r=substrate

This will ``invert'' the bond colors (multiply them by -1) for the substrate, so the substrate will now be drawn in the secondary style, which is capped cylinders by default, but it as well can be changed via the alter bonds menu. Bonds may also be assigned negative colors directly as in

bc=-2,rn=25, or even bc=-$red,rn=25.

The command to alter atom colors is ac, and atoms may be turned on in the Display menu and controlled by the Alter atoms menu § 6.4.2. Play with the atom coloring and atom drawing modes. One hint: when drawing atoms in sphere mode, use the command ac=51,ac=1 to increase the contrast of the white atoms (§ 5.2.1).

Quit spock via the File tex2html_wrap_inline6800 Quit menu item.


next up gif contents index
Next: Surfaces Up: Tutorials Previous: Tutorials

Jon Christopher
Tue Sep 14 16:44:48 CDT 1999