nodes: 0, module; 1, function_definition; 2, function_name:add_contacts; 3, parameters; 4, block; 5, identifier:self; 6, identifier:indices; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, import_from_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, identifier:indices2; 18, None; 19, identifier:threshold; 20, float:0.3; 21, identifier:periodic; 22, True; 23, identifier:count_contacts; 24, False; 25, comment: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.
          """; 26, relative_import; 27, dotted_name; 28, assignment; 29, assignment; 30, assignment; 31, call; 32, import_prefix; 33, dotted_name; 34, identifier:ContactFeature; 35, identifier:atom_pairs; 36, call; 37, identifier:atom_pairs; 38, call; 39, identifier:f; 40, call; 41, attribute; 42, argument_list; 43, identifier:distances; 44, identifier:_parse_pairwise_input; 45, argument_list; 46, attribute; 47, argument_list; 48, identifier:ContactFeature; 49, argument_list; 50, identifier:self; 51, identifier:__add_feature; 52, identifier:f; 53, identifier:indices; 54, identifier:indices2; 55, attribute; 56, keyword_argument; 57, identifier:self; 58, identifier:_check_indices; 59, identifier:atom_pairs; 60, attribute; 61, identifier:atom_pairs; 62, identifier:threshold; 63, identifier:periodic; 64, identifier:count_contacts; 65, identifier:self; 66, identifier:logger; 67, identifier:fname; 68, string; 69, identifier:self; 70, identifier:topology; 71, string_content:add_contacts()
code: def add_contacts(self, indices, indices2=None, threshold=0.3, periodic=True, count_contacts=False):
          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.
          """
          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)