Opened 8 years ago
Closed 7 years ago
#937 closed enhancement (fixed)
Allow color command to color by atom properties
| Reported by: | Tristan Croll | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Graphics | Version: | |
| Keywords: | Cc: | Eric Pettersen | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
Something I've been missing having available in ChimeraX... I've made a few edits to core/commands/color.py to add the ability to color by atomic properties (bfactors or occupancies). For example:
color #1 byproperty bfactors range 40,90
will color atoms and ribbon on a blue-white-red color scale - atoms by their individual B-factors, ribbons by the average B-factor of each residue. Leaving out the range argument will set the scale for both atoms and ribbons to the (min,max) of the atomic B-factors. Palette and target arguments (for atoms or ribbons) are respected. Not sure if it really makes sense to support the surface target...
Attachments (1)
Change History (5)
by , 8 years ago
comment:1 by , 8 years ago
comment:3 by , 8 years ago
For the record, I did find a bug in what I sent: hadn’t realised that the palette argument is already a Colormap, not just the name of one. Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY
follow-up: 3 comment:4 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
"color byattribute" implemented awhile back now
Thanks! I was forced to demo coloring by property in Chimera instead of ChimeraX to a class yesterday because it is not in ChimeraX. I considered adding it to ChimeraX but decided it was more work than I had time for. I don't think I can put this in unless it works in all the expected ways, like coloring molecular surfaces by the associated atoms. But when I get time to add a more complete version (so that I won't be getting bug reports) your code will be a good starting point.