<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fragmentate(self, give_only_index=False, use_lookup=None):
 """Get the indices of non bonded parts in the molecule. Args: 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 :meth:`~chemcoord.Cartesian.get_bonds`. use_lookup (bool):
 Use a lookup variable for :meth:`~chemcoord.Cartesian.get_bonds`. The default is specified in ``settings['defaults']['use_lookup']`` Returns: list: A list of sets of indices or new Cartesian instances. """

        if use_lookup is None:
            use_lookup = settings['defaults']['use_lookup']

        fragments = []
        pending = set(self.index)
        self.get_bonds(use_lookup=use_lookup)

        while pending:
            index = self.get_coordination_sphere(
                pending.pop(), use_lookup=True, n_sphere=float('inf'),
                only_surface=False, give_only_index=True)
            pending = pending - index
            if give_only_index:
                fragments.append(index)
            else:
                fragment = self.loc[index]
                fragment._metadata['bond_dict'] = fragment.restrict_bond_dict(
                    self._metadata['bond_dict'])
                try:
                    fragment._metadata['val_bond_dict'] = (
                        fragment.restrict_bond_dict(
                            self._metadata['val_bond_dict']))
                except KeyError:
                    pass
                fragments.append(fragment)
        return fragments