torchcell.datamodels.schema.EnvironmentPhysicalPerturbation

class EnvironmentPhysicalPerturbation(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, perturbation_type: ~typing.Literal['environment_physical'] = 'environment_physical', description: str = 'Scalar physical/physiological environment factor', factor: ~torchcell.datamodels.schema.PhysicalFactor, magnitude: ~torchcell.datamodels.schema.Concentration | None = None, agent: ~torchcell.datamodels.schema.Compound | None = None)[source]

Bases: EnvironmentPerturbation, ModelStrict

A neutral, scalar physical/physiological environment FACTOR (pH, osmolarity, …).

Use when the edit is a physical variable rather than a specific added compound – e.g. a shift in medium pH or osmolarity, or a change of carbon source. factor names the neutral variable (never a consequence word); magnitude gives its typed value+unit when quantitative; agent optionally names the chemical species that realizes the factor (e.g. the salt used to set osmolarity) as a reused Compound. Temperature is NOT here – it lives on Environment.temperature. When a single named compound IS the edit (NaCl, H2O2, ethanol), prefer SmallMoleculePerturbation.

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

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