xnn.gnn.featurizers.molgraph.split_molecules#

xnn.gnn.featurizers.molgraph.split_molecules(mol)[source]#

The connected components of mol with their atom indices.

Parameters:

mol (rdkit.Chem.Mol) – A structure of one or more molecules.

Returns:

Each molecule (atoms in their original relative order) and the indices of its atoms in mol.

Return type:

list of (rdkit.Chem.Mol, list of int)