Example #1
0
	def __init__(self, session):
		self.session = session
		self.grid_widgets = []

		tkutil.Dialog.__init__(self, session.tk, 'Fit Delta-Chi Tensor to PCS')

		self.dia_menu = sputil.spectrum_menu(session, self.top, 'Diamagnetic Spectrum:  ')
		self.dia_menu.frame.pack(side = 'top', anchor = 'w')

		self.para_menu = sputil.spectrum_menu(session, self.top, 'Paramagnetic Spectrum: ')
		self.para_menu.frame.pack(side = 'top', anchor = 'w')

		self.npc_write_path = tkutil.file_field(self.top, 'PCS save file: ', '.npc', save=1)
		self.npc_write_path.frame.pack(side = 'top', anchor = 'e')
		self.npc_write_path.set("pcsexp.npc")

		self.npc_read_path = tkutil.file_field(self.top, 'PCS read file: ', '.npc')
		self.npc_read_path.frame.pack(side = 'top', anchor = 'e')
		self.npc_read_path.set("pcscalc.npc")

		self.message = Tkinter.Label(self.top)
		self.message.pack(side = 'top', anchor = 'w')
		self.message['text'] = "\n"

		br = tkutil.button_row(self.top,
			('Write PCS', self.write_npc_cb),
			('Read PCS', self.read_npc_cb),
			('Clear PCS', self.clear_peaks_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, '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.Dialog.__init__(self, session.tk, 'Read Peak List')

        plp = tkutil.file_field(self.top, 'Peak file: ', 'peaklist')
        plp.frame.pack(side='top', anchor='w')
        self.peak_list_path = plp

        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, 'Unreadable lines', 5)
        sl.frame.pack(side='top', anchor='w', fill='both', expand=1)
        self.unreadable = sl

        progress_label = Tkinter.Label(self.top, anchor='nw')
        progress_label.pack(side='top', anchor='w')

        br = tkutil.button_row(
            self.top,
            ('Create peaks', self.read_cb),
            ('Stop', self.stop_cb),
            ('Close', self.close_cb),
            ('Help', sputil.help_cb(session, 'ReadPeaks')),
        )
        br.frame.pack(side='top', anchor='w')

        tkutil.Stoppable.__init__(self, progress_label, br.buttons[1])
Example #4
0
  def __init__(self, session):

    tkutil.Dialog.__init__(self, session.tk, 'Read Peak List')

    plp = tkutil.file_field(self.top, 'Peak file: ', 'peaklist')
    plp.frame.pack(side = 'top', anchor = 'w')
    self.peak_list_path = plp
    
    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, 'Unreadable lines', 5)
    sl.frame.pack(side = 'top', anchor = 'w', fill = 'both', expand = 1)
    self.unreadable = sl
    
    progress_label = Tkinter.Label(self.top, anchor = 'nw')
    progress_label.pack(side = 'top', anchor = 'w')

    br = tkutil.button_row(self.top,
			   ('Create peaks', self.read_cb),
			   ('Stop', self.stop_cb),
			   ('Close', self.close_cb),
                           ('Help', sputil.help_cb(session, 'ReadPeaks')),
			   )
    br.frame.pack(side = 'top', anchor = 'w')

    tkutil.Stoppable.__init__(self, progress_label, br.buttons[1])
