Esempio n. 1
0
def mainDialog():
    app = plugins.get_pmgapp()
    root = plugins.get_tk_root()
    self = Tkinter.Toplevel(root)
    self.title('CHemical Energy Wise Decomposition')
    self.minsize(250, 0)
    self.resizable(0, 0)
    CHEWD(self)
Esempio n. 2
0
		def fetch_eppic_plugin():
			print "Getting PMGApp"
			app = plugins.get_pmgapp()
			print "Getting TK"
			root = plugins.get_tk_root()

			print "Getting panel"
			panel = EppicPanel(root)
Esempio n. 3
0
        def fetch_eppic_plugin():
            print "Getting PMGApp"
            app = plugins.get_pmgapp()
            print "Getting TK"
            root = plugins.get_tk_root()

            print "Getting panel"
            panel = EppicPanel(root)
def __init_plugin__(self=None):
    from pymol import plugins

    root = plugins.get_tk_root()

    def residue_zoomer():
        ResidueZoomerGUI(root)

    plugins.addmenuitem('residue zoomer', residue_zoomer)
def isoslider(mm=5.0):
    '''
DESCRIPTION

    Opens a dialog with isolevel sliders for all isomesh and isosurface
    objects in PyMOL.
    '''
    top = Tkinter.Toplevel(plugins.get_tk_root())
    master = Tkinter.Frame(top, padx=5, pady=5)
    master.pack(fill="both", expand=1)
    mmvar = Tkinter.DoubleVar(top, value=mm)

    def fillmaster():
        ffmt = '%.' + str(DIGITS) + 'f'
        for child in master.children.values():
            child.destroy()
        mm = mmvar.get()
        mmf = Tkinter.Frame(master)
        Tkinter.Label(mmf, text=ffmt % (-mm)).grid(row=0, column=0, sticky='w')
        Tkinter.Label(mmf, text=ffmt % (0.)).grid(row=0, column=1)
        Tkinter.Label(mmf, text=ffmt % (mm)).grid(row=0, column=2, sticky='e')
        mmf.grid(row=0, column=1, sticky='ew')
        mmf.columnconfigure(1, weight=1)
        for i, (name, level) in enumerate(get_isoobjects(), 1):
            v = LevelVar(master, name, ffmt % level)
            Tkinter.Label(master, text=name).grid(row=i, column=0, sticky="w")
            e = Tkinter.Scale(master,
                              orient=Tkinter.HORIZONTAL,
                              from_=-mm,
                              to=mm,
                              resolution=DELTA,
                              showvalue=0,
                              variable=v)
            e.grid(row=i, column=1, sticky="ew")
            v.bindscrollwheel(e)
            e = Tkinter.Entry(master, textvariable=v, width=4)
            e.grid(row=i, column=2, sticky="e")
            v.bindscrollwheel(e)
            master.columnconfigure(1, weight=1)

    fillmaster()
    bottom = Tkinter.Frame(top, padx=5)
    Tkinter.Label(bottom, text="+/-").pack(side=Tkinter.LEFT)
    mmentry = Tkinter.Entry(bottom, textvariable=mmvar, width=4)
    mmentry.pack(side=Tkinter.LEFT)
    refresh = Tkinter.Button(bottom, text="Refresh", command=fillmaster)
    refresh.pack(side=Tkinter.LEFT)
    bottom.pack(side=Tkinter.BOTTOM, fill="x", expand=1)
def calloutpanel():
    self = Tkinter.Toplevel(plugins.get_tk_root())
    self.title('Label Settings')
    master = self
    app = plugins.get_pmgapp()

    def makeframe(text):
        f = Tkinter.LabelFrame(self, text=text, padx=5, pady=5)
        f.pack(fill=Tkinter.X, expand=1)
        return f

    topframes = {}

    def updatetopframe(v):
        for top in topframes.values():
            top.pack_forget()
        if v not in topframes:
            if v == 'PICKED':
                if cmd.count_atoms('?pk1') != 1:
                    tkMessageBox.showwarning(
                        'Warning', 'Please pick an atom in edit mode')
                    return
                setting = Setting.AtomSetting(app, 'pk1')
            elif v == 'GLOBAL':
                setting = app.skin.setting
            else:
                raise ValueError(v)
            topframes[v] = maketopframe(self, setting)
        topframes[v].pack(fill=Tkinter.BOTH, expand=1)

    but_level = Pmw.OptionMenu(master,
                               labelpos='w',
                               label_text='Selection:',
                               items=['GLOBAL', 'PICKED'],
                               command=updatetopframe)
    but_level.pack(side=Tkinter.TOP)

    master = makeframe("Unset Object or Atom level Settings")
    Tkinter.Button(
        master, text="all atoms",
        command=lambda: unset_label_settings('(*)')).pack(side=Tkinter.LEFT)
    Tkinter.Button(
        master, text="all objects",
        command=lambda: unset_label_settings('*')).pack(side=Tkinter.LEFT)

    updatetopframe('GLOBAL')
