I'm trying to model an NMDA synapse. The mod file works well with the expected results but when I checked for the units I got the following message :

units : 0.001 sec

units: 1

The units of the previous two expressions are not conformable at line 40 in file ./synnmda.mod

g= gmax * alpha(t <<ERROR>>) * mgblock (v)

It doesn't seem to corrupt the data but I would prefer to correct it

Regards

Here is the mod file :

Code: Select all

```
COMMENT
an synaptic NMDA current modeled with a sum of two exponentials and a correction factor to take
into account the magnesium block that depends on Mg and v.
ENDCOMMENT
NEURON {
POINT_PROCESS NMDASyn
RANGE onset, tau1, tau2, gmax, e, i :onset allows a delay in synaptic transmission
NONSPECIFIC_CURRENT i
THREADSAFE
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(uS) = (microsiemens)
(mM) = (milli/liter)
}
PARAMETER {
onset=0 (ms) : delay for synaptic event
tau1= 5 (ms) <1e-3,1e6>
tau2=100 (ms)
gmax=0.02 (uS) <0,1e9>
e=0 (mV) : reversal potential
Mg=2 (mM) : extracellular magnesium
Mg50= 4 (mM) : IC50 for magnesium at 0 mV (from kuner et schoepfner (1996)
z=2 : valence
delta=0.6 () : delta factor for magnesium block from kuner et schoepfner (1996)
temperature= 32 ()
R=8.31 () : Gas constant
F=96500 () : Farraday constant
corr=1 (mV) : to correct for units in mgblock function
}
ASSIGNED { v (mV) i (nA) g (uS)}
BREAKPOINT {
if (gmax) { at_time(onset) }
g = gmax * alpha(t)* mgblock (v)
i = g*(v - e)
}
FUNCTION alpha(t) {
alpha = (exp(-(t-onset)/tau2)) - (exp(-(t-onset)/tau1))
if (alpha < 0 ) {
alpha = 0
}else{
alpha = (exp(-(t-onset)/tau2)) - (exp(-(t-onset)/tau1))
}
}
: function modified from kuner et schoepfner (1996)
FUNCTION mgblock (v) {
mgblock = 1/(1+(Mg/Mg50)*exp((0.001)*(-z*delta*F*v/corr)/(R*(273.15+ temperature)))) : mgblock varies from 0 to 1
}
```