pKaTool/pKaTool_main.py
def update_selected_groups(self):
        """Update the display in the main window - both the list of groups, and the drawing of titration curves"""
        #
        # Sort
        #
        self.selected_groups.sort()
        self.selected.delete(0, END)
        for group in self.selected_groups:
            self.selected.insert(END,group)
        #
        # Copy it to the master array
        #
        self.calcs[self.current_selected_calc]['selected_groups']=self.selected_groups[:]
        #
        # Redraw the titration curves
        #
        curves={}
        for calc in self.calcs.keys():
            if self.calc_disp[calc].get()==1:
                tit_curvs=self.calcs[calc]['titcurv']
                for group in self.calcs[calc]['selected_groups']:
                    label=self.calcs[calc]['label']
                    try:
                        curves[label+':'+group]=tit_curvs[group].copy()
                    except:
                        print 'Could not find group'
                        print self.titration_curves.keys()
                        raise Exception('Could not find group!: %s' %group)
        #
        # Update the drawing of curves
        #
        self.update_curves(curves,labels=1)
        #
        # If we are showing the stability curve, then update that one too
        #
        stab_status=self.stability_var.get()
        if stab_status=='on':
            self.do_stab_curve()
        return
Update the display in the main window - both the list of groups, and the drawing of titration curves
Update the display in the main window - both the list of groups, and the drawing of titration curves
Update the display in the main window - both the list of groups and the drawing of titration curves
def update_selected_groups(self):
         Sort
        self.selected_groups.sort()
        self.selected.delete(0, END)
        for group in self.selected_groups:
            self.selected.insert(END,group)
         Copy it to the master array
        self.calcs[self.current_selected_calc]['selected_groups']=self.selected_groups[:]
         Redraw the titration curves
        curves={}
        for calc in self.calcs.keys():
            if self.calc_disp[calc].get()==1:
                tit_curvs=self.calcs[calc]['titcurv']
                for group in self.calcs[calc]['selected_groups']:
                    label=self.calcs[calc]['label']
                    try:
                        curves[label+':'+group]=tit_curvs[group].copy()
                    except:
                        print 'Could not find group'
                        print self.titration_curves.keys()
                        raise Exception('Could not find group!: %s' %group)
         Update the drawing of curves
        self.update_curves(curves,labels=1)
         If we are showing the stability curve, then update that one too
        stab_status=self.stability_var.get()
        if stab_status=='on':
            self.do_stab_curve()
        return
def update_selected_groups ( self ) : self . selected_groups . sort ( ) self . selected . delete ( 0 , END ) for group in self . selected_groups : self . selected . insert ( END , group ) self . calcs [ self . current_selected_calc ] [ 'selected_groups' ] = self . selected_groups [ : ] curves = { } for calc in self . calcs . keys ( ) : if self . calc_disp [ calc ] . get ( ) == 1 : tit_curvs = self . calcs [ calc ] [ 'titcurv' ] for group in self . calcs [ calc ] [ 'selected_groups' ] : label = self . calcs [ calc ] [ 'label' ] try : curves [ label + ':' + group ] = tit_curvs [ group ] . copy ( ) except : print 'Could not find group' print self . titration_curves . keys ( ) raise Exception ( 'Could not find group!: %s' % group ) self . update_curves ( curves , labels = 1 ) stab_status = self . stability_var . get ( ) if stab_status == 'on' : self . do_stab_curve ( ) return
Update the display in the main window - both the list of groups, and the drawing of titration curves
Update the display in the main window - both the list of groups and the drawing of titration curves
"""Update the display in the main window - both the list of groups, and the drawing of titration curves""" # # Sort # # # Copy it to the master array # # # Redraw the titration curves # # # Update the drawing of curves # # # If we are showing the stability curve, then update that one too #
self