A demonstration of process composition rebuilding and extending COMETS by composing functional components
Project description
Spatio-Flux
A reference application for compositional multiscale biological modeling built on the Process-Bigraph framework. Spatio-Flux composes independently developed processes — metabolism, spatial transport, particle dynamics, structural rewrites — into a single executable simulation via typed interfaces and shared orchestration, not tightly coupled solvers.
It's the worked example in Process Bigraphs and the Architecture of Compositional Systems Biology (Agmon & Spangler, arXiv:2512.23754).
▶ Browse the live test suite report → 19 composite scenarios, each with structure diagrams, time series, and plots.
What this repo is
Spatio-Flux is a testbed and reference implementation, not an optimized domain simulator. Its purpose is to make model composition explicit and inspectable.
It demonstrates how to:
- compose heterogeneous modeling paradigms (ODEs, dFBA, spatial fields, particles)
- couple mechanisms through shared typed state, not direct process calls
- coordinate multi-timescale execution with reusable orchestration patterns
- swap or recombine processes without modifying surrounding models
The test suite
The heart of the repo is spatio_flux/experiments/test_suite.py, which exercises 19
composition patterns and renders the report linked above.
Covered scenarios include:
- Monod and dynamic FBA metabolism (single-strain + multi-strain communities)
- COMETS-style spatial dFBA on a lattice
- Brownian and Newtonian (Pymunk) particle systems
- Particle–field exchange with embedded metabolism
- Event-driven division and boundary handling
Each scenario produces a process-bigraph diagram, serialized schemas and state, and domain-specific plots or animations.
Each composite is a @composite_generator-decorated function under
spatio_flux/composites/, discoverable by the
pbg-superpowers dashboard.
Run it locally
git clone https://github.com/vivarium-collective/spatio-flux.git
cd spatio-flux
uv sync
uv run python spatio_flux/experiments/test_suite.py --output out
open out/report.html
--tests <name1> <name2> … runs a subset. --skip-existing reuses cached per-test
artifacts so you can re-render the HTML without re-simulating.
Ecosystem
Spatio-Flux is part of Vivarium 2.0 — an open-source ecosystem for compositional modeling:
- bigraph-schema — typed hierarchical schemas
- process-bigraph — process and composite simulation interfaces
- bigraph-viz — visualization of bigraph structure and data flow
- pbg-superpowers — convention + dashboard for discoverable composites
- spatio-flux — reference multiscale application (this repo)
Citation
@article{agmon2025spatioflux,
title = {Process Bigraphs and the Architecture of Compositional Systems Biology},
author = {Agmon, Eran and Spangler, Daniel},
journal = {arXiv preprint arXiv:2512.23754},
year = {2025},
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spatio_flux-1.4.0.tar.gz.
File metadata
- Download URL: spatio_flux-1.4.0.tar.gz
- Upload date:
- Size: 132.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4efcdfa6f69409f9ea72fb3955347444608aaf65d62e58348739de89948dbb37
|
|
| MD5 |
754efe4c426ce868b8e5fe6881c9308b
|
|
| BLAKE2b-256 |
a1b3f8c99330acf3a20abb4be14bf70b02a2b9f5a5fa2bfcd9fd7f742b26b72c
|
Provenance
The following attestation bundles were made for spatio_flux-1.4.0.tar.gz:
Publisher:
release.yml on vivarium-collective/spatio-flux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spatio_flux-1.4.0.tar.gz -
Subject digest:
4efcdfa6f69409f9ea72fb3955347444608aaf65d62e58348739de89948dbb37 - Sigstore transparency entry: 1519613569
- Sigstore integration time:
-
Permalink:
vivarium-collective/spatio-flux@69917ed141af3d44eed0d9f7ea2f40269dd2ad7a -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/vivarium-collective
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@69917ed141af3d44eed0d9f7ea2f40269dd2ad7a -
Trigger Event:
push
-
Statement type:
File details
Details for the file spatio_flux-1.4.0-py3-none-any.whl.
File metadata
- Download URL: spatio_flux-1.4.0-py3-none-any.whl
- Upload date:
- Size: 144.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b03b063182b3177d92b2199178c759e7579f897781f6d93dd84baf2bcf7245a0
|
|
| MD5 |
9e93944346cfddcc9d2a5cbc6bc19060
|
|
| BLAKE2b-256 |
bf1da978f55a2071d8faad01a46b5dfb81123721b264b25ef40890f041aa63c2
|
Provenance
The following attestation bundles were made for spatio_flux-1.4.0-py3-none-any.whl:
Publisher:
release.yml on vivarium-collective/spatio-flux
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spatio_flux-1.4.0-py3-none-any.whl -
Subject digest:
b03b063182b3177d92b2199178c759e7579f897781f6d93dd84baf2bcf7245a0 - Sigstore transparency entry: 1519613625
- Sigstore integration time:
-
Permalink:
vivarium-collective/spatio-flux@69917ed141af3d44eed0d9f7ea2f40269dd2ad7a -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/vivarium-collective
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@69917ed141af3d44eed0d9f7ea2f40269dd2ad7a -
Trigger Event:
push
-
Statement type: