meeko/tmp/water_map_builder.py
def best(self, first, second, positive=False ): #, hd_boost = hd_boost):
        #global O, H   #@@@@@@@@@@@@@
        """
        - Return the best value between two map values
        - If any positive values are found, 0 is returned by default
        - by default it should be first=OA, second=HD
        """
        #print "in best" 
        first *= self.O_weight
        second *= self.hd_boost
        #print "first, second:", first, second

        if not positive and (first > 0 or second > 0):
                # TODO add a smoothing function for positive values?
                return self.ENTROPY
        else:
            if first < second :
                self.O += 1
                return first * self.weight
            else:
                self.H += 1
                #print "First: %2.6f\tSecond: %2.6f" % (first, second)
                return second * self.weight

        - Return the best value between two map values
        - If any positive values are found, 0 is returned by default
        - by default it should be first=OA, second=HD
        
Return the best value between two map values
If any positive values are found, 0 is returned by default
by default it should be first=OA, second=HD
Return the best value between two map values If any positive values are found 0 is returned by default by default it should be first = OA second = HD
def best(self, first, second, positive=False ): 
        first *= self.O_weight
        second *= self.hd_boost
        if not positive and (first > 0 or second > 0):
                return self.ENTROPY
        else:
            if first < second :
                self.O += 1
                return first * self.weight
            else:
                self.H += 1
                return second * self.weight
def best ( self , first , second , positive = False ) : first *= self . O_weight second *= self . hd_boost if not positive and ( first > 0 or second > 0 ) : return self . ENTROPY else : if first < second : self . O += 1 return first * self . weight else : self . H += 1 return second * self . weight
Return the best value between two map values
 If any positive values are found, 0 is returned by default
 by default it should be first=OA, second=HD
Return the best value between two map values If any positive values are found 0 is returned by default by default it should be first = OA second = HD
#, hd_boost = hd_boost): #global O, H   #@@@@@@@@@@@@@ """
        - Return the best value between two map values
        - If any positive values are found, 0 is returned by default
        - by default it should be first=OA, second=HD
        """ #print "in best"  #print "first, second:", first, second # TODO add a smoothing function for positive values? #print "First: %2.6f\tSecond: %2.6f" % (first, second)
self
first
second
positive