jmol enhanced figure toolkit

Previous Top Next
[Example graphic]

Tutorial 4: a biological macromolecule molecule

This tutorial uses the structure of the SH3 domain of rat endophilin A2 (Loll et al., 2008). Start the application with the PDB code 3c0c. By default the toolkit provides a cartoon representation of the structure (Fig. 34).

[Fig. 34]
Fig. 34
Default cartoon representation upon loading a protein structure.

Arrangement and labelling of an initial view

To accentuate the colour range of the cartoon, go to the select/label tab, select 'backbone' under the list of protein-specific options. Then go to the structure tab and toggle the 'cartoon' checkbox off and on to extend the colour gradient across the whole backbone from blue at the N terminus to red at the C terminus. You may also like to try out the other schematic structural representations available on this tab. Note that they are additive, and can be assigned separate colour schemes and translucencies. This allows you to superimpose different interpretations of the structure on the one view.

For now, return to the cartoon view, manipulate the molecule into a preferred orientation, and zoom in to fill the visualization window as much as possible (Fig. 35). Save this using the 'Primary save' button (Fig. 5) as the initial view of the enhanced figure.

[Fig. 35]
Fig. 35
Protein structure after colour enhancement, reorientation and scaling.

Next add some labels to the figure. The select/label tab is helpful in allowing you to select certain components of the structure, and in a limited amount of labelling (mostly by atom name or by element). For more complex labelling, you will need to work in the Jmol console window; or in the scratch tab, where you can build up and test a complex labelling script. We illustrate that approach here. You may also find it helpful to review Section 6.5, where more details are given about how you can carry out the 'detective work' of retrieving the effects of clicking on toolkit buttons and menus from the Jmol console history function, and then modify them to your specific needs. Of course, to achieve everything you want to do, you will need to combine this approach with reading the Jmol documentation.

Begin by labelling the molecular termini with their sequence numbers. If you allow your cursor to hover over an atom, then, after a slight delay, a popup appears that identifies the atom, including information about its residue type and sequence number. If you do this, you will find that the blue (N) terminus is residue number 305, the red (C) terminus number 368. You will also see the sequential numbers of the terminal atoms (respectively numbers 2 and 515), which can be used as identifiers for anchoring the desired labels.

Fig. 36 shows this mechanism in operation. It also shows how you can use the select/label tab to select the terminal atoms and label them with their sequential numbers, and then recover from the Jmol console the scripting commands that have been put into effect in doing so.

[Fig. 36]
Fig. 36
Using mouse hover, console history and selected radiobutton actions to deduce an appropriate script.

The script retrieved by following these steps is shown in the history window of the console in Fig. 36, and is:

select thisModel and (none)
set picking atom
select selected tog (atomIndex=1)
select selected tog (atomIndex=514)
font labels 20 serif bold;label %i
set labeloffset 12 -12

Note a few things here. Jmol's internal script commands use the atomIndex identifier, which is offset by 1 from the atomNo that shows up in the hover labels. The select commands are executed in the context of your interaction through the toolkit. To provide the reader with a more robust script, it would be good practice to wrap your script in a save/restore pair of commands that separates the selections needed in the labelling process from whatever other selections are in effect. The 'set picking' command will not be needed in a non-interactive script: it was invoked only to allow you to pick interactively the atoms that you wanted to label. Finally, the 'label %n' command selects the atom sequential number. It can be replaced by 'label %r' to print the residue number (or, if you do are not familiar with that notation, you could specify individual literal strings as labels).

Putting all these ideas into effect, and extending them to other aspects of the figure that you want to label, you could end up, after a little trial and error, with a script such as the following:

save selection ORIG;
color labels black;
select (atomNo=2);
font labels 20 serif bold;label %r;
set labeloffset 0 -12
select (atomNo=515);
font labels 20 serif bold;label %r;
set labeloffset 12 -12

select (atomNo=95);
font labels 32 sanserif italic;label "RT loop"
select (atomNo=286);
font labels 32 sanserif italic;label "Src|loop"
set labeloffset -20 0;

restore selection ORIG;

The 'save' and 'restore selection' commands isolate this labelling from other actions; 'color labels black' creates black labels (actually, labels that contrast with the background, so they will automatically become white against a black background). The vertical bar in the string label 'Src|loop' splits the label over multiple lines at that point.

Fig. 37 shows how this can be developed in the scratch panel.

[Fig. 37]
Fig. 37
Developing a labelling script in the scratch window.

When you are happy with the result, copy and paste this script into one of the script input boxes on the checkbox scripts tab. You should also provide a script that has the opposite effect (i.e. to remove the labelling) and a caption, e.g. 'Label major features'. A suitable counter script for action when the checkbox is unchecked would be:

save selection ORIG;
select (atomNo=2); label off;
select (atomNo=515); label off;
select (atomNo=95); label off;
select (atomNo=286); label off;
restore selection ORIG;

Finish this lesson by adding another simple pair of checkbox scripts, 'stereo 5 on;zoom 75%;' and 'stereo off;zoom 120%;' to produce a wall-eyed stereo representation (the '5' is the number of degrees divergence between right and left eye view -- you may make this a negative number for cross-eyed stereo viewing). The zoom factors are determined empirically to fill the available space. With both enhancements activated, you have reproduced the features of the published Fig. 1 of Loll et al. (2008).

Lesson 2: highlighting surface features.

Fig. 2 of Loll et al. (2008) is a surface representation of the molecule, colour coded by element. Jmol allows you to draw a molecular surface via an option on the general tab, but although the surface can be drawn in many colours, it does not inherit the colouring by element of the underlying atom species. However, you can emulate the required effect by making the surface translucent, and placing a space-filling model below, colour-coded by element.

Fig. 38 is constructed from a recipe that involves selecting all atoms at 75% van der Waals radii, coloured by element and with 80% translucency (from the select/label tab), and a molecular surface coloured 'metal' at 60% translucency from the general tab. A black background has also been selected (from the general tab) The colours can be emphasised, if desired, by reducing the level of translucency. However, if one then selects the option 'Label major features' that you created in the last lesson, the labelling will be concealed almost completely. It is found by experimentation that these values provide a reasonable compromise to optimise the visibility of surface, coloration and labels.

[Fig. 38]
Fig. 38
The surface representation overlaid with labelling and highlighting options.

The complete view is associated with a button using the 'import view' function on the button scripts tab, and a suitable caption composed.

The published article identifies the Trp 343 residue as a convenient geographical marker for the ligand-binding groove. You could therefore provide another checkbox script allowing the reader to switch on and off highlighting of that residue. A suitable activation script is:

save selection ORIG;
select none;
select (resNo=343);
atoms cpk 90%;
colour atoms magenta;
select none;
restore selection ORIG;

You could also add another checkbox to toggle the molecular surface between translucency and opacity. The opaque view ('colour isosurface opaque;') loses the element colour-coding, but will render faster, which will be helpful if the reader wishes to rotate the structure, or has a relatively slow computer.

If the reader also activates the options to toggle spin on and to display a stereo view, a very convincing three-dimensional impression is obtained on a sufficiently fast computer.

[Example 4]
Example 4
Click on the thumbnail to launch the enhanced figure in a separate window.


Previous Top Next


Follow IUCr Journals
Sign up for e-alerts
Follow IUCr on Twitter
Follow us on facebook
Sign up for RSS feeds