// new file with minimal includes.
// taken from neuron-CB-act-electrode-embed-IClamp.ses

// nrngui stuff and ion chans
load_file("inc-first.ses")

//load CellBuilder
// can also load neuron-CB.ses
{load_file("neuron-CB-ext-axon-2pieces.ses")}


{
xpanel("RunControl", 0)
v_init = -60
xvalue("Init","v_init", 1,"stdinit()", 1, 1 )
xbutton("Init & Run","run()")
xbutton("Stop","stoprun=1")
runStopAt = 5
xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 )
runStopIn = 1
xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 )
xbutton("Single Step","steprun()")
t = 200
xvalue("t","t", 2 )
tstop = 600
xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 )
dt = 0.025
xvalue("dt","dt", 1,"setdt()", 0, 1 )
steps_per_ms = 40
xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 )
screen_update_invl = 0.1
xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 )
realtime = 1.12
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(893,777)
}

// load common funcs
load_file("fitfuncs.hoc")

print_elec_cell()

// calc morph stats
load_file("stats.hoc")

load_file("v-graph-bigger-axon-2pieces.ses")

load_file("IClamp-steps.ses")

// SAVE STATE IN THESE FILES
//-----------------------

// regular firing with NaT/Kdr chans in ext_axon[1]
//state_file_name = "state-neuron-CB+act+elec+ext-axon-2piece.bin"

// only chans in all
state_file_name = "state-neuron-CB+act+elec+ext-axon-2piece-chans-in-all.bin"
//-----------------------


// small adjustments
IClamp[0].dur = 500