xnn.gnn.featurizers.molgraph.standardize_groups#

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

Write the hypervalent groups of mol in charge-separated form.

One match at a time is rewritten until a group no longer matches, group by group in a fixed order; the atoms and their order are unchanged.

Parameters:

mol (rdkit.Chem.Mol) – A sanitized molecule.

Returns:

The rewritten molecule (a copy), with its property cache updated.

Return type:

rdkit.Chem.Mol