How alleninstitute/dipde works
Project Type and Purpose
• Type: A Python scientific library/package for simulating mesoscale neuronal population dynamics.
• Purpose: Provide a high-performance engine (core internals) plus multiple interfaces to run distributed/networked simulations, analyze results, and generate visualizations.
File Structure
• Top-Level Packaging & Tooling
– setup.py, setup.cfg: Python packaging metadata
– environment.yml, requirements.txt: Conda/Pip dependencies
– Dockerfile, docker/…: Containerized runtime environments (Python2.7, Python3.6)
– .travis.yml, Makefile, conda/, conda_test.sh: CI/build scripts
• Core Library (dipde/)
– internals/: Core simulation engine (network, populations, connections, solvers)
– interfaces/: Adapters to external frameworks (MPI, ZMQ, NetworkX, NEuromL, NWB, pandas)
– experimental/: Prototypes & distributed solvers
– profiling/: Instrumentation hooks
– visualization/: Plotting and interactive sandbox
– examples/: User‐level demo scripts showing typical usage
– test/: Unit and integration tests
• Documentation (doc/, doc_template/)
– Sphinx sources and generated HTML
README for Insights
• Confirms it’s a simulation platform solving population density equations.
• Encourages community contributions.
Main Components & Their Relationships
a. Core Simulation Engine (dipde/internals)
– SimulationConfiguration → Simulation → Network → Populations → ConnectionDistribution → Solver
b. Interface Layer (dipde/interfaces)
– Wraps core engine for parallel (MPI, ZMQ), graph input (NetworkX), data I/O (pandas, NWB), model import/export (NeuroML)
c. Experimental Extensions (dipde/experimental)
– Builds on core+interfaces for distributed backends, fixed‐point analyses
d. User/API Layer (dipde/examples, dipde/visualization)
– Example scripts call core & interfaces to set up models and launch runs
– Visualization sandbox consumes simulation outputs
e. Deployment & Packaging
– Conda recipes, Docker containers
– CI pipelines (Travis), Makefiles, test harness
Architectural Patterns & Design Principles
• Modular layering: Core engine separated from interfaces, examples, and experimental code.
• Adapter pattern: Each interface subpackage adapts the core to a specific external system.
• Pluggable backend: Experimental/distributed backends can be swapped in via configuration.
• Test‐driven: test/ directory validates each layer.
• Documentation pipeline: Sphinx docs auto‐build from source.