Skip to main content

Crate gapsmith_sbml

Crate gapsmith_sbml 

Source
Expand description

SBML Level 3 Version 1 writer with FBC v2 and groups v1 extensions.

Output is deliberately COBRApy-compatible: species get M_ prefixes, reactions R_, gene products G_. The fbc:strict="true" flag is set, so every reaction must have fbc:lowerFluxBound and fbc:upperFluxBound pointing at a <parameter>. Default-bound parameters are emitted once (cobra_default_lb, cobra_default_ub, cobra_0_bound); reactions whose bounds differ from defaults get dedicated per-reaction parameters.

Only a writer is implemented in this milestone. Reading SBML is not needed by gapsmith itself — every input comes from the CBOR/JSON pipeline.

Structs§

WriteOptions
Options for write_sbml. All fields are optional; defaults produce a COBRApy-compatible document.

Enums§

ObjectiveSense
SbmlError

Constants§

DEFAULT_BOUND
Default upper/lower bound magnitudes used when a reaction’s own bounds equal these and a shared parameter is preferred. Mirrors cobrar’s choice.

Functions§

write_sbml
Entry point: write model as SBML to path.
write_to
Write the SBML document to any Write sink. Used both by write_sbml (after opening the file) and by the test suite (to a memory buffer).