modified HH model with sinusoidal voltage stimulation

The basics of how to develop, test, and use models.
Post Reply
Hyeon

modified HH model with sinusoidal voltage stimulation

Post by Hyeon »

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:

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
    }
}
Then, I made the following script for sinusoidal stimulation:

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()
I wonder how to represent derivative term "dVs/dt" in Iapp NMODL file, and I made appropriate sinusoidal voltage stimulation?

With regards,
Hyeon
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modified HH model with sinusoidal voltage stimulation

Post by ted »

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.
Vs is the voltage applied to what?
Hyeon

Re: modified HH model with sinusoidal voltage stimulation

Post by Hyeon »

This modified HH equation was from "Differential modulation of excitatory and inhibitory neurons during periodic stimulation", Mahmud et al., 2016
It aims to simulate excitatory and inhibitory neurons (composed of a single compartment) subject to sinusoidal stimulation using varied frequencies and amplitudes.
According to this paper, I understand that I_app is the applied current to the single compartment of neuron and thus Vs means amplitude of applied voltage representing sinusoidal stimulation.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modified HH model with sinusoidal voltage stimulation

Post by ted »

Too bad that paper wasn't adequately reviewed. The authors present no rationale for using cm*dVs/dt to represent the effect of extracellular stimulation on their model cells. Nor do they explain how they relate their "Vs" to cellular morphology, orientiation, or location within the cranium, or to the actual extracellular field induced in the brain by the stimulating electrodes (whatever the location or geometry of those electrodes might be). But of course none of those considerations could be taken into account because their model cells are single compartment models, which wouldn't respond to a realistic extracellular stimulus anyway. Apparently Vs is just assigned whatever values the authors found necessary to alter the firing activity of their single compartment model neurons.

For the moment, let us ignore these considerations and instead focus on how to implement the current that the authors say was induced in their model cells by the fluctuating electrical field.
I_app = cm*dVs/dt
Since Vs is merely sin(2*PI*f*t), where f is the frequency in Hz, you don't need a mod file that calculates the derivative of anything--which is good, because NMODL doesn't have a derivative operator. Instead, just replace dVs/dt with the derivative of sin(2*PI*f*t), so
I_app = cm * 2*PI*cos(2*PI*f*t)
with of course a scale factor or two to take into account the different units involved (mV, nA, ms, um2, Hz),
I'll write up a mod file that you can use for this and post it online for you to pick up.
Hyeon

Re: modified HH model with sinusoidal voltage stimulation

Post by Hyeon »

Thanks for your kind reply, Ted.

I agree that applied current (I_app) did not explain extracellular stimulation adequately. However, since I am currently interested in sinusoidal stimulation to the excitatory and inhibitory neurons, I try to reproduce this paper results. I am also simulating other models in ModelDB.

Except for this issue, it will be very helpful to let me know how sinusoidal stimulation is applied, through a mod file. So, please let me know where can I find a mod file that you are proposed.

Additionally, I want to apply extracellular stimulation by calculating potential fields using a volume conductor model of the head and electrode. However, I know that the extracellular mechanism cannot be applied to single compartment models. So, I plan to apply calculated potential fields to the single compartment neuronal models by intracellular stimulation (Ex. IClamp). But, I don't know it is appropriate or not. So, could you please give me a tip or reference for this?

Thanks again.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modified HH model with sinusoidal voltage stimulation

Post by ted »

the extracellular mechanism cannot be applied to single compartment models
This is not true. extracellular can be used in single compartment models. But it won't produce a transmembrane current or affect membrane potential. These results are exactly the same as you'd get from an actual experiment in which a spherical cell is placed into a bath and the potential of the bath is changed.

I will email you an NMODL file for a point process that defines a current source that delivers an oscillating current
i = amp * cos(2*PI*(t-del)*f*(0.001))
which starts at t == del and ends after n whole cycles
where
amp is peak current amplitude in nA
t and del are in ms
f is in Hz
The user specifiable parameters are del, amp, f, and n.

I will also email you a hoc file that contains an example of the use of this current source with a single compartment model cell. The hoc file contains a function that calculates the current amplitude that is equivalent to the "extracellular stimulus" used by Mahmud and Vassanelli. The arguments to the function are
area of the single compartment model cell in um2
specific membrane capacitance in uf/cm2
stimulus frequency in Hz
stimulus amplitude "V" in mV as used by Mahmud and Vassanelli
The returned value is peak amplitude of the current to be injected into the model cell, in nA.
Hyeon

Re: modified HH model with sinusoidal voltage stimulation

Post by Hyeon »

Dear Ted,

I really appreciate your help. Through files that you emailed, I can reproduce "extracellular stimulus" results in Mahmud and Vassanelli, and additionally, it is a good opportunity to understand how to stimulate neurons. Now, I can proceed with an investigation related to modeling and experimental works using sinusoidal stimulation to the different types of neurons.

Sincerely,
Hyeon Seo
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: modified HH model with sinusoidal voltage stimulation

Post by ted »

For the benefit of others who may read this thread, the files are in https://www.neuron.yale.edu/ftp/ted/neuron/cosine.zip
Post Reply