def isoslider(mm=5.0):
    '''
DESCRIPTION

    Opens a dialog with isolevel sliders for all isomesh and isosurface
    objects in PyMOL.
    '''
    top = Tkinter.Toplevel(plugins.get_tk_root())
    master = Tkinter.Frame(top, padx=5, pady=5)
    master.pack(fill="both", expand=1)
    mmvar = Tkinter.DoubleVar(top, value=mm)

    def fillmaster():
        ffmt = '%.' + str(DIGITS) + 'f'
        for child in master.children.values():
            child.destroy()
        mm = mmvar.get()
        mmf = Tkinter.Frame(master)
        Tkinter.Label(mmf, text=ffmt % (-mm)).grid(row=0, column=0, sticky='w')
        Tkinter.Label(mmf, text=ffmt % (0.)).grid(row=0, column=1)
        Tkinter.Label(mmf, text=ffmt % (mm)).grid(row=0, column=2, sticky='e')
        mmf.grid(row=0, column=1, sticky='ew')
        mmf.columnconfigure(1, weight=1)
        for i, (name, level) in enumerate(get_isoobjects(), 1):
            v = LevelVar(master, name, ffmt % level)
            Tkinter.Label(master, text=name).grid(row=i, column=0, sticky="w")
            e = Tkinter.Scale(master, orient=Tkinter.HORIZONTAL,
                              from_=-mm, to=mm, resolution=DELTA,
                              showvalue=0, variable=v)
            e.grid(row=i, column=1, sticky="ew")
            v.bindscrollwheel(e)
            e = Tkinter.Entry(master, textvariable=v, width=4)
            e.grid(row=i, column=2, sticky="e")
            v.bindscrollwheel(e)
            master.columnconfigure(1, weight=1)
    fillmaster()
    bottom = Tkinter.Frame(top, padx=5)
    Tkinter.Label(bottom, text="+/-").pack(side=Tkinter.LEFT)
    mmentry = Tkinter.Entry(bottom, textvariable=mmvar, width=4)
    mmentry.pack(side=Tkinter.LEFT)
    refresh = Tkinter.Button(bottom, text="Refresh", command=fillmaster)
    refresh.pack(side=Tkinter.LEFT)
    bottom.pack(side=Tkinter.BOTTOM, fill="x", expand=1)
