Skip to main content

A toolbox for biophysical network modeling on GPUs

Project description

The cuBNM toolbox performs efficient simulation and optimization of biophysical network models (BNM) of the brain on GPUs.

Overview

The toolbox currently supports simulation of network nodes activity based on reduced Wong-Wang model with analytical-numerical feedback inhibition control. The Balloon-Windkessel model is used for calculation of simulated BOLD signals. It calculates goodness of fit of the simulated BOLD to the empirical BOLD based on functional connectivity (FC) and functional connectivity dynamics (FCD) matrices. The parameter optimization of the model can be done using grid search or evolutionary optimizers. Parallelization of the entire grid or each iteration of evolutionary optimizers is done at two levels: 1) simulations (across the GPU ‘blocks’), and 2) nodes (across each block’s ‘threads’). The toolbox additionally supports running the simulations on single- or multi-core CPUs, which will be used if no GPUs are detected or when requested by user (but the toolbox mainly focuses on GPUs).

This is a simplified flowchart of the different components of the program written in Python, C++ and CUDA.

flowchart

Installation

git clone https://github.com/amnsbr/cuBNM.git
cd cuBNM && pip install .

Installation requires Python (tested with 3.9) and g++. Currently Windows, Mac and non-Nvidia GPUs are not supported.

GSL is another requirement which will be installed by the package (in ~/.cuBNM/gsl) but it takes a rather long time and is only done if libgsl.a and libgslcblas.a are not found in "/usr/lib", "/lib", "/usr/local/lib", $LIBRARY_PATH, $LD_LIBRARY_PATH. If you have GSL on your system but it is installed elsewhere, please add the libgsl.a and libgslcblas.a directories to $LIBRARY_PATH.

Usage

In ./examples/examples.py you can find some examples of running a single simulation (run_sims), grid search (run_grid) or CMAES optimization (run_cmaes_optimizer). More comprehensive documentations and examples will be added.

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.1.tar.gz (4.3 MB view hashes)

Uploaded Source

Built Distributions

cuBNM-0.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

cuBNM-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

cuBNM-0.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

cuBNM-0.0.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

cuBNM-0.0.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

cuBNM-0.0.1-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

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