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

// Original name on neuroMorpho.org n32-r05-01-sl4.CNG.swc

ndend1=11

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


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


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

	ddend  = new SectionList()
		for i=9, 10 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[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[7](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(1.092, -38, 1.24, 0.2)
// 	pt3dadd(1.092, -18, 1.24, 10)
//   }
  soma {pt3dclear()
	pt3dadd(1.092, -18, 1.24, 10)
	pt3dadd(1.092, -1.016, 1.23, 8.26)
  }
  dend {pt3dclear()
	pt3dadd(1.092, -1.016, 1.23, 8.26)
	pt3dadd(4.86, -4.31, 0, 3.62)
	pt3dadd(5.42, -5.32, 0, 3.43)
	pt3dadd(6.44, -6.33, 0.15, 2.78)
	pt3dadd(6.99, -7.34, -0.03, 2.41)
	pt3dadd(7.74, -8.17, 0.16, 2.13)
	pt3dadd(8.29, -8.81, 0.51, 2.13)
	pt3dadd(8.94, -9.36, 0.29, 2.13)
	pt3dadd(9.68, -10.16, 1.36, 2.04)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(1.092, -1.016, 1.23, 8.26)
// 	pt3dadd(-3.88, -1.64, 0.12, 2.5)
// 	pt3dadd(-5.83, -1.92, 2.12, 2.5)
// 	pt3dadd(-7.5, -2.19, 2.12, 2.23)
// 	pt3dadd(-8.42, -2.19, 2.57, 1.86)
// 	pt3dadd(-9.72, -2.38, 2.91, 1.3)
// 	pt3dadd(-10.74, -2.84, 3.67, 1.21)
// 	pt3dadd(-12.13, -3.02, 4.22, 1.21)
// 	pt3dadd(-13.34, -3.21, 4.22, 1.02)
// 	pt3dadd(-14.45, -3.21, 4.22, 1.02)
// 	pt3dadd(-15.38, -3.39, 4.51, 0.83)
// 	pt3dadd(-15.66, -4.31, 3.61, 0.83)
// 	pt3dadd(-16.03, -5.32, 3.61, 1.11)
// 	pt3dadd(-17.33, -4.86, 3.59, 0.83)
// 	pt3dadd(-17.89, -3.57, 3.1, 0.83)
// 	pt3dadd(-18.07, -2.29, 3.1, 0.83)
// 	pt3dadd(-18.53, -1.37, 2.83, 0.83)
// 	pt3dadd(-19, -0.26, 2.63, 0.74)
// 	pt3dadd(-19.65, 0.2, 2.63, 0.74)
// 	pt3dadd(-20.76, 0.1, 2.63, 0.74)
// 	pt3dadd(-20.56, 0.69, 0.82, 0.74)
// 	pt3dadd(-21.02, 1.79, 0.82, 0.74)
// 	pt3dadd(-21.67, 0.96, 0.3, 0.74)
// 	pt3dadd(-22.32, 1.33, 0.35, 0.65)
// 	pt3dadd(-22.23, 2.16, 0.35, 0.65)
// 	pt3dadd(-22.41, 2.71, -0.07, 0.56)
// 	pt3dadd(-22.23, 3.35, -0.07, 0.56)
// 	pt3dadd(-23.06, 3.54, -0.57, 0.56)
// 	pt3dadd(-23.99, 2.98, -0.57, 0.56)
// 	pt3dadd(-25.01, 2.8, -0.67, 0.56)
// 	pt3dadd(-25.75, 2.71, -0.96, 0.56)
// 	pt3dadd(-26.96, 3.35, -0.96, 0.56)
// 	pt3dadd(-27.52, 4.09, -1.22, 0.56)
// 	pt3dadd(-27.89, 4.91, -1.22, 0.56)
// 	pt3dadd(-28.63, 4.91, -1.46, 0.56)
// 	pt3dadd(-29.37, 5.1, -0.73, 0.56)
// 	pt3dadd(-30.58, 5.37, -0.73, 0.56)
// 	pt3dadd(-31.5, 5.56, -1.18, 0.56)
// 	pt3dadd(-31.97, 6.2, -1.18, 0.56)
// 	pt3dadd(-32.71, 6.66, -0.55, 0.56)
// 	pt3dadd(-33.45, 7.12, -0.42, 0.56)
// 	pt3dadd(-33.73, 7.76, -0.45, 0.56)
// 	pt3dadd(-34.29, 8.59, -0.52, 0.56)
//   }
//   dendrite[1] {pt3dclear()
// 	pt3dadd(1.092, -1.016, 1.23, 8.26)
// 	pt3dadd(0.34, 2.86, -1.95, 0.83)
// 	pt3dadd(0.71, 3.59, -1.95, 0.83)
// 	pt3dadd(0.24, 4.33, -1.34, 0.74)
// 	pt3dadd(0.61, 4.88, -2.74, 0.65)
// 	pt3dadd(0.8, 5.71, -2.59, 0.56)
// 	pt3dadd(1.08, 6.63, -3.01, 0.56)
// 	pt3dadd(1.36, 7.36, -2.31, 0.56)
// 	pt3dadd(1.94, 8.59, -2.01, 0.56)
// 	pt3dadd(2.4, 9.23, -2.18, 0.56)
// 	pt3dadd(3.05, 10.61, -2.67, 0.56)
// 	pt3dadd(4.35, 10.98, -2.8, 0.65)
// 	pt3dadd(3.98, 11.62, -3.53, 0.65)
// 	pt3dadd(4.63, 12.45, -3.77, 0.56)
// 	pt3dadd(5, 13.37, -3.77, 0.65)
// 	pt3dadd(4.44, 14.2, -3.77, 0.56)
// 	pt3dadd(4.26, 15.39, -4.31, 0.56)
// 	pt3dadd(4.26, 16.22, -4.31, 0.56)
// 	pt3dadd(4.54, 17.32, -4.32, 0.65)
// 	pt3dadd(4.72, 18.33, -4.32, 0.56)
// 	pt3dadd(5, 19.16, -4.32, 0.56)
// 	pt3dadd(4.72, 19.89, -4.08, 0.74)
// 	pt3dadd(4.44, 20.72, -3.68, 0.65)
// 	pt3dadd(4.16, 21.83, -3.68, 0.74)
// 	pt3dadd(3.7, 22.38, -3.68, 0.74)
// 	pt3dadd(3.22, 22.94, -4.18, 0.56)
// 	pt3dadd(2.48, 23.31, -4.18, 0.56)
// 	pt3dadd(2.02, 23.77, -4.11, 0.56)
// 	pt3dadd(2.02, 24.32, -4.11, 0.56)
// 	pt3dadd(1.28, 24.96, -4.28, 0.56)
// 	pt3dadd(1, 26.15, -4.47, 0.56)
// 	pt3dadd(0.07, 26.71, -3.9, 0.56)
// 	pt3dadd(-0.67, 27.63, -3.87, 0.56)
// 	pt3dadd(-1.6, 28.64, -4.38, 0.56)
// 	pt3dadd(-1.6, 29.28, -3.79, 0.65)
// 	pt3dadd(-2.25, 29.65, -4.48, 0.56)
// 	pt3dadd(-2.8, 29.83, -4.29, 0.65)
// 	pt3dadd(-3.08, 30.38, -4.15, 0.56)
// 	pt3dadd(-3.64, 31.3, -3.92, 0.74)
// 	pt3dadd(-3.27, 32.13, -3.92, 0.56)
// 	pt3dadd(-2.99, 32.96, -4.75, 0.65)
// 	pt3dadd(-2.9, 33.97, -3.98, 0.46)
// 	pt3dadd(-2.8, 35.16, -4.36, 0.46)
// 	pt3dadd(-2.62, 36.45, -4.51, 0.46)
// 	pt3dadd(-2.53, 37.28, -4.16, 0.46)
// 	pt3dadd(-2.39, 38.58, -4.16, 0.46)
// 	pt3dadd(-3.13, 39.32, -3.89, 0.65)
// 	pt3dadd(-3.6, 39.96, -3.89, 0.56)
// 	pt3dadd(-3.69, 40.79, -4.05, 0.83)
// 	pt3dadd(-3.6, 41.71, -4.05, 0.65)
// 	pt3dadd(-3.22, 42.63, -4.09, 0.56)
// 	pt3dadd(-2.67, 43.64, -4.09, 0.65)
// 	pt3dadd(-2.58, 44.65, -4.33, 0.83)
// 	pt3dadd(-2.48, 45.75, -3.78, 0.83)
// 	pt3dadd(-2.3, 46.76, -3.72, 0.83)
// 	pt3dadd(-2.3, 47.68, -4.46, 0.56)
// 	pt3dadd(-2.2, 48.88, -4.36, 0.74)
// 	pt3dadd(-1.93, 49.98, -4.36, 0.65)
// 	pt3dadd(-1.83, 51.17, -4.36, 0.56)
// 	pt3dadd(-1.83, 51.91, -4.36, 0.56)
// 	pt3dadd(-2.11, 52.46, -4.36, 0.65)
// 	pt3dadd(-2.45, 53.32, -4.47, 0.65)
// 	pt3dadd(-2.54, 54.24, -3.49, 1.21)
//   }
  dend[1] {pt3dclear()
	pt3dadd(9.68, -10.16, 1.36, 2.04)
	pt3dadd(10.77, -10.59, 1.11, 1.11)
	pt3dadd(11.88, -10.96, 1.49, 1.3)
	pt3dadd(13.18, -12.06, 0.98, 1.3)
	pt3dadd(14.39, -12.43, 0.98, 1.58)
	pt3dadd(15.59, -13.17, 0.65, 1.21)
	pt3dadd(16.43, -14.45, 0.65, 1.21)
	pt3dadd(17.45, -15.1, -0.03, 1.21)
	pt3dadd(18.84, -15.56, -0.41, 1.39)
	pt3dadd(19.86, -16.11, -1.11, 1.67)
	pt3dadd(20.88, -16.38, -1.33, 1.76)
	pt3dadd(21.81, -17.21, -1.32, 1.76)
	pt3dadd(22.55, -17.76, -1.29, 1.76)
	pt3dadd(23.37, -18.76, 0.38, 1.76)
	pt3dadd(24.3, -19.59, -0.32, 1.48)
	pt3dadd(25.32, -20.51, -0.32, 1.48)
	pt3dadd(26.15, -21.33, -0.91, 1.3)
	pt3dadd(26.99, -22.07, -0.91, 1.3)
	pt3dadd(27.45, -22.71, -0.58, 1.48)
  }
  dend[2] {pt3dclear()
	pt3dadd(9.68, -10.16, 1.36, 2.04)
	pt3dadd(10.05, -11.81, 1.78, 1.3)
	pt3dadd(10.79, -13.01, 1.78, 1.3)
	pt3dadd(11.35, -13.84, 1.17, 1.02)
	pt3dadd(12.09, -15.21, 1.14, 0.93)
	pt3dadd(12.92, -16.04, 1.86, 0.93)
	pt3dadd(13.48, -16.78, 1.86, 1.02)
	pt3dadd(13.94, -17.42, 1.64, 0.93)
	pt3dadd(14.41, -17.88, 1.55, 1.02)
  }
//   dendrite[2] {pt3dclear()
// 	pt3dadd(-2.54, 54.24, -3.49, 1.21)
// 	pt3dadd(-3.08, 54.99, -3.49, 0.74)
// 	pt3dadd(-3.92, 55.82, -4.31, 0.65)
// 	pt3dadd(-4.66, 56.46, -4.31, 0.65)
// 	pt3dadd(-5.22, 56.83, -4.31, 0.65)
// 	pt3dadd(-5.31, 57.29, -4.31, 0.65)
// 	pt3dadd(-6.05, 57.2, -4.37, 0.65)
// 	pt3dadd(-6.7, 57.75, -4.37, 0.56)
// 	pt3dadd(-6.98, 58.76, -5.24, 0.74)
// 	pt3dadd(-7.16, 59.5, -5.24, 0.74)
// 	pt3dadd(-7.72, 59.5, -4.62, 0.56)
// 	pt3dadd(-7.81, 60.51, -4.62, 0.56)
// 	pt3dadd(-8.46, 61.24, -5.18, 0.56)
// 	pt3dadd(-9.2, 61.7, -5.38, 0.56)
// 	pt3dadd(-9.58, 61.98, -4.69, 0.74)
// 	pt3dadd(-9.48, 62.9, -4.69, 0.74)
// 	pt3dadd(-10.04, 63.45, -5.04, 0.65)
// 	pt3dadd(-10.04, 64.46, -4.32, 0.83)
// 	pt3dadd(-10.22, 65.38, -4.32, 0.93)
// 	pt3dadd(-10.04, 66.76, -5.2, 0.83)
// 	pt3dadd(-10.22, 67.68, -4.5, 0.74)
// 	pt3dadd(-10.78, 68.32, -4.51, 0.65)
// 	pt3dadd(-11.06, 68.87, -4.51, 0.56)
// 	pt3dadd(-11.25, 69.51, -4.63, 0.56)
// 	pt3dadd(-12.08, 69.79, -4.14, 0.56)
// 	pt3dadd(-12.45, 70.43, -4.89, 0.65)
// 	pt3dadd(-12.92, 71.08, -4.36, 0.65)
// 	pt3dadd(-13.55, 71.9, -5.52, 0.65)
// 	pt3dadd(-14.39, 72.27, -5.39, 0.56)
// 	pt3dadd(-15.13, 72.72, -4.81, 0.56)
// 	pt3dadd(-15.69, 73.18, -4.81, 0.56)
// 	pt3dadd(-16.43, 72.63, -4.81, 0.56)
// 	pt3dadd(-17.08, 73.28, -5.37, 0.56)
// 	pt3dadd(-18.56, 73.55, -5.26, 0.56)
// 	pt3dadd(-18.93, 74.29, -5.43, 0.56)
// 	pt3dadd(-19.12, 75.3, -5.43, 0.56)
// 	pt3dadd(-19.21, 76.03, -5.05, 0.56)
// 	pt3dadd(-19.58, 76.49, -4.85, 0.56)
//   }
//   dendrite[3] {pt3dclear()
// 	pt3dadd(-2.54, 54.24, -3.49, 1.21)
// 	pt3dadd(-1.61, 54.52, -3.35, 0.83)
// 	pt3dadd(-0.5, 54.79, -3.35, 0.83)
// 	pt3dadd(0.71, 54.98, -3.91, 0.83)
// 	pt3dadd(1.64, 55.25, -4.15, 0.65)
// 	pt3dadd(2.93, 55.53, -3.88, 0.83)
// 	pt3dadd(3.77, 55.99, -3.88, 0.83)
// 	pt3dadd(4.79, 56.54, -3.19, 0.83)
// 	pt3dadd(5.72, 56.54, -3.88, 0.83)
// 	pt3dadd(6.92, 56.54, -3.88, 0.65)
// 	pt3dadd(8.13, 56.63, -3.59, 0.65)
// 	pt3dadd(9.8, 56.54, -3.84, 0.65)
// 	pt3dadd(10.54, 56.26, -3.32, 0.83)
// 	pt3dadd(11.56, 56.45, -3.32, 0.83)
// 	pt3dadd(12.59, 56.83, -3.09, 0.74)
// 	pt3dadd(13.62, 57.11, -2.86, 0.83)
// 	pt3dadd(14.91, 57.57, -3.59, 0.83)
//   }
}
proc shape3d_2() {
//   dendrite[3] {	pt3dadd(15.66, 57.84, -2.43, 0.65)
//   }
  dend[3] {pt3dclear()
	pt3dadd(27.45, -22.71, -0.58, 1.48)
	pt3dadd(27.75, -24.4, 0.71, 0.65)
	pt3dadd(28.21, -25.51, 1.06, 0.74)
	pt3dadd(28.77, -26.43, 0.56, 0.65)
	pt3dadd(29.33, -27.16, 0.08, 0.65)
	pt3dadd(30.07, -27.8, 0.07, 0.74)
	pt3dadd(31, -28.63, 0.58, 0.74)
	pt3dadd(31.74, -29.27, 0.34, 0.74)
	pt3dadd(32.39, -29.73, -0.04, 0.74)
	pt3dadd(33.04, -30.65, -0.2, 0.74)
	pt3dadd(33.87, -31.66, -0.37, 0.74)
	pt3dadd(34.71, -32.49, -0.53, 0.74)
	pt3dadd(35.36, -33.41, -0.49, 0.74)
	pt3dadd(36.38, -34.33, -0.1, 0.74)
	pt3dadd(37.02, -35.34, 0, 0.65)
	pt3dadd(37.49, -36.26, 0.29, 0.65)
	pt3dadd(37.86, -36.9, -0.5, 0.65)
	pt3dadd(38.6, -37.91, -0.5, 0.83)
	pt3dadd(39.25, -38.83, -0.5, 0.83)
	pt3dadd(39.9, -39.66, -0.92, 0.83)
	pt3dadd(40.55, -40.4, -0.92, 0.74)
	pt3dadd(41.38, -41.64, -0.55, 0.93)
	pt3dadd(42.12, -42.55, -0.78, 0.93)
	pt3dadd(42.77, -43.29, 0.09, 0.93)
	pt3dadd(43.51, -44.3, 0.04, 0.93)
	pt3dadd(44.44, -45.4, 0.04, 1.02)
	pt3dadd(45.18, -45.96, -0.72, 0.83)
	pt3dadd(46.11, -46.87, -0.72, 0.74)
	pt3dadd(46.66, -47.61, 0.03, 0.74)
	pt3dadd(47.5, -48.44, -0.22, 1.02)
	pt3dadd(48.33, -48.9, -0.22, 1.02)
	pt3dadd(49.08, -49.54, -0.29, 1.11)
  }
  dend[4] {pt3dclear()
	pt3dadd(27.45, -22.71, -0.58, 1.48)
	pt3dadd(28.93, -23.54, -0.99, 1.02)
	pt3dadd(29.58, -24.37, -1.54, 0.83)
	pt3dadd(30.33, -25.38, -1.88, 0.74)
	pt3dadd(31.35, -26.2, -1.88, 0.74)
	pt3dadd(32.37, -27.12, -2.23, 0.74)
	pt3dadd(33.29, -27.77, -2.23, 0.83)
	pt3dadd(34.13, -28.69, -2.23, 0.74)
	pt3dadd(34.78, -29.24, -2.53, 0.74)
	pt3dadd(36.08, -30.52, -2.05, 0.83)
	pt3dadd(36.78, -31, -2.06, 0.83)
	pt3dadd(36.97, -32.01, -1.7, 0.74)
	pt3dadd(37.15, -32.75, -1.7, 0.74)
	pt3dadd(37.71, -33.39, -1.59, 0.65)
	pt3dadd(37.9, -34.22, -1.75, 0.56)
	pt3dadd(38.36, -35.5, -1.42, 0.56)
	pt3dadd(39.2, -37.34, -1.02, 0.46)
	pt3dadd(39.84, -38.17, -1.02, 0.46)
	pt3dadd(40.49, -38.63, -1.3, 0.46)
	pt3dadd(41.14, -39.36, -1.33, 0.65)
	pt3dadd(41.79, -39.55, -1.33, 0.46)
	pt3dadd(42.63, -40.01, -1.12, 0.46)
	pt3dadd(43.56, -40.74, -0.98, 0.46)
	pt3dadd(44.2, -41.29, -0.98, 0.46)
	pt3dadd(44.95, -42.21, -0.7, 0.46)
	pt3dadd(45.6, -43.41, -0.66, 0.46)
	pt3dadd(46.06, -44.24, -0.88, 0.46)
	pt3dadd(46.89, -44.97, -0.88, 0.56)
	pt3dadd(47.54, -45.8, -0.64, 0.56)
	pt3dadd(48.1, -46.35, -0.67, 0.56)
	pt3dadd(48.94, -47.64, -0.97, 0.56)
	pt3dadd(49.77, -49.01, -0.97, 0.56)
	pt3dadd(50.42, -49.75, -0.55, 0.56)
	pt3dadd(50.88, -50.48, -1.4, 0.56)
	pt3dadd(51.62, -50.94, -1.4, 0.56)
	pt3dadd(52.55, -51.22, -0.9, 0.56)
	pt3dadd(53.39, -52.04, -1.71, 0.56)
	pt3dadd(54.31, -52.69, -1.48, 0.56)
	pt3dadd(55.24, -52.87, -2.28, 0.46)
	pt3dadd(56.17, -53.33, -2.28, 0.46)
	pt3dadd(56.82, -53.7, -2.68, 0.46)
	pt3dadd(57.65, -53.79, -2.68, 0.46)
	pt3dadd(58.58, -53.97, -2.68, 0.56)
	pt3dadd(59.32, -54.34, -3.16, 0.46)
	pt3dadd(60.07, -54.99, -3.16, 0.46)
	pt3dadd(60.62, -55.45, -3.57, 0.56)
	pt3dadd(61.27, -55.81, -3.3, 0.56)
	pt3dadd(61.74, -56, -3.3, 0.56)
	pt3dadd(62.48, -56.42, -3.3, 0.56)
	pt3dadd(63.22, -56.88, -3.58, 0.56)
	pt3dadd(63.77, -57.15, -3.58, 0.56)
	pt3dadd(64.42, -57.43, -3.58, 0.56)
	pt3dadd(64.7, -57.89, -3.44, 0.65)
	pt3dadd(65.07, -58.25, -3.31, 0.93)
  }
  dend[5] {pt3dclear()
	pt3dadd(14.41, -17.88, 1.55, 1.02)
	pt3dadd(15.33, -18.25, 1.55, 0.74)
	pt3dadd(15.89, -18.89, 1.74, 0.83)
	pt3dadd(16.63, -19.44, 1.74, 0.83)
	pt3dadd(17.47, -19.9, 2.1, 0.83)
	pt3dadd(18.12, -20.55, 1.74, 0.83)
	pt3dadd(18.86, -21.19, 1.78, 0.74)
	pt3dadd(19.6, -21.92, 1.78, 0.74)
	pt3dadd(20.34, -22.66, 1.41, 0.74)
	pt3dadd(20.9, -23.58, 1.41, 0.65)
	pt3dadd(21.18, -23.95, 1.41, 0.65)
	pt3dadd(21.64, -24.68, 1.41, 0.65)
	pt3dadd(22.38, -25.64, 1.41, 0.65)
	pt3dadd(23.03, -26.47, 2.22, 0.65)
	pt3dadd(23.95, -27.21, 1.83, 0.65)
	pt3dadd(24.32, -27.94, 1.54, 0.65)
	pt3dadd(24.79, -28.95, 1.41, 0.83)
	pt3dadd(25.53, -29.6, 1.41, 0.83)
	pt3dadd(26.55, -30.24, 1.64, 0.74)
	pt3dadd(27.39, -31.16, 1.49, 0.74)
	pt3dadd(27.85, -32.17, 1.13, 0.65)
	pt3dadd(28.31, -33.09, 1.44, 0.65)
	pt3dadd(29.06, -33.92, 1.59, 0.65)
	pt3dadd(29.52, -34.56, 1.59, 0.65)
	pt3dadd(30.17, -35.39, 1.11, 0.56)
	pt3dadd(30.82, -36.12, 1.11, 0.56)
	pt3dadd(31.37, -37.22, 1.28, 0.65)
	pt3dadd(31.75, -38.14, 1.28, 0.65)
	pt3dadd(32.02, -39.06, 1.01, 0.65)
	pt3dadd(32.58, -39.98, 0.89, 0.65)
	pt3dadd(32.86, -40.53, 0.79, 0.74)
	pt3dadd(33.42, -40.99, 0.79, 0.74)
	pt3dadd(34.44, -41.45, 0.79, 0.74)
	pt3dadd(35.01, -42.54, 0.79, 0.65)
	pt3dadd(35.75, -43.64, 0.7, 0.56)
	pt3dadd(36.21, -44.56, 0.95, 0.56)
	pt3dadd(36.67, -45.11, 0.7, 0.56)
	pt3dadd(37.14, -46.03, 0.88, 0.56)
	pt3dadd(37.51, -47.04, 0.92, 0.74)
	pt3dadd(38.53, -47.41, 0.62, 0.56)
	pt3dadd(39.18, -47.68, 0.25, 0.56)
	pt3dadd(39.55, -48.14, 0.25, 0.65)
	pt3dadd(39.74, -48.88, 0.25, 0.56)
	pt3dadd(39.92, -49.61, -0.01, 0.56)
	pt3dadd(40.48, -50.35, 0.41, 0.56)
	pt3dadd(41.13, -50.9, 0.83, 0.56)
	pt3dadd(41.31, -51.18, 0.57, 0.56)
	pt3dadd(41.59, -52, 0.57, 0.56)
	pt3dadd(42.33, -52.46, 0.85, 0.56)
	pt3dadd(42.89, -53.01, 0.85, 0.65)
	pt3dadd(43.17, -54.12, 0.35, 0.65)
	pt3dadd(43.26, -55.4, 0.06, 0.65)
	pt3dadd(43.82, -56.14, 0.33, 0.65)
	pt3dadd(44.65, -56.69, -0.17, 0.56)
	pt3dadd(45.39, -57.06, -0.46, 0.56)
	pt3dadd(46.32, -57.43, -0.28, 0.56)
	pt3dadd(46.6, -58.34, -0.14, 0.56)
	pt3dadd(46.88, -59.08, 0.01, 0.56)
	pt3dadd(47.06, -59.63, 0.38, 0.56)
	pt3dadd(47.04, -60.01, 0.54, 0.56)
	pt3dadd(47.97, -60.01, 0.42, 0.65)
	pt3dadd(48.8, -60.56, 1.35, 0.65)
	pt3dadd(49.27, -61.29, 1.1, 0.56)
	pt3dadd(49.55, -62.12, 0.56, 0.56)
	pt3dadd(50.01, -62.67, 0.69, 0.56)
	pt3dadd(49.73, -63.59, 0.99, 0.46)
	pt3dadd(49.73, -64.51, 0.99, 0.46)
  }
  dend[6] {pt3dclear()
	pt3dadd(14.41, -17.88, 1.55, 1.02)
	pt3dadd(14.22, -18.8, 1.37, 0.74)
	pt3dadd(13.29, -18.98, 2.42, 0.56)
	pt3dadd(13.11, -19.72, 2.42, 0.56)
	pt3dadd(12.27, -20.27, 2.69, 0.56)
	pt3dadd(11.62, -20.73, 3.52, 0.56)
	pt3dadd(12.37, -21.83, 3.54, 0.65)
	pt3dadd(12.18, -22.75, 4.19, 0.56)
	pt3dadd(11.72, -23.12, 4.7, 0.56)
	pt3dadd(10.79, -23.67, 4.7, 0.56)
	pt3dadd(10.79, -24.04, 4.91, 0.56)
	pt3dadd(10.7, -24.41, 4.78, 0.56)
  }
  dend[7] {pt3dclear()
	pt3dadd(49.08, -49.54, -0.29, 1.11)
	pt3dadd(49.67, -50.26, 0.29, 0.65)
	pt3dadd(50.51, -50.91, 0.29, 0.65)
	pt3dadd(51.25, -51.55, 0.1, 0.74)
	pt3dadd(52.36, -52.28, 0.1, 0.74)
	pt3dadd(53.29, -52.84, -0.15, 0.74)
	pt3dadd(54.13, -53.66, -0.06, 0.74)
	pt3dadd(54.78, -54.49, -0.41, 0.93)
	pt3dadd(55.7, -55.23, 0.65, 0.93)
	pt3dadd(56.63, -56.14, -0.07, 0.83)
	pt3dadd(57.37, -56.42, 0.11, 0.83)
	pt3dadd(57.93, -57.06, -0.02, 0.74)
  }
  dend[8] {pt3dclear()
	pt3dadd(49.08, -49.54, -0.29, 1.11)
	pt3dadd(50.28, -49.08, -0.29, 0.65)
	pt3dadd(51.67, -49.08, 0.52, 0.56)
	pt3dadd(52.6, -48.99, 0.52, 0.56)
	pt3dadd(53.81, -48.8, 0.02, 0.56)
	pt3dadd(55.33, -48.94, 0.03, 0.56)
	pt3dadd(56.35, -49.12, 0.23, 0.56)
	pt3dadd(57.18, -49.22, 0.45, 0.56)
	pt3dadd(58.11, -49.4, -0.14, 0.56)
	pt3dadd(59.31, -49.58, -0.14, 0.56)
	pt3dadd(60.06, -49.95, -0.49, 0.56)
	pt3dadd(61.36, -49.58, -0.49, 0.56)
	pt3dadd(62.1, -50.32, -0.81, 0.56)
	pt3dadd(63.02, -50.78, -0.98, 0.56)
	pt3dadd(63.59, -51.18, -0.18, 0.56)
	pt3dadd(64.61, -51.55, -0.18, 0.56)
	pt3dadd(65.35, -52.19, -0.5, 0.56)
	pt3dadd(66, -52.74, -0.5, 0.56)
	pt3dadd(66.65, -53.66, -0.69, 0.65)
	pt3dadd(67.48, -54.21, -0.09, 0.56)
	pt3dadd(68.32, -54.77, -0.82, 0.56)
	pt3dadd(69.25, -55.04, -1.11, 0.56)
  }
}
proc shape3d_3() {
  dend[8] {	pt3dadd(70.27, -55.32, -0.55, 0.56)
	pt3dadd(70.82, -55.59, -0.49, 0.56)
	pt3dadd(71.38, -55.96, -0.49, 0.56)
	pt3dadd(71.84, -56.24, -0.49, 0.46)
  }
  dend[9] {pt3dclear()
	pt3dadd(57.93, -57.06, -0.02, 0.74)
	pt3dadd(58.06, -58.38, -0.23, 0.56)
	pt3dadd(58.62, -59.57, -0.47, 0.56)
	pt3dadd(58.81, -60.77, -0.35, 0.56)
	pt3dadd(58.99, -62.33, -0.94, 0.56)
	pt3dadd(59.55, -63.43, -0.35, 0.65)
	pt3dadd(60.29, -64.72, -0.95, 0.56)
	pt3dadd(60.47, -65.55, -1.27, 0.56)
	pt3dadd(61.31, -66.37, -1.34, 0.56)
	pt3dadd(62.7, -67.29, -0.21, 0.65)
	pt3dadd(63.72, -67.93, 0.04, 0.65)
	pt3dadd(64.65, -69.04, 0.77, 0.56)
	pt3dadd(65.48, -69.68, 0.77, 0.56)
	pt3dadd(66.32, -69.96, 0.77, 0.56)
	pt3dadd(66.88, -70.6, 1.02, 0.56)
	pt3dadd(67.8, -71.15, 0.12, 0.65)
	pt3dadd(68.92, -71.7, 0.12, 0.74)
	pt3dadd(69.94, -72.16, 0.12, 0.74)
	pt3dadd(70.49, -72.53, 0.42, 0.65)
	pt3dadd(71.14, -72.71, 0.42, 0.65)
	pt3dadd(71.81, -73.5, 0.38, 0.56)
	pt3dadd(72.73, -73.87, 0.93, 0.56)
	pt3dadd(73.66, -74.69, 1.21, 0.56)
	pt3dadd(74.31, -75.61, 0.17, 0.56)
	pt3dadd(75.33, -75.8, 0.17, 0.56)
	pt3dadd(76.26, -76.17, 0.52, 0.56)
	pt3dadd(77.28, -76.99, 0.01, 0.56)
	pt3dadd(78.11, -78, 0.01, 0.65)
	pt3dadd(78.76, -79.01, 0.01, 0.65)
	pt3dadd(79.04, -80.58, -0.17, 0.74)
	pt3dadd(79.78, -80.85, -0.17, 0.56)
	pt3dadd(80.52, -81.77, -0.17, 0.56)
	pt3dadd(81.36, -82.42, -0.41, 0.65)
	pt3dadd(82.1, -82.78, -0.75, 0.65)
	pt3dadd(82.47, -83.7, -0.75, 0.74)
	pt3dadd(82.84, -84.81, -0.75, 0.74)
	pt3dadd(83.59, -85.63, -0.95, 0.74)
	pt3dadd(83.59, -86.64, -1.06, 0.65)
	pt3dadd(84.42, -87.75, -0.79, 0.74)
	pt3dadd(85.01, -88.41, -0.6, 0.74)
	pt3dadd(86.03, -89.33, -0.48, 0.74)
	pt3dadd(86.67, -89.88, -0.92, 0.65)
	pt3dadd(87.32, -90.89, -0.3, 0.56)
	pt3dadd(87.97, -91.72, -0.21, 0.56)
	pt3dadd(88.62, -92.64, -0.8, 0.56)
	pt3dadd(89.55, -93.83, -1.06, 0.56)
	pt3dadd(89.83, -94.57, -1.06, 0.65)
	pt3dadd(90.48, -95.21, -0.54, 0.56)
	pt3dadd(91.22, -96.13, -0.8, 0.56)
	pt3dadd(91.87, -96.96, -0.36, 0.56)
	pt3dadd(92.43, -98.15, -0.54, 0.56)
	pt3dadd(93.26, -98.98, -0.49, 0.56)
	pt3dadd(94.19, -99.9, -1.2, 0.56)
	pt3dadd(94.65, -100.8, -1.62, 0.65)
	pt3dadd(95.21, -101.7, -1.62, 0.65)
	pt3dadd(95.86, -102.2, -1.22, 0.65)
	pt3dadd(96.51, -102.7, -1.63, 0.56)
	pt3dadd(96.97, -102.8, -1.07, 0.56)
	pt3dadd(97.62, -103, -1.07, 0.56)
  }
  dend[10] {pt3dclear()
	pt3dadd(57.93, -57.06, -0.02, 0.74)
	pt3dadd(58.86, -58.72, -0.23, 0.83)
	pt3dadd(59.51, -59.55, -0.3, 0.83)
	pt3dadd(60.06, -60.46, 0.35, 0.74)
	pt3dadd(61.08, -61.48, 0.58, 0.74)
	pt3dadd(61.82, -62.39, 0.36, 0.74)
	pt3dadd(62.57, -63.31, 0.19, 0.74)
	pt3dadd(63.12, -63.87, 0.71, 0.74)
	pt3dadd(63.96, -64.6, 0.71, 0.74)
	pt3dadd(64.7, -65.15, 1, 0.74)
	pt3dadd(65.72, -65.52, 1.13, 0.74)
	pt3dadd(66.56, -66.16, 0.43, 0.74)
	pt3dadd(67.58, -66.62, 0.38, 0.74)
	pt3dadd(68.23, -67.08, 0.05, 0.65)
	pt3dadd(69.15, -67.45, 0.39, 0.56)
	pt3dadd(70.08, -68.09, 0.1, 0.56)
	pt3dadd(70.92, -68.55, 0.35, 0.56)
	pt3dadd(71.84, -69.1, 0.48, 0.65)
	pt3dadd(72.96, -69.56, -0.53, 0.65)
	pt3dadd(74.07, -69.56, -0.53, 0.65)
	pt3dadd(75, -69.66, -0.29, 0.65)
	pt3dadd(76.02, -69.66, -0.38, 0.65)
	pt3dadd(77.32, -69.84, -0.56, 0.65)
	pt3dadd(78.56, -70.06, 0.21, 0.65)
	pt3dadd(80.05, -70.24, 0.54, 0.65)
	pt3dadd(81.34, -70.7, 0.29, 0.65)
	pt3dadd(82.37, -71.53, -0.29, 0.74)
	pt3dadd(83.48, -71.99, -0.29, 0.74)
	pt3dadd(84.03, -72.63, -0.29, 0.74)
	pt3dadd(84.87, -73.83, -0.29, 0.74)
	pt3dadd(85.43, -74.65, -0.27, 0.74)
	pt3dadd(86.54, -74.47, 0.18, 0.65)
	pt3dadd(86.45, -75.39, 0.18, 0.65)
	pt3dadd(87.37, -75.94, 0.55, 0.65)
	pt3dadd(88.3, -76.77, 0.55, 0.65)
	pt3dadd(88.86, -77.69, 0.55, 0.65)
	pt3dadd(89.42, -77.96, 0.55, 0.65)
	pt3dadd(90.53, -78.33, 0.55, 0.65)
	pt3dadd(91.11, -79.01, 0.95, 0.65)
	pt3dadd(91.58, -79.38, 0.95, 0.65)
	pt3dadd(92.13, -80.11, 0.26, 0.56)
	pt3dadd(92.69, -80.39, 0.26, 0.56)
	pt3dadd(93.52, -80.94, 1.04, 0.74)
	pt3dadd(94.08, -81.4, 0.7, 0.65)
	pt3dadd(94.64, -81.67, 1.27, 0.56)
	pt3dadd(95.57, -81.86, 1.27, 0.56)
	pt3dadd(95.38, -82.68, 1.9, 0.65)
	pt3dadd(96.03, -83.24, 1.94, 0.56)
	pt3dadd(96.86, -83.33, 1.94, 0.74)
	pt3dadd(98.16, -83.7, 2.28, 0.56)
	pt3dadd(99.46, -83.7, 1.86, 0.65)
	pt3dadd(100.1, -83.97, 1.86, 0.56)
	pt3dadd(100.5, -84.43, 1.86, 0.56)
	pt3dadd(101.2, -84.16, 1.86, 0.74)
	pt3dadd(102.1, -84.34, 2.49, 0.74)
	pt3dadd(102.7, -84.61, 2.34, 0.74)
	pt3dadd(103.2, -84.8, 1.98, 0.74)
	pt3dadd(103.9, -85.07, 1.98, 0.65)
	pt3dadd(104.1, -85.64, 1.96, 0.56)
	pt3dadd(104.3, -86.19, 1.96, 0.56)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
  shape3d_3()
}



		
	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.5   ,      0.5  ,   0.19217,       0.128  ,   0.22397    ,     0.5) 
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 GranuleCell32
//************************************************************************************************************