Page 1 of 1

Whole Cell Stimulation

Posted: Sun Aug 07, 2011 7:19 am
by myreil
Hey!

I have a 3D pyramidal layer 5 cell, which consists of:
soma: diameter = 25 um length = 35 um area = 2747.9 um2
11 primary neurites
87 branches totaling 17667.6 um in length, 52996.2 um2 in area
3383 tree points translated to 164 segments (1 requested)
Neurites divided into segments of equal dx between adjacent digitized
branch points.

I want to stimulate every single segment of the cell simultaneously. (using IClamp or any POINT_PROCESS).
Is there any efficient way of doing that?

Thank you in advance!!!

Re: Whole Cell Stimulation

Posted: Sun Aug 07, 2011 12:03 pm
by ted
Iterate over all internal segments of all sections, attaching a new IClamp to each.
objref stimlist
stimlist = new List()
forall for (x,0) stimlist.append(new IClamp(x))
Manage the individual instances as stimlist.o(i) where i lies in the range 0..stimlist.count()-1

Re: Whole Cell Stimulation

Posted: Sun Aug 07, 2011 6:21 pm
by myreil
Dear Ted,

Thank you for your answer.

How can I then define the amplitude, duration and delay of the pulse?

And for example if I type:
access dend1
objref stimlist
stimlist = new List()
forall for (x,0) stimlist.append(new IClamp(x))

will that mean that every segment of dendrite1 will be stimulated?

Thank you again and I am sorry if I ask obvious things.

Re: Whole Cell Stimulation

Posted: Sun Aug 07, 2011 6:44 pm
by ted
myreil wrote:How can I then define the amplitude, duration and delay of the pulse?
Just like I said--manage the individual instances as stimlist.o(i) where i lies in the range 0..stimlist.count()-1. So, if you want all to start at t = 1 ms, last 0.1 ms, and have amplitude 0.02 nA

Code: Select all

for i=0,stimlist.count-1 {
  stimlist.o(i).del = 1
  stimlist.o(i).dur = 0.1
  stimlist.o(i).amp = 0.02
}
Time to read the Programmer's Reference entry about the List class.
for example if I type:
access dend1
objref stimlist
stimlist = new List()
forall for (x,0) stimlist.append(new IClamp(x))

will that mean that every segment of dendrite1 will be stimulated?
A very good question. If this
"every segment of dendrite1 will be stimulated"
is what you want to do, then use "section stack syntax" to specify that dendrite1 is the currently accessed section for every new IClamp that is created--like this:
stimlist = new List()
dendrite1 for (x,0) stimlist.append(new IClamp(x))
The code example you provided would have attached an IClamp to every segment in every neurite in your entire model. Time to read about
forall
and
for (x,0)
You'll also want to read about the "access" statement and why it should only be used once in a program--see the Programmer's Reference, and also the Hot tips area of this forum
viewforum.php?f=28
where you will find "Use only one 'access' statement".

It's very important to understand how to specify the "currently accessed section" and how to use the iterators forall, for (x), and for (x,0). Thank you for posting questions that address these key topics.