Skip to main content

SPINE

Simulator for Plasticity and Integrated Neuronal Events

SPINE simulates neurons in mechanistic detail, from single cells to large networks on CPUs and GPUs.

  • A coupled voltage–calcium model: PMCA, NCX, VDCC, SERCA, RyR, IP3R, SOC and leaks are built in, with Hodgkin–Huxley or your own channels and AMPA, NMDA, GABA and calcium-coupled synapses with plasticity.
  • Extracellular stimulation: point-source, uniform-field and TMS fields, and myelinated axons.
  • One entry point, solve(), from one neuron on one CPU process up to multi-GPU and MPI populations.
  • Output: checkpoint and restart, streamed and HDF5 recording, 3-D rendering and animation.

The User Guide documents the models, every setting and the API. It is available at https://zacharymiksis.com/research/software/. The source archive on Zenodo (10.5281/zenodo.24226059) holds the guide, the examples and the tests. The PyPI package holds the library only.

Installation

pip install spine-neuro

This needs Python ≥ 3.10; NumPy, SciPy and threadpoolctl are installed with it. The package is imported as spine.

Extras combine freely, for example pip install "spine-neuro[viz,mpi]": examples (matplotlib), viz (3-D rendering and animation), mpi, gpu-cuda12 and gpu-cuda11, multi-gpu-cuda12 and multi-gpu-cuda11, hybrid-cuda12 and hybrid-cuda11, and metis. HDF5 output needs h5py (pip install h5py); no extra includes it. The User Guide lists the dependencies in its Dependencies section.

A natural-language front end that writes SPINE scripts is a separate package: pip install spine-assistant.

Quick start

from spine.utils import NeuronModel
from spine.solver import solve, read_results
from spine.graph import gen_beam
from spine.synapse import SynapseFactory

neuron = NeuronModel()
neuron.settings.top_folder = './'
neuron.settings.data_folder = 'calcium_wave/'
neuron.settings.output_folder = 'calcium_wave-output/'

for key in ('CYT_buffer', 'PMCA', 'NCX', 'SERCA', 'PM_leak', 'ER_leak', 'RyR', 'IP3', 'synapse'):
    neuron.model[key] = True                # the calcium mechanisms

neuron.geom_builder['const_rad'] = True
neuron.settings.rad = 0.2                   # µm
gen_beam(neuron, 64, 1000)                  # a 64 µm beam of 1000 nodes
neuron.settings.T = 70.e-3                  # 70 ms
neuron.settings.set_time_step(5.e-6)

neuron.synapse_instances = [                # calcium and IP3 influx at node 500
    SynapseFactory.create_calcium_linear(nodes=[500], amplitude=2.5e-12, duration=1.e-3),
    SynapseFactory.create_ip3_linear(nodes=[500], amplitude=5.0e-12, duration=200.e-3),
]

neuron.recorder['full'] = True              # cytosolic Ca²⁺ → results/calcium_wave-output/cyt.bin
neuron.recorder['full_er'] = True           # ER Ca²⁺       → results/calcium_wave-output/er.bin
neuron.recorder['format'] = 'binary'        # one binary table per neuron
neuron.recorder['precision'] = 'float32'
solve(neuron)

res = read_results('results/calcium_wave-output')
res.t                                       # time, s
res['cyt']                                  # (rows, 1000) cytosolic Ca²⁺ in µM

examples/basics/calcium_wave.py is a runnable version with plots. Internal units are µm, s, V and µmol/µm³; output is in mV and µM (see Units and conventions in the User Guide).

Examples

examples/ has one directory per topic (basics/, synapses/, morphology/, stimulation/, visualization/, gpu/, scaling/, cells/); every script writes to results/ below the current directory. The Index of examples in the User Guide describes each one. cells/ holds published cell models: the Jarsky CA1 cell under TMS (jarsky/), the Aberra layer-5 cell under field stimulation (aberra/), and a cerebellar Purkinje cell based on Masoli et al. (2015) with its SCA1[82Q] variant (purkinje/). The Jarsky and Purkinje directories have a README of their own.

