Many operations within Chimera can be accomplished in multiple ways. For example, colors and molecular representations can be changed by using the Actions menu or by typing commands into the Command Line. In general, using the menus involves more steps, but does not require one to remember commands and their syntax.
In this tutorial, many of the operations performed with menus in the Getting Started Tutorial - Menu Version are carried out using commands instead. It is useful but not necessary to go through both versions.
To follow along, you will first need to download the PDB files 1zik.pdb and 1d86.pdb into your working directory. (The same files are used in the Menu Version.)
On Windows/Mac, click the chimera icon; on UNIX, start Chimera from the system prompt:
unix: chimera
A basic Chimera window should appear after a few seconds. Commands are entered into the Command Line and scaling and clipping operations can be performed with the Side View. There are several ways to start each of these tools; one is to choose Tools... General Controls... Command Line and Tools... Viewing Controls... Side View from the menu. Each window or tool can be moved to a convenient location by placing the cursor on its top bar and dragging with the left or middle mouse button. If you like, resize the main Chimera window by placing the cursor on any corner and dragging with the left mouse button.
Side View |
---|
![]() |
Now open the previously downloaded structure:
Command: open 1zik.pdbIf the file is not in the working directory, use File... Open instead, as shown in Part 2. The structure will appear in the main graphics window, and a tiny version is shown in the Side View. The structure is a leucine zipper formed by two peptides. Within the Side View, try moving the eye position (the small square; scales the view) and the clipping plane positions (vertical lines) with the left mouse button. The Side View will renormalize itself after movements, so that the eye or clipping plane positions may appear to "bounce back" after you have adjusted them; however, your adjustments have been applied to the main display.
Simplify the display:
Command: chain @caThis command shows only the atoms named CA (alpha-carbons) and connects them in the same way that the residues are connected. Try manipulating the structure with the mouse in the main graphics window. By default, the left mouse button controls rotation and the middle mouse button controls XY translation. Continue moving and scaling the structure with the mouse in the graphics window and the Side View as desired throughout the tutorial. Next, thicken the lines:
Command: linewidth 2
Atom Specification Symbols | ||
---|---|---|
Symbol | Meaning | Usage |
# | model | #model (model ID number) |
: | residue | :residue (residue name or number) |
:. | chain | :.chain (chain ID) |
@ | atom | @atom (atom name) |
= | partial wildcard | matches partial atom or residue name, e.g., @C= specifies all atoms with names beginning with C |
? | single-character wildcard | matches single character in atom or residue name, e.g., :G?? specifies all residues with three-letter names beginning with G |
A Chimera command may include arguments and/or an atom specification. For example, in the following,
Command: color hot pink :lysthe color name hot pink is an argument of the command color, and :lys specifies all atoms in residues named LYS (regardless of whether the atoms are displayed).
A blank specification is interpreted as all applicable items. For example,
Command: color hot pinkcolors all atoms hot pink.
The command help shows the manual page for a command. For example,
Command: help colorshows the manual page for the command color.
Many commands have ~command versions that perform the opposite function. Change the structure back to its default color:
Command: ~colorThe Chimera Quick Reference Guide (PDF) includes a list of all commands and several examples of atom specification.
By default, picking from the screen (a type of selection) is done by clicking on the atom or bond of interest with the left mouse button while holding down the Ctrl key. To add to an existing selection, also hold down the Shift key. Try picking two alpha-carbons, one from each peptide (Ctrl-click the first, Ctrl-Shift-click the second). The selection is highlighted in green, and its contents are reported on the button near the lower right corner of the graphics window.
In the Command Line, a selection is specified by the word selected, sel, or picked. Label the atoms you have selected:
Command: label selThe label command shows atom information (atom name, by default). Undisplay the atom labels, then show labels for the residues containing the selected atoms:
residue labels |
---|
![]() |
Command: ~labelEach residue label is of the form:
Command: rlabel sel
res_name res_number.chainIt is now evident that one peptide is chain A, and the other is chain B. To deselect the atoms, pick in a region of the graphics window away from any atoms or use the menu item Select... Clear Selection. Undisplay the residue labels:
Command: ~rlabelColor the two chains different colors:
Command: color cyan :.aThere is actually another "chain" in this model, not currently displayed: water. This chain ID was assigned automatically when the structure was read in.
Command: color yellow :.b
Command: disp :.waterdisplays the water;
Command: show :.agets rid of everything except the A chain, but displays all of its atoms;
Command: chain :.a@n,ca,c,oshows the backbone of the A chain only.
coloring by element |
---|
![]() |
Command: dispdisplays all the atoms and colors them according to element.
Command: color byelement
Generally, each structure opened is treated as a model in Chimera. Models are assigned successive model numbers, starting with 0 (zero). The Active models line right under the Command Line shows which models are activated for motion. The checkbox for 0 (currently the leucine zipper) is activated. Unchecking the box makes it impossible to move model 0. Checking the box again restores the movable state.
Command: close 0closes the model. Go on to Part 2 below, OR terminate the Chimera session. A Chimera session may be ended using the following command:
Command: stop
With Chimera started and the Command Line and Side View opened as described at the beginning of Part 1, choose the menu item File... Open. From the resulting dialog, choose and open the previously downloaded file 1d86.pdb (the File type should be set to all (guess type) or PDB). It contains the molecule netropsin bound to double-helical DNA. (Files can also be opened from the Command Line, as shown in Part 1.)
Thicken the lines:
Command: line 2
![]() |
Command: color blue :daRotate, translate, and scale the structure as needed to get a better look (see mouse manipulation to review how this is done). Continue moving and scaling the structure as desired throughout the tutorial. There are still many white atoms, including the netropsin molecule in the minor groove of the DNA and water. Undisplay the water:
Command: color magenta :dt
Command: color yellow :dg
Command: color cyan :dc
Command: ~disp :.water
-OR- (these are equivalent)
Command: ~disp solvent
Next, try some different molecular representations. Multiple representation types can be combined with each other and with surfaces (more on surfaces below).
![]() |
Command: ribbonThe latter command changes only chain B to the stick representation, with the rest remaining in the sphere representation.
Command: ribrepr rounded
Command: ~ribbon
Command: represent stick
Command: repr sphere
Command: rep stick :.b
Note that commands (but not their keyword arguments) can be truncated to unique identifiers. For example, the command represent can be shortened to repr or rep but not re (because other commands also start with re), whereas the keywords stick, sphere, etc. cannot be truncated.
Next, change everything to a ball-and-stick representation:
Command: repr bsIn this representation, pick one of the atoms in the white netropsin molecule. Label the residue,
Command: rlabel pickedshowing that it is named NT and is part of chain het (assigned automatically when the structure was read in). The residue label might not be near the selected atom.
Clear the selection (for example, by picking in empty space), then undisplay the residue label:
Command: ~rl
![]() |
Finally, have some fun with the surface command. There are built-in categories within structures such as main and ligand; when nothing is specified, surface shows the surface of main.
Command: surfaceBy default, a surface has the same color as the corresponding atoms; however, surface color can be specified separately:
Command: ~surface
Command: surface ligand-OR- (these are equivalent)
Command: surface :nt
-OR-
Command: surface :.het
Command: surfrepr mesh
Command: color red,s ligand
Command: surfrepr solid
![]() |
Command: ~surfSometimes it is helpful to make a solid surface transparent:
Command: surf :da,dt
Command: ~surf
Command: surf :da.b,dt.b
Command: surftrans 50Use the command stop to terminate the Chimera session.