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

// Original name on neuroMorpho.org n07-cont03-sl2.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=1, 3  dend[i] pdend.append()



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

	ddend  = new SectionList()
		for i=7, 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[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[6](1)
  for i = 11, 12 connect dend[i](0), dend[8](1)
  for i = 13, 14 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.8919, -38, 0, 0.2) 
//         pt3dadd(0.8919, -18, 0, 10)
//   }
  
  soma {pt3dclear()
	pt3dadd(0.8919, -18, 0, 10)
	pt3dadd(0.8919, 0.9148, 0, 9.333)
  }
  dend {pt3dclear()
	pt3dadd(0.8919, 0.9148, 0, 9.333)
	pt3dadd(-1.43, -4.43, 0.05, 2.97)
	pt3dadd(-1.8, -5.53, -1.28, 2.6)
	pt3dadd(-2.44, -6.64, -1.7, 2.23)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(0.8919, 0.9148, 0, 9.333)
// 	pt3dadd(-0.65, 5.42, 0, 1.58)
// 	pt3dadd(0.09, 6.99, 0.45, 1.58)
// 	pt3dadd(0.37, 8.09, -0.29, 1.3)
// 	pt3dadd(0.93, 10.02, -0.29, 0.93)
// 	pt3dadd(1.48, 11.31, -0.68, 0.93)
// 	pt3dadd(1.67, 12.04, -0.68, 0.83)
// 	pt3dadd(1.95, 12.87, -0.68, 0.83)
// 	pt3dadd(2.56, 14.23, -0.64, 0.93)
//   }
  dend[1] {pt3dclear()
	pt3dadd(-2.44, -6.64, -1.7, 2.23)
	pt3dadd(-3.45, -8.04, -1.09, 1.76)
	pt3dadd(-4.01, -9.33, -0.81, 1.76)
	pt3dadd(-4.66, -10.53, -1.53, 1.48)
	pt3dadd(-5.68, -11.26, -1.52, 1.39)
	pt3dadd(-6.23, -12, -1.3, 1.21)
	pt3dadd(-6.6, -12.18, -1.62, 1.21)
  }
  dend[2] {pt3dclear()
	pt3dadd(-2.44, -6.64, -1.7, 2.23)
	pt3dadd(-4.94, -7.83, -1.74, 0.65)
	pt3dadd(-5.31, -8.66, -1.74, 0.65)
	pt3dadd(-6.24, -10.4, -1.86, 0.65)
	pt3dadd(-7.35, -11.23, -1.26, 0.65)
	pt3dadd(-9.11, -12.15, -1.26, 0.56)
	pt3dadd(-9.86, -13.07, -1.09, 0.56)
	pt3dadd(-11.25, -13.71, -1.57, 0.56)
	pt3dadd(-13.29, -15.09, -0.85, 0.56)
	pt3dadd(-14.49, -15.83, -0.85, 0.56)
	pt3dadd(-14.96, -17.21, -1.44, 0.56)
	pt3dadd(-16.35, -18.22, -1.56, 0.56)
	pt3dadd(-17.09, -19.14, -2.21, 0.56)
	pt3dadd(-18.39, -19.23, -2.21, 0.56)
	pt3dadd(-19.87, -19.5, -1.81, 0.56)
	pt3dadd(-21.82, -19.6, -2.13, 0.56)
	pt3dadd(-23.59, -19.23, -1.94, 0.46)
	pt3dadd(-25.35, -18.68, -2.05, 0.46)
	pt3dadd(-27.3, -18.58, -1.81, 0.46)
	pt3dadd(-29.14, -18.79, -1.11, 0.56)
	pt3dadd(-30.35, -18.79, -1.41, 0.46)
	pt3dadd(-31.09, -19.25, -1.35, 0.46)
	pt3dadd(-32.3, -20.17, -2.07, 0.46)
  }
  dend[3] {pt3dclear()
	pt3dadd(-6.6, -12.18, -1.62, 1.21)
	pt3dadd(-8.39, -12.78, 0.62, 0.65)
	pt3dadd(-9.88, -14.16, 0.62, 0.65)
	pt3dadd(-11.55, -15.73, 0.79, 0.74)
	pt3dadd(-12.01, -16.55, 0.79, 0.74)
	pt3dadd(-13.4, -18.11, 0.79, 0.74)
	pt3dadd(-14.7, -18.85, 0.36, 1.21)
	pt3dadd(-15.16, -20.14, 0.12, 0.83)
	pt3dadd(-16.18, -21.98, -0.58, 0.83)
	pt3dadd(-17.2, -22.62, -0.58, 1.11)
	pt3dadd(-18.6, -23.17, -0.67, 0.83)
	pt3dadd(-19.06, -24.37, -0.67, 0.65)
	pt3dadd(-20.36, -25.28, -1.03, 0.65)
	pt3dadd(-21.38, -26.57, -1.13, 0.83)
	pt3dadd(-22.12, -27.86, -1.13, 0.83)
	pt3dadd(-22.41, -29.01, -1.1, 0.83)
	pt3dadd(-23.06, -30.21, -1.1, 1.76)
  }
  dend[4] {pt3dclear()
	pt3dadd(-6.6, -12.18, -1.62, 1.21)
	pt3dadd(-6.88, -13.37, -1.87, 0.93)
	pt3dadd(-7.72, -14.66, -1.87, 0.93)
	pt3dadd(-9.2, -16.13, -1.64, 0.93)
	pt3dadd(-9.94, -17.51, -1.64, 0.83)
	pt3dadd(-10.59, -18.61, -1.64, 0.83)
	pt3dadd(-11.43, -19.62, -2.8, 0.83)
	pt3dadd(-11.8, -20.82, -2.96, 0.83)
	pt3dadd(-13, -21.74, -3.19, 0.83)
	pt3dadd(-13.75, -22.66, -3.34, 0.93)
	pt3dadd(-14.67, -23.3, -3.33, 1.3)
	pt3dadd(-15.51, -24.13, -3.4, 0.83)
	pt3dadd(-16.62, -24.4, -3.4, 1.21)
	pt3dadd(-17.36, -25.42, -3.4, 1.39)
	pt3dadd(-17.2, -26.54, -3.69, 1.39)
	pt3dadd(-17.48, -28.01, -3.69, 1.11)
	pt3dadd(-17.85, -29.57, -4.2, 1.02)
	pt3dadd(-18.68, -30.86, -4.11, 1.02)
	pt3dadd(-19.43, -32.33, -4.11, 0.93)
	pt3dadd(-18.87, -33.61, -4.01, 0.93)
	pt3dadd(-19.61, -34.99, -4, 0.93)
	pt3dadd(-20.91, -36.65, -4.41, 0.93)
	pt3dadd(-21.47, -38.39, -4.41, 0.93)
	pt3dadd(-21.56, -39.86, -4.41, 0.93)
	pt3dadd(-21.84, -41.33, -4.41, 0.93)
	pt3dadd(-22.21, -42.34, -4.41, 1.02)
	pt3dadd(-22.21, -43.91, -4.41, 1.02)
	pt3dadd(-21.82, -44.96, -4.54, 1.02)
	pt3dadd(-21.72, -46.43, -4.54, 0.83)
	pt3dadd(-21.72, -47.63, -4.54, 1.02)
	pt3dadd(-21.82, -48.91, -4.54, 0.74)
	pt3dadd(-21.82, -50.38, -5.29, 1.76)
	pt3dadd(-21.91, -51.85, -5.29, 0.93)
	pt3dadd(-21.91, -53.42, -4.85, 1.3)
	pt3dadd(-21.26, -55.44, -5.75, 0.93)
	pt3dadd(-21.35, -57.18, -5.75, 1.3)
	pt3dadd(-21.54, -58.38, -6.1, 0.93)
	pt3dadd(-21.91, -59.39, -6.1, 1.21)
	pt3dadd(-22, -61.04, -5.95, 0.93)
	pt3dadd(-21.91, -62.33, -6.31, 0.93)
	pt3dadd(-21.54, -63.71, -6.29, 1.11)
	pt3dadd(-21.07, -65.27, -6.29, 0.93)
	pt3dadd(-21.07, -66.84, -6.29, 0.83)
	pt3dadd(-21.54, -68.58, -6.29, 0.83)
	pt3dadd(-21.72, -69.96, -6.68, 1.21)
	pt3dadd(-22, -71.43, -6.68, 1.21)
	pt3dadd(-22.28, -72.72, -6.68, 1.02)
	pt3dadd(-22.84, -73.45, -7.16, 0.83)
	pt3dadd(-22.93, -74.83, -7.16, 0.65)
	pt3dadd(-23.21, -75.38, -7.16, 0.65)
	pt3dadd(-23.48, -76.21, -7.39, 1.21)
	pt3dadd(-23.3, -77.31, -7.39, 1.21)
	pt3dadd(-23.48, -78.88, -7.39, 1.02)
	pt3dadd(-23.76, -79.61, -6.6, 0.93)
	pt3dadd(-24.13, -80.53, -6.6, 0.93)
	pt3dadd(-23.93, -81.45, -5.77, 0.74)
	pt3dadd(-23.93, -82.19, -5.77, 0.74)
	pt3dadd(-24.12, -83.2, -5.77, 1.21)
	pt3dadd(-24.67, -84.3, -5.29, 1.02)
	pt3dadd(-24.95, -85.59, -5.29, 1.02)
	pt3dadd(-25.23, -86.87, -5.29, 0.83)
	pt3dadd(-25.04, -87.98, -5.29, 0.83)
	pt3dadd(-24.86, -89.26, -5.07, 0.65)
	pt3dadd(-25.32, -90, -5.63, 0.83)
	pt3dadd(-25.51, -90.92, -5.63, 1.39)
	pt3dadd(-25.69, -92.11, -5.63, 1.48)
  }
  dend[5] {pt3dclear()
	pt3dadd(-23.06, -30.21, -1.1, 1.76)
	pt3dadd(-24.44, -30.53, -1.85, 0.46)
	pt3dadd(-26.11, -31.35, -2.23, 0.46)
	pt3dadd(-26.39, -32.27, -2.8, 0.46)
	pt3dadd(-26.58, -33.19, -2.8, 0.74)
	pt3dadd(-27.23, -34.39, -2.75, 0.56)
	pt3dadd(-27.78, -35.21, -2.89, 0.56)
	pt3dadd(-28.06, -35.77, -3.25, 0.83)
	pt3dadd(-28.06, -37.05, -3.42, 0.65)
	pt3dadd(-28.43, -38.06, -3.42, 0.65)
	pt3dadd(-29.27, -39.26, -3.42, 0.65)
	pt3dadd(-30.47, -40.64, -3.73, 0.65)
	pt3dadd(-31.77, -42.2, -3.44, 0.65)
	pt3dadd(-32.23, -43.58, -4.4, 0.46)
	pt3dadd(-33.16, -43.95, -4.76, 0.46)
	pt3dadd(-34.28, -43.85, -5.65, 0.93)
	pt3dadd(-34.65, -45.32, -5.71, 0.56)
	pt3dadd(-34.55, -46.24, -5.71, 0.56)
  }
  dend[6] {pt3dclear()
	pt3dadd(-23.06, -30.21, -1.1, 1.76)
	pt3dadd(-22.69, -31.86, -1.72, 0.74)
	pt3dadd(-23.06, -33.06, -1.72, 0.74)
	pt3dadd(-24.36, -34.07, -1.88, 0.65)
	pt3dadd(-25.38, -35.36, -1.88, 0.65)
	pt3dadd(-26.58, -36.83, -2.57, 0.65)
	pt3dadd(-27.79, -37.93, -2.57, 0.56)
	pt3dadd(-28.53, -38.76, -2.34, 0.65)
	pt3dadd(-28.81, -40.59, -2.34, 0.56)
	pt3dadd(-28.99, -41.97, -2.02, 0.56)
	pt3dadd(-29.83, -43.44, -2.02, 0.56)
	pt3dadd(-30.39, -44.27, -2.02, 0.65)
	pt3dadd(-31.31, -45.1, -2.02, 0.65)
	pt3dadd(-32.15, -45.83, -2.02, 0.65)
	pt3dadd(-33.44, -47.2, -2.02, 0.65)
	pt3dadd(-34.36, -48.02, -2.02, 0.56)
	pt3dadd(-33.81, -49.95, -2.02, 0.56)
	pt3dadd(-34.55, -51.7, -2.28, 0.74)
	pt3dadd(-34.92, -52.71, -2.28, 0.74)
	pt3dadd(-35.94, -54.27, -2.63, 0.56)
	pt3dadd(-36.87, -55.19, -2.63, 0.56)
	pt3dadd(-35.94, -55.56, -2.63, 0.74)
	pt3dadd(-34.46, -56.85, -1.91, 0.65)
	pt3dadd(-35.38, -57.77, -1.91, 0.65)
	pt3dadd(-37.15, -58.69, -1.62, 0.83)
	pt3dadd(-37.42, -60.34, -1.62, 0.83)
	pt3dadd(-37.8, -62, -1.62, 0.74)
	pt3dadd(-38.26, -63.01, -1.62, 0.65)
	pt3dadd(-38.26, -64.2, -1.62, 0.65)
	pt3dadd(-38.52, -65.41, -1.62, 0.65)
	pt3dadd(-39.35, -66.61, -1.62, 0.65)
	pt3dadd(-40.37, -67.8, -1, 0.65)
	pt3dadd(-40.83, -68.81, -0.96, 0.65)
	pt3dadd(-42.23, -69.73, -1.19, 0.65)
	pt3dadd(-43.25, -70.19, -1.19, 0.65)
	pt3dadd(-43.8, -70.65, -1.19, 0.46)
	pt3dadd(-43.52, -72.03, -0.43, 0.83)
	pt3dadd(-43.52, -72.95, -0.43, 0.83)
	pt3dadd(-43.9, -73.78, -0.43, 0.56)
	pt3dadd(-44.73, -74.42, -0.36, 0.93)
	pt3dadd(-45.38, -74.97, -0.36, 0.93)
	pt3dadd(-46.03, -75.71, 0.66, 0.56)
	pt3dadd(-46.86, -76.35, 0.66, 0.56)
	pt3dadd(-46.86, -77.73, 0.57, 0.56)
	pt3dadd(-46.59, -79.11, 0.51, 0.93)
	pt3dadd(-46.4, -79.84, 0.51, 1.3)
	pt3dadd(-46.31, -80.95, 0.51, 1.3)
  }
  dend[7] {pt3dclear()
	pt3dadd(-25.69, -92.11, -5.63, 1.48)
	pt3dadd(-25.26, -93.02, -3.04, 0.56)
	pt3dadd(-25.35, -94.12, -3.04, 0.56)
	pt3dadd(-26, -93.48, -2.32, 0.56)
	pt3dadd(-27.3, -93.94, -2.18, 0.56)
	pt3dadd(-27.48, -95.13, -1.2, 0.56)
	pt3dadd(-28.23, -96.42, -1.2, 0.56)
  }
}
proc shape3d_2() {
  dend[7] {	pt3dadd(-29.53, -97.89, -0.43, 0.56)
	pt3dadd(-30.73, -99.73, -0.27, 0.56)
	pt3dadd(-32.49, -100.7, -0.06, 0.56)
	pt3dadd(-33.98, -101.7, -0.06, 0.56)
	pt3dadd(-35.28, -103.4, 0.12, 0.56)
	pt3dadd(-36.2, -104.6, 0.35, 0.56)
	pt3dadd(-36.67, -105.4, 0.35, 0.74)
	pt3dadd(-37.22, -106.2, 0.72, 0.65)
	pt3dadd(-37.6, -107.2, 0.39, 0.56)
	pt3dadd(-38.15, -108.3, 0.82, 0.56)
	pt3dadd(-38.99, -108.6, 0.68, 0.74)
	pt3dadd(-39.82, -109.6, 0.96, 0.56)
	pt3dadd(-40.66, -111.1, 0.99, 0.56)
  }
  dend[8] {pt3dclear()
	pt3dadd(-25.69, -92.11, -5.63, 1.48)
	pt3dadd(-27.08, -92.48, -7.46, 0.74)
	pt3dadd(-26.9, -93.49, -7.46, 0.65)
	pt3dadd(-26.25, -94.23, -7.73, 0.65)
	pt3dadd(-25.88, -95.79, -7.73, 0.65)
	pt3dadd(-25.69, -96.99, -8.27, 0.65)
	pt3dadd(-25.51, -97.81, -8.26, 0.56)
	pt3dadd(-25.41, -99.1, -8.26, 0.56)
	pt3dadd(-25.04, -100.5, -8.26, 0.65)
	pt3dadd(-24.57, -102, -8.26, 0.93)
	pt3dadd(-24.29, -103.3, -8.61, 0.74)
	pt3dadd(-24.67, -104.5, -8.61, 0.74)
	pt3dadd(-24.39, -105.3, -8.1, 0.56)
	pt3dadd(-23.37, -106.3, -8.1, 0.56)
	pt3dadd(-23.42, -107.1, -9.33, 0.56)
	pt3dadd(-23.88, -108.5, -9.33, 0.56)
	pt3dadd(-24.16, -109.1, -9.33, 0.56)
	pt3dadd(-24.72, -110.4, -9.99, 0.56)
	pt3dadd(-25.09, -111.9, -9.99, 0.56)
	pt3dadd(-25.09, -112.8, -9.99, 0.65)
	pt3dadd(-25.37, -114.4, -9.99, 0.65)
	pt3dadd(-25.54, -115.4, -10.51, 0.65)
	pt3dadd(-25.72, -116.8, -10.56, 0.46)
	pt3dadd(-26, -117.8, -10.74, 0.83)
  }
  dend[9] {pt3dclear()
	pt3dadd(-46.31, -80.95, 0.51, 1.3)
	pt3dadd(-47.36, -82.05, 0.78, 0.56)
	pt3dadd(-47.36, -83.7, 0.78, 0.56)
	pt3dadd(-48.66, -84.8, 1.43, 0.56)
	pt3dadd(-48.94, -86.83, 1.43, 0.56)
	pt3dadd(-49.41, -89.12, 0.55, 0.56)
	pt3dadd(-49.68, -91.24, -0.71, 0.56)
	pt3dadd(-50.61, -93.08, -1.1, 0.56)
	pt3dadd(-51.26, -95.28, -1.29, 0.56)
	pt3dadd(-51.72, -96.29, -1.53, 0.74)
	pt3dadd(-52.93, -97.12, -1.94, 0.56)
	pt3dadd(-54.32, -97.85, -2.54, 0.56)
	pt3dadd(-55.16, -99.05, -2.54, 0.56)
	pt3dadd(-55.79, -100.7, -2.89, 0.56)
	pt3dadd(-56.25, -102.7, -3.7, 0.56)
	pt3dadd(-56.9, -104.3, -3.7, 0.56)
	pt3dadd(-57.36, -106.3, -4.26, 0.56)
	pt3dadd(-57.27, -109.1, -4.54, 0.56)
	pt3dadd(-56.81, -110.8, -4.54, 0.56)
	pt3dadd(-57.46, -112.7, -4.54, 0.65)
	pt3dadd(-57.83, -113.8, -4.54, 0.65)
	pt3dadd(-58.29, -115.3, -4.54, 0.56)
	pt3dadd(-58.94, -116, -4.54, 0.56)
	pt3dadd(-59.4, -117.4, -4.47, 0.56)
	pt3dadd(-60.17, -118.6, -4.03, 0.93)
	pt3dadd(-61.19, -120.1, -4.03, 0.93)
	pt3dadd(-60.82, -121.7, -3.64, 0.93)
	pt3dadd(-60.73, -123, -4.68, 0.65)
	pt3dadd(-60.08, -124.2, -4.6, 0.65)
	pt3dadd(-59.52, -125.7, -4.45, 0.56)
	pt3dadd(-59.43, -127.3, -3.29, 0.56)
	pt3dadd(-58.22, -129.2, -2.56, 0.56)
	pt3dadd(-57.39, -131.1, -2.05, 0.56)
	pt3dadd(-56.83, -132.5, -1.83, 0.56)
	pt3dadd(-57.11, -133.9, -1.87, 0.56)
	pt3dadd(-55.16, -135.2, -1.26, 0.56)
	pt3dadd(-54.15, -135.5, -0.85, 0.56)
	pt3dadd(-53.87, -137.5, -0.8, 0.56)
	pt3dadd(-54.05, -139, -0.48, 0.56)
	pt3dadd(-54.79, -140.5, 0.09, 0.65)
	pt3dadd(-54.61, -142.4, 0.21, 0.65)
	pt3dadd(-54.61, -143.9, 0.72, 0.65)
	pt3dadd(-53.4, -145.4, 0.67, 0.65)
	pt3dadd(-52.94, -146.7, 0.66, 0.56)
	pt3dadd(-53.31, -148.4, 0.59, 0.56)
	pt3dadd(-53.31, -150.2, 1, 0.56)
	pt3dadd(-53.5, -151.8, 1.45, 0.56)
	pt3dadd(-54.05, -153.1, 1.45, 0.46)
	pt3dadd(-53.79, -154.1, 2.15, 0.46)
	pt3dadd(-54.54, -155.8, 2.15, 0.46)
	pt3dadd(-54.91, -157.3, 2.15, 0.46)
	pt3dadd(-55.28, -158.9, 2.24, 0.46)
	pt3dadd(-55.37, -159.9, 2.54, 0.65)
	pt3dadd(-55.74, -161.3, 1.7, 0.65)
	pt3dadd(-56.21, -162.7, 2.71, 0.46)
	pt3dadd(-56.67, -164.1, 2.59, 0.46)
  }
  dend[10] {pt3dclear()
	pt3dadd(-46.31, -80.95, 0.51, 1.3)
	pt3dadd(-44.92, -82.33, 0.75, 0.56)
	pt3dadd(-44.47, -83.61, 0.48, 0.56)
	pt3dadd(-45.03, -85.26, 0.48, 0.56)
	pt3dadd(-45.49, -86.64, 0.48, 0.56)
	pt3dadd(-46.14, -87.93, 0.48, 0.56)
	pt3dadd(-46.61, -90.04, 0.13, 0.56)
	pt3dadd(-47.07, -91.69, 0.13, 0.56)
	pt3dadd(-47.26, -93.81, 0.13, 0.56)
	pt3dadd(-47.63, -95.55, -0.05, 0.56)
	pt3dadd(-48.18, -97.12, 0.48, 0.56)
	pt3dadd(-49.11, -98.4, -0.17, 0.56)
	pt3dadd(-49.85, -98.86, -0.17, 1.3)
	pt3dadd(-50.13, -99.32, -0.17, 0.65)
	pt3dadd(-50.5, -100.5, -0.12, 0.37)
	pt3dadd(-50.53, -102, -0.12, 0.37)
	pt3dadd(-51.09, -104, 0.47, 0.37)
	pt3dadd(-51.27, -105.1, 0.71, 0.56)
	pt3dadd(-51.18, -106.4, 0.71, 1.11)
	pt3dadd(-51.27, -107.7, 0.79, 0.74)
	pt3dadd(-51.27, -109.6, 0.75, 0.74)
	pt3dadd(-51.18, -111.5, 0.75, 0.74)
	pt3dadd(-51.64, -113.9, 0.56, 0.74)
	pt3dadd(-51.55, -115.5, 0.76, 0.56)
	pt3dadd(-51.83, -116.6, 1.09, 0.56)
	pt3dadd(-52.76, -117.7, 1.09, 0.83)
	pt3dadd(-53.5, -118.8, 0.91, 0.56)
	pt3dadd(-53.9, -120.7, 0.3, 0.56)
	pt3dadd(-53.07, -123.1, -0.09, 0.93)
	pt3dadd(-52.42, -125, -0.01, 0.56)
	pt3dadd(-52.23, -126.9, -0.01, 0.56)
	pt3dadd(-52.05, -128.8, -1.13, 0.56)
  }
  dend[11] {pt3dclear()
	pt3dadd(-26, -117.8, -10.74, 0.83)
	pt3dadd(-26.09, -118.7, -10.74, 1.02)
	pt3dadd(-26.09, -119.9, -10.74, 0.83)
	pt3dadd(-25.91, -120.8, -10.74, 0.65)
	pt3dadd(-25.72, -122, -10.74, 1.11)
	pt3dadd(-26.28, -123.1, -11.36, 0.83)
	pt3dadd(-26.84, -124, -11.36, 0.65)
	pt3dadd(-27.02, -124.8, -11, 0.65)
	pt3dadd(-27.67, -125.4, -11.03, 0.46)
	pt3dadd(-28.13, -126.6, -11.03, 0.46)
	pt3dadd(-28.32, -127.6, -10.23, 0.46)
	pt3dadd(-28.88, -128.3, -10.23, 0.46)
	pt3dadd(-27.58, -129.3, -10.23, 0.46)
	pt3dadd(-27.11, -130.3, -11, 0.37)
	pt3dadd(-27.21, -131.4, -11, 0.37)
	pt3dadd(-27.21, -132.5, -11.45, 0.37)
	pt3dadd(-27.7, -133.8, -11.45, 0.37)
	pt3dadd(-27.52, -134.8, -11.45, 0.37)
	pt3dadd(-27.33, -135.9, -11.45, 0.83)
	pt3dadd(-27.24, -137.1, -12.17, 0.65)
	pt3dadd(-27.14, -137.9, -12.17, 0.46)
	pt3dadd(-26.96, -139, -12.17, 1.11)
	pt3dadd(-26.96, -139.8, -12.17, 0.83)
	pt3dadd(-26.87, -141.1, -12.39, 0.65)
	pt3dadd(-26.96, -142.1, -12.68, 0.46)
	pt3dadd(-27.33, -142.6, -12.85, 0.65)
	pt3dadd(-27.24, -143.8, -12.94, 0.46)
	pt3dadd(-26.4, -145.2, -12.93, 0.46)
	pt3dadd(-26.22, -146.9, -13.21, 0.46)
	pt3dadd(-26.03, -148.5, -13.5, 0.46)
	pt3dadd(-25.85, -149.7, -14.02, 0.46)
	pt3dadd(-25.57, -150.8, -13.54, 0.56)
	pt3dadd(-25.27, -151.6, -12.35, 0.46)
	pt3dadd(-25.36, -152.5, -12.35, 0.46)
	pt3dadd(-25.64, -153.6, -12.07, 1.21)
	pt3dadd(-25.92, -155.1, -11.01, 0.74)
	pt3dadd(-26.56, -155.9, -11.01, 0.56)
  }
  dend[12] {pt3dclear()
	pt3dadd(-26, -117.8, -10.74, 0.83)
	pt3dadd(-27.02, -118.8, -10.02, 0.56)
	pt3dadd(-28.51, -120, -10.16, 0.56)
	pt3dadd(-29.62, -121, -10.25, 0.56)
	pt3dadd(-30.55, -122.3, -10.57, 0.56)
	pt3dadd(-30.92, -123.4, -10.59, 0.46)
	pt3dadd(-30.92, -124.2, -10.35, 0.46)
	pt3dadd(-31.2, -125, -9.71, 0.46)
	pt3dadd(-32.31, -126.4, -9.6, 0.46)
  }
  dend[13] {pt3dclear()
	pt3dadd(-26.56, -155.9, -11.01, 0.56)
	pt3dadd(-26.87, -157.4, -9.63, 0.46)
	pt3dadd(-26.87, -158.4, -9.63, 0.46)
	pt3dadd(-27.52, -159.9, -10.07, 0.46)
	pt3dadd(-28.08, -161.1, -10.07, 0.37)
	pt3dadd(-29.1, -162.3, -10.78, 0.37)
	pt3dadd(-29.56, -163.6, -11.42, 0.37)
	pt3dadd(-30.3, -164.9, -11.42, 0.37)
	pt3dadd(-30.77, -166.4, -11.75, 0.37)
	pt3dadd(-31.04, -167.3, -10.98, 0.37)
	pt3dadd(-30.95, -168.6, -10.45, 0.37)
	pt3dadd(-31.6, -170.2, -10.47, 0.37)
	pt3dadd(-32.34, -171.1, -10, 0.37)
	pt3dadd(-31.69, -172.9, -9.76, 0.37)
	pt3dadd(-31.97, -174.5, -9.66, 0.37)
	pt3dadd(-31.97, -176.4, -9.66, 0.37)
	pt3dadd(-32.62, -177.4, -9.53, 0.37)
	pt3dadd(-33.36, -178, -9.53, 0.65)
	pt3dadd(-33.73, -179.1, -9.53, 0.83)
	pt3dadd(-34.2, -179.9, -9.23, 0.74)
	pt3dadd(-34.66, -181.3, -9.62, 0.56)
	pt3dadd(-34.2, -182.9, -8.87, 0.56)
	pt3dadd(-33.55, -184.2, -8.83, 0.56)
	pt3dadd(-33.08, -185.9, -8.17, 0.56)
	pt3dadd(-32.43, -187.3, -7.81, 0.56)
	pt3dadd(-32.52, -188, -7.86, 0.83)
	pt3dadd(-32.52, -189.7, -7.86, 0.83)
	pt3dadd(-32.42, -191, -7.86, 0.65)
	pt3dadd(-32.24, -192.3, -7.12, 0.83)
  }
}
proc shape3d_3() {
  dend[13] {  }
  dend[14] {pt3dclear()
	pt3dadd(-26.56, -155.9, -11.01, 0.56)
	pt3dadd(-27.86, -156.8, -11.29, 0.56)
	pt3dadd(-28.88, -158.4, -11.29, 0.56)
	pt3dadd(-30.83, -160.1, -10.62, 0.56)
	pt3dadd(-31.2, -161.9, -10.64, 0.56)
	pt3dadd(-32.69, -162.7, -11.29, 0.56)
	pt3dadd(-33.89, -164.3, -11.29, 0.56)
	pt3dadd(-35.1, -165.8, -11.43, 0.56)
	pt3dadd(-36.4, -167.1, -11.6, 0.56)
	pt3dadd(-37.6, -167.9, -11.75, 0.56)
	pt3dadd(-37.7, -169.4, -11.75, 0.56)
	pt3dadd(-38.46, -171.7, -11.33, 0.46)
	pt3dadd(-39.3, -173.7, -11.33, 0.37)
	pt3dadd(-40.51, -174.6, -11.84, 0.37)
	pt3dadd(-41.62, -176.2, -11.84, 0.37)
	pt3dadd(-42.18, -177.6, -11.84, 0.37)
  }
}

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 DistalSynapses 
	objref DistalSynapsePositions 
	objref ProximalSynapses 
	objref ProximalSynapsePositions 
	proc synapse() { 
  
 // //***** PP syn   
 
DistalSynapses = new Vector(0,0) 
DistalSynapses .append(13) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.97003) 
for i= 0 , 0 { 
dend[DistalSynapses .x[i]] syn = new Exp2Syn(DistalSynapsePositions .x[i]) // PP syn based on Greg and Staley 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0  
pre_list.append(syn) // # 0  
} 
 
 // //***** 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.5 ,     0.1872 ,    0.14642   , 0.052478) 
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   
 
for i= 0 , 0 { 
dend[DistalSynapses .x[i]] syn = new Exp2Syn(DistalSynapsePositions .x[i]) // HIPP  
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 0 
} 
 
 // //***** 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) // # 1 
 
 // //***** 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) // # 1 
} 
 
}
	func is_art() { return 0 }

	endtemplate GranuleCell7
//************************************************************************************************************