[chimerax-users] Custom colour for atoms with bfactor==0
Elaine Meng
meng at cgl.ucsf.edu
Mon Jul 26 14:23:14 PDT 2021
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
More information about the ChimeraX-users
mailing list