[Chimera-users] DNA ladder different color than backbone

Greg Couch gregc at cgl.ucsf.edu
Fri Jul 24 14:10:01 PDT 2015


Sorry, there is currently no way to do that without changing the code.  
If you're up to it, you need to edit the 
CHIMERA/share/NucleicAcids/__init__.py file where CHIMERA is the 
directory where Chimera is installed.  In that file, inside the ladder 
function ('def ladder' on line 1273), you will find a loop (at line 
1330) where it first gets the color of each residue in the ladder:
>  r0color_kwds = _ribbon_color(r0)
>  r1color_kwds = _ribbon_color(r1)
and later there are two drawCylinder() calls.

The "fix" is to add two more lines after fetching the residue colors to 
override them with the color you want, so those two lines become:
> r0color_kwds = _ribbon_color(r0)
> r1color_kwds = _ribbon_color(r1)
> r0color_kwds['color'] = (.2, .8, .2)
> r1color_kwds['color'] = r0color_kwds['color']

Where (.2, .8, .2) are the RGB values of the color you want.

     HTH,

     Greg

On 7/24/2015 11:37 AM, Belle Lin wrote:
> Dear Chimera users/developers,
>
> Is there a way to make the DNA ladders a different color than the 
> backbone? I am able to do so when the side (sugar/base) is shown in 
> the "tube/slab" mode, but when I change it to the "ladder" mode I am 
> unable to change the color of the rungs. I have included photos below 
> which hopefully make my question more clear. Thank you in advance for 
> your help!!
>
> Thanks,
> Belle Lin
>
> _____________________________________________________________
>
> Able to create:
> Inline image 3
>
> Inline image 2
>
> Trying to create:
> Inline image 1
>
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150724/3334c8e3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 136788 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150724/3334c8e3/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 162932 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150724/3334c8e3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 39800 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150724/3334c8e3/attachment-0002.png>


More information about the Chimera-users mailing list