// Parameters.hoc shows parameters of equation and conductance levels for each channel 
// implemented on model M-cell. Tonic firing model (Figure 6A) are arbitrary determined by
// fitting expression levels of na, kht, ka, and leak to reproduce tonic firing of
// the M-cell after both DTX and XE991 treatment and MiD2/3cm shown in Figure 1. 
// Pairs of conductances for low-threshold K+ channels (Figures 6A,B) that best explain 
// our experimental data are searched by comprehensive implementation of kcnq and kcna 
// or kcnab2 to tonic firing model.
//
// Takaki Watanabe
// wtakaki@m.u-tokyo.ac.jp

// na parameters
        aa4= 39 // activation @low thoreshold 
		bb4= 8 // activation @low thoreshold 
		cc4= 63 // activation @low thoreshold 
		dd4= 7 // activation @middle thoreshold 
		ee4= 70 // inactivation @high thoreshold 
		ff4= 5
		gg4= 110 
		hh4= 16  // rise time @low thoreshold
		ii4= 200	// rise time @low thoreshold
		jj4= 50 
		kk4= 10 
		ll4= 0.01
		mm4= 110 // rise time @middle thoreshold
		nn4= 3 
		oo4= 110
		pp4= 20 
		qq4= 10 
		rr4= 80 
		ss4= 13
        tt4= 0.1 
		
// kcnq parameters
        aa0= 29 // activation @low thoreshold 
		bb0= 10 // activation @low thoreshold 
		cc0= 0.25 // activation @low thoreshold 
		dd0= 71 // activation @middle thoreshold 
		ee0= 150 // inactivation @high thoreshold // changed
		ff0= 320
		gg0= 4 
		hh0= 0  // rise time @low thoreshold 
		ii0= 70	// rise time @low thoreshold 
		jj0= 10
		kk0= 63 
		ll0= 6
		mm0= 10 // rise time @middle thoreshold // significant changed
		nn0= 1000 // inactivation time course high thoreshold
		oo0= 60
		pp0= 20 
		qq0= 60 
		rr0= 8 
		ss0= 50 
        zss0 = 0.9 // changed
		
// kcna parameters
		aa2= 35   // activation @low thoreshold 
		bb2= 7  // activation @low thoreshold 
		cc2= 0.25 // activation @low thoreshold 
		dd2= 71  // activation @middle thoreshold 
		ee2= 150   // inactivation @high thoreshold // changed
		ff2= 120
		gg2= 6 
		hh2= 80    // rise time @low thoreshold
		ii2= 24  // rise time @low thoreshold
		jj2= 70
		kk2= 59
		ll2= 7  // deactivation
		mm2= 1.3 // rise time middle thoreshold
		nn2= 1000  // inactivation time course high thoreshold
		oo2= 60
		pp2= 20
		qq2= 60
		rr2= 8 
		ss2= 50 
        zss2 = 0.9  // changed
		
// kcnab2 parameters
		aa4= 35  // activation @low thoreshold 
		bb4= 9   // activation @low thoreshold 
		cc4= 0.25 // activation @low thoreshold 
		dd4= 71  // activation @middle thoreshold 
		ee4= 150   // inactivation @high thoreshold // changed
		ff4= 175
		gg4= 6 
		hh4= 85     // rise time @low thoreshold
		ii4= 20 // rise time @low thoreshold
		jj4= 80
		kk4= 62
		ll4= 6  // deactivation
		mm4= 1 // rise time middle thoreshold
		nn4= 1000  // inactivation time course high thoreshold
		oo4= 60
		pp4= 20
		qq4= 60
		rr4= 8 
		ss4= 50 
        zss4 = 0.9  // changed
		
// kht parameters
        aa1= 15 
		bb1= 5 // activation @low thoreshold 
		cc1= 0.5 
		dd1= 23 // activation @middle thoreshold 
		ee1= 6 
		ff1= 100 
		gg1= 11 
		hh1= 60 
		ii1= 24 
		jj1= 21 
		kk1= 60 
		ll1= 23 
		mm1= 0.5 
		nn1= 100 
		oo1= 4 
		pp1= 60 
		qq1= 21 
		rr1= 5 
		ss1= 10 
		tt1= 18
		uu1= 0.5 
		nf = 0.85 
		
// ka parameters		
		aa3=31 // activation @low thoreshold 
		bb3=6 // activation acceleration @low thoreshold 
		cc3=0.25 
		dd3=66 
		ee3=7 
		ff3=0.5 
		gg3=66 
		hh3=7 
		ii3=0.5 
		jj3=100
		kk3=7 
		ll3=60
		mm3=14 
		nn3=29 
		oo3=60 
		pp3=24
		qq3=0.1 
		rr3=1000 // inactivation fall time @middle
		ss3=14 
		tt3=60 
		uu3=27 
		vv3=29 
		ww3=60 
		xx3=24 
		yy3=1 
		zz3=90 
		aaa3=66 
		bbb3=17	
		ccc3=10 

	proc set_Mauthner0(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=0
	gkcnabar_kcna1=0
	gkcnab2bar_kcnab21=0
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 240
	idelta=1
	vm0 = -85
	}
	modelname = "Tonic firing/+DTX+XE991"
	}	
		
		
	proc set_Mauthner1(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=1400
	gkcnabar_kcna1=0
	gkcnab2bar_kcnab21=700
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 860
	idelta=1
	vm0 = -85
	}
	modelname = "4dpf M-cell"
	}
	
		proc set_Mauthner2(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=700
	gkcnabar_kcna1=150
	gkcnab2bar_kcnab21=0
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 400
	idelta=1
	vm0 = -85
	}
	modelname = "2dpf M-cell"
	}
	
	proc set_Mauthner3(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=0
	gkcnabar_kcna1=150
	gkcnab2bar_kcnab21=0
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 300
	idelta=1
	vm0 = -85
	}
	modelname = "2dpf M-cell +XE991"
	}	
	
		proc set_Mauthner4(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=700
	gkcnabar_kcna1=0
	gkcnab2bar_kcnab21=0
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 360
	idelta=1
	vm0 = -85
	}
	modelname = "2dpf M-cell +DTX"
	}	
	
		proc set_Mauthner5(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=0
	gkcnabar_kcna1=0
	gkcnab2bar_kcnab21=700
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 760
	idelta=1
	vm0 = -85
	}
	modelname = "4dpf M-cell +XE991"
	}	
	
			proc set_Mauthner6(){
soma{
	gnabar_na1=6000
	gkhtbar_kht1=1500
	gkabar_ka1=300
	g_leak1 =12
	gkcnqbar_kcnq1=1400
	gkcnabar_kcna1=0
	gkcnab2bar_kcnab21=0
	lstd=40
    soma.L=lstd
    soma.diam=lstd
    capcalL()
    capcalD()
	iint = 460
	idelta=1
	vm0 = -85
	}
	modelname = "4dpf M-cell +DTX"
	}