BlueBrain / CoreNeuron

Simulator optimized for large scale neural network simulations.
BSD 3-Clause "New" or "Revised" License
135 stars 38 forks source link

Make extracellular mechanism available #782

Open joseph-tharayil opened 2 years ago

joseph-tharayil commented 2 years ago

I'd like to be able to use CoreNeuron to simulate extracellular electrical stimulation, but this is currently not possible. Would it be feasible to make the extarcellular mechanism available in CoreNeuron, in order to allow these kinds of simulations?

pramodk commented 2 years ago

@nrnhines: could you comment if this feature can be implemented and how much efforts this requires? Joseph Tharayil is working at Blue Brain and using NEURON+CoreNEURON for simulations including LFP,EEG calculations.

nrnhines commented 2 years ago

Extending CoreNEURON to implement extracellular is a fairly extensive undertaking (the tree matrix requires a general sparse solver). It is not needed for calculation of LFP and EEG as that can be done with https://nrn.readthedocs.io/en/latest/python/simctrl/cvode.html#CVode.use_fast_imem which is presently understood by CoreNEURON. As to transforming imembrane into an LFP or EEG calculation, that can be done by a mod file, but we would have to deal seriously with the GPU and Intel reduction issues that are mentioned in https://github.com/BlueBrain/CoreNeuron/pull/772#issuecomment-1032496400

I believe it would be better to implement extracellular (along with cvode and LinearMechanism) after integrating CoreNEURON back into NEURON where all calculation will be carried out with Structure of Array memory layout and pointer management will become automatic.

pramodk commented 2 years ago

thank you Michael for quick feedback!

It is not needed for calculation of LFP and EEG as that can be done with https://nrn.readthedocs.io/en/latest/python/simctrl/cvode.html#CVode.use_fast_imem which is presently understood by CoreNEURON.

Just to clarify - we have already using necessary features for LFP computations. I was just mentioning features that he is using in his simulations.

Extending CoreNEURON to implement extracellular is a fairly extensive undertaking (the tree matrix requires a general sparse solver).

Ok. In that case we will have internal discussion to see what are alternatives considering the use case from Joseph. @jjt20 : it would be great if we could sync internally on Slack. Tagging @WeinaJi and @jamesgking here.