Skip to content

Commit

Permalink
Changing so the AACycler and Fetch Full Context use the pymol Tcl thread
Browse files Browse the repository at this point in the history
instead of trying to spawn their own.
  • Loading branch information
Brett T. Hannigan committed Sep 26, 2013
1 parent da6364d commit eed6b18
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,9 @@ def get_panel(self):
[ 2, 'Clear Results', 'cmd.get_wizard().delete_results()'],
[ 2, 'Clear Selection','cmd.get_wizard().clear_selection()'],
[ 2, 'Clear Saved', 'cmd.get_wizard().delete_saved()'],
#[ 2, 'Fetch Full Contexts','cmd.get_wizard().fetch_full_context()'],
[ 2, 'Fetch Full Contexts','pymol._ext_gui.execute("import pymol; pymol.stored.aacycler()")'],
[ 2, 'Fetch Full Contexts','import pymol; pymol._ext_gui.execute("import pymol; pymol.stored.fetch_full_context()")'],
[ 2, 'Clear Contexts','cmd.get_wizard().delete_full()'],
[ 2, 'Cycle Amino Acids','cmd.get_wizard().cycle_amino_acids()'],
[ 2, 'Cycle Amino Acids','import pymol; pymol._ext_gui.execute("import pymol; pymol.stored.aacycler()")'],
[ 2, 'Done','cmd.set_wizard()'] ]

def fetch_full_context(self):
Expand Down Expand Up @@ -634,17 +633,6 @@ def delete_saved(self):
def delete_full(self):
self.cmd.delete('*_' + CONTEXT_SUFFIX)

def cycle_amino_acids(self):
'''This method will create a gui which allows the user to cycle through
various amino acids from the search results.'''
# If we just create the AACycler here, there can be a conflict
# with creating the TopLevel gui object. I think it has something
# to do with a threading issue and the other Tcl thread that is involved
# with the PyMol GUI. So instead, we tell PyMol about the AACycler
# function call, and then ask the main PyMol GUI to execute that object.
import pymol
pymol._ext_gui.execute('import pymol; pymol.stored.aacycler()')

def launch_search(self):
pdbstr = self.cmd.get_pdbstr(SELECTION_NAME)
self.stop_search()
Expand Down

0 comments on commit eed6b18

Please sign in to comment.