[Chimera-users] How to use a colour-valued attribute?

Tom Goddard goddard at sonic.net
Tue Dec 2 11:13:44 PST 2014


To add a bit to Conrad’s suggestion, you can specify non-contiguous residues in one command, like

	color red #0:1,4-6,8.A

and that may be faster than the union “|” operator.

	Tom

> On Dec 2, 2014, at 10:17 AM, Conrad Huang wrote:
> 
> You used two different ways to specify atoms for the "color" and "setattr" commands.  Have you tried comparing the speed for
> 	color #ffafaf #0:1-84.B
> as opposed to
> 	color #ffafaf #0:1.B|#0:2.B|...
> to see if there are performance differences?  The former specification requires testing each residue against a single sequence range, whereas the latter requires testing against many residue sequence numbers.  So I would expect the former to work faster than the latter.
> 
> Conrad
> 
> On 12/2/2014 2:10 AM, Mungo Carstairs wrote:
>> Hi,
>> 
>> 
>> This feels like a basic question but it has stumped me for a day now so
>> here we go...
>> 
>> 
>> I'm exploring ways of programmatically setting colours to find the most
>> efficient method.
>> 
>> This is for the 'custom coloured' case (residue-based colour schemes
>> are not a problem).
>> 
>> The simple version is to send as many 'color' commands as there are
>> colours in my (Jalview) sequence:
>> 
>> 
>> color #ffafaf #0:1.B|#0:5.B|#0:7-8.B|....;color #ffff00
>> #0:39.B|#0:44.B|#0:47.B|#0:77.B;
>> 
>> 
>> This works, but doesn't seem to scale up well for large/many structures
>> - I start to see Chimera using 100% CPU for minutes at a time.
>> 
>> 
>> I'm trying instead to see whether setting a colour-value attribute is
>> faster.
>> 
>> I can set the attributes ok with commands like
>> 
>> setattr r color green #0:1-84.B
>> 
>> etc
>> 
>> and confirm they are set with
>> 
>> list residues spec #0:1-84.B attribute color
>> 
>> 
>> but I can't figure out how to get Chimera to use the attribute value as
>> the display colour.
>> 
>> 'Render by Attribute' only seems to consider numeric (range-valued)
>> attributes, not colour-valued.
>> 
>> I thought perhaps 'my' colour was just hidden in the colour hierarchy,
>> but removing other colours doesn't seem to help.
>> 
>> 
>> What am I missing?
>> 
>> 
>> Thanks,
>> 
>> 
>> Mungo Carstairs
>> 
>> 
>> Division of Computational Biology
>> University of Dundee
>> http://www.jalview.org
>> 
>> 
>> The University of Dundee is a registered Scottish Charity, No: SC015096
>> 
>> 
>> _______________________________________________
>> Chimera-users mailing list
>> Chimera-users at cgl.ucsf.edu
>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>> 
> 
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 





More information about the Chimera-users mailing list