torchcell.metabolism.media.build_exchange_index

build_exchange_index(model: cobra.Model) → ExchangeIndex[source]

Index a model’s exchange reactions by annotation identifier and by name.

An exchange with more than one metabolite is skipped: it is not a boundary reaction for a single species, so no medium component can name it unambiguously.