[Chimera-users] Coloring selected residues based on B-factor
Elaine Meng
meng at cgl.ucsf.edu
Thu May 7 16:09:57 PDT 2015
Hi Mahendra,
The default behavior if your atoms or residues *really* do not have any value assigned for the attribute is to leave their colors the same. You would simply leave the “No-value color” in the Render by Attribute dialog as “No” (none), or if you’re using the “rangecolor” command, do not give any color for “novalue.”
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/render/render.html#render>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>
However, since you put the values in as B-factors in a PDB file, I suspect it is reading the blank ones as zero instead of no-value. In that case you would need to first set bfactor=0 to bfactor=no-value, which can be done with the command:
~setattr a bfactor @/bfactor=0
(unset atom attribute named bfactor for the atoms with bfactor currently equal to zero) ...then if you already had the Render by Attribute dialog up, be sure to Refresh…Values before applying the coloring.
You could avoid this extra unsetting step by not using the bfactor column in a PDB file to assign the attribute and instead creating your own new attribute by reading in an attribute definition file (to assign multiple values at once) and/or using the command setattr (to set one value at a time).
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/setattr.html>
I hope this helps,
Elaine
----------
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On May 7, 2015, at 1:56 PM, Mahendra B Thapa <thapamb at mail.uc.edu> wrote:
>
> Dear Chimera users,
>
> While using Chimera to study a protein with 511 residues, I colored residues 1- 274 'dark grey', residues 274-417 'tan' and residues 418-511 'dark khaki'.
> I want to color residues, say, 313,350,412,415,485,503, from blue to red with an increasing order of B-factors, say respective B-factors are 40,13,2,21,33,6 without altering the color of other residues. I manually put these B-factors values for the corresponding residues; rest residues have no b-factor values as the structure is obtained from a simulation. I tried some unsuccessful attempts visiting some previous posts (sorry if I missed such posts close to my query). Any comments and suggestions might help me.
>
> Thank you,
> Mahendra Thapa
> University of Cincinnati,OH
More information about the Chimera-users
mailing list