pKaTool/pKa_system_data_manipulation.py
def pack_all_data(self):
        """Pack all data in a dictionary"""
        #
        # Dictionary for storing everything
        #
        pKaTool_data = {}
        #
        # Store groups
        #
        pKaTool_data['groups'] = {}
        no_groups = len(self.groups)
        pKaTool_data['no_groups'] = no_groups
        
        for i in range(no_groups):
            pKaTool_data['groups'][i] = {}
            pKaTool_data['groups'][i]['pka'] = self.groups[i].intpka.get()
            pKaTool_data['groups'][i]['name'] = self.groups[i].name.get()
            pKaTool_data['groups'][i]['ab'] = self.groups[i].acid_base.get()
            for j in self.groups[i].intenes.keys():
                pKaTool_data['groups'][i][j] = self.groups[i].intenes[j].get()
        #
        # Store experimental data
        #
        import copy
        if getattr(self,'titration_data',None):
            pKaTool_data['titration_data'] = copy.deepcopy(self.titration_data)
        #
        # store pH-activity profile
        #
        if getattr(self,'activity_data',None):
            pKaTool_data['pH-activity profile'] = copy.deepcopy(self.activity_data)
            pKaTool_data['CCPS'] = {}
            for state in self.act_state.keys():
                pKaTool_data['CCPS'][state]=self.act_state[state].get()

        #
        # store FTIR data
        #
        if getattr(self,'FTIR_win',None):
            if len(self.FTIR_win.ftir_data)>0:
                pKaTool_data['FTIR data'] = copy.deepcopy(self.FTIR_win.ftir_data)
                pKaTool_data['FTIR data offset'] = self.FTIR_win.offset.get()
                pKaTool_data['FTIR data c'] = self.FTIR_win.c.get()
                
                
        return pKaTool_data
Pack all data in a dictionary
Pack all data in a dictionary
Pack all data in a dictionary
def pack_all_data(self):
         Dictionary for storing everything
        pKaTool_data = {}
         Store groups
        pKaTool_data['groups'] = {}
        no_groups = len(self.groups)
        pKaTool_data['no_groups'] = no_groups
        for i in range(no_groups):
            pKaTool_data['groups'][i] = {}
            pKaTool_data['groups'][i]['pka'] = self.groups[i].intpka.get()
            pKaTool_data['groups'][i]['name'] = self.groups[i].name.get()
            pKaTool_data['groups'][i]['ab'] = self.groups[i].acid_base.get()
            for j in self.groups[i].intenes.keys():
                pKaTool_data['groups'][i][j] = self.groups[i].intenes[j].get()
         Store experimental data
        import copy
        if getattr(self,'titration_data',None):
            pKaTool_data['titration_data'] = copy.deepcopy(self.titration_data)
         store pH-activity profile
        if getattr(self,'activity_data',None):
            pKaTool_data['pH-activity profile'] = copy.deepcopy(self.activity_data)
            pKaTool_data['CCPS'] = {}
            for state in self.act_state.keys():
                pKaTool_data['CCPS'][state]=self.act_state[state].get()
         store FTIR data
        if getattr(self,'FTIR_win',None):
            if len(self.FTIR_win.ftir_data)>0:
                pKaTool_data['FTIR data'] = copy.deepcopy(self.FTIR_win.ftir_data)
                pKaTool_data['FTIR data offset'] = self.FTIR_win.offset.get()
                pKaTool_data['FTIR data c'] = self.FTIR_win.c.get()
        return pKaTool_data
def pack_all_data ( self ) : pKaTool_data = { } pKaTool_data [ 'groups' ] = { } no_groups = len ( self . groups ) pKaTool_data [ 'no_groups' ] = no_groups for i in range ( no_groups ) : pKaTool_data [ 'groups' ] [ i ] = { } pKaTool_data [ 'groups' ] [ i ] [ 'pka' ] = self . groups [ i ] . intpka . get ( ) pKaTool_data [ 'groups' ] [ i ] [ 'name' ] = self . groups [ i ] . name . get ( ) pKaTool_data [ 'groups' ] [ i ] [ 'ab' ] = self . groups [ i ] . acid_base . get ( ) for j in self . groups [ i ] . intenes . keys ( ) : pKaTool_data [ 'groups' ] [ i ] [ j ] = self . groups [ i ] . intenes [ j ] . get ( ) import copy if getattr ( self , 'titration_data' , None ) : pKaTool_data [ 'titration_data' ] = copy . deepcopy ( self . titration_data ) if getattr ( self , 'activity_data' , None ) : pKaTool_data [ 'pH-activity profile' ] = copy . deepcopy ( self . activity_data ) pKaTool_data [ 'CCPS' ] = { } for state in self . act_state . keys ( ) : pKaTool_data [ 'CCPS' ] [ state ] = self . act_state [ state ] . get ( ) if getattr ( self , 'FTIR_win' , None ) : if len ( self . FTIR_win . ftir_data ) > 0 : pKaTool_data [ 'FTIR data' ] = copy . deepcopy ( self . FTIR_win . ftir_data ) pKaTool_data [ 'FTIR data offset' ] = self . FTIR_win . offset . get ( ) pKaTool_data [ 'FTIR data c' ] = self . FTIR_win . c . get ( ) return pKaTool_data
Pack all data in a dictionary
Pack all data in a dictionary
"""Pack all data in a dictionary""" # # Dictionary for storing everything # # # Store groups # # # Store experimental data # # # store pH-activity profile # # # store FTIR data #
self