pKaTool/activity_fit/fit_pHact_J.py
def align_parms(self,solutions):
        """Sort the solutions so parameters are shifted around to give optimal overlap
        This only works well for 3-group systems (and perhaps not even for them)"""
        solutions.sort()
        ref_sol=solutions[0][1]
        aligned_sols=[solutions[0]]
        for score,variables,profile,CCPS_def,groups,start_values,start_scores in solutions[1:]:
            best_vars=variables[:]
            diff=self.get_similarity(variables,ref_sol)
            for permutation in range(len(groups)-1):
                variables=self.permute(variables,len(groups))
                if self.get_similarity(variables,ref_sol)<diff:
                    diff=self.get_similarity(variables,ref_sol)
                    best_vars=variables[:]
            aligned_sols.append([score,best_vars,profile,CCPS_def,groups,start_values,start_scores])
        return aligned_sols
Sort the solutions so parameters are shifted around to give optimal overlap
        This only works well for 3-group systems (and perhaps not even for them)
Sort the solutions so parameters are shifted around to give optimal overlap
This only works well for 3-group systems (and perhaps not even for them)
Sort the solutions so parameters are shifted around to give optimal overlap This only works well for 3 - group systems ( and perhaps not even for them )
def align_parms(self,solutions):
        solutions.sort()
        ref_sol=solutions[0][1]
        aligned_sols=[solutions[0]]
        for score,variables,profile,CCPS_def,groups,start_values,start_scores in solutions[1:]:
            best_vars=variables[:]
            diff=self.get_similarity(variables,ref_sol)
            for permutation in range(len(groups)-1):
                variables=self.permute(variables,len(groups))
                if self.get_similarity(variables,ref_sol)<diff:
                    diff=self.get_similarity(variables,ref_sol)
                    best_vars=variables[:]
            aligned_sols.append([score,best_vars,profile,CCPS_def,groups,start_values,start_scores])
        return aligned_sols
def align_parms ( self , solutions ) : solutions . sort ( ) ref_sol = solutions [ 0 ] [ 1 ] aligned_sols = [ solutions [ 0 ] ] for score , variables , profile , CCPS_def , groups , start_values , start_scores in solutions [ 1 : ] : best_vars = variables [ : ] diff = self . get_similarity ( variables , ref_sol ) for permutation in range ( len ( groups ) - 1 ) : variables = self . permute ( variables , len ( groups ) ) if self . get_similarity ( variables , ref_sol ) < diff : diff = self . get_similarity ( variables , ref_sol ) best_vars = variables [ : ] aligned_sols . append ( [ score , best_vars , profile , CCPS_def , groups , start_values , start_scores ] ) return aligned_sols
Sort the solutions so parameters are shifted around to give optimal overlap
This only works well for 3-group systems (and perhaps not even for them)
Sort the solutions so parameters are shifted around to give optimal overlap This only works well for 3 - group systems ( and perhaps not even for them )
"""Sort the solutions so parameters are shifted around to give optimal overlap
        This only works well for 3-group systems (and perhaps not even for them)"""
self
solutions