pKaTool/pKa_system_file_menu.py
def show_close(self, filename='close.txt'):
        """Displays close parameter sets found in a combinatorial scan"""
        import tkMessageBox
        if not getattr(self,'titration_data',None):
            tkMessageBox.showwarning('No titration curves loaded',
                                     'Make sure to load the titration curves used in the last combinatorial scan first')
            return
        try:
            lines = open(filename,'r')
        except:
            tkMessageBox.showwarning('Could not open file',
                                     'Could not open file %s'%filename)
            return

        record_vars = []
        self.close_vars = []

        first = 1
        for line in lines:
            if not line[0:1] == '#' and len(line) > 4:
                words = line.split()

                for i in range(len(words)):
                    words[i]=float(words[i])

                # record vars
                if first == 1:
                    record_vars = words
                    first = 0
                # close vars
                else:
                    self.close_vars.append(words)


        #print 'record_vars',record_vars
        #        print 'close_vars',close_vars

        self.close_vars.sort(lambda x,y: cmp(x[len(x)-2],y[len(y)-2]))

        #        for i in range(len(old)):
        #            print '--------------------------------------------'
        #            print close_vars[i]



        scd = Show_close_dialog(self)
        return
Displays close parameter sets found in a combinatorial scan
Displays close parameter sets found in a combinatorial scan
Displays close parameter sets found in a combinatorial scan
def show_close(self, filename='close.txt'):
        import tkMessageBox
        if not getattr(self,'titration_data',None):
            tkMessageBox.showwarning('No titration curves loaded',
                                     'Make sure to load the titration curves used in the last combinatorial scan first')
            return
        try:
            lines = open(filename,'r')
        except:
            tkMessageBox.showwarning('Could not open file',
                                     'Could not open file %s'%filename)
            return
        record_vars = []
        self.close_vars = []
        first = 1
        for line in lines:
            if not line[0:1] == '#' and len(line) > 4:
                words = line.split()
                for i in range(len(words)):
                    words[i]=float(words[i])
                if first == 1:
                    record_vars = words
                    first = 0
                else:
                    self.close_vars.append(words)
        self.close_vars.sort(lambda x,y: cmp(x[len(x)-2],y[len(y)-2]))
        scd = Show_close_dialog(self)
        return
def show_close ( self , filename = 'close.txt' ) : import tkMessageBox if not getattr ( self , 'titration_data' , None ) : tkMessageBox . showwarning ( 'No titration curves loaded' , 'Make sure to load the titration curves used in the last combinatorial scan first' ) return try : lines = open ( filename , 'r' ) except : tkMessageBox . showwarning ( 'Could not open file' , 'Could not open file %s' % filename ) return record_vars = [ ] self . close_vars = [ ] first = 1 for line in lines : if not line [ 0 : 1 ] == '#' and len ( line ) > 4 : words = line . split ( ) for i in range ( len ( words ) ) : words [ i ] = float ( words [ i ] ) if first == 1 : record_vars = words first = 0 else : self . close_vars . append ( words ) self . close_vars . sort ( lambda x , y : cmp ( x [ len ( x ) - 2 ] , y [ len ( y ) - 2 ] ) ) scd = Show_close_dialog ( self ) return
Displays close parameter sets found in a combinatorial scan
Displays close parameter sets found in a combinatorial scan
"""Displays close parameter sets found in a combinatorial scan""" # record vars # close vars #print 'record_vars',record_vars #        print 'close_vars',close_vars #        for i in range(len(old)): #            print '--------------------------------------------' #            print close_vars[i]
self
filename