Example #5
0
    def __init__(self, session):
        self.session = session
        self.grid_widgets = []

        tkutil.Dialog.__init__(self, session.tk, 'Read and write PCS values')
        acqu_template = [("T{}-:".format(i + 1), "0.0", 6) for i in range(3)]

        self.dia_menu = sputil.spectrum_menu(session, self.top,
                                             'Diamagnetic Spectrum:  ')
        self.dia_menu.frame.pack(side='top', anchor='w')
        self.dia_menu.add_callback(self.dia_spec_change)
        self.dia_acqu = tkutil.entry_row(self.top, "Acqu Time:",
                                         *acqu_template)
        self.dia_acqu.frame.pack(side='top', anchor='w')

        self.para_menu = sputil.spectrum_menu(session, self.top,
                                              'Paramagnetic Spectrum: ')
        self.para_menu.frame.pack(side='top', anchor='w')
        self.para_menu.add_callback(self.para_spec_change)
        self.para_acqu = tkutil.entry_row(self.top, "Acqu Time:",
                                          *acqu_template)
        self.para_acqu.frame.pack(side='top', anchor='w')

        self.npc_write_path = tkutil.file_field(self.top,
                                                'PCS save file: ',
                                                '.npc',
                                                save=1)
        self.npc_write_path.frame.pack(side='top', anchor='e')
        self.npc_write_path.set("pcsexp.npc")

        self.npc_read_path = tkutil.file_field(self.top, 'PCS read file: ',
                                               '.npc')
        self.npc_read_path.frame.pack(side='top', anchor='e')
        self.npc_read_path.set("pcscalc.npc")

        self.message = Tkinter.Label(self.top)
        self.message.pack(side='top', anchor='w')
        self.message['text'] = "\n"

        br = tkutil.button_row(self.top, ('Write PCS', self.write_npc_cb),
                               ('Read PCS', self.read_npc_cb),
                               ('Clear PCS', self.clear_peaks_cb),
                               ('Close', self.close_cb))
        br.frame.pack(side='top', anchor='w')

        self.dia_spec_change()
        self.para_spec_change()
Example #6
0
  def __init__(self, session):

    self.session = session
    self.selection_notice = None

    tkutil.Dialog.__init__(self, session.tk, 'Read Cyana peak list')

    tspectra=('2D','3D')
    initial=tspectra[0]
    self.spectratype = tkutil.option_menu(self.top, "Select spectra dimension", tspectra, initial)
    self.spectratype.frame.pack(side = 'top', anchor = 'w')

    order=('xy','yx','xyz','xzy','yxz','yzx','zxy','zyx')
    initial=order[0]

    self.order = tkutil.option_menu(self.top, "Select output order", order, initial)
    self.order.frame.pack(side = 'top', anchor = 'w')    

    self.plp = tkutil.file_field(self.top, 'Cyana output peak file: ', 'peaklist')
    self.plp.frame.pack(side = 'top', anchor = 'e')
    self.peak_list_path = self.plp
    
    self.pl = tkutil.file_field(self.top,   'Cyana output proton file:', 'protlist')
    self.pl.frame.pack(side = 'top', anchor = 'e')
    self.proton_list_path = self.pl

    self.sl = tkutil.file_field(self.top,   'Sequence file: ', 'seqlist')
    self.sl.frame.pack(side = 'top', anchor = 'e')
    self.sequence_list_path = self.sl

    sc = sputil.spectrum_menu(session, self.top, 'Spectrum: ')
    sc.frame.pack(side = 'top', anchor = 'w')
    self.spectrum_choice = sc

    progress_label = Tkinter.Label(self.top, anchor = 'nw')
    progress_label.pack(side = 'top', anchor = 'w')

    br = tkutil.button_row(self.top,
			   ('Create peaks', self.read_cb),
			   ('Stop', self.stop_cb),
			   ('Close', self.close_cb),
                           ('Help', sputil.help_cb(session, 'ReadPeaks')),
			   )
    br.frame.pack(side = 'top', anchor = 'w')

    tkutil.Stoppable.__init__(self, progress_label, br.buttons[1])
