xnn.gnn.featurizers.molgraph.molecular_graph#

xnn.gnn.featurizers.molgraph.molecular_graph(mol, *, prepare=True)[source]#

Build the MolecularGraph of an RDKit molecule.

Parameters:
  • mol (rdkit.Chem.Mol) – One molecule with explicit hydrogens, atoms in the order of the coordinates it will be evaluated on.

  • prepare (bool, optional) – Standardize the structure first (prepare_molecule()); default True. False takes mol as already standardized.

Returns:

The features and term lists.

Return type:

MolecularGraph

Raises:

ValueError – For implicit hydrogens, several fragments or a bond type other than single, double, triple or aromatic.