Re: [chimerax-users] [Chimera-users] Coloring model by b-factor

Dear Yang, I guess you are using ChimeraX (not Chimera) -- the commands are somewhat different between the two programs. There is also different address for asking ChimeraX questions that you might want to use in the future: chimerax-users@cgl.ucsf.edu (CC'd here). As far as I can tell, your ChimeraX command is correct. I'm not sure why you said it was not working. Maybe it is because the Log will still tell you the whole range in the structure. However, the coloring range (different than the value range) will be what you specified in the command. For example, if I open 2gbp and use color by bfactor #4/A palette red:green:blue range 35,45 It works correctly. Although the Log says: 2575 atoms, 525 residues, atom bfactor range 2 to 63.9 ... that is just telling you the values in the structure are 2 to 63.9. The red-blue-green coloring, however, is spread from 35-45 and everything below 35 is red and everything above 45 is blue. <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 7, 2022, at 1:48 PM, 师扬 via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear developer,
I am trying to color a model by b-facor and used the command like : color by bfactor #4/A palette red:green:blue range 35,45. However, the range setting was not working. So my question is how to color with a user-defined palette and a user-defined range.
Best wishes, Yang

Minor correction, actually I used the following since the model was #1, not #4: open 2gbp hide ribbons show atoms color by bfactor /A palette red:green:blue range 35,45 If you meant that you wanted to ONLY color the atoms/residues with bfactor 35-45, then you need something fancier. For example, to make everything white first: color white ...then color only the atoms with bfactor 35-45: color by bfactor /A & @@bfactor>=35 & @@bfactor<=45 palette red:green:blue range 35,45 - OR - select /A & @@bfactor>=35 & @@bfactor<=45 color by bfactor sel palette red:green:blue range 35,45 The "range" is only defining how the palette colors are spread, not what actually gets colored. The atom-spec defines what actually gets colored. How to include attribute values in atom-specs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#attributes> I hope this helps, Elaine
On Jul 7, 2022, at 2:18 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Yang, I guess you are using ChimeraX (not Chimera) -- the commands are somewhat different between the two programs. There is also different address for asking ChimeraX questions that you might want to use in the future: chimerax-users@cgl.ucsf.edu (CC'd here).
As far as I can tell, your ChimeraX command is correct. I'm not sure why you said it was not working. Maybe it is because the Log will still tell you the whole range in the structure. However, the coloring range (different than the value range) will be what you specified in the command.
For example, if I open 2gbp and use
color by bfactor #4/A palette red:green:blue range 35,45
It works correctly. Although the Log says: 2575 atoms, 525 residues, atom bfactor range 2 to 63.9
... that is just telling you the values in the structure are 2 to 63.9. The red-blue-green coloring, however, is spread from 35-45 and everything below 35 is red and everything above 45 is blue.
<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 7, 2022, at 1:48 PM, 师扬 via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear developer,
I am trying to color a model by b-facor and used the command like : color by bfactor #4/A palette red:green:blue range 35,45. However, the range setting was not working. So my question is how to color with a user-defined palette and a user-defined range.
Best wishes, Yang
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

Dear Elaine, Many thanks for your kind replies. You first email already answered my question. I was confused by the log. I thought the structure was colored by the range showing there. I will write to the right mailing-list next time. Thanks for pointing it out. Best wishes, Yang At 2022-07-08 07:04:02, "Elaine Meng" <meng@cgl.ucsf.edu> wrote:
Minor correction, actually I used the following since the model was #1, not #4:
open 2gbp hide ribbons show atoms color by bfactor /A palette red:green:blue range 35,45
If you meant that you wanted to ONLY color the atoms/residues with bfactor 35-45, then you need something fancier. For example, to make everything white first:
color white
...then color only the atoms with bfactor 35-45:
color by bfactor /A & @@bfactor>=35 & @@bfactor<=45 palette red:green:blue range 35,45
- OR -
select /A & @@bfactor>=35 & @@bfactor<=45 color by bfactor sel palette red:green:blue range 35,45
The "range" is only defining how the palette colors are spread, not what actually gets colored. The atom-spec defines what actually gets colored. How to include attribute values in atom-specs: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#attributes>
I hope this helps, Elaine
On Jul 7, 2022, at 2:18 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Yang, I guess you are using ChimeraX (not Chimera) -- the commands are somewhat different between the two programs. There is also different address for asking ChimeraX questions that you might want to use in the future: chimerax-users@cgl.ucsf.edu (CC'd here).
As far as I can tell, your ChimeraX command is correct. I'm not sure why you said it was not working. Maybe it is because the Log will still tell you the whole range in the structure. However, the coloring range (different than the value range) will be what you specified in the command.
For example, if I open 2gbp and use
color by bfactor #4/A palette red:green:blue range 35,45
It works correctly. Although the Log says: 2575 atoms, 525 residues, atom bfactor range 2 to 63.9
... that is just telling you the values in the structure are 2 to 63.9. The red-blue-green coloring, however, is spread from 35-45 and everything below 35 is red and everything above 45 is blue.
<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 7, 2022, at 1:48 PM, 师扬 via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Dear developer,
I am trying to color a model by b-facor and used the command like : color by bfactor #4/A palette red:green:blue range 35,45. However, the range setting was not working. So my question is how to color with a user-defined palette and a user-defined range.
Best wishes, Yang
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (2)
-
Elaine Meng
-
师扬