[chimerax-users] Custom colour for atoms with bfactor==0
Lorena Zuzic
lorena.zuzic at postgrad.manchester.ac.uk
Tue Jul 27 03:39:40 PDT 2021
Hi Elaine,
Thank you, that worked perfectly!
Also, a separate attribute file sounds like a useful feature, worth a try.
Kind regards,
Lorena
________________________________
From: Elaine Meng <meng at cgl.ucsf.edu>
Sent: 26 July 2021 22:23
To: Lorena Zuzic <lorena.zuzic at postgrad.manchester.ac.uk>
Cc: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] Custom colour for atoms with bfactor==0
Hi Lorena,
Just use this additional command after your initial bfactor coloring:
color @@bfactor=0 gray target a
The "target a" part is to limit to atoms, assuming you don't also want to color ribbons, surfaces, etc. If you do want to color those representations, just omit that part.
See command-line specification by attribute value:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#attributes>
By the way, you don't have to use the bfactor column to assign atoms values and use them for coloring. You can instead make any number of your own custom attributes by reading in an attribute assignment file (simple text format) and then use it for coloring with the "color byattribute" command.
See
<https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/formats/defattr.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Jul 26, 2021, at 12:05 PM, Lorena Zuzic via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi,
> I wanted to know if there is a way of colouring my structure by bfactor, but with an additional condition where all bfactor==0 atoms are coloured in grey.
> Currently, I am using a white to red gradient for my B-factors:
>
> color bfactor range -2.2, 2.2
>
> In this case, bfactor==0 values are coloured white. However, I would like them to be grey and outside the gradient (as they represent an unmapped portion of the protein).
>
> Thanks!
> Lorena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210727/d80017d0/attachment.html>
More information about the ChimeraX-users
mailing list