コード例 #1
0
    def add_sift_chunk_special_case(self,  rec_atom,  lig_atom,  lig_name,  dist):
        """
        the case without strength difference
        """
        cur_sift = self.get_cur_sift(lig_name , rec_atom)

        if structureutil.match_hbond(lig_atom,rec_atom,distance= dist):
            if rec_atom.atomic_number == 1:
                if 'H_DONOR' in self.active_bits:
                    cur_sift.turn_sift_bit_on(self.bit_pos['H_DONOR'],  rec_atom.resnum, "exists")
            else:
                if 'H_ACCEPTOR' in self.active_bits:
                    cur_sift.turn_sift_bit_on(self.bit_pos['H_ACCEPTOR'],  rec_atom.resnum, "exists")
コード例 #2
0
 def add_sift_chunk(self,  rec_atom,  lig_atom,  lig_name,  dist):
     
     if self.sifts.has_key(lig_name):
         if rec_atom.resnum in self.sifts[lig_name].sift.keys():
             cur_sift = self.sifts[lig_name]
         else:
             self.sifts[lig_name].add_sift_chunk(rec_atom.resnum)
             cur_sift = self.sifts[lig_name]
     else:
         new_sift = sift(lig_name)
         new_sift.add_sift_chunk(rec_atom.resnum)
         
         self.sifts[lig_name] = new_sift
         cur_sift = new_sift
     
     if 'CONTACT' in self.active_bits:
         cur_sift.turn_sift_bit_on(self.bit_pos['CONTACT'],  rec_atom.resnum)
     if int(rec_atom) in self.backbone_set:
         if 'BACKBONE' in self.active_bits:
             cur_sift.turn_sift_bit_on(self.bit_pos['BACKBONE'],  rec_atom.resnum)
     else:
         if 'SIDECHAIN' in self.active_bits:
             cur_sift.turn_sift_bit_on(self.bit_pos['SIDECHAIN'],  rec_atom.resnum)
         
         if int(rec_atom) in self.polar_set:
             if 'POLAR' in self.active_bits:
                 cur_sift.turn_sift_bit_on(self.bit_pos['POLAR'],  rec_atom.resnum)
         if int(rec_atom) in self.hydrophobic_set:
             if 'HYDROPHOBIC' in self.active_bits:
                 cur_sift.turn_sift_bit_on(self.bit_pos['HYDROPHOBIC'],  rec_atom.resnum)
         if int(rec_atom) in self.aromatic_set:
             if 'AROMATIC' in self.active_bits:
                 cur_sift.turn_sift_bit_on(self.bit_pos['AROMATIC'],  rec_atom.resnum)
         if int(rec_atom) in self.charged_set:
             if 'CHARGED' in self.active_bits:
                 cur_sift.turn_sift_bit_on(self.bit_pos['CHARGED'],  rec_atom.resnum)
         if structureutil.match_hbond(lig_atom,rec_atom,distance= dist):
             if rec_atom.atomic_number == 1:
                 if 'H_DONOR' in self.active_bits:
                     cur_sift.turn_sift_bit_on(self.bit_pos['H_DONOR'],  rec_atom.resnum)
             else:
                 if 'H_ACCEPTOR' in self.active_bits:
                     cur_sift.turn_sift_bit_on(self.bit_pos['H_ACCEPTOR'],  rec_atom.resnum)
コード例 #3
0
    def add_sift_chunk_special_case(self, rec_atom, lig_atom, lig_name, dist):
        """
        the case without strength difference
        """
        if self.sifts.has_key(lig_name):
            if rec_atom.resnum in self.sifts[lig_name].sift.keys():
                cur_sift = self.sifts[lig_name]
            else:
                self.sifts[lig_name].add_sift_chunk(rec_atom.resnum)
                cur_sift = self.sifts[lig_name]
        else:
            new_sift = sift(lig_name)
            new_sift.add_sift_chunk(rec_atom.resnum)

            self.sifts[lig_name] = new_sift
            cur_sift = new_sift

        if structureutil.match_hbond(lig_atom, rec_atom, distance=dist):
            if rec_atom.atomic_number == 1:
                if "H_DONOR" in self.active_bits:
                    cur_sift.turn_sift_bit_on(self.bit_pos["H_DONOR"], rec_atom.resnum, "exists")
            else:
                if "H_ACCEPTOR" in self.active_bits:
                    cur_sift.turn_sift_bit_on(self.bit_pos["H_ACCEPTOR"], rec_atom.resnum, "exists")