/* Dentage Gyrus Granule Cell model associated with the papers: 

J. Tejada, G.M. Arisi, N. Garcia-Cairasco, A.C. Roque, Morphological alterations in newly born dentate gyrus granule cells that emerge after status epilepticus contribute to make them less excitable, PLoS ONE. 7 (2012) e40726. doi:10.1371/journal.pone.0040726.

J. Tejada, N. Garcia-Cairasco, A.C. Roque, Combined role of seizure-induced dendritic morphology alterations and spine loss in newborn granule cells with mossy fiber sprouting on the hyperexcitability of a computer model of the dentate gyrus, PLoS Comput. Biol. 10 (2014) e1003601. doi:10.1371/journal.pcbi.1003601.

julian.tejada@gmail.com - 2014  */

//Defining granule cell

	begintemplate GranuleCell36

// Original name on neuroMorpho.org n36-r06-05-sl3.CNG.swc

ndend1=13

  
public  pre_list, connect_pre, subsets, is_art, is_connected
public  vbc2gc, vmc2gc, vhc2gc, vgc2bc, vbc2bc, vmc2bc, vhc2bc, vgc2mc, vbc2mc, vmc2mc, vhc2mc, vgc2hc, vmc2hc
public soma, dend
public all, gcldend, pdend, mdend/*, ddend*/

nst=10
	objectvar stim[nst]
double stimdur[nst], stimdel[nst], stimamp[nst]
public stim, stimdur, stimamp, stimdel
create soma, dend[ndend1]
objref syn, pre_list


proc init() {
	pre_list = new List()
	subsets()
	gctemp()
	synapse()
}
objref all, gcldend, pdend, mdend/*, ddend*/
proc subsets(){ local i
	objref all, gcldend, pdend, mdend/*, ddend*/
	all = new SectionList()
		soma all.append()
		for i=0, 12 dend[i] all.append()
// 		for i=0, 3 gcdend2 [i] all.append()

	gcldend  = new SectionList()
		dend[0] gcldend.append()

	pdend  = new SectionList()
		for i=1, 3   dend[i] pdend.append()
		for i=5, 6   dend[i] pdend.append()
	

	mdend  = new SectionList()
		dend[4] mdend.append()
		for i=7, 12  dend[i] mdend.append()


// 	ddend  = new SectionList()
// 		dend[12]  ddend.append()


}



