Summary of Jmol Script Command
Expressions and Image Manipulation Operations
Duane W. Sears, University of California Santa Barbara

Jmol/ Chime/ RasMol Script Commands, Expressions, & Operations
Image Movement
w/Mouse  or  w/Commands
Set Picking
Wild Cards Colors
Commands / Schemes / Amino Acids
Image Screen Capture
   (Copy/Paste Image)
Boolean (Logic)
H-Bonds / Disulfide Bonds
Advanced  Commands and Expressions Chime-Specific Commands
Within Expression Define Command Surface & List Commands PDB Name Conventions
Use the INDEX to locate brief summaries of some of the scripting commands, expressions, and operations commonly used to modify and explore 3-D structural images as viewed with RasMol  (1) the molecular imaging program created by Roger Sayle.  MDL's Chime (2) is a web browser plug-in and the open-source Jmol Java applet (3) emulate the functionality of RasMol in a web environment.   More comprehensive online summaries of the scripting language used with these three programs can be found in the RasMol/Chime Help Manual (4) created by Dr. Eric Martz at the University of Massachusetts; the RasMol/ Chime Command Guide (5) created by Dr. William McClure at Carnegie Melon.; and the Jmol homepage (3).  To find out more information about Jmol/ Chime/ RasMol command entry, see the Chime/RasMol Command Box Tutorial (6).  (See References on last page.)

Image Movement with Mouse Buttons & Keys [return to Index]
To move a structural image, hold the Mouse Button and Key down while sliding the mouse pointer over the screen image.
Screen Action
Mouse Button (left/right)
+ Key
Mouse Button
(only one)
+ Key
popup menu right btn, pointer stationary btn down, pointer stationary
X-rotation left btn, drag pointer btn down, drag pointer
Y-rotation left btn, drag pointer btn down, drag pointer
Z-rotation right btn +Shift, drag pointer   (none)
X-translation right btn, +Ctrl, drag pointer btn down, +Option, drag pointer
Y-translation right btn +Ctrl, drag pointer   btn down +Option, drag pointer
zoom in left btn +Shift, drag  pointer btn down +Shift, drag pointer
shrink left btn +Shift, drag pointer btn down +Shift, drag pointer

Image Movement Commands [return to Index]
Screen Action
Command Argument {optional}
rotate <axis> {+/-} <value>: Rotates a molecule about the "x," "y," or "z" <axis> by a specified {+/-} <value> angle in degrees. rotate <axis> {+/-} <value>
translate  <axis> {+/-} <value>: Translates a molecule along the "x," "y," or "z" <axis> by a {+/-} <value> arbitrary distance. translate <axis> {+/-} <value>
zoom {+/-} <value>: Zooms in or out {+/-} <value> along the "z" axis creating an arbitrary magnification or demagnification of the structure. zoom {+/-} <value>
center the pivot point of rotation to the weighted average position calculated from the relative positions of all atoms defined in an <expression> center <expression>
reset orientation and center point to default settings reset (none)

Command Examples [return to Index]
Screen Action
Command(s) Argument {optional}
select all atoms in the displayed image (pdb) file select all or *
select :a, or select *a, to include all atoms of chain :a (or *a) as in the displayed image (pdb) file select :a or *a
label{s} %m produces one-letter amino acid labels for all atoms currently selected label{s} %m
label{s} %n produces three-letter amino acid labels for all atoms currently selected %n
label{s} %r produces amino acid residue number labels for all atoms currently selected %r
color {<object>} <color>  (or cpk) will color the currently selected atoms {of the specified <object>} with the <color> specified (or with default "CPK" colors) color {<object>} <color>
h-bond{s} {<value>} {on/off} will toggle H-bonds on or off as dotted lines of arbitrary width {<value>}; default color green hbond{s} {<value>} {on/off}
ssbond{s} {<value>} {on/off} will toggle disulfide bonds on or off as dotted lines of arbitrary width {<value>}; default color gold ssbond{s} {<value>}

