More shades in color byattribute

Dear Chimera-X users ! I am using ChimeraX to color pdb file according to its structural flexibility determined in the b-factor column color byattribute bfactor palette rainbow range 2,100 This info is taken directly from the rmsf calculations of short MD trajectory and stored in a single pdb structure in the b-factor column. Technically It works very well, however in the case of flexible systems, the most of the structures is colored in "red". I enclose a screenshot of an example image along with the corresponded rmsf chart. Would it be possible to define the gradient of the coloring in more accurate fashion in order that the red zones could have more shades ? I believe this could be fine-tuned via the "range 2, 100 " attribute and / or switching to other palettes e.g. 'Paired-12' , which naturally has more shades compared to 'rainbow' .. I would be grateful for any further suggestions ! Yours with thanks, Enrico

Hello, You can use as many color,value pairs as you want by specifying them directly in the command. You don't need to use one of the pre-defined palette names. See the color command palette options and ways of specifying colors: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html> For example: color byattribute bfactor palette "2.5,cornflower blue:10.3,gold:80.8,red" color byattribute bfactor palette 2.5,#b22222:5.9,#dc143c:15,#ff0000:25.3,#ffff00:46,#adff2f (where the top palette is enclosed in quotation marks because it contains a space) Or use the graphical interface of Render by Attribute (available in version 1.6) where you can add as many control points as you like, move them on the histogram, and change their colors using the system color editor. It's in the menu under Tools... Structure Analysis. Choose attributes of "atoms", attribute "bfactor" See Render by Attribute help for details: <https://rbvi.ucsf.edu/chimerax/docs/user/tools/render.html> Then when you apply the Render by Attribute coloring it will show the corresponding command in the Log. If you wanted to script it, that is an easy way of finding out the command. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 30, 2023, at 5:34 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users !
I am using ChimeraX to color pdb file according to its structural flexibility determined in the b-factor column
color byattribute bfactor palette rainbow range 2,100
This info is taken directly from the rmsf calculations of short MD trajectory and stored in a single pdb structure in the b-factor column.
Technically It works very well, however in the case of flexible systems, the most of the structures is colored in "red". I enclose a screenshot of an example image along with the corresponded rmsf chart.
Would it be possible to define the gradient of the coloring in more accurate fashion in order that the red zones could have more shades ?
I believe this could be fine-tuned via the "range 2, 100 " attribute and / or switching to other palettes e.g. 'Paired-12' , which naturally has more shades compared to 'rainbow' ..
I would be grateful for any further suggestions !
Yours with thanks,
Enrico

Thank you very much Elaine ! I actually forgot two very useful options for color byattribute range full and/ or ave residues # ?? it seems to me that with it we do not need to indicate the range values at all .. Enrico Il giorno mer 30 ago 2023 alle ore 19:00 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Hello, You can use as many color,value pairs as you want by specifying them directly in the command. You don't need to use one of the pre-defined palette names. See the color command palette options and ways of specifying colors:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html>
For example:
color byattribute bfactor palette "2.5,cornflower blue:10.3,gold:80.8,red" color byattribute bfactor palette 2.5,#b22222:5.9,#dc143c:15,#ff0000:25.3,#ffff00:46,#adff2f
(where the top palette is enclosed in quotation marks because it contains a space)
Or use the graphical interface of Render by Attribute (available in version 1.6) where you can add as many control points as you like, move them on the histogram, and change their colors using the system color editor. It's in the menu under Tools... Structure Analysis. Choose attributes of "atoms", attribute "bfactor"
See Render by Attribute help for details: <https://rbvi.ucsf.edu/chimerax/docs/user/tools/render.html>
Then when you apply the Render by Attribute coloring it will show the corresponding command in the Log. If you wanted to script it, that is an easy way of finding out the command.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 30, 2023, at 5:34 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users !
I am using ChimeraX to color pdb file according to its structural flexibility determined in the b-factor column
color byattribute bfactor palette rainbow range 2,100
This info is taken directly from the rmsf calculations of short MD trajectory and stored in a single pdb structure in the b-factor column.
Technically It works very well, however in the case of flexible systems, the most of the structures is colored in "red". I enclose a screenshot of an example image along with the corresponded rmsf chart.
Would it be possible to define the gradient of the coloring in more accurate fashion in order that the red zones could have more shades ?
I believe this could be fine-tuned via the "range 2, 100 " attribute and / or switching to other palettes e.g. 'Paired-12' , which naturally has more shades compared to 'rainbow' ..
I would be grateful for any further suggestions !
Yours with thanks,
Enrico

