[Chimera-users] Chimera X color by attribute middle range value
Elaine Meng
meng at cgl.ucsf.edu
Mon Apr 11 17:34:00 PDT 2022
Hi Marcell!
In ChimeraX, you can control which colors go with which values in the "palette" option of the "color byattribute" command. This option can take color/value pairs, and the "range" option is not needed in your situation (if I understand correctly). As you found, if you only give the range, it will spread out the colors evenly.
Here's an example of value,color pairs if you want to color by attribute named "blah" using dodger blue for 0.2, red for 1.0, and gold for 4.0:
color byattr blah palette 0.2,dodgerblue:1.0,red:4.0,gold
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options>
There are lots of named colors, although you could use hex codes instead if the named ones aren't quite what you want.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html>
ChimeraX does not yet have a color-by-attribute GUI although that is something we would like to have eventually. The Color Key tool is just for drawing a color key to explain the coloring, but does not itself affect the structure coloring.
By the way, you may be interested in the chimerax-users at cgl.ucsf.edu mailing list (CC'd on this reply) for questions/discussion specifically about ChimeraX.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Apr 11, 2022, at 5:07 PM, Zimanyi, Marcell via Chimera-users <chimera-users at cgl.ucsf.edu> wrote:
>
> Hello Chimera Community,
>
> I have a .defattr file where I have assigned a value to a few residues on my protein. I'd like to set the range to be 0.2, 1, and 4 so that values with 1.0 will be the middle color. I currently don't see a way to set the middle value for the range. In Chimera, I could set the middle range value in the define attribute GUI. In Chimera X, I'm using color byattribute range 0.2,4 because the range argument will only accept two values. I see that I can bring up the color key gui, but when I change the color key I don't see a way to update the coloring on the residues themselves.
>
> Could you please help me figure out how to set attribute range with 3 values as in Chimera?
>
> Thanks,
> Marcell
More information about the Chimera-users
mailing list