Global Image Modification Commands [return to Index]
Screen Action
Command Argument {optional}
wireframe {<value>} {on/off}: Creates wireframe image of arbitrary thickness <value>. wireframe {<value>}
trace {<value>} {on/off}: Creates trace through the polypeptide backbone alpha carbons (or the phosphate atoms of a DNA or RNA) of arbitrary thickness <value>; default color = Ca atom color (or = phosphate atom color). trace {<value>}
cartoon{s} {<value>} {on/off}: Creates a ribbon through the peptide backbone (or the phosphodiester bonds atoms of a DNA or RNA) of arbitrary thickness <value> with arrowheads pointing in the N-to-C direction for beta sheet strands; default color  atom color of the Ca carbons or the phosphate atom color. cartoon{s} {<value>}
ribbon{s} {<value>} {on/off}: Creates a ribbon through the peptide backbone (or the phosphodiester bonds atoms of a DNA or RNA) of arbitrary thickness <value>; default color = Ca atom color (or = phosphate atom color). ribbon{s} {<value>}
color <object> <color>: Changes <object> to specified <color>. color <object> <color>
spacefill {on/off}: Creates hard spheres of van der Waals radii. spacefill (none)
spacefill {<value>}: Creates hard spheres of Angstroms radii (if <value> has a decimal point) or of arbitrary radii (if <value> = 0-700) spacefill <value>
restrict <expression>:  Restricts display to only those atoms defined by the <expression>. restrict <expression>
slab {<value>} {on/off}: Creates a slab view where the molecule is sliced in the xy plane at the <value> point on the "z" axis leaving in view only the portion of the molecule behind this  "clipping plane." slab {+/-} {<value>} on/off
set ambient {<value>}: Changes the depth-cueing/lighting effects on the displayed image with <value> ranging between 0 (dark) to 100 (light). set ambient {<value>}
set shadow{s}{on/off}: Toggles atom shadowing on/off set shadow{s} on/off
set specpower {<value>}:  Changes the shininess of spacefilled atoms of the <value> ranging between 0 (flat) to 100 (very shiny). set specpower {<value>}
set specular {on/off}:  Toggles atom lighting effect on/off. set specular on/off
connect {on/off}: Connects all bonds with abnormal bond lengths.
  • The default setting is off when a pdb file is loaded into the Chime window.
  • In order to connect abnormal bonds, the "connect on" or "connect true" command must be in the embedded script commands that run as a structure is initially loaded into the plug-in embedded on a web page. 
  • If the "connect on" is issued after the structure is loaded (and visible), abnormal bonds will not be connected.
  • Example:  See Rnase A/ UVC inhibitor complex (6rsa.pdb) @  A connect command is needed to complete the 5 covalent bonds of the pentacovalent vanadate ion.
connect on/off {default}

Set Picking Commands [return to Index]
"Set Picking" commands activate the mouse pointer and button for retrieving information from the image or displaying this information on the image.
Note: After issuing the "set picking <value>" command, move the mouse pointer over one atom in the image and click the mouse button (while holding down the Control, Option, or Command key if using a Macintosh).
set picking none: Inactivates the mouse pointer and button and turns picking "off." set picking none
set picking identify: Returns the label for an atom selected by the mouse to the browser status bar and RasMol/Chime message box (when displayed). set picking identify
set picking label: Displays the identifier label on the image for an atom selected by the mouse. set picking label
set picking distance: Returns the distance between 2 atoms sequentially selected by the mouse to the browser status bar and RasMol/Chime message box (when displayed). set picking distance
set picking center: Changes the pivot point of image rotation to the position of the atom selected by the mouse. set picking center
set picking monitor: Displays the distance in Angstroms between 2 atoms sequentially selected by the mouse and connects them with a dashed line and on the image. set picking monitor(s)
monitors off: Removes all distances and connecting lines currently displayed on the image, but does not turn off the distance monitor function; to turn the monitor function off use set picking none. monitor(s) off
set picking angle: Returns the angle defined by 3 atoms sequentially selected with the mouse to the browser status bar and RasMol/Chime message box (when displayed). set picking angle
set picking torsion: Returns the torsion angle defined by 4 atoms sequentially selected with the mouse to the browser status bar and RasMol/Chime message box (when displayed). set picking torsion

