Skip to content

Releases

v3.0.0a1

v3.0.0a1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 25 Nov 17:59

Official alpha pre-release of BioNetGen 3 (BNG3), built from main at 40df7068.

What's Changed

Core Engine, Parser & Network Generation

  • In-process C++17 architecture: Replaces the Perl BNG2.pl pipeline with a native ANTLR4 BNGL parser, compiled model IR, canonical graph-isomorphism network generator, and in-process action dispatcher (generate_network, simulate*, parameter_scan, bifurcate, read*/write*, visualize).
  • BNGL language & modeling features: Supports compartments, physical units (begin units), energy patterns and thermodynamic kinetics, population maps, TFUN tables, MM/Sat/Hill/Arrhenius rate laws, and rule modifiers (DeleteMolecules, MoveConnected, MatchOnce, reactant/product filters).

Simulation Backends

  • Finite-network solvers: SUNDIALS CVODE/IDA for ODE, DAE, constant-delay DDE, and native SBML events; exact Gillespie SSA (with native SBML events and optional Metal/CUDA GPU batch SSA); Partitioned Leaping (pla); and Partial Scaling (psa).
  • Network-free & hybrid solvers: Introduces NFnext (default for method="nf", with optional Metal/CUDA GPU graph mode) alongside embedded NFcore (method="nfcore", plus standalone NFsim CLI binary) and hybrid particle/population execution.
  • Optional JAX backend: CPU ODE/SSA integration via bionetgen[jax].

SBML, Atomizer & Exporters

  • SBML Level 3 Core, comp, and multi: Native import/export with dynamic assignment/rate/algebraic rules, delays, events, and piecewise fast reactions; unsupported constructs (including fbc flux-balance models) fail closed with explicit diagnostics.
  • Multi-format export: .net, .bngl, .xml, SBML, MATLAB/MEX, Python, C++, LaTeX, MDL, and SSC, plus bngir semantic IR and equivalence verification.

Python API, CLI & Packaging

  • Python API & CLI: Native bionetgen package (bionetgen.load(), bionetgen.run(), model.simulate(), NumPy-backed SimResult), Click CLI (bionetgen run|execute|check|export|atomize|scan|sensitivity|visualize|plot|info|notebook|graphdiff), standalone bng_cpp and NFsim binaries, and scoped PyBioNetGen compatibility wrappers.
  • Cross-platform distributions: Pre-built wheels for CPython 3.9–3.14 on Linux (x86_64, aarch64), macOS (arm64, x86_64), and Windows (x86_64), plus standalone CLI archives and source distribution.

