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

// Original name on neuroMorpho.org n13-cont08-sl4.CNG.swc

ndend1=15

  
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, 14 dend[i] all.append()


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


	pdend  = new SectionList()
		for i=2, 3  dend[i] pdend.append()
		dend[6] pdend.append()
		
		
		
	mdend  = new SectionList()
		dend[1] mdend.append()
		for i=4, 5  dend[i] mdend.append()
		for i=7, 10  dend[i] mdend.append()
		dend[12] mdend.append()		  
		  
	ddend  = new SectionList()
		dend[11] ddend.append()
		for i=13, 14 dend[i] ddend.append()
		
}
proc gctemp() {

// 	soma {nseg=1 L=16.329 diam=11.165} // changed L & diam
// 		
// 	dend [0] {nseg=1  L=20.05632 diam=2.6}
// 	dend [1] {nseg=1  L=80.78021 diam=1.6478}
// 	dend [2] {nseg=1  L=10.61434 diam=1.1833}
// 	dend [3] {nseg=1  L=25.82767 diam=1.0346}
// 	dend [4] {nseg=1  L=30.89202 diam=0.7664}
// 	dend [5] {nseg=1  L=43.53635 diam=0.9072}
// 	dend [6] {nseg=1  L=37.46003 diam=0.9215}
// 	dend [7] {nseg=1  L=85.47885 diam=0.5756}
// 	dend [8] {nseg=1  L=121.54242 diam=0.6968}
// 	dend [9] {nseg=1  L=78.91646 diam=0.6705}
// 	dend [10] {nseg=1 L=97.50034 diam=0.7203}
// 	dend [11] {nseg=1 L=19.96318 diam=0.8309}
// 	dend [12] {nseg=1 L=125.23049 diam=0.5746}
// 	dend [13] {nseg=1 L=117.23326 diam=0.6059}
// 	dend [14] {nseg=1 L=31.96199 diam=0.6411}
// 	dend [15] {nseg=1 L=45.48879 diam=0.6389}
// 	dend [16] {nseg=1 L=22.50602 diam=0.5591}
// 	dend [17] {nseg=1 L=37.40208 diam=0.6970}
// 	dend [18] {nseg=1 L=20.88699 diam=0.6050}
// 	dend [19] {nseg=1 L=10.10732 diam=0.5985}
	
// 	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[2](1)
  for i = 5, 6 connect dend[i](0), dend[3](1)
  for i = 7, 8 connect dend[i](0), dend[4](1)
  for i = 9, 10 connect dend[i](0), dend[6](1)
  for i = 11, 12 connect dend[i](0), dend[7](1)
  for i = 13, 14 connect dend[i](0), dend[12](1)
basic_shape()
	    

// 	  connect axon(1), soma(0)


	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 shape3d_1() {
//   axon {pt3dclear()
// 	pt3dadd(-0.1965, -38, 0.01, 0.2)
// 	pt3dadd(-0.1965, -18, 0.01, 10)
//   }
  soma {pt3dclear()
	pt3dadd(-0.1965, -18, 0.01, 10)
	pt3dadd(-0.1965, -1.363, 0, 8.836)
  }
  dend {pt3dclear()
	pt3dadd(-0.1965, -1.363, 0, 8.836)
	pt3dadd(-0.65, 4.41, 0, 2.04)
	pt3dadd(-1.02, 5.7, 1.24, 1.67)
	pt3dadd(-2.13, 6.43, 1.39, 1.39)
	pt3dadd(-3.52, 6.53, 1.25, 1.39)
	pt3dadd(-4.36, 7.63, 1.25, 1.48)
	pt3dadd(-5.01, 8.73, 1.63, 1.39)
	pt3dadd(-5.57, 10.02, 1.38, 1.39)
	pt3dadd(-5.84, 10.85, 1.38, 1.39)
  }
  dend[1] {pt3dclear()
	pt3dadd(-5.84, 10.85, 1.38, 1.39)
	pt3dadd(-6.94, 12.03, 2, 0.56)
	pt3dadd(-8.15, 14.14, 1.31, 0.56)
	pt3dadd(-8.61, 15.52, 2.01, 0.56)
	pt3dadd(-10.1, 17.36, 2.1, 0.56)
	pt3dadd(-10.93, 18.19, 2.63, 0.65)
	pt3dadd(-12.42, 19.2, 3.07, 0.65)
	pt3dadd(-13.07, 20.49, 3.07, 0.74)
	pt3dadd(-13.07, 22.42, 3.07, 0.74)
	pt3dadd(-13.9, 23.89, 2.63, 0.74)
	pt3dadd(-16.13, 26.28, 4.02, 0.74)
	pt3dadd(-16.78, 27.85, 4.43, 0.74)
	pt3dadd(-17.52, 30.06, 4.43, 0.74)
	pt3dadd(-17.98, 32.17, 4.43, 0.74)
	pt3dadd(-18.26, 34.19, 4.72, 0.74)
	pt3dadd(-19.1, 36.4, 4.73, 0.74)
	pt3dadd(-19.38, 38.24, 6.37, 0.74)
	pt3dadd(-19.56, 39.8, 6.37, 0.74)
	pt3dadd(-19.47, 41.09, 6.37, 0.74)
	pt3dadd(-19.19, 42.37, 6.55, 0.74)
	pt3dadd(-19.93, 43.84, 6.44, 0.74)
	pt3dadd(-20.49, 45.03, 6.33, 0.83)
	pt3dadd(-20.76, 46.87, 6.73, 0.74)
	pt3dadd(-21.41, 48.34, 6.29, 0.74)
	pt3dadd(-21.69, 50.18, 7.27, 0.74)
	pt3dadd(-21.97, 51.92, 6.76, 0.74)
	pt3dadd(-22.9, 53.21, 7.67, 0.65)
	pt3dadd(-22.71, 54.41, 7.67, 0.74)
	pt3dadd(-22.34, 55.33, 7.67, 0.74)
	pt3dadd(-22.15, 56.4, 7.29, 0.74)
	pt3dadd(-21.69, 57.41, 7.29, 0.65)
	pt3dadd(-21.5, 59.06, 8.52, 0.65)
	pt3dadd(-21.97, 60.44, 8.24, 0.65)
	pt3dadd(-23.45, 60.72, 8.23, 0.65)
	pt3dadd(-24.1, 62.37, 8.21, 0.65)
  }
  dend[2] {pt3dclear()
	pt3dadd(-5.84, 10.85, 1.38, 1.39)
	pt3dadd(-5.31, 12.83, 1.38, 1.39)
  }
  dend[3] {pt3dclear()
	pt3dadd(-5.31, 12.83, 1.38, 1.39)
	pt3dadd(-7.07, 12.93, 1.12, 1.21)
	pt3dadd(-8.37, 12.83, 1.12, 1.21)
	pt3dadd(-9.76, 12.93, 1.18, 1.11)
	pt3dadd(-10.88, 13.38, 1.37, 1.3)
	pt3dadd(-12.64, 13.94, 1.37, 1.48)
	pt3dadd(-13.75, 14.49, 0.82, 1.67)
  }
  dend[4] {pt3dclear()
	pt3dadd(-5.31, 12.83, 1.38, 1.39)
	pt3dadd(-5.38, 12.87, 1.09, 1.11)
	pt3dadd(-5.57, 14.89, 0.41, 1.02)
	pt3dadd(-4.92, 17.1, 0.76, 1.02)
	pt3dadd(-4.17, 19.49, 0.9, 1.02)
	pt3dadd(-4.17, 21.88, 0.9, 1.02)
	pt3dadd(-4.73, 23.9, 0.77, 1.02)
	pt3dadd(-4.88, 25.13, 1.4, 1.02)
	pt3dadd(-5.16, 27.89, 2.23, 1.21)
	pt3dadd(-5.34, 29.36, 2.94, 1.21)
	pt3dadd(-5.34, 31.2, 2.67, 1.02)
	pt3dadd(-5.44, 33.22, 3.65, 1.11)
	pt3dadd(-5.62, 34.6, 2.7, 1.02)
	pt3dadd(-6.64, 35.88, 3.65, 1.02)
	pt3dadd(-7.2, 36.99, 3.82, 1.02)
	pt3dadd(-7.57, 38.46, 4.39, 1.02)
	pt3dadd(-7.76, 40.11, 3.69, 1.11)
	pt3dadd(-7.58, 41.22, 4.62, 1.21)
	pt3dadd(-7.21, 42.78, 4.67, 0.93)
	pt3dadd(-7.3, 44.34, 4.98, 0.93)
	pt3dadd(-8.04, 45.08, 5.09, 1.02)
	pt3dadd(-9.06, 45.35, 5.18, 0.93)
	pt3dadd(-9.62, 46.18, 5.29, 0.93)
	pt3dadd(-10.08, 47.47, 5.06, 1.11)
	pt3dadd(-10.55, 48.75, 5.25, 0.83)
	pt3dadd(-9.9, 50.13, 5.8, 0.83)
	pt3dadd(-9.71, 51.51, 6.28, 0.93)
	pt3dadd(-9.99, 52.89, 5.64, 0.93)
	pt3dadd(-10.54, 54.71, 6.24, 1.02)
	pt3dadd(-10.35, 55.99, 6.24, 1.02)
	pt3dadd(-9.89, 57.37, 7.6, 0.65)
	pt3dadd(-10.35, 58.29, 7.07, 0.93)
	pt3dadd(-10.81, 59.39, 7.38, 0.74)
	pt3dadd(-11.37, 60.4, 7.41, 0.83)
	pt3dadd(-11.56, 61.42, 7.78, 1.02)
	pt3dadd(-11.37, 62.79, 7.63, 1.02)
	pt3dadd(-10.91, 64.54, 7.04, 1.02)
	pt3dadd(-10.72, 66.2, 7.04, 1.02)
	pt3dadd(-10.63, 67.48, 7.85, 1.11)
	pt3dadd(-11.17, 68.67, 8.15, 1.11)
	pt3dadd(-11.82, 70.05, 8.39, 1.11)
	pt3dadd(-12.38, 71.43, 8.84, 1.02)
	pt3dadd(-11.91, 72.71, 8.79, 1.02)
	pt3dadd(-11.64, 73.54, 9.33, 1.02)
	pt3dadd(-12.19, 74.28, 9.58, 0.65)
	pt3dadd(-12.84, 74.74, 9.58, 0.74)
  }
  dend[5] {pt3dclear()
	pt3dadd(-13.75, 14.49, 0.82, 1.67)
	pt3dadd(-15.58, 14.24, 1.9, 1.21)
	pt3dadd(-18.28, 14.42, 2.26, 1.11)
	pt3dadd(-20.41, 13.41, 2.26, 1.11)
	pt3dadd(-23.01, 13.13, 1.62, 1.11)
	pt3dadd(-26.35, 12.67, 1.74, 1.11)
	pt3dadd(-28.2, 11.94, 1.97, 1.11)
	pt3dadd(-29.96, 11.2, 1.76, 1.11)
	pt3dadd(-32.19, 10.37, 1.54, 1.11)
	pt3dadd(-34.14, 10.37, 1.31, 1.02)
	pt3dadd(-37.11, 9.73, 2.01, 0.93)
	pt3dadd(-38.78, 9.36, 1.54, 0.83)
	pt3dadd(-40.35, 9.46, 1.54, 0.83)
	pt3dadd(-43.81, 8.4, 1.15, 0.83)
	pt3dadd(-45.11, 8.68, 1.81, 0.74)
	pt3dadd(-47.34, 8.03, 1.13, 0.74)
	pt3dadd(-50.49, 7.85, 0.64, 0.74)
	pt3dadd(-52.44, 7.66, 0.64, 0.74)
	pt3dadd(-53.55, 7.11, 0.64, 0.74)
	pt3dadd(-54.66, 7.94, 0.64, 0.74)
	pt3dadd(-56.71, 7.76, 0.66, 0.74)
	pt3dadd(-58.28, 7.76, 1.28, 0.74)
	pt3dadd(-60.6, 7.21, 1.28, 0.74)
	pt3dadd(-62.64, 7.94, 1.28, 0.74)
	pt3dadd(-64.68, 7.66, 1.08, 0.74)
	pt3dadd(-66.01, 8.58, 1.08, 0.74)
	pt3dadd(-67.03, 9.31, 1.08, 0.74)
	pt3dadd(-68.42, 8.67, 0.31, 0.74)
	pt3dadd(-69.72, 10.14, 0.62, 0.74)
	pt3dadd(-70.46, 10.33, 0.62, 0.74)
	pt3dadd(-71.94, 9.41, 0.16, 0.74)
	pt3dadd(-73.61, 9.22, -0.38, 0.74)
	pt3dadd(-74.91, 8.49, -0.38, 0.74)
	pt3dadd(-76.3, 8.58, -0.38, 0.74)
	pt3dadd(-77.42, 9.41, -0.68, 0.74)
	pt3dadd(-78.25, 10.23, -0.24, 0.74)
	pt3dadd(-78.99, 9.13, -0.24, 0.74)
	pt3dadd(-79.37, 7.57, -0.97, 0.74)
	pt3dadd(-80.11, 7.48, -1.27, 0.74)
	pt3dadd(-81.31, 8.49, -1.63, 0.74)
	pt3dadd(-82.61, 8.58, -1.62, 0.74)
	pt3dadd(-84.1, 8.39, -1.14, 0.74)
	pt3dadd(-85.02, 8.39, -1.14, 0.74)
	pt3dadd(-86.23, 8.3, -2.06, 0.74)
	pt3dadd(-86.97, 8.58, -1.44, 0.74)
	pt3dadd(-87.71, 9.5, -1.44, 0.83)
	pt3dadd(-88.92, 10.42, -0.95, 0.74)
  }
  dend[6] {pt3dclear()
	pt3dadd(-13.75, 14.49, 0.82, 1.67)
	pt3dadd(-13.47, 16.33, 1.18, 1.02)
	pt3dadd(-13.47, 17.89, 0.89, 1.02)
	pt3dadd(-13.84, 18.9, 0.89, 1.02)
	pt3dadd(-15.14, 19.54, 0.53, 0.93)
	pt3dadd(-15.7, 20.92, 0.53, 0.93)
	pt3dadd(-15.79, 22.48, 0.31, 0.93)
	pt3dadd(-15.98, 24.14, 0.31, 0.93)
	pt3dadd(-16.72, 25.52, 0.05, 0.93)
	pt3dadd(-17.52, 27.07, 0.48, 0.93)
	pt3dadd(-18.36, 28.26, 0.48, 0.93)
	pt3dadd(-18.73, 29.36, 0.24, 0.93)
	pt3dadd(-19.84, 29.73, 0.24, 0.74)
	pt3dadd(-20.03, 31.2, 0.7, 0.74)
	pt3dadd(-20.4, 32.4, 0.17, 0.83)
	pt3dadd(-20.86, 33.78, 0.17, 0.83)
	pt3dadd(-21.05, 35.25, 0.3, 0.83)
	pt3dadd(-22.16, 35.44, -0.46, 0.65)
	pt3dadd(-23.18, 35.16, -0.46, 0.65)
	pt3dadd(-23.46, 35.9, -0.46, 0.74)
  }
  dend[7] {pt3dclear()
	pt3dadd(-12.84, 74.74, 9.58, 0.74)
	pt3dadd(-13.38, 75.71, 9.59, 0.56)
	pt3dadd(-13.47, 77.27, 10.13, 0.65)
	pt3dadd(-14.12, 78.01, 10.51, 0.65)
	pt3dadd(-14.68, 78.74, 10.51, 0.56)
	pt3dadd(-14.86, 79.48, 10.51, 0.56)
	pt3dadd(-15.33, 80.49, 10.01, 0.56)
  }
  dend[8] {pt3dclear()
	pt3dadd(-12.84, 74.74, 9.58, 0.74)
	pt3dadd(-12.38, 76.21, 9.35, 0.56)
	pt3dadd(-11.91, 77.77, 9.34, 0.56)
	pt3dadd(-11.26, 79.15, 9.92, 0.56)
	pt3dadd(-11.36, 80.07, 10.27, 0.65)
	pt3dadd(-12.1, 80.8, 10.27, 0.65)
	pt3dadd(-11.91, 82.18, 10.56, 0.56)
	pt3dadd(-11.24, 83.61, 10, 0.65)
	pt3dadd(-11.06, 84.35, 10, 0.65)
	pt3dadd(-11.24, 86, 10.2, 0.65)
	pt3dadd(-11.06, 87.2, 11.27, 0.65)
	pt3dadd(-11.06, 88.39, 11.61, 0.74)
	pt3dadd(-11.34, 89.5, 11.61, 0.83)
	pt3dadd(-11.52, 90.14, 11.25, 0.65)
  }
  dend[9] {pt3dclear()
	pt3dadd(-23.46, 35.9, -0.46, 0.74)
	pt3dadd(-24.07, 36.95, -0.46, 0.65)
	pt3dadd(-25.55, 36.95, -0.83, 0.65)
	pt3dadd(-27.13, 36.49, -1, 0.65)
	pt3dadd(-28.89, 36.31, -1.37, 0.65)
	pt3dadd(-30.75, 36.49, -1.62, 0.65)
	pt3dadd(-32.98, 35.94, -1.62, 0.65)
	pt3dadd(-35.11, 36.31, -1.23, 0.65)
	pt3dadd(-36.59, 35.76, -1.23, 0.65)
	pt3dadd(-37.8, 36.13, -1.23, 0.65)
	pt3dadd(-39.56, 35.85, -1.57, 0.65)
  }
}
proc shape3d_2() {
  dend[9] {	pt3dadd(-41.88, 36.4, -1.57, 0.65)
	pt3dadd(-43.37, 36.31, -1.23, 0.65)
	pt3dadd(-44.85, 35.94, -0.95, 0.65)
	pt3dadd(-45.87, 36.22, -0.95, 0.83)
	pt3dadd(-46.98, 36.13, -0.96, 0.65)
	pt3dadd(-48.19, 36.49, 0.03, 0.74)
	pt3dadd(-50.14, 35.95, -1.31, 0.74)
	pt3dadd(-51.25, 36.5, -1.31, 0.74)
	pt3dadd(-52.74, 36.32, -1.12, 0.74)
	pt3dadd(-54.69, 36.23, -1.12, 0.74)
	pt3dadd(-55.8, 37.05, -1.12, 0.65)
	pt3dadd(-57.1, 35.68, -1.37, 0.65)
	pt3dadd(-59.23, 36.04, -0.89, 0.65)
	pt3dadd(-60.99, 35.95, -1.5, 0.74)
	pt3dadd(-62.2, 35.86, -1.77, 0.65)
	pt3dadd(-63.96, 36.59, -1.29, 0.65)
	pt3dadd(-65.17, 36.23, -1.29, 0.65)
	pt3dadd(-66.47, 36.32, -2.1, 0.65)
	pt3dadd(-68.04, 36.41, -2.1, 0.65)
	pt3dadd(-69.44, 36.96, -2.1, 0.65)
	pt3dadd(-70.46, 37.15, -2.1, 0.65)
	pt3dadd(-71.2, 36.96, -1.45, 0.65)
  }
  dend[10] {pt3dclear()
	pt3dadd(-23.46, 35.9, -0.46, 0.74)
	pt3dadd(-22.25, 37.64, -0.94, 0.56)
	pt3dadd(-22.07, 39.21, 0, 0.56)
	pt3dadd(-22.44, 40.13, 0, 0.56)
	pt3dadd(-21.94, 41.37, 0, 0.65)
	pt3dadd(-21.66, 43.02, -1.01, 0.65)
	pt3dadd(-21.01, 44.12, -1.01, 0.65)
	pt3dadd(-20.08, 45.5, -1.4, 0.65)
	pt3dadd(-19.62, 46.79, -1.32, 0.65)
  }
  dend[11] {pt3dclear()
	pt3dadd(-15.33, 80.49, 10.01, 0.56)
	pt3dadd(-16.05, 81.93, 12.19, 0.56)
	pt3dadd(-17.16, 82.02, 12.44, 0.56)
	pt3dadd(-17.72, 81.75, 12.44, 0.56)
	pt3dadd(-18.83, 82.48, 12.44, 0.56)
	pt3dadd(-19.39, 83.03, 12.69, 0.56)
	pt3dadd(-20.22, 82.76, 12.77, 0.74)
	pt3dadd(-21.52, 83.77, 13.56, 0.74)
	pt3dadd(-22.17, 85.33, 14.3, 0.65)
	pt3dadd(-23.19, 87.26, 14.65, 0.65)
	pt3dadd(-24.12, 88.64, 14.39, 0.65)
	pt3dadd(-24.96, 90.2, 14.28, 0.65)
	pt3dadd(-26.16, 90.66, 14.94, 0.65)
	pt3dadd(-27.27, 90.85, 14.94, 0.65)
	pt3dadd(-27.65, 91.86, 15.18, 0.65)
	pt3dadd(-27.83, 92.59, 15.18, 0.65)
	pt3dadd(-29.13, 91.95, 15.64, 0.65)
	pt3dadd(-30.52, 91.58, 14.99, 0.65)
	pt3dadd(-32.28, 91.03, 14.17, 0.56)
	pt3dadd(-33.77, 91.03, 14.39, 0.56)
	pt3dadd(-34.7, 90.66, 13.77, 0.56)
	pt3dadd(-35.62, 90.2, 13.77, 0.56)
	pt3dadd(-36.46, 89.83, 13.77, 0.56)
	pt3dadd(-36.74, 90.57, 13.77, 0.56)
	pt3dadd(-37.57, 90.2, 13.76, 0.56)
	pt3dadd(-38.13, 90.02, 13.76, 0.56)
	pt3dadd(-39.06, 90.66, 13.76, 0.56)
	pt3dadd(-40.45, 90.29, 13.04, 0.56)
	pt3dadd(-42.01, 90.78, 12.56, 0.56)
	pt3dadd(-43.58, 90.69, 12.47, 0.56)
	pt3dadd(-44.42, 90.14, 12.47, 0.56)
	pt3dadd(-45.25, 91.15, 12.65, 0.56)
	pt3dadd(-46.27, 91.61, 12.1, 0.56)
  }
  dend[12] {pt3dclear()
	pt3dadd(-15.33, 80.49, 10.01, 0.56)
	pt3dadd(-15.05, 81.5, 10.08, 0.56)
	pt3dadd(-15.14, 82.51, 10.23, 0.56)
	pt3dadd(-15.88, 83.43, 11.18, 0.56)
	pt3dadd(-16.35, 84.53, 11.41, 0.56)
	pt3dadd(-16.44, 86.1, 11.79, 0.56)
	pt3dadd(-16.53, 87.2, 12.41, 0.56)
	pt3dadd(-17.92, 87.38, 11.32, 0.56)
	pt3dadd(-17.64, 88.85, 12.42, 0.56)
	pt3dadd(-18.94, 90.51, 12.11, 0.56)
	pt3dadd(-19.13, 91.33, 12.17, 0.56)
	pt3dadd(-19.41, 92.25, 13.22, 0.65)
	pt3dadd(-19.41, 93.63, 13.22, 0.65)
	pt3dadd(-19.13, 94.74, 12.7, 0.56)
	pt3dadd(-18.94, 96.11, 12.7, 0.65)
	pt3dadd(-18.63, 97.25, 12.63, 0.74)
	pt3dadd(-18.72, 98.54, 12.92, 0.74)
	pt3dadd(-18.82, 99.55, 13.07, 0.93)
	pt3dadd(-19.37, 100.3, 13.07, 1.11)
  }
  dend[13] {pt3dclear()
	pt3dadd(-19.37, 100.3, 13.07, 1.11)
	pt3dadd(-18.28, 101, 13.19, 0.65)
	pt3dadd(-18, 102, 13.19, 0.65)
	pt3dadd(-17.26, 103, 13.51, 0.56)
	pt3dadd(-16.24, 103.9, 13.51, 0.56)
	pt3dadd(-16.7, 105.2, 12.85, 0.56)
	pt3dadd(-16.24, 106.4, 12.85, 0.56)
	pt3dadd(-15.87, 108, 13.4, 0.56)
	pt3dadd(-15.13, 109.6, 13.19, 0.56)
	pt3dadd(-14.85, 110.8, 12.84, 0.65)
	pt3dadd(-15.5, 112.4, 13.81, 0.56)
	pt3dadd(-15.13, 113.1, 13.56, 0.56)
	pt3dadd(-14.76, 114.7, 13.64, 0.56)
	pt3dadd(-15.03, 116.1, 13.2, 0.65)
	pt3dadd(-15.31, 117.2, 13.2, 0.56)
	pt3dadd(-15.31, 118.3, 13.12, 0.56)
	pt3dadd(-15.03, 119.2, 13.57, 0.56)
	pt3dadd(-15.86, 120.1, 13.57, 0.56)
	pt3dadd(-15.31, 121, 12.78, 0.65)
	pt3dadd(-14.66, 122.3, 13.69, 0.56)
	pt3dadd(-14.1, 123.3, 13.69, 0.56)
	pt3dadd(-14.1, 124.7, 13.79, 0.56)
	pt3dadd(-14.38, 125.6, 13.79, 0.56)
	pt3dadd(-13.36, 127.2, 13.23, 0.56)
	pt3dadd(-12.71, 128.2, 14.08, 0.56)
	pt3dadd(-12.99, 129.2, 14.08, 0.56)
	pt3dadd(-12.59, 131.1, 13.77, 0.56)
	pt3dadd(-13.14, 132.3, 13.77, 0.56)
	pt3dadd(-12.59, 133.9, 13.99, 0.56)
	pt3dadd(-12.31, 135.8, 13.79, 0.56)
	pt3dadd(-12.03, 136.7, 13.79, 0.65)
	pt3dadd(-12.03, 138.2, 14.76, 0.65)
	pt3dadd(-12.03, 139.7, 15.09, 0.56)
	pt3dadd(-12.49, 141.1, 15.09, 0.56)
	pt3dadd(-11.66, 142.1, 15.09, 0.56)
	pt3dadd(-11.2, 143.6, 15.17, 0.56)
	pt3dadd(-10.78, 145.1, 14.3, 0.56)
	pt3dadd(-11.15, 146.6, 14.3, 0.56)
	pt3dadd(-10.13, 147.9, 14.3, 0.56)
	pt3dadd(-10.13, 149.6, 14.3, 0.56)
	pt3dadd(-9.2, 151.5, 14.92, 0.56)
	pt3dadd(-9.11, 152.5, 14.92, 0.65)
	pt3dadd(-8.74, 154.3, 15.3, 0.56)
	pt3dadd(-8.09, 156.4, 15.3, 0.56)
	pt3dadd(-8.09, 158.2, 15.3, 0.56)
	pt3dadd(-7.2, 159.8, 15.08, 0.56)
	pt3dadd(-7.85, 160.9, 14.75, 0.56)
	pt3dadd(-7.76, 162.9, 14.75, 0.56)
	pt3dadd(-8.41, 164, 14.68, 0.56)
	pt3dadd(-7.76, 165.1, 15.71, 0.56)
	pt3dadd(-7.94, 167, 15.71, 0.56)
	pt3dadd(-7.39, 169.1, 15.71, 0.56)
	pt3dadd(-7.39, 170.5, 15.83, 0.56)
	pt3dadd(-7.67, 171.9, 15.83, 0.56)
	pt3dadd(-7.29, 172.6, 15.83, 0.56)
  }
  dend[14] {pt3dclear()
	pt3dadd(-19.37, 100.3, 13.07, 1.11)
	pt3dadd(-20.02, 101.4, 13.1, 0.65)
	pt3dadd(-19.84, 102.6, 13.1, 0.65)
	pt3dadd(-19.46, 104.1, 13.48, 0.65)
	pt3dadd(-20.21, 105, 13.48, 0.65)
	pt3dadd(-20.11, 106.7, 13.22, 0.56)
	pt3dadd(-20.76, 107.7, 13.88, 0.56)
	pt3dadd(-20.67, 109.1, 14.13, 0.56)
	pt3dadd(-19.93, 110.2, 14.1, 0.56)
	pt3dadd(-20.82, 112.4, 13.78, 0.56)
	pt3dadd(-20.54, 114.7, 14.44, 0.56)
	pt3dadd(-22.49, 115, 14.9, 0.56)
	pt3dadd(-22.68, 117, 14.37, 0.56)
	pt3dadd(-23.05, 118.6, 14.61, 0.56)
	pt3dadd(-23.42, 120.1, 15.35, 0.56)
	pt3dadd(-23.23, 121.4, 14.92, 0.56)
	pt3dadd(-23.23, 123.3, 15.1, 0.65)
	pt3dadd(-23.05, 124.7, 15.87, 0.56)
	pt3dadd(-23.56, 126.6, 15.18, 0.56)
	pt3dadd(-24.31, 127.9, 15.64, 0.56)
	pt3dadd(-25.23, 127.7, 15.47, 0.56)
	pt3dadd(-25.79, 128.5, 16.18, 0.56)
	pt3dadd(-25.23, 130.3, 15.76, 0.56)
	pt3dadd(-25.51, 131.7, 15.76, 0.56)
	pt3dadd(-26.9, 133, 16.62, 0.56)
	pt3dadd(-26.81, 135.5, 17.19, 0.56)
	pt3dadd(-27.74, 136.1, 17.19, 0.56)
	pt3dadd(-27.65, 138, 17.01, 0.56)
	pt3dadd(-27.46, 139.9, 17.01, 0.56)
	pt3dadd(-28.68, 140.7, 17.25, 0.56)
	pt3dadd(-29.06, 142.6, 17.11, 0.56)
	pt3dadd(-29.15, 144.1, 18.04, 0.56)
	pt3dadd(-29.06, 146.1, 18.04, 0.56)
	pt3dadd(-28.41, 148.3, 18.39, 0.56)
	pt3dadd(-30.08, 149.5, 18.17, 0.56)
	pt3dadd(-30.08, 150.1, 18.17, 0.56)
	pt3dadd(-29.61, 151.1, 18.54, 0.56)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
}


		
	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))
	}

	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) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5   ,  0.30246 ,        0.5     ,    0.5 ,    0.24805   ,  0.15296  ,   0.47944) 
for i= 0 , 6 { 
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 , 6 { 
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 GranuleCell13
//************************************************************************************************************