Discrepancy between Netpyne and NEURON gui results

99 views
Skip to first unread message

Maliha A

unread,
Apr 7, 2022, 6:13:11 PM4/7/22
to NetPyNE Q&A forum
I’ve been trying to simulate single cells in NetPyne with the eventual goal of building a thalamocortical network. For quite some time now I’ve been struggling with getting the correct simulations using NetPyne.

As a baseline, I’ve been using the model given here (http://cns.iaf.cnrs-gif.fr/abstracts/isolRE.html) to simulate a reduced model (with only the passive, HH, and IT2 currents) for a single cell directly in NEURON using the gui. To do this, I made the following changes:
- change the number of neighbouring connections in the Fig5A.hoc file to 0
- change the input current to a step current in the Fig5A.hoc file to an amplitude of -0.002 nA
- remove iahp, ican, and cad from RE.tem 

I was able to get the following result: (see Destexhe94_singlecell_NEURONgui)

However, using the exact same mod files and same parameters in NetPyne (code & mod files used attached below), I am getting the following result: (see Destexhe94_singlecell_NETPYNE)

I noticed the only difference between the RE cell template in NEURON and the RE cell definition in NetPyne is the way the Intracellular calcium concentration is defined at the end of the RE.tem file in the original Destexhe model. I am unable to change that in NetPyne/it gives an error when I try to set it (i.e. if I set 'Cai':2.4e-4 when I insert the IT2 current). Perhaps that is where the problem lies? I have run out of ideas as to what the issue could be. 

Thank you in advance!

Destexhe94_singlecell_NETPYNE.png
NetPyne_Destexhe94sims.zip
Destexhe94_singlecell_NEURONgui.png

Eugenio Urdapilleta

unread,
Apr 8, 2022, 4:06:07 PM4/8/22
to NetPyNE Q&A forum
Hi Maliha,
 would you mind sending me your Fig5A.hoc and your RE.tem. In NEURON, according to the description of your changes, I'm getting something similar to the graph from NetPyNE. Thanks! Best

Eugenio

Maliha A

unread,
Apr 8, 2022, 7:00:17 PM4/8/22
to NetPyNE Q&A forum
I've attached it below, thank you!
RE.tem
Fig5A.hoc

Eugenio Urdapilleta

unread,
Apr 11, 2022, 3:46:47 PM4/11/22
to NetPyNE Q&A forum
Hi Maliha, I was analyzing your NEURON code and before proceeding to NetPyNE I would like to check exactly what are you trying to do with this simple network. I have the following comments:

1) Even when you put "neigh = 0", because of the logic of the code in Fig5A.hoc, you will get two connections per neuron: one synapse to the other cell and an autapse. The authors probably did not think about the case "neigh = 0" and they considered either "neigh = 1" with no autapses (that is the reason for the "if i == j" clause) and "neigh = 2" with both connections. The thing is that this very same scenario is got with "neigh = 0" because of the logic of the code, and you actually get both connections. If you don't want connections, you can simply comment all lines of code related to the connections in "Fig5A.hoc". When doing so, the behavior of each cell is similar to what you obtained in NetPyNE.
2) Said this, the difference with NetPyNE will be mostly due to these missing connections (there may be other minor things that I will check once we converge on the network you want to model).
3) The connections the authors considered, based on GABA, were modeled with a pointer to the presynaptic cell. These are not based on delivering detected events at the presynaptic side to the postsynaptic cells, which is the spirit of NetCons. Actually, I think all that these authors did in this synaptic mechanism is very similar to the posterior development of NetCons.
4) If you want to implement these synapses on NetPyNE, it is possible but not straightforward. In NetPyNE, the large majority of connections are intended to be connected with NetCons. But also, there is room in the code for gap junctions. And that piece of code can be used to adapt these mechanisms / synapses that need a pointer to the presynaptic cell. In the case you need so, I can help you do that.
Let me know how do you want to continue. My suggestion is to firstly set up the network (connections or not ?, include self-connections?). In the case you need connections (at the end, at some point, you will need them), maybe you want to consider to change to NetCons, as the nonlinear mechanism these authors used to model the synapses are very similar.
I remain at your disposal. Best,