Esempio n. 8
0
def fetchdialog():
    from Tkinter import LEFT, RIGHT, TOP, BOTTOM

    app = plugins.get_pmgapp()
    root = plugins.get_tk_root()

    self = Tkinter.Toplevel(root)
    self.title('PDB Loader Service')
    self.minsize(250, 0)
    self.resizable(0,0)
    outer = self

    pad = 4

    type_options = [
        "pdb (Asymmetric Unit)",
        "pdb1 (Biological Unit)",
        "2fofc (Density)",
        "fofc (Difference Density)",
        "cid (PubChem Compound)",
        "sid (PubChem Substance)",
        "emd (EMDB Density)",
    ]

    var_code = Tkinter.StringVar(self)
    var_chain = Tkinter.StringVar(self)
    var_type = Tkinter.StringVar(self, type_options[0])
    var_keep = Tkinter.BooleanVar(self,
            not cmd.get_setting_boolean('autoclose_dialogs'))

    def callback(*args):
        code = var_code.get()
        type = get_trunc(var_type)
        if type == 'pdb':
            code += var_chain.get()
        try:
            result = cmd.fetch(code, type=type)
            if result == -1:
                raise CmdException('You entered an invalid pdb code: ' + code)
        except CmdException as e:
            import tkMessageBox
            tkMessageBox.showerror('Error', str(e), parent=self)
            return
        cmd.log('fetch %s, type=%s, async=0\n' % (code, type))
        if not var_keep.get():
            self.destroy()

    def callback_type(*args):
        v = get_trunc(var_type)
        if v.startswith('pdb') or v.endswith('fofc'):
            but_code.configure(width=4)
        else:
            but_code.configure(width=20)
        if v == 'pdb':
            frame_pdb.pack(side=LEFT)
        else:
            frame_pdb.pack_forget()

    def makerow(label=None, parent=None, **kwargs):
        master = Tkinter.Frame(parent or outer)
        master.pack(fill=Tkinter.X, **kwargs)
        if label:
            Tkinter.Label(master, text=label).pack(side=LEFT)
        return master

    padkw = {'padx': pad, 'pady': (pad, 0)}

    master = makerow("Type:", **padkw)
    but_type = Tkinter.OptionMenu(master, var_type, *type_options,
            command=callback_type).pack(side=LEFT)

    master = makerow("Code:", **padkw)
    but_code = Tkinter.Entry(master, textvariable=var_code, width=4)
    but_code.bind("<Return>", callback)
    but_code.pack(side=LEFT)

    frame_pdb = makerow("Chain:", master, side=LEFT, padx=8)
    but_chain = Tkinter.Entry(frame_pdb, textvariable=var_chain, width=4)
    but_chain.bind("<Return>", callback)
    but_chain.pack(side=LEFT)

    master = makerow(padx=pad, pady=(2*pad,0))
    but_ok = Tkinter.Button(master, width=10, text="OK",
            command=callback)
    but_cancel = Tkinter.Button(master, width=10, text="Cancel",
            command=self.destroy)

    but_cancel.pack(side=RIGHT, fill=Tkinter.X)
    but_ok.pack(side=RIGHT, fill=Tkinter.X)

    master = makerow(padx=pad, pady=(2,pad))
    but_keep = Tkinter.Checkbutton(master, text="Keep dialog open", variable=var_keep)
    but_keep.pack(side=RIGHT)

    but_code.focus_set()
Esempio n. 9
0
 def errorfn(self, msg, parent=None):
     tkMessageBox.showinfo('EPPIC Interface Loader Service',
                           msg,
                           parent=(parent or plugins.get_tk_root()))
Esempio n. 10
0
			def errorfn(self,msg,parent=None):
				tkMessageBox.showinfo('EPPIC Interface Loader Service', msg,
						parent=(parent or plugins.get_tk_root()) )
def _BaseWidget_setup(self, master, cnf):
    if not master and not tkinter._default_root:
        from pymol import plugins
        tkinter._default_root = plugins.get_tk_root()
    return _BaseWidget_setup._super(self, master, cnf)
Esempio n. 12
0
            'surface_apolar_best_volume', 'surface_donor_best_volume',
            'surface_acceptor_best_volume'
        ]
    }
}
surface_max_list = {
    'hotspot': {
        'fhm': 39.0,
        'buriedness': 8
    },
    'best_volume': {
        'fhm': 39.0
    }
}

top = tk.Toplevel(plugins.get_tk_root())

master = tk.Frame(top, padx=10, pady=10)
master.pack(fill="both", expand=1)

for child in list(master.children.values()):
    child.destroy()

row_counter = 0
for identifier, component_dic in surface_list.items():
    # add calculation identifier
    tk.Label(master, text=identifier).grid(row=row_counter,
                                           column=0,
                                           sticky="w")
    row_counter += 1
Esempio n. 13
0
def _BaseWidget_setup(self, master, cnf):
    if not master and not tkinter._default_root:
        from pymol import plugins
        tkinter._default_root = plugins.get_tk_root()
    return _BaseWidget_setup._super(self, master, cnf)
Esempio n. 14
0
def NMR_GUI():
    from pymol import plugins
    root = plugins.get_tk_root()
    app = plugins.get_pmgapp()
    pyNMR.startGUI(Tk.Toplevel(root))
