xnn.gnn.featurizers.molgraph.molecular_graph#
- xnn.gnn.featurizers.molgraph.molecular_graph(mol, *, prepare=True)[source]#
Build the
MolecularGraphof 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()); defaultTrue.Falsetakesmolas already standardized.
- Returns:
The features and term lists.
- Return type:
- Raises:
ValueError – For implicit hydrogens, several fragments or a bond type other than single, double, triple or aromatic.