if this tutorial is helpful in the creation of your own webpages,
please explicitly acknowledge this in your work (e.g. URL, Author,
and, ideally, a link to this page). And please
drop an email to firstname.lastname@example.org
with a link to your page/s. This helps with funding opportunities
for the OMM and helps ensure continued development of this resource.
Note: surfaces require a lot of memory and are slow to load. This is especially true now that we are using JSmol and HTML5 instead of the java-based Jmol. If you get an unresponsive script, please choose continue. you may need to do this several times, depending on the script.
This exhibit displays molecules in the left part of the screen,
and text that addresses structure-function relationships of
the molecules in the right part (below). Use the scrollbar to
the right to scroll through the text of this exhibit.
To evoke renderings of the molecule that illustrate particular
points, click the radio buttons:
Jmol, a Java applet
used to view molecules in web pages, can read scripts that are contained
in Jmol buttons. These scripts are used to change the rendering of
the molecule to illustrate important structural features.
This exhibit provides
tags for buttons. Each section starts with a discussion of the uses
of various renderings and ends with a table that includes a list of
buttons (left column -
) containing sample scripts (right column). These evoke particular
renderings of the molecules displayed in the left frame. If you are
new to Jmol scripting, it is suggested that you spend time going through
the exhibit in its entirety, reading the scripts to see how they can
be employed in your own web pages.
uses two different units of measurement that can be used with display
commands. One is the standard, atomic-resolution unit, the Angstrom
(Å); 1 Å = 10-10 meters. Chime also uses a
novel unit, the RasMol unit; 1 RasMol unit = 1/250 Å. The display
codes (see below) can be modified to specify dimensions in either
RasMol units or Angstroms by adding a numerical value after the name
of a command.
Angstroms are indicated by a decimal in the numerical value and RasMol
units are used as a default when no decimals are employed. For example,
a 'wireframe 125' script specifies a wireframe display in 125 RasMol
Units. This is equivalent to the script "wireframe 0.5"
default display for most pdbs is wireframe, as shown at left. Wireframe
is very useful because it clearly shows the covalent bonds (except
S-S bonds) between all atoms of a molecule.
the thickness of wireframe displays can provide useful alternatives
in illustrating points.
is another commonly used display. Spacefill rendering displays the
Van der Waals radius of each atom as a solid sphere by default.
radii can be altered by a numerical specification (see below).
Different "ball and stick" representations can be achieved
by varying the thickness of wireframe and the radii of spacefill.
is a display similar to spacefill in that the diameter of the spheres
formed are equal to that of the Van der Waals radius. Dots combines
easily with other display commands to provide useful effects. Combining
wireframe and dots displays can show Van der Waals surfaces clearly
for a loop or secondary structure.
far, we have considered displays that affect all atoms of a molecule,
unless particular atoms are selected (see below, The
Select Command). Sometimes showing only the backbone of a molecule
is desired. There are several displays that illustrate the backbone
conformation of a molecule:
backbone display shows the polypeptide backbone of a protein
or the sugar-phosphate backbone of a nucleic
acid as a train of bonds connecting the adjacent alpha carbons
of each amino acid (protein) or phosphorus atoms (nucleic acid)
in sequential order.
is a display similar to backbone, but with smoothed transitions
between the alpha carbons of a peptide chain
or the phosphorus atoms of nucleic acids.
are two displays that are excellent for showing secondary structure:
Ribbons smooth the backbone, like trace, but display the backbone
as a wide, flattened band. Cartoons does the same except that nucleic
acid backbones are displayed as a trace and the
nitrogenous bases of nucleic acids
are rendered as flat rings. Numerical modifications can be
used to change the width of the band. In default mode of both ribbons
and cartoons, the width of alpha helical
and beta strand secondary structure
is greater than that of loops. Cartoon has the feature of indicating
of peptides. This is quite convenient, e.g. when showing the parallel
or antiparallel arrangement of beta
in a beta sheet.
is a rendering similar to ribbons and cartoons, but with the backbones
displayed as a series of thin lines. Strands can be indicated with
dashed lines (see below).
meshribbons are two additional representations of backbone conformations.
Lighting effects can be employed to change the appearance of a molecular
display. For example:
lighting intensity can be manipulated.
highlights on atoms are white reflections of the "light source".
The degree of specular highlighting can be changed.
It is sometimes useful to display the surfaces of molecules. For example,
the shapes of ligand binding pockets or catalytic sites are often
illuminated is a surface view. To learn about Jmol suface displays,
consult our SURFACES page.
Loading a pdb by use of a button is useful for introducing a new molecule
into an exhibit or for simply resetting a molecule after it has been
When constructing a Jmol script for a button in a molecular exhibit,
it is helpful to incorporate a series of default commands that turn
off any previous scripts invoked by other buttons. We recommend the
following set of commands be used upon loading: "set frank off;
select all; hbonds off; spin off; wireframe off; spacefill off; trace
off; set ambient 40; set specpower 40; slab off; ribbons off; cartoons
off; label off; monitor off". This "blank state" can
then be modified by subsequent commands in the script.
Once a pdb is loaded it is often useful to orient the molecule in
3-D by rotating it around the X,Y, or Z axes. Rotation commands are
expressed in degrees so a rotation of 360 around a particular axis
will show no change in the orientation of the molecule.
A molecule can
also be translated along any of the axes without rotation:
Translation along the X axis causes the molecule to move left or right.
Translation along the Y axis causes the molecule to move up or down.
Note: contrary to intuition, positive numbers for Y translation move
molecules down and negative numbers move molecules up. Translation
on the Z axis is called zoom, because it brings the molecule closer
to or farther away from the viewer. Translation commands are expressed
in percentage. Thus, to double the magnification (zoom), a numerical
value of 200 is used.
and zoom commands to effect a desired view can be incorporated in
the initial loading of a pdb.
There are other,
smoother ways to move, rotate, and zoom molecules that will be discussed
later, in the Animation section.
For the display
commands already discussed, and for coloring and bond options to be
addressed later, it is often desirable to limit rendering changes
to particular atoms or sets of atoms. The select command is used to
specify what atoms of a molecular file will be affected by subsequent
rendering commands (e.g spacefill, cartoons, etc.).
There are a number
of predefined sets of atoms such as "all", "backbone",
"protein", "ligand", "hetero", "helix",
"sheet", "sidechain", etc..
selects all atoms.
or "select amino" both select all of the amino acids.
selects all nucleic acid atoms, but "select dna" or "select
rna" works on specified nucleic acid residues (DNA=a,t,g,c; RNA=a,u,g,c).
will select all heterogeneous atoms, including water, ions, and ligands.
or "select hoh" will select only the water molecules (usually
only oxygen atoms of water are present in a pdb file), and "select
ligand" will select only a ligand.
and "select sheet" are used to select alpha helices and
beta sheets, respectively.
and "select sidechain" are used to select backbone or sidechain
The select command
can also be used to select a specific chain in a molecular file, a
single amino acid, or even a single atom (useful!). In
selecting atoms or residues, it is possible to discriminate between
chains in a file that contains multiple molecules. For example, let's
say that you wish to select a single residue (#10) on one chain of
a pdb file with a dimeric protein bound to DNA (four chains). Each
chain will likely have a residue # 10. If the command "select
10" were used, four residues would be selected, one on each of
the protein chains and one on each strand of DNA. Instead, if the
desired residue (#10) is on chain A, then the script "select
:a and 10" or "select 10:a" would select only residue
#10 on chain A, ignoring the residue #10s on other chains.
Define is a command
that is very useful when dealing with a group of atoms that do not
belong to a predefined set, such as a phosphate on a ligand or the
tail of an ATP molecule. The atoms of interest can be associated under
one atom expression that can then be selected with ease. The format
of the script for defining a group of atoms is "define 'name
of group' 'atoms to be grouped' ".
Another type of
selection is the restrict command. "Restrict" limits the
display to those atoms specified in the restrict script.
can be labeled using the label command. Labels can be colored, and
the fontsize height set (in pixels) using appropriate commands. The
default label color is the selected atom's color and the default fontsize
is 8 pixels. The
position of the label can be altered by setting the label offset.
sets of atoms, or other selections is quite useful in crafting quality
molecular exhibits. Explanatory text can be co-colored with specified
structural features. Jmol is quite versatile in recognizing the names
of prespecified colors, HTML binhex color codes, and RGB triplet codes.
Recognized colors include: blue,
gray, white, and black.
HTML binhex and
RGB triplet codes are similar in that the colors are made up of alphanumerical
values for red green
and blue. For binhex, the highest value
is FF and the lowest is 00 (zeros, not O's). For RGB, the highest
value is 255 and the lowest is 0. The format for binhex in Jmol is
[x(Red)(Green)(Blue)], e.g. "color [xFF0088]".
The format for RGB triplet codes in Jmol is [(Red),(Green),(Blue)],
e.g. "color [255,0,255]".
is CPK (Corey, Pauling, Kultun), based on atom identity. Carbon is
colored light gray, oxygen red,
hydrogen white, nitrogen light blue,
sulfur yellow, phosphorous orange,
chlorine green, zinc brown,
sodium blue, iron purple,
calcium or metals dark gray, and unknown
deep pink. In addition to CPK, Jmol has
access to some additional predefined color schemes (not all schemes
are discussed here):
"Amino" is a scheme that assigns colors to amino acids
based on their chemical properties, e.g. acidic, basic, hydrophobic,
or polar. The colors are ASP,
TYR, ASN, GLN, GLY,
are colored tan in the "amino" scheme.
is a scheme that colors each different chain in a multiple molecule
pdb file a different color.
is a scheme that colors protein chains differentially in the amino-carboxy
colors nucleic acid chains differentially in the 5'>3'
is a scheme that colors atoms according to their anisotropic temperatures,
as stored as a beta value in a pdb file. Anisotropic temperature is
indicative of of an atom's mobility or uncertainty of position. The
more mobile, "warmer" segments are colored red,
progressing to more immobile blue fragments.
is a very useful color scheme in that it differentially colors a protein's
secondary structure (a-helices
It is best to use a display command that illustrates secondary structure
when using the structure color scheme (e.g. ribbons, cartoon, backbone,
trace, or strands - see Display section).
It is quite effective
to use consistent color schemes to show some molecular features.
is a set of seven color schemes that provides a uniform standard for
coloration in molecular exhibits. The colors used in the basic DRuMS
scheme are: protein,
For amino acids the DRuMS colors are: hydrophobic
amino acids, polar acidic amino acids,
polar basic amino acids, and
polar uncharged amino acids.
See the DRuMS website for further information:
is sometimes necessary to go beyond the DRuMS schemes to illustrate
important structural features. For example, it may be useful to distinguish
between several pairs of chemically similar amino acids engaged in
ionic bonding. In this case, custom colors must be used to indicate
molecular identity. Fortunately, it is easy to instruct Jmol to read
by default the standard covalent bonds linking atoms in a molecule.
Disulfide (S-S) bonds can also be displayed in Jmol by the use of
the "ssbonds" command. The color of the bond is that of
the two linked atoms, but it can be changed with the "color ssbonds"
command. Similarly, "hbonds" and "color hbonds"
tells Chime to show and color hydrogen bonds that are identified by
may wish to illustrate a connection or bond that is not specified
in a pdb file or read by Jmol. Although not ideal, such arbitrary
bonds can be indicated using the "monitor" command. "Monitor"
forms a dashed line between any two specified atoms and indicates
the distance (in Å) between them. The distance display can be
removed by "set monitor off," and the color and thickness
of the displayed bond can be varied.
Jmol development team has recently added superior capabilities to
illustrate bonds between any desired atoms using the "select"
and "connect" commands. Also added is the capability to
designate the bond order (single, double, etc.) with, e.g., "connect
double". It is now possible to delete bonds between any chosen
atoms using "connect delete".
are sometimes superior to the rotations and translations discussed
previously because animations can cause the molecule at hand to move
or change position in a smooth fashion. Coupled with creative displays
and coloration, animation commands can be employed to great effect
in illustrating key points of molecular structure.
of the most useful animation commands is "move." "Move"
is followed by a set of numbers that quantify a set of animation parameters.
Here we describe the use of the first nine such parameters, i.e.:
"move _ _ _ _ _ _ _ _ _ ", where each of the nine spaces
contains a number that specifies the degree of an animation parameter.
for each space following a "move" command (in order) are:
The first three
parameters are rotations around the X, Y and Z axes. Fourth is the
zoom modifier, expressed in positive (zoom in) or negative (zoom out)
numbers. Note that in a "move" command, zoom values are
not expressed in percentages of the original, unlike the use of "zoom"
as a stand alone script command. The next three parameters (5,6 and
7) deal with translation along the three axes (7, Z translation, is
not functional - always use zero in that slot). Note: contrary to
intuition, positive numbers for Y translation move molecules down
and negative numbers move molecules up. 8th is the slab parameter.
Slab "slices" the molecule, i.e. removes atoms down to a
specified depth so that interior features may be easily observed.
Parameter 9 is the amount of time (in seconds) to take in performing
the previous move commands. It is important to allow sufficient time
for the animation so as not to disorient the viewer. Contrariwise,
too long an animation can prove tedious. There are two other move
parameters, Frames/Second and MaximumAcceleration that can be specified
in the 10th and 11th positions (not considered here).
0 360 0 200 0 15 0 0 6" would, in 6 seconds, rotate a molecule
360 degrees around the Y axis, while simultaneously zooming (200)
and moving the molecule down (Y axis translation: +15). "Move"
is used in some of Jmol's most impressive animations and provides
great versatility, especially when coupled with "delay."
pauses the Jmol script for a specified amount of time before the next
command is executed. "Delay" is specified in seconds, e.g.
"delay 5" causes a pause of five seconds. In addition to
use in animations, "delay" can be an effective tool in a
variety of display and coloration contexts.
Perhaps the most essential animation command is "moveto". The "moveto"
command can be used to rotate a molecule around each axis and to zoom. This command is useful
when using the Jmol Applet to determine the best viewing orientation
of a molecule. After adjusting the orientation of a molecule, Use the "show orientation" command in the applet scripting window to display the appropriate "moveto" command to elicit a particular orientation of choice. Then use this "moveto" command in your button scripts as needed. For more information on "moveto", see the Jmol Interactive Scripting documentation.
command evokes a continuous animation. Before using "spin",
use "set spin X/Y/Z _" to define the axis of rotation and
the speed (degrees/second) of rotation. To adjust the smoothness of
rotation (usually not necessary), use "set spin FPS _", where the blank is an integer that specifies
frames/second. Caution must be used in spinning a molecule because
when later "move" commands are executed, they will take
effect from whatever arbitrary position the molecule happens to be
in (spinning). This can be acceptable, but can also muddy a point
because the molecule will not be oriented correctly. "spin off" turns off spinning.
in display (e.g. wireframe thickness, spacefill radii), separated
by brief delays, can be used to "build up" or "dissolve"
molecules to provide smooth transitions in rendering.
Blinking can be
used to draw attention to particular molecular features (e.g. bonding
partners). Blinking is achieved by causing the feature to flash on
and off or to expand and contract a few times, using appropriate display
commands separated by delays.
command can be used to repeat a particular animation script (or any
other script) until another command is invoked. "loop 3"
indicates the previous script commands will be repeated after a 3
a display using selection, define, several types of animation,
dissolving and building, culminating in blinking hydrogen bonds
between a base pair in double helical DNA - any part of the script
to the right is easily copied and pasted into a custom script
of the user's choice
if this tutorial is helpful in the creation of your own webpages, please
explicitly acknowledge your use of this page (URL, Author, and a link to this page) in your webpage/s. And please drop an email
to email@example.com with a link
to your page/s. This helps with funding opportunities for the OMM and
helps ensure continued development of this resource. Thanks!