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.)
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... 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 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 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 selThe label command shows atom information (atom name, by default). Undisplay the atom labels, then show labels for the residues containing the selected atoms:
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: ~rlabelIt is fairly easy to specify chains. Color 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 (only the oxygens are visible in the X-ray structure);
Command: show :.agets rid of everything except the A chain, but displays all of its atoms;
Command: chain :.a@n,ca,cshows 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: dispdisplays all the atoms and colors them according to element.
Command: color byelement
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 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 6bna.pdb (the File type should be set to 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.)
Color the different nucleotides different colors, specifying them by residue name:
Command: color blue :aRotate, 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 :t
Command: color yellow :g
Command: color cyan :c
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: ribbonThe latter command changes only chain B to the stick representation, with the rest remaining in the sphere representation.
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 may not be very close to the selected atom. Remove the residue label:
Command: ~rlabelTwo white atoms that are not part of netropsin are displayed. They are apparently attached to cytosines, which have been colored cyan (above). Pick the two atoms and label their residues,
Command: rla pickedshowing 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: 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 all equivalent)Command: surfrepr mesh
Command: surface :nt
-OR-
Command: surface ::nt
-OR-
Command: surface :.het
Command: surf :g,c
Command: ~surf
Command: surf :a.b,t.b
Command: surf :a,t
Command: surf ligand
Command: color red,s ligandSometimes 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: ~surf ligand
Command: color green,s :t
Command: surfrepr solid
Command: colordef tpink 1. .5 .7 .4The numbers in the colordef command refer to red, green, blue, and opacity components, respectively.
Command: color tpink,s
Use the command stop to terminate the Chimera session.