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)

color.py (22.3 KB ) - added by Tristan Croll 8 years ago.

Download all attachments as: .zip

Change History (5)

by Tristan Croll, 8 years ago

Attachment: color.py added

comment:1 by Tom Goddard, 8 years ago

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.

comment:2 by Tom Goddard, 8 years ago

Cc: Eric Pettersen added

Eric may be the one to add attribute coloring in the future.

in reply to:  4 comment:3 by tic20@…, 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
 

 


comment:4 by Eric Pettersen, 7 years ago

Resolution: fixed
Status: assignedclosed

"color byattribute" implemented awhile back now

Note: See TracTickets for help on using tickets.