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

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

ndend1=17

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


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


	pdend  = new SectionList()
		for i=1, 7 	dend[i] pdend.append()
		dend[9] pdend.append()


	mdend  = new SectionList()
		dend[8] mdend.append()
		for i=10, 16 	dend[i] mdend.append()
		

				

// 	ddend  = new SectionList()
// 		dend[13] 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[1](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[7](1)
  for i = 11, 12 connect dend[i](0), dend[9](1)
  for i = 13, 14 connect dend[i](0), dend[10](1)
  for i = 15, 16 connect dend[i](0), dend[11](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.6784, -38, 0.01, 0.2)
// 	pt3dadd(0.6784, -18, 0.01, 10)
//   }
  soma {pt3dclear()
	pt3dadd(-0.459, -18, 0.01, 10)
	pt3dadd(-0.459, -0.427, 0, 8.056)
  }
  dend {pt3dclear()
	pt3dadd(-0.459, -0.427, 0, 8.056)
	pt3dadd(-2.83, -4.58, 0, 2.6)
	pt3dadd(-3.48, -5.49, 0.35, 2.5)
	pt3dadd(-3.57, -6.41, 1.3, 2.13)
	pt3dadd(-3.75, -7.42, 1.29, 1.95)
	pt3dadd(-4.03, -8.44, 2.18, 2.13)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(-0.459, -0.427, 0, 8.056)
// 	pt3dadd(0.93, 4.96, -0.03, 1.3)
// 	pt3dadd(1.48, 5.88, 0.74, 1.02)
// 	pt3dadd(1.58, 6.8, 0.74, 1.02)
// 	pt3dadd(1.95, 7.81, 0.74, 0.74)
// 	pt3dadd(2.6, 8.36, 1.3, 0.74)
// 	pt3dadd(3.8, 9.1, 0.54, 0.74)
// 	pt3dadd(4.45, 10.29, 1.39, 0.56)
// 	pt3dadd(4.92, 11.58, 1.6, 0.56)
// 	pt3dadd(5.38, 12.41, 1.63, 0.65)
// 	pt3dadd(5.66, 13.14, 1.53, 0.65)
// 	pt3dadd(5.84, 13.88, 1.72, 0.65)
// 	pt3dadd(6.47, 13.77, 1.1, 0.65)
// 	pt3dadd(6.66, 14.5, 1.1, 0.65)
// 	pt3dadd(6.75, 16.07, 1.81, 0.56)
// 	pt3dadd(7.12, 16.8, 1.73, 0.56)
// 	pt3dadd(6.75, 17.9, 2.17, 0.56)
// 	pt3dadd(7.4, 18.91, 2.73, 0.56)
// 	pt3dadd(6.93, 19.56, 2.73, 0.56)
// 	pt3dadd(7.03, 20.66, 3.07, 0.56)
// 	pt3dadd(7.12, 21.76, 3.95, 0.56)
// 	pt3dadd(7.03, 22.68, 4.23, 0.56)
// 	pt3dadd(7.4, 23.97, 4.47, 0.56)
// 	pt3dadd(7.4, 25.26, 4.95, 0.56)
// 	pt3dadd(7.49, 26.08, 4.95, 0.56)
// 	pt3dadd(7.31, 26.91, 4.95, 0.56)
// 	pt3dadd(7.4, 27.92, 5.49, 0.56)
// 	pt3dadd(7.68, 28.59, 4.93, 0.56)
// 	pt3dadd(7.59, 29.33, 4.93, 0.56)
// 	pt3dadd(8.24, 30.25, 5.83, 0.56)
// 	pt3dadd(8.33, 31.26, 5.78, 0.56)
// 	pt3dadd(8.52, 32.36, 5.92, 0.56)
// 	pt3dadd(8.71, 33.56, 6.61, 0.56)
// 	pt3dadd(9.26, 34.39, 6.61, 0.56)
// 	pt3dadd(9.73, 35.49, 6.68, 0.56)
// 	pt3dadd(10.19, 36.13, 6.68, 0.83)
// 	pt3dadd(10.28, 37.05, 7.21, 0.56)
// 	pt3dadd(9.73, 37.14, 7.43, 0.56)
// 	pt3dadd(9.63, 37.6, 7.48, 0.56)
// 	pt3dadd(10.19, 38.15, 7.51, 0.56)
// 	pt3dadd(10.1, 38.98, 7.55, 0.56)
// 	pt3dadd(10.93, 39.9, 8.24, 0.56)
// 	pt3dadd(10.93, 40.82, 9.07, 0.56)
// 	pt3dadd(10.75, 41.55, 9.07, 0.56)
// 	pt3dadd(11.4, 42.38, 9.07, 0.56)
// 	pt3dadd(11.19, 42.99, 8.39, 0.56)
// 	pt3dadd(11.75, 43.55, 8.39, 0.56)
// 	pt3dadd(11.75, 44.56, 8.38, 0.56)
// 	pt3dadd(12.4, 45.48, 9.02, 0.56)
// 	pt3dadd(12.03, 46.21, 9.72, 0.56)
// 	pt3dadd(12.31, 47.77, 9.72, 0.56)
// 	pt3dadd(12.4, 49.06, 10.12, 0.56)
// 	pt3dadd(12.68, 49.89, 10.34, 0.56)
// 	pt3dadd(12.31, 50.62, 10.34, 0.56)
// 	pt3dadd(12.58, 51.73, 10.79, 0.56)
// 	pt3dadd(12.77, 52.74, 10.79, 0.65)
// 	pt3dadd(12.21, 54.48, 10.37, 0.56)
// 	pt3dadd(12.4, 54.94, 10.37, 0.56)
// 	pt3dadd(12.03, 56.05, 10.83, 0.56)
// 	pt3dadd(12.08, 56.99, 11.58, 0.56)
// 	pt3dadd(11.9, 58.27, 11.58, 0.56)
// 	pt3dadd(11.99, 59.19, 11.86, 0.56)
// 	pt3dadd(12.08, 60.48, 11.86, 0.65)
// 	pt3dadd(11.44, 61.4, 12.14, 0.65)
// 	pt3dadd(11.06, 62.41, 12.09, 0.65)
// 	pt3dadd(10.97, 63.51, 11.55, 0.65)
// 	pt3dadd(11.16, 64.62, 12.74, 0.83)
// 	pt3dadd(10.97, 65.44, 12.75, 0.74)
// 	pt3dadd(10.88, 66.64, 12.57, 0.65)
// 	pt3dadd(10.6, 67.74, 12.61, 0.56)
// 	pt3dadd(10.69, 68.94, 12.96, 0.65)
// 	pt3dadd(10.69, 69.67, 12.96, 0.65)
// 	pt3dadd(10.42, 70.68, 13.49, 0.83)
// 	pt3dadd(10.11, 71.89, 13.69, 1.02)
// 	pt3dadd(9.93, 72.9, 13.67, 0.56)
// 	pt3dadd(9.46, 73.54, 13.8, 0.56)
// 	pt3dadd(8.72, 74.09, 13.8, 0.56)
//   }
  dend[1] {pt3dclear()
	pt3dadd(-4.03, -8.44, 2.18, 2.13)
	pt3dadd(-4.74, -9.78, 3.94, 1.86)
	pt3dadd(-4.93, -10.33, 3.94, 1.95)
  }
  dend[2] {pt3dclear()
	pt3dadd(-4.03, -8.44, 2.18, 2.13)
	pt3dadd(-2.83, -9.35, 2.39, 0.83)
	pt3dadd(-2.73, -10.46, 1.52, 0.83)
	pt3dadd(-2.27, -10.83, 2.6, 0.74)
	pt3dadd(-1.43, -10.92, 1.74, 0.93)
	pt3dadd(-0.51, -10.73, 1.7, 0.93)
	pt3dadd(0.42, -10.27, 1.34, 0.93)
	pt3dadd(1.07, -10.18, 1.44, 0.74)
	pt3dadd(0.79, -10.83, 2.09, 0.56)
	pt3dadd(-0.04, -11.56, 2.09, 0.56)
	pt3dadd(-0.88, -12.39, 1.97, 0.56)
	pt3dadd(-1.53, -12.94, 1.97, 0.56)
	pt3dadd(-1.49, -14.29, 1.97, 0.56)
	pt3dadd(-1.59, -15.39, 2.53, 0.56)
	pt3dadd(-1.59, -16.49, 2.66, 0.56)
	pt3dadd(-1.59, -17.87, 2.72, 0.56)
	pt3dadd(-1.59, -18.51, 2.72, 0.56)
	pt3dadd(-1.12, -18.88, 2.72, 0.56)
  }
  dend[3] {pt3dclear()
	pt3dadd(-4.93, -10.33, 3.94, 1.95)
	pt3dadd(-6.22, -10.63, 4.15, 1.02)
	pt3dadd(-7.43, -11.46, 4.33, 1.02)
	pt3dadd(-8.17, -12.19, 4.8, 1.02)
	pt3dadd(-9.56, -13.02, 4.8, 1.02)
	pt3dadd(-10.68, -13.39, 4.21, 0.83)
	pt3dadd(-11.97, -13.57, 3.98, 0.74)
	pt3dadd(-13.37, -13.39, 4.69, 0.74)
	pt3dadd(-14.85, -13.39, 4.19, 0.65)
	pt3dadd(-16.8, -13.57, 4.77, 0.65)
	pt3dadd(-18, -13.94, 4.1, 0.65)
	pt3dadd(-19.67, -14.12, 3.33, 0.65)
	pt3dadd(-20.79, -14.77, 2.57, 0.65)
	pt3dadd(-21.71, -15.04, 2.92, 0.74)
  }
  dend[4] {pt3dclear()
	pt3dadd(-4.93, -10.33, 3.94, 1.95)
	pt3dadd(-4.37, -12.26, 4.77, 1.48)
	pt3dadd(-4.28, -13.83, 4.94, 1.3)
	pt3dadd(-4.18, -15.21, 5.25, 1.3)
	pt3dadd(-3.91, -16.22, 4.95, 1.3)
	pt3dadd(-3.81, -17.5, 5.52, 1.3)
  }
  dend[5] {pt3dclear()
	pt3dadd(-21.71, -15.04, 2.92, 0.74)
	pt3dadd(-21.99, -15.87, 3.69, 0.56)
	pt3dadd(-22.18, -16.79, 3.1, 0.56)
	pt3dadd(-22.64, -17.71, 3.1, 0.56)
	pt3dadd(-23.38, -18.17, 3.76, 0.56)
	pt3dadd(-24.22, -18.99, 4.09, 0.56)
	pt3dadd(-25.98, -20.46, 4.46, 0.56)
	pt3dadd(-26.91, -21.38, 4.15, 0.56)
	pt3dadd(-27.93, -22.21, 4.5, 0.56)
	pt3dadd(-28.58, -22.85, 4.62, 0.56)
	pt3dadd(-29.51, -23.13, 4.46, 0.56)
	pt3dadd(-30.34, -23.77, 4.03, 0.56)
  }
  dend[6] {pt3dclear()
	pt3dadd(-21.71, -15.04, 2.92, 0.74)
	pt3dadd(-23.01, -15.04, 3.25, 0.56)
	pt3dadd(-24.03, -15.87, 1.84, 0.56)
	pt3dadd(-25.42, -16.42, 3.43, 0.56)
	pt3dadd(-26.82, -16.88, 2.63, 0.56)
	pt3dadd(-28.21, -17.34, 3.11, 0.56)
  }
  dend[7] {pt3dclear()
	pt3dadd(-3.81, -17.5, 5.52, 1.3)
	pt3dadd(-3.09, -18.92, 6.05, 1.21)
	pt3dadd(-2.44, -19.65, 7.34, 0.93)
	pt3dadd(-1.6, -20.48, 7.8, 0.93)
	pt3dadd(-1.23, -21.31, 7.8, 1.11)
	pt3dadd(-0.49, -22.5, 7.8, 1.11)
	pt3dadd(0.25, -22.96, 7.43, 0.83)
	pt3dadd(1.37, -23.61, 7.3, 0.74)
	pt3dadd(2.2, -24.16, 7.98, 0.74)
	pt3dadd(3.13, -24.62, 7.99, 0.74)
	pt3dadd(3.96, -24.99, 8.1, 0.74)
	pt3dadd(4.8, -25.81, 8.22, 0.65)
  }
  dend[8] {pt3dclear()
	pt3dadd(-3.81, -17.5, 5.52, 1.3)
	pt3dadd(-4.46, -19.53, 4.76, 0.65)
	pt3dadd(-4.74, -21.27, 5.76, 0.56)
	pt3dadd(-5.11, -22.65, 4.93, 0.56)
	pt3dadd(-5.3, -24.03, 4.93, 0.56)
	pt3dadd(-5.48, -26.14, 4.76, 0.56)
	pt3dadd(-5.3, -27.43, 5.1, 1.11)
	pt3dadd(-5.58, -28.72, 5.1, 0.56)
	pt3dadd(-6.13, -29.73, 5.42, 0.56)
	pt3dadd(-6.41, -31.02, 5.42, 0.56)
	pt3dadd(-6.69, -32.3, 5.44, 0.56)
	pt3dadd(-7.24, -33.87, 5.95, 0.56)
	pt3dadd(-7.71, -35.24, 5.95, 0.65)
	pt3dadd(-8.17, -36.81, 5.39, 0.65)
	pt3dadd(-8.36, -37.82, 5.22, 0.65)
	pt3dadd(-8.36, -39.2, 5.51, 0.65)
	pt3dadd(-8.54, -40.85, 5.38, 0.65)
	pt3dadd(-9.01, -42.23, 5.38, 0.65)
	pt3dadd(-9.93, -43.15, 5.38, 0.65)
	pt3dadd(-10.68, -44.34, 5.38, 0.65)
	pt3dadd(-11.14, -45.63, 5.81, 0.65)
	pt3dadd(-11.51, -47.19, 5.81, 0.65)
	pt3dadd(-11.6, -48.11, 5.54, 0.65)
	pt3dadd(-11.42, -49.31, 5.54, 0.65)
	pt3dadd(-11.57, -51.06, 6.2, 0.65)
	pt3dadd(-11.85, -52.26, 6.22, 0.65)
	pt3dadd(-12.22, -53.73, 6.22, 0.83)
	pt3dadd(-12.31, -55.2, 6.65, 0.83)
	pt3dadd(-12.68, -55.93, 6.65, 0.65)
	pt3dadd(-12.87, -56.76, 5.89, 0.65)
	pt3dadd(-13.61, -57.68, 6.67, 0.65)
	pt3dadd(-14.35, -58.42, 6.67, 0.65)
	pt3dadd(-15.38, -59.43, 6.16, 0.56)
	pt3dadd(-16.02, -60.71, 6.86, 0.65)
	pt3dadd(-16.58, -62, 7.24, 0.56)
	pt3dadd(-17.42, -63.01, 6.53, 0.56)
	pt3dadd(-17.88, -63.75, 6.53, 0.74)
	pt3dadd(-18.25, -64.76, 7.22, 0.65)
	pt3dadd(-18.16, -65.77, 7.22, 0.65)
	pt3dadd(-18.25, -66.5, 6.4, 0.65)
	pt3dadd(-18.44, -67.24, 6.4, 0.65)
  }
  dend[9] {pt3dclear()
	pt3dadd(4.8, -25.81, 8.22, 0.65)
	pt3dadd(5.94, -26.57, 7.83, 0.46)
	pt3dadd(7.15, -27.21, 8.29, 0.46)
  }
}
proc shape3d_2() {
  dend[9] {	pt3dadd(7.8, -27.77, 8, 0.46)
	pt3dadd(8.54, -27.86, 8.08, 0.46)
	pt3dadd(9.28, -28.41, 8.13, 0.46)
	pt3dadd(10.02, -29.05, 8.61, 0.46)
	pt3dadd(10.86, -29.6, 8.61, 0.46)
	pt3dadd(11.79, -30.06, 8.8, 0.56)
	pt3dadd(12.34, -30.8, 8.51, 0.56)
	pt3dadd(12.71, -31.44, 8.51, 0.65)
	pt3dadd(13.36, -31.99, 7.77, 0.56)
	pt3dadd(14.1, -32.64, 7.9, 0.56)
	pt3dadd(14.94, -33.1, 7.61, 0.56)
	pt3dadd(15.22, -33.56, 7.61, 0.56)
	pt3dadd(15.96, -34.11, 7.86, 0.56)
	pt3dadd(16.61, -34.57, 7.63, 0.56)
	pt3dadd(16.7, -34.93, 7.41, 1.02)
	pt3dadd(16.89, -35.49, 7.41, 1.02)
	pt3dadd(17.44, -36.13, 7.17, 0.65)
	pt3dadd(17.72, -36.68, 7.41, 0.65)
  }
  dend[10] {pt3dclear()
	pt3dadd(4.8, -25.81, 8.22, 0.65)
	pt3dadd(5.35, -27.01, 7.21, 0.65)
	pt3dadd(5.91, -27.47, 7.88, 0.65)
	pt3dadd(6, -28.48, 7.88, 0.65)
	pt3dadd(5.91, -29.58, 7.86, 0.65)
	pt3dadd(5.91, -30.59, 8.17, 0.56)
	pt3dadd(5.91, -31.51, 8.59, 0.56)
	pt3dadd(6.1, -32.15, 8.59, 0.56)
	pt3dadd(5.82, -33.07, 8.96, 0.56)
	pt3dadd(6.28, -34.36, 8, 0.56)
	pt3dadd(7.02, -35.1, 8.04, 0.46)
	pt3dadd(7.3, -36.2, 8.1, 0.46)
	pt3dadd(7.84, -37.5, 8.85, 0.46)
	pt3dadd(7.93, -39.16, 8.24, 0.46)
	pt3dadd(8.4, -40.17, 9.39, 0.46)
	pt3dadd(8.86, -41.73, 8.38, 0.46)
	pt3dadd(9.33, -42.93, 8.65, 0.46)
	pt3dadd(9.97, -44.12, 8.66, 0.46)
	pt3dadd(10.53, -45.59, 9.08, 0.46)
	pt3dadd(11.55, -46.69, 9.63, 0.46)
	pt3dadd(11.92, -48.07, 9.04, 0.46)
	pt3dadd(12.11, -49.08, 8.74, 0.46)
	pt3dadd(12.11, -50.19, 8.74, 0.46)
	pt3dadd(12.57, -51.38, 8.74, 0.46)
	pt3dadd(12.85, -52.85, 9.19, 0.46)
	pt3dadd(12.39, -53.5, 9.24, 0.46)
	pt3dadd(12.11, -54.23, 9.24, 0.46)
	pt3dadd(11.9, -55.59, 9.94, 0.46)
	pt3dadd(11.9, -57.06, 10.41, 0.46)
	pt3dadd(11.81, -58.44, 9.67, 0.46)
	pt3dadd(11.34, -59.81, 9.86, 0.46)
	pt3dadd(11.9, -61.01, 10.16, 0.46)
	pt3dadd(12.46, -61.84, 10.25, 0.46)
	pt3dadd(12.46, -63.12, 10.3, 0.46)
	pt3dadd(12.83, -64.04, 10.2, 0.46)
	pt3dadd(13.48, -65.7, 9.93, 0.46)
	pt3dadd(13.38, -66.43, 11.48, 0.56)
	pt3dadd(13.75, -67.44, 11.6, 0.56)
	pt3dadd(13.75, -68.09, 11.43, 0.56)
  }
  dend[11] {pt3dclear()
	pt3dadd(17.72, -36.68, 7.41, 0.65)
	pt3dadd(18.46, -37.49, 7.41, 0.46)
	pt3dadd(19.58, -38.32, 7.2, 0.46)
  }
  dend[12] {pt3dclear()
	pt3dadd(17.72, -36.68, 7.41, 0.65)
	pt3dadd(17.44, -37.97, 6.89, 0.46)
	pt3dadd(16.98, -38.98, 7.1, 0.46)
	pt3dadd(16.61, -39.44, 6.74, 0.46)
	pt3dadd(16.15, -40.17, 7.74, 0.46)
	pt3dadd(15.31, -40.73, 7.31, 0.46)
	pt3dadd(14.66, -41.37, 7.61, 0.46)
	pt3dadd(14.01, -42.01, 7.3, 0.46)
	pt3dadd(13.36, -42.66, 7.19, 0.46)
	pt3dadd(12.99, -43.39, 7.6, 0.46)
	pt3dadd(12.62, -44.03, 7.71, 0.46)
	pt3dadd(12.16, -44.68, 7.71, 0.46)
  }
  dend[13] {pt3dclear()
	pt3dadd(13.75, -68.09, 11.43, 0.56)
	pt3dadd(13.99, -69.33, 10.88, 0.56)
	pt3dadd(14.08, -70.34, 10.88, 0.56)
	pt3dadd(14.17, -71.63, 11.79, 0.56)
	pt3dadd(14.36, -72.46, 12.03, 0.56)
	pt3dadd(14.73, -73.38, 12.07, 0.56)
	pt3dadd(15.29, -74.11, 12.14, 0.56)
	pt3dadd(16.03, -75.12, 13.01, 0.56)
	pt3dadd(16.58, -76.5, 13.01, 0.56)
	pt3dadd(17.05, -77.7, 12.96, 0.56)
	pt3dadd(17.33, -78.61, 12.14, 0.56)
	pt3dadd(17.51, -79.9, 13.23, 0.56)
	pt3dadd(17.88, -80.73, 13.68, 0.56)
	pt3dadd(18.07, -81.92, 13.16, 0.56)
	pt3dadd(18.25, -82.93, 13.16, 0.56)
  }
  dend[14] {pt3dclear()
	pt3dadd(13.75, -68.09, 11.43, 0.56)
	pt3dadd(14.77, -69.19, 12.06, 0.56)
	pt3dadd(15.15, -70.02, 11.76, 0.56)
	pt3dadd(15.33, -71.12, 12.09, 0.56)
	pt3dadd(15.98, -71.86, 11.89, 0.56)
	pt3dadd(16.17, -72.68, 11.89, 0.56)
	pt3dadd(16.44, -73.33, 12.2, 0.56)
	pt3dadd(16.63, -74.06, 12.37, 0.56)
  }
  dend[15] {pt3dclear()
	pt3dadd(19.58, -38.32, 7.2, 0.46)
	pt3dadd(20.41, -38.86, 7.14, 0.65)
	pt3dadd(21.43, -39.59, 6.08, 0.65)
	pt3dadd(22.54, -40.14, 5.5, 0.65)
	pt3dadd(23.38, -41.06, 4.87, 0.65)
	pt3dadd(24.12, -41.89, 4.77, 0.65)
	pt3dadd(25.05, -42.63, 4.48, 0.56)
	pt3dadd(25.98, -43.45, 5.32, 0.56)
	pt3dadd(27.09, -44.28, 4.62, 0.56)
	pt3dadd(28.11, -44.83, 4.66, 0.56)
	pt3dadd(29.5, -45.11, 4.46, 0.56)
	pt3dadd(30.62, -45.29, 5.1, 0.56)
	pt3dadd(31.82, -45.38, 4.55, 0.56)
	pt3dadd(33.03, -45.38, 4.62, 0.56)
	pt3dadd(34.14, -45.66, 4.05, 0.56)
	pt3dadd(34.97, -46.21, 3.86, 0.56)
	pt3dadd(36, -46.3, 4.81, 0.56)
	pt3dadd(37.29, -46.67, 4.01, 0.56)
	pt3dadd(38.41, -46.85, 3.38, 0.56)
	pt3dadd(39.24, -47.22, 3.38, 0.56)
	pt3dadd(40.26, -47.59, 3.18, 0.56)
	pt3dadd(41.65, -47.96, 3.36, 0.56)
	pt3dadd(43.05, -48.88, 2.76, 0.56)
	pt3dadd(44.16, -49.52, 2.43, 0.56)
	pt3dadd(45.55, -50.07, 2.01, 0.56)
	pt3dadd(46.48, -50.44, 2.58, 0.56)
	pt3dadd(47.41, -50.9, 1.58, 0.56)
	pt3dadd(47.98, -51.11, 2.54, 0.65)
	pt3dadd(48.91, -50.92, 2.54, 0.65)
	pt3dadd(49.47, -51.38, 2.29, 0.65)
	pt3dadd(50.21, -51.2, 1.97, 0.65)
	pt3dadd(51.14, -51.38, 2.45, 0.65)
	pt3dadd(51.88, -51.75, 1.44, 0.65)
	pt3dadd(52.71, -51.75, 2.07, 0.56)
	pt3dadd(53.36, -51.84, 1.91, 0.56)
	pt3dadd(53.92, -51.84, 1.91, 0.56)
  }
  dend[16] {pt3dclear()
	pt3dadd(19.58, -38.32, 7.2, 0.46)
	pt3dadd(20.23, -39.7, 7.37, 0.46)
	pt3dadd(21.15, -40.62, 7.78, 0.46)
	pt3dadd(21.8, -41.63, 6.97, 0.46)
	pt3dadd(22.64, -42.36, 7.5, 0.46)
	pt3dadd(23.57, -43.1, 7.5, 0.46)
	pt3dadd(24.31, -43.92, 6.98, 0.46)
	pt3dadd(25.05, -44.75, 7.44, 0.46)
	pt3dadd(25.68, -45.54, 7.67, 0.46)
	pt3dadd(26.51, -46.37, 6.72, 0.46)
	pt3dadd(26.97, -46.83, 6.63, 0.46)
	pt3dadd(27.53, -47.74, 7.58, 0.46)
	pt3dadd(28.37, -48.11, 6.76, 0.65)
	pt3dadd(29.29, -49.03, 7.68, 0.56)
	pt3dadd(30.13, -49.86, 6.73, 0.56)
	pt3dadd(31.06, -50.96, 7.56, 0.56)
	pt3dadd(32.26, -51.7, 6.8, 0.56)
	pt3dadd(33.1, -52.52, 7.38, 0.56)
	pt3dadd(33.84, -53.53, 7.38, 0.56)
	pt3dadd(34.58, -54.27, 6.72, 0.56)
	pt3dadd(35.79, -55.19, 7.17, 0.56)
	pt3dadd(36.16, -56.2, 7.17, 0.56)
	pt3dadd(36.81, -57.12, 7.17, 0.56)
	pt3dadd(37.18, -57.4, 6.95, 0.56)
	pt3dadd(37.64, -57.76, 6.95, 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  , 7 ,  8  , 9 , 10) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5  ,       0.5     ,    0.5      ,   0.5,         0.5     ,    0.5   ,      0.5   ,      0.5   ,  0.27719   ,  0.48092,     0.17846) 
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 GranuleCell23
//************************************************************************************************************