Attributes Tutorial

This tutorial demonstrates many uses of attributes, or properties of atoms, residues, and molecule models. Attributes can be numerical (such as atomic number), boolean (e.g., whether a residue is an alpha-helix), or string-valued (such as atom type). Attribute values can be rendered visually and used in selection and command-line atom specification.

Part 1 uses a leucine zipper structure, and Part 2 uses the structure of a GTP-binding protein.


Attributes, Part 1 - Leucine Zipper

tyrosine colored by charge

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. Open the Command Line (choosing Tools... General Controls... Command Line is one way) and, if desired, the Side View for clipping and scaling.

If you have internet connectivity, structures can be obtained directly from the Protein Data Bank. Choose File... Fetch by ID from the Chimera menu. In the resulting dialog, check the PDB ID option (if it is not already checked) and fetch the PDB structure 1zik. If you do not have internet connectivity, download the file 1zik.pdb included with this tutorial and use File... Open to open it.

The structure is a leucine zipper formed by two peptides. Undisplay water, change to a stick representation, and color by element:

Command: ~disp solvent
Command: repr stick
Command: color byelement

Move and scale the structure as desired throughout the tutorial.

Open the Render by Attribute tool (Tools... Structure Analysis... Render by Attribute). It is initially set to show the attributes of atoms. Look in the Attribute list to see the attributes available: bfactor and occupancy, which were read from the input PDB file. Choose bfactor; a histogram of the values will appear, with blue, white and red markers (or thresholds). Click Apply to color the atoms blue to white to red in order of increasing B-factor.

You can define your own color mapping by adding and deleting thresholds (Ctrl-clicking an existing one deletes it; Ctrl-clicking elsewhere on the histogram adds one), moving them along the histogram, and/or changing their colors. The Value and Color are shown for the most recently clicked or moved threshold. The Value changes when the threshold is moved, or the position can be changed by entering a value and pressing return. The Color can be changed by clicking the adjacent color well. If you wish, try applying different color mappings.

As expected, the atoms with higher B-factors are on the outside of the structure. Note that the histogram includes the B-factor values of the waters even though they are not displayed. Display waters with B-factors less than 75:

Command: disp solvent & @/bfactor<75
Undisplay atoms and show a rounded ribbon:
Command: ~disp
Command: ribbon
Command: ribrepr rounded
Next, change to the attributes of residues in the Render by Attribute dialog. The automatically available attributes are kdHydrophobicity and average bfactor and occupancy. The latter two are residue averages over the atomic values. Choose kdHydrophobicity, the Kyte-Doolittle hydrophobicity scale for amino acids. The values will be displayed in the histogram: negative for polar residues, positive for hydrophobic residues.

Hydrophobicity could be shown with color, but for variety, we will show it with "worms," modified ribbons that vary in radius. In the Render by Attribute dialog, change from Colors to Worms. The values are still shown in a histogram, but now the thresholds have a Worm radius instead of a color. The thresholds can be added, deleted, and moved like before, and the Worm radius can be changed. By default, the more hydrophobic residues wil be shown with a fatter worm (a larger worm radius). Change the mapping as desired and click Apply.

The worms show that the most hydrophobic residues tend to face the interior of the structure. To return to a normal ribbon instead of a worm, change the Worm style to non-worm and click OK (which is equivalent to Apply plus Close).

Additional hydrophobicity scales are available as attribute assignment files.

Some Chimera tools create new attributes. For example, the Add Charge tool (also implemented as the command addcharge) assigns partial charges as an atom attribute named charge. For standard residues (such as in this structure), the partial charges are taken from the Amber parameter files all*94.lib.

Undisplay the ribbons and show atoms as wires colored by element:

Command: ~ribbon
Command: disp
Command: repr wire
Command: line 2
Command: col byelement
Next, add hydrogens and assign atomic partial charges:
Command: addh
Command: addcharge
Above, attribute values were shown with color and worms; another approach is to display the values as atom labels. Since it would be too confusing to show all of these labels at once, only show them for the atoms in a single residue:
Command: alias myres :tyr.a
Command: show myres
Command: labelopt info charge
Command: label myres

New attributes can be used in the command line just like built-in attributes. For example, change the atoms with charge < –0.5 into balls:

Command: repr bs @/charge<-0.5
In tyrosine, this affects the hydroxyl and carbonyl oxygens. Finally, remove the labels, change to ball-and-stick, and color atoms by their charge values:
Command: ~la
Command: repr bs
Command: rangecol charge -0.8 red 0 white 0.8 blue
The result should look something like the figure. Rangecolor is the command alternative to Render by Attribute for coloring.

Close the model:

Command: close 0
Go on to Part 2 below, OR terminate the Chimera session with the following command:
Command: stop


Attributes, Part 2 - GTP-Binding Protein

121p colored by convexity

Begin with Chimera started and the Command Line (and optionally the Side View) opened as described at the beginning of Part 1.

If you have internet connectivity, use a command to fetch the PDB structure 121p:

Command: open 121p
If you do not have internet connectivity, download the file 121p.pdb included with this tutorial and use File... Open to open it.

