etano wrote:I would like the total conductance of the soma, and the model has >1 compartment.
That's helpful information.
I was thinking I should voltage clamp the soma, present the stimulus, and then measure the peak current. From there I could calculate the peak conductance.
Nope. Imagine a voltage clamped cell with multiple voltage-gated channels. To make the problem simple, assume that the cell is a sphere. Apply a depolarizing step command. Some currents are outward, others inward, and each has its own time course. Total ionic current is area * SUMMA gi(t)*(v(t) - ei) where each current corresponds to a different i. Total conductance is SUMMA gi(t), which does not follow the same time course as total ionic current. If the cell is not a sphere, the problem is even more complex because v and gi(t) are not uniform over the surface of the cell (not to mention the inability of a voltage clamp at the soma to capture all membrane current from membrane that is not in the same compartment).
Here's what you need to do:
1. Make sure that each channel in the soma, whether it belongs to a density mechanism or a point process, has a conductance variable that is visible at the hoc level. This may require revision of whatever mod files you are using.
2. Use the Vector class's record() method to capture the time course of each conductance in each segment of the soma.
3. At the end of the simulation define a new Vector that will hold the total somatic conductance time course.
For each segment of the soma
--calculate the time course of the sum of all density mechanism ionic conductances
--multiply this vector by segment area
--add this vector to the total somatic conductance time course vector
Then add up the time courses of all of the somatic point process ionic conductances, and add that vector to the total somatic conductance time course vector.