Hyperpolarizing current to every soma in a network - how?

Moderator: wwlytton

Post Reply
vladimirov
Posts: 50
Joined: Thu Jul 07, 2011 6:20 pm

Hyperpolarizing current to every soma in a network - how?

Post by vladimirov »

Hi,
I wonder if there is an elegant way to apply a small hyperpolarizing current to all neurons (somas) of a large network. If I have a network of >10,000 neurons, it looks pretty weird to simulate as many IClamps each stuck into a soma and having the same current. Is there any way to simulate it in a smarter way?
Thank you!
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Hyperpolarizing current to every soma in a network - how

Post by ted »

The alternative would be to create a density mechanism that does the same thing. This might be less costly in terms of storage requirements than using thousands of point processes.

Code: Select all

NEURON {
  SUFFIX bias
  NONSPECIFIC_CURRENT i
  RANGE i, amp
}
UNITS {
  (mA) = (milliamp)
}
PARAMETER {
  amp = 0 (mA/cm2)
}
ASSIGNED {
  i (mA/cm2)
}
BREAKPOINT {
  i = amp
}
Insert this into every section where you need it.

Use an FInitializeHandler to control turning it on and off.

Code: Select all

// put these lines near the top of your code, for the sake of convenience
START = time at which you want the current to start
DUR = how long you want it to last
AMP = amplitude of current
 . . .
// put these lines near your simulation control code
objref fih
fih = new FInitializeHandler("init_bias()")
proc int_bias() {
  forall if (ismembrane("bias")) amp_bias(0.5) = 0 // turn bias off
  cvode.event("toggle_bias(START)") // to turn on at t = START
}
proc toggle_bias() {
  forall if (ismembrane("bias")) {
    if (amp_bias(0.5) == 0) { // turn it on
      amp_bias(0.5) = AMP
      cvode.event("toggle_bias(t + DUR)") // to turn off at t + DUR
    } else { // turn it off
      amp_bias(0.5) = 0
    }
  }
  // we've changed a parameter abruptly
  // so we really should re-initialize cvode
  // if cvode is not being used, just call fcurrent()
  if (cvode.active()) {
    cvode.re_init()
  } else {
    fcurrent()
  }
}
Be sure to test this on a toy net with just a few cells, in case I made a mistake somewhere.

One caveat: this mechanism will deliver a current density into every segment of each section to which it is attached. Total current injected into each segment will be proportional to segment area. A POINT_PROCESS delivers an absolute current, and only into the segment to which it is attached. If this is a problem for you, let me know and I will suggest how to get exactly the effect you want.
vladimirov
Posts: 50
Joined: Thu Jul 07, 2011 6:20 pm

Re: Hyperpolarizing current to every soma in a network - how

Post by vladimirov »

Wow, thank you very much, Ted. I think this solves my problem. Your mod file works fine. Here is how I use it:

Code: Select all

cell.soma insert bias
area_soma=PI*cell.soma.diam*cell.soma.L*1e-8 // [mcm->cm2]
AMP=0.1*1e-6 //[nA->mA], note that hyperpolarizing current is + (opposite to electrode current sign)
cell.soma amp_bias=AMP/area_soma
This gives same depolarization as injecting -0.1 nA current by an electrode, as expected.

Thanks a lot!
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Hyperpolarizing current to every soma in a network - how

Post by ted »

That does work.
Post Reply