Example #7
0
  def __init__(self, session):

    self.session = session
    
    tkutil.Dialog.__init__(self, session.tk, 'Create Corma Spectrum')

    sm = sputil.spectrum_menu(session, self.top, 'Spectrum: ')
    sm.frame.pack(side = 'top', anchor = 'w')
    sm.add_callback(self.spectrum_cb)
    self.spectrum_menu = sm

    ms = tkutil.entry_row(self.top, 'Matrix size: ',
                          ('w1', '0', 5), ('w2', '0', 5))
    ms.frame.pack(side = 'top', anchor = 'w')
    self.matrix_size = ms

    lw = tkutil.entry_row(self.top, 'Default linewidth (hz): ',
                          ('w1', '0', 5), ('w2', '0', 5))
    lw.frame.pack(side = 'top', anchor = 'w')
    self.default_linewidth = lw

    cp = tkutil.file_field(self.top, 'Corma file: ', 'corma')
    cp.frame.pack(side = 'top', anchor = 'w')
    self.corma_path = cp

    sp = tkutil.file_field(self.top, 'Save in file: ', 'spectrum', save = 1)
    sp.frame.pack(side = 'top', anchor = 'w')
    self.save_path = sp
    
    progress_label = Tkinter.Label(self.top, anchor = 'nw', justify = 'left')
    progress_label.pack(side = 'top', anchor = 'w')
    
    self.spectrum_cb(self.spectrum_menu.get())

    br = tkutil.button_row(self.top,
			   ('Create Spectrum', self.create_spectrum_cb),
			   ('Stop', self.stop_cb),
			   ('Close', self.close_cb),
                           ('Help', sputil.help_cb(session, 'CormaSpectrum')),
			   )
    br.frame.pack(side = 'top', anchor = 'w')

    tkutil.Stoppable.__init__(self, progress_label, br.buttons[1])
Example #8
0
    def __init__(self, session):
        tkutil.Dialog.__init__(self, session.tk, 'Connect Ponderosa Analyzer')

        cnt = tkutil.file_field(self.top, 'Connect file (sparky.cnt): ',
                                'Connect file')
        cnt.frame.pack(side='top', anchor='w')
        self.cnt_path = cnt
        szCnt = os.getcwd() + os.sep + "sparky.cnt"
        if os.path.isfile(szCnt):
            self.cnt_path.set(szCnt)

        spec1 = sputil.spectrum_menu(session, self.top, '15N-NOESY: ')
        spec1.frame.pack(side='top', anchor='w')
        self.nnoe = spec1

        spec2 = sputil.spectrum_menu(session, self.top, '13C-NOESY(ali-): ')
        spec2.frame.pack(side='top', anchor='w')
        self.cnoe = spec2

        spec3 = sputil.spectrum_menu(session, self.top, '13C-NOESY(aro-): ')
        spec3.frame.pack(side='top', anchor='w')
        self.aronoe = spec3

        self.n15_ppms = []  # w1, w2, w3 chemical shifts
        self.c15_ppms = []  # w1, w2, w3 chemical shifts

        self.br = tkutil.button_row(
            self.top,
            ('Update', self.update_cb),
            ('Move(15N-)', self.move_n_cb),
            ('Move(13C-)', self.move_c_cb),
            ('Close', self.close_cb),
        )
        self.br.frame.pack(side='top', anchor='w')

        self.label_frame = Tkinter.Frame(self.top, width=500, height=100)
        self.label_frame.pack(side='top', anchor='nw')

        ll = modified_listbox(self.label_frame, 'Label List', 49, 8, "single")
        ll.listbox.bind('<Double-ButtonRelease-1>', self.move_to_selected_cb)
        ll.listbox.bind('<ButtonRelease-3>', self.move_to_selected_cb)
        self.label_list = ll
        self.label_list.frame.grid(sticky='news')
  def __init__(self, session):
    tkutil.Dialog.__init__(self, session.tk, 'Connect Ponderosa Analyzer')

    cnt = tkutil.file_field(self.top, 'Connect file (sparky.cnt): ', 'Connect file')
    cnt.frame.pack(side = 'top', anchor = 'w')
    self.cnt_path = cnt
    szCnt = os.getcwd() +  os.sep + "sparky.cnt"
    if os.path.isfile(szCnt):
      self.cnt_path.set(szCnt)

    spec1 = sputil.spectrum_menu(session, self.top, '15N-NOESY: ')
    spec1.frame.pack(side = 'top', anchor = 'w')
    self.nnoe = spec1

    spec2 = sputil.spectrum_menu(session, self.top, '13C-NOESY(ali-): ')
    spec2.frame.pack(side = 'top', anchor = 'w')
    self.cnoe = spec2

    spec3 = sputil.spectrum_menu(session, self.top, '13C-NOESY(aro-): ')
    spec3.frame.pack(side = 'top', anchor = 'w')
    self.aronoe = spec3

    self.n15_ppms = []        # w1, w2, w3 chemical shifts
    self.c15_ppms = []        # w1, w2, w3 chemical shifts

    self.br = tkutil.button_row(self.top,
			   ('Update', self.update_cb),
			   ('Move(15N-)', self.move_n_cb),
			   ('Move(13C-)', self.move_c_cb),
			   ('Close', self.close_cb),
			   )
    self.br.frame.pack(side = 'top', anchor = 'w')

    self.label_frame = Tkinter.Frame(self.top, width = 500, height = 100)
    self.label_frame.pack(side='top', anchor = 'nw')

    ll = modified_listbox(self.label_frame, 'Label List', 49, 8, "single")
    ll.listbox.bind('<Double-ButtonRelease-1>', self.move_to_selected_cb)
    ll.listbox.bind('<ButtonRelease-3>', self.move_to_selected_cb)
    self.label_list = ll
    self.label_list.frame.grid(sticky='news')
