{"id":20956488,"url":"https://github.com/bluebrain/neurodamus-models","last_synced_at":"2025-09-30T07:31:22.595Z","repository":{"id":236971322,"uuid":"756849773","full_name":"BlueBrain/neurodamus-models","owner":"BlueBrain","description":"Blue Brain simulation models","archived":false,"fork":false,"pushed_at":"2024-10-23T10:39:38.000Z","size":606,"stargazers_count":2,"open_issues_count":12,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-11-13T01:03:01.600Z","etag":null,"topics":["cellular","models","neuroscience","simulation"],"latest_commit_sha":null,"homepage":"","language":"NMODL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueBrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-13T12:37:59.000Z","updated_at":"2024-10-30T18:10:56.000Z","dependencies_parsed_at":"2024-05-02T12:28:47.466Z","dependency_job_id":"e2a1fb13-4a15-4297-9ae1-42e2563c96f1","html_url":"https://github.com/BlueBrain/neurodamus-models","commit_stats":null,"previous_names":["bluebrain/neurodamus-models"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fneurodamus-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fneurodamus-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fneurodamus-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fneurodamus-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueBrain","download_url":"https://codeload.github.com/BlueBrain/neurodamus-models/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234713027,"owners_count":18875550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cellular","models","neuroscience","simulation"],"created_at":"2024-11-19T01:26:15.728Z","updated_at":"2025-09-30T07:31:22.589Z","avatar_url":"https://github.com/BlueBrain.png","language":"NMODL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e The Blue Brain Project concluded in December 2024, so development has ceased under the BlueBrain GitHub organization.\n\u003e Future development will take place at: https://github.com/openbraininstitute/neurodamus-models\n\n# neurodamus-models\n\nThis repo is the aggregate repository featuring all simulation models used within the Blue\nBrain Project to run in-silico simulations of mouse brains using the NEURON simulator.\n\n## Installation\n\n### Prerequisites\n\nThe models contained here require a compiler, CMake, MPI, and HDF5 to be installed.  On a\nUbuntu system,\n```console\nsudo apt-get install cmake libopenmpi-dev libhdf5-dev\n```\nwill install the necessary dependencies.  The [NEURON\nsimulator](https://github.com/neuronsimulator/nrn) and\n[Neurodamus](https://github.com/BlueBrain/neurodamus) simulation framework can be\ninstalled via pip:\n```console\npython -m pip install NEURON-nightly neurodamus\n````\n\nFurther, an installation of\n[libsonatareport](https://github.com/BlueBrain/libsonatareport) is required.  This can be\nbuilt with:\n```console\ngit clone https://github.com/BlueBrain/libsonatareport reports/src --recursive --shallow-submodules\ncmake \\\n  -B reports/build \\\n  -S reports/src \\\n  -DCMAKE_INSTALL_PREFIX=reports/install \\\n  -DSONATA_REPORT_ENABLE_SUBMODULES=ON \\\n  -DSONATA_REPORT_ENABLE_TEST=OFF\ncmake --build reports/build\ncmake --install reports/build\n```\n\n### Compiling the models\n\nThe mechanisms for a model can be built as follows, using the `neocortex` model as an\nexample:\n```console\ngit clone https://github.com/BlueBrain/neurodamus-models.git neurodamus-models/src\nexport CC=$(which mpicc)\nexport CXX=$(which mpicxx)\n# This can be set directly if the installation location of neurodamus is known\nDATADIR=$(python -c \"import neurodamus; from pathlib import Path; print(Path(neurodamus.__file__).parent / 'data')\")\ncmake -B neurodamus-models/build -S neurodamus-models/src \\\n  -DCMAKE_INSTALL_PREFIX=$PWD/neurodamus-models/install \\\n  -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \\\n  -DCMAKE_PREFIX_PATH=$PWD/reports/install \\\n  -DNEURODAMUS_CORE_DIR=${DATADIR} \\\n  -DNEURODAMUS_MECHANISMS=neocortex\ncmake --build neurodamus-models/build\ncmake --install neurodamus-models/build\n```\nThis will also produce a `build_neurodamus.sh` script that can be used to compile future\niterations of the MOD files.\n\n### Testing the models\n\nFollowing the above step, the compiled mechanisms can be accessed from within NEURON,\ne.g., with:\n```console\n./neurodamus-models/install/bin/special -python -c \"from neuron import h; from neurodamus import Neurodamus; h.quit()\"\n```\n\nFor an example on how to run a model with compiled mechanisms on a circuit, see the\n[integration test of\nNeurodamus](https://github.com/BlueBrain/neurodamus/blob/main/.github/workflows/simulation_test.yml).\n\n## Multi-model builds (MMB project)\n\nFor the cases where a combined set of models is desirable a `model_manager.py` tool is provided.\n\nThe details on how the models can be combined without clashing (i.e. same `SUFFIX` in MOD files) is to be provided in a configuration\nfile, where the user specifies a number of source models to be combined with an optional \"prefix\". Let's refer to the included `model_config.json` for an example:\n```\n{\n    \"ALL\": {\n        \"common\": {\n            \"mods\": [\"common/mod/*.mod\"],\n            \"hocs\": [\"common/hoc/*.hoc\"]\n        },\n        \"neocortex\": {\n            \"prefix\": \"NCX\",\n            \"mods\": [\n                \"neocortex/mod/v6/*.mod\",\n                [\"neocortex/mod/v5/DetGABAAB.mod\", \"new_name_for_DetGABAAB.mod\"]\n            ],\n            \"hocs\": []\n        }\n    }\n}\n```\n\nWhere\n - `ALL` is the name of this combined model. Resulting set will be stored in `build/ALL`.\n - `common` and `neocortex` are names of two sources of mod/hoc files.\n - For the `common`, we specified \"mods\" and \"hocs\" without `prefix` which means they are copied verbatim / without any modifications.\n   In our case this is important for existing circuits to keep working with unmodified synapse names.\n - `neocortex` specifies the `NCX` prefix. This means:\n    - File names are prefixed with \"NCX\", unless otherwise specified\n    - All .mod files (density channels, Point Processes and Artificial Cells) get their names prefixed\n    - All references to these mechanisms in .hoc files are adjusted accordingly.\n - \"mods\" and \"hocs\" lists accept a number of entries\n    - If the entry is a string then it's the path of the file to be considered (wildcards supported). E.g. `neocortex/mod/v6/*.mod`\n    - If the entry is a list, the second argument is taken as the new name.\n      E.g. `new_name_for_DetGABAAB.mod` is the new name of `DetGABAAB.mod` (no prefix)\n\n#### Running model manager\n\n```sh\n# It's an executable Python application\n$ ./model_manager.py\nUsage: ./model_manager.py \u003cconfig_file\u003e [--only-synapses]\n\n$ ./model_manager.py model_config.json\n[INFO] Checking 'ALL'\n[INFO] Building 'ALL' (only_synapses=False)\n[INFO]  - Processing common\n[INFO]  - Processing neocortex\n[INFO]    \u003e Path neocortex/mod/v6/*.mod\n[INFO]    \u003e Path ['neocortex/mod/v5/DetGABAAB.mod', 'new_name_for_DetGABAAB.mod']\n[INFO]    \u003e Path neocortex/hoc/AMPANMDAHelper.hoc\n[INFO]    \u003e Path neocortex/hoc/GABAABHelper.hoc\n[INFO]    \u003e Path neocortex/hoc/GluSynapseHelper.hoc\n...\n\n$ ls build/ALL\nhoc mod\n\n```\n\n#### Only rename synapses\nNotice an optional `--only-synapses` argument. It is intended to apply renaming rules only to synapse files, currently `ProbAMPANMDA_EMS.mod`, `ProbGABAAB_EMS.mod` and `GluSynapse.mod`.\n\nThis may be useful in case you are working with existing circuits where you do not want to rename machanisms yet, but still you want to rename and bundle the several synapse types together.\n\n## Acknowledgements\n\nThe development of this software was supported by funding to the Blue Brain Project, a\nresearch center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss\ngovernment’s ETH Board of the Swiss Federal Institutes of Technology.\n\nCopyright (c) 2009-2024 Blue Brain Project/EPFL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fneurodamus-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluebrain%2Fneurodamus-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fneurodamus-models/lists"}