Eugenio

Eugenio Urdapilleta

unread,
Apr 12, 2022, 9:08:04 AM4/12/22
to NetPyNE Q&A forum
Hi Maliha,
 sorry! I ran again everything in NEURON and actually, the firing behavior you obtained is got even without connections, even with a single cell (the connections were set but their amplitudes were never updated). So, all about the NetCons, etc, should be for a posterior discussion (when you want to put connections). So, I went to NetPyNE directly to see what happened.
 The problem is that the temperature has to be set. You should put

"simConfig.hParams = {'celsius': 36, 'v_init': -70.0, 'clamp_resist': 0.001}"

after the simConfig object was defined. By default, in NetPyNE, the temperature is 6.3 celsius. Here is a graph with the NetPyNE result. Sorry for the mistake! All the best,

Eugenio

ThalRE_traces.png
 

Maliha A

unread,
May 10, 2022, 3:09:07 PM5/10/22
to NetPyNE Q&A forum
Hi Eugenio, 
Thank you so much for looking into this further! I really appreciate your help in this regard. I will likely have more questions for you once I'm at the stage of setting up a full network :) 

Upon looking into 'clamp_resist' in both NetPyne and NEURON documentation, it seems like that parameter does not need to be included anymore as it has become obsolete. I also notice the initialization of voltage occurs at the first instance it is set, which in my case was when I defined the soma section. Am I correct in my understanding for both?

Regards
Maliha

Eugenio Urdapilleta

unread,
May 11, 2022, 4:59:11 PM5/11/22
to NetPyNE Q&A forum
Hi Maliha,
* clamp_resist seems to be deprecated by NEURON. Can be set, but do nothing.
* Regarding the initial voltage, if you define it in the section of a cell rule (vinit), it has precedence over the simConfig.hParams['v_init']. It is not because of the order of appearance in the definitions, but because of how NetPyNE/NEURON sets the initial voltage. If it is defined in the cell rule, it modifies the default (set by the hParams).
 Let me know about anything else. Regads,

Eugenio

Message has been deleted
Message has been deleted

Maliha A

unread,
Jun 9, 2022, 3:53:22 PM6/9/22
to NetPyNE Q&A forum
Hi Eugenio!
I'm at the stage of simulating a (small) 8-cell network. In particular, I would like to reproduce in NetPyne, the behaviour I'm observing in NEURON. 
I am testing for two cases: one with cortical GABAa (gabaapercent = 100) and one without cortical GABAa (gabaapercent = 0).

Note:
- In the Knox NEURON model file (Fspikewave.oc), I've removed GABAb by setting the synapse strengths RETCb = INPYb = gababpercent = 0

I am using the exact same mod files in both programs for ion channels and synapses. However, I'm unable to get the same results in NetPyne as observed in NEURON. I initially thought it has something to do with saturation of synaptic activity with multiple incoming spikes, but both mechanisms in both the programs are identical, so at this point I'm really clueless as to why the results (particularly for no cortical GABA)  are so different. 

Any insight would be greatly appreciated!

Thank you
Maliha

p.s. I've attached a schematic of the model, as well as the simulation results from both (for each of the two cases).

p.p.s I can't seem to attach a zip file. I will email the NEURON and NetPyne model files to you, if you don't mind. 

8cell schematic.png
result Destexhe synapse model in NEURON vs NetPyne.pdf
Message has been deleted

Maliha A

unread,
Jun 9, 2022, 3:55:58 PM6/9/22
to NetPyNE Q&A forum
NEURON and Netpyne model files

Eugenio Urdapilleta

unread,
Jun 30, 2022, 5:12:08 PM6/30/22
to NetPyNE Q&A forum
Dear Maliha,
 the reason for the difference is the setting of some values in the nonlinear mechanisms. When using "USEION ... READ ... WRITE ...", the elements that will be read from here won't be able to be assigned in the parameters block; they have to be provided externally. In NetPyNE this can be done with the NEURON objects created when the network is instantiated. I send you a more detailed answer via email. Thanks for the interest and sorry for the delay. Best,

Eugenio

Reply all
Reply to author
Forward
0 new messages