Getting Started Tutorial - Command Version

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 6bna.pdb into your working directory. (The same files are used in the Menu Version.)


Commands, Part 1 - Manipulation, Selection, and Chains

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.pdb
If 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 @ca
This 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

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 sel
The 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: ~label
Command: rlabel sel
Each residue label is of the form:
res_name res_number.chain
It 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: ~rlabel
It is fairly easy to specify chains. Color the two chains different colors:
Command: color cyan :.a
Command: color yellow :.b
There is actually another "chain" in this model, not currently displayed: water. This chain ID was assigned automatically when the structure was read in.
Command: disp :.water
displays the water;
Command: show :.a
gets rid of everything except the A chain, but displays all of its atoms;
Command: chain :.a@n,ca,c
shows the backbone of the A chain only. If the chain specification ":.a" had been omitted, then the backbones of both chains would have been displayed.
coloring by element
Command: disp
Command: color byelement
displays all the atoms and colors them according to element.

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 0
closes 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


Commands, Part 2 - Molecular Representations and Surfaces

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 6bna.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: linewidth 2
Color the different nucleotides different colors, specifying them by residue name:
Command: color blue :a
Command: color magenta :t
Command: color yellow :g
Command: color cyan :c
Rotate, 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: ~disp :.water
-OR- (these are equivalent)
Command: ~disp solvent

Next, try some different molecular representations. They can be translated, rotated, and scaled interactively. Multiple representation types can be combined with each other and with surfaces (more on surfaces below).

Command: ribbon
Command: ribrepr round
Command: ~ribbon
Command: represent stick
Command: repr sphere
Command: rep stick :.b
The latter command changes only chain B to the stick representation, with the rest remaining in the sphere representation.

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 bs
In this representation, pick one of the atoms in the white netropsin molecule. Label the residue,
Command: rlabel picked
showing 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. Remove the residue label:
Command: ~rlabel
Two white atoms that are not part of netropsin are displayed. They are apparently attached to cytosines, which were previously colored cyan. Pick the two atoms and label their residues,
Command: rla picked
showing that one DNA strand is chain A, the other strand is chain B, and each strand contains a brominated cytosine. Use Select... Clear Selection to deselect the atoms, then undisplay the residue labels:

Command: ~rla

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. Surfaces can be translated, rotated, and scaled interactively.

Command: surface
Command: ~surface
Command: surface ligand
-OR- (these are equivalent)
Command: surface :nt
-OR-
Command: surface :.het
By default, a surface has the same color as the corresponding atoms; however, surface color can be specified separately:
Command: surfrepr mesh
Command: color red,s ligand
Command: surfrepr solid
Parts of a surface can be shown:
Command: ~surf
Command: surf :a,t
Command: ~surf
Command: surf :a.b,t.b
Sometimes it is helpful to make a solid surface transparent:
Command: surftrans 50
Use the command stop to terminate the Chimera session.


meng@cgl.ucsf.edu / June 2006