pKaTool/pKacalc_interface.py
def calculate_matrix_dialog(self):
        """Open a dialog for calculating or entering energies for the interaction energy matrix"""
        if not self.pdbfilename:
            tkMessageBox.showwarning('No PDB file',
                                     'You must load a PDB file before you can calculate the matrix')
            return
        #
        # Open the window
        #
        self.mwin=Toplevel()
        self.mwin.title('Interaction energy matrix')
        self.set_geometry(self.master,self.mwin)
        #
        # Canvas for the matrix
        #
        self.matrix_canvas=Pmw.ScrolledCanvas(self.mwin,
                                              borderframe = 1,
                                              labelpos = 'n',
                                              label_text = 'Interaction energy matrix',
                                              usehullsize = 1,
                                              hull_width = 800,
                                              hull_height = 800,
                                              hscrollmode='dynamic',
                                              vscrollmode='dynamic'
        )
        self.matrix_canvas.interior().configure(bg='white')
        self.matrix_canvas.grid(row=0,column=0,rowspan=10,columnspan=10,sticky='news')
        #
        # Buttons for the calculation engine
        #
        self.set_enecalc_engine(win=self.mwin,row=11,column=0)
        #
        # What do we display?
        #
        row=11
        Label(self.mwin,text='Display').grid(row=row,column=3)
        self.m_display=StringVar()
        for disp in ['Interaction energy (kT/e)','Interaction energy (dpKa)','Distance (A)','eps(effective)']:
            Radiobutton(self.mwin,variable=self.m_display,value=disp,text=disp,
                        activebackground='red',command=self.update_matrix_display).grid(row=row+1,column=3,sticky='nws')
            row=row+1
        self.m_display.set('Interaction energy (kT/e)')
        #
        # Add action buttons
        #
        row=row+1
        Button(self.mwin,text='Close',command=self.mwin.destroy).grid(row=row,column=0)
        Button(self.mwin,text='Recalculate matrix',command=self.calculate_matrix_driver).grid(row=row,column=1)
        #
        # Status field
        #
        self.status=StringVar()
        self.status.set('Waiting...')
        Label(self.mwin,text='Status:',bg='white').grid(row=14,column=0,sticky='news')
        Label(self.mwin,textvariable=self.status,bg='white').grid(row=14,column=1,sticky='news')
        #
        # Update the display
        #
        self.update_matrix_display()
        #
        # Make sure that the sliders are in place
        #
        self.matrix_canvas.resizescrollregion()
        return
Open a dialog for calculating or entering energies for the interaction energy matrix
Open a dialog for calculating or entering energies for the interaction energy matrix
Open a dialog for calculating or entering energies for the interaction energy matrix
def calculate_matrix_dialog(self):
        if not self.pdbfilename:
            tkMessageBox.showwarning('No PDB file',
                                     'You must load a PDB file before you can calculate the matrix')
            return
         Open the window
        self.mwin=Toplevel()
        self.mwin.title('Interaction energy matrix')
        self.set_geometry(self.master,self.mwin)
         Canvas for the matrix
        self.matrix_canvas=Pmw.ScrolledCanvas(self.mwin,
                                              borderframe = 1,
                                              labelpos = 'n',
                                              label_text = 'Interaction energy matrix',
                                              usehullsize = 1,
                                              hull_width = 800,
                                              hull_height = 800,
                                              hscrollmode='dynamic',
                                              vscrollmode='dynamic'
        )
        self.matrix_canvas.interior().configure(bg='white')
        self.matrix_canvas.grid(row=0,column=0,rowspan=10,columnspan=10,sticky='news')
         Buttons for the calculation engine
        self.set_enecalc_engine(win=self.mwin,row=11,column=0)
         What do we display?
        row=11
        Label(self.mwin,text='Display').grid(row=row,column=3)
        self.m_display=StringVar()
        for disp in ['Interaction energy (kT/e)','Interaction energy (dpKa)','Distance (A)','eps(effective)']:
            Radiobutton(self.mwin,variable=self.m_display,value=disp,text=disp,
                        activebackground='red',command=self.update_matrix_display).grid(row=row+1,column=3,sticky='nws')
            row=row+1
        self.m_display.set('Interaction energy (kT/e)')
         Add action buttons
        row=row+1
        Button(self.mwin,text='Close',command=self.mwin.destroy).grid(row=row,column=0)
        Button(self.mwin,text='Recalculate matrix',command=self.calculate_matrix_driver).grid(row=row,column=1)
         Status field
        self.status=StringVar()
        self.status.set('Waiting...')
        Label(self.mwin,text='Status:',bg='white').grid(row=14,column=0,sticky='news')
        Label(self.mwin,textvariable=self.status,bg='white').grid(row=14,column=1,sticky='news')
         Update the display
        self.update_matrix_display()
         Make sure that the sliders are in place
        self.matrix_canvas.resizescrollregion()
        return
def calculate_matrix_dialog ( self ) : if not self . pdbfilename : tkMessageBox . showwarning ( 'No PDB file' , 'You must load a PDB file before you can calculate the matrix' ) return self . mwin = Toplevel ( ) self . mwin . title ( 'Interaction energy matrix' ) self . set_geometry ( self . master , self . mwin ) self . matrix_canvas = Pmw . ScrolledCanvas ( self . mwin , borderframe = 1 , labelpos = 'n' , label_text = 'Interaction energy matrix' , usehullsize = 1 , hull_width = 800 , hull_height = 800 , hscrollmode = 'dynamic' , vscrollmode = 'dynamic' ) self . matrix_canvas . interior ( ) . configure ( bg = 'white' ) self . matrix_canvas . grid ( row = 0 , column = 0 , rowspan = 10 , columnspan = 10 , sticky = 'news' ) self . set_enecalc_engine ( win = self . mwin , row = 11 , column = 0 ) row = 11 Label ( self . mwin , text = 'Display' ) . grid ( row = row , column = 3 ) self . m_display = StringVar ( ) for disp in [ 'Interaction energy (kT/e)' , 'Interaction energy (dpKa)' , 'Distance (A)' , 'eps(effective)' ] : Radiobutton ( self . mwin , variable = self . m_display , value = disp , text = disp , activebackground = 'red' , command = self . update_matrix_display ) . grid ( row = row + 1 , column = 3 , sticky = 'nws' ) row = row + 1 self . m_display . set ( 'Interaction energy (kT/e)' ) row = row + 1 Button ( self . mwin , text = 'Close' , command = self . mwin . destroy ) . grid ( row = row , column = 0 ) Button ( self . mwin , text = 'Recalculate matrix' , command = self . calculate_matrix_driver ) . grid ( row = row , column = 1 ) self . status = StringVar ( ) self . status . set ( 'Waiting...' ) Label ( self . mwin , text = 'Status:' , bg = 'white' ) . grid ( row = 14 , column = 0 , sticky = 'news' ) Label ( self . mwin , textvariable = self . status , bg = 'white' ) . grid ( row = 14 , column = 1 , sticky = 'news' ) self . update_matrix_display ( ) self . matrix_canvas . resizescrollregion ( ) return
Open a dialog for calculating or entering energies for the interaction energy matrix
Open a dialog for calculating or entering energies for the interaction energy matrix
"""Open a dialog for calculating or entering energies for the interaction energy matrix""" # # Open the window # # # Canvas for the matrix # # # Buttons for the calculation engine # # # What do we display? # # # Add action buttons # # # Status field # # # Update the display # # # Make sure that the sliders are in place #
self