I have the following puzzle.
I have defined the following point mechanism to get an ion current (note that it is not a distributed mechanism as usual but rather a point process).
Code: Select all
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
(S) = (siemens)
}
NEURON {
POINT_PROCESS sodium_brette
USEION na READ ena WRITE ina
RANGE gnabar, gna, ena, v_resting, trigger
GLOBAL minf, mtau, v1_2
}
PARAMETER {
gnabar = 0 (S) <0,1e9> : no density as this is a point process
trigger = 0
v1_2 = -40 (mV)
mtau = 0.1 (ms) : fixed to 100 microsec in Brette 2013
v_resting = -75 (mV)
}
STATE {
m
}
ASSIGNED {
v (mV)
ena (mV)
gna (S)
ina (nA)
minf
}
LOCAL mexp, nexp
BREAKPOINT {
SOLVE states METHOD cnexp
gna = gnabar*m
ina = gna*(v - ena)
}
INITIAL {
rates(v)
m = minf
}
DERIVATIVE states {
rates(v)
m' = (minf-m)/mtau
}
PROCEDURE rates(v(mV)) { :Computes rate and other constants at current v.
:Call once from HOC to initialize inf at resting v.
TABLE minf FROM -100 TO 100 WITH 200
UNITSOFF
minf = 1 / (1 + exp((v1_2 - v)/6))
}
FUNCTION vtrap(x,y) { :Traps for 0 in denominator of rate eqns.
if (fabs(x/y) < 1e-6) {
vtrap = -y*(1 - x/y/2)
}else{
vtrap = x/(1 - exp(x/y))
}
}
NET_RECEIVE (w) {
trigger = 1
m = 1 / (1 + exp((v1_2 - v_resting)/6))
}
UNITSON
Code: Select all
na_ion mechanism not inserted in section axon
/home/david/Programme/Neuron/nrn/x86_64/bin/nrniv:
near line 20
ena
Code: Select all
sodiumchan.ena
ena not a public member of sodium_brette
/home/david/Programme/Neuron/nrn/x86_64/bin/nrniv: sodium_brette ena
near line 21
sodiumchan.ena
Code: Select all
USEION na READ ena WRITE ina
Thank you very much for your help!
Best regards,
David