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()
}
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()
}
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!