Sounds like a great project!
There are two main approaches that I'm aware of for sharing interactive NEURON simulations on the web:Approach 1: Jupyter notebook, GitHub, and MyBinder.org
Jupyter notebook provides a rich web-based approach for running Python programs, including NEURON. Put the bulk of the code in a file you import and use Jupyter's widgets
and matplotlib-based graphics (PyNeuron-Toolbox
can help by providing shape-plot like functionality) to allow interactively triggering simulations and exploring the results.
If you share your code in GitHub
, you can then use MyBinder.org
to run it. If reliability is important (MyBinder.org is a free service by a biology research lab not a company), they provide instructions for creating your own version to host locally.Williams et al 2016
used this strategy (without the widgets and with prominent code visibility) by sharing their NEURON code on GitHub (see, e.g. this file
) which when mybinder is available can be run at: http://mybinder.org/repo/ahwillia/Williams-etal-Synaptic-Transport
. (Warning: at the time of writing this post, deploying mybinder solutions is down; you can check the status of mybinder
A strength of this approach is that users have full access to NEURON (in a container, so they can't corrupt your system or anyone else's experience) and can explore anything they want by creating a new cell in Jupyter and running arbitrary Python code.Approach 2: Custom web interface
Alternatively, we have experimented with building custom interfaces for models; see the picture below.
The nice thing about this approach is that (1) you have full control over how things look and can use the latest approaches such as webgl (which enables the rotatable and zoom-able mitral cell here
) and can make sure things look great on both mobile and desktop, and (2) you can cleanly separate the science (whatever your interface allows them to do) from the code.
The downsides: (1) you need to know a little about jQuery and websockets, (2) you need to have a server that you control and can run arbitrary Python services on.