Esempio n. 15
0
def fetchdialog():
    app = plugins.get_pmgapp()
    root = plugins.get_tk_root()

    self = Tkinter.Toplevel(root)
    self.title('PDB Loader Service')
    self.minsize(250, 0)
    self.resizable(0, 0)
    outer = self

    pad = 4

    type_options = [
        "cif (mmCIF)",
        "pdb (Asymmetric Unit)",
        "pdb1 (Biological Unit)",
        "2fofc (Density)",
        "fofc (Difference Density)",
        "cid (PubChem Compound)",
        "sid (PubChem Substance)",
        "emd (EMDB Density)",
        "cc (Chemical Component)",
    ]

    var_code = Tkinter.StringVar(self)
    var_chain = Tkinter.StringVar(self)
    var_assembly = Tkinter.StringVar(self, cmd.get('assembly'))
    var_name = Tkinter.StringVar(self)
    var_type = Tkinter.StringVar(self, type_options[0])
    var_keep = Tkinter.BooleanVar(
        self, not cmd.get_setting_boolean('autoclose_dialogs'))

    def callback(*args):
        code = var_code.get()
        type = get_trunc(var_type)
        if type in ('pdb', 'cif'):
            code += var_chain.get()
        if type == 'cif':
            cmd.set('assembly', var_assembly.get())
        try:
            result = cmd.fetch(code, var_name.get(), type=type)
            if result == -1:
                raise CmdException('You entered an invalid pdb code: ' + code)
        except CmdException as e:
            tkMessageBox.showerror('Error', str(e), parent=self)
            return
        cmd.log('fetch %s, type=%s, async=0\n' % (code, type))
        if not var_keep.get():
            self.destroy()

    def callback_type(*args):
        v = get_trunc(var_type)
        if v.startswith('pdb') or v.endswith('fofc') or v.startswith('cif'):
            but_code.configure(width=4)
        else:
            but_code.configure(width=20)
        if v in ('pdb', 'cif'):
            frame_pdb.pack(side=LEFT)
        else:
            frame_pdb.pack_forget()
        if v == 'cif':
            frame_assembly.pack(side=LEFT)
        else:
            frame_assembly.pack_forget()

    def makerow(label=None, parent=None, **kwargs):
        master = Tkinter.Frame(parent or outer)
        master.pack(fill=Tkinter.X, **kwargs)
        if label:
            Tkinter.Label(master, text=label).pack(side=LEFT)
        return master

    padkw = {'padx': pad, 'pady': (pad, 0)}

    master = makerow("Type:", **padkw)
    but_type = Tkinter.OptionMenu(master,
                                  var_type,
                                  *type_options,
                                  command=callback_type).pack(side=LEFT)

    master = makerow("Code:", **padkw)
    but_code = Tkinter.Entry(master, textvariable=var_code, width=4)
    but_code.bind("<Return>", callback)
    but_code.pack(side=LEFT)

    frame_pdb = makerow("Chain:", master, side=LEFT, padx=8)
    but_chain = Tkinter.Entry(frame_pdb, textvariable=var_chain, width=4)
    but_chain.bind("<Return>", callback)
    but_chain.pack(side=LEFT)

    frame_assembly = makerow("Assembly:", master, side=LEFT, padx=8)
    but_assembly = Tkinter.Entry(frame_assembly,
                                 textvariable=var_assembly,
                                 width=4)
    but_assembly.bind("<Return>", callback)
    but_assembly.pack(side=LEFT)

    frame_name = makerow("Name of new object:", **padkw)
    but_name = Tkinter.Entry(frame_name, textvariable=var_name, width=8)
    but_name.bind("<Return>", callback)
    but_name.pack(side=LEFT)

    master = makerow(padx=pad, pady=(2 * pad, 0))
    but_ok = Tkinter.Button(master, width=10, text="OK", command=callback)
    but_cancel = Tkinter.Button(master,
                                width=10,
                                text="Cancel",
                                command=self.destroy)

    but_cancel.pack(side=RIGHT, fill=Tkinter.X)
    but_ok.pack(side=RIGHT, fill=Tkinter.X)

    master = makerow(padx=pad, pady=(2, pad))
    but_keep = Tkinter.Checkbutton(master,
                                   text="Keep dialog open",
                                   variable=var_keep)
    but_keep.pack(side=RIGHT)

    but_code.focus_set()