proc gctemp() {

// 	soma {nseg=1 L=16.8 diam=16.8} // changed L & diam
	
/*	dend [0] {nseg=1  L=27.5855 diam=2.3784}
	dend [1] {nseg=1  L=3.90655 diam=1.546}
	dend [2] {nseg=1  L=49.90057 diam=1.048}
	dend [3] {nseg=1  L=58.66612 diam=1.2018}
	dend [4] {nseg=1  L=77.90403 diam=0.8822}
	dend [5] {nseg=1  L=65.45236 diam=0.7149}
	dend [6] {nseg=1  L=39.08021 diam=0.8525}
	dend [7] {nseg=1  L=28.99695 diam=0.6966}
	dend [8] {nseg=1  L=34.99227 diam=0.6848}
	dend [9] {nseg=1  L=42.50559 diam=0.6237}
	dend [10] {nseg=1 L=59.65832 diam=0.5661}
	dend [11] {nseg=1 L=87.08064 diam=0.6372}
	dend [12] {nseg=1 L=11.72373 diam=0.7863}
	dend [13] {nseg=1 L=78.56052 diam=0.5773}
	dend [14] {nseg=1 L=65.70179 diam=0.6466}
	dend [15] {nseg=1 L=135.75229 diam=0.6171}
	dend [16] {nseg=1 L=23.22847 diam=0.5976}
	dend [17] {nseg=1 L=54.47258 diam=0.6512}
	dend [18] {nseg=1 L=38.29144 diam=0.6966}
	dend [19] {nseg=1 L=42.69891 diam=0.5877}*/
	
	
// 	dend [20] {nseg=1 L=53.60330 diam=0.5795}
// 	for i = 1, 20	dend [i] {nseg=1 L=150 diam=3}

// 	gcdend2 [0] {nseg=1 L=50 diam=3}
// 	for i = 1, 3	gcdend2 [i] {nseg=1 L=150 diam=3}	 	

    
	forsec all {
		insert ccanl
	catau_ccanl = 10
	caiinf_ccanl = 0.000005
	Ra=210
	}

	soma {insert ichan2  //ildikos ichan
	gnatbar_ichan2=0.12  //original 0.030 to .055 
	gkfbar_ichan2=0.016  //original 0.015
	gksbar_ichan2=0.006
		insert borgka
	gkabar_borgka=0.012
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.002  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.005
		insert cat
	gcatbar_cat=0.000037
		insert gskch
	gskbar_gskch=0.001
		insert cagk
	gkbar_cagk=0.0006
	gl_ichan2 = 0.00004
	cm=1

} 

		forsec gcldend {insert ichan2
	gnatbar_ichan2=0.018  //original 0.015
	gkfbar_ichan2=0.004
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.003  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0075
		insert cat
	gcatbar_cat=0.000075
		insert gskch
	gskbar_gskch=0.0004
		insert cagk
	gkbar_cagk=0.0006
	gl_ichan2 = 0.00004
	cm=1}
		
		forsec pdend {insert ichan2
	gnatbar_ichan2=0.013 
	gkfbar_ichan2=0.004
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.001  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0075
		insert cat
	gcatbar_cat=0.00025
		insert gskch
	gskbar_gskch=0.0002
		insert cagk
	gkbar_cagk=0.001
	gl_ichan2 = 0.000063
	cm=1.0 
        insert pas 
      g_pas = 4e-05
	}
		
	 	forsec mdend {insert ichan2
	gnatbar_ichan2=0.008 
	gkfbar_ichan2=0.001
	gksbar_ichan2=0.006
		insert nca  // HAV-N- Ca channel
	gncabar_nca=0.001  // check to modify- original 0.004
		insert lca 
	glcabar_lca=0.0005
		insert cat
	gcatbar_cat=0.0005
		insert gskch
	gskbar_gskch=0.0
		insert cagk
	gkbar_cagk=0.0024
	gl_ichan2 = 0.000063

	cm=1.0 
        insert pas 
      g_pas = 4e-05}

// 		forsec ddend {insert ichan2
// 	gnatbar_ichan2=0.008 
// 	gkfbar_ichan2=0.001
// 	gksbar_ichan2=0.008
// 		insert nca  // HAV-N- Ca channel
// 	gncabar_nca=0.001  // check to modify- original 0.004
// 		insert lca 
// 	glcabar_lca=0.0
// 		insert cat
// 	gcatbar_cat=0.001
// 		insert gskch
// 	gskbar_gskch=0.0
// 		insert cagk
// 	gkbar_cagk=0.0024
// 	gl_ichan2 = 0.000063
// 	cm=1.0 
//         insert pas 
//       g_pas = 4e-05}
		
	
// 	connect dend[0](0), soma(1)
// 	connect gcdend2[0](0), soma(1)
// 	for i=1,3 {
// 	connect dend[i](0), dend[i-1](1)
// 	}
// 	for i=1,3 {
// 	connect gcdend2[i](0), gcdend2[i-1](1)
// 	}

  connect dend(0), soma(1)
  for i = 1, 2 connect dend[i](0), dend(1)
  for i = 3, 4 connect dend[i](0), dend[1](1)
  for i = 5, 6 connect dend[i](0), dend[2](1)
  for i = 7, 8 connect dend[i](0), dend[3](1)
  for i = 9, 10 connect dend[i](0), dend[5](1)
  for i = 11, 12 connect dend[i](0), dend[9](1)
// 	  connect /*axon*/(1), soma(0)
	  basic_shape()

	forsec all {enat = 45 ekf = -90 eks = -90  ek=-90  elca=130 etca=130	 esk=-90  el_ichan2 =-70  cao_ccanl=2 }  // make catau slower70e-3 	cao=2 cai=50.e-6 

// current injection
//for i=0,0 {
//stimdel[i]=500
//stimdur[i]=200
//stimamp[i]=0.2

//soma stim[i] = new IClamp(0.5)
//stim.del[i]=stimdel[i]
//stim.dur[i]=stimdur[i]
//stim.amp[i]=stimamp[i]
//}


		}
		
		
		
	proc connect_pre() {  // $o1 target point process, $o2 returned NetCon
	soma $o2 = new NetCon (&v(1), $o1)
	//alternative statement		$o1.soma pre_list.append(new NetCon(soma.v(1),syn,0,Delsyn,0))
	}
	
	
	
