Page 1 of 1
Total transmembrane current for segments
Posted: Mon Sep 05, 2005 7:32 am
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.
extracellular stimulation and recording
Posted: Mon Sep 05, 2005 10:11 am
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.
Re: extracellular stimulation and recording
Posted: Thu Sep 08, 2005 3:09 am
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]
Posted: Thu Sep 08, 2005 10:45 am
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.
Posted: Fri Sep 09, 2005 8:15 am
by Kuval
Thank you very much for help. Now I have no questions.
common pitfalls
Posted: Fri Sep 09, 2005 10:58 am
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.