Initializing potassium concentration in hoc

Anything that doesn't fit elsewhere.
Post Reply
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Initializing potassium concentration in hoc

Post by Keivan »

I'm trying to initializing potassium concentration in the hoc according to the "NEURON Book". for example, I want to change ek of the model to -90 mV at 35 dec C.

Code: Select all

oc>nernst(140,4.72,1)
        -90.003219
I created a simple model, as follows:

Code: Select all

create soma
access soma
celsius = 35
insert hh
ki0_k_ion = 140
ko0_k_ion = 4.72
finitialize(-63)
but this code cannot change the ek or ko (ek is still equal to -77). What should I do to change the ek?
Last edited by Keivan on Sun Nov 13, 2011 3:48 pm, edited 2 times in total.
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: Initializing potassium concentration in hoc

Post by Keivan »

When I changed the ion_style() to

Code: Select all

ion_style("k_ion", 2, 2, 1, 1, 1)
everything worked fine. Now my question is

1. what is the difference between assigned or state type of c_style (or e_style)? I have a model of M-type potassium current with the following USEION statement in the NEURON block.

Code: Select all

USEION k READ ek WRITE ik
what happens If I use

Code: Select all

ion_style("k_ion", 2, 2, 1, 1, 1)
or

Code: Select all

ion_style("k_ion", 3, 3, 1, 1, 1)
? When this model can change the concentration of ki or ko?

according to the neuron book
in any given section, no ionic concentration should be written by more than one mechanism.
2. If I have another type of potassium channel (ex. D-type potassium channel) with the same USEIONE statement in the NEURON block:

Code: Select all

USEION k READ ek WRITE ik
, how ki or ko would be calculated?

3. How it is possible to have both "calcium diffusion and buffering" (example 9.8) and "calcium pump" (example 9.9) mechanisms in a same section of the model? Is there any solution other than combining these two mechanisms in a single mechanism?
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Initializing potassium concentration in hoc

Post by ted »

Keivan wrote:but this code cannot change the ek or ko (ek is still equal to -77). What should I do to change the ek?
Probably because ek is not being calculated from ki and ko, which in turn means that there is no mechanism that WRITEs ki or ko. So ek is merely a parameter whose value can be assigned with a simple hoc statement like
ek = -90.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Initializing potassium concentration in hoc

Post by ted »

Keivan wrote:When I changed the ion_style() to

Code: Select all

ion_style("k_ion", 2, 2, 1, 1, 1)
everything worked fine.
Because you're telling NEURON that it has to a lot of stuff that is actually unnecessary. There is no need to calculate ek from the Nernst equation at initialization or on every fadvance() if there is no mechanism that WRITEs ki or ko. If your model did have such a mechanism, NEURON would have automatically known that it had to calculate ek from the Nernst equation.
what is the difference between assigned or state type of c_style (or e_style)?
Very good question. "Assigned" means that its value is specified by a hoc or NMODL assignment statement. Parameter means that you specify the value with a hoc or NMODL statement, plus it also appears in a parameter panel along with a numerical field and spinner. "State" means that NEURON has to compute the concentration by integrating the ionic fluxes generated by all mechanisms that WRITE the ionic current. I don't know what it means for an equilibrum potential to be a STATE variable because to me it only makes sense for an equilibrium potential to be either something that I assign (in which case it would be "assigned" or a "parameter") or something that the simulator calculates from the Nernst equation (in which case it is still an "assigned" variable).

This statement

Code: Select all

USEION k READ ek WRITE ik
doesn't tell me anything about how ek or ki or ko get their values. They could be parameters, assigned variables, or (in the case of ki or ko) states.

It's possible to get all worked up and confused about this stuff, but there's really no reason to. The best approach is KISS. Don't use ion_style unless it's absolutely necessary to do so. Don't try to use ionic concentration to set an equilibrium potential unless your model already has an acccumulation mechanism for that ion. If it doen't have an accumulation mechanism, just use plain old hoc statements to specify equilibrium potentials.
How it is possible to have both "calcium diffusion and buffering" (example 9.8) and "calcium pump" (example 9.9) mechanisms in a same section of the model?
The examples in the book don't advocate doing that. It makes no sense to insert two mechanisms that WRITE the same ionic concentrations into a single section. If a section already has one mechanism that WRITEs some ionic concentraiton, don't insert another one that WRITEs the same concentration.
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: Initializing potassium concentration in hoc

