xnn.gnn.featurizers.molgraph.prepare_molecule#
- xnn.gnn.featurizers.molgraph.prepare_molecule(mol)[source]#
The standardized structure the graph of
molis built from.Stereochemistry and atom maps are dropped, the hypervalent groups are written in charge-separated form and the canonical resonance structure is chosen (
canonical_resonance()). Hydrogens must be explicit atoms.- Parameters:
mol (rdkit.Chem.Mol) – The molecule, one connected component, explicit hydrogens.
- Returns:
The standardized molecule (atom order unchanged).
- Return type:
rdkit.Chem.Mol
- Raises:
ValueError – If the molecule has implicit hydrogens or several fragments.