Getting Started Tutorial - Command Version

Many operations within Chimera can be accomplished in multiple ways. For example, colors and molecular representations can be changed using the Actions menu or by typing commands into the Command Line. The Command Line is sometimes called the Midas Emulator because many commands from Chimera's predecessor program Midas can be used. 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 the 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 UNIX, start Chimera from the system prompt:

unix: chimera
On Windows, click the chimera icon.

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... Keyboard... Command Line and Tools... Viewing Parameters... 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.

Now open a 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 structures in the main graphics window with the mouse. By default, the left mouse button controls rotation and the middle mouse button controls XY translation. Continue moving and scaling the structures with the mouse in the graphics window and the Side View as desired throughout the tutorial. Next, thicken the lines:
Command: linewidth 3

In combination with the Ctrl key, the mouse buttons have additional functions. 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. The selection is highlighted in green. Try picking two alpha-carbons, one from each peptide (Ctrl-Shift-leftbutton). Remember that the Shift key is needed to select both atoms; otherwise, only the most recent selection will be retained.

In the Command Line, a selection is specified by the word selected, sel, or picked. Label the atoms you have selected:

Command: label sel
Each label is of the form:
atom_name (res_number.chain res_name)
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.
Command: ~label
undisplays the labels. It is fairly easy to specify chains. One possibility is to 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 (only the oxygens are visible in the X-ray structure);
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.
Command: disp
Command: color byatom
displays all the atoms and colors them according to element.

The Command Line also shows which models are activated for motion: below the command line, 0 should be in bold and the small box next to it highlighted. Clicking the box turns off the highlighting and makes it impossible to move the molecule in model 0. Clicking 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 File... Quit in the menu or the following command:
Command: stop


Commands, Part 2 - Molecular Representations and Surfaces

Going through Part 1 first is recommended, since this part assumes knowledge introduced therein.

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 6bna.pdb. (It is also possible to open files from the Command Line, as shown in Part 1.)

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: some dots plus a molecule in the minor groove of the double-helical DNA. Undisplay the water.
Command: ~disp :.water
-OR- (these are equivalent)
Command: ~disp :hoh
but for the latter, you would have had to know that the water residues were named HOH rather than WAT, or try both names.

Next, try some alternate representations. Note that 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: ~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.
Command: repr bs
In the resulting ball-and-stick representation, pick one of the atoms in the white molecule; it will be outlined with green, the default highlighting color.
Command: label picked
will show that the labeled residue is named NT and is part of chain HET. This chain was assigned automatically when the structure was read in. The molecule is netropsin. Other than the white molecule, there are two additional white atoms. They are apparently attached to cytosines, which have been colored cyan (above). Pick and then label these two atoms,
Command: la 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 and then undisplay the labels:

Command: ~la

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

Command: surface
Command: ~surface
Command: surface ligand
-OR- (these are all equivalent)
Command: surface :nt
-OR-
Command: surface ::nt
-OR-
Command: surface :.het
Command: surfrepr mesh
Command: color red,s :nt
Command: surfrepr solid
Command: surf :g,c
Command: ~surf
Command: surf :a.b,t.b
Command: surf :a,t
Command: repr sphere :nt
Command: color green,s :t
By default, a surface has the same color as the corresponding atoms; however, surface color can be specified separately. Sometimes it is helpful to make a solid surface transparent. One way to do this is to define a transparent color and then use the new color in a command:
Command: colordef tpink 1. .5 .7 .4
Command: color tpink,s
The numbers in the colordef command refer to red, green, blue, and opacity components, respectively.

Use the command stop to terminate the Chimera session.


meng@cgl.ucsf.edu / March 2003