Opened 7 years ago
Closed 7 years ago
#1297 closed defect (fixed)
Handle tinyarray in session save/restore
| Reported by: | Owned by: | Greg Couch | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Sessions | Version: | |
| Keywords: | Cc: | Eric Pettersen | |
| 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-11) Description Using the zone mouse mode and saving session causes an error and session is not saved. Caused by View center of rotation set to a tinyarray which is not handled by session saving. Need session saving to handle tinyarray values. Currently trying to save a tinyarray in a session raises an error and session saving fails, and it is difficult to figure out where the tinyarray comes from. Log: UCSF ChimeraX version: 0.8 (2018-09-11) How to cite UCSF ChimeraX open 1a0m format mmCIF fromDatabase pdb ↵ 1a0m title: 1.1 angstrom crystal structure of A-conotoxin [TYR15]-epi [more info...;] Chain information for 1a0m #1 --- Chain | Description A B | α-conotoxin [TYR15]-epi ui mousemode rightMode zone ↵ save test.cxs ↵ Session file format is not finalized, and thus might not be restorable in other versions of ChimeraX. Traceback (most recent call last): File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/cmd_line/tool.py", line 205, in execute cmd.run(cmd_text) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/cli.py", line 2561, in run result = ci.function(session, **kw_args) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/save.py", line 61, in save fmt.export(session, filename, fmt.nicknames[0], **kw) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/io.py", line 198, in export result = self.export_func(session, path, **kw) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 717, in save session.save(output, version=version) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 490, in save mgr.discovery(self._state_containers) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 234, in discovery self.processed[key] = self.process(obj) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 265, in process return copy_state(data, convert=self._add_obj) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/state.py", line 172, in copy_state return _copy(data) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/state.py", line 159, in _copy items = [(_copy(k), _copy(v)) for k, v in data.items()] File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/state.py", line 159, in <listcomp> items = [(_copy(k), _copy(v)) for k, v in data.items()] File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/state.py", line 170, in _copy return convert(data) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 240, in _add_obj uid = _UniqueName.from_obj(self.session, obj) File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 128, in from_obj obj_cls.__module__, obj_cls.__name__)) RuntimeError: No bundle information for tinyarray.ndarray_float RuntimeError: No bundle information for tinyarray.ndarray_float File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/session.py", line 128, in from_obj obj_cls.__module__, obj_cls.__name__)) See log for complete Python traceback. OpenGL version: 4.1 NVIDIA-10.32.0 355.11.10.10.40.102 OpenGL renderer: NVIDIA GeForce GTX 680MX OpenGL Engine OpenGL vendor: NVIDIA Corporation
Change History (2)
comment:1 by , 7 years ago
| Cc: | added |
|---|---|
| Component: | Unassigned → Sessions |
| Owner: | set to |
| Platform: | → all |
| Project: | → ChimeraX |
| Status: | new → assigned |
| Summary: | ChimeraX bug report submission → Handle tinyarray in session save/restore |
comment:2 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Added support for tinyarray.ndarray_float, .ndarray_int, and .ndarray_complex.
Note:
See TracTickets
for help on using tickets.
Since atom coordinates use tinyarray these values are likely to get into session saving state of lots of tools. They need to be saved and restored like numpy arrays.