torchcell.metabolism.media.UptakePolicy

class UptakePolicy(*, carbon_uptake: float = 3.3, supplement_uptake: float = 0.165, unlimited_uptake: float = 1000.0, organic_nitrogen_uptake: float = 0.165)[source]

Bases: ModelStrict

Magnitudes assigned to an uptake bound, by the component’s functional role.

Three tiers, because a GEM medium only ever distinguishes three things: the growth- limiting carbon source, a supplement that is present but not the limiting substrate, and a species assumed to be in excess (water, oxygen, bulk salts).

supplement_uptake is deliberately independent of carbon_uptake: Suthers’ 0.165 is an absolute rate anchored to the DEFAULT 3.3 carbon uptake, and their own OptKnock runs raise carbon to 10.0 without touching it.

source_for(role: MediaComponentRole, name: str = '') → str[source]

Provenance string recorded on every bound this policy produces.

bound_for(role: MediaComponentRole, name: str = '') → float[source]

Uptake magnitude (positive) for a component in this functional role.

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

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