[Chimera-users] Coloring by B-factor

Elaine Meng meng at cgl.ucsf.edu
Tue Jan 4 12:37:04 PST 2005

> I have been using Chimera to generate the colorful ribbon picture for  
> the
> pdb file using command line. Now I am tring to figure out the general  
> way of
> defining the bfactor range corresponding to the different colors. I  
> found
> the flexible python code for making the rainbow color by bfactor and  
> tried
> it out. But it ended up with the file/open error message as I didn't  
> see any
> problem in the code.

Dear Li,
In more recent versions of Chimera (yes, we do recommend getting  
there are easy ways to color by B-factor that do not require making a
python script.

First, there is the tool Render by Attribute, which shows the B-factor
values on a histogram.  You can put as many colored sliders as you want
on the histogram to define the coloring.  If you want to color the  
you need to change to residue attributes and then pick the average  
as an attribute (since the ribbon can only have one color per residue,  
per atom).  See the man page at

Second, there is the command "rangecolor," which also colors according
to attribute values (the B-factor is just one of many attributes).  It
depends whether you prefer the graphical interface or typing commands.
See the man page at

I didn't look at your script, but I think these are much nicer ways of
showing numerical values on the structure.  I hope this helps,

Elaine C. Meng, Ph.D.                          meng at cgl.ucsf.edu
Computer Graphics Lab and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco


More information about the Chimera-users mailing list