Esempio n. 16
0
def isoslider(mm_min=0.0, mm_max=1.0):
    '''
    DESCRIPTION

    Opens a dialog with isolevel sliders for all isomesh and isosurface
    objects in PyMOL.
    '''
    mm_min = float(mm_min)
    mm_max = float(mm_max)
    top = Tkinter.Toplevel(plugins.get_tk_root())
    master = Tkinter.Frame(top, padx=5, pady=5)
    master.pack(fill="both", expand=1)
    mmvar = Tkinter.DoubleVar(top, value=mm_min)

    def fillmaster():
        ffmt = '{:.' + str(DIGITS) + 'f}'
        for child in list(master.children.values()):
            child.destroy()

        mm = mmvar.get()
        mmf = Tkinter.Frame(master)
        Tkinter.Label(mmf, text=ffmt.format(mm_min)).grid(row=0,
                                                          column=0,
                                                          sticky='w')
        Tkinter.Label(mmf, text=ffmt.format(
            (mm_max + mm_min) / 2)).grid(row=0, column=1)
        Tkinter.Label(mmf, text=ffmt.format(mm_max)).grid(row=0,
                                                          column=2,
                                                          sticky='e')
        mmf.grid(row=0, column=1, sticky='ew')
        mmf.columnconfigure(1, weight=1)

        names = []
        for i, (name, level) in enumerate(get_isoobjects(), 1):
            names.append(name)
            continue

            v = LevelVar(master, name, ffmt.format(level))
            Tkinter.Label(master, text=name).grid(row=i + 2,
                                                  column=0,
                                                  sticky="w")
            e = Tkinter.Scale(master,
                              orient=Tkinter.HORIZONTAL,
                              from_=mm_min,
                              to=mm_max,
                              resolution=DELTA,
                              showvalue=0,
                              variable=v)
            e.grid(row=i + 2, column=1, sticky="ew")
            v.bindscrollwheel(e)
            e = Tkinter.Entry(master, textvariable=v, width=6)
            e.grid(row=i + 2, column=2, sticky="e")
            v.bindscrollwheel(e)
            master.columnconfigure(1, weight=1)

        v = GroupLevelVar(master, names, ffmt.format(mm_min))
        Tkinter.Label(master, text='all').grid(row=1, column=0, sticky="w")
        e = Tkinter.Scale(master,
                          orient=Tkinter.HORIZONTAL,
                          from_=mm_min,
                          to=mm_max,
                          resolution=DELTA,
                          showvalue=0,
                          variable=v)
        e.grid(row=1, column=1, sticky="ew")
        v.bindscrollwheel(e)
        e = Tkinter.Entry(master, textvariable=v, width=6)
        e.grid(row=1, column=2, sticky="e")
        v.bindscrollwheel(e)
        master.columnconfigure(1, weight=1)

    fillmaster()

    bottom = Tkinter.Frame(top, padx=5)
    Tkinter.Label(bottom, text="+/-").pack(side=Tkinter.LEFT)
    mmentry = Tkinter.Entry(bottom, textvariable=mmvar, width=6)
    mmentry.pack(side=Tkinter.LEFT)
    refresh = Tkinter.Button(bottom, text="Refresh", command=fillmaster)
    refresh.pack(side=Tkinter.LEFT)
    bottom.pack(side=Tkinter.BOTTOM, fill="x", expand=1)
Esempio n. 17
0
def fetchdialog(simulation=False):
    if simulation:
        root = Tkinter.Tk()
    else:
        app = plugins.get_pmgapp()
        root = plugins.get_tk_root()

    appData = {"cifDir": False}

    mainWindow = Tkinter.Toplevel(root)
    #    self = VerticalScrolledFrame(root)
    mainWindow.title('Supramolecular analyser')
    mainWindow.minsize(1335, 400)

    mainWindow.resizable(1, 1)

    #    self = VerticalScrolledFrame(self)
    canvas = Tkinter.Canvas(mainWindow, width=1320, height=900)
    canvas.grid(row=0, column=0, columnspan=50)

    mainScrollbar = Tkinter.Scrollbar(mainWindow,
                                      orient="vertical",
                                      command=canvas.yview)
    mainScrollbar.grid(row=0, column=50, rowspan=1)

    def moveDown(event):
        canvas.yview_scroll(1, "units")

    def moveUp(event):
        canvas.yview_scroll(-1, "units")
