pKaTool/titration_class.py
def deviation_from_henderson_hasselbalch(self, pKas):
        """Calculates the deviation from the Henderson-Hasselbalch equation for all points given pKa values"""
        HH_deviation = {}
        deviation = lambda ph,pka,exp: abs(1/(1+pow(10,ph-pka))-1-exp)
        for group in self.curves.keys():
            if pKas.has_key(group):
                pka = pKas[group]
                HH_deviation[group] = {}
                for ph in self.curves[group].keys():
                    try:
                        HH_deviation[group][ph] = deviation(float(ph),float(pka),float(self.curves[group][ph]))
                    except:
                        pass
        return HH_deviation
Calculates the deviation from the Henderson-Hasselbalch equation for all points given pKa values
Calculates the deviation from the Henderson-Hasselbalch equation for all points given pKa values
Calculates the deviation from the Henderson - Hasselbalch equation for all points given pKa values
def deviation_from_henderson_hasselbalch(self, pKas):
        HH_deviation = {}
        deviation = lambda ph,pka,exp: abs(1/(1+pow(10,ph-pka))-1-exp)
        for group in self.curves.keys():
            if pKas.has_key(group):
                pka = pKas[group]
                HH_deviation[group] = {}
                for ph in self.curves[group].keys():
                    try:
                        HH_deviation[group][ph] = deviation(float(ph),float(pka),float(self.curves[group][ph]))
                    except:
                        pass
        return HH_deviation
def deviation_from_henderson_hasselbalch ( self , pKas ) : HH_deviation = { } deviation = lambda ph , pka , exp : abs ( 1 / ( 1 + pow ( 10 , ph - pka ) ) - 1 - exp ) for group in self . curves . keys ( ) : if pKas . has_key ( group ) : pka = pKas [ group ] HH_deviation [ group ] = { } for ph in self . curves [ group ] . keys ( ) : try : HH_deviation [ group ] [ ph ] = deviation ( float ( ph ) , float ( pka ) , float ( self . curves [ group ] [ ph ] ) ) except : pass return HH_deviation
Calculates the deviation from the Henderson-Hasselbalch equation for all points given pKa values
Calculates the deviation from the Henderson - Hasselbalch equation for all points given pKa values
"""Calculates the deviation from the Henderson-Hasselbalch equation for all points given pKa values"""
self
pKas