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)
docs: r"""
          Adds the contacts to the feature list.
  
          Parameters
          ----------
          indices : can be of two types:
  
                  ndarray((n, 2), dtype=int):
                      n x 2 array with the pairs of atoms between which the contacts shall be computed
  
                  iterable of integers (either list or ndarray(n, dtype=int)):
                      indices (not pairs of indices) of the atoms between which the contacts shall be computed.
  
          indices2: iterable of integers (either list or ndarray(n, dtype=int)), optional:
                      Only has effect if :py:obj:`indices` is an iterable of integers. Instead of the above behaviour,
                      only the contacts between the atoms in :py:obj:`indices` and :py:obj:`indices2` will be computed.
  
          threshold : float, optional, default = .3
              distances below this threshold (in nm) will result in a feature 1.0, distances above will result in 0.0.
              The default is set to .3 nm (3 Angstrom)
  
          periodic : boolean, default True
              use the minimum image convention if unitcell information is available
  
          count_contacts : boolean, default False
              If set to true, this feature will return the number of formed contacts (and not feature values with either 1.0 or 0)
              The ouput of this feature will be of shape (Nt,1), and not (Nt, nr_of_contacts)
  
  
          .. note::
              When using the *iterable of integers* input, :py:obj:`indices` and :py:obj:`indices2`
              will be sorted numerically and made unique before converting them to a pairlist.
              Please look carefully at the output of :py:func:`describe()` to see what features exactly have been added.