Executable

Spatio-Flux

Eran Agmon + 1 other
v0.0.1Apache-2.0Oct 2026

Citation: Process Bigraphs and the Architecture of Compositional Systems Biology

Spatio-Flux composes independently developed processes including metabolism, spatial transport, particle dynamics, and structural rewrites into executable simulations through typed interfaces and shared orchestration.

How this model is classified mathematically and dynamically.

Formalism
Determinism
Hybrid
Time dynamics
Discrete
Spatial
2D
Multiscale
Yes

Organisms, entities and processes this model represents.

Infectious agents
Not recorded
Health conditions
Not recorded
Biological processes
Molecular entities
Proteins / genes
Not recorded

The data this model consumes and produces when executed.

Parameters

NameDefaultUnitMeaning
total_time100secondConfigured simulation duration
bounds[10,20]Not recordedSpatial domain extent
n_bins[8,16]Not recordedTwo-dimensional grid resolution
field_diffusion_rate0.1Not recordedDiffusion coefficient for fields
n_particles10Not recordedInitial particle count
particle_diffusion_rate0.1Not recordedParticle Brownian diffusion rate
particle_add_rate0.3Not recordedBoundary particle addition rate
glucose_Km1Not recordedMonod half-saturation parameter for glucose
glucose_vmax0.1Not recordedMaximum glucose uptake rate

Initial conditions

NameValueUnit
initial_min_max{"acetate":[0,0],"glucose":[10,10],"detritus":[0,0],"dissolved biomass":[0,0.1]}Not recorded
particle_mass[0.001,1]Not recorded

Data inputs

NameFormatRequiredPurpose
SBML metabolic modelXMLOptionalCOBRApy dFBA model input

Outputs

NameQuantityUnitFormat
state trajectoriesTime-indexed process state including fields, biomass, and particlesNot recordedJSON
structure artifactsSerialized schemas and state plus process-bigraph diagramsNot recordedPNG
analysis chartsDomain-specific plots and animationsNot recordedNot recorded

Experiment protocol

A study loads a baseline composite, runs it for a configurable duration, flushes analysis outputs, and persists a trajectory in a per-study run store.

Timestep
1 second
Duration
60 second
Observables
process statefieldsbiomassparticles

Runtime environment, dependencies, and compute requirements.

Language
Python >=3.11,<3.13
Environment
native

Vivarium-style process/composite tiers are implemented through process-bigraph and pbg-superpowers; the canonical current runner is scripts/reproduce.py.

Compute requirements

GPU
Not required
Parallelism
multi-process

Dependencies

runtime
  • bigraph-schema >=1.4.3
  • process-bigraph >=1.8.5
  • bigraph-viz
  • cobra
  • highspy
  • imageio
  • ipython
  • matplotlib
  • pbg-superpowers >=0.16
  • pymunk
  • scipy
optional
  • build
  • pytest

Containers

  • docker · docker.io/mismplatform/envbuild@sha256:a3e1407ab5f4ed7ed7036f3a1835e0e2d8887265ffbe95dcf04a1ed55811976b · docker.io

Image approved · envbuild-agent · Oct 2026

Entry points

  • python scripts/build_report.py

    Build the HTML report

    --out
  • python scripts/reproduce.py

    Reproduce all 19 studies and build the report

    --only
    single study slug
    --out
    report output path
  • python spatio_flux/runners/run_study.py <SLUG>

    Run one study

    SLUG
    TIME
  • python scripts/build_all_figures.py

    Build figure assets

    --all
    --dry-run
    --only
    --force
    --promote
    --base
  • python scripts/build_paper_figures.py

    Stitch paper figure panels

    --study
  • python scripts/export_plos_tifs.py

    Export PLOS TIFF figures

    --out
  • python scripts/export_figure_composites.py

    Export figure composites

    --check
  • python scripts/sync_loom_views.py

    Synchronize loom views

    --promote
    --seed
    --id
  • python scripts/verify_reference.py

    Verify reference studies

    --baseline
    --no-write
    --eval-only
    slugs
  • python scripts/scaffold_studies.py

    Scaffold studies

  • python scripts/build_fig07bcd_plots.py

    Build Fig. 7 plots

  • python scripts/build_fig08b_snapshots.py

    Build Fig. 8 snapshots

  • python scripts/build_figure1.py

    Build Figure 1

  • python scripts/build_figure2.py

    Build Figure 2

  • python scripts/build_figure7.py

    Build Figure 7

  • python scripts/build_figure8.py

    Build Figure 8

  • python scripts/build_figures_site.py

    Build figures site

    workspace
    output
  • python scripts/figure_pipeline.py

    Run figure pipeline

  • python scripts/export_draft_composites.py

    Export draft composites

  • python scripts/fig08_reference_gif.py

    Build reference GIF

  • python spatio_flux/experiments/compare_comets.py

    Compare Spatio-Flux with COMETS

    --mode
    --ray-address
    --n-shards
    --solver
  • python spatio_flux/experiments/figure_A.py

    Run Figure A experiment

  • python spatio_flux/experiments/figure_B.py

    Run Figure B experiment

  • python spatio_flux/experiments/overview_fig.py

    Build overview figure

  • python spatio_flux/processes/dfba.py

    Run dFBA process demonstration

  • python spatio_flux/processes/pymunk_particles.py

    Run Pymunk particle demonstration

  • python tools/capture_baseline_doc.py <NAME>

    Capture a baseline composite document

    NAME

Tests

pytestpytest tests/

Artifacts stored with this model.

  • 606 B
  • 336 B
  • 11 KB
  • 2.5 KB
  • 6.7 KB
  • 1.1 KB
  • 259 KB
  • 234 B

Identifiers and integrity.

Metadata review
Approved · 07ab255c-9ada-4d33-9f49-66cc6277d9f2 · Oct 2026
External IDs
  • url:https://github.com/vivarium-collective/spatio-flux
MISM — Multiscale Immune Systems Modeling

Multiscale Model Portal

Research reported on this website is supported by the National Institute of Allergy and Infectious Diseases (NIAID) of the National Institutes of Health under award number U54AI191253. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

© 2026 Multiscale Immune Systems Modeling. All rights reserved.

Privacy Policy