Total transmembrane current for segments

Anything that doesn't fit elsewhere.
Post Reply
Kuval
Posts: 3
Joined: Fri Jun 24, 2005 5:25 am

Total transmembrane current for segments

Post by Kuval »

For further use in computations of extracellular fields I need the values of the total transmembrane current for each segment of all sections. I make necessary calculations using hoc file with "forall" for sections and "for (x, 0)" for segments, but it is very slow. Is there any possibility to get the total transmembrane current for segment more efficiently? Maybe Neuron uses this in a hidden form and it is possible to make this value accessible like "v", for example.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

extracellular stimulation and recording

Post by ted »

i_membrane is available after inserting the extracellular mechanism. Read about it here
http://www.neuron.yale.edu/neuron/stati ... racellular

You might find this
http://www.neuron.yale.edu/ftp/ted/neur ... nd_rec.zip
helpful. It contains complete working implementations of extracellular stimulation and
recording of a single neuron model, and could serve as a starting point for a model
that involves multiple cells.
Kuval
Posts: 3
Joined: Fri Jun 24, 2005 5:25 am

Re: extracellular stimulation and recording

Post by Kuval »

Unfortunately, i_membrane is not equal total transmembrane current.
How can I send you a zip file with a simple example demonstrating this problem?[/code]
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

First please run this test:
Make a single compartment model, insert pas and extracellular, apply an IClamp
that delivers a current pulse, and verify that (i_pas + i_cap)*area(0.5) equals
i_membrane*area(0.5). You might want to plot the difference between these two
calculations of total membrane current, and verify that whatever error exists is
small and--assuming you're using NEURON's default integrator--has a 1st order
dependence on dt, i.e. cutting dt by 5 reduces the error by a factor of 5. Then
switch to adaptive integration and see the error become extremely small.

Having done that, do a similar test with whatever more complex model you are
working on (summing all ionic currents plus i_cap, of course), and let me know if
you still have questions.
Kuval
Posts: 3
Joined: Fri Jun 24, 2005 5:25 am

Post by Kuval »

Thank you very much for help. Now I have no questions.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

common pitfalls

Post by ted »

Two pitfalls that everybody seems to run into, sooner or later:
1. Currents and conductances of distributed mechanisms have density units (i.e.
current/area and conductance/area).
2. The extracellular class's i_membrane contains ionic and capacitive current.
Post Reply