code: def add_contacts(self, indices, indices2=None, threshold=0.3, periodic=True, count_contacts=False):
          r
          from .distances import ContactFeature
          atom_pairs = _parse_pairwise_input(
              indices, indices2, self.logger, fname='add_contacts()')
          atom_pairs = self._check_indices(atom_pairs)
          f = ContactFeature(self.topology, atom_pairs, threshold, periodic, count_contacts)
          self.__add_feature(f)