Atom Expressions [return to Index]
Type of Expression Expressions
wild cards * specifies every atom in the pdb file
as? specifies  asp (aspartic acid) + asn (asparagine)
*.c?? specifies every carbon atom in all groups of molecule
residue ranges 3,16,12 specifies residues numbered 3, 16, & 12 and all atoms comprising these residues
9-20 specifies residues inclusive of those numbered 9-20 and all atoms comprising these residues
primitive expressions cys, glu, arg
(cys, glu, arg)
specifies all atoms in all residues named cys, glu, arg, as? where the 3-letter abbreviations correspond to cysteine (cys), glutaminc acid (glu), and arginine (arg)
ser70:a, *p, glu24:1 specifies all atoms in ser residue 90 in chain ":a" plus all atoms in chain "*p" plus all atoms in glu residue 24 in chain "l"
hem:p.fe, *.sg specifies only Fe atoms in all hem (heme) ligands in chain ":p" plus all atoms(*labeled "sg." 
By the nomenclature convention established for pdb files, the atoms designated "sg" are the gamma-sulfur atoms of cys.
comparison operators
=, <, >
atomno=4,atomno=6 specifies those atoms designated 4 and 6 in the pdb file
temperature>=900 specifies all atoms with a temperature factor greater than or equal to 900
"monitor" or "measure"
and display distance
monitor (expression) (expression)

measure (expression) (expression)
1) monitor (atomno=605) (atomno=622);
2) measure (asp194.od1) (ile16.n);
3) measure (asp194) (ile16).
color monitor yellow or color measure yellow colors dotted line and label yellow
By default distances displayed in nm.
set measurements angstroms
changes units
Example 3) returns by default the distance between the alpha-N atoms of the two designated amino acid residues since specific atoms are not specified in the expressions.
and display distance
monitor 605,622 script command causes display of a dotted line and between atoms 605 and 622 plus a distance label; only atom numbers work; 
color monitor yellow will change color of dotted line which defaults to atom colors.

Boolean  (LOGIC) Operators [return to Index]
Type of Expression Expressions
and not
ser90 and *c Specifies all atoms defined as part of serine residue number 90 and also part of the chain "c"
ligand or 196-199 Specifies all atoms in residues defined as part of a (nonprotein) ligand and all atoms comprising residues numbered 196-199
 backbone and not alpha Specifies all atoms defined as part of the backbone but not part of alpha-helical structures

on / true
off / false
hbond{s} on
hbond{s} 50=
connect on
Turns hbonds on
Turns hbonds o
Turns hbonds on with diameter "50"
Connects abnormal bond lengths

Predefined Expression Sets and Objects [return to Index]
Protein and Nucleic Acid Structure Sets
helix All atoms in a selected set of atoms that conform to alpha-helical polypeptide or double helix DNA structures.
sheet selects all atoms within parallel or anti-parallel polypeptide segments
turn selects all atoms within beta-turn polypeptide segments
Predefined Protein, Nucleic Acid, or "Other" Molecule/Atom Sets
Nucleic Acid
acidic aliphatic large amino at hydrogen
basic aromatic helix protein cg ions
charged acyclic sheet(s) alpha pyrimidine hetero
neutral cyclic turn buried purinel ligand
polar small sidechain bonded nucleic surface
hydrophobic medium cystine backbone backbone water,hoh,solvent
See Advanced User-Defined Sets below
  • selected
    Example: color selected blue; this colors all atoms in the current selection blue
  • define <identifier> <expression>
    Example: define active (zn,his12); this gives the name "active" to a grouping of atoms that include a Zn atom and all atoms in the his12 residue.
  • surface <identifier> <color>
    Example: surface outside green; this gives the name "outside" to an opaque surface displayed around whatever atoms are currently selected by previous commands.
  • list <identifier> transparent
    Example: list outside transparent; this changes the displayed opaque surface named "outside" to transparent surface.

