Initialization & MultiRunFitter

Using the Multiple Run Fitter, praxis, etc..
Post Reply
mart

Initialization & MultiRunFitter

Post by mart »

I need to initialize my model to steady state before every run of the optimization procedure.
I proceeded in a considerably intuitive way taking as a starting point the MultiRunFitter tutorials & the section 8.4.2 of The Book of Neuron (Chapter 8: How to initialize simulations).

I modified the procedure "init()" contained in my "parameters.hoc" file as follows:
ORIGINAL VERSION

Code: Select all

 proc init() {
   finitialize(v_init)
    if (cvode.active()) {
      cvode.re_init()
    } else {
      fcurrent()
    }
    frecord_init()
}
MODIFIED VERSION

Code: Select all

 proc init() { local dtsav, temp
    finitialize(v_init)
    	t	   =-1e10
   	dtsav   = dt
    	dt	   = 1e9
    	// if cvode is on, turn it off to do large fixed step
    	temp = cvode.active()
    	if (temp != 0) { cvode.active(0) }
    	while (t<-1e9) {
    	 fadvance()
    	}
    	// restore cvode if necessary
    	if (temp != 0) { cvode.active(1) }
    	dt	= dtsav
    	t	= 0
    
    if (cvode.active()) {
      cvode.re_init()
    } else {
      fcurrent()
    }
    frecord_init()
}
Well... it didn't work. It actually introduced an additional problem. Now my simulation not only starts far away from the steady state, it starts in a different voltage (10mV more depolarized) than the one specified by "v_init". The "v_init" value that I introduced in the "run" GUI-panel (part of my MRF-session) is -75, this value is ignored and a default value of -65 is always used. I tried to additionally define "v_init" within the "parameters.hoc" file, it didn't work. What did I do wrong?

Just in case, I thought that the piece of code suggested in my Book of Neuron (8.4.2) for initializing to steady state contains some errors, that's why I didn't introduce exactly the same code as suggested in the book. This is what I modified: if (temp! = 0) ----> if (temp != 0)
...if I don't do it I get syntax errors, after doing it I don't get any error in the terminal.
(besides... my modified version makes more sense to me, specially when taking into account that we speak about the conditions for an if-loop)

NOTES:
(1) My "parameters.hoc" file is called (in the 3rd place) by the main ".hoc" file that starts my MRF-session. The main file calls "nrngui.hoc" in the first place, then my "raw" model, then the file containing the "proxies" for the model's free parameters to be adjusted my MRF (this is the "parameters.hoc" file), and finally the session file containing instrumentation, MRF main panels, and a bunch of other panels.
(2) I am not sure about which is my edition of The Book of Neuron. This is the only information I found about it: "Information on this title:http://www.cambridge.org/9780521843218"

Any help will be greatly appreciated.

Thanks for reading and posting!
mart

Re: Initialization & MultiRunFitter

Post by mart »

Ok... I identified the problem.
The initialization strategy is actually working but my I_Clamp electrodes go crazy when I use negative time values during my initialization and they do weird stuff.
How can I modify the IClamp mechanism so that it understands negative times?

I found some information about this in here viewtopic.php?f=13&t=2342&p=9149&hilit= ... nism#p9149
"it seems neuron or IClamp() do not understand negative t anymore"

But it is not clear to me how to solve it.

Best wishes,
Ulisses
Post Reply