Cartesian.get_fragment(list_of_indextuples, give_only_index=False, use_lookup=None)

Get the indices of the atoms in a fragment.

The list_of_indextuples contains all bondings from the molecule to the fragment. [(1,3), (2,4)] means for example that the fragment is connected over two bonds. The first bond is from atom 1 in the molecule to atom 3 in the fragment. The second bond is from atom 2 in the molecule to atom 4 in the fragment.

  • list_of_indextuples (list) –
  • give_only_index (bool) – If True a set of indices is returned. Otherwise a new Cartesian instance.
  • use_lookup (bool) – Use a lookup variable for get_bonds(). The default is specified in settings['defaults']['use_lookup']

A set of indices or a new Cartesian instance.