Skip to main content

Welcome to MyoGen Logo

The modular and extensible simulation toolkit for neurophysiology

Documentation Python 3.12+ Version

Installation • Documentation • Examples • How to Cite

Overview

MyoGen is a modular and extensible neuromuscular simulation framework for generating physiologically grounded motor-unit activity, muscle force, and surface EMG signals.

It supports end-to-end modeling of the neuromuscular pathway, from descending neural drive and spinal motor neuron dynamics to muscle activation and bioelectric signal formation at the electrode level. MyoGen is designed for algorithm validation, hypothesis-driven research, and education, providing configurable building blocks that can be independently combined and extended.

Highlights

🧬 Biophysically inspired neuron models — NEURON-based motor neurons with validated calcium dynamics and membrane properties

🎯 Everything is inspectable — Complete access to every motor unit, spike time, fiber location etc. for rigorous algorithm testing

⚡️ Vectorized & parallel — Multi-core CPU processing with NumPy/Numba vectorization for fast computation

🔬 End-to-end simulation — From motor unit recruitment to high-density surface EMG in a single framework

📊 Reproducible science — Deterministic random seeds and standardized Neo Block outputs for exact replication

📦 NWB export — Optional export to Neurodata Without Borders format for data sharing via DANDI

🧰 Comprehensive toolkit — Surface EMG, intramuscular EMG, force generation, and spinal network modeling

Installation

Requires Python 3.12+ — Check your version with python --version

System Requirements

Platform Before Installing MyoGen
Windows NEURON 8.2.7 - Download, run installer, select "Add to PATH"
Linux sudo apt install libopenmpi-dev (Ubuntu/Debian) or sudo dnf install openmpi-devel (Fedora)
macOS brew install open-mpi

Step 1: Install uv (Package Manager)

We use uv - a fast Python package manager. Install it first:

Windows (open PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Linux/macOS:

curl -LsSf https://astral.sh/uv/install.sh | sh

After installing, restart your terminal (close and reopen it).


Step 2: Create a New Project

Open a terminal and navigate to where you want your project:

# Create a new folder for your project
mkdir my_emg_project
cd my_emg_project

# Initialize a Python project
uv init

# Add MyoGen to your project
uv add myogen

That's it! MyoGen is now installed and ready to use.


Step 3: Verify Installation

Create a test file to make sure everything works:

# Create a test script
uv run python -c "from myogen import simulator; print('MyoGen installed successfully!')"

If you see MyoGen installed successfully! - you're all set!


Alternative: pip install

If you prefer pip over uv:

pip install myogen

For Developers (From Source)

git clone https://github.com/NsquaredLab/MyoGen.git
cd MyoGen
uv sync
uv run poe setup_myogen

Optional: GPU Acceleration

For 5-10× faster convolutions (requires NVIDIA GPU):

uv add cupy-cuda12x

Documentation

📖 Read the full documentation

  • User Guide — Working with simulation outputs
  • API Reference — Complete class documentation
  • Examples — Step-by-step tutorials from recruitment to EMG

How to Cite

If you use MyoGen in your research, please cite:

@article{simpetru_molinari_2026_myogen,
  title   = {MyoGen: Unified Biophysical Modeling of Human Neuromotor Activity and Resulting Signals},
  author  = {S{\^i}mpetru, Raul C. and Molinari, Ricardo G. and Rohlf, Devon R. and
             Batichotti, Rebeka L. and Watanabe, Renato N. and
             Elias, Leonardo A. and Del Vecchio, Alessandro},
  journal = {bioRxiv},
  note    = {preprint},
  year    = {2026},
  doi     = {10.64898/2026.01.01.697284},
  url     = {https://www.biorxiv.org/content/10.64898/2026.01.01.697284}
}

Contributing

Contributions welcome! See issues if you want to add a feature or fix a bug.

Contributors

MyoGen is authored by Raul C. Sîmpetru and Ricardo G. Molinari. It is a joint project of the Nsquared Lab (Neuromuscular Physiology and Neural Interfacing Laboratory) at FAU Erlangen-Nürnberg, the NER Lab (Neural Engineering Research Laboratory) at the University of Campinas, and the BMClab (Biomechanics and Motor Control Laboratory) at the Federal University of ABC.

Thanks goes to these wonderful people (emoji key):

All Contributors

Raul C. Sîmpetru
Raul C. Sîmpetru

💻 🤔 🚧 📆 🔬
Ricardo G. Molinari
Ricardo G. Molinari

🤔 🚧 🔬
Devon R. Rohlf
Devon R. Rohlf

💻 🚧 🔬
Renato N. Watanabe
Renato N. Watanabe

💻 🤔 🧑‍🏫 🔬
Alessandro Del Vecchio
Alessandro Del Vecchio

🤔 🧑‍🏫 🔬
Leonardo A. Elias
Leonardo A. Elias

🤔 🧑‍🏫 🔬
João Bittar
João Bittar

🐛 🤔
BraveUnicorn
BraveUnicorn

💻
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MyoGen is AGPL licensed. See LICENSE for details.

Metadata

Release files for MyoGen 0.13.0

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

Source distribution (sdist)

Source distribution for MyoGen 0.13.0
File Size Uploaded Provenance Actions
myogen-0.13.0.tar.gz 4.0 MB With provenance Details for myogen-0.13.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for MyoGen 0.13.0
File Actions
myogen-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for myogen-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl
myogen-0.13.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for myogen-0.13.0-cp313-cp313-macosx_11_0_arm64.whl
myogen-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for myogen-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl
myogen-0.13.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for myogen-0.13.0-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 26.9 MB

Release files / myogen-0.13.0.tar.gz

Download URL myogen-0.13.0.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
ccd05d4fb62ecc7aaac27d1be6b62b5356328d1b62c96e0a1c3f197ccf89191c
BLAKE2b-256 checksum
How to use checksums
e887521df582fd22cf2d51c0c9335eba00c5a53db10719ae049f41ed609f72da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / myogen-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL myogen-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 6.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0e313e47b8d15ab1e7735e1fcd7b5899a7ef19b200c01695b0189c498b4918e7
BLAKE2b-256 checksum
How to use checksums
eb7ed55ec9eb94a803a90a6d12d2410f9a4b4dc29d626984fd921673114647ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / myogen-0.13.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL myogen-0.13.0-cp313-cp313-macosx_11_0_arm64.whl
Size 4.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83b1a30973c71e4c5166e53e73a256200f32f8920cc5b9594bb78427b6bad3a3
BLAKE2b-256 checksum
How to use checksums
cf332efc8938da451335669cba522a8d4c5edaeb7ca3b9e44b066819cfb4e33a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / myogen-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL myogen-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 6.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9758125ed31b414a6401989ccc9fe45da2c7dc4efda6f60f495ff9867c81b109
BLAKE2b-256 checksum
How to use checksums
3b066daf12f1aab6a47c603bf8fe8e0601d55c70ee2c7ef9b051844f26033927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / myogen-0.13.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL myogen-0.13.0-cp312-cp312-macosx_11_0_arm64.whl
Size 4.8 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01af937fe74ab0df7ef075b8adca60497dea4124466562db8c4cd06222b37f6b
BLAKE2b-256 checksum
How to use checksums
8e359587842137b30522fbb2e8583f978f3146549309edea34dcf33ba3d07ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Security for MyoGen 0.13.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for myogen-0.13.0.tar.gz

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 28, 2026.

Transparency log

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.

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