Metadata-Version: 2.5
Name: tvbo
Version: 0.9.1
Summary: The Virtual Brain Ontology
Project-URL: homepage, https://tvbo.charite.de
Project-URL: documentation, https://virtual-twin.github.io/tvbo/
Project-URL: repository, https://github.com/virtual-twin/tvbo
Project-URL: bug-tracker, https://github.com/virtual-twin/tvbo/issues
Author-email: Leon Martin <leon.martin@bih-charite.de>
License-Expression: BSD-3-Clause AND CC-BY-4.0 AND CC-BY-NC-SA-4.0 AND CC-BY-SA-4.0 AND CC0-1.0 AND EUPL-1.2 AND GPL-3.0-only AND GPL-3.0-or-later AND LicenseRef-FreeSurfer AND LicenseRef-HCP-MGH-USC-DUA AND LicenseRef-HCP-WU-Minn-Open-Access AND LicenseRef-MNI-ICBM152 AND LicenseRef-PPMI-DUA AND LicenseRef-TVBO-Unresolved AND MIT AND MPL-2.0
License-File: LICENSES/BSD-3-Clause.txt
License-File: LICENSES/CC-BY-4.0.txt
License-File: LICENSES/CC-BY-NC-SA-4.0.txt
License-File: LICENSES/CC-BY-SA-4.0.txt
License-File: LICENSES/CC0-1.0.txt
License-File: LICENSES/EUPL-1.2.txt
License-File: LICENSES/GPL-3.0-only.txt
License-File: LICENSES/GPL-3.0-or-later.txt
License-File: LICENSES/LicenseRef-FreeSurfer.txt
License-File: LICENSES/LicenseRef-HCP-MGH-USC-DUA.txt
License-File: LICENSES/LicenseRef-HCP-WU-Minn-Open-Access.txt
License-File: LICENSES/LicenseRef-MNI-ICBM152.txt
License-File: LICENSES/LicenseRef-PPMI-DUA.txt
License-File: LICENSES/LicenseRef-TVBO-Unresolved.txt
License-File: LICENSES/MIT.txt
License-File: LICENSES/MPL-2.0.txt
Requires-Python: >=3.11
Requires-Dist: black<27,>=26.5
Requires-Dist: bsplot>=0.0.14
Requires-Dist: equinox>=0.11.12
Requires-Dist: h5netcdf>=1.3
Requires-Dist: h5py>=3.12.1
Requires-Dist: jax<0.5.0; sys_platform == 'darwin' and platform_machine == 'x86_64'
Requires-Dist: jax>=0.4.29
Requires-Dist: jsonschema>=4.0.0
Requires-Dist: linkml-runtime>=1.12.1
Requires-Dist: mako>=1.3.12
Requires-Dist: networkx>=3.4.2
Requires-Dist: numpy>=2.0.0
Requires-Dist: owlready2>=0.47
Requires-Dist: pandas>=2.2.3
Requires-Dist: pybids>=0.16.0
Requires-Dist: pydot>=3.0.3
Requires-Dist: pyyaml!=6.0.4,>=6.0
Requires-Dist: scipy>=1.15.0
Requires-Dist: sympy>=1.13.0
Requires-Dist: typer>=0.12
Requires-Dist: xarray>=2025.0
Provides-Extra: all
Requires-Dist: brian2>=2.5.0; extra == 'all'
Requires-Dist: dipy>=1.10.0; extra == 'all'
Requires-Dist: docker>=7.1.0; extra == 'all'
Requires-Dist: fastapi>=0.115.0; extra == 'all'
Requires-Dist: fuzzywuzzy>=0.18.0; extra == 'all'
Requires-Dist: goatools>=1.4.12; extra == 'all'
Requires-Dist: juliacall>=0.9.37; extra == 'all'
Requires-Dist: jupyter; extra == 'all'
Requires-Dist: libigl>=2.6.2; extra == 'all'
Requires-Dist: librosa>=0.10.2; extra == 'all'
Requires-Dist: llvmlite<0.44; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'all'
Requires-Dist: llvmlite>=0.42; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'all'
Requires-Dist: meshio>=5.3.0; extra == 'all'
Requires-Dist: meson>=1.4.0; extra == 'all'
Requires-Dist: mne>=1.6.0; extra == 'all'
Requires-Dist: nbclient>=0.10.0; extra == 'all'
Requires-Dist: networkx<=3.5; extra == 'all'
Requires-Dist: neuron; extra == 'all'
Requires-Dist: nibabel>=5.0.0; extra == 'all'
Requires-Dist: ninja>=1.11.0; extra == 'all'
Requires-Dist: numba<0.60; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'all'
Requires-Dist: numba>=0.59; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'all'
Requires-Dist: potpourri3d>=1.4.0; extra == 'all'
Requires-Dist: pybel>=0.14.10; extra == 'all'
Requires-Dist: pybtex>=0.24.0; extra == 'all'
Requires-Dist: pycobi>=0.8.0; extra == 'all'
Requires-Dist: pylems>=0.6.7; extra == 'all'
Requires-Dist: pymoo>=0.6.0; extra == 'all'
Requires-Dist: pyneuroml>=0.7.0; extra == 'all'
Requires-Dist: pypandoc>=1.15; extra == 'all'
Requires-Dist: pypdf>=5.1.0; extra == 'all'
Requires-Dist: pyrates>=1.0.0; extra == 'all'
Requires-Dist: python-levenshtein>=0.26.1; extra == 'all'
Requires-Dist: quarto; extra == 'all'
Requires-Dist: quartodoc>=0.11.1; extra == 'all'
Requires-Dist: ruff<0.17,>=0.16.1; extra == 'all'
Requires-Dist: scikit-fem>=8.0.0; extra == 'all'
Requires-Dist: setuptools<81; extra == 'all'
Requires-Dist: simple-colors>=0.1; extra == 'all'
Requires-Dist: snakemake-executor-plugin-slurm>=0.11.0; extra == 'all'
Requires-Dist: snakemake>=8.0.0; extra == 'all'
Requires-Dist: tvb-data; extra == 'all'
Requires-Dist: tvb-framework; extra == 'all'
Requires-Dist: tvb-library; extra == 'all'
Requires-Dist: tvboptim; extra == 'all'
Requires-Dist: uvicorn>=0.30.0; extra == 'all'
Requires-Dist: wget>=3.2; extra == 'all'
Requires-Dist: zarr>=3; extra == 'all'
Provides-Extra: api
Requires-Dist: docker>=7.1.0; extra == 'api'
Requires-Dist: fastapi>=0.115.0; extra == 'api'
Requires-Dist: uvicorn>=0.30.0; extra == 'api'
Provides-Extra: audio
Requires-Dist: librosa>=0.10.2; extra == 'audio'
Requires-Dist: llvmlite<0.44; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'audio'
Requires-Dist: llvmlite>=0.42; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'audio'
Requires-Dist: numba<0.60; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'audio'
Requires-Dist: numba>=0.59; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'audio'
Provides-Extra: auto7p
Requires-Dist: meson>=1.4.0; extra == 'auto7p'
Requires-Dist: ninja>=1.11.0; extra == 'auto7p'
Requires-Dist: pycobi>=0.8.0; extra == 'auto7p'
Provides-Extra: brian2
Requires-Dist: brian2>=2.5.0; extra == 'brian2'
Provides-Extra: cuda
Requires-Dist: jax[cuda12]; (sys_platform == 'linux') and extra == 'cuda'
Provides-Extra: data
Requires-Dist: dipy>=1.10.0; extra == 'data'
Provides-Extra: docs
Requires-Dist: jupyter; extra == 'docs'
Requires-Dist: meshio>=5.3.0; extra == 'docs'
Requires-Dist: mne>=1.6.0; extra == 'docs'
Requires-Dist: nbclient>=0.10.0; extra == 'docs'
Requires-Dist: nibabel>=5.0.0; extra == 'docs'
Requires-Dist: pybtex>=0.24.0; extra == 'docs'
Requires-Dist: pypandoc>=1.15; extra == 'docs'
Requires-Dist: pypdf>=5.1.0; extra == 'docs'
Requires-Dist: quarto; extra == 'docs'
Requires-Dist: quartodoc>=0.11.1; extra == 'docs'
Requires-Dist: scikit-fem>=8.0.0; extra == 'docs'
Provides-Extra: julia
Requires-Dist: juliacall>=0.9.37; extra == 'julia'
Provides-Extra: knowledge
Requires-Dist: fuzzywuzzy>=0.18.0; extra == 'knowledge'
Requires-Dist: goatools>=1.4.12; extra == 'knowledge'
Requires-Dist: pybel>=0.14.10; extra == 'knowledge'
Requires-Dist: python-levenshtein>=0.26.1; extra == 'knowledge'
Requires-Dist: setuptools<81; extra == 'knowledge'
Requires-Dist: simple-colors>=0.1; extra == 'knowledge'
Requires-Dist: wget>=3.2; extra == 'knowledge'
Provides-Extra: lint
Requires-Dist: ruff<0.17,>=0.16.1; extra == 'lint'
Provides-Extra: mesh
Requires-Dist: libigl>=2.6.2; extra == 'mesh'
Requires-Dist: potpourri3d>=1.4.0; extra == 'mesh'
Provides-Extra: neuroml
Requires-Dist: pylems>=0.6.7; extra == 'neuroml'
Requires-Dist: pyneuroml>=0.7.0; extra == 'neuroml'
Provides-Extra: neuron
Requires-Dist: neuron; extra == 'neuron'
Provides-Extra: pde
Requires-Dist: meshio>=5.3.0; extra == 'pde'
Requires-Dist: nibabel>=5.0.0; extra == 'pde'
Requires-Dist: scikit-fem>=8.0.0; extra == 'pde'
Provides-Extra: pyrates
Requires-Dist: meson>=1.4.0; extra == 'pyrates'
Requires-Dist: networkx<=3.5; extra == 'pyrates'
Requires-Dist: ninja>=1.11.0; extra == 'pyrates'
Requires-Dist: pycobi>=0.8.0; extra == 'pyrates'
Requires-Dist: pyrates>=1.0.0; extra == 'pyrates'
Provides-Extra: tvb
Requires-Dist: llvmlite<0.44; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'tvb'
Requires-Dist: llvmlite>=0.42; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'tvb'
Requires-Dist: numba<0.60; (sys_platform == 'darwin' and platform_machine == 'x86_64') and extra == 'tvb'
Requires-Dist: numba>=0.59; (sys_platform != 'darwin' or platform_machine != 'x86_64') and extra == 'tvb'
Requires-Dist: tvb-data; extra == 'tvb'
Requires-Dist: tvb-framework; extra == 'tvb'
Requires-Dist: tvb-library; extra == 'tvb'
Provides-Extra: tvboptim
Requires-Dist: pymoo>=0.6.0; extra == 'tvboptim'
Requires-Dist: tvboptim; extra == 'tvboptim'
Provides-Extra: workflow
Requires-Dist: snakemake-executor-plugin-slurm>=0.11.0; extra == 'workflow'
Requires-Dist: snakemake>=8.0.0; extra == 'workflow'
Provides-Extra: zarr
Requires-Dist: zarr>=3; extra == 'zarr'
Description-Content-Type: text/markdown

