torchcell.datamodels.compound_identity.resolve_compound_identity
- resolve_compound_identity(name: str | None = None, pubchem_cid: int | None = None, known_proprietary: bool = False) CompoundIdentityResolution[source]
Resolve a compound identity from the pinned table – pure, offline.
Looks up by normalized
name(matching a row’s canonical name OR any of its synonyms) first, then bypubchem_cid. A matched row’s ownresolution_statusis authoritative, so a mixture comes back asRESOLVED_MIXTUREcarrying ChEBI/CID and no InChIKey, and a vendor code comes backPROPRIETARYwith the reason it is terminal. With no row at all the answer isPROPRIETARYwhen the caller knows the label is a vendor code, elseUNRESOLVED_PUBLIC. NEVER guesses a structure from a near-miss name.