Example #10
0
  def sequence_entry(self, parent):

    f = Tkinter.Frame(parent)

    h = Tkinter.Label(f, text = 'Sequence')
    h.pack(side = 'top', anchor = 'w')
    self.header = h
    
    t = tkutil.scrolling_text(f)
    t.text['wrap'] = 'char'
    t.frame.pack(side = 'top', fill = 'x', expand = 1)
    self.sequence_text = t

    ff = tkutil.file_field(f, 'Sequence File', 'sequence')
    ff.frame.pack(side = 'top', anchor = 'w')
    self.file_field = ff

    fr = tkutil.entry_field(f, 'First residue number', '1')
    fr.frame.pack(side = 'top', anchor = 'w')
    self.first_residue = fr

    return f
Example #11
0
  def __init__(self, session):

    self.session = session
    tkutil.Dialog.__init__(self, session.tk, 'PDB Atom Name Check')

    cm = sputil.condition_menu(session, self.top, 'Condition: ')
    cm.frame.pack(side = 'top', anchor = 'w')
    self.condition_menu = cm

    pf = tkutil.file_field(self.top, 'PDB File: ', 'pdb')
    pf.frame.pack(side = 'top', anchor = 'w')
    self.pdb_path = pf

    al = tkutil.scrolling_list(self.top, 'Resonances w/o PDB atoms', 5)
    al.frame.pack(fill = 'both', expand = 1)
    self.atom_list = al

    br = tkutil.button_row(self.top,
			   ('Update', self.update_cb),
                           ('Close', self.close_cb),
                           ('Help', sputil.help_cb(session, 'PDBNames')),
			   )
    br.frame.pack(side = 'top', anchor = 'w')
  def __init__(self, session):

    self.sparky_session = session
    
    tkutil.Settings_Dialog.__init__(self, session.tk, 'AutoAssign Setup')

    sc = self.spectrum_choice_table(self.top)
    sc.pack(side = 'top', anchor = 'w')

    t = tkutil.entry_row(self.top, 'Tolerances (ppm)',
                         ('HN', '', 4),
                         ('N15', '', 4),
                         ('CA', '', 4),
                         ('CB', '', 4),
                         ('HA', '', 4),
                         ('CO', '', 4),
                         )
    t.frame.pack(side = 'top', anchor = 'w')
    self.tolerances = t.entries
 
    td = tkutil.file_field(self.top, 'Temp directory for peak lists: ',
                           'autoassign', browse_button = 0, width = 30)
    td.frame.pack(side = 'top', anchor = 'w')
    self.temp_directory = td
    
    m = Tkinter.Label(self.top, anchor = 'nw', justify = 'left')
    m.pack(side = 'top', anchor = 'w')
    self.message = m

    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')
Example #13
0
 def __init__(self, parent, name):
   peak_list_field.field_widgets.__init__(self, parent, name)
   self.path_widget = tkutil.file_field(parent, 'File: ', 'corma')
   self.checkbutton.map_widget(self.path_widget.frame)
Example #14
0
    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')
Example #15
0
 def __init__(self, parent, name):
     peak_list_field.field_widgets.__init__(self, parent, name)
     self.path_widget = tkutil.file_field(parent, 'File: ', 'corma')
     self.checkbutton.map_widget(self.path_widget.frame)
Example #16
0
  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')