[Chimera-users] B-value coloring

Elaine Meng meng at cgl.ucsf.edu
Tue Oct 3 09:05:02 PDT 2017

Dear Armin Hodaei,
In Chimera, you do not need to change the B-factor values to do the coloring.  Instead you can create your own new “attribute” by making an input text file that simply lists the residues (or atoms) and the values that you want to assign.  When you read that file into Chimera, your attribute values will be shown in a histogram just like B-factor values, and you can do the coloring however you like: any colors, etc.

The input text file format is described here:

See also the example files linked at the bottom of the page.  The first one (percentExposed.txt) is an example of assigning values to residues based on their residue numbers. Most of the lines are of the form:

After you make that text file:  start Chimera, open the structure, and read the text file in with Define Attribute (in menu under Tools… Structure Analysis) or the command “defattr”.  When the file is read, by default the Render by Attribute dialog will automatically pop up for choosing the coloring that you want.

Define Attribute

Render by Attribute (how to change coloring etc.)

You can also do the coloring with the “rangecolor” command instead of the Render by Attribute GUI, but unless you are trying to script everything, it is probably easier for you to use the GUI because it shows the histogram of the values.

I hope this helps,
Elaine C. Meng, Ph.D. 
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

P.S. although you can just make your own new attribute instead of changing B-factor, you could also change the B-factor values if you really wanted to… however, it would still require making an attribute assignment file.  In that file you would need to give attribute name as “bfactor” and the recipient level of assignment as “atoms” (not residues)

> On Oct 3, 2017, at 1:51 AM, ARMIN HODAEI <ahodaei15 at ku.edu.tr> wrote:
> Dear Chimera users,
>           I would like to change the b-values of a Protein and color the residues in the ranking that I want. I have a sequence of residues from the most functionally important sites to less functionally important. I wanna define them to look red and blue respectively due to the new ranking.
> Sincerely, 
> Armin Hodaei

More information about the Chimera-users mailing list