[chimerax-users] sequential coloring of a range of residues
Tristan Croll
tic20 at cam.ac.uk
Tue Nov 17 00:48:45 PST 2020
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<mailto: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<mailto:ChimeraX-users at cgl.ucsf.edu>
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201117/68b2c5dd/attachment.html>
More information about the ChimeraX-users
mailing list