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

Elaine Meng meng at cgl.ucsf.edu
Wed Dec 3 10:07:10 PST 2014


On Dec 3, 2014, at 1:30 AM, Mungo Carstairs (Staff) <g.m.carstairs at dundee.ac.uk> wrote:

> Thanks all.
> Tom, your suggestion of comma- instead or or-delimiter improves speed several times!
> Elaine, your point about specifying the chain is noted.
> 
> Conrad, I didn't explain too clearly: my 'real' command is the 'non-contiguous' example (think Zappo colouring with some custom features colours on top).  The 'contiguous' example was just what I was using to explore behaviour of setattr / defattr / rangecolor.
> (Also by the way the REST API is working fine for me.)
> 
> Instead of 'color' I am now using 'setattr' followed by 'rangecolor'.
> I tried both 'setattr' and 'defattr' (passing a temporary file) and didn't see any significant performance difference between them, at the scales I am testing so far (up to 3 models of 1600 residues).
> 
> So I have what I need for now. But I'm still curious to know if / how you get Chimera to 'act on' (display) a colour-valued attribute.
> 
> Best regards,
> Mungo

Hi Mungo,
Setting the color attribute with setattr or defattr does change the color immediately.  The problem in what you sent earlier:

setattr r color green #0:1-84.B 

… is that there is no residue attribute named “color".  There are atom and molecule-model  attributes by that name (setattr a color …)  but the only per-residue color setting is ribbon color, name “ribbonColor” … thus you would want something like:

setattr r ribbonColor green #0:54.a,76.a

… and that would only color the ribbon, not the atoms/bonds.  
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/atom_spec.html#resprops>

Actually I am mystified as to why this would be any faster than using the color command with the same atomspec (#0:54.a,76.a in the example above), but maybe the others who know more about the “guts” of Chimera can comment.

Best,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco







More information about the Chimera-users mailing list