Getting an error while setting the initial calcium concentration

NMODL and the Channel Builder.
Post Reply
ipv1313
Posts: 5
Joined: Wed Nov 09, 2022 3:51 am
Location: Indian Institute of Technology Delhi

Getting an error while setting the initial calcium concentration

Post by ipv1313 »

I am trying to set the initial calcium concentration to some value in an L-type calcium ion channel. As mentioned in the book, I define cai and cao as a state variables. Still, I am getting an error while running the mknrndll file that there are no differential equations specified for those, so I can't define those as state variables. What can be done here?
NEURON {
SUFFIX CaL
USEION ca READ eca WRITE cai, cao, ica
RANGE minf, mtau, ica, h, cai0, cao0
RANGE gcalbar, cai, cao
}

UNITS {
(molar) = (1/liter)
(mA) = (milliamp)
(mV) = (millivolt)
(mM) = (millimolar)
(S) = (siemens)
(uS) = (microsiemens)
}

PARAMETER {
cai0 = 0.00018411 (mM)
cao0 = 2.4 (mM)
gcalbar = 0.1e-03 (S/cm2)
}

ASSIGNED {
ica (mA/cm2)
v (mV)
mtau (ms)
minf
celsius (degC)
eca (mV)
h
}

STATE{
cai (mM)
cao (mM)
m
}

INITIAL {
m = 0.864897
cai = cai0
cao = cao0
}

BREAKPOINT {
SOLVE states METHOD derivimplicit
h = 0.00045/(0.00045 + cai)
ica = gcalbar* m*h* (v-eca)
}

DERIVATIVE states{
rates()
m'= (minf- m)/ mtau
}

PROCEDURE rates() {
mtau= 1.5 + 18exp(-((v+45)/20)^2)
minf= 1/ (1+ exp(-(v+50)/3))
}
The error is :
c:\nrn/mingw/usr/bin/sh c:\nrn/lib/mknrndll.sh /cygdrive/c\nrn
x86_64-w64-mingw32-gcc.exe -DDLL_EXPORT -DPIC -I/cygdrive/c\nrn/include -I/cygdrive/c\nrn/src/scopmath -I/cygdrive/c\nrn/src/nrnoc -I/cygdrive/c\nrn/src/oc -c mod_func.c
x86_64-w64-mingw32-gcc.exe -DDLL_EXPORT -DPIC -I/cygdrive/c\nrn/include -I/cygdrive/c\nrn/src/scopmath -I/cygdrive/c\nrn/src/nrnoc -I/cygdrive/c\nrn/src/oc -c CaL.c
nocmodl CaN
Translating CaN.mod into CaN.c
cainot really a STATE; Ie. No differential equation for it.
at line 67 in file CaN.mod
^
make: *** [/cygdrive/c\nrn/lib/mknrndll.mak:23: CaN.c] Error 1

There was an error in the process of creating nrnmech.dll
Press Return key to exit
Post Reply