torchcell.datamodels.compound_identity.inchikey_from_smiles
- inchikey_from_smiles(smiles: str) str | None[source]
Derive a standard InChIKey from a SMILES with RDKit, or
Noneif it will not parse.The offline structure route for a dataset that releases SMILES but no name a curated table can key on.
Noneis a MEASUREMENT, not a swallowed error: RDKit’s parser returns no molecule for chemistry it cannot represent (Hoepfner’s boromycin, whose boron cage fails), and it logs the reason to stderr. RDKit is imported lazily so this module stays cheap to import in a loader worker.