KCa Channel with TABLE definition in PYTHON
Posted: Fri Aug 26, 2011 11:28 am
Hello everybody!
I am currently trying to convert a hoc NEURON model into pyNEURON. However I could not get it to produce the same output as in hoc NEURON from scratch.
The one thing preventing identical results was the mod implementation of a Calcium dependent potassium current. I could only get it to work by commenting out the use of a TABLE in the rate procedure as shown below:
Another weird thing is: I was executing both, the hoc (via load_file()) and the py implementations in the same py script after each other while not resetting NEURON between the runs: By running the hoc before the py implementation both models produce the same output with the use of TABLE. But when I run py before hoc I have to get rid of TABLE to see identical output.
So what is going on here? Seems like some kind of initialisation I am missing in my python implementation. Or is not a good idea to use TABLE with rate functions dependent on voltage and calcium concentration anyway?
Thanks!
Christian
I am currently trying to convert a hoc NEURON model into pyNEURON. However I could not get it to produce the same output as in hoc NEURON from scratch.
The one thing preventing identical results was the mod implementation of a Calcium dependent potassium current. I could only get it to work by commenting out the use of a TABLE in the rate procedure as shown below:
Code: Select all
FUNCTION alp_c(v(mV))(/ms) { LOCAL Q10
Q10 = Q10_channel^((celsius-30(degC))/10(degC))
alp_c = Q10*Aalpha_c/(1+(Balpha_c*exp(v/Kalpha_c)/cai))
}
FUNCTION bet_c(v(mV))(/ms) { LOCAL Q10
Q10 = Q10_channel^((celsius-30(degC))/10(degC))
bet_c = Q10*Abeta_c/(1+cai/(Bbeta_c*exp(v/Kbeta_c)))
}
PROCEDURE rate(v (mV)) {LOCAL a_c, b_c
:TABLE c_inf, tau_c
:DEPEND Aalpha_c, Balpha_c, Kalpha_c,
: Abeta_c, Bbeta_c, Kbeta_c, celsius FROM -100 TO 30 WITH 13000
a_c = alp_c(v)
b_c = bet_c(v)
tau_c = 1/(a_c + b_c)
c_inf = a_c/(a_c + b_c)
}
So what is going on here? Seems like some kind of initialisation I am missing in my python implementation. Or is not a good idea to use TABLE with rate functions dependent on voltage and calcium concentration anyway?
Thanks!
Christian