Repository navigation
Release notes for sbmlode 0.3.0
sbmlode 0.3.0 writes the ODE system of an SBML model as python code of JAX, which diffrax simulates: jax.jit compiles the simulation, jax.vmap batches it over constants and initial states, and jax.grad and jax.jacfwd differentiate it, a model with events included. It passes every case of the SBML test suite which it supports and libroadrunner simulates. sbmlode requires python 3.12 or newer, as jax does.
New features
- the format
diffrax(#8), written withsystem.write("model.py", fmt="diffrax")(.pystays the suffix ofpython):initial_values(p),f_dxdt(t, x, p)(a vector field of diffrax),f_y(t, x, p), the functions of the events, and withsimulator=Truesimulate(ts, p, x0, ...), which returns aSimulationof the output times, states, assigned values and constants, andto_frame, its pandasDataFrame; the file switches JAX to float64 on import - the events of SBML in JAX: delays, priorities, persistence, the initial values of the triggers, the values from the trigger time and cascades, on arrays of fixed shapes (
max_segments,max_pending), in loops of the kind theadjointof diffrax differentiates (RecursiveCheckpointAdjointforjax.grad,ForwardModeforjax.jacfwd,DirectAdjointfor both); the derivative includes the shift of an event time with the constants default_solver(),diffrax.Kvaerno5withChord, a chord method which ends at an increment belowkappa(patrick-kidger/diffrax#782); the steps of a model without events end at the output timesJaxPrinter, the dialectjaxof the math, which JAX traces:jnp.whereforpiecewise, the logic ofjnp, float literals andjnp.power- the extra
diffrax(jax, diffrax, equinox, optimistix, pandas), which the generated code runs with scripts/ode_report.py --format diffrax, the pass rate of the diffrax code over the SBML test suite: all 1481 cases which are supported and which libroadrunner simulates
Documentation
- a section of the guide on the diffrax code, with
jax.jit,jax.vmap,jax.gradandjax.jacfwdand a solve of one's own, the conventions of the formats in a compact table, the diffrax code of the repressilator and its row in the verification table - the design of the diffrax export,
docs/design/2026-10-06-diffrax-export-design.md
Breaking changes
- python 3.11 is no longer supported, sbmlode requires python 3.12 or newer
Your sbmlode team