#

    canvas.configure(yscrollcommand=mainScrollbar.set)
    #    canvas.configure(scrollregion = canvas.bbox("all"))
    canvas.configure(scrollregion=(0, 0, 1320, 1800))
    canvas.bind_all("<Down>", moveDown)
    canvas.bind_all("<Up>", moveUp)

    self = Tkinter.Frame(canvas, width=1320, height=900)
    canvas.create_window((0, 0), window=self, anchor='nw')

    nb = ttk.Notebook(self, height=700, width=1320)

    pageAnionPi = ttk.Frame(nb)
    pagePiPi = ttk.Frame(nb)
    pageCationPi = ttk.Frame(nb)
    pageAnionCation = ttk.Frame(nb)
    pageHBonds = ttk.Frame(nb)
    pageMetalLigand = ttk.Frame(nb)
    pageLinearAnionPi = ttk.Frame(nb)
    pagePlanarAnionPi = ttk.Frame(nb)
    pageQM = ttk.Frame(nb)
    pageJobStatus = ttk.Frame(nb)

    nb.add(pageAnionPi, text="AnionPi")
    nb.add(pagePiPi, text="PiPi")
    nb.add(pageCationPi, text="CationPi")
    nb.add(pageAnionCation, text="AnionCation")
    nb.add(pageHBonds, text="HBonds")
    nb.add(pageMetalLigand, text="MetalLigand")
    nb.add(pageLinearAnionPi, text="LinearAnionPi")
    nb.add(pagePlanarAnionPi, text="PlanarAnionPi")
    nb.add(pageQM, text="QM assistant")
    nb.add(pageJobStatus, text="Job monitor")

    nb.grid(column=0, row=0, columnspan=20)

    supramolecularComposition = SupramolecularComposition(
        pageAnionPi, pagePiPi, pageCationPi, pageAnionCation, pageHBonds,
        pageMetalLigand, pageLinearAnionPi, pagePlanarAnionPi, pageQM,
        pageJobStatus)

    ######################
    # GENERAL
    ######################

    def readLogDir():
        appData["logDir"] = tkFileDialog.askdirectory()
        if not appData["logDir"]:
            print("nihuhu")
            return

        ent_logDir.configure(state="normal")
        ent_logDir.delete(0, "end")
        ent_logDir.insert(0, appData["logDir"])
        ent_logDir.configure(state="readonly")

        supramolecularComposition.readAllLogsFromDir(appData["logDir"])

    but_readLogDir = Tkinter.Button(self,
                                    width=20,
                                    text="Read log Dir",
                                    command=readLogDir)
    but_readLogDir.grid(row=2, column=0, columnspan=2)

    ent_logDir = Tkinter.Entry(self, width=45)
    ent_logDir.configure(state="readonly")
    ent_logDir.grid(row=2, column=2, columnspan=4)

    def selectCif():
        appData["cifDir"] = tkFileDialog.askdirectory()
        if not appData["cifDir"]:
            print("nihuhu")
            return

        ent_cifDir.configure(state="normal")
        ent_cifDir.delete(0, "end")
        ent_cifDir.insert(0, appData["cifDir"])
        ent_cifDir.configure(state="readonly")

        supramolecularComposition.selectCifDir(appData["cifDir"])

    but_cifDir = Tkinter.Button(self,
                                width=10,
                                command=selectCif,
                                text="Cif dir")
    but_cifDir.grid(row=2, column=6)

    ent_cifDir = Tkinter.Entry(self, width=45)
    ent_cifDir.configure(state="readonly")
    ent_cifDir.grid(row=2, column=7, columnspan=3)

    def setParellelSelection():
        state = var_parallelSelection.get()
        supramolecularComposition.setParallelSelection(state)

    lab_parallelSelection = Tkinter.Label(self, text="Parallel selection")
    lab_parallelSelection.grid(row=2, column=10)

    var_parallelSelection = Tkinter.IntVar()
    chk_parallelSelection = Tkinter.Checkbutton(self,
                                                variable=var_parallelSelection,
                                                command=setParellelSelection)
    chk_parallelSelection.grid(row=2, column=11)

    actionMenu = {}

    column = 1

    lab_usePage = Tkinter.Label(self, width=10, text="Use:")
    lab_usePage.grid(row=4, column=0)

    lab_doNotUsePage = Tkinter.Label(self, width=10, text="Exclude:")
    lab_doNotUsePage.grid(row=5, column=0)

    for label in supramolecularComposition.actionLabels:
        actionMenu[label] = {}

        actionMenu[label]["label"] = Tkinter.Label(self, text=label)
        actionMenu[label]["label"].grid(row=3, column=column)

        actual_row = 4

        actionMenu[label]["checkValue"] = Tkinter.IntVar()
        actionMenu[label]["checkbox"] = Tkinter.Checkbutton(
            self, variable=actionMenu[label]["checkValue"])
        actionMenu[label]["checkbox"].grid(row=actual_row, column=column)

        actual_row += 1

        actionMenu[label]["checkValueExclude"] = Tkinter.IntVar()
        actionMenu[label]["checkboxExclude"] = Tkinter.Checkbutton(
            self, variable=actionMenu[label]["checkValueExclude"])
        actionMenu[label]["checkboxExclude"].grid(row=actual_row,
                                                  column=column)

        column += 1

    lab_showInt = Tkinter.Label(self, width=10, text="Show:")
    lab_showInt.grid(row=6, column=0)

    showMenu = {}
    column = 1

    for label in supramolecularComposition.actionLabels:
        showMenu[label] = {}

        showMenu[label]["checkValue"] = Tkinter.IntVar()
        showMenu[label]["checkbox"] = Tkinter.Checkbutton(
            self, variable=showMenu[label]["checkValue"])
        showMenu[label]["checkbox"].grid(row=6, column=column)

        column += 1

    def mergeResults():
        supramolecularComposition.merge(actionMenu)

    ent_recordingState = Tkinter.Entry(self, width=20)
    ent_recordingState.grid(row=3, column=9, columnspan=2)
    ent_recordingState.insert(0, "Not recording")
    ent_recordingState.configure(state="readonly")

    def startRecording():
        ent_recordingState.configure(state="normal")
        ent_recordingState.delete(0, "end")
        ent_recordingState.insert(0, "Recording")
        ent_recordingState.configure(state="readonly")

        supramolecularComposition.startRecording()

    but_startRecording = Tkinter.Button(self,
                                        width=20,
                                        text="Start recording",
                                        command=startRecording)
    but_startRecording.grid(row=3, column=11, columnspan=2)

    def stopRecording():
        ent_recordingState.configure(state="normal")
        ent_recordingState.delete(0, "end")
        ent_recordingState.insert(0, "Not recording")
        ent_recordingState.configure(state="readonly")

        supramolecularComposition.stopRecording()

    but_stopRecording = Tkinter.Button(self,
                                       width=20,
                                       text="Stop recording",
                                       command=stopRecording)
    but_stopRecording.grid(row=4, column=11, columnspan=2)

    but_merge = Tkinter.Button(self,
                               width=20,
                               text="Merge!",
                               command=mergeResults)
    but_merge.grid(row=5, column=9, columnspan=2)

    def showAllInteractions():
        supramolecularComposition.showAll(showMenu)

    but_showMany = Tkinter.Button(self,
                                  width=20,
                                  text="Show",
                                  command=showAllInteractions)
    but_showMany.grid(row=6, column=9, columnspan=2)

    but_saveState = Tkinter.Button(self,
                                   width=20,
                                   text="Save GUI state",
                                   command=supramolecularComposition.saveState)
    but_saveState.grid(row=5, column=11, columnspan=2)

    but_loadState = Tkinter.Button(self,
                                   width=20,
                                   text="Load GUI state",
                                   command=supramolecularComposition.loadState)
    but_loadState.grid(row=6, column=11, columnspan=2)

    #INDYVIDUALS
    lab_anionGroupAsIndyviduals = Tkinter.Label(
        self, width=30, text="Anion's groups as indyviduals:")
    lab_anionGroupAsIndyviduals.grid(row=7, column=1, columnspan=3)

    chk_anionGroupsAsIndyviduals = Tkinter.Checkbutton(
        self, variable=supramolecularComposition.anionsAsIndyviduals)
    chk_anionGroupsAsIndyviduals.grid(row=7, column=4)

    lab_ringsAsIndyviduals = Tkinter.Label(
        self, width=30, text="Residues's rings as indyviduals:")
    lab_ringsAsIndyviduals.grid(row=7, column=5, columnspan=2)

    chk_ringsAsIndyviduals = Tkinter.Checkbutton(
        self, variable=supramolecularComposition.residuesRingsAsIndyviduals)
    chk_ringsAsIndyviduals.grid(row=7, column=7)
    ######################
    # ALL
    ######################

    supramolecularComposition.grid()
    #    canvas.configure(scrollregion = canvas.bbox("all"))

    if simulation:
        self.mainloop()