<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Ah - great!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-- Tristan</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Elaine Meng <meng@cgl.ucsf.edu><br>
<b>Sent:</b> 17 November 2020 15:49<br>
<b>To:</b> Tristan Croll <tic20@cam.ac.uk>; Daniel Larsson <daniel.larsson@icm.uu.se><br>
<b>Cc:</b> chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu><br>
<b>Subject:</b> Re: [chimerax-users] sequential coloring of a range of residues</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Daniel & Tristan,<br>
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.<br>
<br>
E.g. in today's daily build:<br>
<br>
open 2gbp<br>
color byattribute r:number #1/A:20-50 palette rainbow<br>
- OR -<br>
rainbow #1/A:20-50<br>
<br>
I hope this helps,<br>
Elaine<br>
-----<br>
Elaine C. Meng, Ph.D. <br>
UCSF Chimera(X) team<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
<br>
<br>
> On Nov 17, 2020, at 12:48 AM, Tristan Croll <tic20@cam.ac.uk> wrote:<br>
> <br>
> 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):<br>
> <br>
> from chimerax.atomic import Residue<br>
> session.attr_registration._class_builtin_types[Residue]['number']=(int,)<br>
> <br>
> Then your command should work - but I did run into a second bug using it when the ribbon is displayed:
<br>
> <br>
> color_by_attr<br>
> rib_colors[:, 3] = residues.ribbon_colors[:, 3] if opacity is None else opacity<br>
> ValueError: could not broadcast input array from shape (852) into shape (6733)<br>
> <br>
> <br>
> (but atoms are properly coloured)<br>
> This can be worked around by repeating the command with a selection encompassing one atom per residue, e.g.<br>
> <br>
> color byattr r:number sel&@CA target r<br>
> <br>
> I'll report the issues via the bug tracker.<br>
> <br>
> Tristan<br>
> From: ChimeraX-users <chimerax-users-bounces@cgl.ucsf.edu> on behalf of Daniel Larsson <daniel.larsson@icm.uu.se><br>
> Sent: 17 November 2020 08:20<br>
> To: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu><br>
> Subject: Re: [chimerax-users] sequential coloring of a range of residues<br>
> <br>
> 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.<br>
> <br>
> Regards,<br>
> Daniel<br>
> <br>
> <br>
> <br>
> <br>
>> On 2020-11-17, at 09:03, Daniel Larsson <daniel.larsson@icm.uu.se> wrote:<br>
>> <br>
>> Hi,<br>
>> <br>
>> 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:<br>
>> <br>
>> <br>
>> color sequential #18/P:1-10<br>
>> <br>
>> This colors the entire chain P in rainbow colors (equivalent to atom selection #18/P).<br>
>> <br>
>> <br>
>> color sequential #18:1-10/P<br>
>> <br>
>> This colors _all_ residues of all chains in model #18 -- except of one chain which lacks residues 1-10.<br>
>> <br>
>> <br>
>> I also tried with the "rainbow" synonym. When this failed, I tried coloring according to the residue number:<br>
>> <br>
>> <br>
>> color byattribute r:number #18/P:1-10 <br>
>> <br>
>> This throws an error "Unknown/unregistered Residue attribute number", although number should be an attribute of residues according to this page:
<a href="https://www.cgl.ucsf.edu/chimerax/docs/user/attributes.html#residue">https://www.cgl.ucsf.edu/chimerax/docs/user/attributes.html#residue</a><br>
>> <br>
>> Am I doing something wrong? Is this feature not implemented yet? Is there a work-around?<br>
>> <br>
>> Regards,<br>
>> Daniel<br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> 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:
<a href="http://www.uu.se/om-uu/dataskydd-personuppgifter/">http://www.uu.se/om-uu/dataskydd-personuppgifter/</a>
<br>
>> <br>
>> E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here:
<a href="http://www.uu.se/en/about-uu/data-protection-policy">http://www.uu.se/en/about-uu/data-protection-policy</a><br>
>> _______________________________________________<br>
>> ChimeraX-users mailing list<br>
>> ChimeraX-users@cgl.ucsf.edu<br>
>> Manage subscription:<br>
>> <a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
> <br>
> _______________________________________________<br>
> ChimeraX-users mailing list<br>
> ChimeraX-users@cgl.ucsf.edu<br>
> Manage subscription:<br>
> <a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
<br>
</div>
</span></font></div>
</body>
</html>