Color Command [return to Index]
: color {<object>} <color>
Objects Predefined Colors Atom Color Schemes
backbone cartoon{s} blue black cpk amino
ribbon{s} trace greenblue magenta group chain
dots label{s} red redorange temperature charge
ssbond{s} hbond{s} yellow green shapely structure
atom{s} bond{s} cyan orange user  
axes   violet purple    

Color Schemes [return to Index]
CPK = Corey/Pauling/Kultun atom coloring scheme Amino Acid Colors
carbon gray
ASP, GLU bright red [230,10,10]
oxygen red [240,0,0] CYS, MET yellow [230,230,0]
nitrogen lavender [143,143,255] LYS, ARG blue [20,90,255]
hydrogen white [255,255,255] SER, THR orange [250,150,0]
sulfur yellow [255,200,50] PHE, TYR mid-blue [50,50,170]
phosphorous orange [255,165,0] ASN, GLN cyan [0,220,220]
chlorine green [0,255,0] GLY light gray [235,235,235]
calcium, metals dark gray [128,128,144] LEU, VAL, ILE green [15,130,15]
unknown deep pink [255,20,147] ALA dark gray [200,200,200]
Colors are numerically specified by [R#,G#,B#] where each R#(red)G#(green), or B#(blue) number ranges between 0-255.
Black = [0,0,0] & White = [255,255,255]
TRP pink [199,90,180]
HIS pale blue [130,130,210]
PRO flesh [220,150,130]

Screen Capture of a Chime Image [return to Index]
For other popup menu options, see Chime Popup Menu Tutorial (7)
Screen Action and Comments
Pop-Up Menu Selection
Position the mouse pointer over the image and hold down the right mouse button.
Select "Copy" from the popup menu, which pastes it to the clipboard.
  • Note:  If pasted text already exists in the clipboard (MS Windows), it may be neccessary to open the clipboard program (CLIPBRD.EXE) and delete the text before the clipboard will accept the image from the "Copy" pop-up command.
  • Comments:  This procedure produces excellent static Chime images that can be pasted directly into Word, PowerPoint, or image editor (e.g., Photoshop) documents for further refinement.
    With RasMol static images are similarly captured with the Edit/Copy pulldown menu option. 

Advanced Commands and Expressions [return to Index]
Expression or Command
within(<value>,<expression>):  The within expression defines all atoms within a distance = <value> from <expression>.   A decimal <value> specifies ad distance in Angstroms; a digit <value> specifies an arbitrary distance.
  • Note: within(<value>,<expression>) and within (<value>,<expression>) are equally valid expressions where an optional space in the later expression separates within from (<value>,<expression>).
"select within(8.0,asp141) and not asp141" selects all atoms are 8.0 Angstroms from the atoms constituting asp141, excluding asp141 atoms themselves from the selection as specified by the "and not" Boolean operator.
define <identifier> <expression>The define command creates a custom grouping of all atoms in the <expression> and gives the grouping a unique <identifier>. Once defined, the <identifier> itself can be used as an <expression>.
define active (his12,his119) and sidechain" This defines a grouping named "active" that includes the sidechain atoms of his12 and his119.  Now if you wanted to color those atoms red, you could issue the command: "color active red."
  • Note: Avoid using a reserved name for the <identifier>; names like "helix," "sheet," "his," etc., are reserved and would give you an error.
surface <identifier> {<color>}:  The surface command creates an opaque surface of specified <color> surrounding the exterior surface of all atoms currently selected. The default color is bright green without a <color> specified .
list <identifier> transparent {on/off}:  The list command toggles the <identifier> surface between semi-transparent {on} and opaque {off}.
"surface pocket [255,0,0]" creates a bright red opaque surface named "pocket" surrounding whatever atoms are currently selected. 
"list pocket transparent on" makes the opaque "pocket" surface transparent.
"list pocket transparent off" makes the transparent "pocket" surface opaque.
"list pocket off" turns "pocket" surface off in the display.
  • Note: Avoid using a reserved name for the <identifier>; names like "helix," "sheet," "his," etc., are reserved and would give you an error.

Chime-Specific Commands [return to Index]
See also Dr. Eric Martz's Chime Move Command (3) and  Dr. William McClure's Chime-Specific Script Commands (4)
Command Argument {optional}
{+/-}# {+/-}# {+/-}# {+/-}# {+/-}#  {+/-}# {+/-} # # {#} {#}
Xr Yr Zr Zo  Xt  Yt Zt  Sl  TT {FPS} {MA}
Xrot Yrot Zrot Zoom Xtrans Ytrans Ztrans Slab TotalTime {FPS} {MaxAccel}
Screen Action:
Moves the image in the specified direction, for the specified duration at the specified rate.  
Example: move 0 -360 0 10 0 0 0 0 5 60
Rotates image - 360 degrees around Y-axis, and zooms in 10 units in 5 secs. at 60 frames per sec (fps).

PDB File Naming Conventions [return to Index]
See Tutorial on Atom and Group Naming in PDF Files (8)
PDB Name
(case insensitive)
(only a partial listing)
Examples:  command <expression>
h n
c o
backbone H, N, C-alpha, C, and O atoms joined in peptide bonds
select (gly2.h,gly2.n,,gly2.c,gly2.o)
selects gly2 atoms joined in peptide bonds
select backbone and gly2 - an equivalent command
backbone alpha-C
sidechain beta-C
sidechain gamma-C
sidechain delta-C
sidechain epsilon-C branched sidechain C of val and ile
select *.ca  - selects all a-Cs; equals select alpha
select asp.cb -  selects all asp
select - selects
g-C of glu141
- selects
d-C of gln77
select - selects
e-C of lys30
select *.cg1 - selects sidechain C's branched from
b-C's of all val and ile residues



sidechain glu O's

sidechain asp O's

sidechain asn O
sidechain gln O

sidechain tyr O
select glu15.oe? - selects both gamma-carboxylate sidechain O's of glu15
select (*.od1,od2) and asp99 - selects both beta-carboxylate sidechain O's of asp99
select asn10.od2 - selects asn10 sidechain O
select *.oe1 - selects one sidechain O of all glu and gln residues (Note: Both glu & gln have oe1 O atoms.)
select tyr and *.oh - selects all tyr sidechain O's





sidechain lys epsilon-N

sidechain arg N's

sidechain his N's

sidechain asn N

sidechain gln N

sidechain trp N
select - selects the sidechain e-amino N of lys101
select arg50.n?? and not backbone - selects the 3 sidechain guanidinium N's of arg50
select sidechain and *.n?? and his149 - selects 2 sidechain imidazole N's of his149
select *.nd2 - selects the sidechain N of all asn residues (Note: Only asn has nd2 N atom.)
select *.ne2 - selects one sidechain N of all gln  and  his residues (Note: Both gln & his have ne2 atoms.)
select *.ne1 - selects sidechain N of all trp residues (Note: Only trp has ne1 atom.)
sidechain met S
sidechain cys S
select - selects sidechain S of met44
ssbonds on - connects (with a dotted line) sidechain S's of cys pairs forming disulfide bonds
amino acid residue & no. select (asp1,glu) - selects asp and all glu; equals 
select acidic and 1 or glu
protein all atoms making up protein restrict protein - restricts selected atoms only to those making up protein
hetero all non-protein, non-nucleic acid atoms define substrate hetero - defines a custom group named "substrate" including all hetero atoms
nucleic all atoms making up nucleic acids restrict nucleic - restricts selected atoms to just those making up nucleic acids
dna all atoms making up DNA select nucleic and not DNA - selects atoms making up non-DNA nucleic acids, such as RNA

References [return to Index]

Go to top
Duane W. Sears
October 22, 2011