code: def find_hal(self, atoms):
          
          data = namedtuple('hal_donor', 'x orig_x x_orig_idx c c_orig_idx')
          a_set = []
          for a in atoms:
              if self.is_functional_group(a, 'halocarbon'):
                  n_atoms = [na for na in pybel.ob.OBAtomAtomIter(a.OBAtom) if na.GetAtomicNum() == 6]
                  x_orig_idx = self.Mapper.mapid(a.idx, mtype=self.mtype, bsid=self.bsid)
                  orig_x = self.Mapper.id_to_atom(x_orig_idx)
                  c_orig_idx = [self.Mapper.mapid(na.GetIdx(), mtype=self.mtype, bsid=self.bsid) for na in n_atoms]
                  a_set.append(data(x=a, orig_x=orig_x, x_orig_idx=x_orig_idx,
                                    c=pybel.Atom(n_atoms[0]), c_orig_idx=c_orig_idx))
          if len(a_set) != 0:
              write_message('Ligand contains %i halogen atom(s).\n' % len(a_set), indent=True)
          return a_set
docs: Look for halogen bond donors (X-C, with X=F, Cl, Br, I)