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: ProvenanceGapMixin

Chemical 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_id are redundant cross-references; smiles / inchi are auxiliary structure strings. roles holds 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 deleted stress_category consequence field (M1). Only name is 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].