This release is a pre-release and may not be stable for production use.
The Virtual Brain Ontology
tvbo is a semantic knowledge base, a metadata standard, and a Python toolbox for whole-brain network simulations. You describe a whole experiment (equations, network, coupling, integration, stimuli, observation, provenance) as one typed, ontology-grounded specification. From that single source, tvbo does two things:
- Compiles it to runnable code across many backends and to a methods report, so a published study re-runs without drift between what the paper says, what the code does, and what the docs claim.
- Grounds every entity in a four-domain ontology and knowledge graph, so models can be compared by what their parameters mean, not by what they are called.
The hosted platform at tvbo.charite.de gives the same knowledge base and an experiment builder in the browser, with no local install.
Installation
pip install tvbo
Requires Python 3.11 or newer. The core install compiles any specification and runs it on JAX. Other simulation backends install as extras, listed in the Backends table.
Quick start
Specify a model and run it
from tvbo import Dynamics, SimulationExperiment
lorenz = Dynamics(
parameters={"sigma": {"value": 10.0}, "rho": {"value": 28.0}, "beta": {"value": 8 / 3}},
state_variables={
"X": {"equation": {"rhs": "sigma * (Y - X)"}},
"Y": {"equation": {"rhs": "X * (rho - Z) - Y"}},
"Z": {"equation": {"rhs": "X * Y - beta * Z"}},
},
)
# compile to JAX (core install) and run
SimulationExperiment(dynamics=lorenz).run("jax", duration=1000).plot()
The same model as a YAML specification
name: LorenzAttractor
parameters:
sigma: {value: 10, label: Prandtl number}
rho: {value: 28, label: Rayleigh number}
beta: {value: 2.6666666666666665}
state_variables:
X: {equation: {lhs: \dot{X}, rhs: sigma * (Y - X)}}
Y: {equation: {lhs: \dot{Y}, rhs: X * (rho - Z) - Y}}
Z: {equation: {lhs: \dot{Z}, rhs: X * Y - beta * Z}}
Load it with Dynamics.from_file("lorenz.yaml").
Inspect the generated code without running it
exp = SimulationExperiment(dynamics=lorenz)
print(exp.render_code("jax")) # or "numpy", "julia", "tvb", "pyrates", ...
Load a curated model from the library
Models, networks, and studies ship with the package:
from tvbo import Dynamics, SimulationExperiment
exp = SimulationExperiment(dynamics=Dynamics.from_db("JansenRit"))
exp.run("jax").plot()
exp.report("pdf", outputfile="methods.pdf") # provenance-aware methods report
Assemble a network model from curated components, referenced by semantic iri pointers:
exp = SimulationExperiment(
dynamics={"iri": "tvbo:models/ReducedWongWangExcInh"},
network={
"iri": "tvbo:networks/tpl-MNI152NLin2009cAsym_cohort-HCPYA_rec-dTOR_atlas-DesikanKilliany_desc-SC_relmat",
"coupling": {"c_glob": {"iri": "tvbo:coupling_functions/Linear"}},
},
integration={"method": "Heun", "duration": 10_000},
)
Anatomy of a SimulationExperiment
A specification captures everything needed to reproduce a run, not just the equations. Each section is written inline, loaded from YAML, or referenced by an iri pointer into the knowledge base.
What you can do
| Specify | Write dynamics, networks, coupling, stimuli, and observation as symbolic, typed objects in Python or YAML. Equations are stored symbolically, independent of any language or simulator. |
| Compile and run | Generate synchronized code for 14 backends from one spec, then execute it (see the table below). |
| Explore and fit | Declare parameter sweeps. The JAX-based tvboptim backend turns any experiment into a differentiable simulator for gradient-based fitting, Bayesian calibration, and large sweeps. |
| Analyze | Run bifurcation analysis and numerical continuation of model regimes. |
| Ground | Link every entity to a four-domain ontology: physics (QUDT/UO units), biology (Gene Ontology, ChEBI), anatomy (UBERON, openMINDS/SANDS), clinical (MeSH, ICD). Query the resulting knowledge graph. |
| Report and share | Export FAIR metadata (LinkML YAML, openMINDS JSON-LD), W3C PROV-O provenance graphs, and methods reports (Markdown/PDF) from the same spec. |
| Scale out | Emit self-contained SLURM, Snakemake, or Nextflow kits from the CLI (tvbo workflow submit) to run large sweeps on a cluster. |
| Assist agents | tvbo skills install gives AI coding assistants (Claude, Cursor, Copilot) the spec format and a knowledge graph to query instead of guessing. |
Backends
One specification, many targets. render_code(format=...) exports; run(format=...) executes.
| Backend | Extra | For |
|---|---|---|
| JAX | core | Fast, differentiable, GPU/TPU; runs out of the box |
tvboptim (default for run()) |
tvbo[tvboptim] |
JAX-based fitting, Bayesian calibration, large sweeps |
| NumPy / Python | core | Readable reference implementations |
| TVB | tvbo[tvb] |
The Virtual Brain's curated neural-mass library |
| PyRates | tvbo[pyrates] |
Rate-coded network models and numerical continuation |
| Julia (DifferentialEquations.jl, ModelingToolkit.jl, NetworkDynamics.jl, BifurcationKit.jl) | tvbo[julia] |
Stiff solvers, symbolic modelling, bifurcation |
| NeuroML / LEMS | tvbo[neuroml] |
Run via jNeuroML, NEURON, Brian2, NetPyNE, EDEN |
Install a backend with pip install tvbo[<extra>]. The compiler also emits surface PDE-FEM fields and RateML/CUDA GPU kernels.
Backends are designed to agree within each integrator's numerical tolerance, not to be bit-for-bit identical. Deterministic runs of jax, tvboptim, and tvb match to tolerance; noise RNG does not transfer across backends.
The platform
The Python package is the engine. tvbo.charite.de puts the same knowledge base in the browser, with no install:
- Knowledge Graph — search dynamics, networks, couplings, integrators, observation models, atlases, and studies as list and node-link views, with a SPARQL endpoint.
- Experiment Builder — assemble and run an experiment in the browser, with a live schema-validated YAML panel, and export it as YAML or ready-to-run Python.
- Save, share, publish — keep your own models and experiments private, share them with named colleagues, or submit them for review into the public gallery.
- Round-trip to Python —
pip install tvbo[api], mint an API key, then load a shared experiment back with thetvbo.platformclient and run it.
Every experiment built on the platform runs on this open-source tvbo package.
Curated knowledge base
tvbo ships with a versioned library grounded in the ontology:
- 39 canonical neural-mass models (106 database entries including per-backend variants)
- 120 literature-derived studies with provenance
- 63 brain networks spanning 19 to 1000 nodes
- 9 coupling functions and 5 brain atlases
Load it from Python (Dynamics.from_db(...), SimulationStudy.from_db(...), Network.from_db(...)) or browse it at tvbo.charite.de.
How tvbo relates to existing tools
tvbo extends and aligns to existing standards rather than replacing them. It delegates execution to simulators and supplies the semantic layer that keeps results interoperable. SBML established the declarative, annotated pattern for biochemical networks; NeuroML/LEMS covers the cellular layer; BIDS and SONATA standardize data and cellular-resolution networks; PyRates compiles one model to several backends. What none of them provide is the grounding: a whole-brain model and its full experiment as one typed object that is executable, biologically grounded, and queryable at once. tvbo fills that gap and treats the others as backends or alignment targets.
Documentation
- Full documentation
- Model browser — models, parameters, and equations
- Metadata schema — the TVB-O data model
- Platform — the hosted GUI and knowledge graph
Installation options
Each simulation backend installs as an extra listed in the Backends table. The other extras:
pip install tvbo # core: specify, compile, run on JAX/NumPy
pip install tvbo[api] # REST client for the platform
pip install tvbo[all] # every backend and optional feature
On Intel Macs (x86_64), the [tvb] and [audio] extras pin numba<0.60 and llvmlite<0.44, because newer llvmlite has no macosx_x86_64 wheels for Python 3.12+, and JAX is capped below 0.5, since jaxlib 0.4.38 is the last release with a macosx_x86_64 wheel. Apple Silicon gets the latest compatible JAX automatically.
The knowledge extra needs a manual install:
pip install git+https://github.com/neurommsig/neurommsig-knowledge.git
The auto7p extra (bifurcation continuation, pulled in by pyrates) installs the pycobi wrapper, but the AUTO-07p engine is a Fortran program that is not on PyPI: build it separately, set AUTO_DIR, and link its python/ front-end onto your environment. See Installation → AUTO-07p continuation.
Citation
A manuscript describing tvbo is in preparation. Until it appears, please cite the software via this repository and tvbo.charite.de.
License
Copyright © 2025 Charité — Universitätsmedizin Berlin. Licensed under the European Union Public Licence (EUPL) v1.2 or later. See LICENSE.
Funding
P.R. acknowledges support by EU Horizon Europe program Horizon EBRAINS2.0 (101147319), VirtualBrainTwin (101137289), EBRAINS-PREP 101079717, AISN 101057655, EBRAIN-Health 101058516, EIC grant PHRASE 101058240, by the Digital Europe Programme TEF-Health (101100700), Shaiped (101195135), CoordinaTEF (101168074), German Research Foundation SFB 1436 (project ID 425899996), SFB 1315 (project ID 327654276), SFB 936 (project ID 178316478), SPP Computational Connectomics RI 2073/6-1, RI 2073/10-2, RI 2073/9-1, DFG Clinical Research Group BECAUSE-Y 504745852, Berlin University Alliance OpenMake, the Virtual Research Environment at the Charité Berlin, EBRAINS Health Data Cloud, and the Berlin Institute of Health and Foundation Charité. P.R. and J.M. acknowledge additional support by the Deutsche Forschungsgemeinschaft (DFG) — Project-ID 424778381 — TRR 295.
Metadata
Release files for tvbo 0.9.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tvbo-0.9.0rc1.tar.gz | 24.3 MB | With provenance | Details for tvbo-0.9.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tvbo-0.9.0rc1-py3-none-any.whl | Python 3 | none | any | Details for tvbo-0.9.0rc1-py3-none-any.whl |
Total release size: 49.0 MB
Release files / tvbo-0.9.0rc1.tar.gz
| Download URL | tvbo-0.9.0rc1.tar.gz |
|---|---|
| Size | 24.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68c7edfaff3ffd3d5fd106f58edaf3b11d8d72cd3a11de2ae5cb72e93b891624
|
|
BLAKE2b-256 checksum How to use checksums |
99dd461a77c1ef0f260c6d5835627860604ec050b9f80ba597597b657a61cdb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / tvbo-0.9.0rc1-py3-none-any.whl
| Download URL | tvbo-0.9.0rc1-py3-none-any.whl |
|---|---|
| Size | 24.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f95331b8d43a7f0bdc970558b4c4582abafd2fd83e3bf11799de936091662d1b
|
|
BLAKE2b-256 checksum How to use checksums |
cbd854c15baf1f020255ecee706334c0454a197c835c1ed7a5e506921f72972a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for tvbo 0.9.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tvbo-0.9.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.