pKa/analyse_pKa_values.py
def calculate_exsystem_dpKas(self):
        """Read the ex_system file and calculate the dpKas"""
        #
        # Calculate the ex_system values
        #
        self.ex_tits=self.do_ex_system()
        #
        # Load the file
        #
        # We have the titration curves, now we just calculate differences to the model pK titration curve
        #
        data={}
        groups=self.wt_pKas.keys()
        groups.sort()
        for removed_group in groups:
            data[removed_group]={}
            for tgroup in groups:
                if tgroup==removed_group:
                    continue
                tit_in_presence=self.ex_tits[removed_group][tgroup][tgroup]
                del tit_in_presence['pKa']
                pH_values=tit_in_presence.keys()
                pH_values.sort()
                tit_expresence=self.get_intpka_titcurv(tgroup,pH_values=pH_values) 
                pH_step=pH_values[1]-pH_values[0]
                diff=0.0
                for pH in pH_values:
                    diff=diff+(tit_expresence[pH]-tit_in_presence[pH])*pH_step
                if abs(diff)<0.1:
                    diff=0.0
                data[removed_group][tgroup]=diff
        return data
Read the ex_system file and calculate the dpKas
Read the ex_system file and calculate the dpKas
Read the ex_system file and calculate the dpKas
def calculate_exsystem_dpKas(self):
         Calculate the ex_system values
        self.ex_tits=self.do_ex_system()
         Load the file
         We have the titration curves, now we just calculate differences to the model pK titration curve
        data={}
        groups=self.wt_pKas.keys()
        groups.sort()
        for removed_group in groups:
            data[removed_group]={}
            for tgroup in groups:
                if tgroup==removed_group:
                    continue
                tit_in_presence=self.ex_tits[removed_group][tgroup][tgroup]
                del tit_in_presence['pKa']
                pH_values=tit_in_presence.keys()
                pH_values.sort()
                tit_expresence=self.get_intpka_titcurv(tgroup,pH_values=pH_values) 
                pH_step=pH_values[1]-pH_values[0]
                diff=0.0
                for pH in pH_values:
                    diff=diff+(tit_expresence[pH]-tit_in_presence[pH])*pH_step
                if abs(diff)<0.1:
                    diff=0.0
                data[removed_group][tgroup]=diff
        return data
def calculate_exsystem_dpKas ( self ) : self . ex_tits = self . do_ex_system ( ) data = { } groups = self . wt_pKas . keys ( ) groups . sort ( ) for removed_group in groups : data [ removed_group ] = { } for tgroup in groups : if tgroup == removed_group : continue tit_in_presence = self . ex_tits [ removed_group ] [ tgroup ] [ tgroup ] del tit_in_presence [ 'pKa' ] pH_values = tit_in_presence . keys ( ) pH_values . sort ( ) tit_expresence = self . get_intpka_titcurv ( tgroup , pH_values = pH_values ) pH_step = pH_values [ 1 ] - pH_values [ 0 ] diff = 0.0 for pH in pH_values : diff = diff + ( tit_expresence [ pH ] - tit_in_presence [ pH ] ) * pH_step if abs ( diff ) < 0.1 : diff = 0.0 data [ removed_group ] [ tgroup ] = diff return data
Read the ex_system file and calculate the dpKas
Read the ex_system file and calculate the dpKas
"""Read the ex_system file and calculate the dpKas""" # # Calculate the ex_system values # # # Load the file # # We have the titration curves, now we just calculate differences to the model pK titration curve #
self