[Chimera-users] changing the content and colour of labels

Sumitro Harjanto sharjanto at i2r.a-star.edu.sg
Tue Oct 5 03:14:55 PDT 2010


Hi Elaine,

 

Thanks for your prompt reply on the previous issue. I have managed to
get the colours on the residues.

 

Now I have another problem pertaining to the label. 

 

1.       Is there a way to change the colour of the label such that it
is different from that of the residue..?

2.       How can I change the information on the label such that only
the residue's position is shown (omitting the residue's name/type)?

 

Thanks.

 

Cheers,

Sumitro

 

From: Elaine Meng [mailto:meng at cgl.ucsf.edu] 
Sent: Wednesday, September 29, 2010 5:39 AM
To: Sumitro Harjanto
Cc: Chimera-users at cgl.ucsf.edu
Subject: Re: [Chimera-users] colour residue by value

 

Hi Sumitro,

It sounds like you might be thinking of computing the RGB values from
some other values yourself, then applying these "manually" with the
color command.  You could do that -- it is possible to use R,G,B or
R,G,B,A  (where A is opacity for a transparent color) or a Tk code
instead of a color name in practically all of the coloring commands, as
explained for the "color" command here:

 

<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/color.html>

 

However, if I understand your situation correctly, I recommend instead
that you create an attribute definition file (more about this below) to
assign values of your custom attribute to residues.  You can read in the
file with the command "defattr" and then use the "rangecolor" command to
map colors to values.  Then the  "rangecolor" command will do all the
RGB interpolating for you.

 

<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>

 

As an example, here is using the command to show the values of bfactor,
which is already assigned when you open a PDB file:

 

open 1zik

disp

rangecol bfactor min yellow max red

 

OR, you could give values of the attribute directly instead of
min/mid/max, for example

 

rangecol bfactor 20 blue 50 red 90 yellow

 

Here is the description of an attribute definition file, including links
to several example files:

<http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/d
efineattrib.html#attrfile>

 

Then if you named your custom attribute "blah" your commands could look
something like

 

defattr /Users/me/myfiles/blah-definition.txt

rangecol blah min white mid 1,1,.3 max 1,.1,0

 

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 Sep 28, 2010, at 2:09 AM, Sumitro Harjanto wrote:

	I am looking into using CHIMERA to create a diagram. Each
residue will be coloured according to an assigned value; say if the
value is high, the residue will assume a bright red colour; if the value
is low, the residue will be coloured light yellow; residue with a medium
value will appear somewhat orange.

	 

	So my question will be: is there a way to specify the colour of
a residue by its RGB value? And how does the command look like (as I
will be scripting to do it in large scale)?

	Thanks! =]

 

Institute for Infocomm Research disclaimer:  "This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20101005/09e4c56e/attachment.html>


More information about the Chimera-users mailing list