AnotherNewUser wrote:I'm trying to plot the individual contributions of an hh channel model and an m-current channel to the total k current vs time.
For the 19th PY cell, using the Plot what? tool, the total k current might be "PY[14].soma[0].ik(0.5)."
True.
Assuming that the suffix for the NMODL M-current channel is "im" and that the m-current model "WRITES" ik, I would have thought that the m-current would be something like "PY[14].soma[0].i_im(0.5)"
A reasonable assumption, but whether it is correct depends entirely on the code that
defines the im mechanism. For example, consider the hh mechanism, which WRITEs
ina and ik. Make a single compartment model and insert hh. Now use Plot what? to
see what ionic currents are known to hoc. You'll see ina and ik, but no ina_hh or ik_hh.
To drive the point home, doing everything by writing hoc,
Code: Select all
oc>create soma
oc>access soma
oc>insert hh
oc>psection()
soma { nseg=1 L=100 Ra=35.4
/*location 0 attached to cell 0*/
/* First segment only */
insert morphology { diam=500}
insert capacitance { cm=1}
insert hh { gnabar_hh=0.12 gkbar_hh=0.036 gl_hh=0.0003 el_hh=-54.3}
insert na_ion { ena=50}
insert k_ion { ek=-77}
}
1
oc>soma.ina(0.5)
0
oc>soma.ina_hh(0.5)
/usr/local/nrn/i686/bin/nrniv: ina_hh not a section variable
near line 6
soma.ina_hh(0.5)
^
So hh contributes to ina, but if there is more than one mechanism that WRITEs ina,
you can't tease out hh's contribution to the total; likewise for ik.
The solution is to revise the mod file. To make hh's ina and ik accessible, I copied
hh.mod to hhx.mod, then edited the latter to make the following changes:
1. in the NEURON block, change SUFFIX hh to SUFFIX hhx (so this wouldn't
conflict with the built-in hh)
2. also in the NEURON block, insert the statement RANGE ina, ik
Now
Code: Select all
oc>create soma
oc>access soma
oc>insert hhx
oc>psection()
soma { nseg=1 L=100 Ra=35.4
/*location 0 attached to cell 0*/
/* First segment only */
insert morphology { diam=500}
insert capacitance { cm=1}
insert hhx { gnabar_hhx=0.12 gkbar_hhx=0.036 gl_hhx=0.0003 el_hhx=-54.3} insert na_ion { ena=50}
insert k_ion { ek=-77}
}
1
oc>soma.ina(0.5)
0
oc>soma.ina_hhx(0.5)
0
A similar fix will work for your mechanism. You're not dealing with a built-in mechanism,
so you don't need to change the SUFFIX. However, you will need to do the following:
1. in the NEURON block, insert RANGE i
2. in the ASSIGNED block, insert
i (mA/cm2)
3. in the BREAKPOINT block, you will find a statement of the form
Change this to
Code: Select all
: ik = some_algebraic_expression
i = some_algebraic_expression
ik = i
Run mknrndll (or nrnivmodl) and you will now be able to access the current generated
by your mechanism--it won't be lost into the great pool of all k currents.