SBML feature support¶
This page summarises which SBML constructs chaste-sbml can translate
into Chaste C++, and which it cannot. Models using explicitly unsupported
constructs are rejected with a clear error during generation.
SBML levels and packages¶
SBML Level 2 and Level 3 are supported. SBML Level 1 is not supported.
Hierarchical models (the
comppackage) are supported by flattening the model on load. If flattening fails, generation stops with an error.Flux balance constraints (the
fbcpackage) are not supported.Other packages are not interpreted.
Note
A model whose SBML level is outside 2-3 is not rejected outright; the generator warns and proceeds on a best-effort basis, so the output may be incorrect.
Model components¶
Construct |
Status |
Notes |
|---|---|---|
Species (amount & concentration) |
Supported |
|
Compartments |
Supported |
Constant, rule-driven, and ODE-driven compartments; time-varying compartments add dilution terms to conserve amount. |
Global parameters |
Supported |
Constant, rule-varied, event-varied, or ODE-driven. |
Local (kinetic-law) parameters |
Supported |
Scoped per reaction; shadow globals of the same name. A local parameter with no value is an error. |
Reactions & kinetic laws |
Supported |
Each reaction is exposed as a flux; a reaction with no kinetic law falls back to the product of its reactants. |
Stoichiometry |
Supported |
Constant, variable (via rate/assignment rule), and |
Function definitions |
Supported |
Emitted as C++ functions taking |
Initial assignments |
Supported |
Expanded on load where possible; the remainder applied to species, parameters, compartments, and stoichiometry. |
Rules¶
Rule type |
Status |
Notes |
|---|---|---|
Assignment rules |
Supported |
Applied to species, compartments, parameters, and stoichiometry. |
Rate rules |
Supported |
Take precedence over a species’ reaction contributions. |
Algebraic rules |
Not supported |
Generation stops with an error. |
Events¶
Events are supported, with some limits:
Trigger, event assignments, priority, and the trigger’s initial value at
t=0semantics are handled.For CVODE root-finding, a trigger distance is derived from a single top-level relational operator with two operands. Compound boolean triggers or n-ary relationals fall back to a constant distance (they still fire, but not via smooth root-finding).
Event delays are not supported: a non-zero (or non-numeric) delay is rejected. A zero delay is fine.
Time and units¶
Time-unit scaling to Chaste’s hours is supported for time units that reduce to seconds (
second,millisecond,minute,hour). See Time units for the resolution rules and the--timescaleoverride.General physical units are not enforced. Numeric-literal unit annotations are stripped, and species/parameter/compartment quantities are treated as non-dimensional, so your model must be unit-consistent on its own.
MathML¶
Standard MathML is translated to C++:
Arithmetic, relational, and boolean operators.
The full set of elementary functions (
sin,cos,exp,log,sqrt,pow,abs,floor,ceil, the inverse and hyperbolic trig functions, and so on), mapped tostd::or tosm::helper functions where C++ has no direct equivalent (for examplecot,factorial,piecewise,min/max).Constants
pi,exponentiale,avogadro, and thetimeandrateOfcsymbols;infinityandnotanumber.Calls to a model’s own function definitions.
The delay() function is not supported and is rejected during
generation.
Note
A model function may legitimately be named sin, min, log, and so on.
Those calls are left as calls to your function definition and are not
rerouted to the C++ built-in of the same name.
Explicitly unsupported constructs¶
Each of these stops generation with an error:
Flux balance constraints (
fbcpackage)Fast reactions
Algebraic rules
Event delays (non-zero)
delay()MathML functionLocal parameter without a value
SBML Test Suite results¶
The generator is run against the
SBML Test Suite semantic cases in
CI (see the sbml_test_suite workflow). Of 1821 semantic cases:
Outcome |
Cases |
Share |
|---|---|---|
Pass (generated and numerically verified against Chaste) |
1345 |
74% |
Unsupported (skipped) |
476 |
26% |
The unsupported cases break down by the feature they exercise:
Feature |
Cases |
|---|---|
|
262 |
Algebraic rules |
125 |
Flux balance / steady-state (no time course) |
34 |
Fast reactions |
34 |
Random event execution |
11 |
Event execution semantics |
10 |
Note
These counts come from chaste_sbml/SbmlRefModels/test/data/sbml_test_suite_status.csv,
which CI checks against actual generation.