Code: Select all
oc>nernst(140,4.72,1)
-90.003219
Code: Select all
create soma
access soma
celsius = 35
insert hh
ki0_k_ion = 140
ko0_k_ion = 4.72
finitialize(-63)
Code: Select all
oc>nernst(140,4.72,1)
-90.003219
Code: Select all
create soma
access soma
celsius = 35
insert hh
ki0_k_ion = 140
ko0_k_ion = 4.72
finitialize(-63)
Code: Select all
ion_style("k_ion", 2, 2, 1, 1, 1)
Code: Select all
USEION k READ ek WRITE ik
Code: Select all
ion_style("k_ion", 2, 2, 1, 1, 1)
Code: Select all
ion_style("k_ion", 3, 3, 1, 1, 1)
2. If I have another type of potassium channel (ex. D-type potassium channel) with the same USEIONE statement in the NEURON block:in any given section, no ionic concentration should be written by more than one mechanism.
Code: Select all
USEION k READ ek WRITE ik
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 likeKeivan wrote:but this code cannot change the ek or ko (ek is still equal to -77). What should I do to change the ek?
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.Keivan wrote:When I changed the ion_style() toeverything worked fine.Code: Select all
ion_style("k_ion", 2, 2, 1, 1, 1)
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).what is the difference between assigned or state type of c_style (or e_style)?
Code: Select all
USEION k READ ek WRITE ik
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.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?
Thank you for the tip. I didn't know ek can be a parameter itself.ek is merely a parameter whose value can be assigned with a simple hoc statement like
ek = -90.
I didn't know my potassium channel have to WRITE ki or ko itself!!!!! This is very very strange to me!!!!!!!!!!! because: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.
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?This statementdoesn'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.Code: Select all
USEION k READ ek WRITE ik
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.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.
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.Keivan wrote:I didn't know ek can be a parameter itself.
It doesn't. Only an ion accumulation mechanism would WRITE an ionic concentration--like the Frankenhaeuser-Hodgkin model of extracellular potassium accumulation.I didn't know my potassium channel have to WRITE ki or ko itself!!!!!
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.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?This statementdoesn'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.Code: Select all
USEION k READ ek WRITE ik
Your potassium accumulation mechanism would have aHow 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)?