I have this mod mechanism to compute local oxygen concentration from bath oxygen concentration and from the activity of Nakpumps in neuron and glia. The mod file compiles without any error. However, running this script with modlunit returns a conversion error which I couldn't understand. Any help would be greatly appreciated.
Code: Select all
COMMENT
computation of local tissue oxygen concentration
ENDCOMMENT
NEURON {
SUFFIX updateo2o
RANGE o2o
POINTER ip,igp,rho
}
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(molar) = (1/liter)
(mM) = (millimolar)
(um) = (micron)
:(mg) = (milligram)
(L) = (liter)
FARADAY = (faraday) (coulombs)
}
PARAMETER {
al = 5.3e-3 (mg/mole)
o2 = 12 (mg/L) :Bath oxygen
delx2 = 10000 (um2)
D = 1.7 (um2/ms)
}
ASSIGNED {
diam (micron)
ip (mA/cm2)
igp (mA/cm2)
rho (1)
}
INITIAL {
o2o=o2
}
STATE {
o2o (mg/L)
}
BREAKPOINT {
SOLVE state METHOD cnexp
}
DERIVATIVE state {
o2o' = al*((1e4)*4*(ip)/(rho*diam*FARADAY)+ (1e4)*4*(igp)/(rho*diam*FARADAY)) + (D/delx2)*(o2-o2o)
}