Hi all, I am having trouble setting v_init to something other than the default value before running a simulation. In Python, I tried the following:
h.finitialize(-61)
h.run()
but somehow the voltage still starts at -65. I then tried using the init() function (with "neuron." and with "h." prefixes, with and without finitialize()):
h.finitialize(-61)
neuron.init()
h.run()
which also didn't work. I also manually set the voltage of each section to -61 (i.e. "dend.v = -61), and every permutation of the above steps, but the voltage always starts from -65. Does anyone know how to truly change v_init? Any suggestions are appreciated!
Modifying v_init
Moderator: hines
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Modifying v_init
Code: Select all
h.finitialize(-61)
h.run()
Direct assignment works.Does anyone know how to truly change v_init?
h.v_init = whatever you like
Then call h.run() and all will be well.
*--Why does run() call stdinit() before it calls continuerun(tstop)? Because it is often useful to run a series of simulations interactively, so it's convenient for run() to take care of initialization before the task of generating a solution begins. NEURON's initialization and standard run system is discussed in chapters 7 and 8 of The NEURON Book, but you can also learn a lot just by examining the contents of stdrun.hoc in nrn/share/nrn/lib/hoc
-
- Posts: 34
- Joined: Thu Feb 02, 2017 11:30 am
Re: Modifying v_init
Setting h.v_init = -61 worked, thank you!