connect atom group (for SMILES parser)

        May requires recalculation of 2D coordinate for drawing

        Args:
            mol: graphmol.Compound()
                the original object will be copied.
            bond: Bond object to be connected.
                the original will not be copied so be careful.
            base: index of atom in self to connect
            target: index of atom in group to be connected
        Raises:
            TypeError

def add_molecule(self, mol, bond=None, base=None, target=None):
        """connect atom group (for SMILES parser)

        May requires recalculation of 2D coordinate for drawing

        Args:
            mol: graphmol.Compound()
                the original object will be copied.
            bond: Bond object to be connected.
                the original will not be copied so be careful.
            base: index of atom in self to connect
            target: index of atom in group to be connected
        Raises:
            TypeError
        """
        ai = self.available_idx()
        mapping = {n: n + ai - 1 for n, _ in mol.atoms_iter()}
        relabeled = nx.relabel_nodes(mol.graph, mapping)  # copy=True
        self.graph.add_nodes_from(relabeled.nodes(data=True))
        self.graph.add_edges_from(relabeled.edges(data=True))
        if bond:
            self.add_bond(base, mapping[target], bond)