### modified HH model with sinusoidal voltage stimulation

Posted:

**Fri Dec 28, 2018 1:30 am**Dear all,

I have a simple question.

I try to implement a modified HH model using a single compartment, as follows:

cm*dV/dt = I_na + I_k + I_l+ I_app

where I_app = cm*dVs/dt and Vs is applied voltage.

I want to make NMODL for I_app, by modifying IClamp, as follows:
Then, I made the following script for sinusoidal stimulation:
I wonder how to represent derivative term "dVs/dt" in Iapp NMODL file, and I made appropriate sinusoidal voltage stimulation?

With regards,

Hyeon

I have a simple question.

I try to implement a modified HH model using a single compartment, as follows:

cm*dV/dt = I_na + I_k + I_l+ I_app

where I_app = cm*dVs/dt and Vs is applied voltage.

I want to make NMODL for I_app, by modifying IClamp, as follows:

Code: Select all

```
COMMENT
applied current
ENDCOMMENT
NEURON {
SUFFIX Iapp
POINT_PROCESS i
RANGE del,dur,Vs, i
}
UNITS {
(mA) = (milliamp)
}
PARAMETER {
del (ms)
dur (ms)
Vs (mV)
}
ASSIGNED {
i (mA/cm2)
}
INITIAL {
i = 0 (mA/cm2)
}
BREAKPOINT {
at_time(del)
at_time(del+dur)
if (t < del + dur && t > del) {
i = dVs/dt
} else {
i = 0
}
}
```

Code: Select all

```
load_file("nrngui.hoc")
tstop = 1000 //ms
dt = 0.05 //ms
begintemplate ExcitatoryN
public soma
create soma
proc init() {
create soma
diam = 18.8
L = 18.8
Ra = 123
nseg = 1
insert Excitatory
ena = 60
ek = -90
el_Excitatory = -65
gnabar_Excitatory = 30/1000
gkbar_Excitatory = 100/1000
gl_Excitatory = 0.1/1000
}
endtemplate ExcitatoryN
objref neuron, stim
neuron = new ExcitatoryN()
access neuron.soma
stim = new Iapp(0.5)
stim.del = 0
stim.dur = 1e9
objref I, tvec, tmpvec, veclist
NUM = tstop/dt+1
tvec = new Vector(NUM)
tvec.indgen()
tvec.mul(dt)
I = new Vector(NUM)
I = tvec.c
freq = 10
I.mul(2*PI*freq/1000)
I.apply("sin")
I.play(Iapp[0].Vs, tvec)
run()
```

With regards,

Hyeon