addng a parameter to mod file

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
Posts: 9
Joined: Wed Oct 31, 2018 2:03 pm

addng a parameter to mod file

Post by OronKotler »

I am trying to add a parameter that I can change that will affect the kitchens of the channel.

PROCEDURE rates(v(mV)) { :Computes rate and other constants at current v.
:Call once from HOC to initialize inf at resting v.
LOCAL alpha, beta, sum
TABLE minf, mtau, hinf, htau, ninf, ntau DEPEND celsius FROM -100 TO 100 WITH 200

q10 = 3^((celsius - 23)/10)
:"m" sodium activation system
alpha = -.182 * vtrap(-(v+46),6)
beta = -.124 * vtrap((v+46),6)
sum = alpha + beta
mtau = 0.25/(q10*sum)
minf = alpha/sum
:"h" sodium inactivation system
alpha = -0.015 * vtrap((v+69),6)
beta = -0.015 * vtrap(-(v+69),6)
sum = alpha + beta
htau = 1.1/(q10*sum)
hinf = alpha/sum
:"n" potassium activation system
alpha = .01*vtrap(-(v+55),10)
beta = .125*exp(-(v+65)/80)
sum = alpha + beta
ntau = 1/(q10*sum)
ninf = alpha/sum

I want to add a parameter to the mtau, so it will be mtau*p. and I can assign P a value.
how do I do this? is it possible?

thank you
Site Admin
Posts: 5954
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: addng a parameter to mod file

Post by ted »

the kitchens of the channel
You mean the kinetics. Etymologies:
I want to add a parameter to the mtau, so it will be mtau*p
It looks like you are dealing with a density mechanism (its NMODL block will contain a statement of the form
where foo is the name of the mechanism). If you insert a density mechanism foo into a section, there will be a separate instance of foo in every segment of that section. Do you want p to have the same value in all segments of all sections into which your mechanism is inserted? Or do you want to be able to assign a different value of p in different segments?
Post Reply