Once the molecule file is fully loaded the image at right will become live. At that time the "activate 3-D" icon will disappear.
Adding Labels and Text Annotation
The display at right is from the file ethane-staggered-3-21G.log.  To follow along you can use the applet at right or download the file and open it in a copy of the Jmol application.  

If you are using the applet at right you can return to this view by clicking the button below.
Getting Started
It is easiest to do this from the command line.  Annotation using the menus will not be discussed in this tutorial.  In both the application and the applet open the script console using the pop-up menu (right mouse button, control-click on one button mouse, > Console).  In the application you can also use the pull-down menu (File > Script ...).
Tutorial on and more links about the Script/Console and commands.

Topics
>Labeling Atoms >Labeling Groups >Positioning Labels
>Basic Floating Text (Echos)
>Changing Size, Font and Color of Labels and Echos


Labeling Atoms
Select the atoms you want to label.
  • "select none" will deselect all the atoms.
  • "select visible" will select all the visible atoms.
  • "select all" will select all the atoms in all frames.
  • "select atomtype", where "atomtype" = carbon, hydrogen, nitrogen, etc... will select all the atoms of that type in a file.
  • "select atomexpression", where "atomexpression" is an expression which can be used to select atoms within specific frames, amino acid residues and so on. Simple examples with amino acids are shown below.  More detailed information may be found in Bob Hanson's Jmol Scripting DocumentationExternal Website, Opens in New Window.
Label the selected atoms.  For the ethane file I suggest starting with "select hydrogen" as the initial selection.
  • "label" will label all selected atoms with the default information.  The number following the "/" is the frame number.
  • "label %a" will show just the atom symbol and index number.
  • "label off" will turn off the label on the selected atoms.
  • "label %e" will show just the element symbol.
  • "label %P" will show the partial charge on each element if available.
  • "label "your text"" will label the atom with "your text".
  • Additional options may be found in Bob Hanson's Jmol Scripting DocumentationExternal Website, Opens in New Window under the label command.
Labeling Groups
The key here is that labels are associated with particular atoms so you must select a specific atom within the group to label.  As the example here we will use a protein/DNA complex 1lcd (download the file to use in the application here).  To load it into the applet at right click the button below.

Positioning Labels
It is hard to see everything on a large protein structure so switch back to the ethane example for the rest of the tutorial.  If you are working in the application and haven't downloaded the file get it here.
To start label all the hydrogens (command: "select hydrogen; label %a;")
  • Center labels on atoms: "set labelalignment center; set labeloffset 0 0;"  The offset is the number of pixels in the X and Y directions from the center of the atom to the beginning of the label, so the label will be aligned with the center of the atom.
  • Make the labels float in front of all atoms: "set labelfront".  To turn this off: "set labelfront off".
  • Labels off to the left: "set labelalignment right; set labeloffset -20 0;".
  • Labels off to the right: "set labelalignment left; set labeloffset 20 0;".

Basic Floating Text (Echos)
  • To echo text in one of the nine standard positions: "set echo position; echo "your text;"", where position is: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center or bottom right.  Examples: "set echo top left; echo "top left";" will display "top left" in the top left corner.  "set echo bottom center; echo "bottom center";" will display "bottom center" at the center near the bottom.
  • You can also use named echos so that you can move them around and do further manipulation.  To name an echo issue two commands in a row:
    1. "set echo echoname  XX% YY%", where echoname is the name you want to use for the echo and XX% and YY% are X and Y coordinates of the echo position from the bottom left in % of the applet size.
    2. "echo "your echo text"".
  • A complete example to try is: "set echo example 50% 75%; echo  "This test should appear above the ethane";"
  • You can move it to a new spot with a command like "set echo example 5% 25%"

Changing Size, Font and Color of Labels and Echos
  • "color label blue" colors the last labels of the currently selected atoms blue.
  • "color echo blue" colors the last echo that was accessed blue.
  • "font echo 24 serif bold" will make the last echo size 24 (range is 6-63), use the serif font (serif, sanserif and monospaced are the options) and make it bold faced (plain, italic and bold are the options).
  • "font label 12 monospaced italic" will make the labels of the currently selected atoms size 12 monospaced italics.
Based on template by A. Herráez as modified by J. Gutow
Page skeleton and JavaScript generated by export to web function using Jmol 14.1.8_dev_2014.02.01b 2014-02-01 15:03: on Feb 1, 2014.
This will be the viewer still of jmol image
If your browser/OS combination is Java capable you will get snappier performance if you use Java.