Post by Keivan »

ek is merely a parameter whose value can be assigned with a simple hoc statement like
ek = -90.
Thank you for the tip. I didn't know ek can be a parameter itself.
There is no need to calculate ek from the Nernst equation at initialization or on every fadvance() if there is no mechanism that WRITEs ki or ko. If your model did have such a mechanism, NEURON would have automatically known that it had to calculate ek from the Nernst equation.
I didn't know my potassium channel have to WRITE ki or ko itself!!!!! This is very very strange to me!!!!!!!!!!! because:
NEURON knows the section's volume and area, knows the density and open probability of channels --> then it should be possible to calculate the ki, at least (calculation of ko needs more information). Why I can't expect neuron to handle ki for me?
This statement

Code: Select all

USEION k READ ek WRITE ik
doesn't tell me anything about how ek or ki or ko get their values. They could be parameters, assigned variables, or (in the case of ki or ko) states.
It means my potassium channel do not write ko, ki and ek. As I said before I want neuron to calculate ki, ko and ek for me. is it possible?

How I can calculate ki or ko (to calculate ek), when I have different types of potassium channels (each one them potentially can change the ki or ko)?
It's possible to get all worked up and confused about this stuff, but there's really no reason to. The best approach is KISS. Don't use ion_style unless it's absolutely necessary to do so. Don't try to use ionic concentration to set an equilibrium potential unless your model already has an acccumulation mechanism for that ion. If it doen't have an accumulation mechanism, just use plain old hoc statements to specify equilibrium potentials.
Thank you for the tip. I'm trying to keep everything as simple as possible and I know making a simple model needs a great degree of knowledge and a deep vision of what happens inside a biological system but at the moment I'm trying to understand what would happen if the ion concentration change during the simulation. If you know a good article or model that can give me an insight about this ion concentration things during a long runtime, I would appreciate it if you introduce it to me.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Initializing potassium concentration in hoc

Post by ted »

Keivan wrote:I didn't know ek can be a parameter itself.
It all depends on what the modeler assumes. Many models ignore the fact that ionic currents can change concentrations. Such models lack ion accumulation mechanisms (an ion accumulation mechanism has a USEION statement that WRITEs the intra- and/or extracellular concentration of an ion). For such models, NEURON automatically treats that ion's equilibrium potential as a parameter that you can specify with a hoc statement, not a state variable that requires integration.

Other models allow concentrations to change; they have one or more accumulation mechanisms that WRITE the concentration of one or more ions. The equilibrium potentials of those ions are automatically calculated from the Nernst equation.

But some models allow concentrations to change but assume that equilibrium potentials remain constant. Most often this happens in a model that involves calcium accumulation, where cai can change but eca is fixed. NEURON would automatically treat eca as an ASSIGNED variable (assigned from the Nernst equation), but that wouldn't be what the modeler wants. This is a case in which the ion_style() function is helpful, because it can be used to specify that eca remains a parameter but cai is a state variable.
I didn't know my potassium channel have to WRITE ki or ko itself!!!!!
It doesn't. Only an ion accumulation mechanism would WRITE an ionic concentration--like the Frankenhaeuser-Hodgkin model of extracellular potassium accumulation.

This statement

Code: Select all

USEION k READ ek WRITE ik
doesn't tell me anything about how ek or ki or ko get their values. They could be parameters, assigned variables, or (in the case of ki or ko) states.
It means my potassium channel do not write ko, ki and ek. As I said before I want neuron to calculate ki, ko and ek for me. is it possible?
Then you need to implement a potassium accumulation mechanism that WRITEs ki and ko. Then NEURON will automatically calculate ek, and you won't need any ion_style() statements.
How I can calculate ki or ko (to calculate ek), when I have different types of potassium channels (each one them potentially can change the ki or ko)?
Your potassium accumulation mechanism would have a
USEION k READ ik, ki, ko WRITE ki, ko
statement. The "READ ik" part of this statement means that NEURON will tell this mechanism the total transmembrane potassium current from all sources--from every mechanism that exists in the section that has a "WRITE ik" statement. And NEURON would automatically use the Nernst equation to calculate ek from ki and ko. The Frankenhaeuser-Hodgkin mechanism would be a good place to start; with just a little change it would do exactly what you want.
Post Reply