You do not need to include specific values if you just want to spread the colors evenly across the range. In that case, you can define the palette with a list of colors only, as described in the coloring palette options help: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options> The examples in my previous message used the value,color approach since from your question it sounded like you wanted precise control, such as uneven spacing of the colors across the range. Although there is no residue-average option, if you color by an atomic attribute such as bfactor, the cartoon (ribbon) color will be for the average of atoms per residue. This is mentioned in the "color byattribute" help: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute> "If an atom attribute is used, cartoons are colored by the average value of the atoms in each residue." - and - "If no range for colormapping is specified, the full range over all specified atoms is used for atom coloring and the full range of per-residue averages (over that same set of atoms) is used for cartoon coloring." I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 31, 2023, at 7:25 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !
I actually forgot two very useful options for color byattribute range full and/ or ave residues # ??
it seems to me that with it we do not need to indicate the range values at all ..
Enrico
Il giorno mer 30 ago 2023 alle ore 19:00 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Hello, You can use as many color,value pairs as you want by specifying them directly in the command. You don't need to use one of the pre-defined palette names. See the color command palette options and ways of specifying colors:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html>
For example:
color byattribute bfactor palette "2.5,cornflower blue:10.3,gold:80.8,red" color byattribute bfactor palette 2.5,#b22222:5.9,#dc143c:15,#ff0000:25.3,#ffff00:46,#adff2f
(where the top palette is enclosed in quotation marks because it contains a space)
Or use the graphical interface of Render by Attribute (available in version 1.6) where you can add as many control points as you like, move them on the histogram, and change their colors using the system color editor. It's in the menu under Tools... Structure Analysis. Choose attributes of "atoms", attribute "bfactor"
See Render by Attribute help for details: <https://rbvi.ucsf.edu/chimerax/docs/user/tools/render.html>
Then when you apply the Render by Attribute coloring it will show the corresponding command in the Log. If you wanted to script it, that is an easy way of finding out the command.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 30, 2023, at 5:34 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users !
I am using ChimeraX to color pdb file according to its structural flexibility determined in the b-factor column
color byattribute bfactor palette rainbow range 2,100
This info is taken directly from the rmsf calculations of short MD trajectory and stored in a single pdb structure in the b-factor column.
Technically It works very well, however in the case of flexible systems, the most of the structures is colored in "red". I enclose a screenshot of an example image along with the corresponded rmsf chart.
Would it be possible to define the gradient of the coloring in more accurate fashion in order that the red zones could have more shades ?
I believe this could be fine-tuned via the "range 2, 100 " attribute and / or switching to other palettes e.g. 'Paired-12' , which naturally has more shades compared to 'rainbow' ..
I would be grateful for any further suggestions !
Yours with thanks,
Enrico

I gotcha, thank you very much Elaine ! All the best Enrico Il giorno gio 31 ago 2023 alle ore 18:08 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
You do not need to include specific values if you just want to spread the colors evenly across the range. In that case, you can define the palette with a list of colors only, as described in the coloring palette options help: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options>
The examples in my previous message used the value,color approach since from your question it sounded like you wanted precise control, such as uneven spacing of the colors across the range.
Although there is no residue-average option, if you color by an atomic attribute such as bfactor, the cartoon (ribbon) color will be for the average of atoms per residue. This is mentioned in the "color byattribute" help: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute>
"If an atom attribute is used, cartoons are colored by the average value of the atoms in each residue." - and - "If no range for colormapping is specified, the full range over all specified atoms is used for atom coloring and the full range of per-residue averages (over that same set of atoms) is used for cartoon coloring."
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 31, 2023, at 7:25 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !
I actually forgot two very useful options for color byattribute range full and/ or ave residues # ??
it seems to me that with it we do not need to indicate the range values at all ..
Enrico
Il giorno mer 30 ago 2023 alle ore 19:00 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Hello, You can use as many color,value pairs as you want by specifying them directly in the command. You don't need to use one of the pre-defined palette names. See the color command palette options and ways of specifying colors:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html>
For example:
color byattribute bfactor palette "2.5,cornflower blue:10.3,gold:80.8,red" color byattribute bfactor palette 2.5,#b22222:5.9,#dc143c:15,#ff0000:25.3,#ffff00:46,#adff2f
(where the top palette is enclosed in quotation marks because it contains a space)
Or use the graphical interface of Render by Attribute (available in version 1.6) where you can add as many control points as you like, move them on the histogram, and change their colors using the system color editor. It's in the menu under Tools... Structure Analysis. Choose attributes of "atoms", attribute "bfactor"
See Render by Attribute help for details: <https://rbvi.ucsf.edu/chimerax/docs/user/tools/render.html>
Then when you apply the Render by Attribute coloring it will show the corresponding command in the Log. If you wanted to script it, that is an easy way of finding out the command.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 30, 2023, at 5:34 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users !
I am using ChimeraX to color pdb file according to its structural flexibility determined in the b-factor column
color byattribute bfactor palette rainbow range 2,100
This info is taken directly from the rmsf calculations of short MD trajectory and stored in a single pdb structure in the b-factor column.
Technically It works very well, however in the case of flexible systems, the most of the structures is colored in "red". I enclose a screenshot of an example image along with the corresponded rmsf chart.
Would it be possible to define the gradient of the coloring in more accurate fashion in order that the red zones could have more shades ?
I believe this could be fine-tuned via the "range 2, 100 " attribute and / or switching to other palettes e.g. 'Paired-12' , which naturally has more shades compared to 'rainbow' ..
I would be grateful for any further suggestions !
Yours with thanks,
Enrico
participants (2)
-
Elaine Meng
-
Enrico Martinez