load_file("nrngui.hoc")

/* morphology */

create s, a[10], b[10]

forall {
	Ra = 70
	cm = 1
}

access s
    nseg = 1
	diam = 10
	L    = 10

for i = 0, 9 a[i] {
	nseg = 100
	diam = 0.2
	L    = 100
}

for i = 0, 9 b[i] {
	nseg = 4
	diam = 4
	L    = 4
}

       connect s(1), a[0](0)

for i = 0, 9 {connect b[i](0), a[i](1)		
}
		
for i = 0, 8 {connect a[i+1](0), b[i](1)		
}


/* channel */

forall {insert hhmfb
        insert kmb
        gnabar_hhmfb = 0.05 /* S/cm^2 */
        gkbar_hhmfb = 0.036 /* S/cm^2 */
		gl_hhmfb = 0.0001 /* S/cm^2 */
		sh_kmb=-30
		gbar_kmb = 0.005 /* S/cm^2 */	
        ena = 50    /* mV */
        ek = -85    /* mV */
        el = -81    /* mV */
        celsius = 25
}

forsec "s" gnabar_hhmfb = 0.01 /* S/cm^2 */      
                                                            
forsec "b" {insert mfbpqca
            insert mfbnca
			insert mfbrca
			gcabar_mfbpqca = 0.0020 /* S/cm^2*/
            gcabar_mfbnca = 0.0008 /* S/cm^2*/
            gcabar_mfbrca = 0.0004 /* S/cm^2*/
            eca = 60    /* mV */
}


/* stim */

objref  stim[50]
for i=0, 49 {
s stim[i] = new IClamp(0.5)
	    stim[i].del = 200+50*i
	    stim[i].dur = 2
	    stim[i].amp = 0.2
}


load_file("rec3000_9.ses")