def __init__(self,complex_id, antigen, antibody): TriangleComplex.__init__(self, complex_id, antigen,antibody) init_split_cylinder_util(self) init_complex_axial_plane_util(self) self.set_axial_plane() params =[ dict(name="antigen,triangle", bases=self.triangles, targets=[(0,self.triangles),(50,self.atb.residues)]), dict( name="antigen,residue", bases=self.triangles, targets = [(0,self.atg.residues),(50,self.atb.residues)]), dict( name="antigen,combined", bases=self.triangles, targets = [(0,self.triangles),(50,self.atg.residues),(100,self.atb.residues)]), dict(name="antibody,triangle", bases=self.atb.residues, targets=[(0,self.triangles),(50,self.atb.residues)]), dict( name="antibody,residue", bases=self.atb.residues, targets = [(0,self.atg.residues),(50,self.atb.residues)]), dict( name="antibody,combined", bases=self.atb.residues, targets = [(0,self.triangles),(50,self.atg.residues),(100,self.atb.residues)]) ] #delay and force, lazy computing self.delay = map(lambda (x): (False,x), params) def force(n): try: mark,other = self.delay[n-1] except IndexError: print "unknown fp id" return None if mark:#in cache print "hit cache",n return other else: fp = self.get_fp_generic(**other) self.delay[n-1] = (True,fp) return fp self.nth_fp = force
def __init__(self,antigen,antibody): TriangleComplex.__init__(self,antigen,antibody) self.bitlength = 105 self.fp = BaseComplexFingerprint() self.distcache = FP105DistCache()