Skip to main content

The Virtual Brain Ontology

Project description

TVBO logo

The Virtual Brain Ontology

Lint & Test Ruff PyPI version PyPI - Downloads License

tvbo is a Python library to access the knowledge representation system (i.e., ontology) and data model for the neuroinformatics platform The Virtual Brain (TVB).

🚀 Installation

pip install tvbo

Platform Notes

Intel Mac Users (x86_64): TVBO requires Python ≥3.11. On Intel Macs, the [audio] and [tvb] extras pin numba<0.60 / llvmlite<0.44 because newer llvmlite has no macosx_x86_64 wheels for Python 3.12+. JAX is also pinned to 0.4.28 (the last Intel-Mac release).

Apple Silicon Mac Users: Python ≥3.11 is supported. You'll get the latest compatible JAX version automatically.

📖 Quick Start

Example: Lorenz Attractor Simulation

📝 Model Specification (YAML)
name: LorenzAttractor
parameters:
    sigma:
        value: 10
        label: Prandtl number
    rho:
        label: Rayleigh number
        value: 28
    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
🔧 Generate Code
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"}},
    },
)

code = SimulationExperiment(dynamics=lorenz).render_code('jax')
print(code)
▶️ Run Simulation
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"}},
    },
)

# Run simulation and plot results
SimulationExperiment(dynamics=lorenz).run(duration=1000).plot()

📚 Documentation

🔬 Features

  • 🧠 Access TVB ontology and knowledge base
  • 📊 Define and simulate dynamical systems
  • 🔄 Code generation for multiple backends (JAX, NumPy)
  • 📈 Built-in visualization tools
  • 🗃️ Structured metadata schema

📦 Installation Options

Standard Installation

pip install tvbo

With API Server Support

pip install tvbo[api]

With TVB Integration

pip install tvbo[tvb]

Full Installation (All Features)

pip install tvbo[all]

Note: The knowledge extra requires manual installation:

pip install git+https://github.com/neurommsig/neurommsig-knowledge.git

📄 License

Copyright © 2025 Charité Universitätsmedizin Berlin. This software is licensed under the terms of the European Union Public Licence (EUPL) version 1.2 or later.

Funding

P.R. acknowledges support by EU Horizon Europe program Horizon EBRAINS2.0 (101147319), VirtualBrainTwin(101137289), EBRAINS-PREP101079717, AISN101057655, 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 and EBRAINS Health Data Cloud and the Berlin Institute of Health and Foundation Charité. P.R. and J.M. acknowledge additionally support by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - Project-ID 424778381 - TRR 295.

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

tvbo-0.4.3.tar.gz (22.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvbo-0.4.3-py3-none-any.whl (23.2 MB view details)

Uploaded Python 3

File details

Details for the file tvbo-0.4.3.tar.gz.

File metadata

  • Download URL: tvbo-0.4.3.tar.gz
  • Upload date:
  • Size: 22.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tvbo-0.4.3.tar.gz
Algorithm Hash digest
SHA256 42a097450272e91470ffc86306ea9d5d1381ee7411bf0a9dff1dea5a2f019385
MD5 7e779dd4eab9279c78d06662a1e46a2a
BLAKE2b-256 6cd747fcf8353a22799b73c13cb5c63248e08b180e60d76e30b77686c1199160

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvbo-0.4.3.tar.gz:

Publisher: publish-pypi.yml on virtual-twin/tvbo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tvbo-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: tvbo-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 23.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tvbo-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b70eed08769dc8fcc52a814a7033726c9e16144a6491520bfda15d9c9b5eb623
MD5 1772bb11304ec5103e8e4052e701df0b
BLAKE2b-256 1c62624ea68bdb033d31c1fe4e281b9906f1f72cca70a317392460a948fc047b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvbo-0.4.3-py3-none-any.whl:

Publisher: publish-pypi.yml on virtual-twin/tvbo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page