Code: Select all

```
insert IhPyrKop
soma{
gh_IhPyrKop = 0.1
v50_IhPyrKop = -82
}
```

**soma.gh_IhPyrKop = 0.1**generates the error

**'nrn.Section' object has no attribute 'gh_IhPyrKop'**. The fact that Python generates this error makes sense, since gh_IhPyrKop is not defined in the mod file. What I do not understand is why hoc runs the code

*without*error. Perhaps there is something I am fundamentally not understanding about mod files.

Here is the mod file in question:

Code: Select all

```
NEURON {
SUFFIX IhPyrKop
NONSPECIFIC_CURRENT i
RANGE v50, gmax
}
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
(mS) = (millisiemens)
}
PARAMETER {
gmax = 0.0 (mS/cm2)
eh = -30.0 (mV)
v50 = 0.0 (mV)
}
ASSIGNED {
v (mV)
i (mA/cm2)
}
STATE { q }
INITIAL { q = qinf(v) }
BREAKPOINT {
SOLVE states METHOD cnexp
i = (1e-3) * gmax * q * (v-eh)
}
DERIVATIVE states { q' = (qinf(v)-q)/qtau(v) }
FUNCTION qinf(v(mV)) { qinf = fun2(v, v50, 1.0, 10.5)*1.0(ms) }
FUNCTION qtau(v(mV))(ms) { qtau = 1.0(ms)/(exp((-14.59(mV)-0.086*v)/1.0(mV)) + exp((-1.87(mV)+0.0701*v)/1.0(mV))) }
INCLUDE "aux_fun.inc"
```

Code: Select all

```
FUNCTION fun1(v(mV),V0(mV),A(/ms),B(mV))(/ms) {
fun1 = A*exp((v-V0)/B)
}
FUNCTION fun2(v(mV),V0(mV),A(/ms),B(mV))(/ms) {
fun2 = A/(exp((v-V0)/B)+1)
}
FUNCTION fun3(v(mV),V0(mV),A(/ms),B(mV))(/ms) {
if(fabs((v-V0)/B)<1e-6) {
:if(v==V0) {
fun3 = A*B/1(mV) * (1- 0.5 * (v-V0)/B)
} else {
fun3 = A/1(mV)*(v-V0)/(exp((v-V0)/B)-1)
}
}
FUNCTION min(x,y) { if (x<=y){ min = x }else{ min = y } }
FUNCTION max(x,y) { if (x>=y){ max = x }else{ max = y } }
```