Coloring by NMR Chemical Shift Perturbation using Chimera

Tom Goddard
November 28, 2018
UCSF Biophysics 204A tutorial

How to color the molecular surface of HSP90 by NMR chemical shift perturbation values using UCSF Chimera version 1.13.1 (older versions will work).

Create a Chimera Attribute File

First convert our chemical shift perturbation file that looks like

Assignment	CSP
V201N-H 	0.022
L56N-H 		0.052
D142N-H 	0.066
...
    

to a Chimera attribute file (documentation) that has residue number and chemical shift value and a minimal header like (note tabs are required):

#
#  Chemical shift perturbations for HSP90, PDB 1ah8.
#  Use this file to assign the attribute in Chimera with the Define Attribute tool.
#
attribute: csp
recipient: residues
	:201	0.022
	:56	0.052
	:142	0.066
	...
    

The assignment in column 1 can be converted to a residue number with a Python script csp.py run in a terminal window, and an editor can be used to add the header lines saying it is a residue attribute.

      python csp.py < shifts.txt > shifts_attr.txt
    

Coloring HSP90 Surface

Spin movie
OperationChimera menu entry
Open HSP90 protein, PDB 1ah8 File / Fetch by ID.
Delete chain B Select / Chain / B and Actions / Atoms / Delete.
Show surface Actions / Surface / Show.
Read attribute file Tools / Structure Analysis / Define Attribute.
Color using attribute Tools / Structure Analysis / Render by Attribute.
Create color key on image Render by Attribute panel button Create Corresponding Color Key
Save image File / Save Image....
Save movie spinning 360 degrees Favorites / Command Line
"movie record ; turn y 1 360 ; wait 360 ; movie encode ~/Desktop/1ah8_csp.mp4"
Save Chimera session File / Save Session As...

Prettier Images

OperationChimera menu entry
Gray backgroundActions / Color / All Options
Shadows and silhouette edgesTools / Viewing Controls / Effects
Reduce shininessTools / Viewing Controls / Shininess
Residue labels and arrowsTools / Depiction / 2D Labels or use a photo editor program.

Pitfalls

There are some Chimera bugs that can cause trouble in this surface coloring procedure.

  1. Lowercase attribute name. The name we used in the attribute file was lowercase "csp" (short for chemical shift perturbations). The attribute name should not start with uppercase. If the first letter of the attribute name is capitalized the Chimera Render by Attribute tool will not show it, apparently because it treats attributes that start with uppercase as constants. More details of the attribute file format are given in the Chimera manual.
  2. Floating point values. The values in the attribute file should have a decimal point to indicate they are floating point, for example "0.0" and not "0". Apparently the Chimera Render by Attribute tool just looks at the value on the first residue to decide if the values are integer or floating point. If it decides they are integer (no decimal point) then subsequent float values get rounded to integer.
  3. Tabs in attribute file. The format of the lines in the attribute file is "[tab]:resnum[tab]value". The tabs cannot be replaced by spaces. Apparently this is to allow values that are strings with spaces in them. Using a space instead of a tab will probably produce an error message.
  4. Moving models on Windows laptop with trackpad. On a Windows laptop with a trackpad Chimera uses left click and drag to rotate, right click and drag (or scroll with 2-finger drag) to zoom and middle click and drag to shift models left/right/up/down. Laptops don't usually have a way to emulate middle mouse. So use Chimera menu Favorites / Preferences / Category Mouse and assign button 3 (right mouse) to be shift (second column of table). Then shift can be done with right click (usually clicking in lower right corner of Windows trackpad, and zoom can be done with a two-finger drag. On Mac laptops this is not needed since Option and Command modifier keys can be held to emulate middle and right click, and also two and three finger drag can do rotation and translation.