We start by making a ball and stick model in which the natural resting potential of the somatic sphere and dendritic cylinder are different. No matter what v_init you choose, default initializaton to a uniform membrane potential results in simulations that show an initial drift of v as the cell settles toward a stable state.
After demonstrating this initial drift, we will implement and test a method for initializing to steady state that leaves membrane potential nonuniform in space but constant in time.
Section | Anatomy | Compartmentalization | Biophysics |
---|---|---|---|
soma | length 20 microns diameter 20 microns |
d_lambda = 0.1 | Ra = 160 ohm cm, Cm = 1 uf/cm2 Hodgkin-Huxley channels |
dend | length 1000 microns diameter 5 microns |
d_lambda = 0.1 | Ra = 160 ohm cm, Cm = 1 uf/cm2 passive with Rm = 10,000 ohm cm2 |
Add dend.v(1) to the graph (use Plot what?), then run another simulation.
Use Move Text and View = plot as needed to get a better picture.
Add a space plot and use its Set View to change the y axis range to -70 -65.
Run another simulation and watch how drastically v changes from the initial condition.
Save everything to a session file called all.ses
(use File / save session)
and exit NEURON.
init_ss.py
file with the contents
from neuron import h, gui def ss_init(t0=-1e3, dur=1e2, dt=0.025): """Initialize to steady state. Executes as part of h.finitialize() Appropriate parameters depend on your model t0 -- how far to jump back (should be < 0) dur -- time allowed to reach steady state dt -- initialization time step """ h.t = t0 # save CVode state to restore; initialization with fixed dt old_cvode_state = h.cvode.active() h.cvode.active(False) h.dt = dt while (h.t < t0 + dur): h.fadvance() # # restore cvode active/inactive state if necessary h.cvode.active(old_cvode_state) h.t = 0 if h.cvode.active(): h.cvode.re_init() else: h.fcurrent() h.frecord_init() fih = h.FInitializeHandler(ss_init) # model specification h.load_file('all.ses') # ball and stick model with exptl rigNow execute
init_ss.py
.