neuronsim 3.0.0
A Hodgkin-Huxley model visualization for a small neural tree.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
neuronsim
This is a sim(ulation) of a biological neural network based on numeric solutions to the Hodgkin-Huxley equations.
It was initially made for a university course in mathematical modeling (I adapted it to GTK4 later on; see the changelog). It is based on chapters 2-4 and appendix B from the book "Neuroscience - A Mathematical Primer" by Alwyn Scott.
Installation
The easiest way to build the program is via dub. Either use dub run neuronsim to download and run the program or clone the repository and run dub inside.
Notes
The GUI itself is implemented using
gid(GObject Introspection for D). Because of this, the GUI code is somewhat object-oriented; it is however only a layer in front of a non-object-oriented simulation.The naming is purposefully verbose so that the code is as clear as possible.
Here are some highlights from the code:
All the parameter metadata is specified using user-defined annotations in the
ParameterSetstruct.The equations are solved numerically in the
simulateImpulsefunction.The MutableSimWrapper creates a mutable container for the otherwise immutable
SimConfigandNeuralTreeSimclasses. The latter two are immutable because they are shared between threads. The former is mutable because once a new tree is generated we need to somehow update its reference in the GUI code (so we update its wrapper's reference).A separate thread is launched using the
SimGeneratorclass for generating new neural trees without blocking the UI thread.The tree painting happens in the
NeuralTreeCanvasclass.
- 3.0.0 released 13 days ago
- v--/neuronsim
- Unlicense
- Authors:
- Dependencies:
- gid:adw1, gid:cairo1, gid:glib2, gid:gtk4
- Versions:
-
Show all 4 versions3.0.0 2026-May-17 2.3.0 2021-Jan-28 2.2.0 2020-Mar-08 ~master 2026-May-17 - Download Stats:
-
-
0 downloads today
-
1 downloads this week
-
3 downloads this month
-
25 downloads total
-
- Score:
- 0.7
- Short URL:
- neuronsim.dub.pm