This tutorial provides an overview of basic features in Chimera for displaying and manipulating structures. You can interact with Chimera by using the menus and/or by entering commands. The basic features of Chimera are available either way, but several tools are not available as commands, and several command operations (and scripting) are not available through the menus. Thus, it is useful to become familiar with both ways of interacting with Chimera.
The Working with menus and Working with commands sections were designed to be independent of each other. They cover (for the most part) identical operations, accomplished in different ways. If you go through both sections, you can skip portions that cover issues you already understand. You can also go back and forth between the sections to see the correspondence between menu and command operations.
To follow the tutorial, you will need to access the Protein Data Bank (PDB) files 1zik and 6bna. If you have Internet access, these can be fetched directly from the Protein Data Bank, as described below. If you do not have Internet access, you can use the files included in the Chimera distribution. To do so,
Item | Example | Description |
Keyboard key | Ctrl | The control key |
Mouse key | Btn1 | Mouse button 1 (left button) |
Menu action | File→Open | File Menu bar pulldown, followed by Open |
Filename (or file path) | 1zik.pdb | File 1zik.pdb |
On Linux, run the executable "chimera" in the bin directory of your Chimera installation. If Chimera is installed in /usr/local/chimera, run /usr/local/chimera/bin/chimera from a shell.
On Windows, start Chimera by doubleclicking the Chimera icon in the directory called bin in your Chimera installation. If Chimera is installed in \Program Files the executable will be in the directory \Program Files\Chimera\bin. By default, a Chimera icon will also be placed on your desktop.
On Mac, start the Apple X server found in /Applications/Utilities/X11, then doubleclick the Chimera application to start. The X server is necessary for running Chimera on the Mac. It is not automatically included in the Mac OS, but can be downloaded (as freeware) from Apple.
A basic Chimera window should appear after a few seconds. Chimera includes a number of tools and dialogs that can be present on the screen at the same time. The basic Chimera window provides the main interactive workspace for displaying and manipulating structures. The default Chimera graphics window is pretty small, so 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. If 1zik.pdb was downloaded to your machine, choose the menu item File→Open. Locate the file 1zik.pdb in the resulting dialog and open it (the File type should be set to all (guess type) or PDB). If you want to fetch directly from the PDB instead, choose File→Fetch by ID and type 1zik in the PDB ID field. The structure will appear in the main graphics window; it 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.
Mouse button | Modifier | Action |
Btn1 (left button) | |
Rotation |
Btn2 (middle button) | |
XY Translation |
Btn3 (right button) | |
Scaling |
Btn1 | Ctrl | Picking (selection) |
Btn1 | Ctrl-Shift | Addition to (removal from) selection |
Try manipulating the structure in the main window with the mouse. By default, the left mouse button controls rotation, the middle mouse button controls XY translation, and the right mouse button controls scaling. On a Mac with a one-button mouse, the middle and right buttons can be emulated by combining mouse action with the option and (apple) keys, respectively.
Continue moving and scaling the structures with the mouse in the graphics window and Side View as desired throughout the tutorial.
In combination with the control (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 (Btn1) while holding down the Ctrl key. To add to an existing selection, also hold down the Shift key. The selection is highlighted in green, and its contents are reported on the button near the lower right corner of the graphics window.
You can also drag out a selection area with Ctrl-Btn1 (sweep out an area before releasing). All atoms and bonds within that area will be selected. As before, Ctrl-Shift-Btn1 can be used to add to an existing selection, either by clicking or by dragging.
The arrow keys can be used to broaden, narrow, or invert a selection. Chimera maintains a hierarchy of objects from atoms to residues to chains to models. If an atom is selected, the ↑ key will broaden the selection to the residue containing that atom. If an entire residue is selected, the ↑ key will broaden the selection to the chain containing that residue. If a chain is selected, the ↑ key will broaden the selection to the entire model. Similarly, the selection scope can be narrowed using the ↓ key. The → key inverts the selection so that selected atoms become deselected and vice versa.
Spend some time selecting various parts of the model. An easy way to deselect everything is to use Ctrl-Btn1 in any blank space in the graphics window.
Menu Item | Description |
Atoms/Bonds | Controls the display and representation of atoms and bonds. |
Ribbon | Controls the display and representation of ribbons. |
Surface | Controls the display and representation of molecular surfaces. |
Color | Colors selected objects. Color target can be limited to object types indicated by the radio buttons. |
Label | Labels selected atoms. The residue submenu labels residues containing the selected atoms. |
Focus | Focuses the view on the selected atom(s), zooming and translating if necessary. |
Set Pivot | Sets the center of rotation based on the selected atom(s) without adjusting the view. |
Target | Restricts target of the action to certain selected or unselected object types. |
Inspect | Launches the Selection Inspector. |
Write List | Writes a list of the currently selected objects to a parsable text file. |
Write PDB | Writes the coordinates of the currently selected atoms to a PDB file. |
In general, operations performed with the Chimera Actions menu affect the current selection. Selections can be made in many ways, including with the Select menu or with the mouse (as described above). When nothing is selected, the Actions menu applies to everything.
The current selection is highlighted in green in the structure(s) and its contents are reported on the button near the lower right corner of the graphics window.
To simplify the display, use Actions→Atoms/Bonds→hide to undisplay the model followed by Actions→Atoms/Bonds→chain trace only to display only the chain trace. The chain trace includes just the α-carbons (atoms named CA), connected in the same way that the residues are connected.
Next, thicken the lines to make them more visible:
Actions→Atoms/Bonds→wire width→3
Try picking two α-carbons, one from each peptide (using Ctrl-Btn1 for the first, Ctrl-Shift-Btn1 for the second). Label the atoms you have selected, first by atom name and then by residue name and number:
Actions→Label→nameEach residue label is of the form:
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:
Actions→Label→residue→off
Color the two chains different colors:
Select→Chain→A
Actions→Color→cyan
Repeat the process to color chain B yellow. As described above, another way to select an entire chain is to pick an atom or bond in the chain and then hit the ↑ key twice, once to expand the selection to the entire residue and another time to expand it to the entire chain.
There is actually another "chain" in this model, not currently displayed: water. This chain ID was assigned automatically when the structure was read in.
Select→Chain→water
Generally, each file of coordinates opened in Chimera becomes a model with an associated model ID number. Models are assigned successive numbers, starting with 0 (zero). The Model Panel shows the current models and enables many operations upon them. Open this tool with Tools→General Controls→Model Panel.
A checkbox in the Active column of the Model Panel shows that the model is activated for motion; unchecking the box makes it impossible to move. Checking the box again restores the movable state. Make sure the line for 1zik.pdb (or 1zik) is highlighted on the left side of the Model Panel (if not, click on it) and then click close in the list of functions on the right side. Use the Close button at the bottom to close the Model Panel.
Go on to Part 2 below, or terminate the Chimera session. A Chimera session may be ended using File→Quit.
With Chimera started and the Side View opened as described at the beginning of Part 1, open a different structure. If 6bna.pdb was downloaded to your machine, choose the menu item File→Open. Locate the file 6bna.pdb in the resulting dialog and open it (the File type should be set to all (guess type) or PDB). If you want to fetch directly from the PDB instead, choose File→Fetch by ID and type 6bna in the PDB ID field. The structure contains the molecule netropsin bound to double-helical DNA.
Thicken the lines to make them more visible:
Actions→Atoms/Bonds→wire width→3
Color the different nucleotides different colors.
For example, color
the adenosine residues (adenine nucleotides) blue:
Select→Residue→A
Actions→Color→blue
Analogously, color cytosine nucleotides (C residues) cyan, guanine nucleotides (G residues) yellow, and thymine nucleotides (T residues) magenta. Clear the selection by using Select→Clear Selection or picking in a region of the graphics window away from any atoms.
Rotate, translate, and scale the structure as needed to get a better look (see Using the mouse 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:
Before proceeding, clear the selection. Otherwise, the water will remain selected, potentially causing confusion when menu Actions have no visible affect (they affect only the selection, currently the invisible waters).
Select→Clear SelectionNow that nothing is selected, the Actions menu will affect everything. 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).
Change the representation of only one of the DNA strands, chain B:
Select→Chain→BNext, change everything to a ball-and-stick representation:
Actions→Atoms/Bonds→ball & stickIn this representation, pick one of the atoms in the white netropsin molecule. Label the residue,
Actions→Label→residue→name + specifiershowing 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:
Actions→Label→residue→offThe first submenu under Label controls individual atom labels, while the second controls residue labels. Actions→Label→name would have shown the name of the atom instead of the name of the residue.
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,
Actions→Label→residue→name + specifiershowing 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:
Actions→Label→residue→off
Finally, have some fun with molecular surfaces. There are built-in categories within structures such as main and ligand; when nothing is selected, Actions→Surface→show displays the surface of main. Surfaces can be translated, rotated, and scaled interactively.
Actions→Surface→showBy default, a surface has the same color as the corresponding atoms; however, surface color can be specified separately. To change the surface color only of netropsin only (which is still selected):
As an example of a more complicated selection process, show the surface of the adenine and thymine nucleotides in chain B only:
The command line (Tools→General Controls→Command Line) equivalent is much more concise, but requires some knowledge of the atom specification syntax:
Command: surf :a.b,t.bSometimes it is helpful to make a solid surface transparent: Actions→Surface→transparency→50%
Choose File→Quit from the menu to terminate the Chimera session.
On Linux, run the executable "chimera" in the bin directory of your Chimera installation. If Chimera is installed in /usr/local/chimera, run /usr/local/chimera/bin/chimera from a shell.
On Windows, start Chimera by doubleclicking the Chimera icon in the directory called bin in your Chimera installation. If Chimera is installed in \Program Files the executable will be in the directory \Program Files\Chimera\bin. By default, a Chimera icon will also be placed on your desktop.
On Mac, start the Apple X server found in /Applications/Utilities/X11, then doubleclick the Chimera application to start. The X server is necessary for running Chimera on the Mac. It is not automatically included in the Mac OS, but can be downloaded (as freeware) from Apple.
Show the Command Line with Tools→General Controls→Command Line. By default, the Command Line tool is also listed in the Favorites menu.
A local file can be opened from the command line if it is in the working directory (or if the entire pathname is entered):
Command: open 1zik.pdbIf the file has been downloaded but is not in the working directory, use File→Open instead, as described in Part 2.
Alternatively, to fetch directly from the PDB, use the command:
Command: open 1zikThe structure will appear in the main graphics window; it 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.
Try manipulating the structure in the main window with the mouse. By default, the left mouse button (Btn1) controls rotation, the middle mouse button (Btn2) button controls XY translation, and the right mouse button (Btn3) controls scaling. On a Mac with a one-button mouse, the middle and right buttons can be emulated by combining mouse action with the option and (apple) keys, respectively.
Continue moving and scaling the structures with the mouse in the graphics window and Side View as desired throughout the tutorial.
In combination with the control (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 (Btn1) while holding down the Ctrl key. To add to an existing selection, also hold down the Shift key. The selection is highlighted in green, and its contents are reported on the button near the lower right corner of the graphics window.
The arrow keys can be used to broaden (↑), narrow (↓), or invert (→) a selection. The hierarchy for broadening and narrowing selections contains atoms, residues, chains, and models, in that order. When a selection is inverted, the selected atoms become deselected and vice versa.
Spend some time selecting various parts of the model. An easy way to deselect everything is to use Ctrl-Btn1 in any blank space in the graphics window.
Symbol | Function | Usage |
# | model number | # model (integer) |
: | residue | : residue (name or number) |
:. | chain ID | :.chain |
@ | atom name | @atom |
* | whole wildcard | matches whole atom or residue names, e.g., :*@CA specifies the α-carbons of all residues |
= | partial wildcard | matches partial atom or ressidue names, e.g., @C= specifies all atoms with names beginning with C |
? | single-character wildcard | used for atom and residue names only, e.g., :G?? selects all residues with three-letter names beginning with G |
z< | zone specifier | z<zone or zr<zone spcifies all residues within zone angstroms of the indicated atoms, and za<zone specifies all atoms (rather than entire residues) within zone angstromgs of the indicated atoms. Using > instead of < gives the complement. |
& | intersection | intersection of specified sets |
| | union | union of specified sets |
~ | negation | negation of specified set (when space-delimited) |
A Chimera command may include arguments and a target (or atom specification). For example, in the following color command,
Command: color hot pink :lyshot pink is an argument that specifies a color name, and the target :lys specifies all residues named LYS. (To see the built-in colors and their names, choose Actions→Color→all colors from the menu.)
If no target is specified, the command acts on all applicable items. For example,
Command: color hot pinkwould color all atoms, bonds, ribbons, and molecular surfaces hot pink.
Unlike the Actions menu, commands do not automatically act on the current selection. However, the current selection can be specified as the target of a command with the word selected, sel, or picked.
The command help can be used to show the manual page for any command. For example,
Command: help colorshows the manual page for the command color. The Chimera Quick Reference Guide lists all of the commands and gives some examples of atom specification. It can be accessed by choosing Help→Tutorials from the Chimera menu and clicking the "Chimera Quick Reference Guide" link.
To simplify the display:
Command: chain @caThis command shows only the atoms named CA (α-carbons) and connects them in the same way that the residues are connected. Next, thicken the lines:
Command: linewidth 3Try picking two α-carbons, one from each peptide (using Ctrl-Btn1 for the first, Ctrl-Shift-Btn1 for the second). 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: ~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 (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
Generally, each file of coordinates opened in Chimera becomes a model with an associated model ID number. Models are assigned successive numbers, starting with 0 (zero). The Active models line in the Command Line tool 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, open a different structure. If 6bna.pdb was downloaded to your machine, choose the menu item File→Open. Locate the file 6bna.pdb in the resulting dialog and open it (the File type should be set to all (guess type) or PDB). Alternatively, fetch the structure directly from the PDB:
Command: open 6bnaThe structure contains the molecule netropsin bound to double-helical DNA. Thicken the lines to make them more visible:
Command: linewidth 3Color 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 Using the mouse 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: ribrepr round
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. Remove the residue label:
Command: ~rlabelTwo 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 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 molecular surfaces. 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 equivalent)
Command: surface :nt
-OR-
Command: surface :.het
Command: surfrepr meshSometimes 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: color red,s ligand
Command: surfrepr solid
Command: ~surf
Command: surf :a.b,t.b
Command: surf :a,t
Command: color green,s :t
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.