Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#2736 closed defect (fixed)

all-same-value attribute coloring yields black instead of 'mid' color

Reported by: Tristan Croll Owned by: Tom Goddard
Priority: normal Milestone:
Component: Depiction Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.9.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 0.91 (2019-12-23)
Description
`color byattr` yields a jet-black model when all the attribute values are equal. Effectively invisible on the default background.

Log:
UCSF ChimeraX version: 0.91 (2019-12-23)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 3io0

3io0 title:  
Crystal structure of EtuB from Clostridium kluyveri [more info...]  
  
Chain information for 3io0 #1  
---  
Chain | Description  
A | EtuB protein  
  
3io0 mmCIF Assemblies  
---  
1| author_and_software_defined_assembly  
  
  

> color byattribute occupancy #1

1658 atoms, 230 residues, atom occupancy range 1 to 1  




OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (7)

comment:1 by pett, 6 years ago

Component: UnassignedDepiction
Owner: set to pett
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionall-same-value attribute coloring yields black instead of 'mid' color

comment:2 by pett, 5 years ago

Cc: pett added
Owner: changed from pett to Tom Goddard
Status: acceptedassigned

The problem is that std_commands.color._value_colors returns all black (which isn't even in the palette) when the values are all the same. Under the hood it calls into colormap-processing routines in chimerax.surface. I believe those routines would need to be enhanced to handle this situation.

comment:3 by Tom Goddard, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Color byattribute uses a red/white/blue colormap with all 3 values assigned data value 1 since no range is specified and all occupancy values are 1. You would probably want to specify "range 0,1" in this case. But if you don't I agree you should get red, white, or blue and not black. So now it gives blue. I don't think any one of the colors is more correct in this degenerate situation. Color by attribute could easily see the range has just one value and do something different, but I'm not sure what.

comment:4 by pett, 5 years ago

Did the changes get pushed? I'm not seeing any changes in std_commands/color.py or surface/colorvol.py and after re-installing std_commands and surface I still get black coloring.

in reply to:  5 ; comment:5 by goddard@…, 5 years ago

Change is in the map bundle where the colormap interpolation C++ code lives.

comment:6 by pett, 5 years ago

Tweaking std_commands/color.py to show the middle color of the range.

comment:7 by pett, 5 years ago

TweakingTweaked

Note: See TracTickets for help on using tickets.