Page 1 of 1

Changing reversal potentials in NetPyNE

Posted: Thu Jul 11, 2019 1:16 pm
by lblood
When using NetPyNE, how do you change the reversal potential of k, na, and ca ions?

For example, we are trying to change ek in NetPyNE tutorial 2 (http://netpyne.org/tutorial.html#networ ... tutorial-2).

We’ve tried the following:

Code: Select all

cellRule['secs']['soma']['mechs']['hh'] = {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70, 'ek': -95}
This gives the error 'nrn.Mechanism' object has no attribute 'ek'

We also tried

Code: Select all

cellRule['secs']['soma']['mechs']['k_ion']={'ek': -95}
And this gave the same error.

We have also attempted:

Code: Select all

cellRule['secs']['soma']['mechs']['ion']['k']={'ek': -95}
and this produced an error.

Code: Select all

cellRule['secs']['soma']={'ek': -95}
creates a new dictionary, but h.psection() reveals it does not actually change ek.

Thanks in advance for the help.

Re: Changing reversal potentials in NetPyNE

Posted: Tue Jul 23, 2019 6:13 pm
by salvadord
Sorry for the delay responding. To change the reversal potential of ions, you can use eg.

Code: Select all

cellRule['secs']['soma']['ions']['na'] = {'e': 60}
similarly for the internal and external concentrations of the ion you can use:

Code: Select all

cellRule['secs']['soma']['ions']['na'] = {'i': 15, 'o': 150 }
Apologies, this is one of the things that we still need to update in the documentation. Please let us know if you have any other questions.

Re: Changing reversal potentials in NetPyNE

Posted: Wed Jul 24, 2019 1:30 pm
by lblood
That worked. Thank you for your response.