python examples/basics/calcium_wave.py                                   # start here
python examples/gpu/calcium_wave_gpu.py                                  # needs a GPU extra
mpirun -n 8 python examples/scaling/parallel_scaling_test.py             # needs the mpi extra

Parallel and GPU runs

solve(neuron) runs one neuron on one CPU process. mpirun -n N python script.py is detected and needs no code change. solve(..., backend='gpu', batched=True) and solve(..., backend='gpu', devices=[...]) run populations on one or several GPUs, and MPI ranks can each hold GPUs. Testing covers the ranks and devices of one node. Several nodes are untested. See Parallel and GPU Backends in the User Guide.

Testing and contributing

With pytest installed:

pytest tests/                   # about three minutes on a workstation, CPU only
pytest tests/ -k synapse        # a subset by keyword

The suite runs the User Guide listings, compares the batched, multi-device and MPI solvers with the serial solver, and checks checkpointing and recording. Tests that need CuPy, mpirun or pymetis are skipped when those are missing. On a GPU machine, run python tests/gpu_population_check.py.

The User Guide chapters Extending SPINE, Architecture and Design, and Contributing and Testing cover new channels, receptors and flux mechanisms, the package layout, and the workflow for changes (fork, branch, add a test, open a pull request).

Citation

@software{spine2026,
  author  = {Miksis, Zachary M. and Queisser, Gillian},
  title   = {{SPINE}: Simulator for Plasticity and Integrated Neuronal Events},
  version = {1.0.0},
  year    = {2026},
  doi     = {10.5281/zenodo.24226059}
}

CITATION.cff holds the same entry for GitHub's "Cite this repository" button.

License

Copyright (C) 2026 Zachary M. Miksis and Gillian Queisser. Licensed under the GNU Lesser General Public License, version 3 or later (LGPL-3.0-or-later).

Acknowledgments

Works SPINE is based on:

  • Standard model (calcium parameters and coupled electro-calcium formulation): P. R. Borole, J. M. Rosado, M. Neal and G. Queisser, "Neuronal Resilience and Calcium Signaling Pathways in the Context of Synapse Loss and Calcium Leaks: A Computational Modeling Study and Implications for Alzheimer's Disease," SIAM J. Appl. Math., 2023. doi:10.1137/23M1557842
  • FJ model (Extended-Flux Fick-Jacobs, under development): Z. M. Miksis and G. Queisser, "A New Fick-Jacobs Derivation with Applications to Computational Branched Diffusion Networks," 2025. arXiv:2501.08247

Support

Email: miksis@temple.edu

Metadata

Release files for spine-neuro 1.0.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spine-neuro 1.0.0.post1
File Size Uploaded Provenance Actions
spine_neuro-1.0.0.post1.tar.gz 561.0 kB Without provenance Details for spine_neuro-1.0.0.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spine-neuro 1.0.0.post1
File Interpreter ABI Platform Actions
spine_neuro-1.0.0.post1-py3-none-any.whl Python 3 none any Details for spine_neuro-1.0.0.post1-py3-none-any.whl

Total release size: 1.1 MB

Release files / spine_neuro-1.0.0.post1.tar.gz

Download URL spine_neuro-1.0.0.post1.tar.gz
Size 561.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fd0e1472f85134dcb30196795843973cc6d2e692812be73d124e14dd19a620cd
BLAKE2b-256 checksum
How to use checksums
c1dd1758f58975bad232aeae9f75368304092f9827389d72676dced4aa87e25c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Release files / spine_neuro-1.0.0.post1-py3-none-any.whl

Download URL spine_neuro-1.0.0.post1-py3-none-any.whl
Size 535.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83839b58cfbda5fdf2b49e6b553ce5a271103f0ab8b57737e17b108c53644038
BLAKE2b-256 checksum
How to use checksums
436e7a1a0f9cd3f87548e656530d4f85430655f14b888233af691a1928383583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Security for spine-neuro 1.0.0.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0.post1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page