gapsmith_sbml/lib.rs
1//! SBML Level 3 Version 1 writer with FBC v2 and groups v1 extensions.
2//!
3//! Output is deliberately COBRApy-compatible: species get `M_` prefixes,
4//! reactions `R_`, gene products `G_`. The `fbc:strict="true"` flag is set,
5//! so every reaction must have `fbc:lowerFluxBound` and `fbc:upperFluxBound`
6//! pointing at a `<parameter>`. Default-bound parameters are emitted once
7//! (`cobra_default_lb`, `cobra_default_ub`, `cobra_0_bound`); reactions
8//! whose bounds differ from defaults get dedicated per-reaction parameters.
9//!
10//! Only a writer is implemented in this milestone. Reading SBML is not
11//! needed by gapsmith itself — every input comes from the CBOR/JSON
12//! pipeline.
13
14mod namespaces;
15mod writer;
16
17pub use writer::{write_sbml, write_to, ObjectiveSense, SbmlError, WriteOptions};
18
19/// Default upper/lower bound magnitudes used when a reaction's own bounds
20/// equal these and a shared parameter is preferred. Mirrors cobrar's choice.
21pub const DEFAULT_BOUND: f64 = 1000.0;