Skip to main content

A toolbox for biophysical network modeling on GPUs

Project description

https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/logo_text.png https://zenodo.org/badge/DOI/10.5281/zenodo.12097797.svg https://img.shields.io/pypi/v/cubnm https://img.shields.io/readthedocs/cubnm https://img.shields.io/badge/docker-amnsbr/cubnm-blue.svg?logo=docker https://app.codacy.com/project/badge/Grade/e1af99e878bc4dbf9525d8eb610e0026 https://img.shields.io/github/license/amnsbr/cubnm

cuBNM toolbox is designed for efficient biophysical network modeling of the brain on GPUs and CPUs.

Overview

cuBNM toolbox simulates neuronal activity of network nodes (neural mass models) which are connected through the structural connectome using GPUs/CPUs. Currently three models (rWW, rWWEx and Kuramoto) are implemented, but the modular design of the code makes it possible to include additional models in future. The simulated activity of model neurons is fed into the Balloon-Windkessel model to calculate simulated BOLD signal. Functional connectivity (FC) and functional connectivity dynamics (FCD) from the simulated BOLD signal are calculated efficiently on GPUs/CPUs and compared to FC and FCD matrices derived from empirical BOLD signals to assess similarity (goodness-of-fit) of the simulated to empirical BOLD signal.

The toolbox supports parameter optimization algorithms including grid search and evolutionary optimizers (via pymoo), such as the covariance matrix adaptation-evolution strategy (CMA-ES). Parallelization within the grid or the iterations of evolutionary optimization is done at the level of simulations (across the GPU ‘blocks’), and nodes (across each block’s ‘threads’). The models can incorporate global or regional free parameters that are fit to empirical data using the provided optimization algorithms. Regional parameters can be homogeneous or vary across nodes based on a parameterized combination of fixed maps or independent free parameters for each node or group of nodes.

GPU parallelization enables massive scaling of the simulations into higher number of simulations and nodes. Below you can see how computing time varies as a funciton of number of simulations and nodes on GPUs versus CPUs. For example, running 2^17 simulations (duration: 60s, nodes: 100) would take 15 days on a single CPU core, but only 19 minutes on an A100 GPU:

Scaling plots

GPU usage is the primary focus of the toolbox but it also supports running the simulations on single or multiple cores of CPU. CPUs will be used if no GPUs are detected or if requested by the user.

At its core the toolbox runs highly parallelized simulations using C++/CUDA, while the user interface is written in Python and allows for user control over simulation configurations:

Flowchart of the cuBNM program

Documentation

Please find the documentations on installation, usage examples and API at https://cubnm.readthedocs.io.

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

cubnm-0.0.5.tar.gz (4.7 MB view details)

Uploaded Source

Built Distributions

cubnm-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

cubnm-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

cubnm-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cubnm-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cubnm-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cubnm-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

File details

Details for the file cubnm-0.0.5.tar.gz.

File metadata

  • Download URL: cubnm-0.0.5.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.5

File hashes

Hashes for cubnm-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0a1b296add8d5184a4df6f4ee0465a885474fc84da20ef59a29977301a72aaf7
MD5 8542295ad4e5b4f65fde178ce86e3a5c
BLAKE2b-256 540309394b6b1381ae9f994d2f0b40af3e8bcde5c432e9364518423b4517cae7

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 08bb93069a53176cafce1b2c7bc67b2bbea9a85d57c76bac969fa3dc7d7bfd78
MD5 b36514efcbe5156000317936ab05e202
BLAKE2b-256 c6411cf6fa867eabb40dd8ca0615b6d437bc1b5719a7ef8799cdb01883e8a796

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcfa72ba05b4344327f4bca432df56cfa2557e884af7ea5cc08cd7b705db07b2
MD5 2b5ae5ed7072042a961884e7d55750b0
BLAKE2b-256 9babefff60ce6d26d4adeade1388f36031a3c9a02ff607a61b4f7a9dc6da77a5

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2a23564c982c83fda7d12ff43b663762fbb74aef7b288d86227a1f31d6ee7a9
MD5 bf8a26ba8e4a3e503830fc630bd636be
BLAKE2b-256 2069dcd46d61599725d8f8fa0d7cbaf6be503cfffafdca966d8ff99db98d1838

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cca977b39b6d4e500032c7893d593084a43603b9444a216f5d145d06668b99e
MD5 3130161eda8840864d04f1e8a9957de4
BLAKE2b-256 3bf9322a285aee255e92c4090b39a897d749795e487b1dedbc88e6aa24ff596f

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1fb5e38e9e6274c3fd996d2b4e048a934f89e41953a38442ea3d003e7a4e3dc
MD5 262aa60aef395fee87d3dadc7f73c93c
BLAKE2b-256 46bf14a8696eff2acebfe9aa194809d3a3f3a4b8c2ba52346b06e569837d9fd6

See more details on using hashes here.

File details

Details for the file cubnm-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubnm-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e6f4084a2b5311c7846d6695462281dec9207d392271d19fd25551171d39935
MD5 03890c39e95d73c4d1aba64a67b53ffb
BLAKE2b-256 14989a4c1142f231a97844e17a72ca6af27bb683dc499196edb63c2086928be6

See more details on using hashes here.

Supported by

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