The structure is H-ras, a small GTP-binding protein, along with a bound GTP analog, a Mg++ ion, and some water. Delete the water and change to a ribbon display of the protein:

Command: delete solvent
Command: ~disp
Command: ribbon
Command: ribrepr sharp
Move and scale the structure as desired throughout the tutorial. Show all residues within 4 angstroms of any ions, use the stick representation of atoms and bonds, color by element, label the residues, and color the labels red:
Command: display ions z<4
Command: repr stick
Command: col byelement
Command: rlabel ions z<4
Command: color red,l
(The latter command contains a lowercase letter l, not the number 1.) The active site Mg++ ion is coordinated by serine-17, threonine-35, and phosphonate oxygens in the GTP analog, which is named GTO.

In HOMSTRAD, this protein is classified in the GTP-binding protein family. Download the alignment file homstrad-gtp.pir (originally from HOMSTRAD, now included with this tutorial) and open it with File... Open. The file type is Aligned NBRF/PIR. The alignment will be shown with Multalign Viewer. The structure will automatically associate with the sequence named 5p21, as indicated by the white rectangle under this sequence name.

When a structure is associated with a sequence alignment open in Multalign Viewer, its residues are assigned a mavPercentConserved attribute. From the Multalign Viewer menu, choose Structure... Render by Conservation. This opens the same Render by Attribute tool used in Part 1, except that now it shows the attribute of residues named mavPercentConserved. Render the values with Colors; use any coloring scheme you like to show this attribute, then close the Render by Attribute dialog. It is evident that many of the most conserved residues are in or near the binding site. Undisplay the labels and select residues within 6 angstroms of the ligand, GTO:

Command: ~rlabel
Command: select ligand z<6
The selection is shown in the Multalign Viewer sequence window as green boxes around the corresponding residues. Like other attributes, mavPercentConserved can be used as a command-line criterion:
Command: select ligand z<6 & :/mavPercentConserved>80
This selects a smaller set of residues than before, only those both within 6 angstroms of the ligand and associated with positions with >80% conservation in the sequence alignment. Clear the selection (Select... Clear Selection is one way) and Quit from Multalign Viewer.

Finally, we will use Area/Volume from Web to obtain molecular and solvent-accessible surface areas for the protein atoms and then use the Attribute Calculator to create a new attribute from these areas. To get surface areas for the protein only (not enclosing any solvent or other bound molecules) it is necessary to first delete the other parts of the structure:

Command: delete ions | ligand
(solvent was deleted earlier). Choose Tools... Surface/Binding Analysis... Area/Volume from Web from the menu.* Compute the Surface Area (MSMS); click OK to perform the calculation and dismiss the dialog. Chimera will send the coordinates of the structure to the StrucTools server at http://molbio.info.nih.gov/structbio/basic.html and then load the results as atom attributes named msmsArea_MS and msmsArea_SAS (by default; different names could have been specified). The new attributes are listed in the Render by Attribute dialog. A warning may appear stating that not all atoms were present in the output from the server. Close the warning dialog; this is a fairly common occurrence that usually does not interfere with further calculations.
* Area/Volume from Web requires internet connectivity. If you are not connected, instead download the file SurfVolResults3.txt included with this tutorial, use Define Attribute (Tools... Structure Analysis... Define Attribute) to open it, and continue on from here. The new atom attributes msmsArea_MS and msmsArea_SAS are listed in the Render by Attribute dialog.
Open the Attribute Calculator (Tools... Structure Analysis... Attribute Calculator). Calculate another new attribute named convexity for atoms using the Formula
atom.msmsArea_SAS/atom.msmsArea_MS
Check the options to Open Render/Select by Attribute and Save calculation results to file; uncheck the others. Click OK to perform the calculation and assignment. A warning message will appear because some atoms have a molecular surface area (msmsArea_MS) of zero, resulting in a divide-by-zero error. However, just close the warning dialog; the attribute convexity has been assigned correctly for the atoms with nonzero areas. Name the output file convexity.txt. In a later Chimera session with the same structure, convexity.txt could be opened with Define Attribute to assign atomic convexity values directly (without any recomputation). However, in this case we will render the values with color. Undisplay the ribbon and surface the protein:
Command: ~ribbon
Command: surf
In the Render by Attribute dialog, make sure that the histogram is showing the new attribute of atoms named convexity. Render the values with Colors. Change the lowest-value (leftmost) threshold to purple and the highest-value threshold to yellow (these names can be entered directly in the Color name field of the Color Editor). Use white for the middle threshold and set its Value to 1 (values > 1 represent convex areas, while values < 1 represent concave areas). Click Apply.

Small areas of other, previously used colors may peek through; this is because the atomic radii in Chimera differ slightly from the radii used by the StrucTools server. The colors that peek through are for atoms that are not exposed at all according to the StrucTools calculations. Set these areas to purple too, using the color well marked No-value color in the Render by Attribute dialog. Click Apply again; the result should resemble the figure.

If you wish, try applying different color mappings (changing colors, threshold positions, and/or number of thresholds). When finished, end the Chimera session:

Command: stop


meng@cgl.ucsf.edu / September 2006