Developed by the Department of Brain and Behavioral Sciences at the University of Pavia, the Brain Scaffold Builder ( BSB) is a component framework for neural modeling. It emphasizes modular component declarations to assemble brain models, supporting various configuration languages and Python library functions. BSB facilitates parallel reconstruction and simulation of diverse network topologies, placements, and connectivity strategies.
The BSB suite is now organized as a monorepo, integrating the following components:
- bsb-core: The foundational framework of BSB.
- bsb-hdf5: Storage engine for saving models in HDF5 format.
- bsb-json: Parser for reading and writing JSON configuration files.
- bsb-yaml: Parser for reading and writing YAML configuration files.
- bsb-nest: Simulation interface for point-neuron networks using the NEST simulator.
- bsb-neuron: Simulation interface for detailed neuron networks using the NEURON simulator.
- bsb-arbor: Simulation interface for detailed neuron networks using the ARBOR simulator.
- nmodl-glia: An NMODL asset manager.
- nrn-patch: Utility layer to reduce friction when working with NEURON in Python.
- arborize: Tool for Arbor-like descriptions of cell models for NEURON and Arbor.
- bsb-test: Tools and configurations for testing BSB components.
- sphinxext-bsb: Sphinx extension for BSB documentation.
Comprehensive documentation is available at:
The BSB supports Python 3.10 and above. To install the BSB suite along with the core framework and default plugins:
pip install bsb
For advanced users desiring a custom combination of plugins, install bsb-core
and the desired plugins separately:
pip install bsb-core
pip install bsb-hdf5 bsb-json bsb-yaml
To include simulation support for NEST, NEURON, or ARBOR:
pip install bsb[nest]
pip install bsb[neuron]
pip install bsb[arbor]
You can also clone the repository and use the devtools script to install all packages in editable mode in your own environment:
git clone https://github.com/dbbs-lab/bsb
cd bsb
pip install -r devtools/editable-install.txt
For development purposes, you should install the UV and NX tools.
To this end, there is a helper script for each platform in devtools/bootstrap-*
. For instance, for linux:
git clone https://github.com/dbbs-lab/bsb
cd bsb
./devtools/bootstrap-linux.sh
From there, you NX and UV will automatically create an environment for each subpackage, including all necessary libraries for running the unittests, linting the code and building the documentation.
For more information, please refer to the developers' documentation.
To create a new BSB project:
bsb new my_model --quickstart
cd my_model
This command generates a my_model
directory with starter files:
network_configuration.yaml
: Defines the network configuration.pyproject.toml
: Contains project metadata and configuration.placement.py
andconnectome.py
: Custom components for network placement and connectivity.
To compile the network:
bsb compile
For simulation, refer to the documentation for configuring simulations with NEST, NEURON, or ARBOR.
All contributions are very much welcome. Take a look at the contribution guide
This research has received funding from the European Union’s Horizon 2020 Framework Program for Research and Innovation under the Specific Grant Agreements No. 945539 (Human Brain Project SGA3) and No. 785907 (Human Brain Project SGA2), as well as from the Centro Fermi project “Local Neuronal Microcircuits” to ED. The project also receives funding from the Virtual Brain Twin Project under the European Union's Horizon Europe program under grant agreement No. 101137289.
We acknowledge the use of the EBRAINS platform and Fenix Infrastructure resources, which are partially funded by the European Union’s Horizon 2020 research and innovation program under the Specific Grant Agreement No. 101147319 (EBRAINS 2.0 Project) and through the ICEI project under grant agreement No. 800858, respectively.