Neuron Action Potential Simulation

PyQt5 application and Python modules for simulating neuronal action potentials with the Hodgkin–Huxley model using Euler, Runge-Kutta, and SciPy ODE solvers.

View on GitHub

What it does

The core model is implemented in src/modulo.py. It computes the membrane voltage and channel gate dynamics and exposes the following solver functions: EulerFor, EulerBack, EulerMod, RungeKutta2, RungeKutta4, scipy_solve, and scipy_odeint.

The GUI in src/interfaz.py loads a Qt UI file, lets you configure initial conditions and stimulation currents, and plots voltage vs. time with Matplotlib.

Demo / Screenshot

Neuron Action Potential PyQt app demo

Main application demo screenshot.

Tech stack

Python PyQt5 NumPy SciPy Matplotlib

Getting started

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp assets/bb.ui .
python src/interfaz.py

Project structure

.
├── assets/
│   ├── bb.ui
│   ├── gorro.png
│   ├── pulpo.png
│   └── imagenes.qrc
├── docs/
│   ├── index.html
│   └── assets/
│       ├── style.css
│       ├── demo-app.png
│       └── simulation-rk4.png
├── src/
│   ├── interfaz.py
│   ├── modulo.py
│   ├── grafica.py
│   └── imagenes.py
├── requirements.txt
└── LICENSE

License

MIT License. See LICENSE.