Verification & Hardening

  • Independent parity & formal checks: Validated against pinned BNG2 (2.9.5), NFsim (v2.0.1), PyBioNetGen (0.8.7 lineage), libRoadRunner, the official SBML Test Suite, curated BioModels, and a Lean 4 formal semantic kernel.
  • Adversarial bug & security audits: Includes multi-round semantic, numerical, corpus, and ASan/UBSan security hardening across the parser, solvers, NFcore/NFnext, SBML/Atomizer, and I/O writers (#1073–#1075).

Breaking Changes from bionetgen < 3.0 (PyBioNetGen)

  • bionetgen.load() returns BioNetGenModel (replacing bngmodel) and bionetgen.run() returns NumPy-backed SimulationResult objects rather than file paths.
  • The default CLI uses Click instead of Cement, and network-free method="nf" defaults to NFnext (use method="nfcore" for embedded NFcore).
  • Pin bionetgen<3 to stay on legacy PyBioNetGen.

Notes

What's Changed

  • Implement BNG3 integration foundations by @akutuva21 in #1
  • BNG3: integrate native backend and parity safeguards by @akutuva21 in #2
  • Codex/bng3 energy validation port by @akutuva21 in #3
  • ci: add external tool parity gates by @akutuva21 in #4
  • feat: advance BNG3 NFnext and convergence work by @akutuva21 in #5
  • feat(atomizer): complete SBML Level 3 Multi v1 support by @akutuva21 in #6
  • Integrate BNG3 IR migration and Lean formalization by @akutuva21 in #10
  • ⚡ Bolt: Optimize ScanResult dataframe conversion by @akutuva21 in #11
  • docs: record terminal CI validation and current status by @akutuva21 in #12
  • test: enforce direct NFsim and NFIR bridge contracts by @akutuva21 in #13
  • feat(bng3): add SBML-compatible physical units by @akutuva21 in #15
  • ⚡ Bolt: Vectorize DataFrame construction in ScanResults by @akutuva21 in #14
  • ⚡ Bolt: Optimize atomizer structures copy and sort performance by @akutuva21 in #22
  • ⚡ Bolt: [performance improvement] Eliminate copy.deepcopy bottlenecks in Atomizer structures by @akutuva21 in #23
  • feat: merge convergence + nonequilibrium energy (locally build-verified 408/408) by @akutuva21 in #17
  • feat: make BNGsim canonical finite-network backend (ADR 0003) by @akutuva21 in #20
  • fix: extend SBML round-trip handling and reporting by @akutuva21 in #16
  • Port selected historical issue fixes and regressions to BNG3 by @akutuva21 in #25
  • ⚡ Bolt: Optimize deepcopy usage in Atomizer structures by @akutuva21 in #24
  • ⚡ Bolt: [performance improvement] Pre-compile regex in helpers.py by @akutuva21 in #28
  • Performance optimization pass for BNG3/NFsim by @akutuva21 in #27
  • Batch SSA: optional Metal GPU acceleration for simulate_ssa via batch_size by @akutuva21 in #26
  • fix(bindings): link the C++ runtime dynamically into the Python extension by @akutuva21 in #30
  • fix(atomizer): keep every term of an additive assignment-rule body, plus an SBML L3 semantics audit by @akutuva21 in #45
  • perf(engine): seeded SSA throughput 1.44x-2.10x with byte-identical trajectories (provisional) by @akutuva21 in #44
  • fix(MM): the free-substrate quadratic needs BNG2's cancellation-safe branch; plus three reported metabolic defects by @akutuva21 in #32
  • docs(perf): expression-evaluator codegen sweep — measured no-win by @akutuva21 in #38
  • test(ssa): characterise what a compartment seed means under each method by @akutuva21 in #40
  • test(batch-ssa): an untestable comparison must report as untestable by @akutuva21 in #35
  • test(ssa): pin the batch SSA against closed-form stationary laws by @akutuva21 in #31
  • test(ci): pin the Python extension's C++ runtime linkage contract by @akutuva21 in #36
  • test(python): resolve bionetgen from the worktree under test by @akutuva21 in #48
  • bench: shared fitness harness with composite score, determinism guards, and baseline (harness only) by @akutuva21 in #37
  • perf(engine): emit .gdat/.cdat fields without per-value stream insertion (2.75x on the write loop, byte-identical output) by @akutuva21 in #39
  • perf(ode): precompute the model function index instead of rebuilding it per output step by @akutuva21 in #43
  • Signaling: refuse a second rate law on '->'; stop mangling parameter names; 9 models vs closed forms by @akutuva21 in #47
  • test(domain): pin SIR, Lotka-Volterra and ion-channel gating identities; report two defects by @akutuva21 in #34
  • feat(bngir): round-trip units, count observables, and builtin rate laws; fail closed on the rest by @akutuva21 in #33
  • feat(formal): formalize the BNGIR multi-version envelope and feature gate by @akutuva21 in #29
  • docs: execute the checklist's own rules — verify every claim, fix drifted documentation by @akutuva21 in #41
  • test(validation): verify NFsim parity evidence instead of assuming it by @akutuva21 in #49
  • test(ssa): the unit-aware volume branch is reachable and exact by @akutuva21 in #51
  • bench(memory): locate network-generation allocations — 92% is Ullmann initialize_M_vec; declared targets measured cold by @akutuva21 in #50
  • perf(validation): bucket species candidate pairs by a sound prefilter key by @akutuva21 in #46
  • fix(tests): narrow the conftest path filter and make a missing build loud by @akutuva21 in #53
  • fix(parity): split the duplicated workflow step; gate parity.yml wiring by @akutuva21 in #60
  • fix(ode): route Sat/MM by keyword, not by argument count by @akutuva21 in #55
  • perf(batch-ssa): compile the model once for the whole CPU pool by @akutuva21 in #58
  • test(domain): compartmental ...
Read more