Opened 6 years ago

Closed 6 years ago

#2875 closed defect (fixed)

ISOLDE imports obsolete MainToolWindow from core.ui

Reported by: goddard@… Owned by: Tristan Croll
Priority: normal Milestone:
Component: Structure Editing Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 0.92 (2020-02-22)
Description
ISOLDEneeds to import MainToolWindow from chimerax.ui not chimerax.core.ui

It  is using in its tool.py

from chimerax.core.ui.gui import MainToolWindow

The ui module has not been in core for over a year I think, and some import hack is making this import from core.ui work.  Unfortunately it makes the ISOLDE tool window not look like a tool window

from chimerax.ui.gui import ToolWindow
isinstance(isolde_tool_win, ToolWindow) -> False

because MainToolWindow from chimerax.core.ui is not the same as MainToolWindow from chimerax.ui.  This makes the VR fail.

Log:
UCSF ChimeraX version: 0.92 (2020-02-22)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 2q6g format mmCIF fromDatabase pdb

2q6g title:  
Crystal structure of SARS-CoV main protease H41A mutant in complex with an
N-terminal substrate [more info...]  
  
Chain information for 2q6g #1  
---  
Chain | Description  
A B | severe acute respiratory syndrome coronavirus (SARS-CoV)  
C D | Polypeptide chain  
  
  

> toolshed show ISOLDE

> set selectionWidth 4

2q6g title:  
Crystal structure of SARS-CoV main protease H41A mutant in complex with an
N-terminal substrate [more info...]  
  
Chain information for 2q6g  
---  
Chain | Description  
1.1/A 1.1/B | severe acute respiratory syndrome coronavirus (SARS-CoV)  
1.1/C 1.1/D | Polypeptide chain  
  
Forcefield cache not found or out of date. Regenerating from ffXML files. This
is normal if running ISOLDE for the first time, or after upgrading OpenMM.  
Done loading forcefield  

> vr true

started SteamVR rendering  
Traceback (most recent call last):  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\core\triggerset.py", line 130, in invoke  
return self._func(self._name, data)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 692, in next_frame  
self.process_controller_events()  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 720, in process_controller_events  
self.process_controller_buttons()  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 747, in process_controller_buttons  
hc.process_event(e)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 2528, in process_event  
self._dispatch_event(m, event)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 2532, in _dispatch_event  
mode.pressed(hand_event)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 3162, in pressed  
ui.display_ui(hand_event.hand_controller.room_position, c.room_position)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1769, in display_ui  
self.show(p, parent)  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1362, in show  
self._panels = self._create_panels()  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1395, in _create_panels  
for tw in tool_wins]  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1395, in <listcomp>  
for tw in tool_wins]  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1796, in __init__  
self._size = (pixel_size*w, pixel_size*h) # Billboard width, height in room
coords, meters.  
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'  
  
Error processing trigger "new frame":  
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'  
  
File "C:\Program Files\ChimeraX-Feb-22-2020\bin\lib\site-
packages\chimerax\vive\vr.py", line 1796, in __init__  
self._size = (pixel_size*w, pixel_size*h) # Billboard width, height in room
coords, meters.  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 398.35
OpenGL renderer: GeForce GTX 1070 with Max-Q Design/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (4)

comment:1 by Tom Goddard, 6 years ago

Cc: pett added
Component: UnassignedStructure Editing
Owner: set to Tristan Croll
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionISOLDE imports obsolete MainToolWindow from core.ui

in reply to:  2 ; comment:2 by Tristan Croll, 6 years ago

Thanks for the catch. Will fix once I’m back in Cambridge.
 

 


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

Ok, not urgent.  I put a work-around in the VR code so I can demo ISOLDE in VR.  I've used ISOLDE in VR many times but some recent VR code changes starting looking at whether a panel was a ToolWindow or plain Qt widget and went belly up when it found the ISOLDE gui was neither.


comment:4 by Tristan Croll, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed. Will be in the next build (an "official" ISOLDE release to go with ChimeraX 0.92).

Note: See TracTickets for help on using tickets.