suny-downstate-medical-center / netpyne

A Python package to facilitate the development, parallel simulation, optimization and analysis of multiscale biological neuronal networks in NEURON.
http://www.netpyne.org
MIT License
149 stars 138 forks source link

Izhikevich point neuron as ARTIFICIAL_CELL in NEURON/NetPyNE #612

Open salvadord opened 3 years ago

salvadord commented 3 years ago

@pgleeson we discussed having an example/tutorial using Izhikevich neurons. However, the only implementations of Izhikevich I know of in NEURON are these ones: https://senselab.med.yale.edu/modeldb/ShowModel?model=39948#tabs-2 . IzhiA uses a dummy section to insert a point process that has it's own voltage ('V') variable; and IzhiB inserts a point process in a regular section and uses NEURON's voltage ('v'). The current implementation in netpyne uses the IzhiB model (https://github.com/Neurosim-lab/netpyne/blob/development/examples/HybridTut/HybridTut.py) and I was going to replace it with the IzhiA (point process in dummy section).

However, neither of these implementations are a proper ARTIFICIAL_CELL like 'intfire1' or 'intfire4' -- https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/mechanisms/mech.html .

Is it worth replacing IzhiB with IzhiA? Do you happen to have a proper ARTIFICIAL_CELL implementation of Izhikevich neurons?

pgleeson commented 3 years ago

@salvadord None of the NeuroML Izh (or really any other examples) are really ARTIFICIAL_CELL like... It just breaks too many other things not having a membrane potential like neuron and current like synapse. Even rate based models are generally implemented on top of these ideas (potentially with dimensionaless quantities).

I went down the intfire/ARTIFICIAL_CELL route a bit testing Sonata and gave up...

salvadord commented 3 years ago

@pgleeson Ok, great, so the current netpyne hybrid model uses IzhiB ... is that ok, or do you have a preference for IzhiA?

jpalma-espinosa commented 3 years ago

@pgleeson Hello. I am an intern working on implementing an AdEx model to Neuron and then to Netpyne. I was interested in your statement about using ARTIFICIAL_CELL breaks things. May you explain this a little bit deeper? I am actually using ARTIFICIAL_CELL statement in the proposed Adex model, but I wish to know a prior if I should go for a standard point process mechanism, or keep going with ART_CELL.

pgleeson commented 3 years ago

Hi @jpalma-espinosa. It was mainly down to handling how these types of cells were synaptically connected to other cells and how they integrate inputs. In NeuroML, the assumption is that a synapse will provide a time varying current (or a current clamp input will produce a curent) and there needs to be somewhere in the expressions for the cell dynamics that this can be added in. This is fine for a standard synapse/neuron model, but an artificial cell effectively has a state discontinuity in built when it recieves an event, and that was difficult to implement in the standard nml framework.

I wouldn't completely dissuade you from using an ARTIFICIAL_CELL, but make a simple implementation of the cell, and then test whether it can be used in a network soon after that with standard netpyne/netpyne-ui functionality.

jpalma-espinosa commented 3 years ago

Thank you for the clarification. It seems then that, artificial cells are better suited for "offline" simulation, with no integration with other cells and/or networks, am I right?

pgleeson commented 3 years ago

I've not used them much to be honest. To clarify, I'm not saying they can't be used in networks easily, it may be the case though that that are difficult to integrate into the rest of the framework for linking cells with synaptic connections in NetPyNE/NP-UI, but this is not clear to me.

I do think though that it should be perfectly possible to have an adex or izhikevich cell in standard nmold conducatnce based cell-like form (i.e. not ARTIFICIAL_CELL), which can have any current producing synapse attached to it.

salvadord commented 3 years ago

for what it's worth we do have netpyne networks interacting with ARTIFICIAL_CELL (IntFire1 and IntFire4): https://github.com/Neurosim-lab/netpyne/blob/development/doc/source/code/tut_artif.py and of course also with Izhikevich cells that use mod files inserted into sections: https://github.com/Neurosim-lab/netpyne/blob/development/doc/source/code/tut_import.py

So both are possible. So Javier I would suggest trying to implement using regular mod files inserted in sections (like Izhikevich), but if that seems complicated, you can also try using an ARTIFICIAL_CELL (like IntFire1).

salvadord commented 3 years ago

@pgleeson so the current netpyne hybrid model uses IzhiB ... is that ok, or do you have a preference for IzhiA? (see differences in 1st msg above)

pgleeson commented 3 years ago

Sorry, missed that @salvadord. Yes, for me, IzhiB would be closer to NeuroML like implementations and would I believe cause fewer problems in the long run.

An example of which might be... in your tut_artif.py above, you have cells connected with AMPA, which has tau1 and tau2 vaules explicitly set. However, IntFire4 has its own taue value for the exc synaptic decay time, and it just records an input event and uses taue as decay time, ignoring the values from AMPA. Or am I misinterpreting?

RonaldAJ commented 11 months ago

IzhiTso.zip

Two implementations (NMODL) of Izhikevich neurons as point processes, combined with Tsodyks STP-model. 18 years old and hardly used, maybe someone finds them of use.

Note: the email address in the mod-files is no longer valid.