proc shape3d_1() {
//   axon {pt3dclear()
// 	pt3dadd(-0.06667, -38, 1.04, 0.2)
// 	pt3dadd(-0.06667, -18, 1.04, 10)
//   }
  soma {pt3dclear()
	pt3dadd(-0.06667, -18, 1.04, 10)
	pt3dadd(-0.06667, -0.5776, 1.03, 8.179)
  }
  dend {pt3dclear()
	pt3dadd(-0.06667, -0.5776, 1.03, 8.179)
	pt3dadd(-0.74, -6.81, 0.85, 4.55)
	pt3dadd(-0.55, -7.82, 0.85, 4.73)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(-0.06667, -0.5776, 1.03, 8.179)
// 	pt3dadd(2.6, 4.87, 0.21, 0.93)
// 	pt3dadd(2.69, 5.88, 0.21, 0.93)
// 	pt3dadd(2.78, 6.99, 1.43, 0.83)
// 	pt3dadd(3.34, 8, 1.43, 0.65)
// 	pt3dadd(4.17, 9.01, 1.43, 0.65)
// 	pt3dadd(5.01, 9.56, 1.43, 0.56)
// 	pt3dadd(5.94, 9.28, 1.43, 0.65)
// 	pt3dadd(6.96, 9.1, 1.43, 0.65)
// 	pt3dadd(7.24, 9.74, 0.94, 0.56)
// 	pt3dadd(7.79, 10.57, 0.94, 0.56)
// 	pt3dadd(8.81, 11.4, 1.11, 0.56)
// 	pt3dadd(9.18, 12.04, 1.11, 0.56)
// 	pt3dadd(9.55, 12.68, 1.11, 0.56)
// 	pt3dadd(10.13, 13.2, 1.27, 0.56)
// 	pt3dadd(10.96, 13.94, 0.88, 0.56)
// 	pt3dadd(11.24, 15.13, 0.69, 0.56)
// 	pt3dadd(12.17, 15.87, 0.9, 0.56)
// 	pt3dadd(13.19, 16.42, 1.09, 0.65)
// 	pt3dadd(13.93, 16.6, 0.52, 0.56)
// 	pt3dadd(14.77, 16.88, 0.52, 0.56)
// 	pt3dadd(15.41, 17.43, 0.96, 0.56)
// 	pt3dadd(16.34, 18.26, 0.96, 0.56)
// 	pt3dadd(17.18, 19.08, 1.12, 0.56)
// 	pt3dadd(17.27, 20.09, 1.12, 0.56)
// 	pt3dadd(17.55, 21.01, 1.49, 0.56)
// 	pt3dadd(18.01, 21.84, 1.49, 0.56)
// 	pt3dadd(18.2, 22.58, 1.49, 0.56)
// 	pt3dadd(18.94, 22.94, 1.49, 0.56)
// 	pt3dadd(19.96, 23.86, 1.49, 0.56)
// 	pt3dadd(20.33, 24.87, 1.02, 0.56)
// 	pt3dadd(21.17, 25.61, 1.17, 0.56)
// 	pt3dadd(21.63, 25.98, 1.74, 0.56)
// 	pt3dadd(22.28, 26.62, 1.74, 0.56)
// 	pt3dadd(22.73, 27.56, 1.29, 0.56)
// 	pt3dadd(23.38, 28.57, 1.08, 0.56)
// 	pt3dadd(23.75, 29.58, 0.79, 0.56)
// 	pt3dadd(23.94, 30.68, 1.45, 0.56)
// 	pt3dadd(24.5, 31.79, 1.45, 0.56)
// 	pt3dadd(24.77, 32.8, 1.52, 0.56)
// 	pt3dadd(25.15, 33.81, 1.52, 0.56)
// 	pt3dadd(25.61, 34.45, 1.52, 0.56)
// 	pt3dadd(26.07, 34.82, 1.52, 0.56)
// 	pt3dadd(26.35, 35.1, 2.01, 0.65)
// 	pt3dadd(26.26, 36.2, 2.01, 0.65)
// 	pt3dadd(26.54, 36.66, 2.46, 0.74)
// 	pt3dadd(26.91, 37.3, 2.46, 0.56)
// 	pt3dadd(27.84, 37.67, 2.46, 0.56)
// 	pt3dadd(28.76, 38.59, 1.94, 0.56)
// 	pt3dadd(29.51, 39.69, 1.94, 0.56)
// 	pt3dadd(29.78, 40.52, 2.61, 0.56)
// 	pt3dadd(30.25, 41.35, 2.61, 0.56)
// 	pt3dadd(30.54, 42.44, 2.96, 0.56)
// 	pt3dadd(30.91, 43.45, 2.23, 0.56)
// 	pt3dadd(31.47, 44.55, 2.21, 0.56)
// 	pt3dadd(32.12, 45.1, 2.21, 0.56)
// 	pt3dadd(32.86, 45.84, 2.21, 0.56)
// 	pt3dadd(33.05, 46.48, 1.94, 0.56)
// 	pt3dadd(33.23, 47.31, 1.94, 0.56)
// 	pt3dadd(33.7, 47.86, 1.77, 0.74)
// 	pt3dadd(34.25, 48.32, 2.51, 0.56)
// 	pt3dadd(34.99, 48.78, 2.51, 0.56)
// 	pt3dadd(35.37, 49.6, 3.36, 0.56)
// 	pt3dadd(35.46, 50.52, 3.75, 0.65)
// 	pt3dadd(35.83, 51.53, 3.75, 0.74)
// 	pt3dadd(36.11, 52.45, 2.99, 0.65)
// 	pt3dadd(36.48, 53.37, 2.99, 0.65)
// 	pt3dadd(36.48, 54.02, 3.78, 0.65)
// 	pt3dadd(36.48, 54.75, 4.02, 0.83)
//   }
  dend[1] {pt3dclear()
	pt3dadd(-0.55, -7.82, 0.85, 4.73)
	pt3dadd(-2.72, -9.06, 1.54, 1.67)
	pt3dadd(-3.83, -10.44, 1.54, 1.3)
	pt3dadd(-4.58, -11.91, 0.9, 1.11)
	pt3dadd(-5.13, -13.11, 0.9, 1.11)
	pt3dadd(-5.5, -14.12, 1.31, 1.11)
	pt3dadd(-6.06, -15.5, 1.31, 1.11)
	pt3dadd(-6.52, -16.23, 1.55, 0.93)
	pt3dadd(-6.89, -16.88, 1.55, 0.93)
	pt3dadd(-7.08, -17.24, 1.14, 0.93)
  }
  dend[2] {pt3dclear()
	pt3dadd(-0.55, -7.82, 0.85, 4.73)
	pt3dadd(1.49, -9.2, 0.85, 2.23)
	pt3dadd(3.16, -10.12, 0.85, 1.95)
	pt3dadd(4.08, -10.76, 1.16, 1.95)
	pt3dadd(5.29, -11.5, 1.28, 2.13)
	pt3dadd(6.96, -12.32, 2.13, 2.13)
	pt3dadd(8.26, -12.97, 1.07, 2.13)
	pt3dadd(9.28, -13.24, 2.25, 2.13)
	pt3dadd(10.3, -13.52, 2.25, 1.86)
	pt3dadd(12.07, -13.81, 1.82, 1.76)
	pt3dadd(13.09, -14.27, 2.02, 1.76)
	pt3dadd(14.3, -15.65, 2.77, 1.76)
	pt3dadd(14.85, -17.21, 1.71, 1.76)
	pt3dadd(15.04, -18.5, 1.71, 1.86)
	pt3dadd(15.5, -20.98, 3.12, 1.76)
	pt3dadd(15.5, -22.08, 2.55, 1.67)
  }
//   dendrite[1] {pt3dclear()
// 	pt3dadd(36.48, 54.75, 4.02, 0.83)
// 	pt3dadd(36.9, 55.31, 4.02, 0.65)
// 	pt3dadd(37.36, 55.95, 3.71, 0.65)
// 	pt3dadd(38.47, 56.87, 4.31, 0.65)
// 	pt3dadd(39.12, 57.79, 3.68, 0.65)
// 	pt3dadd(40.05, 58.52, 3.68, 0.65)
// 	pt3dadd(41.17, 58.89, 3.33, 0.56)
// 	pt3dadd(42.28, 58.89, 3.22, 0.56)
// 	pt3dadd(43.3, 58.89, 2.8, 0.56)
// 	pt3dadd(44.04, 59.17, 3.09, 0.56)
// 	pt3dadd(44.32, 59.63, 3.09, 0.56)
//   }
//   dendrite[2] {pt3dclear()
// 	pt3dadd(36.48, 54.75, 4.02, 0.83)
// 	pt3dadd(35.92, 55.3, 4.02, 0.65)
// 	pt3dadd(35.92, 56.13, 4.01, 0.65)
// 	pt3dadd(35.88, 56.32, 2.47, 0.65)
// 	pt3dadd(35.88, 57.24, 2.47, 0.65)
// 	pt3dadd(35.41, 58.06, 3.46, 0.65)
// 	pt3dadd(34.86, 59.53, 3.8, 0.65)
// 	pt3dadd(34.76, 60.27, 3.74, 0.65)
// 	pt3dadd(34.02, 61.19, 3.74, 0.65)
// 	pt3dadd(33.19, 62.01, 3.09, 0.65)
// 	pt3dadd(32.35, 62.84, 3.09, 0.65)
// 	pt3dadd(32.07, 63.76, 3.53, 0.65)
// 	pt3dadd(31.52, 64.4, 3.5, 0.65)
// 	pt3dadd(31.52, 65.05, 3.49, 0.65)
//   }
  dend[3] {pt3dclear()
	pt3dadd(-7.08, -17.24, 1.14, 0.93)
	pt3dadd(-7.3, -18.18, 1.72, 0.74)
	pt3dadd(-7.86, -19.37, 1.76, 0.74)
	pt3dadd(-8.32, -20.11, 1.76, 0.74)
	pt3dadd(-9.25, -20.75, 1.8, 0.65)
	pt3dadd(-9.9, -21.21, 1.8, 0.65)
	pt3dadd(-10.27, -22.04, 2.42, 0.65)
  }
  dend[4] {pt3dclear()
	pt3dadd(-7.08, -17.24, 1.14, 0.93)
	pt3dadd(-8.01, -17.61, 1.48, 0.93)
	pt3dadd(-8.84, -17.89, 0.93, 0.93)
	pt3dadd(-9.96, -18.16, 1.57, 0.83)
	pt3dadd(-11.35, -18.16, 0.91, 0.74)
	pt3dadd(-12.55, -18.07, 2.12, 0.74)
	pt3dadd(-13.76, -17.98, 0.96, 0.65)
	pt3dadd(-14.59, -18.25, 1.52, 0.65)
	pt3dadd(-15.52, -18.62, 1.73, 0.65)
	pt3dadd(-16.73, -19.08, 2.24, 0.65)
	pt3dadd(-18.21, -19.91, 1.8, 0.65)
	pt3dadd(-18.86, -20.64, 1.13, 0.65)
	pt3dadd(-19.88, -21.56, 1.66, 0.65)
	pt3dadd(-20.99, -22.48, 2.19, 0.65)
	pt3dadd(-22.39, -22.85, 2.46, 0.65)
	pt3dadd(-23.5, -22.85, 2.71, 0.74)
	pt3dadd(-24.7, -23.13, 2.39, 0.74)
	pt3dadd(-25.08, -23.03, 2.71, 0.74)
	pt3dadd(-26.19, -22.94, 2.43, 0.74)
	pt3dadd(-27.48, -22.94, 2.42, 0.74)
	pt3dadd(-29.15, -22.94, 2.53, 0.74)
	pt3dadd(-31.01, -22.94, 3.11, 0.74)
	pt3dadd(-32.4, -23.12, 3.28, 0.74)
	pt3dadd(-33.61, -23.49, 3.04, 0.74)
	pt3dadd(-34.53, -24.13, 3.04, 0.74)
	pt3dadd(-35.56, -24.59, 3.7, 0.65)
	pt3dadd(-36.76, -24.59, 3.5, 0.65)
	pt3dadd(-38.34, -24.77, 3.61, 0.65)
	pt3dadd(-39.82, -25.23, 3.61, 0.65)
	pt3dadd(-41.31, -25.51, 3.46, 0.65)
	pt3dadd(-42.98, -25.6, 4.34, 0.65)
	pt3dadd(-44.46, -25.6, 4.47, 0.65)
	pt3dadd(-45.39, -25.97, 4.99, 0.65)
	pt3dadd(-46.22, -26.52, 3.48, 0.65)
	pt3dadd(-47.15, -26.98, 2.95, 0.65)
	pt3dadd(-48.26, -27.44, 2.95, 0.65)
	pt3dadd(-49.19, -27.71, 3.55, 0.56)
	pt3dadd(-50.12, -28.08, 3.56, 0.56)
	pt3dadd(-50.77, -28.36, 3.09, 0.56)
	pt3dadd(-51.6, -28.63, 3.09, 0.56)
	pt3dadd(-52.23, -28.83, 2.75, 0.56)
	pt3dadd(-53.06, -29.38, 3.32, 0.56)
	pt3dadd(-53.9, -29.65, 3.32, 0.56)
  }
  dend[5] {pt3dclear()
	pt3dadd(15.5, -22.08, 2.55, 1.67)
	pt3dadd(15.32, -23.74, 3.12, 1.11)
	pt3dadd(15.22, -25.39, 1.81, 1.11)
	pt3dadd(15.13, -26.4, 1.85, 1.39)
	pt3dadd(15.41, -27.87, 2.7, 1.39)
	pt3dadd(15.97, -28.79, 0.85, 1.58)
  }
  dend[6] {pt3dclear()
	pt3dadd(15.5, -22.08, 2.55, 1.67)
	pt3dadd(16.43, -23.46, 1.62, 0.93)
	pt3dadd(16.61, -23.92, 1.62, 0.93)
	pt3dadd(17.73, -23.83, 2.07, 0.83)
	pt3dadd(18.38, -23.46, 1.09, 0.74)
	pt3dadd(18.75, -23.09, 1.09, 0.74)
	pt3dadd(19.3, -22.82, 1.09, 0.74)
	pt3dadd(20.05, -22.73, 0.48, 0.74)
	pt3dadd(20.6, -22.82, 0.48, 0.74)
	pt3dadd(21.35, -23.46, 1.5, 0.65)
	pt3dadd(22.09, -24.11, 1.5, 0.65)
	pt3dadd(22.46, -24.66, 0.58, 0.65)
	pt3dadd(22.74, -25.21, 0.58, 0.65)
	pt3dadd(22.92, -26.5, 0.58, 0.65)
  }
  dend[7] {pt3dclear()
	pt3dadd(-10.27, -22.04, 2.42, 0.65)
	pt3dadd(-9.83, -23.17, 2.42, 0.56)
	pt3dadd(-10.2, -23.91, 2.1, 0.56)
	pt3dadd(-10.85, -24.83, 1.6, 0.56)
	pt3dadd(-11.22, -25.56, 1.6, 0.56)
  }
}
proc shape3d_2() {
  dend[7] {	pt3dadd(-11.59, -26.85, 2.47, 0.56)
	pt3dadd(-12.24, -28.59, 2.32, 0.56)
	pt3dadd(-12.61, -29.42, 3.15, 0.56)
	pt3dadd(-13.45, -30.89, 3.44, 0.56)
	pt3dadd(-13.63, -31.81, 2.65, 0.65)
	pt3dadd(-14.28, -32.82, 2.65, 0.65)
	pt3dadd(-15.02, -33.65, 2.65, 0.65)
	pt3dadd(-15.67, -34.75, 2.65, 0.65)
	pt3dadd(-16.6, -35.67, 3.62, 0.56)
	pt3dadd(-17.53, -36.77, 3.62, 0.56)
	pt3dadd(-17.81, -37.69, 3.1, 0.56)
	pt3dadd(-17.71, -38.61, 3.19, 0.93)
	pt3dadd(-17.99, -39.44, 3.19, 0.93)
	pt3dadd(-18.36, -40.27, 3.39, 0.74)
	pt3dadd(-18.73, -41.09, 3.39, 0.74)
	pt3dadd(-18.43, -42.14, 3.39, 0.74)
	pt3dadd(-18.24, -43.43, 3.32, 0.74)
	pt3dadd(-18.43, -44.8, 3.97, 0.74)
	pt3dadd(-18.71, -45.81, 3.01, 0.74)
	pt3dadd(-19.17, -47.1, 2.71, 0.74)
	pt3dadd(-19.73, -47.84, 2.5, 0.65)
	pt3dadd(-19.73, -48.85, 2.63, 0.65)
	pt3dadd(-20.01, -49.77, 2.46, 0.65)
	pt3dadd(-20.38, -50.5, 2.73, 0.65)
	pt3dadd(-20.75, -51.24, 2.73, 0.65)
	pt3dadd(-21.21, -52.16, 1.63, 0.65)
	pt3dadd(-21.86, -52.98, 1.61, 0.65)
	pt3dadd(-22.33, -53.81, 1.61, 0.65)
	pt3dadd(-23.07, -54.27, 1.61, 0.65)
	pt3dadd(-23.16, -54.82, 1.6, 0.56)
	pt3dadd(-23.62, -55.37, 1.07, 0.56)
	pt3dadd(-24.46, -56.29, 1.07, 0.56)
	pt3dadd(-25.29, -56.75, 0.72, 0.56)
	pt3dadd(-25.94, -57.03, 0.72, 0.56)
	pt3dadd(-26.22, -57.76, 1.29, 0.56)
	pt3dadd(-27.06, -58.32, 1.08, 0.65)
	pt3dadd(-27.71, -58.59, 1.08, 0.65)
	pt3dadd(-28.26, -58.87, 1.08, 0.65)
	pt3dadd(-28.82, -59.51, 1.08, 0.65)
	pt3dadd(-29.63, -59.72, 1.08, 0.74)
	pt3dadd(-30.18, -60.55, 1.92, 0.74)
	pt3dadd(-30.46, -61.28, 1.26, 0.74)
	pt3dadd(-30.83, -62.29, 1.26, 0.74)
	pt3dadd(-31.21, -63.21, 0.79, 0.74)
	pt3dadd(-31.76, -63.95, 0.13, 0.74)
	pt3dadd(-32.32, -64.59, 1.24, 0.74)
	pt3dadd(-33.25, -65.23, 0.36, 0.74)
	pt3dadd(-33.71, -65.79, 0.54, 0.74)
	pt3dadd(-34.17, -66.34, 0.19, 0.74)
	pt3dadd(-34.54, -66.43, -0.14, 0.74)
	pt3dadd(-34.64, -66.8, -0.14, 0.74)
  }
  dend[8] {pt3dclear()
	pt3dadd(-10.27, -22.04, 2.42, 0.65)
	pt3dadd(-10.73, -22.68, 1.98, 0.56)
	pt3dadd(-11.48, -23.6, 1.32, 0.56)
	pt3dadd(-12.31, -24.7, 2.07, 0.56)
	pt3dadd(-12.87, -25.62, 2.33, 0.56)
	pt3dadd(-13.42, -26.54, 2.31, 0.56)
	pt3dadd(-14.07, -27.83, 2.58, 0.56)
	pt3dadd(-14.44, -28.47, 2.66, 0.56)
	pt3dadd(-14.81, -28.93, 2.36, 0.56)
	pt3dadd(-15.19, -29.76, 3.32, 0.56)
	pt3dadd(-15.83, -30.5, 3.78, 0.56)
	pt3dadd(-16.46, -31.46, 3.76, 0.56)
	pt3dadd(-17.57, -32.37, 4.41, 0.56)
	pt3dadd(-18.5, -33.48, 4.69, 0.56)
	pt3dadd(-19.42, -34.86, 4.97, 0.56)
	pt3dadd(-20.17, -35.41, 4.39, 0.56)
	pt3dadd(-21.19, -36.6, 5.37, 0.56)
	pt3dadd(-21.84, -37.8, 4.65, 0.56)
	pt3dadd(-22.67, -39.08, 5.07, 0.56)
	pt3dadd(-23.32, -39.91, 5.07, 0.56)
	pt3dadd(-23.88, -40.65, 4.49, 0.56)
	pt3dadd(-24.62, -41.75, 5.02, 0.56)
	pt3dadd(-25.45, -42.85, 4.5, 0.56)
	pt3dadd(-26.47, -43.68, 4.21, 0.56)
	pt3dadd(-27.31, -45.15, 4.54, 0.56)
	pt3dadd(-27.87, -46.07, 4.81, 0.56)
	pt3dadd(-28.14, -47.17, 4.81, 0.56)
	pt3dadd(-28.51, -47.91, 4.45, 0.56)
	pt3dadd(-28.89, -48.92, 4.39, 0.56)
	pt3dadd(-29.26, -50.02, 4.27, 0.56)
	pt3dadd(-29.63, -51.03, 4.27, 0.56)
	pt3dadd(-29.91, -52.04, 4.49, 0.56)
	pt3dadd(-30.09, -52.96, 4.87, 0.56)
	pt3dadd(-30.46, -53.79, 5.51, 0.56)
	pt3dadd(-30.83, -54.34, 5.87, 0.56)
	pt3dadd(-31.02, -54.99, 5.87, 0.56)
	pt3dadd(-31.36, -56.13, 5.93, 0.56)
	pt3dadd(-31.54, -57.05, 6.35, 0.56)
	pt3dadd(-32.1, -57.97, 5.41, 0.56)
	pt3dadd(-32.84, -58.89, 5.14, 0.56)
	pt3dadd(-33.49, -59.53, 5, 0.56)
	pt3dadd(-34.14, -60.36, 4.87, 0.56)
	pt3dadd(-34.6, -60.82, 4.87, 0.56)
	pt3dadd(-34.98, -61.55, 4.86, 0.56)
	pt3dadd(-35.53, -62.47, 4.97, 0.56)
	pt3dadd(-36.27, -63.48, 4.97, 0.56)
	pt3dadd(-36.74, -64.22, 4.97, 0.56)
	pt3dadd(-37.39, -64.95, 4.82, 0.56)
	pt3dadd(-38.13, -65.87, 4.76, 0.56)
	pt3dadd(-38.59, -66.15, 4.5, 0.56)
	pt3dadd(-39.06, -67.07, 4.5, 0.56)
	pt3dadd(-39.43, -67.62, 4.5, 0.56)
	pt3dadd(-39.98, -68.17, 4.15, 0.56)
	pt3dadd(-40.54, -69, 4.15, 0.56)
	pt3dadd(-40.91, -69.46, 4.93, 0.56)
	pt3dadd(-41.1, -70.19, 4.93, 0.56)
	pt3dadd(-41.56, -71.02, 4.84, 0.56)
	pt3dadd(-42.3, -71.94, 4.84, 0.56)
	pt3dadd(-42.67, -72.49, 4.78, 0.56)
	pt3dadd(-43.05, -72.86, 4.66, 0.56)
	pt3dadd(-43.51, -73.69, 4.66, 0.56)
	pt3dadd(-43.69, -74.49, 4.92, 0.56)
	pt3dadd(-44.16, -75.6, 4.92, 0.56)
  }
  dend[9] {pt3dclear()
	pt3dadd(15.97, -28.79, 0.85, 1.58)
	pt3dadd(15.73, -30.23, 0.92, 1.11)
	pt3dadd(15.64, -31.7, 1.42, 1.11)
	pt3dadd(16.01, -32.71, 2, 1.11)
	pt3dadd(16.01, -33.81, 2.42, 0.93)
	pt3dadd(15.73, -35.19, 2.43, 1.11)
	pt3dadd(15.73, -36.3, 2.43, 0.93)
	pt3dadd(16.01, -37.4, 1.97, 0.93)
	pt3dadd(16.01, -38.69, 1.81, 0.83)
	pt3dadd(16.28, -39.61, 2.04, 0.83)
	pt3dadd(16.47, -40.8, 2.33, 0.74)
	pt3dadd(16.84, -41.9, 2.33, 0.74)
	pt3dadd(16.93, -43.01, 1.57, 0.74)
	pt3dadd(17.31, -44.11, 1.07, 0.74)
	pt3dadd(17.49, -44.94, 1.07, 0.74)
	pt3dadd(17.77, -46.04, 0.86, 0.74)
	pt3dadd(17.86, -47.05, 0.86, 0.83)
	pt3dadd(18.05, -47.79, 0.86, 0.83)
	pt3dadd(18.35, -48.56, 1.19, 0.74)
	pt3dadd(18.53, -49.57, 1.45, 0.74)
	pt3dadd(18.72, -50.31, 0.74, 0.74)
	pt3dadd(18.81, -51.04, 1.24, 0.74)
	pt3dadd(19, -51.78, 1.29, 0.74)
	pt3dadd(19.18, -52.61, 1.29, 0.93)
  }
  dend[10] {pt3dclear()
	pt3dadd(15.97, -28.79, 0.85, 1.58)
	pt3dadd(17.54, -28.98, 0.85, 0.93)
	pt3dadd(18.84, -29.25, 1.81, 0.93)
	pt3dadd(19.68, -29.16, 1.81, 0.74)
	pt3dadd(20.42, -28.52, 1.81, 0.74)
	pt3dadd(21.25, -28.24, 1.14, 0.74)
	pt3dadd(22.55, -28.33, 2.27, 0.74)
	pt3dadd(22.64, -28.98, 2.27, 0.74)
	pt3dadd(23.02, -29.62, 1.88, 0.74)
	pt3dadd(23.57, -29.9, 1.88, 0.74)
	pt3dadd(24.13, -30.85, 2.81, 0.74)
	pt3dadd(24.68, -32.04, 3.3, 1.02)
	pt3dadd(24.78, -33.05, 3.3, 1.02)
	pt3dadd(25.15, -34.34, 2.31, 0.83)
	pt3dadd(25.52, -35.63, 2.31, 0.74)
	pt3dadd(25.89, -36.82, 2.91, 0.65)
	pt3dadd(26.45, -37.83, 2.91, 0.65)
	pt3dadd(27.28, -38.48, 3.53, 0.65)
	pt3dadd(28.21, -39.21, 3, 0.65)
	pt3dadd(29.41, -39.85, 2.76, 0.65)
	pt3dadd(30.53, -40.96, 3.52, 0.65)
	pt3dadd(30.99, -41.6, 3.8, 0.74)
	pt3dadd(31.92, -42.24, 2.84, 0.74)
	pt3dadd(32.85, -42.8, 2.96, 0.74)
	pt3dadd(33.5, -43.16, 2.96, 0.83)
	pt3dadd(34.61, -43.35, 2.96, 0.74)
	pt3dadd(35.63, -43.62, 3.34, 0.74)
	pt3dadd(36.46, -43.62, 3.45, 0.83)
	pt3dadd(37.79, -43.45, 3.58, 0.65)
	pt3dadd(38.72, -43.64, 4.38, 0.56)
	pt3dadd(39.46, -43.64, 4.38, 0.56)
	pt3dadd(40.48, -44, 4.38, 0.56)
	pt3dadd(40.67, -45.11, 4.65, 0.56)
	pt3dadd(41.22, -45.93, 3.66, 0.56)
	pt3dadd(42.06, -46.48, 3.22, 0.65)
	pt3dadd(42.8, -46.85, 3.22, 0.65)
	pt3dadd(43.82, -47.4, 2.98, 0.65)
	pt3dadd(44.75, -47.68, 3.62, 0.65)
	pt3dadd(45.77, -48.14, 3.62, 0.65)
	pt3dadd(45.95, -48.51, 3.62, 0.65)
  }
  dend[11] {pt3dclear()
	pt3dadd(19.18, -52.61, 1.29, 0.93)
	pt3dadd(19.68, -54.04, 1.16, 0.65)
	pt3dadd(19.86, -55.6, 0.7, 0.65)
	pt3dadd(20.14, -56.89, 0.7, 0.65)
	pt3dadd(19.86, -57.71, 0.9, 0.56)
	pt3dadd(20.14, -58.73, 1.62, 0.56)
	pt3dadd(20.79, -59.65, 1.35, 0.65)
	pt3dadd(21.25, -60.38, 1.35, 0.65)
	pt3dadd(21.63, -60.93, 0.74, 0.65)
	pt3dadd(22.18, -61.12, 0.95, 0.65)
	pt3dadd(22.83, -61.85, 1.33, 0.65)
	pt3dadd(23.57, -63.05, 0.69, 0.65)
	pt3dadd(24.32, -63.78, 0.28, 0.65)
	pt3dadd(24.97, -64.7, 0.28, 0.65)
  }
  dend[12] {pt3dclear()
	pt3dadd(19.18, -52.61, 1.29, 0.93)
	pt3dadd(18.81, -53.89, 1.29, 0.56)
	pt3dadd(18.63, -54.9, 1.79, 0.56)
	pt3dadd(18.63, -56.38, 1.27, 0.56)
	pt3dadd(18.81, -57.66, 2.34, 0.56)
	pt3dadd(19, -59.13, 2.55, 0.56)
	pt3dadd(18.63, -60.24, 3.15, 0.56)
	pt3dadd(18.81, -61.34, 3.57, 0.56)
  }
}
proc shape3d_3() {
  dend[12] {	pt3dadd(19.55, -62.07, 2.78, 0.56)
	pt3dadd(19.28, -63.27, 2.78, 0.56)
	pt3dadd(19.37, -64.56, 2.63, 0.56)
	pt3dadd(19.37, -65.75, 2.6, 0.56)
	pt3dadd(19.65, -66.76, 2.68, 0.56)
	pt3dadd(20.23, -67.47, 2.68, 0.56)
	pt3dadd(20.78, -68.67, 2.49, 0.65)
	pt3dadd(21.53, -69.31, 2.49, 0.65)
	pt3dadd(22.08, -70.23, 2.81, 0.56)
	pt3dadd(22.82, -71.06, 2.81, 0.56)
	pt3dadd(23.57, -71.97, 2.86, 0.56)
	pt3dadd(24.22, -72.89, 2.48, 0.56)
	pt3dadd(24.68, -74, 2.34, 0.56)
	pt3dadd(24.77, -75.65, 2.34, 0.56)
	pt3dadd(25.14, -76.75, 2.62, 0.56)
	pt3dadd(26.07, -78.04, 2.62, 0.56)
	pt3dadd(27.28, -79.14, 2.8, 0.56)
	pt3dadd(28.3, -79.6, 2.6, 0.56)
	pt3dadd(28.76, -80.15, 2.57, 0.65)
	pt3dadd(29.32, -81.17, 2.67, 0.56)
	pt3dadd(30.34, -82.27, 2.27, 0.56)
	pt3dadd(31.27, -83.65, 3.19, 0.56)
	pt3dadd(31.82, -84.57, 2.56, 0.56)
	pt3dadd(32.19, -85.39, 2.4, 0.56)
	pt3dadd(32.46, -86.35, 3.25, 0.56)
	pt3dadd(32.73, -87.45, 2.99, 0.56)
	pt3dadd(33.29, -88.18, 2.99, 0.46)
	pt3dadd(33.75, -89.29, 2.28, 0.46)
	pt3dadd(34.13, -90.21, 2.03, 0.46)
	pt3dadd(34.4, -91.31, 2.63, 0.46)
	pt3dadd(34.5, -92.32, 2.63, 0.46)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
  shape3d_3()
}




	objref syn
	objref ProximalSynapses 
	objref ProximalSynapsePositions 
	proc synapse() { 
  
 // //***** PP syn   
 
 
 // //***** MC syn   
 
ProximalSynapses = new Vector(0,0) 
ProximalSynapses .append(0 ,  1  , 2 ,  3  , 4 ,  5  , 6 ,  7 ,  8 ,  9 , 10) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5     ,    0.5   ,      0.5    ,     0.5 ,    0.29231   ,      0.5  ,       0.5    , 0.21539  ,   0.18663  ,   0.18709,      0.1069) 
for i= 0 , 10 { 
dend[ProximalSynapses .x[i]] syn = new Exp2Syn(ProximalSynapsePositions .x[i]) // // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // #  
} 
 
 // //***** HIPP   
 
 
 // //***** BC syn   
 
soma syn = new Exp2Syn(0.5) // BC  syn syn based on Bartos 
syn.tau1 = 0.26	syn.tau2 = 5.5	syn.e = -70 
pre_list.append(syn) // # 0 
 
 // //***** Sprout   
 
for i= 0 , 10 { 
dend[ProximalSynapses .x[i]] syn = new Exp2Syn(ProximalSynapsePositions .x[i]) // // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 0 
} 

}
	func is_art() { return 0 }

	endtemplate GranuleCell36