torchcell.datamodels.schema.Compound
- class Compound(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, name: str, inchikey: str | None = None, inchi: str | None = None, smiles: str | None = None, pubchem_cid: int | None = None, chebi_id: str | None = None, roles: list[str] = <factory>)[source]
Bases:
ProvenanceGapMixinChemical identity of a small molecule, keyed by a canonical InChIKey.
Identity is carried by stable, resolvable identifiers – not the human name alone.
inchikey(the canonical hash of the standard InChI) is the primary key;pubchem_cid/chebi_idare redundant cross-references;smiles/inchiare auxiliary structure strings.rolesholds ChEBI ROLE terms (the compound’s mode of action / chemical role, e.g. ‘oxidising agent’) – the ontology home for a compound’s biological role, REPLACING the deletedstress_categoryconsequence field (M1). Onlynameis required; identifiers are filled as SOURCED, never guessed (provenance discipline).- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].