Skip to content

0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Oct 14:30
· 4 commits to develop since this release
ade90d3

Release notes for sbmlode 0.3.0

sbmlode logo

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 with system.write("model.py", fmt="diffrax") (.py stays the suffix of python): initial_values(p), f_dxdt(t, x, p) (a vector field of diffrax), f_y(t, x, p), the functions of the events, and with simulator=True simulate(ts, p, x0, ...), which returns a Simulation of the output times, states, assigned values and constants, and to_frame, its pandas DataFrame; 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 the adjoint of diffrax differentiates (RecursiveCheckpointAdjoint for jax.grad, ForwardMode for jax.jacfwd, DirectAdjoint for both); the derivative includes the shift of an event time with the constants
  • default_solver(), diffrax.Kvaerno5 with Chord, a chord method which ends at an increment below kappa (patrick-kidger/diffrax#782); the steps of a model without events end at the output times
  • JaxPrinter, the dialect jax of the math, which JAX traces: jnp.where for piecewise, the logic of jnp, float literals and jnp.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.grad and jax.jacfwd and 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