def __init__(self, session): tkutil.Settings_Dialog.__init__(self, session.tk, 'Peak List Settings') fb = Tkinter.Frame(self.top, borderwidth=3, relief='groove') fb.pack(side='top', fill='x') # # Create the checkbutton and extra widgets for each possible field # self.field_widgets = {} for fc in field_classes: self.field_widgets[fc] = fc.field_widgets(self.top, fc.name) opt = Tkinter.Frame(self.top, borderwidth=3, relief='groove') opt.pack(side='top', fill='x') cb = tkutil.checkbutton(opt, 'Sort by assignment?', 1) self.assignmentsort = cb.variable cb.button.pack(side='top', anchor='w') cb = tkutil.checkbutton(opt, 'Pair crossdiagonal peaks?', 0) self.crosspair = cb.variable cb.button.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ) br.frame.pack(side='top', anchor='w')
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Pick Atoms') cb = tkutil.checkbutton(self.top, 'Show atom labels?', 0) self.show_label = cb.variable cb.button.pack(side='top', anchor='w') cb = tkutil.checkbutton(self.top, 'Show distances?', 0) self.show_distance = cb.variable cb.button.pack(side='top', anchor='w') cb = tkutil.checkbutton(self.top, 'Show peaks?', 0) self.show_peak = cb.variable cb.button.pack(side='top', anchor='w') cb = tkutil.checkbutton(self.top, 'Show assigned atoms?', 0) self.show_assigned = cb.variable cb.button.pack(side='top', anchor='w') cb.add_callback(pyutil.precompose(color_assigned_atoms, session)) self.status_line = Tkinter.Label(self.top, anchor='nw') self.status_line.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'MidasPick')), ) br.frame.pack(side='top', anchor='w') self.pick_cb = self.atom_pick_cb midas.process(self.session).add_atom_pick_callback(self.pick_cb)
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'View Constraints') self.pdb_file = tkutil.file_field(self.top, 'PDB File: ', 'pdb') self.pdb_file.frame.pack(side = 'top', anchor = 'w') self.mardi_file = tkutil.file_field(self.top, 'Mardigras Constraint File: ', 'mardigras') self.mardi_file.frame.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Show satisfied constraints?', 0) self.satisfied = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Show violated constraints?', 1) self.violated = cb.variable cb.button.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Show', self.show_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'MidasConstraints')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): tkutil.Settings_Dialog.__init__(self, session.tk, 'Peak List Settings') fb = Tkinter.Frame(self.top, borderwidth = 3, relief = 'groove') fb.pack(side = 'top', fill = 'x') # # Create the checkbutton and extra widgets for each possible field # self.field_widgets = {} for fc in field_classes: self.field_widgets[fc] = fc.field_widgets(self.top, fc.name) opt = Tkinter.Frame(self.top, borderwidth = 3, relief = 'groove') opt.pack(side = 'top', fill = 'x') cb = tkutil.checkbutton(opt, 'Sort by assignment?', 1) self.assignmentsort = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(opt, 'Pair crossdiagonal peaks?', 0) self.crosspair = cb.variable cb.button.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Pick Atoms') cb = tkutil.checkbutton(self.top, 'Show atom labels?', 0) self.show_label = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Show distances?', 0) self.show_distance = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Show peaks?', 0) self.show_peak = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Show assigned atoms?', 0) self.show_assigned = cb.variable cb.button.pack(side = 'top', anchor = 'w') cb.add_callback(pyutil.precompose(color_assigned_atoms, session)) self.status_line = Tkinter.Label(self.top, anchor = 'nw') self.status_line.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'MidasPick')), ) br.frame.pack(side = 'top', anchor = 'w') self.pick_cb = self.atom_pick_cb midas.process(self.session).add_atom_pick_callback(self.pick_cb)
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Peak Table') setup = Tkinter.Frame(self.top) setup.pack(side='top', anchor='w') # Choose Spectra sbutton = tkutil.checkbutton(self.top, 'Choose Spectra', 1) sbutton.button.pack(side='top', anchor='w') schoice = Tkinter.Frame(self.top) schoice.pack(side='top', anchor='w') sc = sputil.spectrum_checkbuttons(session, schoice, '') sc.frame.pack(side='top', anchor='w') self.spectrum_list = sc.chosen_spectra cb = tkutil.checkbutton(schoice, 'Noesy format?', 0) self.noesy_format = cb.variable cb.button.pack(side='top', anchor='w') sbutton.map_widget(schoice) # Peak list pl = sputil.assignment_listbox(session, self.top) pl.frame.pack(side='top', fill='both', expand=1) pl.listbox.bind('<ButtonRelease-1>', self.select_assignment_cb) pl.listbox.bind('<ButtonRelease-2>', self.goto_assignment_cb) pl.listbox.bind('<Double-ButtonRelease-1>', self.goto_assignment_cb) self.peak_list = pl progress_label = Tkinter.Label(self.top, anchor='nw') progress_label.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Update', self.update_cb), ('Save', self.peak_list.save_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'PeakTable')), ) br.frame.pack(side='top', anchor='w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Peak Table') setup = Tkinter.Frame(self.top) setup.pack(side = 'top', anchor = 'w') # Choose Spectra sbutton = tkutil.checkbutton(self.top, 'Choose Spectra', 1) sbutton.button.pack(side = 'top', anchor = 'w') schoice = Tkinter.Frame(self.top) schoice.pack(side = 'top', anchor = 'w') sc = sputil.spectrum_checkbuttons(session, schoice, '') sc.frame.pack(side = 'top', anchor = 'w') self.spectrum_list = sc.chosen_spectra cb = tkutil.checkbutton(schoice, 'Noesy format?', 0) self.noesy_format = cb.variable cb.button.pack(side = 'top', anchor = 'w') sbutton.map_widget(schoice) # Peak list pl = sputil.assignment_listbox(session, self.top) pl.frame.pack(side = 'top', fill = 'both', expand = 1) pl.listbox.bind('<ButtonRelease-1>', self.select_assignment_cb) pl.listbox.bind('<ButtonRelease-2>', self.goto_assignment_cb) pl.listbox.bind('<Double-ButtonRelease-1>', self.goto_assignment_cb) self.peak_list = pl progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Save', self.peak_list.save_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'PeakTable')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def add_spectrum(self, spectrum, table, row): if spectrum.dimension != 3: return # # Make spectrum checkbutton # cb = tkutil.checkbutton(table.frame, spectrum.name, 0) cb.button['selectcolor'] = sputil.spectrum_color(spectrum) choose_cb = pyutil.precompose(sputil.choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row = row, column = 0, sticky = 'w') table.spectrum_to_checkbutton[spectrum] = cb # # Make axis order menu. Set default xyz axis order for triple # resonance spectra to HCN. # hcn_order = pyutil.order(('1H', '13C', '15N'), spectrum.nuclei) aom = axes.axis_order_menu(table.frame, spectrum.nuclei, initial_order = hcn_order) aom.frame.grid(row = row, column = 1, sticky = 'w') table.axis_order_menu[spectrum] = aom
def __init__(self, session): self.session = session self.peak = None tkutil.Dialog.__init__(self, session.tk, 'Peak Resonance Mover') self.spectrum_menu = sputil.spectrum_menu(session, self.top, 'Spectrum: ') self.spectrum_menu.frame.pack(side='top', anchor='w') cb = tkutil.checkbutton(self.top, 'On / Off', 0) cb.button.pack(side='top', anchor='w') cb.add_callback(self.onoff_cb) self.onoff = cb self.will_drag_notice = None self.dragged_notice = None self.message = Tkinter.Label(self.top) self.message.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'ShiftRes')), ) br.frame.pack(side='top', anchor='w')
def __init__(self, session): self.session = session self.view_to_center = None self.selection_notice = None tkutil.Dialog.__init__(self, session.tk, 'View Center') explain = ('Specify a view window to be centered\n' + 'by the cm or cp commands. The cm command\n' + 'centers the view at the point under the mouse\n' 'when the command is invoked in any window.\n' + 'The cp command centers the view on the selected\n' + 'peak.') w = Tkinter.Label(self.top, text = explain, justify = 'left') w.pack(side = 'top', anchor = 'w') add_command = pythonshell.add_command add_command('cm', '', 'centerview', 'center_view_on_mouse', session) add_command('cp', '', 'centerview', 'center_view_on_peak', session) self.center_view = sputil.view_menu(session, self.top, 'View to center: ') self.center_view.frame.pack(side = 'top', anchor = 'w') ps = tkutil.checkbutton(self.top, 'Center when peak selected?', 0) ps.button.pack(side = 'top', anchor = 'w') self.peak_select = ps br = tkutil.button_row(self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'CenterViews')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): self.session = session self.peak = None tkutil.Dialog.__init__(self, session.tk, 'Peak Resonance Mover') self.spectrum_menu = sputil.spectrum_menu(session, self.top, 'Spectrum: ') self.spectrum_menu.frame.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'On / Off', 0) cb.button.pack(side = 'top', anchor = 'w') cb.add_callback(self.onoff_cb) self.onoff = cb self.will_drag_notice = None self.dragged_notice = None self.message = Tkinter.Label(self.top) self.message.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'ShiftRes')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): tkutil.Dialog.__init__(self, session.tk, 'MARDIGRAS Format') sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ') sc.frame.pack(side = 'top', anchor = 'w') self.spectrum_choice = sc pl = sputil.peak_listbox(self.top) pl.frame.pack(fill = 'both', expand = 1) pl.heading['text'] = 'Peak list' pl.listbox.bind('<ButtonRelease-1>', pl.select_peak_cb) pl.listbox.bind('<ButtonRelease-2>', pl.goto_peak_cb) pl.listbox.bind('<Double-ButtonRelease-1>', pl.goto_peak_cb) self.peak_list = pl ib = tkutil.checkbutton(self.top, 'Include unintegrated peaks?', 0) ib.button.pack(side = 'top', anchor = 'w') self.unintegrated = ib nb = tkutil.checkbutton(self.top, 'Show peak notes?', 0) nb.button.pack(side = 'top', anchor = 'w') self.note = nb eh = Tkinter.Label(self.top, text = 'Omit peak if note has a word from:') eh.pack(side = 'top', anchor = 'w') ef = tkutil.entry_field(self.top, ' ', width = 30) ef.frame.pack(side = 'top', anchor = 'w') self.note_words = ef et = Tkinter.Label(self.top, text = '(space separated list of words)') et.pack(side = 'top', anchor = 'w') progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Write Peaks', self.save_peaks_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'MardigrasFormat')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def __init__(self, session): tkutil.Dialog.__init__(self, session.tk, 'MARDIGRAS Format') sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ') sc.frame.pack(side='top', anchor='w') self.spectrum_choice = sc pl = sputil.peak_listbox(self.top) pl.frame.pack(fill='both', expand=1) pl.heading['text'] = 'Peak list' pl.listbox.bind('<ButtonRelease-1>', pl.select_peak_cb) pl.listbox.bind('<ButtonRelease-2>', pl.goto_peak_cb) pl.listbox.bind('<Double-ButtonRelease-1>', pl.goto_peak_cb) self.peak_list = pl ib = tkutil.checkbutton(self.top, 'Include unintegrated peaks?', 0) ib.button.pack(side='top', anchor='w') self.unintegrated = ib nb = tkutil.checkbutton(self.top, 'Show peak notes?', 0) nb.button.pack(side='top', anchor='w') self.note = nb eh = Tkinter.Label(self.top, text='Omit peak if note has a word from:') eh.pack(side='top', anchor='w') ef = tkutil.entry_field(self.top, ' ', width=30) ef.frame.pack(side='top', anchor='w') self.note_words = ef et = Tkinter.Label(self.top, text='(space separated list of words)') et.pack(side='top', anchor='w') progress_label = Tkinter.Label(self.top, anchor='nw') progress_label.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Update', self.update_cb), ('Write Peaks', self.save_peaks_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'MardigrasFormat')), ) br.frame.pack(side='top', anchor='w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def add_spectrum(self, spectrum, table, row): pat_name, pat_axes = expectedpeaks.recall_pattern(spectrum) # # Make spectrum checkbutton # cb = tkutil.checkbutton(table.frame, spectrum.name, 0) cb.button['selectcolor'] = sputil.spectrum_color(spectrum) choose_cb = pyutil.precompose(sputil.choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row=row, column=0, sticky='w') if pat_name: cb.set_state(1) table.spectrum_to_checkbutton[spectrum] = cb # # Make peak pattern menu # epeak_types = expectedpeaks.expected_peak_descriptions.keys() pm = tkutil.option_menu(table.frame, '', epeak_types) pm.frame.grid(row=row, column=1, sticky='w') table.spectrum_epeak_menus[spectrum] = pm # # Get default spectrum peak pattern and axis order # if pat_name == None: pat_name = expectedpeaks.default_spectrum_pattern_name(spectrum) if pat_name == None: pat_name = pm.get() pat_list = expectedpeaks.expected_peak_descriptions[pat_name] pat_nuclei = expectedpeaks.pattern_nuclei(pat_list[0]) pat_axes = pyutil.order(pat_nuclei, spectrum.nuclei) # # Make axis order menu # aom = axes.axis_order_menu(table.frame, spectrum.nuclei, initial_order=pat_axes) aom.frame.grid(row=row, column=2, sticky='w') table.axis_order_menu[spectrum] = aom # # Register a callback to limit the menu choices for axis order. # def restrict_axis_order_cb(pat_name, aom=aom): import expectedpeaks pat_list = expectedpeaks.expected_peak_descriptions[pat_name] pat_nuclei = expectedpeaks.pattern_nuclei(pat_list[0]) aom.restrict_menu_permutations(pat_nuclei) pm.add_callback(restrict_axis_order_cb) pm.set(pat_name)
def make_dialog(self): tkutil.Dialog.__init__(self, self.session.tk, 'Mirror Assignment Checker') self.top.bind('<Destroy>', self.window_destroyed_cb, 1) w = self.make_noesy_table(self.top) w.pack(side = 'top', anchor = 'w') choices = ('Selected peaks', 'Peaks with assigned mirror peak', 'Peaks without assigned mirror peak', 'Unassigned with assigned mirror', ) self.show_type = tkutil.option_menu(self.top, 'Show ', choices, choices[0]) self.show_type.frame.pack(side = 'top', anchor = 'w') cb = tkutil.checkbutton(self.top, 'Exclude mirrors with low signal/noise?', 0) cb.button.pack(side = 'top', anchor = 'w') self.exclude_mirrors = cb f = Tkinter.Frame(self.top) cb.map_widget(f) e = tkutil.entry_field(f, 'C13 / N15 intensity ratio: ', '1', 3) self.c13_n15_factor = e.variable e.frame.pack(side = 'top', anchor = 'w') e = tkutil.entry_field(f, 'Minimum mirror intensity factor: ', '.5', 3) self.min_mirror_factor = e.variable e.frame.pack(side = 'top', anchor = 'w') pl = tkutil.scrolling_list(self.top, '', 5) pl.frame.pack(side = 'top', fill = 'both', expand = 1) pl.listbox.bind('<ButtonRelease-2>', self.select_peak_or_assignment_cb) pl.listbox.bind('<ButtonRelease-1>', self.goto_peak_or_assignment_cb) self.peak_list = pl progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Strips', self.strips_cb), ('Save', self.peak_list.save_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(self.session, 'MirrorPeak')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[3]) self.settings = self.get_settings()
def add_spectrum(self, spectrum, table, row): pat_name, pat_axes = expectedpeaks.recall_pattern(spectrum) # # Make spectrum checkbutton # cb = tkutil.checkbutton(table.frame, spectrum.name, 0) cb.button['selectcolor'] = sputil.spectrum_color(spectrum) choose_cb = pyutil.precompose(sputil.choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row = row, column = 0, sticky = 'w') if pat_name: cb.set_state(1) table.spectrum_to_checkbutton[spectrum] = cb # # Make peak pattern menu # epeak_types = expectedpeaks.expected_peak_descriptions.keys() pm = tkutil.option_menu(table.frame, '', epeak_types) pm.frame.grid(row = row, column = 1, sticky = 'w') table.spectrum_epeak_menus[spectrum] = pm # # Get default spectrum peak pattern and axis order # if pat_name == None: pat_name = expectedpeaks.default_spectrum_pattern_name(spectrum) if pat_name == None: pat_name = pm.get() pat_list = expectedpeaks.expected_peak_descriptions[pat_name] pat_nuclei = expectedpeaks.pattern_nuclei(pat_list[0]) pat_axes = pyutil.order(pat_nuclei, spectrum.nuclei) # # Make axis order menu # aom = axes.axis_order_menu(table.frame, spectrum.nuclei, initial_order = pat_axes) aom.frame.grid(row = row, column = 2, sticky = 'w') table.axis_order_menu[spectrum] = aom # # Register a callback to limit the menu choices for axis order. # def restrict_axis_order_cb(pat_name, aom=aom): import expectedpeaks pat_list = expectedpeaks.expected_peak_descriptions[pat_name] pat_nuclei = expectedpeaks.pattern_nuclei(pat_list[0]) aom.restrict_menu_permutations(pat_nuclei) pm.add_callback(restrict_axis_order_cb) pm.set(pat_name)
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Chemical Shift Plot') self.top.columnconfigure(0, weight=1) r = 0 self.condition_widget = sputil.condition_menu(session, self.top, 'Condition: ') self.condition_widget.frame.grid(row=r, sticky='w') r = r + 1 self.ppm_range_widget = [None, None] er = tkutil.entry_row(self.top, 'PPM range: ', ('min', '0', 3), ('max', '12', 3), ('step', '1', 3)) (self.ppm_range_widget[0], self.ppm_range_widget[1], self.ppm_step_widget) = er.variables er.frame.grid(row=r, sticky='w') r = r + 1 e = tkutil.entry_field(self.top, 'Atoms: ', '', 30) self.atoms = e.variable e.frame.grid(row=r, sticky='w') r = r + 1 t = tkutil.checkbutton(self.top, 'Show typical amino acid shifts?', 0) self.typical_range = t.variable t.button.grid(row=r, sticky='w') r = r + 1 c = tkutil.scrollable_canvas(self.top) c.frame.grid(row=r, sticky='news') self.top.rowconfigure(r, weight=1) r = r + 1 self.canvas = c.canvas progress_label = Tkinter.Label(self.top, anchor='nw') progress_label.grid(row=r, sticky='w') r = r + 1 postscript_cb = pyutil.precompose(tkutil.postscript_cb, self.canvas) br = tkutil.button_row( self.top, ('Update', self.update_cb), ('Postscript', postscript_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'ChemShiftPlot')), ) br.frame.grid(row=r, sticky='w') r = r + 1 tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def add_spectrum(self, spectrum, table, row): pat_name, pat_axes = expectedpeaks.recall_pattern(spectrum) # Make spectrum check button cb = tkutil.checkbutton(table.frame, spectrum.name, 0) choose_cb = pyutil.precompose(sputil.choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row = row, column = 0, sticky = 'w') if pat_name: cb.set_state(1) table.spectrum_to_checkbutton[spectrum] = cb
def add_spectrum(self, spectrum, table, row): onoff = self.default_onoff(spectrum) b = tkutil.checkbutton(table.frame, spectrum.name, onoff) b.button.grid(row = row, column = 0, sticky = 'nw') ttext = self.default_time_parameter(spectrum) e = tkutil.entry_field(table.frame, '', ttext) e.frame.grid(row = row, column = 1, sticky = 'nw') self.spectrum_widgets[spectrum] = (b, e)
def add_spect(self, spectrum, table, row): # # Make spectrum checkbutton # cb = tkutil.checkbutton(table.frame, spectrum.name, 0) cb.button['selectcolor'] = spectrum_color(spectrum) choose_cb = pyutil.precompose(choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row=row, column=0, sticky='w') table.spectrum_to_checkbutton[spectrum] = cb
def add_spect(self, spectrum, table, row): # # Make spectrum checkbutton # cb = tkutil.checkbutton(table.frame, spectrum.name, 0) cb.button['selectcolor'] = spectrum_color(spectrum) choose_cb = pyutil.precompose(choose_spectrum_cb, spectrum, table.chosen_spectra) cb.add_callback(choose_cb) cb.button.grid(row = row, column = 0, sticky = 'w') table.spectrum_to_checkbutton[spectrum] = cb
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Chemical Shift Plot') self.top.columnconfigure(0, weight = 1) r = 0 self.condition_widget = sputil.condition_menu(session, self.top, 'Condition: ') self.condition_widget.frame.grid(row = r, sticky = 'w') r = r + 1 self.ppm_range_widget = [None, None] er = tkutil.entry_row(self.top, 'PPM range: ', ('min', '0', 3), ('max', '12', 3), ('step', '1', 3)) (self.ppm_range_widget[0], self.ppm_range_widget[1], self.ppm_step_widget) = er.variables er.frame.grid(row = r, sticky = 'w') r = r + 1 e = tkutil.entry_field(self.top, 'Atoms: ', '', 30) self.atoms = e.variable e.frame.grid(row = r, sticky = 'w') r = r + 1 t = tkutil.checkbutton(self.top, 'Show typical amino acid shifts?', 0) self.typical_range = t.variable t.button.grid(row = r, sticky = 'w') r = r + 1 c = tkutil.scrollable_canvas(self.top) c.frame.grid(row = r, sticky = 'news') self.top.rowconfigure(r, weight = 1) r = r + 1 self.canvas = c.canvas progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.grid(row = r, sticky = 'w') r = r + 1 postscript_cb = pyutil.precompose(tkutil.postscript_cb, self.canvas) br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Postscript', postscript_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'ChemShiftPlot')), ) br.frame.grid(row = r, sticky = 'w') r = r + 1 tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def __init__(self, session): tkutil.Settings_Dialog.__init__(self, session.tk, 'Python Shell Preferences') cb = tkutil.checkbutton(self.top, 'Show Python shell if error occurs?', 1) cb.button.pack(side = 'top', anchor = 'nw') self.raise_variable = cb.variable br = tkutil.button_row(self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'PythonShell')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Restricted Peak Pick') m = sputil.view_menu(session, self.top, 'Find peaks in ') m.frame.pack(side='top', anchor='w') m.add_callback(self.chose_spectrum_cb) self.pick_menu = m m = sputil.spectrum_menu(session, self.top, 'Using peaks in ') m.frame.pack(side='top', anchor='w') m.add_callback(self.chose_spectrum_cb) self.ref_menu = m b = tkutil.checkbutton(self.top, 'Use selected peaks only?', 0) b.button.pack(side='top', anchor='w') self.selected_only = b lbl = Tkinter.Label(self.top, text='Axis match tolerances (ppm)') lbl.pack(side='top', anchor='w') self.axis_table_heading = lbl f = Tkinter.Frame(self.top) f.pack(side='top', anchor='w') self.axis_table = f self.range_entries = [] self.setup_axis_table() progress_label = Tkinter.Label(self.top, anchor='nw') progress_label.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Pick peaks', self.pick_cb), ('Select peaks', self.select_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'RestrictedPick')), ) br.frame.pack(side='top', anchor='w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def __init__(self, session): tkutil.Settings_Dialog.__init__(self, session.tk, 'Python Shell Preferences') cb = tkutil.checkbutton(self.top, 'Show Python shell if error occurs?', 1) cb.button.pack(side='top', anchor='nw') self.raise_variable = cb.variable br = tkutil.button_row( self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'PythonShell')), ) br.frame.pack(side='top', anchor='w')
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'Restricted Peak Pick') m = sputil.view_menu(session, self.top, 'Find peaks in ') m.frame.pack(side = 'top', anchor = 'w') m.add_callback(self.chose_spectrum_cb) self.pick_menu = m m = sputil.spectrum_menu(session, self.top, 'Using peaks in ') m.frame.pack(side = 'top', anchor = 'w') m.add_callback(self.chose_spectrum_cb) self.ref_menu = m b = tkutil.checkbutton(self.top, 'Use selected peaks only?', 0) b.button.pack(side = 'top', anchor = 'w') self.selected_only = b lbl= Tkinter.Label(self.top, text = 'Axis match tolerances (ppm)') lbl.pack(side = 'top', anchor = 'w') self.axis_table_heading = lbl f = Tkinter.Frame(self.top) f.pack(side = 'top', anchor = 'w') self.axis_table = f self.range_entries = [] self.setup_axis_table() progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Pick peaks', self.pick_cb), ('Select peaks', self.select_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'RestrictedPick')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[2])
def __init__(self, session): self.session = session tkutil.Settings_Dialog.__init__(self, session.tk, 'Show Peak Strips') f = self.spectrum_choice_table(self.top) f.pack(side = 'top', anchor = 'w') sx = tkutil.checkbutton(self.top, 'Show spectrum name under each strip', 0) sx.button.pack(side = 'top', anchor = 'w', padx = 10, pady = 10) self.label_spectrum = sx br = tkutil.button_row(self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'StripPlot')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): tkutil.Settings_Dialog.__init__(self, session.tk, 'AutoAssign Details') se = tkutil.checkbutton(self.top, 'Use an already running AutoAssign server?', 0) se.button.pack(side = 'top', anchor = 'w') self.server_exists = se.variable hp = tkutil.entry_row(self.top, 'Server on', ('host ', '', 25), (' port ', '', 5), ) hp.frame.pack(side = 'top', anchor = 'w') self.server_host, self.server_port = hp.variables sl = tkutil.entry_field(self.top, 'Sleep time after server startup (seconds): ', initial = 1, width = 3) sl.frame.pack(side = 'top', anchor = 'w') self.server_lag = sl.variable sp = tkutil.entry_field(self.top, 'Server program ', '', width = 25) sp.frame.pack(side = 'top', anchor = 'w') self.server_executable = sp.variable cp = tkutil.entry_field(self.top, 'Client program ', '', width = 25) cp.frame.pack(side = 'top', anchor = 'w') self.client_executable = cp.variable br = tkutil.button_row(self.top, ('Ok', self.ok_cb), ('Apply', self.apply_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'AutoAssign')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, parent, name): cb = tkutil.checkbutton(parent, name, 0) cb.button.pack(side = 'top', anchor = 'w') self.checkbutton = cb
def __init__(self, session): self.session = session self.pdb_path = None self.model = None self.pseudobond_group = None self.recenter_on_peak = 1 self.chimera_atom_to_num_atom = {} self.num_atom_to_chimera_atom = {} self.chimera_atom_to_resonance = {} self.num_atom_pair_to_pseudobond = {} self.selected_atoms = [] self.peak_selected_notice = None self.bond_selection_trigger = None self.chimera_quit_trigger = None self.chimera_running = 0 tkutil.Dialog.__init__(self, session.tk, 'Chimera Model') self.pdb_file = tkutil.file_field(self.top, 'PDB File: ', 'pdb') self.pdb_file.frame.pack(side='top', anchor='w') colors = ('white', 'black', 'red', 'yellow', 'green', 'cyan', 'blue', 'magenta') c = tkutil.option_menu(self.top, 'Color assigned atoms ', colors, 'yellow') c.frame.pack(side='top', anchor='w') self.assigned_atom_color = c cb = tkutil.checkbutton(self.top, 'Selecting peak highlights assignment line?', 1) cb.button.pack(side='top', anchor='w') self.show_selected_peaks = cb cb = tkutil.checkbutton( self.top, 'Selecting assignment line recenters spectrum?', 1) cb.button.pack(side='top', anchor='w') self.show_selected_lines = cb cb = tkutil.checkbutton(self.top, 'Selecting atoms recenters spectrum?', 1) cb.button.pack(side='top', anchor='w') self.show_selected_atoms = cb c = tkutil.option_menu(self.top, 'Color lines for assignments ', colors, 'blue') c.frame.pack(side='top', anchor='w') self.peak_line_color = c cb = tkutil.checkbutton(self.top, 'Show contraint violations?', 0) cb.button.pack(side='top', anchor='w') self.show_constraints = cb constraint_frame = Tkinter.Frame(self.top, borderwidth=2, relief='sunken') cb.map_widget(constraint_frame) self.mardi_file = tkutil.file_field(constraint_frame, 'Mardigras Constraint File: ', 'mardigras') self.mardi_file.frame.pack(side='top', anchor='w') cb = tkutil.checkbuttons(constraint_frame, 'top', '', 'Show satisfied constraints?', 'Show violated constraints?') cb.frame.pack(side='top', anchor='w') self.show_satisfied, self.show_violated = cb.variables self.show_satisfied.set(0) color_frame = Tkinter.Frame(constraint_frame) color_frame.pack(side='top', anchor='w') h = Tkinter.Label(color_frame, text='Constraint line colors:') h.grid(row=0, column=0, columnspan=2, sticky='w') self.constraint_colors = [] row = 1 for text, color in (('< 0.8 times lower bound', 'blue'), ('0.8-1.0 times lower bound', 'cyan'), ('satisfied constraint', 'green'), ('1.0-1.2 times upper bound', 'magenta'), ('> 1.2 times upper bound', 'red')): c = tkutil.option_menu(color_frame, '', colors, color) c.frame.grid(row=row, column=0, sticky='e', padx=10) label = Tkinter.Label(color_frame, text=text) label.grid(row=row, column=1, sticky='w') row = row + 1 self.constraint_colors.append(c) self.status_line = Tkinter.Label(self.top, anchor='nw', wraplength='15c', justify='left') self.status_line.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Show', self.show_cb), ('Erase', self.erase_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'Chimera')), ) br.frame.pack(side='top', anchor='w')
def __init__(self, parent, name): cb = tkutil.checkbutton(parent, name, 0) cb.button.pack(side='top', anchor='w') self.checkbutton = cb
def __init__(self, session): tkutil.Dialog.__init__(self, session.tk, 'XPLOR Restraints') sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ') sc.frame.pack(side = 'top', anchor = 'w') self.spectrum_choice = sc pl = sputil.peak_listbox(self.top) pl.frame.pack(fill = 'both', expand = 1) pl.heading['text'] = 'XPLOR Restraint list' pl.listbox.bind('<ButtonRelease-1>', pl.select_peak_cb) pl.listbox.bind('<ButtonRelease-2>', pl.goto_peak_cb) pl.listbox.bind('<Double-ButtonRelease-1>', pl.goto_peak_cb) self.peak_list = pl bt = tkutil.entry_field(self.top, 'Bounds text ', width = 30) bt.frame.pack(side = 'top', anchor = 'w') self.bounds_text = bt nb = tkutil.checkbutton(self.top, 'Show peak notes?', 0) nb.button.pack(side = 'top', anchor = 'w') self.note = nb hb = tkutil.entry_row(self.top, 'Only peaks with height', (' >= ', '', 8), (' and < ', '', 8)) hb.frame.pack(side = 'top', anchor = 'w') self.height_min, self.height_max = hb.variables vb = tkutil.entry_row(self.top, 'Only peaks with volume', (' >= ', '', 8), (' and < ', '', 8)) vb.frame.pack(side = 'top', anchor = 'w') self.volume_min, self.volume_max = vb.variables eh1 = Tkinter.Label(self.top, text = 'Omit peak if note has a word from:') eh1.pack(side = 'top', anchor = 'w') ef1 = tkutil.entry_field(self.top, ' ', width = 30) ef1.frame.pack(side = 'top', anchor = 'w') self.exclude_note_words = ef1 eh2 = Tkinter.Label(self.top, text = 'or if it has no word from:') eh2.pack(side = 'top', anchor = 'w') ef2 = tkutil.entry_field(self.top, ' ', width = 30) ef2.frame.pack(side = 'top', anchor = 'w') self.require_note_words = ef2 et = Tkinter.Label(self.top, text = '(space separated list of words)') et.pack(side = 'top', anchor = 'w') progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Write Restraints', self.save_peaks_cb), ('Append', self.append_peaks_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'XplorFormat')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[3])
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'DYANA / XEASY Format') sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ') sc.frame.pack(side = 'top', anchor = 'w') self.spectrum_choice = sc sl = tkutil.scrolling_list(self.top, 'Chemical shift list', 5) sl.frame.pack(fill = 'both', expand = 1) sl.listbox.bind('<ButtonRelease-1>', self.resonance_cb) self.shift_list = sl pl = sputil.peak_listbox(self.top) pl.frame.pack(fill = 'both', expand = 1) pl.heading['text'] = 'Peak list' pl.listbox.bind('<ButtonRelease-1>', pl.select_peak_cb) pl.listbox.bind('<ButtonRelease-2>', pl.goto_peak_cb) pl.listbox.bind('<Double-ButtonRelease-1>', pl.goto_peak_cb) self.peak_list = pl cy = tkutil.checkbutton(self.top, 'Cyana Formatting ?', 0) cy.button.pack(side = 'top', anchor = 'w') self.cyana = cy hb = tkutil.checkbutton(self.top, 'Show peak heights instead of volumes?', 0) hb.button.pack(side = 'top', anchor = 'w') self.heights = hb ib = tkutil.checkbutton(self.top, 'Include unintegrated peaks?', 0) ib.button.pack(side = 'top', anchor = 'w') self.unintegrated = ib ab = tkutil.checkbutton(self.top, 'Include unassigned peaks?', 0) ab.button.pack(side = 'top', anchor = 'w') self.unassigned = ab mb = tkutil.checkbutton(self.top, 'Include assignments without a residue number?', 0) mb.button.pack(side = 'top', anchor = 'w') self.unnumbered = mb nb = tkutil.checkbutton(self.top, 'Show peak notes?', 0) nb.button.pack(side = 'top', anchor = 'w') self.note = nb eh = Tkinter.Label(self.top, text = 'Omit peak if note has a word from:') eh.pack(side = 'top', anchor = 'w') ef = tkutil.entry_field(self.top, ' ', width = 30) ef.frame.pack(side = 'top', anchor = 'w') self.note_words = ef et = Tkinter.Label(self.top, text = '(space separated list of words)') et.pack(side = 'top', anchor = 'w') progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Update', self.update_cb), ('Write Shifts', self.save_shifts_cb), ('Write Peaks', self.save_peaks_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'XEASYFormat')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[3])
def __init__(self, session): tkutil.Dialog.__init__(self, session.tk, 'Set Volume Errors') self.spectrum_choice = sputil.spectrum_menu(session, self.top, 'Spectrum: ') self.spectrum_choice.frame.pack(side = 'top', anchor = 'w') f = Tkinter.Frame(self.top) f.pack(side = 'top', anchor = 'w') r = 0 w = Tkinter.Label(f, text = 'Error (%)') w.grid(row = r, column = 1) r = r + 1 cb = tkutil.checkbutton(f, 'Default fit', 1) self.fit_default = cb.variable cb.button.grid(row = r, column = 0, sticky = 'w') e = tkutil.entry_field(f, '', '10', 4) self.fit_default_error = e.variable e.frame.grid(row = r, column = 1) r = r + 1 cb = tkutil.checkbutton(f, 'Default box / ellipse', 1) self.box_default = cb.variable cb.button.grid(row = r, column = 0, sticky = 'w') e = tkutil.entry_field(f, '', '20', 4) self.box_default_error = e.variable e.frame.grid(row = r, column = 1) r = r + 1 cb = tkutil.checkbutton(f, 'Near diagonal', 0) self.near_diagonal = cb.variable cb.button.grid(row = r, column = 0, sticky = 'w') e = tkutil.entry_field(f, '', '20', 4) self.near_diagonal_error = e.variable e.frame.grid(row = r, column = 1) tkutil.grid_labels(f, ('Range (ppm)', r, 2)) e = tkutil.entry_field(f, '|w1-w2| ', '.1', 4) self.near_diagonal_range = e.variable e.frame.grid(row = r+1, column = 2) r = r + 2 cb = tkutil.checkbutton(f, 'Near other peaks', 0) self.nearby_peaks = cb.variable cb.button.grid(row = r, column = 0, sticky = 'w') tkutil.grid_labels(f, ('Relative volume', r+1, 0), ('< .5', r+2, 0), ('.5 - 2', r+3, 0), ('> 2', r+4, 0), ('unintegrated', r+5, 0)) self.nearby_error = {} (self.nearby_error['< .5'], self.nearby_error['.5 - 2'], self.nearby_error['> 2'], self.nearby_error['unintegrated'] ) = tkutil.grid_entries(f, 4, ('5', r+2, 1), ('10', r+3, 1), ('20', r+4, 1), ('20', r+5, 1)) self.nearby_range = {} tkutil.grid_labels(f, ('Range (ppm)', r+1, 2)) e = tkutil.entry_field(f, 'w1 ', '.05', 4) self.nearby_range['w1 range'] = e.variable e.frame.grid(row = r+2, column = 2) e = tkutil.entry_field(f, 'w2 ', '.05', 4) self.nearby_range['w2 range'] = e.variable e.frame.grid(row = r+3, column = 2) r = r + 6 progress_label = Tkinter.Label(self.top, anchor = 'nw') progress_label.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Set Volume Errors', self.update_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'VolumeErrors')), ) br.frame.pack(side = 'top', anchor = 'w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[1])
def __init__(self, session): self.session = session self.pdb_path = None self.model = None self.pseudobond_group = None self.recenter_on_peak = 1 self.chimera_atom_to_num_atom = {} self.num_atom_to_chimera_atom = {} self.chimera_atom_to_resonance = {} self.num_atom_pair_to_pseudobond = {} self.selected_atoms = [] self.peak_selected_notice = None self.bond_selection_trigger = None self.chimera_quit_trigger = None self.chimera_running = 0 tkutil.Dialog.__init__(self, session.tk, 'Chimera Model') self.pdb_file = tkutil.file_field(self.top, 'PDB File: ', 'pdb') self.pdb_file.frame.pack(side = 'top', anchor = 'w') colors = ('white', 'black', 'red', 'yellow', 'green', 'cyan', 'blue', 'magenta') c = tkutil.option_menu(self.top, 'Color assigned atoms ', colors, 'yellow') c.frame.pack(side = 'top', anchor = 'w') self.assigned_atom_color = c cb = tkutil.checkbutton(self.top, 'Selecting peak highlights assignment line?', 1) cb.button.pack(side = 'top', anchor = 'w') self.show_selected_peaks = cb cb = tkutil.checkbutton(self.top, 'Selecting assignment line recenters spectrum?', 1) cb.button.pack(side = 'top', anchor = 'w') self.show_selected_lines = cb cb = tkutil.checkbutton(self.top, 'Selecting atoms recenters spectrum?', 1) cb.button.pack(side = 'top', anchor = 'w') self.show_selected_atoms = cb c = tkutil.option_menu(self.top, 'Color lines for assignments ', colors, 'blue') c.frame.pack(side = 'top', anchor = 'w') self.peak_line_color = c cb = tkutil.checkbutton(self.top, 'Show contraint violations?', 0) cb.button.pack(side = 'top', anchor = 'w') self.show_constraints = cb constraint_frame = Tkinter.Frame(self.top, borderwidth = 2, relief = 'sunken') cb.map_widget(constraint_frame) self.mardi_file = tkutil.file_field(constraint_frame, 'Mardigras Constraint File: ', 'mardigras') self.mardi_file.frame.pack(side = 'top', anchor = 'w') cb = tkutil.checkbuttons(constraint_frame, 'top', '', 'Show satisfied constraints?', 'Show violated constraints?') cb.frame.pack(side = 'top', anchor = 'w') self.show_satisfied, self.show_violated = cb.variables self.show_satisfied.set(0) color_frame = Tkinter.Frame(constraint_frame) color_frame.pack(side = 'top', anchor = 'w') h = Tkinter.Label(color_frame, text = 'Constraint line colors:') h.grid(row = 0, column = 0, columnspan = 2, sticky = 'w') self.constraint_colors = [] row = 1 for text, color in (('< 0.8 times lower bound', 'blue'), ('0.8-1.0 times lower bound', 'cyan'), ('satisfied constraint', 'green'), ('1.0-1.2 times upper bound', 'magenta'), ('> 1.2 times upper bound', 'red')): c = tkutil.option_menu(color_frame, '', colors, color) c.frame.grid(row = row, column = 0, sticky = 'e', padx = 10) label = Tkinter.Label(color_frame, text = text) label.grid(row = row, column = 1, sticky = 'w') row = row + 1 self.constraint_colors.append(c) self.status_line = Tkinter.Label(self.top, anchor = 'nw', wraplength = '15c', justify = 'left') self.status_line.pack(side = 'top', anchor = 'w') br = tkutil.button_row(self.top, ('Show', self.show_cb), ('Erase', self.erase_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'Chimera')), ) br.frame.pack(side = 'top', anchor = 'w')
def __init__(self, session): self.session = session tkutil.Dialog.__init__(self, session.tk, 'DYANA / XEASY Format') sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ') sc.frame.pack(side='top', anchor='w') self.spectrum_choice = sc sl = tkutil.scrolling_list(self.top, 'Chemical shift list', 5) sl.frame.pack(fill='both', expand=1) sl.listbox.bind('<ButtonRelease-1>', self.resonance_cb) self.shift_list = sl pl = sputil.peak_listbox(self.top) pl.frame.pack(fill='both', expand=1) pl.heading['text'] = 'Peak list' pl.listbox.bind('<ButtonRelease-1>', pl.select_peak_cb) pl.listbox.bind('<ButtonRelease-2>', pl.goto_peak_cb) pl.listbox.bind('<Double-ButtonRelease-1>', pl.goto_peak_cb) self.peak_list = pl cy = tkutil.checkbutton(self.top, 'Cyana Formatting ?', 0) cy.button.pack(side='top', anchor='w') self.cyana = cy hb = tkutil.checkbutton(self.top, 'Show peak heights instead of volumes?', 0) hb.button.pack(side='top', anchor='w') self.heights = hb ib = tkutil.checkbutton(self.top, 'Include unintegrated peaks?', 0) ib.button.pack(side='top', anchor='w') self.unintegrated = ib ab = tkutil.checkbutton(self.top, 'Include unassigned peaks?', 0) ab.button.pack(side='top', anchor='w') self.unassigned = ab mb = tkutil.checkbutton( self.top, 'Include assignments without a residue number?', 0) mb.button.pack(side='top', anchor='w') self.unnumbered = mb nb = tkutil.checkbutton(self.top, 'Show peak notes?', 0) nb.button.pack(side='top', anchor='w') self.note = nb eh = Tkinter.Label(self.top, text='Omit peak if note has a word from:') eh.pack(side='top', anchor='w') ef = tkutil.entry_field(self.top, ' ', width=30) ef.frame.pack(side='top', anchor='w') self.note_words = ef et = Tkinter.Label(self.top, text='(space separated list of words)') et.pack(side='top', anchor='w') progress_label = Tkinter.Label(self.top, anchor='nw') progress_label.pack(side='top', anchor='w') br = tkutil.button_row( self.top, ('Update', self.update_cb), ('Write Shifts', self.save_shifts_cb), ('Write Peaks', self.save_peaks_cb), ('Stop', self.stop_cb), ('Close', self.close_cb), ('Help', sputil.help_cb(session, 'XEASYFormat')), ) br.frame.pack(side='top', anchor='w') tkutil.Stoppable.__init__(self, progress_label, br.buttons[3])