I have been trying to implement a delayed rectifying potassium GHK current mechanism with following equations (Neiman et al. 2011):
(image address: https://ibb.co/1R6xSSn )
I get the following error after checking it with modlunit:
The previous expression needs the conversion factor (6.02214e+26)
at line 45 in file drk.mod
ik = p_drk * (v * Faraday^2 / (R * T)) * ((ki - ko * exp(-Faraday * v / (R * T)<<ERROR>>))/(1 - exp(-Faraday * v / (R * T)))) * m^2
I don't quite understand where the conversion factor comes from (does it have to do with the way I have defined Faraday constant in my code?), and I have tried putting it in various places in the equation to solve the issue, but it hasn't worked. I'd appreciate any help.
Here's the code I have written for the mechanism:
Code: Select all
TITLE Delayed Rectifier Current
UNITS {
(M) = (mole)
(molar) = (1/liter)
(mM) = (millimolar)
(S) = (siemens)
(mA) = (milliamp)
(mV) = (millivolt)
(L) = (liter)
(kel) = (kelvin)
}
NEURON {
SUFFIX DRK
USEION k READ ki, ko WRITE ik
RANGE ki, ko, ik
}
PARAMETER {
p_drk = 2.4e-14 (L/s)
ki = 112 (mM)
ko = 2 (mM)
Faraday = 96520 (coulombs/M) :(faraday) (kilocoulombs)
R = 8.313424 (joule/degC)
T = 295.15 (kel)
z = 2
}
ASSIGNED {
v (mV)
ik (mA/cm2)
m_inf
alpha_drk (1/s)
beta_drk (1/s)
}
STATE {
m
}
BREAKPOINT {
SOLVE states METHOD cnexp
ik = p_drk * (v * Faraday^2 / (R * T)) * ((ki - ko * exp(-Faraday * v / (R * T)))/(1 - exp(-Faraday * v / (R * T)))) * m^2
}
INITIAL {
settables(v)
m = m_inf
}
DERIVATIVE states {
settables(v)
m' = (m_inf - m) * (alpha_drk + beta_drk)
}
UNITSOFF
PROCEDURE settables(v) {
m_inf = 1.0/((1 + exp((v + 48.3)/4.19))^(1/2))
alpha_drk = 1.0/(3.2 * exp(-v/20.9) + 3)
beta_drk = 1.0/(1467 * exp(v/5.96) + 9)
}
UNITSON