[Chimera-users] Coloring range for residues

Eric Pettersen pett at cgl.ucsf.edu
Mon Nov 9 16:28:50 PST 2009

Hi Ibrahim,
	I'm not 100% sure why you want to rainbow 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.
	Anyway, there's no way to do it without resorting to (simple)  
Python.  Put the following in a file that ends in ".py":

import chimera
residues = chimera.selection.currentResidues()
for i, r in enumerate(residues):
	r.highlightNum = i+1

	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:

	rangecolor highlightNum,r min blue mid white max red sel


                         Eric Pettersen
                         UCSF Computer Graphics Lab

On Nov 9, 2009, at 11:14 AM, Ibrahim Moustafa wrote:

> Dear Chimera team,
>   I wonder if there is a way to color a certain range of residues  
> using rainbow.
> I tried to use the rainbow command with atom_spec but it applied for  
> the whole chain.
>  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.
> I just wanted to highlight a region of conformational change so the  
> eye can follow which part of the structure has changed dramatically.
>   Thanks in advance for your help.
>   Ibrahim
> -- 
> Ibrahim M. Moustafa, Ph.D.
> Biochemistry and Molecular Biology Dept.
> 201 Althouse Lab., University Park,
> Pennsylvania State University
> PA 16802
> Tel. (814) 863-8703
> Fax (814) 865-7927
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20091109/5683df03/attachment.html>

More information about the Chimera-users mailing list