Skip to main content

The Virtual Brain Ontology

Project description

TVBO logo

The Virtual Brain Ontology

Python package PyPI version PyPI - Downloads

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

📖 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(local_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(local_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.

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.2.2.tar.gz (26.2 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.2.2-py3-none-any.whl (26.5 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tvbo-0.2.2.tar.gz
Algorithm Hash digest
SHA256 487d9f999d556cf6b622dbf9516cb5be76849c5b572ccc31d2dc5734ab8e5a10
MD5 b864f4b8bb7b7587a36121a6890cd89c
BLAKE2b-256 8b47d87cae0abdb4ee9b2932173870671144a47931ec6b482df9da8aeb81c6ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvbo-0.2.2.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.2.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tvbo-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 130f888cfcd141e93b9c5a9fd35cebed85d661b7254edc35b1d8ba30364ded3d
MD5 7f1c49e13b78bf164ed300b8584ae12e
BLAKE2b-256 5db2f3259bb3cf539df399a393fc61a2c960ac222c3419bd5a4f077c490debc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tvbo-0.2.2-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