<img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/imgs/tvbo_logo.png" alt="TVBO logo" title="TVBO" align="right" height="100" />

# The Virtual Brain Ontology

[![Lint & Test](https://github.com/virtual-twin/tvbo/actions/workflows/ci.yml/badge.svg)](https://github.com/virtual-twin/tvbo/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/tvbo.svg)](https://pypi.org/project/tvbo/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/tvbo)](https://pypi.org/project/tvbo/)
[![License](https://img.shields.io/badge/License-EUPL--1.2%20%2B%20CC%20BY%204.0-blue.svg)](#license)
[![Platform](https://img.shields.io/badge/platform-tvbo.charite.de-2b6b6b.svg)](https://tvbo.charite.de)

`tvbo` is a knowledge base, a metadata standard and a Python toolbox for whole-brain network simulations. You write a whole study (equations, network, coupling, integration, stimuli, observation, figures) as one typed specification grounded in an ontology. From it, `tvbo` generates code for many simulators, runs it on a laptop or a cluster, and writes the report, so the paper, the code and the documentation describe the same experiment.

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/lifecycle-dark.svg">
  <img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/lifecycle-light.svg" alt="The Simulation Study Lifecycle: Explore, Specify, Generate, Run, Report, Share" width="100%">
</picture>

Each step is one chapter of the [documentation](https://virtual-twin.github.io/tvbo/). The sections below walk through all six on one study, `FirstSimulation`: a Generic2dOscillator on an 87-region structural connectome.

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-explore-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-explore-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Explore: find what is curated</b></summary>

Models, connectomes, coupling functions and published studies ship with the package, each under an IRI a specification can point at. Browse them at [tvbo.charite.de](https://tvbo.charite.de), in the [model browser](https://virtual-twin.github.io/tvbo/browser), or from Python with `Dynamics.from_db(...)`. [More on exploring](https://virtual-twin.github.io/tvbo/1-explore/).

| Class | Curated records |
|---|--:|
| `Dynamics` | 112 |
| `Network` | 56 |
| `Coupling` | 9 |
| `SimulationStudy` | 133 |

| Record | Description |
|---|---|
| Generic2dOscillator<br><sub><code>tvbo:models/Generic2dOscillator</code></sub> | The Generic 2-Dimensional Oscillator (G2D) is a phenomenological, coupled, nonlinear two-dimensional (i.e., two state-variables ('V', 'W')) oscillatory, neural mass model. |
| DesikanKilliany (dTOR)<br><sub><code>tvbo:networks/tpl-MNI152NLin2009cAsym_cohort-HCPYA_rec-dTOR_atlas-DesikanKilliany_desc-SC_relmat</code></sub> |  |

</details>

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-specify-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-specify-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Specify: write the experiment</b></summary>

An experiment is YAML (or the same objects in Python). This one references a curated model and connectome by IRI and states only what it changes. [More on specifying](https://virtual-twin.github.io/tvbo/2-specify/).

```yaml
id: 1
label: "A whole-brain simulation"
dynamics:
    iri: tvbo:models/Generic2dOscillator
    parameters: { a: 2.0 } # TVB's limit-cycle setting for this model; the rest stays default
network:
    iri: tvbo:networks/tpl-MNI152NLin2009cAsym_cohort-HCPYA_rec-dTOR_atlas-DesikanKilliany_desc-SC_relmat
    transforms:
        - name: weight
          equation: { rhs: "weight / mean(weight[weight > 0])" }
    coupling:
        c_glob:
            iri: tvbo:coupling_functions/Linear
            delayed: true
            incoming_states: [V]
            parameters: { a: 0.05 }
integration:
    method: Heun
    step_size: 0.1
    duration: 800
    transient_time: 300.0
```

```python
from tvbo import SimulationStudy

study = SimulationStudy.from_file("docs/examples/first-simulation/study.yaml")
```

</details>

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-generate-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-generate-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Generate: compile it to a backend</b></summary>

The specification compiles to readable code for each backend. [More on generating](https://virtual-twin.github.io/tvbo/3-generate/).

```python
print(study.get_experiment(1).render_code("tvboptim"))
```

The model's right-hand side, as the tvboptim backend receives it:

```python
def dynamics(
    self,
    t: float,
    state: jnp.ndarray,
    params: Bunch,
    coupling: Bunch,
    external: Bunch,
) -> Tuple[jnp.ndarray, jnp.ndarray]:
    I = params.I
    a = params.a
    alpha = params.alpha
    b = params.b
    beta = params.beta
    c = params.c
    d = params.d
    e = params.e
    f = params.f
    g = params.g
    gamma = params.gamma
    tau = params.tau

    V = state[0]
    W = state[1]

    c_glob = (
        jnp.atleast_1d(coupling.c_glob)[0] if hasattr(coupling, "c_glob") else 0.0
    )
    local_coupling = (
        jnp.atleast_1d(coupling.local_coupling)[0]
        if hasattr(coupling, "local_coupling")
        else 0.0
    )

    dV_dt = (
        d
        * tau
        * (
            I * gamma
            - V**3 * f
            + V**2 * e
            + V * g
            + V * local_coupling
            + W * alpha
            + c_glob * gamma
        )
    )
    dW_dt = d * (V**2 * c + V * b - W * beta + a) / tau

    # Determine per-node shape from the first state variable; broadcast
    # any scalar derivatives or auxiliaries so jnp.stack sees uniform
    # rank-1 arrays.
    _per_node_shape = jnp.atleast_1d(dV_dt).shape

    derivatives = jnp.stack(
        [
            jnp.broadcast_to(jnp.atleast_1d(dV_dt), _per_node_shape),
            jnp.broadcast_to(jnp.atleast_1d(dW_dt), _per_node_shape),
        ],
        axis=0,
    )

    auxiliaries = jnp.array([])

    return derivatives, auxiliaries
```

What each backend can do:

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/backends-dark.svg">
  <img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/backends-light.svg" alt="What each simulation backend can do" width="100%">
</picture>

</details>

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-run-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-run-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Run: execute and read the result</b></summary>

A run executes every experiment, analysis and figure the study declares, in process or as a cluster job (`tvbo run study.yaml`). [More on running](https://virtual-twin.github.io/tvbo/4-run/).

```python
result = study.run()
```

```python
result.figure("first_simulation")
```

![A first whole-brain simulation](https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/figure-FirstSimulation-first_simulation.png)

The run writes a BIDS-style study directory:

```text
first-simulation/
├── derivatives/
│   └── tvbo/
│       ├── dataset_description.json
│       ├── exp-1_model-Generic2dOscillator_network.h5
│       ├── exp-1_model-Generic2dOscillator_network.yaml
│       ├── exp-1_model-Generic2dOscillator_result.h5
│       └── exp-1_model-Generic2dOscillator_result.yaml
├── docs/
│   └── figures/
│       ├── scripts/
│       ├── first_simulation.caption.qmd
│       ├── first_simulation.gif
│       └── first_simulation.png
└── study.yaml
```

</details>

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-report-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-report-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Report: write the Methods</b></summary>

The Methods are rendered from the specification, equations and parameter values included, never typed. [More on reporting](https://virtual-twin.github.io/tvbo/5-report/).

```python
result.report("pdf", outputfile="report.pdf")
```

### Generic2dOscillator

The Generic 2-Dimensional Oscillator (G2D) is a phenomenological, coupled, nonlinear two-dimensional (i.e., two state-variables ('V', 'W')) oscillatory, neural mass model. The G2D is a generalization of the well-known FitzHugh-Nagumo model (FitzHugh, 1961; Nagumo et. al, 1962), adapted here for reproducing a wilder class of dynamical configurations of physiological phenomena as observed in neuronal population using phase-portrait method.

$$\dot{V} = d \tau \left(I \gamma + V g + V \mathcal{lo}_{coupling} + W \alpha + c_{glob} \gamma + e V^{2} - f V^{3}\right) \tag{1}$$
$$\dot{W} = \frac{d \left(a + V b + c V^{2} - W \beta\right)}{\tau} \tag{2}$$

| Symbol | Kind | Meaning | Value |
|:--------|:-------------------------|:-------------------------------------------|--------:|
| $V$ | state (coupling, recorded) | V_G2D is the first state-variable of the Generic 2-Dimensional Oscillator model, that can be associated with membrane potentials and sodium activation (FitzHugh, 1961) | 0.1 |
| $W$ | state (recorded) | W_G2D is the second state-variable of the Generic 2-Dimensional Oscillator model, that can be associated with accommodation and refractoriness and considered to represent potassium activation, sodium inactivation, or both (FitzHugh, 1961) | 0.1 |
| $I$ | parameter | Baseline shift of the cubic nullcline | 0 |
| $a$ | parameter | Vertical shift of the configurable nullcline | 2 |
| $\alpha$ | parameter | Constant parameter to scale the rate of feedback from the slow variable to the fast variable. | 1 |
| $b$ | parameter | Linear slope of the configurable nullcline | -10 |
| $\beta$ | parameter | Constant parameter to scale the rate of feedback from the             slow variable to itself | 1 |
| $c$ | parameter | Parabolic term of the configurable nullcline | 0 |
| $d$ | parameter | Temporal scale factor | 0.02 |
| $e$ | parameter | Coefficient of the quadratic term of the cubic nullcline | 3 |
| $f$ | parameter | Coefficient of the cubic term of the cubic nullcline | 1 |
| $g$ | parameter | Coefficient of the linear term of the cubic nullcline | 0 |
| $\gamma$ | parameter | Constant parameter to reproduce FHN dynamics where                excitatory input currents are negative | 1 |
| $\tau$ | parameter | A time-scale hierarchy can be introduced for the state         variables :math:`V` and :math:`W` | 1 |
| $b$ | coupling | Shifts the base of the connection strength while maintaining the absolute difference between different values. | 0 |
| $a$ | coupling | Linear scaling factor of the coupled (delayed) input. | 0.05 |

**Table.** Symbols of the Generic2dOscillator, including those its coupling introduces.


**Coupling: c\_glob**

$$c = b + a \cdot \sum_{j=0}^{-1 + N} {V}_{j,t - {\tau}_{i,j}} \cdot {w}_{i,j} \tag{3}$$

Each source node contributes its own state unmodified; there is no pre-synaptic transformation.

**Post-synaptic:**

$$c_{\text{post}} = b + a \cdot gx \tag{4}$$

Incoming states: $V$; Conduction delays enabled; Symmetry: directed.


### Experiment 1: A whole-brain simulation

87 nodes, Heun at $\Delta t$ = 0.1 ms, run for 800 ms, the first 300 ms discarded.

</details>

<details>
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-share-dark.svg"><img src="https://raw.githubusercontent.com/virtual-twin/tvbo/main/docs/0-SimulationStudyLifecycle/assets/stage-share-light.svg" alt="" width="20" height="20" align="top"></picture> <b>Share: publish to the platform</b></summary>

Push an experiment to [tvbo.charite.de](https://tvbo.charite.de), privately, to named colleagues or to the public gallery, and load it back from Python (`pip install tvbo[api]`). [More on sharing](https://virtual-twin.github.io/tvbo/6-share/).

```python
from tvbo.platform import TVBOPlatform

platform = TVBOPlatform("https://tvbo.charite.de", api_key="<your API key>")
platform.push_experiment(study.get_experiment(1), visibility="shared")
```

</details>

## Installation

```bash
pip install tvbo
```

Requires Python 3.11 or newer. The core install compiles any specification and runs it on JAX; other backends install as extras (`pip install tvbo[tvb]`, `tvbo[julia]`, `tvbo[all]`). See [Installation](https://virtual-twin.github.io/tvbo/installation.html) for every extra and platform note.

## Resources

- [Documentation](https://virtual-twin.github.io/tvbo/)
- [Model browser](https://virtual-twin.github.io/tvbo/browser): models, parameters and equations
- [Metadata schema](https://virtual-twin.github.io/tvbo/datamodel): the TVB-O data model
- [Platform](https://tvbo.charite.de): the knowledge graph and an experiment builder in the browser
- [Issues](https://github.com/virtual-twin/tvbo/issues)
- AI coding assistants: `tvbo skills install` gives Claude Code, Cursor and Copilot the specification format and the knowledge base

## Citation

A manuscript describing `tvbo` is in preparation. Until it appears, please cite the software via this repository and [tvbo.charite.de](https://tvbo.charite.de).

## License

Copyright © 2025 Charité — Universitätsmedizin Berlin. The code and documentation are licensed under the European Union Public Licence (EUPL) v1.2 or later ([LICENSE](https://github.com/virtual-twin/tvbo/blob/main/LICENSE)); the ontology, the LinkML schema and the curated records under [CC BY 4.0](https://github.com/virtual-twin/tvbo/blob/main/LICENSES/CC-BY-4.0.txt). Third-party data files, and records that inline third-party labels, coordinates or values, carry their sources' licences as well, which [REUSE.toml](https://github.com/virtual-twin/tvbo/blob/main/REUSE.toml) states file by file; the licence texts are in [LICENSES](https://github.com/virtual-twin/tvbo/tree/main/LICENSES).

## 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.
