Opened 7 years ago

Closed 7 years ago

#1291 closed defect (fixed)

bumps command: attempt to get argmax of an empty sequence

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: normal Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-17.7.0-x86_64-i386-64bit
ChimeraX Version: 0.8 (2018-09-07)
Description
"bumps" command traceback

undoubtedly I'm twisting the purpose of this command, but the following gives a traceback as shown in the Log

open 2gbp
molmap protein 5
bumps #2 center ligand

Log:
UCSF ChimeraX version: 0.8 (2018-09-07)  
How to cite UCSF ChimeraX  

open 2gbp format mmCIF fromDatabase pdb ↵

2gbp title:  
Sugar and signal-transducer binding sites of the escherichia coli galactose
chemoreceptor protein [more&nbspinfo...;]  
  
Chain information for 2gbp #1  
---  
Chain | Description  
A | D-galactose/D-glucose binding protein  
  
  

molmap protein 5 ↵

bumps #2 ligand

Expected a keyword  

bumps #2 center ligand ↵

Found 0 bumps, minimum height 1, base area 10  
Error processing trigger "frame drawn"  
Traceback (most recent call last):  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/core/triggerset.py", line 126, in invoke  
return self._func(self._name, data)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/model_panel/tool.py", line 139, in _fill_tree  
model_id, model_id_string, bg_color, display, name, selected, part_selected =
self._get_info(model)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/model_panel/tool.py", line 204, in _get_info  
bg_color = self._model_color(obj)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/model_panel/tool.py", line 227, in _model_color  
return model.single_color  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/atomic/structure.py", line 260, in _get_single_color  
return most_common_color(atoms.colors)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/core/colors.py", line 727, in most_common_color  
max_index = argmax(counts)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/numpy/core/fromnumeric.py", line 1004, in argmax  
return _wrapfunc(a, 'argmax', axis=axis, out=out)  
File
"/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc  
return getattr(obj, method)(*args, **kwds)  
ValueError: attempt to get argmax of an empty sequence  

toolshed show "Bug Reporter" ↵




OpenGL version: 4.1 NVIDIA-10.32.0 355.11.10.10.40.102
OpenGL renderer: NVIDIA GeForce GTX 675MX OpenGL Engine
OpenGL vendor: NVIDIA Corporation

Change History (4)

comment:1 by Elaine Meng, 7 years ago

Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned

PS in daily build this did not show Bug Reporter automatically. I had to go to the Tools menu to get it.

comment:2 by Eric Pettersen, 7 years ago

Component: UnassignedVolume Data
Summary: ChimeraX bug report submissionbumps command: attempt to get argmax of an empty sequence

comment:3 by Tom Goddard, 7 years ago

This is from running bumps when there are 0 bumps. Code needs a fix to catch this case and not give an error.

comment:4 by Tom Goddard, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Bumps made a structure with no atoms since there were no bumps, and the Structure code actually through the error when Model Panel asked for its color because the single_color method did not handle the case of no atoms.

Note: See TracTickets for help on using tickets.