connected_to

Cartesian.connected_to(index_of_atom, exclude=None, give_only_index=False, follow_bonds=None)[source]
Returns a Cartesian of atoms connected to the specified
one.

Connected means that a path along covalent bonds exists.

Parameters:
  • index_of_atom (int) –
  • exclude (list) – Indices in this list are omitted.
  • give_only_index (bool) – If True a set of indices is returned. Otherwise a new Cartesian instance.
  • follow_bonds (int) – This option determines how many branches the algorithm follows. If None it stops after reaching the end in every branch. If you have a single molecule this usually means, that the whole molecule is recovered.
Returns:

A set of indices or a new Cartesian instance.