I'm new to NEURON and trying to build a one segment model with different ion channels.

I'm wondering how to simultaneously change parameters used in mod files in hoc and view plots. As an example, I'd like to change parameters such as vhkv1ninf, kkv1ninf, etc. as in the mod file below. As for now, I can access these parameters but changing the values from hoc do not have any impact on the channel kinetics. Thank you very much!

Code: Select all

```
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
}
NEURON {
SUFFIX kv1
USEION k READ ek WRITE ik
RANGE gkv1bar, gkv1, ik
GLOBAL vhkv1ninf, kkv1ninf, akv1ntaul, bkv1ntaul, ckv1ntaul, dkv1ntaul, akv1ntaur, bkv1ntaur, ckv1ntaur,dkv1ntaur
GLOBAL akv1hinf, bkv1hinf, vhkv1hinf, kkv1hinf, akv1htaul, bkv1htaul, ckv1htaul, dkv1htaul, akv1htaur, bkv1htaur, ckv1htaur, dkv1htaur
}
PARAMETER{
gkv1bar = 0.0015 (S/cm2):to adjust according to Pin's DRG recording
ek = -99 (mV): From Pin paper check Figure4 legend
vhkv1ninf = -61
kkv1ninf = 14.3
akv1ntaul = 0
bkv1ntaul = 4.59
ckv1ntaul = -56
dkv1ntaul = 15.4
akv1ntaur = 0.21
bkv1ntaur = 5.6
ckv1ntaur = -96
dkv1ntaur = 19.6
akv1hinf = 0.5
bkv1hinf = 0.5
vhkv1hinf = -58.5
kkv1hinf = 7.5
akv1htaul = 7.4
bkv1htaul = 117
ckv1htaul = -65
dkv1htaul = 10.7
akv1htaur = 2.5
bkv1htaur = 109.5
ckv1htaur = -36.8
dkv1htaur = 6.3
}
ASSIGNED{
v (mV)
ik (mA/cm2)
gkv1 (S/cm2)
ninfkv1
hinfkv1
ntaukv1 (ms)
htaukv1 (ms)
}
STATE{
nkv1 hkv1
}
BREAKPOINT{
SOLVE states METHOD cnexp
gkv1 = gkv1bar * nkv1^4 * hkv1
ik = gkv1 * (v - ek)
}
UNITSOFF
INITIAL{
settables(v)
nkv1 = ninfkv1
hkv1 = hinfkv1
}
DERIVATIVE states{
settables(v)
nkv1' = (ninfkv1-nkv1)/ntaukv1
hkv1' = (hinfkv1-hkv1)/htaukv1
}
UNITSOFF
PROCEDURE settables(v (mV)){
TABLE ninfkv1, ntaukv1, hinfkv1, htaukv1
FROM -100 TO 100 WITH 200
ninfkv1 = 1/(1+exp(-(v-vhkv1ninf)/kkv1ninf))
: ninf = 1/(1+exp(-(v+61)/14.3))
if (v < -60){
ntaukv1 = akv1ntaul+bkv1ntaul*(1/(1+exp(-(v-ckv1ntaul)/dkv1ntaul)))
: ntau = 4.59*(1/(1+exp(-(v+56)/15.4)))
}else{
ntaukv1 = akv1ntaur+bkv1ntaur*(1/(1+exp((v-ckv1ntaur)/dkv1ntaur)))
: ntau = 0.21+5.6*(1/(1+exp((v+96)/19.6)))
}
hinfkv1 = akv1hinf+bkv1hinf/(1+exp((v-vhkv1hinf)/kkv1hinf))
: hinf = 0.5+0.5/(1+exp((v+58.5)/7.5))
if (v < -50){
htaukv1 = akv1htaul+bkv1htaul*(1/(1+exp(-(v-ckv1htaul)/dkv1htaul)))
: htau = 7.4+117*(1/(1+exp(-(v+65)/10.7)))
}else{
htaukv1 = akv1htaur+bkv1htaur*(1/(1+exp((v-ckv1htaur)/dkv1htaur)))
: htau = 2.5+109.5*(1/(1+exp((v+36.8)/6.3)))
}
}
UNITSON
/[code]
```