Skip to main content

An OBI Simulation Control application for NEURON

Project description

banner

Neurodamus

https://zenodo.org/badge/640796304.svg

Neurodamus is a BBP Simulation Control application for Neuron.

The Python implementation offers a comprehensive Python API for fine tuning of the simulation, initially defined by a BlueConfig file.

Description

Neurodamus is the BBP in-house developed application for setting up large-scale neuronal simulations. It has traditionally been implemented as a set of extensions to Neuron, in the form of .hoc and .mod files. The parameters of the simulation are loaded from a configuration file, by default BlueConfig.

To address several limitations of the Hoc implementation, including development effort, the high-level layers of Neurodamus have been reimplemented in Python. Such implementation effectively makes available to the user a Python module with a comprehensive API, suitable to fine control simulation aspects, as well as inspect and eventually adapt the simulations as intended.

Install

Prerequisites

Install neurodamus

git clone https://github.com/openbraininstitute/neurodamus.git
cd neurodamus
pip install .

Build special with mod files

Once neuron and neurodamus are installed, you can build special with your mod files:

mkdir mods
cp -r <your-mod-files> mods/
export DATADIR=$(python -c "import neurodamus; from pathlib import Path; print(Path(neurod)mus.__file__).parent / 'data')")
cp -r $DATADIR/mod/* mods/
nrnivmodl -incflags '-I <include-paths-of-our-dependencies>' -loadflags '-L <libs-paths-for-linking>' mods

To use the Blue Brain open models, you can build neurodamus-models. It will also produce a handy build_neurodamus.sh script that calls nrnivmodl with all dependencies to compile your future mod files

build_neurodamus mods/

Examples

Once neurodamus is installed, you should be able to find the executable neurodamus in your path:

$ neurodamus
  Usage:
      neurodamus <ConfigFile> [options]
      neurodamus --help

Among the options you will find flags to tune run behavior.

Neurodamus explicitly depends on MPI libraries for parallel execution. Therefore please use “srun” or “mpiexec” to launch it, according to your platform. If you don’t, complicated error messages may show up. Please remember it.

Even though a neurodamus launcher is provided, for production runs we suggest using special instead. This way has proven to take advantage of optimized math libraries. We hope to bring the same advantages to the launcher script soon.

export NEURODAMUS_PYTHON=$(python -c "import neurodamus; from pathlib import Path; print(Path(neurod)mus.__file__).parent / 'data')")
export HOC_LIBRARY_PATH=<hoc_files_folder>
srun <srun params> <your_built_special> -mpi -python $NEURODAMUS_PYTHON/init.py <neurodamus params>

An example of a full installation with a simulation run can be found in the workflow test simulation_test.yml.

Docker container

Alternatively, you can start directly a neurodamus docker container where all the packages are built. With the container, you can build your mod files and run simulations. See instructions in docker/README.md.

Building the docker container

The docker images will be built in the regular github action - if triggered under the right conditions (either manually or through git tag creation) the container jobs will be added to this pipeline.

If you run the pipeline manually, you can also set versions for the dependencies:
  • LIBSONATAREPORT_TAG: git tag for libsonata-report

  • LIBSONATA_TAG: git tag for libsonata

  • NEURON_COMMIT_ID: commit ID for neuron

  • REGISTRY_IMAGE_TAG: this will be the container version. Must be specified if you specify one of the others.

Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

Copyright (c) 2005-2024 Blue Brain Project/EPFL

Copyright (c) 2025-2026 Open Brain Institute

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

neurodamus-4.2.2.tar.gz (191.9 kB view details)

Uploaded Source

Built Distribution

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

neurodamus-4.2.2-py3-none-any.whl (222.9 kB view details)

Uploaded Python 3

File details

Details for the file neurodamus-4.2.2.tar.gz.

File metadata

  • Download URL: neurodamus-4.2.2.tar.gz
  • Upload date:
  • Size: 191.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neurodamus-4.2.2.tar.gz
Algorithm Hash digest
SHA256 41c74b2a8fafe252d3984a7a003a3e79b0a7c8bc4e4a00f266c6c708fe7d3bc8
MD5 e79f077be398f87f81f34cde1f5a3f86
BLAKE2b-256 ebc68876703503cd8c08f200ca6b35d1017b2b41c3e2088de0251df13a294a33

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurodamus-4.2.2.tar.gz:

Publisher: publish_wheels.yml on openbraininstitute/neurodamus

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

File details

Details for the file neurodamus-4.2.2-py3-none-any.whl.

File metadata

  • Download URL: neurodamus-4.2.2-py3-none-any.whl
  • Upload date:
  • Size: 222.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neurodamus-4.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c6d47b4fafadf684b1c509c081fe3805c51e490bdecb45c1a5b2c2bdf82edcd
MD5 e6fa59897b28827052eb897301c7ac6d
BLAKE2b-256 32c607dbe4fde2a221bded4a95010e7504f62bcb5c0dbc1af6031ace2de9eeca

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurodamus-4.2.2-py3-none-any.whl:

Publisher: publish_wheels.yml on openbraininstitute/neurodamus

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