torchcell.metabolism.media.ExchangeBound

class ExchangeBound(*, exchange_id: str, metabolite_id: str, metabolite_name: str, uptake_bound: float, unit: Literal['mmol/gDW/h'] = 'mmol/gDW/h', source: str)[source]

Bases: ModelStrict

One exchange reaction opened to an uptake magnitude, with its provenance.

uptake_bound is a POSITIVE magnitude in unit; applying it sets the exchange’s lower_bound to its negation (cobra’s sign convention for uptake). Keeping the stored value positive means a serialized bound vector reads as a medium composition rather than as a pile of negative numbers.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].