﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
367	Error after deleting all atoms	Tom Goddard	Eric Pettersen	"Deleting all atoms causes the C++ code to delete the AtomicStructure, but the Python code never finds out so the model is not closed and errors ensue as shown in the traceback below hovering the mouse over the dead model.

Probably the Python code should control the lifetime of the C++ objects so the Python can clean everything up before the C++ data structures are deleted.  Deleting all atoms should not cause the AtomicStructure to delete itself.  Instead the delete command should check the models that atoms were deleted from and close them if they have no atoms, likewise the delete command should check for empty residues and delete them.



Traceback (most recent call last):
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/graphics.py"", line 344, in _redraw_timer_callback
or self.mouse_modes.mouse_pause_tracking()
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/mousemodes.py"", line 512, in mouse_pause_tracking
self._mouse_pause()
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/mousemodes.py"", line 598, in _mouse_pause
m.pause(self._mouse_pause_position)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/ui/mousemodes.py"", line 929, in pause
p = self.view.first_intercept(x,y)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/graphics/view.py"", line 690, in first_intercept
p = self.drawing.first_intercept(xyz1, xyz2, exclude='is_outline_box')
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/graphics/drawing.py"", line 761, in first_intercept
p = self.first_intercept_children(self.child_drawings(), mxyz1, mxyz2, exclude)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/graphics/drawing.py"", line 777, in first_intercept_children
p = d.first_intercept(cxyz1, cxyz2, exclude)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/atomic/structure.py"", line 938, in first_intercept
pb = self._bond_first_intercept(xyz1, xyz2)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/atomic/structure.py"", line 986, in _bond_first_intercept
b,f = _bond_intercept(self.bonds, mxyz1, mxyz2)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/atomic/molc.py"", line 83, in get_prop
vcount = getattr(self, value_count)
File ""/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/chimerax/core/atomic/molc.py"", line 25, in get_prop
cget(self._c_pointer_ref, 1, v_ref)
AttributeError: 'AtomicStructure' object has no attribute '_c_pointer_ref'
"	defect	closed	major		Structure Editing		fixed		meng@…				all	ChimeraX
