<html><head><base href="x-msg://9/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>Hi Sumitro,</div></span>
</div>
<div>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:</div><div><br></div><div><<a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/color.html">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/color.html</a>></div><div><br></div><div>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.</div><div><br></div><div><<a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html</a>></div><div><br></div><div>As an example, here is using the command to show the values of bfactor, which is already assigned when you open a PDB file:</div><div><br></div><div>open 1zik</div><div>disp</div><div>rangecol bfactor min yellow max red</div><div><br></div><div>OR, you could give values of the attribute directly instead of min/mid/max, for example</div><div><br></div><div>rangecol bfactor 20 blue 50 red 90 yellow</div><div><br></div><div>Here is the description of an attribute definition file, including links to several example files:</div><div><<a href="http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile">http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile</a>></div><div><br></div><div>Then if you named your custom attribute "blah" your commands could look something like</div><div><br></div><div>defattr /Users/me/myfiles/blah-definition.txt</div><div>rangecol blah min white mid 1,1,.3 max 1,.1,0</div><div><br></div><div>I hope this helps,</div><div>Elaine</div><div><div>-----</div><div>Elaine C. Meng, Ph.D. </div><div>UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab</div><div>Department of Pharmaceutical Chemistry</div><div>University of California, San Francisco</div><div><br></div></div><div><br></div><div><div>On Sep 28, 2010, at 2:09 AM, Sumitro Harjanto wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1" style="page: Section1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">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.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">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)?<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks! =]</div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></div></div></div></span></blockquote></div><br></body></html>