MIND_Sim is designed for studying Multiscale Integrative Neuronal Dynamics
Project description
MIND_Sim is designed for studying Multiscale Integrative Neuronal Dynamics
Installation • Overview • Architecture • Performance • Acknowledgements
Installation
CPU wheel
pip install mind-simulator
MOD files
mind-nrnivmodl path/to/mods
Requires: C++ compiler.
NVHPC builds
conda activate mind_sim
git submodule update --init --recursive
CMAKE_BIN="$(command -v cmake)"
PYTHON_BIN="$(command -v python)"
NVCXX_BIN="$(command -v nvc++)"
unset CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBRARY_PATH COMPILER_PATH GCC_EXEC_PREFIX
export PATH="/usr/bin:/bin:${PATH}"
"${CMAKE_BIN}" -S . -B build-nvhpc-cpu \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER="${NVCXX_BIN}" \
-DMIND_SIM_ENABLE_GPU=OFF \
-DPython_EXECUTABLE="${PYTHON_BIN}"
"${CMAKE_BIN}" --build build-nvhpc-cpu -j
"${CMAKE_BIN}" --install build-nvhpc-cpu --prefix "$("${PYTHON_BIN}" -c 'import sys; print(sys.prefix)')"
Requires: CMake, Bison, Flex, nanobind, and NVIDIA HPC SDK.
Use -DMIND_SIM_ENABLE_GPU=ON for the OpenACC GPU build.
Use -DMIND_SIM_ENABLE_NATIVE_OPT=ON only for host-specific CPU builds.
Overview
Currently, it is intended for personal research use, with features added as needed.
MIND_Sim is an extension simulator based on the NEURON Simulator for studying Multiscale-Integrative Neuronal Dynamics. It is organized around three main ideas:
- It rewrites the frontend network-modeling layer of NEURON in C++, while preserving a NEURON-style API, and improves network construction speed by more than 10x.
- It extends the MOD DSL to describe neural population dynamics and micro2macro transformations, providing a flexible way to build hybrid models and addressing the current limitation that the TVB platform does not yet support hybrid models.
- It treats regions of interest (ROIs) as first-class modeling objects, so users can freely choose the brain regions and scales they want to simulate.
A demo blog post introducing the MIND_Sim workflow is available here.
Architecture
Execution model
MIND_Sim is designed for multiscale modeling, but it also supports micro-only and macro-only simulations. The micro-scale backend is built on CoreNEURON, so detailed neuron simulations can use CPU multi-threading and CoreNEURON GPU execution. The macro-scale backend is designed around an overlap pipeline: while the micro simulation advances one exchange window, the CPU-side macro and transform work can be prepared or executed around that window. The macro layer is currently single-threaded; for the neural mass models used so far, this is sufficient because macro computation is small enough to be hidden behind micro execution.
ROI-centered modeling
At the macro scale, users load a labelled connectivity matrix, and MIND_Sim automatically creates one ROI object for each label. Each ROI can then choose the scale that is meaningful for the model: a detailed microcircuit or a neural mass model. Different ROIs may use different equations, different exposed variables, and different coupling rules.
MOD-based model definitions
MIND_Sim extends the MOD language used by the NEURON Simulator from micro-scale mechanisms to neural mass models and cross-scale transform modules. This keeps the modeling style aligned with NEURON/NMODL, so users who are already familiar with micro-scale mechanisms can move to micro2macro transforms without learning a completely separate model-description language. It also keeps the flexibility of modular mechanism definitions: equations and transform rules can be written independently, combined with different ROI models, and replaced without changing the rest of the simulation.
Based on the same idea, macro-scale network construction also follows a NEURON-like syntax.
The current micro-macro transformation is event based. This follows the same general direction as recent Arbor-TVB and TVB-NEST co-simulation work, where spiking activity and whole-brain variables are exchanged through explicit transformation modules: Hater, Courson, Lu, Diaz-Pier, and Manos (2026), Arbor-TVB: a novel multi-scale co-simulation framework with a case study on neural-level seizure generation and whole-brain propagation, and Kusch, Diaz-Pier, Klijn, Sontheimer, Bernard, Morrison, and Jirsa (2024), Multiscale co-simulation design pattern for neuroscience applications. From a NEURON Simulator perspective, micro2macro transformation is similar to synaptic event handling: each spike is delivered as an event and contributes to a macro exposure or state variable. Macro2micro transformation is NetStim-like: macro variables are converted into generated spike events that feed back into selected micro synapses.
Mapping microcircuits to ROIs
A single microcircuit can contribute selected exposures for one or more ROIs. With this interface, connectome-based models can perform ROI-to-ROI coupling through exposures. Region equations, ROI-to-ROI coupling, and micro2macro transforms write ROI exposures according to the mechanisms attached to each ROI.
Performance
By rewriting the NEURON simulator frontend in C++, MIND_Sim improves micro-network construction speed by more than 10x. This has been observed across multiple models.
Cosim
For full cosimulation, runtime is usually dominated by the micro-scale simulation itself. Therefore, although MIND_Sim provides an overlap pipeline, its benefit is limited in this example because macro simulation and transformation together take only a small fraction of the total runtime. The CA3 epilepsy co-simulation example compares MIND_Sim with a TVB+NEURON reference. The following timings are for 1s simulation time.
| Workflow | Threads | Pre-run | Run | Speedup |
|---|---|---|---|---|
| MIND_Sim async | 1 | 0.187s | 16.702s | 3.97x |
| TVB+NEURON | 1 | 0.591s | 66.327s | 1.00x |
| MIND_Sim async | 4 | 0.169s | 6.672s | 4.88x |
| TVB+NEURON | 4 | 0.558s | 32.531s | 1.00x |
For the same 1s runs, using the TVB+NEURON reference with TVB's official macro APIs, the maximum absolute differences between MIND_Sim and the reference are 1.28464e-06 for macro x, 1.4922e-09 for macro z, and 8.98019e-11 mV for representative PYR, BAS, OLM, and PYR Adend3 voltage traces. The macro comparison includes the precision boundary between TVB's single-precision (float32) state/history storage and MIND_Sim's double-precision macro state. Spike sample indices are exactly equal for the representative PYR, BAS, and OLM cells. This is an example-level comparison, not a standardized benchmark.
The CA3 all-in-one script uses TVB+NEURON as the reference. A direct TVB+CoreNEURON baseline is not used in the table because, in a short-window TVB loop, each pc.psolve() call repeatedly pays NEURON-side model preparation and CoreNEURON-side model loading costs. These costs made TVB+CoreNEURON slower than TVB+NEURON by 3.68x with one thread and 5.65x with four threads. This motivates a co-simulation simulator built directly on CoreNEURON: MPI-level coupling alone cannot efficiently use CoreNEURON's GPU mode for future scaling.
Frontend Build
The HL23 frontend acceleration example compares MIND_Sim's Python frontend with a CoreNEURON baseline. The following timings are for 100ms simulation time.
| Workflow | Threads | Pre-run | Run |
|---|---|---|---|
| MIND_Sim frontend (CPU) | 4 | 0.751s | 97.715s |
| MIND_Sim frontend (GPU) | GPU | 0.992s | 19.054s |
| CoreNEURON | 4 | 16.001s | 102.338s |
For the same 100ms run, the maximum absolute voltage difference is 1.88621e-07 mV across the recorded soma traces. Spike times are exactly equal.
Frontend modeling speedup depends on two main factors. More biophysically detailed neuron models benefit more from MIND_Sim's faster frontend construction. Networks with heavier connection construction benefit less, because connection setup is still limited by loop-based creation patterns.
Acknowledgements
I sincerely acknowledge the contributions of simulators such as NEURON, Arbor, GeNN, and TVB to computational neuroscience.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mind_simulator-0.1.0.tar.gz.
File metadata
- Download URL: mind_simulator-0.1.0.tar.gz
- Upload date:
- Size: 17.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed91c109509284240f31d981387131666ce86fc47194327e35c877a8fd4ddcda
|
|
| MD5 |
d1c13d4b1c4d6a8527e3af65aecb98c1
|
|
| BLAKE2b-256 |
843192bb3d90b2beb53b060d49ef38659ce1e3fe0b5936bf31cdf0a370d31fd8
|
Provenance
The following attestation bundles were made for mind_simulator-0.1.0.tar.gz:
Publisher:
python-publish.yml on HengyeZhu/MIND_Sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mind_simulator-0.1.0.tar.gz -
Subject digest:
ed91c109509284240f31d981387131666ce86fc47194327e35c877a8fd4ddcda - Sigstore transparency entry: 2024681540
- Sigstore integration time:
-
Permalink:
HengyeZhu/MIND_Sim@43686821578b3f2b786124a04fbec950be67d742 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HengyeZhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@43686821578b3f2b786124a04fbec950be67d742 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mind_simulator-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mind_simulator-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c80e804327a0b6e9b4538eb77df477704750203206964d2f0e1e96a70722a43a
|
|
| MD5 |
6ea56e0a07013bbf3ba964ff20255af7
|
|
| BLAKE2b-256 |
dcc2d8308a2f59a34a8cd14b7c209ac3f2409f9cdf9fbea9e4dd0a966fa1debc
|
Provenance
The following attestation bundles were made for mind_simulator-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on HengyeZhu/MIND_Sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mind_simulator-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
c80e804327a0b6e9b4538eb77df477704750203206964d2f0e1e96a70722a43a - Sigstore transparency entry: 2024681676
- Sigstore integration time:
-
Permalink:
HengyeZhu/MIND_Sim@43686821578b3f2b786124a04fbec950be67d742 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HengyeZhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@43686821578b3f2b786124a04fbec950be67d742 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mind_simulator-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mind_simulator-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
055844b6200a1ba059db5cdbd8d0c0bb447a8e39f7c0848c7f6ad7ae1976ffab
|
|
| MD5 |
1e4593fc92844239cb7eb78893074e7f
|
|
| BLAKE2b-256 |
46573ef362dfd573ab39f1c408e23dde29266f9d3c0b189df0cda3340ddc38c3
|
Provenance
The following attestation bundles were made for mind_simulator-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on HengyeZhu/MIND_Sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mind_simulator-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
055844b6200a1ba059db5cdbd8d0c0bb447a8e39f7c0848c7f6ad7ae1976ffab - Sigstore transparency entry: 2024681799
- Sigstore integration time:
-
Permalink:
HengyeZhu/MIND_Sim@43686821578b3f2b786124a04fbec950be67d742 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HengyeZhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@43686821578b3f2b786124a04fbec950be67d742 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mind_simulator-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mind_simulator-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27c46e8d1211611149e513e30799942fba4a0b321692d909d760966176bb1fde
|
|
| MD5 |
5baea5cc4bd904aa5e63fa5f2c304317
|
|
| BLAKE2b-256 |
4d54063eac627a5faadb2871fae6868369f9bda9e26b45baa8bf2121bb607131
|
Provenance
The following attestation bundles were made for mind_simulator-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on HengyeZhu/MIND_Sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mind_simulator-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
27c46e8d1211611149e513e30799942fba4a0b321692d909d760966176bb1fde - Sigstore transparency entry: 2024681744
- Sigstore integration time:
-
Permalink:
HengyeZhu/MIND_Sim@43686821578b3f2b786124a04fbec950be67d742 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HengyeZhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@43686821578b3f2b786124a04fbec950be67d742 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mind_simulator-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mind_simulator-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10994510f06ae40a25ed58413436e8e7b16a99cfeb608c6cd9ea9a1cae34747f
|
|
| MD5 |
80b306fbefc744c98e2b101635a5b21d
|
|
| BLAKE2b-256 |
e0b9d5342a66bf5443ffb67f290c6282bb2e4a789e057542f6dc29f1e188cee3
|
Provenance
The following attestation bundles were made for mind_simulator-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on HengyeZhu/MIND_Sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mind_simulator-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
10994510f06ae40a25ed58413436e8e7b16a99cfeb608c6cd9ea9a1cae34747f - Sigstore transparency entry: 2024681600
- Sigstore integration time:
-
Permalink:
HengyeZhu/MIND_Sim@43686821578b3f2b786124a04fbec950be67d742 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/HengyeZhu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@43686821578b3f2b786124a04fbec950be67d742 -
Trigger Event:
release
-
Statement type: