﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
679	Crash tab completing pseudobonds collection methods in Python shell	tic20@…	Eric Pettersen	"open 3loh

# In shell
p = session.models.list()[1]  # Pseudobond group
pb = p.pseudobonds
pb.<tab>

crashes because tab completion attempts to get the Pseudobonds._ses_ids  property which causes the crash.

Tristan's report of this follows:

Begin forwarded message:

From: Tristan Croll <>
Subject: Pseudobonds question (and crash)
Date: May 18, 2017 at 1:32:07 AM PDT
To: Tom Goddard 

Hi Tom,

Apologies for sending the below crash info directly to you rather than through the ticket system, but the server is playing up. Apparently plato wants me to update my password, but its password server is offline so I can't. Upshot is that I can't log in to the Wiki right now.

Anyway, I'm working through the list of different restraints / scripted manipulations I want to add to ISOLDE (from an MD perspective, the code needed to restrain a segment to a specific location or conformation is exactly the same as the code needed to drive it there in the first place). I have working restraints to force/maintain secondary structures, force/maintain specific rotamers, restrain distances between key atoms, and restrain individual atoms to (x,y,z) points. All pretty fun to work work with, but now I want to include visualisations of the distance/xyz restraints in particular (to make it easier for the user to keep track of what's actually being restrained, for a start). Pseudobonds seem like they should be a neat fit for this job, and implementing them for atom-atom distance restraints should be very straightforward. But, it would be nice to also be able to use them for visualising restraints to arbitrary spatial points - but a Pseudobond from an atom to an arbitrary xyz point doesn't seem to be possible right now. I could of course fudge it by creating dummy Atom objects to sit at the target points, but I'm wondering how hard it would be to add the (atom - fixed coordinate) option to the Pseudobond class?

While trying to look into the architecture of Pseudobonds, I ran into the crash below. Looks fairly similar to the bug from the other day when querying an empty AtomicStructure.

Thanks,

Tristan

(loaded model 3loh)

pseudbondgroup = session.models.list()[-1]
pseudobonds = pseudobondgroup.pseudobonds
pseudobonds.<tab>

Thread 0x00007f918d421700 (most recent call first):
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/zmq/utils/garbage.py"", line 47 in run
 File ""/home/tic20/apps/chimerax/lib/python3.6/threading.py"", line 916 in _bootstrap_inner
 File ""/home/tic20/apps/chimerax/lib/python3.6/threading.py"", line 884 in _bootstrap

Thread 0x00007f918dc22700 (most recent call first):
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/iostream.py"", line 207 in _really_send
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/iostream.py"", line 199 in <lambda>
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/iostream.py"", line 105 in _handle_event
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/tornado/stack_context.py"", line 277 in null_wrapper
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py"", line 414 in _run_callback
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py"", line 472 in _handle_recv
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/zmq/eventloop/zmqstream.py"", line 440 in _handle_events
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/tornado/stack_context.py"", line 277 in null_wrapper
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/tornado/ioloop.py"", line 888 in start
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/zmq/eventloop/ioloop.py"", line 177 in start
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/iostream.py"", line 72 in _thread_main
 File ""/home/tic20/apps/chimerax/lib/python3.6/threading.py"", line 864 in run
 File ""/home/tic20/apps/chimerax/lib/python3.6/threading.py"", line 916 in _bootstrap_inner
 File ""/home/tic20/apps/chimerax/lib/python3.6/threading.py"", line 884 in _bootstrap

Current thread 0x00007f9275397740 (most recent call first):
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/atomic/molc.py"", line 126 in get_prop
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/evaluate/compiled/__init__.py"", line 328 in get
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/cache.py"", line 121 in wrapper
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/evaluate/compiled/__init__.py"", line 345 in values
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/api/completion.py"", line 210 in _trailer_completions
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/api/completion.py"", line 169 in _get_context_completions
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/api/completion.py"", line 96 in completions
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/jedi/api/__init__.py"", line 179 in completions
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/IPython/core/completer.py"", line 1231 in _jedi_matches
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/IPython/core/completer.py"", line 1839 in _complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/IPython/core/completer.py"", line 1774 in complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/IPython/core/interactiveshell.py"", line 1958 in complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/ipkernel.py"", line 257 in do_complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/kernelbase.py"", line 434 in complete_request
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/kernelbase.py"", line 235 in dispatch_shell
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/inprocess/client.py"", line 170 in _dispatch_to_kernel
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ipykernel/inprocess/client.py"", line 110 in complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/qtconsole/frontend_widget.py"", line 774 in _complete
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/qtconsole/frontend_widget.py"", line 325 in _tab_pressed
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/qtconsole/console_widget.py"", line 1320 in _event_filter_console_keypress
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/qtconsole/frontend_widget.py"", line 381 in _event_filter_console_keypress
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/qtconsole/console_widget.py"", line 412 in eventFilter
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/ui/gui.py"", line 167 in event_loop
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ChimeraX_main.py"", line 572 in init
 File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/ChimeraX_main.py"", line 663 in <module>
 File ""/home/tic20/apps/chimerax/lib/python3.6/runpy.py"", line 85 in _run_code
 File ""/home/tic20/apps/chimerax/lib/python3.6/runpy.py"", line 193 in _run_module_as_main

"	defect	closed	major		Core		fixed		goddard@…				all	ChimeraX
