torchcell.metabolism.media.resolve_component

resolve_component(component: MediaComponent, index: ExchangeIndex) → ComponentResolution[source]

Place one ontology component on zero or more exchange reactions.

Order is annotation first, then dissociation into ions, then chemical name. A component whose role the model structurally cannot represent short-circuits to excluded_by_role before any lookup, so a failure to find agar is never reported as a resolution failure.