/* 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 GranuleCell22


// Original name on neuroMorpho.org n22-r06-04-sl4.CNG.swc

ndend1=18

  
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, 17 dend [i] all.append()
// 		for i=0, 3 gcdend2 [i] all.append()

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

	pdend  = new SectionList()
		for i=2, 3   dend[i] pdend.append()
		dend[8] pdend.append()
		for i=10, 11   dend[i] pdend.append()
		for i=13, 14   dend[i] pdend.append()
		
		  
		  
		

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


	ddend  = new SectionList()
		dend[16]  ddend.append()
// 		for i=19, 20 dend [i] 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)
// 	}

  for i = 0, 1 connect dend[i](0), soma(1)
  for i = 2, 3 connect dend[i](0), dend(1)
  for i = 4, 5 connect dend[i](0), dend[1](1)
  for i = 6, 7 connect dend[i](0), dend[2](1)
  for i = 8, 9 connect dend[i](0), dend[3](1)
  for i = 10, 11 connect dend[i](0), dend[8](1)
  for i = 12, 13 connect dend[i](0), dend[10](1)
  for i = 14, 15 connect dend[i](0), dend[13](1)
  for i = 16, 17 connect dend[i](0), dend[14](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(1.143, -38, 0.01789, 0.2)
// 	pt3dadd(1.143, -18, 0.01789, 10)
//   }
  
  soma {pt3dclear()
	pt3dadd(1.143, -18, 0.01789, 10)
	pt3dadd(1.143, -0.2963, 0.007895, 10.62)
  }
  dend {pt3dclear()
	pt3dadd(1.143, -0.2963, 0.007895, 10.62)
	pt3dadd(-0.73, -5.98, -0.74, 4.17)
	pt3dadd(-0.18, -7.17, 0.16, 3.71)
	pt3dadd(0.38, -8.55, -0.49, 3.34)
	pt3dadd(1.12, -9.93, -0.49, 2.5)
	pt3dadd(1.86, -11.58, -1.06, 2.32)
	pt3dadd(2.79, -12.5, -1.38, 2.04)
	pt3dadd(3.44, -13.24, -0.57, 1.76)
	pt3dadd(4, -14.25, -0.57, 1.67)
	pt3dadd(5.13, -15.08, 0.06, 1.39)
	pt3dadd(6.06, -15.99, -1.03, 1.76)
	pt3dadd(6.71, -16.45, -1.04, 2.13)
  }
  dend[1] {pt3dclear()
	pt3dadd(1.143, -0.2963, 0.007895, 10.62)
	pt3dadd(7.72, 4.01, 0.57, 1.21)
	pt3dadd(9.3, 3.74, 0.57, 0.93)
	pt3dadd(10.32, 3.37, 0.61, 0.83)
	pt3dadd(11.06, 3.18, 0.89, 0.83)
	pt3dadd(12.08, 3, 1.48, 1.02)
	pt3dadd(12.73, 2.63, 0.05, 1.02)
	pt3dadd(13.66, 1.81, -0.35, 0.93)
	pt3dadd(14.7, 0.92, -0.49, 0.93)
	pt3dadd(15.53, 0.19, -0.06, 0.83)
	pt3dadd(16.27, -0.64, -0.67, 0.74)
	pt3dadd(17.3, -1.74, -0.15, 0.74)
	pt3dadd(18.22, -2.84, -0.37, 0.74)
	pt3dadd(19.24, -3.67, -0.37, 0.74)
	pt3dadd(19.89, -4.77, -0.55, 0.74)
	pt3dadd(20.45, -5.88, -0.19, 0.74)
	pt3dadd(21.19, -6.89, -0.38, 0.74)
	pt3dadd(21.47, -7.53, -0.9, 0.74)
	pt3dadd(21.84, -8.54, -0.9, 0.65)
	pt3dadd(22.77, -9.65, -0.53, 0.65)
	pt3dadd(23.14, -10.93, -0.47, 0.65)
	pt3dadd(23.79, -12.13, -0.34, 0.74)
	pt3dadd(24.44, -13.69, -0.8, 0.74)
	pt3dadd(24.81, -14.7, -1.42, 0.74)
	pt3dadd(25.09, -15.53, -0.75, 0.74)
	pt3dadd(25.64, -16.36, -1.1, 0.74)
	pt3dadd(25.88, -17.24, -0.26, 0.74)
	pt3dadd(26.72, -18.62, -1.05, 0.74)
	pt3dadd(27.55, -20.09, -0.72, 0.74)
	pt3dadd(28.57, -21.66, -1.74, 0.74)
	pt3dadd(29.22, -22.39, -1.6, 0.74)
	pt3dadd(30.15, -23.86, -1.75, 0.74)
	pt3dadd(30.71, -24.69, -2.16, 0.65)
	pt3dadd(31.45, -25.7, -1.96, 0.65)
	pt3dadd(32.56, -26.89, -1.59, 0.65)
	pt3dadd(33.49, -27.54, -1.96, 0.65)
	pt3dadd(34.23, -28.37, -1.96, 0.56)
	pt3dadd(34.98, -29.19, -2.33, 0.56)
	pt3dadd(35.53, -29.84, -2.24, 0.65)
	pt3dadd(35.72, -30.57, -2.61, 0.65)
	pt3dadd(36.55, -31.21, -2.34, 0.65)
	pt3dadd(37.48, -31.95, -2.74, 0.65)
	pt3dadd(38.13, -32.5, -2.82, 0.65)
	pt3dadd(38.87, -33.33, -2.82, 0.65)
	pt3dadd(39.73, -33.98, -1.92, 0.65)
	pt3dadd(40.47, -34.99, -2.28, 0.65)
	pt3dadd(41.49, -35.91, -2.62, 0.65)
	pt3dadd(42.42, -36.64, -2.47, 0.56)
	pt3dadd(43.9, -37.65, -2.65, 0.56)
	pt3dadd(44.83, -38.85, -2.65, 0.56)
	pt3dadd(46.41, -39.58, -2.89, 0.56)
	pt3dadd(47.15, -40.41, -3.51, 0.56)
	pt3dadd(48.35, -41.6, -3.52, 0.56)
	pt3dadd(49.65, -42.16, -4.16, 0.56)
	pt3dadd(50.58, -43.44, -3.58, 0.56)
	pt3dadd(51.23, -44.18, -4.12, 0.56)
	pt3dadd(52.16, -45.01, -4.12, 0.56)
	pt3dadd(53.1, -45.67, -2.95, 0.56)
	pt3dadd(54.4, -46.59, -4.09, 0.56)
	pt3dadd(55.6, -47.69, -4.5, 0.56)
	pt3dadd(56.34, -48.43, -3.38, 0.56)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(1.143, -0.2963, 0.007895, 10.62)
// 	pt3dadd(7.22, 5.45, 0.52, 1.48)
// 	pt3dadd(8.43, 6.28, 0.5, 1.3)
// 	pt3dadd(9.45, 7.1, 0.73, 1.3)
// 	pt3dadd(10.28, 7.66, 0, 1.21)
//   }
//   dendrite[1] {pt3dclear()
// 	pt3dadd(1.143, -0.2963, 0.007895, 10.62)
// 	pt3dadd(-4.17, -2.94, -0.57, 1.11)
// 	pt3dadd(-4.92, -2.85, -0.99, 0.74)
// 	pt3dadd(-5.84, -2.67, -0.45, 0.74)
// 	pt3dadd(-7.14, -2.39, -0.88, 0.74)
// 	pt3dadd(-8.26, -2.02, -0.73, 0.65)
// 	pt3dadd(-9.65, -1.84, -0.6, 0.56)
// 	pt3dadd(-10.57, -2.3, -0.6, 0.56)
// 	pt3dadd(-11.78, -2.48, -1.35, 0.56)
// 	pt3dadd(-12.8, -3.13, -1.09, 0.56)
// 	pt3dadd(-15.03, -2.94, -1.12, 0.56)
// 	pt3dadd(-16.42, -3.68, -2.16, 0.56)
// 	pt3dadd(-17.44, -4.13, -2.15, 0.56)
// 	pt3dadd(-18.46, -4.5, -2.88, 0.56)
//   }
  dend[2] {pt3dclear()
	pt3dadd(6.71, -16.45, -1.04, 2.13)
	pt3dadd(7.76, -16.05, 4.21, 1.39)
	pt3dadd(8.78, -16.14, 3.69, 1.02)
	pt3dadd(9.62, -17.06, 4.88, 1.02)
	pt3dadd(10.73, -17.98, 5, 0.93)
	pt3dadd(11.57, -18.62, 5.36, 0.74)
	pt3dadd(12.22, -19.36, 5.36, 0.74)
	pt3dadd(13.42, -20, 5.62, 0.74)
	pt3dadd(14.07, -21.01, 5.05, 0.74)
	pt3dadd(14.91, -21.93, 4.9, 0.74)
	pt3dadd(15.09, -22.3, 4.9, 0.74)
  }
  dend[3] {pt3dclear()
	pt3dadd(6.71, -16.45, -1.04, 2.13)
	pt3dadd(6.43, -18.02, -0.82, 0.83)
	pt3dadd(7.27, -19.12, -1.36, 0.83)
	pt3dadd(8.2, -20.5, -1.36, 0.93)
	pt3dadd(9.24, -21.59, -2.02, 1.21)
  }
  dend[4] {pt3dclear()
	pt3dadd(56.34, -48.43, -3.38, 0.56)
	pt3dadd(56.65, -49.29, -2.74, 0.37)
	pt3dadd(57.49, -50.03, -3.43, 0.37)
	pt3dadd(58.51, -50.58, -3.69, 0.37)
	pt3dadd(59.34, -51.32, -3.7, 0.37)
	pt3dadd(59.99, -51.96, -3.57, 0.37)
	pt3dadd(60.55, -52.6, -3.57, 0.46)
	pt3dadd(60.92, -52.97, -3.55, 0.37)
	pt3dadd(61.38, -53.71, -3.55, 0.37)
  }
  dend[5] {pt3dclear()
	pt3dadd(56.34, -48.43, -3.38, 0.56)
	pt3dadd(57.74, -49.16, -4.02, 0.46)
	pt3dadd(59.13, -49.8, -4.2, 0.46)
	pt3dadd(59.87, -50.91, -4.56, 0.46)
	pt3dadd(61.08, -52.01, -4.41, 0.46)
	pt3dadd(62.1, -52.65, -5.04, 0.46)
	pt3dadd(63.12, -53.11, -4.95, 0.37)
	pt3dadd(64.23, -54.03, -5.27, 0.37)
	pt3dadd(65.25, -54.68, -5.74, 0.37)
	pt3dadd(66.95, -56, -5.96, 0.37)
	pt3dadd(67.87, -56.65, -6.1, 0.37)
	pt3dadd(68.99, -57.38, -6.2, 0.37)
	pt3dadd(69.27, -58.12, -6.49, 0.37)
  }
//   dendrite[2] {pt3dclear()
// 	pt3dadd(10.28, 7.66, 0, 1.21)
// 	pt3dadd(11.52, 8.13, -0.29, 0.65)
// 	pt3dadd(12.73, 9.41, 1.34, 0.65)
// 	pt3dadd(14.21, 10.43, 1.76, 0.65)
// 	pt3dadd(15.51, 11.99, 2.23, 0.65)
// 	pt3dadd(16.71, 13.73, 2.23, 0.56)
// 	pt3dadd(17.27, 14.84, 2.23, 0.56)
// 	pt3dadd(17.64, 16.03, 1.69, 0.56)
// 	pt3dadd(17.83, 17.59, 1.69, 0.56)
// 	pt3dadd(19.03, 18.33, 2.12, 0.56)
// 	pt3dadd(19.59, 19.16, 0.96, 0.56)
// 	pt3dadd(20.05, 20.17, 0.96, 0.56)
// 	pt3dadd(21.07, 21, 1.71, 0.56)
// 	pt3dadd(22.09, 21.36, 1.85, 0.56)
// 	pt3dadd(23.58, 22.1, 2.29, 0.56)
// 	pt3dadd(24.69, 23.25, 2.29, 0.56)
// 	pt3dadd(25.71, 23.89, 2.72, 0.56)
// 	pt3dadd(27.01, 24.35, 1.93, 0.56)
// 	pt3dadd(28.22, 24.9, 2.41, 0.56)
// 	pt3dadd(29.05, 25.82, 1.89, 0.56)
// 	pt3dadd(29.79, 26.46, 2.51, 0.46)
// 	pt3dadd(30.35, 27.01, 2.6, 0.46)
// 	pt3dadd(31.74, 27.75, 2.6, 0.46)
//   }
//   dendrite[3] {pt3dclear()
// 	pt3dadd(10.28, 7.66, 0, 1.21)
// 	pt3dadd(10.47, 9.31, 0, 0.65)
// 	pt3dadd(11.67, 11.06, 0.29, 0.65)
// 	pt3dadd(13.44, 12.07, -0.49, 0.65)
// 	pt3dadd(13.86, 13.97, -0.49, 0.65)
// 	pt3dadd(15.25, 16, -1.29, 0.65)
// 	pt3dadd(15.34, 18.29, -1.54, 0.65)
// 	pt3dadd(16.73, 20.04, -1.04, 0.65)
// 	pt3dadd(17.47, 21.6, -1.04, 0.65)
// 	pt3dadd(17.84, 23.07, -1.62, 0.65)
// 	pt3dadd(18.4, 24.45, -1.22, 0.65)
// 	pt3dadd(18.96, 25.37, -1.22, 0.65)
// 	pt3dadd(19.33, 26.47, -1.04, 0.65)
// 	pt3dadd(19.86, 27.64, -1.68, 0.65)
// 	pt3dadd(20.13, 28.65, -1.16, 0.65)
// 	pt3dadd(20.69, 29.75, -1.16, 0.65)
// 	pt3dadd(21.71, 30.86, -1.89, 0.65)
// 	pt3dadd(22.73, 31.87, -1.89, 0.65)
// 	pt3dadd(23.29, 32.79, -2.05, 0.65)
//   }
  dend[6] {pt3dclear()
	pt3dadd(15.09, -22.3, 4.9, 0.74)
	pt3dadd(16.48, -22.79, 5.74, 0.56)
	pt3dadd(17.41, -23.81, 6.44, 0.56)
	pt3dadd(18.7, -24.27, 6.44, 0.56)
	pt3dadd(19.91, -24.91, 5.96, 0.56)
	pt3dadd(21.21, -26.1, 6.57, 0.56)
	pt3dadd(22.97, -26.84, 6.91, 0.56)
	pt3dadd(23.81, -27.94, 6.76, 0.56)
	pt3dadd(25.38, -29.14, 7.5, 0.56)
	pt3dadd(26.5, -30.52, 6.88, 0.56)
	pt3dadd(27.61, -31.25, 6.66, 0.56)
	pt3dadd(28.35, -32.17, 7.22, 0.56)
	pt3dadd(28.35, -33.62, 7.57, 0.56)
	pt3dadd(28.44, -35.09, 8.12, 0.65)
	pt3dadd(28.72, -36.29, 8.65, 0.56)
	pt3dadd(29.93, -36.93, 7.9, 0.56)
	pt3dadd(30.95, -37.3, 7.83, 0.56)
  }
  dend[7] {pt3dclear()
	pt3dadd(15.09, -22.3, 4.9, 0.74)
	pt3dadd(16.3, -24.5, 4.9, 0.56)
	pt3dadd(17.69, -25.7, 4.39, 0.56)
	pt3dadd(18.71, -26.99, 4.39, 0.56)
	pt3dadd(18.71, -27.91, 4.62, 0.56)
	pt3dadd(19.45, -29.1, 4.62, 0.56)
	pt3dadd(20.46, -30.13, 4.54, 0.56)
	pt3dadd(21.21, -31.14, 4.66, 0.65)
	pt3dadd(21.67, -32.43, 5.19, 0.65)
  }
}
proc shape3d_2() {
  dend[7] {	pt3dadd(22.6, -33.62, 5.19, 0.56)
	pt3dadd(23.9, -35, 4.28, 0.56)
	pt3dadd(24.73, -36.1, 4.79, 0.56)
	pt3dadd(26.03, -36.84, 4.79, 0.56)
	pt3dadd(26.59, -38.59, 5.16, 0.65)
	pt3dadd(26.77, -39.97, 5.91, 0.65)
	pt3dadd(27.14, -41.07, 6.25, 0.65)
	pt3dadd(28.16, -41.9, 6.34, 0.65)
	pt3dadd(29.09, -43, 6.61, 0.65)
	pt3dadd(29.37, -43.73, 6.82, 0.65)
	pt3dadd(30.3, -44.65, 6.28, 0.56)
	pt3dadd(31.13, -45.94, 6.28, 0.56)
	pt3dadd(31.69, -46.67, 5.98, 0.56)
	pt3dadd(32.02, -47.75, 6.9, 0.56)
	pt3dadd(33.04, -48.67, 7.04, 0.56)
	pt3dadd(34.15, -49.4, 6.38, 0.65)
	pt3dadd(35.36, -50.32, 6.64, 0.65)
	pt3dadd(36.29, -51.24, 6.14, 0.56)
	pt3dadd(37.4, -52.16, 6.86, 0.56)
	pt3dadd(38.7, -53.35, 7.25, 0.56)
	pt3dadd(39.44, -54.82, 6.67, 0.56)
	pt3dadd(40.37, -56.02, 6.56, 0.56)
	pt3dadd(40.46, -57.67, 6.56, 0.65)
	pt3dadd(40.56, -58.96, 6.85, 0.65)
	pt3dadd(40.74, -60.43, 7.23, 0.65)
	pt3dadd(41.3, -62.18, 7.25, 0.65)
	pt3dadd(42.32, -63.74, 7.02, 0.56)
	pt3dadd(43.25, -64.75, 7.02, 0.56)
	pt3dadd(43.99, -65.96, 8.12, 0.74)
	pt3dadd(44.46, -67.34, 8.58, 0.74)
	pt3dadd(45.11, -68.72, 7.92, 0.83)
	pt3dadd(45.38, -70.01, 7.92, 0.74)
	pt3dadd(45.66, -71.02, 7.92, 0.74)
  }
  dend[8] {pt3dclear()
	pt3dadd(9.24, -21.59, -2.02, 1.21)
	pt3dadd(9.68, -22.84, -2.09, 1.3)
	pt3dadd(9.87, -23.85, -2.09, 1.58)
  }
  dend[9] {pt3dclear()
	pt3dadd(9.24, -21.59, -2.02, 1.21)
	pt3dadd(11.28, -23.52, -2.49, 0.56)
	pt3dadd(11.93, -24.8, -3, 0.56)
	pt3dadd(12.86, -26.64, -3.09, 0.56)
	pt3dadd(13.14, -27.93, -2.56, 0.56)
	pt3dadd(13.32, -29.31, -3.41, 0.56)
	pt3dadd(13.41, -30.5, -3.41, 0.56)
	pt3dadd(14.06, -32.52, -3.19, 0.74)
	pt3dadd(14.53, -33.99, -3.19, 0.74)
	pt3dadd(15.27, -36.02, -3.97, 0.56)
	pt3dadd(15.46, -38.13, -3.98, 0.56)
	pt3dadd(15.27, -39.88, -3.98, 0.56)
	pt3dadd(15.08, -41.44, -3.69, 0.56)
	pt3dadd(14.9, -43.28, -3.54, 0.56)
	pt3dadd(14.62, -44.66, -4.22, 0.56)
	pt3dadd(14.81, -46.31, -4.22, 0.56)
	pt3dadd(14.43, -48.06, -3.71, 0.56)
	pt3dadd(14.43, -49.16, -4.23, 0.56)
	pt3dadd(14.9, -50.82, -4.9, 0.56)
	pt3dadd(15.35, -52.3, -4.9, 0.56)
	pt3dadd(15.72, -53.96, -4.98, 0.56)
	pt3dadd(16, -55.43, -5.37, 0.56)
	pt3dadd(16.18, -57.27, -5.62, 0.56)
	pt3dadd(16.37, -58.55, -5.37, 0.56)
	pt3dadd(17.11, -60.48, -5.95, 0.56)
	pt3dadd(17.39, -62.97, -6.12, 0.56)
	pt3dadd(17.95, -64.53, -6.2, 0.56)
	pt3dadd(18.22, -65.26, -6.2, 0.56)
	pt3dadd(18.22, -66.46, -6.62, 0.56)
	pt3dadd(18.5, -67.65, -6.83, 0.56)
	pt3dadd(18.78, -68.85, -7.05, 0.56)
	pt3dadd(19.33, -70.03, -5.96, 0.56)
	pt3dadd(19.7, -71.5, -6.34, 0.56)
	pt3dadd(20.16, -72.51, -6.76, 0.56)
	pt3dadd(20.72, -74.35, -7.34, 0.56)
	pt3dadd(21.27, -76.28, -7.46, 0.56)
	pt3dadd(21.74, -77.93, -7.24, 0.56)
	pt3dadd(21.92, -79.68, -7.37, 0.56)
	pt3dadd(22.57, -81.52, -8.13, 0.56)
	pt3dadd(22.76, -83.08, -8.46, 0.56)
	pt3dadd(23.41, -84.83, -7.93, 0.56)
	pt3dadd(23.87, -86.11, -7.93, 0.56)
	pt3dadd(24.06, -87.22, -7.93, 0.56)
  }
  dend[10] {pt3dclear()
	pt3dadd(9.87, -23.85, -2.09, 1.58)
	pt3dadd(10.8, -24.58, -2.41, 0.93)
	pt3dadd(11.08, -26.15, -1.66, 0.93)
  }
  dend[11] {pt3dclear()
	pt3dadd(9.87, -23.85, -2.09, 1.58)
	pt3dadd(9.04, -25.05, -0.7, 0.65)
	pt3dadd(8.48, -25.97, -0.98, 0.56)
	pt3dadd(7.83, -27.07, -1.3, 0.56)
	pt3dadd(7.55, -28.08, -0.75, 0.56)
	pt3dadd(7.55, -29.65, -1.15, 0.56)
	pt3dadd(7.83, -30.66, -1.15, 0.56)
	pt3dadd(7.74, -32.13, -0.96, 0.56)
	pt3dadd(7.18, -33.97, -0.59, 0.56)
	pt3dadd(6.9, -35.34, -1.56, 0.56)
	pt3dadd(5.97, -36.35, -1.09, 0.56)
	pt3dadd(4.86, -37.27, -0.92, 0.56)
	pt3dadd(4.03, -38.1, -0.91, 0.56)
	pt3dadd(3.01, -38.84, -0.68, 0.56)
	pt3dadd(2.79, -39.19, -0.85, 0.56)
  }
  dend[12] {pt3dclear()
	pt3dadd(11.08, -26.15, -1.66, 0.93)
	pt3dadd(11.92, -26.77, 2.2, 0.46)
	pt3dadd(12.38, -27.96, 1.38, 0.46)
	pt3dadd(13.68, -29.07, 1.55, 0.46)
	pt3dadd(14.61, -30.17, 1.61, 0.46)
	pt3dadd(15.35, -30.9, 1.77, 0.46)
	pt3dadd(16.37, -31.82, 0.96, 0.46)
	pt3dadd(17.02, -32.83, 0.51, 0.46)
	pt3dadd(18.14, -34.67, 1.41, 0.46)
	pt3dadd(19.06, -35.96, 1.15, 0.46)
	pt3dadd(19.99, -38.07, 1.41, 0.46)
	pt3dadd(20.27, -39.45, 0.85, 0.46)
	pt3dadd(20.46, -40.92, 0.4, 0.46)
	pt3dadd(21.2, -42.49, 0.08, 0.46)
	pt3dadd(21.57, -43.59, -0.01, 0.46)
	pt3dadd(22.22, -45.15, -0.01, 0.46)
	pt3dadd(22.96, -46.29, -0.01, 0.46)
	pt3dadd(23.7, -47.67, 0.25, 0.46)
	pt3dadd(24.72, -49.41, 0.25, 0.46)
	pt3dadd(25.46, -50.79, -0.26, 0.46)
	pt3dadd(26.76, -52.63, -0.49, 0.46)
	pt3dadd(27.59, -53.92, -0.65, 0.46)
	pt3dadd(27.97, -55.02, -0.51, 0.46)
	pt3dadd(28.71, -56.49, -0.63, 0.46)
	pt3dadd(30.01, -57.87, -0.45, 0.46)
	pt3dadd(31.12, -59.25, -1.17, 0.46)
	pt3dadd(32.6, -60.63, -1.44, 0.46)
	pt3dadd(33.35, -61.64, -1.09, 0.46)
	pt3dadd(34.18, -62.19, -1.09, 0.46)
	pt3dadd(34.92, -63.38, -1.09, 0.46)
	pt3dadd(35.56, -64.66, -0.39, 0.46)
	pt3dadd(36.3, -65.58, -0.46, 0.46)
	pt3dadd(37.41, -66.87, -0.36, 0.46)
	pt3dadd(38.71, -67.79, 0.27, 0.46)
	pt3dadd(39.54, -68.52, 0.01, 0.46)
  }
  dend[13] {pt3dclear()
	pt3dadd(11.08, -26.15, -1.66, 0.93)
	pt3dadd(10.98, -27.62, -2.37, 0.93)
	pt3dadd(11.35, -28.54, -2.05, 0.93)
	pt3dadd(11.91, -30.1, -2.73, 0.93)
	pt3dadd(12.47, -31.66, -2.87, 0.93)
	pt3dadd(12.65, -32.95, -3.14, 0.93)
	pt3dadd(12.19, -34.33, -3.14, 0.93)
	pt3dadd(11.73, -35.34, -3.35, 0.83)
	pt3dadd(10.71, -36.35, -3.21, 0.83)
	pt3dadd(10.61, -36.53, -3.3, 1.02)
  }
  dend[14] {pt3dclear()
	pt3dadd(10.61, -36.53, -3.3, 1.02)
	pt3dadd(9.96, -37.64, -3.3, 0.83)
	pt3dadd(9.31, -38.83, -3.3, 1.11)
	pt3dadd(8.85, -39.84, -2.94, 1.3)
  }
  dend[15] {pt3dclear()
	pt3dadd(10.61, -36.53, -3.3, 1.02)
	pt3dadd(8.76, -36.9, -2.23, 0.74)
	pt3dadd(6.72, -36.9, -1.08, 0.74)
	pt3dadd(4.03, -37.27, -2.16, 0.74)
	pt3dadd(2.63, -38, -1.3, 0.74)
	pt3dadd(-1.08, -39.29, -0.55, 0.74)
	pt3dadd(-3.02, -40.03, -0.3, 0.74)
	pt3dadd(-4.42, -41.04, -0.36, 0.74)
  }
  dend[16] {pt3dclear()
	pt3dadd(8.85, -39.84, -2.94, 1.3)
	pt3dadd(7.96, -40.64, -1.78, 0.56)
	pt3dadd(6.48, -41.92, -1.74, 0.56)
	pt3dadd(5.55, -43.3, -2.52, 0.56)
	pt3dadd(5, -44.5, -2.88, 0.56)
	pt3dadd(4.35, -46.06, -2.13, 0.56)
	pt3dadd(3.88, -47.16, -2.13, 0.56)
	pt3dadd(3.23, -48.36, -2.41, 0.56)
	pt3dadd(2.58, -49.37, -2.68, 0.56)
	pt3dadd(1.84, -51.76, -2.76, 0.56)
	pt3dadd(1.56, -53.04, -2.48, 0.56)
	pt3dadd(1.01, -54.33, -2.67, 0.56)
	pt3dadd(0.36, -55.34, -3.02, 0.56)
	pt3dadd(-0.29, -56.44, -2.27, 0.56)
	pt3dadd(-0.94, -57.46, -2.51, 0.56)
	pt3dadd(-1.22, -58.37, -2.51, 0.56)
	pt3dadd(-1.36, -60.21, -2.51, 0.56)
	pt3dadd(-1.73, -61.59, -2.18, 0.56)
	pt3dadd(-2.28, -63.25, -2.62, 0.56)
	pt3dadd(-2.84, -65.09, -2.8, 0.56)
	pt3dadd(-3.77, -66.1, -2.2, 0.56)
	pt3dadd(-3.95, -67.29, -1.96, 0.56)
	pt3dadd(-4.79, -69.22, -3.42, 0.56)
	pt3dadd(-4.79, -70.05, -3.42, 0.56)
	pt3dadd(-4.98, -71.89, -3.44, 0.56)
	pt3dadd(-5.07, -73.36, -4.01, 0.56)
	pt3dadd(-5.35, -74.28, -4.01, 0.83)
	pt3dadd(-5.07, -75.29, -3.58, 0.56)
	pt3dadd(-5.16, -76.21, -3.58, 0.56)
	pt3dadd(-5.38, -78.19, -3.42, 0.56)
	pt3dadd(-5.47, -79.94, -3.13, 0.56)
	pt3dadd(-6.4, -81.59, -3.12, 0.56)
	pt3dadd(-6.96, -82.97, -3.86, 0.56)
	pt3dadd(-7.51, -84.26, -3.86, 0.56)
	pt3dadd(-7.51, -85.27, -3.41, 0.56)
	pt3dadd(-7.88, -86.28, -3.41, 0.56)
	pt3dadd(-8.35, -87.11, -3.6, 0.56)
	pt3dadd(-8.72, -87.93, -3.6, 0.56)
	pt3dadd(-9.09, -89.13, -3.6, 0.56)
	pt3dadd(-9.37, -90.41, -3.91, 0.56)
	pt3dadd(-10.02, -91.7, -3.92, 0.56)
	pt3dadd(-10.76, -92.71, -3.49, 0.56)
	pt3dadd(-11.22, -93.36, -3.49, 0.56)
	pt3dadd(-11.97, -94.09, -3.29, 0.56)
	pt3dadd(-13.19, -95.27, -3.29, 0.56)
	pt3dadd(-13.56, -96.47, -3.73, 0.56)
  }
}
proc shape3d_3() {
  dend[16] {	pt3dadd(-13.93, -97.57, -3.16, 0.56)
	pt3dadd(-14.49, -98.76, -3.3, 0.56)
	pt3dadd(-14.95, -99.5, -3.05, 0.56)
	pt3dadd(-15.51, -100, -3.84, 0.56)
	pt3dadd(-15.42, -101.3, -3.84, 0.74)
	pt3dadd(-15.79, -102.4, -3.45, 0.56)
	pt3dadd(-15.98, -103.3, -3.22, 0.56)
	pt3dadd(-15.98, -104.9, -4.17, 0.56)
	pt3dadd(-16.16, -106.4, -3.6, 0.56)
	pt3dadd(-16.25, -107.6, -4.76, 0.56)
	pt3dadd(-16.44, -108.6, -4.89, 0.56)
	pt3dadd(-17.27, -109.8, -4.89, 0.56)
	pt3dadd(-17.74, -110.9, -4.89, 0.56)
	pt3dadd(-18.11, -112, -4.53, 0.56)
	pt3dadd(-18.42, -113.1, -4.53, 0.56)
	pt3dadd(-18.79, -114.4, -3.86, 0.56)
	pt3dadd(-19.44, -115.5, -4.63, 0.56)
	pt3dadd(-20.09, -116.5, -4.89, 0.56)
	pt3dadd(-20.46, -118.1, -5.13, 0.46)
	pt3dadd(-20.65, -119.3, -4.35, 0.46)
	pt3dadd(-20.83, -120.7, -4.85, 0.46)
	pt3dadd(-21.11, -122.1, -4.85, 0.46)
	pt3dadd(-21.39, -123.1, -5.04, 0.46)
	pt3dadd(-21.3, -124.7, -4.67, 0.46)
	pt3dadd(-21.58, -126, -5.26, 0.46)
	pt3dadd(-21.39, -127.2, -4.9, 0.46)
	pt3dadd(-21.58, -128.1, -5.43, 0.46)
	pt3dadd(-21.85, -129.4, -4.99, 0.46)
	pt3dadd(-22.13, -130, -4.99, 0.46)
  }
  dend[17] {pt3dclear()
	pt3dadd(8.85, -39.84, -2.94, 1.3)
	pt3dadd(8.66, -41.5, -2.94, 0.65)
	pt3dadd(8.29, -42.6, -3.64, 0.65)
	pt3dadd(9.42, -43.85, -3.08, 0.65)
	pt3dadd(9.33, -44.96, -3.51, 0.65)
	pt3dadd(8.77, -45.69, -4.84, 0.65)
	pt3dadd(8.86, -46.61, -5.41, 0.65)
	pt3dadd(8.31, -47.9, -5.69, 0.65)
	pt3dadd(7.56, -49.19, -5.94, 0.65)
	pt3dadd(7.38, -50.38, -6.2, 0.65)
	pt3dadd(7.47, -52.03, -6.61, 0.65)
	pt3dadd(7.01, -53.32, -7.35, 0.65)
	pt3dadd(6.45, -54.7, -7.79, 0.65)
	pt3dadd(5.71, -55.99, -7.27, 0.65)
	pt3dadd(5.62, -57.09, -7.88, 0.65)
	pt3dadd(5.15, -58.56, -8.29, 0.65)
	pt3dadd(4.6, -59.2, -8.29, 0.74)
	pt3dadd(4.22, -60.49, -8.7, 0.74)
	pt3dadd(4.33, -61.85, -8.71, 0.74)
	pt3dadd(4.24, -63.23, -9.33, 0.74)
	pt3dadd(3.59, -64.6, -8.78, 0.74)
	pt3dadd(3.49, -65.52, -10.05, 0.74)
	pt3dadd(3.59, -66.99, -10.64, 0.74)
	pt3dadd(3.49, -68.46, -11.25, 0.74)
	pt3dadd(3.03, -70.3, -11.61, 0.74)
	pt3dadd(2.66, -70.85, -10.55, 0.74)
	pt3dadd(2.29, -71.77, -11.49, 0.74)
	pt3dadd(2.01, -73.06, -11.48, 0.74)
	pt3dadd(2.01, -74.16, -10.61, 0.74)
	pt3dadd(2.01, -75.36, -10.35, 0.74)
  }
}
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, 6, 7, 8, 9,10,11,12,13,14,15,16,17) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5,0.29183,    0.5,    0.5,0.29079,0.11662,    0.5,0.17082,    0.5,    0.5,0.16707,    0.5,    0.5,0.21186,    0.016511 ,   0.040543) 
for i= 0 , 15 { 
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 , 15 { 
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 GranuleCell22