-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interaction with NEURON models #446
Comments
Hi, thanks for the time and effort in developing Brainpy! It's a great and convenient tool. I have tried to port a NEURON model into Brainpy for a while, and would like to share some of my personal experiences on the differences between the two simulators. Hope it will be helpful for someone who wishes to do the same. NEURON is fundamentally a physical, multi-compartment neuron simulator. As far as I know, even the simplest model in NEURON has length, diameter, the corresponding surface area, and axial resistance. As a consequence, in NEURON, we should take care of the difference between "point process" and "density mechanism". For example, external injection current and synaptic input current are usually described as "point process", and the values are usually the total amount of current flow into the cell. Membrane capacitance and ionic current are usually described as "density mechanism", and the values are usually normalized by the surface area. Brainpy, in its current version, does not have the concept of compartment. Many of the example HH neuron code in Brainpy's documentation does not specify the cell's length and diameter. In the documentation of Brainpy's synapse module, I also don't see a reminder on whether the synaptic currents are described in total amount or per-surface area. Besides, some Brainpy's internal code seems to implicitly rely on a point-neuron model. For example, the "AMPA" synapse requires the post-synaptic neurons to have the attribute "V", but in multi-compartment case we should specify the "V" of which compartment, and this may require some custom modifications on Brainpy's code. Yet, we can still build multiple-compartment neuron models in Brainpy. Ultimately, these models just mean more differential equations to solve. But the conceptual difference is important. It really confuses me when comparing the code between NEURON and Brainpy, since some model parameters are not needed in Brainpy, and some are expressed differently. Therefore, if one decides to port a NEURON model into Brainpy, it would be very helpful to first know how neurons are treated differently in the two software. Besides, it would also be helpful to cross-check between the numerical integration results of NEURON and Brainpy. The numerical integration result heavily depends on the initial conditions, the numerical integration method, and (to a lesser extent) the precision of floating-point numbers (float32 or float64). From my limited experience, in general, Brainpy's "exp-euler" solver can produce similar results as NEURON's "cnexp" and "derivimplicit" solvers. However, for some models with very stiff ODEs (for example, the Mainen & Sejnowski's 1996 Nature paper, in which the Na+ conductance is as large as 30000 pS/um^2), NEURON's solvers seem to be more stable and efficient. I have once needed to set |
So many thanks for your report! It's an excellent feedback for us. |
Hello @CloudyDory! |
Hi @PikaPei, I have implemented some customed two-compartment neuron models and synapses. I have not used the Be very specific about the units in BrainPy and NEURON. Once we get them correct, we should get very similar results in both simulators. There may be some remaining small difference because the two softwares use different numerical integrators. |
Unit checking is on the way. @Routhleck |
Thank you @CloudyDory for your reply, it's great to hear your experience again. Also looking forward to the unit checking! |
Please:
NEURON simulator has a vast database of template models. It is essential to make it easy to switch models in the NEURON simulator into the BrainPy.
The text was updated successfully, but these errors were encountered: