[chimerax-users] sequential coloring of a range of residues

Elaine Meng meng at cgl.ucsf.edu
Tue Nov 17 07:49:14 PST 2020


Hi Daniel & Tristan,
Sequential coloring of a range of residues works in recent daily builds.  The changes to allow doing this with either "color sequential" (aka "rainbow") or "color byattribute" with r:number were made about a week ago.

E.g. in today's daily build:

open 2gbp
color byattribute r:number #1/A:20-50 palette rainbow
- OR -
rainbow #1/A:20-50

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Nov 17, 2020, at 12:48 AM, Tristan Croll <tic20 at cam.ac.uk> wrote:
> 
> It appears that Residue.number isn't registered in ChimeraX's attribute manager. That looks like a bug (will leave that to the ChimeraX team). You can work around it for now with a little tweak in the console (Tools/General/Shell):
> 
> from chimerax.atomic import Residue
> session.attr_registration._class_builtin_types[Residue]['number']=(int,)
> 
> Then your command should work - but I did run into a second bug using it when the ribbon is displayed: 
> 
> color_by_attr
>     rib_colors[:, 3] = residues.ribbon_colors[:, 3] if opacity is None else opacity
> ValueError: could not broadcast input array from shape (852) into shape (6733)
> 
> 
> (but atoms are properly coloured)
> This can be worked around by repeating the command with a selection encompassing one atom per residue, e.g.
> 
> color byattr r:number sel&@CA target r
> 
> I'll report the issues via the bug tracker.
> 
> Tristan
> From: ChimeraX-users <chimerax-users-bounces at cgl.ucsf.edu> on behalf of Daniel Larsson <daniel.larsson at icm.uu.se>
> Sent: 17 November 2020 08:20
> To: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
> Subject: Re: [chimerax-users] sequential coloring of a range of residues
>  
> I can add that I only have problem with atom specifications with sequential coloring. Using the command "color #18/P:1-10 blue" works as expected and colors the designated range blue.
> 
> Regards,
> Daniel
> 
> 
> 
> 
>> On 2020-11-17, at 09:03, Daniel Larsson <daniel.larsson at icm.uu.se> wrote:
>> 
>> Hi,
>> 
>> I have trouble coloring only a narrow range of residues (1-10) in one chain (P) of one model (#18). I've tried a few options:
>> 
>> 
>> color sequential #18/P:1-10
>> 
>> This colors the entire chain P in rainbow colors (equivalent to atom selection #18/P).
>> 
>> 
>> color sequential #18:1-10/P
>> 
>> This colors _all_ residues of all chains in model #18 -- except of one chain which lacks residues 1-10.
>> 
>> 
>> I also tried with the "rainbow" synonym. When this failed, I tried coloring according to the residue number:
>>  
>> 
>> color byattribute r:number #18/P:1-10       
>> 
>> This throws an error "Unknown/unregistered Residue attribute number", although number should be an attribute of residues according to this page: https://www.cgl.ucsf.edu/chimerax/docs/user/attributes.html#residue
>> 
>> Am I doing something wrong? Is this feature not implemented yet? Is there a work-around?
>> 
>> Regards,
>> Daniel
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ 
>> 
>> E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users




More information about the ChimeraX-users mailing list