I have created as below:
: Calcium-activated K channel
: based on "calcium-activated, voltage gated current" from "The Neuron Book" by N.T. Carnevale
Code: Select all
NEURON {
SUFFIX caK
USEION k READ ik WRITE ik
USEION ca READ cai, eca WRITE cai VALENCE 2 :due to cai being writen eca (calcium Equilibrium potential) is atamatically calculated.
RANGE gbar
}
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
(molar) = (1/liter)
(mM) = (millimolar)
(uM) = (micromolar)
FARADAY = (faraday) (kilocoulombs)
R = (k-mole) (joule/degC)
}
PARAMETER {
CaConst = 1.727378108173 :units? constant caculated from "1/(z*F*Vol)" (z=2, F=faraday constant, Vol = 3*(10-6))
kca = 360 (S/s) :rate constant unit is S-1
bca = 0.05 (uM) :backround calcium is 0.05 microMolar
initCa = 100 (uM) :initial internal calcium levels ***(estimate for testing)***
gbar = 3.2 (S/cm2) :Maximum conductance
fconst = 0.6 (mV/uM)
vao1 = 0 (mV)
vao2 = -16 (mV)
sao1 = -23 (mV)
sao2 = -5 (mV)
c1 = 2.5 (uM)
c2 = 0.7 (uM)
c3 = 0.6 (uM)
}
ASSIGNED {
eca (mV) :Reversal Potential
cai (mM) :intercellular calcium concentration
v (mV) :voltage
ik (mA/cm2) :potasium current
g (S/cm2) :macroscopic conductance
i (mA/cm2) :current passing through g
}
STATE { a b cac (mM) } :a is the activation, b is the inactivation, cac is calcium concentration
BREAKPOINT {
SOLVE state METHOD cnexp
g = gbar * a * b
i = g * (v - eca) :current calculation uses the automatically calculated eca
ik = i
cai = cac :assign WRITE cai with calculated cac
}
DERIVATIVE state {
UNITSOFF
a' = (aSte(v, cai) - a) * 600
b' = (bSte(cai) - b) * 35
cac' = (CaConst * ik - kca * cai + kca * bca)*1000 :original formula calculates in uM added *1000 converts to mM
UNITSON
}
INITIAL {
UNITSOFF
a = aSte(v, cai) * 600
b = bSte(cai) * 35
cac = (CaConst * ik - kca * initCa + kca * bca)*1000 :original formula calculates in uM added *1000 converts to mM
UNITSON
}
:*****steady state of a********
FUNCTION aSte(vm (mV), caCon (mM) ) (/ms) {
UNITSOFF
aSte = 1/(1 + exp((vm + vao1 + fconst * caCon)/sao1))*1/(1 + exp((vm - vao2 + fconst * caCon)/sao2))*(caCon/(c1 + caCon))
UNITSON
}
:*****steady state of b********
FUNCTION bSte(caCon (mM) ) (/ms) {
UNITSOFF
bSte = c2/(c3+caCon)
UNITSON
}
but when I come to create the .mod file using nrnmkdll i get the folllowing message:
Code: Select all
gcc -mno-cygwin -I/cygdrive/c/Neuron/nrn59/src/scopmath -I/cygdrive/c/Neuron/nrn59/src/nrnoc -I/cygdrive/c/Neuron/nrn59/src/oc -I/cygdrive/c/Neuron/nrn59/lib -I/cygdrive/c/Neuron/nrn59/mingw -c mod_func.c
nocmodl calciumActivated
Translating calciumActivated.mod into calciumActivated.c
cai is WRITE but is not a STATE and has no assignment statement at line 92 in file calciumActivated.mod
^
make: *** [calciumActivated.o] Error 1
There was an error in the process of creating nrnmech.dll
Press Return key to exit
I am hoping someone will be able to explain what this means.
yours
David Fourie