<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ibrahim,<div><span class="Apple-tab-span" style="white-space:pre"> </span>I'm not 100% sure why you want to <i>rainbow</i> the highlighted part of your structure, rather than use a single color, or color the rest of the structure dark gray, or make the rest of the structure semi-transparent, or many other possible highlighting schemes.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Anyway, there's no way to do it without resorting to (simple) Python. Put the following in a file that ends in ".py":</div><div><br></div><div>import chimera</div><div>residues = chimera.selection.currentResidues()</div><div>residues.sort()</div><div>for i, r in enumerate(residues):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>r.highlightNum = i+1</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Then select the residues you want highlighted in Chimera. Run the Python script by opening it with the "open" command or with the File->Open dialog. Then run this Chimera command:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>rangecolor highlightNum,r min blue mid white max red sel</div><div><br></div><div>--Eric</div><div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></div></span> </div><br><div><div>On Nov 9, 2009, at 11:14 AM, Ibrahim Moustafa wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Dear Chimera team,<br> <br> I wonder if there is a way to color a certain range of residues using rainbow.<br> I tried to use the rainbow command with atom_spec but it applied for the whole chain.<br> <br> What I want to do is to color part of the structure as a rainbow (from blue-white-red) with an increasing order of residues number.<br> I just wanted to highlight a region of conformational change so the eye can follow which part of the structure has changed dramatically.<br> <br> <br> Thanks in advance for your help.<br> <br> Ibrahim<br> <br> -- <br> <hr align="CENTER" size="3" width="95%">Ibrahim M. Moustafa, Ph.D.<br> Biochemistry and Molecular Biology Dept.<br> 201 Althouse Lab., University Park,<br> Pennsylvania State University<br> PA 16802<br> <br> Tel. (814) 863-8703<br> Fax (814) 865-7927<br> <br> </span></font> </div> _______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><br>http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users<br></blockquote></div><br></div></body></html>