Extracellular stimulation

Anything that doesn't fit elsewhere.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Extracellular stimulation

Post by ted »

Sami.B wrote:"After any change to cell geometry or nseg, be sure to invoke setpointers()"
This isn't an error message--it's just a reminder to execute setpointers() after any manipulation that might add new compartments that contain the xtra mechanism.

Code: Select all

nrniv: dend not an array variable
 in rigc.ses near line 64
dend[77] rvp_.begin(1)
This error message means that there has been an attempt to create a graph that shows a range variable plot whose origin is the 1 end of a section called dend[77], but dend[77] doesn't exist. A range variable plot displays the value of a range variable plotted as a function of distance along a path.
we've made geometrical changes to the original cell.ses file that you've created.
and one of the changes did away with dend[77], causing this error message.

How to fix this problem? First, make sure that you are using a revision control system (or at the very least are working with copies of the original files) so you can back out of any changes that break anything.

Next discover occurrences of dend[77] that are likely to cause problems--
grep dend *ses | grep 77
reveals the following:
rigc.ses:dend[77] rvp_.begin(1)
rigc.ses:dend[77] rvp_.begin(1)
rigc.ses:dend[77] rvp_.begin(1)
rigc.ses:dend[77] rvp_.begin(1)
rigxc.ses:dend[77] rvp_.begin(1)

Examine rigc.ses to find that two of these pertain to a graph that contains RangeVarPlots of v and v($1)+vext($1), and another two are from a graph that shows RangeVarPlots of vext and e_extracellular. You can eliminate these graphs by identifying the blocks of code that create each of them, and commenting them out. The block of code for the first graph is

Code: Select all

{
save_window_ = new Graph(0)
save_window_.size(-376.823,328.433,-80,40)
 . . .
objectvar rvp_
rvp_ = new RangeVarPlot("v")
dend[77] rvp_.begin(1)
 . . .
objectvar rvp_
rvp_ = new RangeVarPlot("v($1)+vext($1)")
dend[77] rvp_.begin(1)
 . . .
save_window_.addobject(rvp_, 3, 7, 0.64984, 0.880831)
}
so just wrap it in a pair of multi-line comment delimiters /* */, so that it looks like this (for clarity I omit all but the first and last 2 or 3 lines):

Code: Select all

/*
{
save_window_ = new Graph(0)
save_window_.size(-376.823,328.433,-80,40)
 . . .
save_window_.addobject(rvp_, 3, 7, 0.64984, 0.880831)
}
*/
Do the same for the second graph with RangeVarPlots in rig.ses.

That leaves one last instance of dend[77], in rigxc.ses. Check out that file and note that it is merely the code that creates the graph that shows the RangeVarPlot of er_xtra. Do you even need to see that? If not, you could just comment out the
load_file("rigxc.ses")
statement in initxstim.hoc, and that will eliminate the last source of dend[77]-related error msgs.

You should now be able to run initxstim.hoc. If you miss the range variable plots of v, vext, etc., you can easily create new ones appropriate for your new model cell--see
How to plot a variable vs. distance
in the Forum's Hot tips area. Once you have what you like, use the Print & File Window Manager to save your new range variable plots to a new ses file and then add a load_file statement to initxstim.hoc (a good place for this would be right after the load_file("rigc.ses" line) so that NEURON will set them up the next time you run initxstim.hoc
Our question is: where, when, and how many times
do we invoke setpointers() when using our modified cell.ses?
It is only necessary to call setpointers() if you change cell geometry or nseg after the model specification code has been executed. load_file("cell.ses") makes NEURON read and execute the model specification code. Everything in initxstim.hoc after that statement is instrumentation or user interface code. Once the RunControl panel and the various graphs and other panels appear on the screen, the model specification code has already been executed.
bchenley
Posts: 13
Joined: Mon Apr 12, 2010 3:55 pm

Re: Extracellular stimulation

Post by bchenley »

A new cell model has been successfully implemented using the extracellular_stim_and_rec file. All the modification you mentioned were made. However, we are not seeing any responses. We are trying to plot the voltage response of a particular segment, so we do "Plot what?" to choose the segment we want and the variable we want to see. However, it is always a flat-line. Any suggestions on what might be the cause? Thanks...
bchenley
Posts: 13
Joined: Mon Apr 12, 2010 3:55 pm

Re: Extracellular stimulation

Post by bchenley »

I realized that we needed to do define_shape() first... so now I got it. However, I have a another question... The readme file says this:

"7. During a simulation, the extracellularly recorded potential vrec is
computed by summing up the contributions from all of the segments that contain
the xtra mechanism..."

Given this, is it possible to virtually create separate cells by deselecting the xtra mechanism for the segments that are connecting the cells? So, for instance, if I had something like:

______________axon1
|
| axon2
|
______________axon3
|
|axon4
|
______________axon5

Then, if click the "xtra" box in the biophysics section for axon1, 3, and 5, and not axon2 and 4, would I essentially have three unconnected axons (1,3, and 5)?

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

Re: Extracellular stimulation

Post by ted »

2 and 4 would electrically couple 1, 3 and 5. I suppose you could make 2 and 4 have very narrow diam, large Ra, and nseg = 1.

There wouldn't be any field coupling between 1, 3 or 5, but that's a different issue.
Sami.B
Posts: 3
Joined: Thu Apr 15, 2010 8:44 pm

Re: Extracellular stimulation

Post by Sami.B »

Hi Ted,

A million thank yous for all your help. We'd like to include your name in our acknowledgment section of our presentation slides. How can we address you properly? So far, all we have is "Ted"...Our code is working great and we (Bchenly and myself) were able to take the necessary recordings.

Best,

Sami
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Extracellular stimulation

Post by ted »

Sami.B wrote:Our code is working great and we (Bchenly and myself) were able to take the necessary recordings.
It's excellent to hear that, Sami, and I'm very glad to have been of help.
We'd like to include your name in our acknowledgment section of our presentation slides. How can we address you properly? So far, all we have is "Ted"
Ted Carnevale
Neurobiology Department
Yale University School of Medicine
Most of what I know about NEURON I learned from its developer, who is also PI of the NEURON project--
Michael Hines
Computer Science Department
Yale University

Where will your presentation be given, and who will be the audience?

If your work generates a publication, please be sure to let me know so I can add the citation(s) to our on-line bibliography
http://www.neuron.yale.edu/neuron/stati ... ednrn.html
And it would help if you could cite NEURON. The most complete and up-to-date reference is
Carnevale, N.T. and Hines, M.L. The NEURON Book.
Cambridge, UK: Cambridge University Press, 2006.
Sami.B
Posts: 3
Joined: Thu Apr 15, 2010 8:44 pm

Re: Extracellular stimulation

Post by Sami.B »

Hi Ted,

We're presenting our work in front of our class, a graduate level course @ USC in Neural Implant design. Our project was a proof-of-concept, very "meat-and-potatoes" endeavor. Since we're new to Neuron 7.1, we weren't able to get as far as we would've liked within a 3.5 week time frame. Rest assured, if more comes of our humble (yet exciting) project, we'll be sure to let you know. Thanks!

Best,

Sami
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Extracellular stimulation

Post by ted »

3.5 weeks is short indeed. Thanks for using NEURON in your project!
Post Reply