Skip to main content
Dendra

PyTorch Python Code style: Ruff

Dendra is a differentiable biophysical neuron and network simulator built on PyTorch. It supports CPU and GPU execution, extracellular fields, event-based networks, and macroscopic descriptors for gradient-based model training.

Documentation

The complete documentation is published at wmglab-duke.github.io/dendra. Start with the installation guide, then see the tutorials and the unit conventions.

Installation

Dendra requires Python 3.11 or newer and PyTorch 2.12 or newer. On Windows, install inside WSL2 because the required NEURON dependency does not publish native Windows wheels on PyPI.

Install Dendra with the recommended native CPU solvers:

python -m pip install --upgrade pip
python -m pip install --only-binary=dendra-solvers "dendra[solvers]"

The solvers extra installs dendra-solvers, which provides native CPU solvers for block and tree models. If a compatible solver wheel is unavailable, install the base package:

python -m pip install dendra

The base package retains Dendra's PyTorch CPU solver for unbranched cables and all GPU solvers. To select a particular CPU, CUDA, or ROCm build, install PyTorch first using its installation selector, then install Dendra.

For interactive Matplotlib figures in Jupyter, install the Jupyter extra:

python -m pip install "dendra[jupyter]"

Verify the installed dependencies and inspect the deployment environment:

python -m pip check
python -m dendra doctor

The installation guide explains solver-wheel support, source installations, upgrades, and Jupyter setup. For CUDA deployment checks, see the GPU deployment guide.

Development

The contribution guide describes development setup and the GitHub pull-request workflow. The testing and code coverage guide covers the CPU, NEURON, CUDA, sanitizer, and coverage lanes.

Citation

A citation for Dendra and its accompanying manuscript will be added when it is available. Please also consider citing the work where geometric and topological surrogates and gradient-based design of selective neurostimulation are discussed in detail:

Minhaj A. Hussain, Warren M. Grill, Nicole A. Pelot. "Highly efficient modeling and optimization of neural fiber responses to electrical stimulation." Nature Communications. 2024. doi:10.1038/s41467-024-51709-8

@article{hussain_highly_2024,
    title = {Highly efficient modeling and optimization of neural fiber responses to electrical stimulation},
    doi = {10.1038/s41467-024-51709-8},
    journal = {Nature Communications},
    author = {Hussain, Minhaj A. and Grill, Warren M. and Pelot, Nicole A.},
    year = {2024}
}

License

Dendra is distributed under Duke University's custom license for non-commercial research and academic testing. Commercial use, including industrially sponsored research, requires a separate agreement with Duke's Office for Translation and Commercialization. The license governs all use; downloading, cloning, or forking the software constitutes acceptance of those terms.

Metadata

Release files for dendra 0.27.2

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

Source distribution (sdist)

Source distribution for dendra 0.27.2
File Size Uploaded
dendra-0.27.2.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dendra 0.27.2
File Interpreter ABI Platform
dendra-0.27.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.6 MB

Release files / dendra-0.27.2.tar.gz

Download URL dendra-0.27.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a86963f4dc50838c75a2eb7da73210e17278773433a87c85d6984e7dacf5775a
BLAKE2b-256 checksum
How to use checksums
4ed689cc130d18728a03a92278c8925bbe03d6af99d9c506c68389b1a7d6d53f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / dendra-0.27.2-py3-none-any.whl

Download URL dendra-0.27.2-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cc11a2397fd00cb3f4ae84e0e4524aff71077cd1d9c3fce51f09bbe89d33bffb
BLAKE2b-256 checksum
How to use checksums
07b76e61dceca5fe5c07f5ec66280b57e1718a69788f27bd94707864274cfe1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.27.2 This release

2 release files

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