Total transmembrane current for segments
Total transmembrane current for segments
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.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
extracellular stimulation and recording
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.
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
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]
How can I send you a zip file with a simple example demonstrating this problem?[/code]
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
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.
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.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
common pitfalls
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.
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.