The question of whether something is to be gained by adding pas to a section that contains hh remains open.
Returning to your original question--
Initialization is an important topic that is too often neglected. Models that have nonuniform membrane properties pose a special challenge. First, one must decide whether to
1. allow nonuniform membrane potential in the resting state (but what should the potential be at each point in the model?)
or instead to
2. somehow force membrane potential in the resting state to have the same value everywhere (but how does one make that happen?).
The choice between these two alternatives may be guided by experimental observation (is there evidence that membrane potential is uniform or nonuniform at rest in the real cell?) or principle (if the issue is one of excitability or spike propagation, maybe it makes sense for all sodium channels to be in the same state of inactivation, and all potassium channels to be in the same state of activation, regardless of where they are located).
One way to ensure that resting membrane potential is uniform everywhere is to insert a current source into each compartment, then initialize all voltage-gated channels to some initial membrane potential v_init, and finally adjust the current delivered by each current source so that it cancels out the local ionic membrane current in each compartment. Since a current source has infinite source impedance, it does not affect the model's Jacobian because it introduces no shunt conductance, and consequently it does not alter system dynamics.
Source code for a density mechanism that delivers a constent current, and a custom init() procedure that adjusts the current in a single compartment model, is provided in Chapter 8 of The NEURON Book. If you don't have that book, get this preprint
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf
(may have some typos, so be careful about its contents).
Since your model has multiple compartments, and not all sections have the same channels, you'll need a different proc init(). This one should work
Code: Select all
proc init() {
finitialize(v_init)
forall {
if (ismembrane("hh")) ic_constant = -(ina + ik + il_hh)
if (ismembrane("pas")) ic_constant = -i_pas
}
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
} frecord_init()
}
assuming that
1. the "constant" mechanism has been inserted into each section
and
2. each section contains either pas or hh but not both
and
3. the code that specifies the custom proc init is executed _after_ nrngui.hoc (or stdgui.hoc) has been loaded and all other model setup code has been executed.