/* 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 GranuleCell44
	
// Original name on neuroMorpho.org  410884.CNG.swc

ndend1=30

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


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


	pdend  = new SectionList()
		dend[1] pdend.append()

		
	mdend  = new SectionList()
		dend[4] mdend.append()
		for i=8, 9  dend[i] mdend.append()
		dend[13] mdend.append()
		for i=17, 19  dend[i] mdend.append()		  
		for i=24, 26  dend[i] mdend.append()
		dend[29] mdend.append()
		  
		  
	ddend  = new SectionList()
		
		for i=2, 3 dend[i] ddend.append()
		for i=5, 6 dend[i] ddend.append()
		for i=10, 12 dend[i] ddend.append()
		for i=14, 15 dend[i] ddend.append()
		for i=20, 22 dend[i] ddend.append()
		for i=27, 28 dend[i] ddend.append()

}
proc gctemp() {

    
	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}
		
	
// 	forsec all {
// 		insert ccanl
// 	catau_ccanl = 10
// 	caiinf_ccanl = 0.000005
// 	Ra=210
// 	}

	 forsec all {enat = 45 ekf = -90 eks = -90  ek=-90  elca=130 etca=130	 esk=-90
		 el_ichan2 =-70	cao_ccanl=2 }
		 

  connect dend(0), soma(1)
  for i = 1, 2 connect dend[i](0), dend[i-1](1)
  connect dend[3](0), dend[1](1)
  connect dend[4](0), dend(1)
  for i = 5, 6 connect dend[i](0), dend[4](1)
  connect dend[7](0), soma(1)
  for i = 8, 10 connect dend[i](0), dend[i-1](1)
  connect dend[11](0), dend[9](1)
  connect dend[12](0), dend[8](1)
  connect dend[13](0), dend[7](1)
  for i = 14, 15 connect dend[i](0), dend[13](1)
  connect dend[16](0), soma(0)
  for i = 17, 18 connect dend[i](0), dend[i-1](1)
  connect dend[19](0), dend[17](1)
  for i = 20, 21 connect dend[i](0), dend[19](1)
  connect dend[22](0), dend[16](1)
  connect dend[23](0), soma(0)
  for i = 24, 25 connect dend[i](0), dend[i-1](1)
  connect dend[26](0), dend[24](1)
  for i = 27, 28 connect dend[i](0), dend[26](1)
  connect dend[29](0), dend[23](1)
  basic_shape()
}
proc shape3d_1() {
  soma {pt3dclear()
	pt3dadd(0, 0, 0, 5.84948)
	pt3dadd(-8.74, 13.29, 0.05, 4.05)
  }
  dend {pt3dclear()
	pt3dadd(-8.74, 13.29, 0.05, 2.7)
	pt3dadd(-11.92, 18.92, 0.05, 2.7)
	pt3dadd(-14.06, 19.68, 0.05, 2.7)
	pt3dadd(-16.71, 22.6, 2.03, 2.25)
	pt3dadd(-22, 28.69, 6.34, 2.7)
	pt3dadd(-25.45, 33.87, 5.82, 2.25)
	pt3dadd(-29.15, 38.82, 10.05, 2.25)
	pt3dadd(-32.18, 42.18, 10.05, 2.25)
	pt3dadd(-34.03, 44.88, 10.05, 2.25)
	pt3dadd(-35.09, 45.78, 9.42, 2.25)
  }
  dend[1] {pt3dclear()
	pt3dadd(-35.09, 45.78, 9.42, 2.25)
	pt3dadd(-38.8, 52.99, 10.82, 1.8)
	pt3dadd(-41.71, 58.4, 10.3, 1.8)
	pt3dadd(-44.21, 61.9, 14.49, 1.8)
	pt3dadd(-48.18, 66.4, 17.98, 1.8)
	pt3dadd(-50.83, 71.36, 17.98, 1.8)
	pt3dadd(-53.48, 77.44, 17.98, 1.8)
	pt3dadd(-55.6, 82.4, 18.6, 1.8)
	pt3dadd(-57.19, 87.58, 18.6, 1.8)
	pt3dadd(-57.79, 89.35, 21.91, 1.8)
	pt3dadd(-58.59, 91.15, 21.91, 1.8)
  }
  dend[2] {pt3dclear()
	pt3dadd(-58.59, 91.15, 21.91, 1.8)
	pt3dadd(-57.53, 98.14, 21.74, 1.8)
	pt3dadd(-56.74, 105.12, 25.53, 1.8)
	pt3dadd(-56.21, 110.53, 25.53, 1.8)
	pt3dadd(-55.74, 114.2, 25.53, 1.8)
	pt3dadd(-53.62, 120.96, 25.44, 1.8)
	pt3dadd(-52.56, 126.82, 26.19, 1.8)
	pt3dadd(-51.76, 130.2, 26.19, 1.8)
	pt3dadd(-51.86, 139.91, 27.61, 1.8)
	pt3dadd(-51.34, 148.7, 32.04, 1.8)
	pt3dadd(-51.46, 155.58, 32.04, 1.8)
	pt3dadd(-51.2, 157.84, 32.04, 1.8)
	pt3dadd(-51.46, 162.57, 32.04, 1.8)
	pt3dadd(-49.61, 170, 33.27, 1.8)
	pt3dadd(-46.69, 175.86, 37.57, 1.8)
	pt3dadd(-44.3, 182.39, 37.57, 1.8)
	pt3dadd(-40.86, 191.18, 37.99, 1.8)
	pt3dadd(-35.83, 200.24, 40.32, 1.8)
	pt3dadd(-33.45, 207.9, 40.29, 1.8)
	pt3dadd(-31.6, 214.65, 40.29, 1.8)
	pt3dadd(-31.4, 217.5, 41.86, 1.8)
	pt3dadd(-31.4, 223.81, 41.86, 1.8)
	pt3dadd(-31.4, 227.64, 41.86, 1.8)
	pt3dadd(-28.75, 235.52, 41.18, 1.8)
	pt3dadd(-26.95, 240.31, 43.55, 1.8)
	pt3dadd(-24.56, 249.99, 47.74, 1.8)
	pt3dadd(-24.3, 254.72, 49.78, 1.8)
	pt3dadd(-23.47, 257.28, 50.1, 1.8)
	pt3dadd(-22.68, 261.11, 52.81, 1.8)
	pt3dadd(-22.15, 265.39, 54.3, 1.8)
	pt3dadd(-21.62, 269.22, 59.62, 1.8)
	pt3dadd(-21.62, 272.6, 59.62, 1.8)
	pt3dadd(-20.56, 275.07, 59.62, 1.8)
	pt3dadd(-20.34, 279.96, 59.3, 1.8)
	pt3dadd(-16.96, 284.24, 61.93, 1.8)
  }
  dend[3] {pt3dclear()
	pt3dadd(-58.59, 91.15, 21.91, 1.8)
	pt3dadd(-62.49, 99.81, 21.02, 1.8)
	pt3dadd(-65.4, 107.47, 21.02, 1.8)
	pt3dadd(-66.99, 118.73, 22.89, 1.8)
	pt3dadd(-68.39, 121.73, 22.89, 1.8)
	pt3dadd(-68.2, 128.46, 22.46, 1.8)
	pt3dadd(-70.85, 139.27, 22.78, 1.8)
	pt3dadd(-72.7, 147.38, 22.88, 1.8)
	pt3dadd(-74.65, 154.33, 25.96, 1.8)
	pt3dadd(-74.12, 161.54, 25.96, 1.8)
	pt3dadd(-75.45, 171.45, 25.46, 1.8)
	pt3dadd(-78.64, 182.01, 25.46, 1.8)
	pt3dadd(-80.23, 190.35, 24.46, 1.8)
	pt3dadd(-82.91, 201.24, 25.73, 1.8)
	pt3dadd(-85.56, 207.55, 25.73, 1.8)
	pt3dadd(-87.68, 210.92, 25.73, 1.8)
	pt3dadd(-90.18, 220.49, 25.42, 1.8)
	pt3dadd(-91.24, 227.7, 25.42, 1.8)
	pt3dadd(-91.51, 234.9, 24.22, 1.8)
	pt3dadd(-92, 245.26, 20.39, 1.8)
	pt3dadd(-92.26, 246.84, 20.39, 1.8)
	pt3dadd(-97.03, 252.47, 15.77, 1.8)
	pt3dadd(-99.41, 253.82, 15.77, 1.8)
	pt3dadd(-103.12, 257.65, 13.93, 1.8)
	pt3dadd(-105.65, 259.18, 13.93, 1.8)
	pt3dadd(-112.53, 262.11, 12.38, 1.8)
	pt3dadd(-116.77, 264.36, 13.02, 1.8)
	pt3dadd(-120.21, 267.06, 10.65, 1.8)
	pt3dadd(-121.54, 267.74, 10.65, 1.8)
	pt3dadd(-125.24, 267.29, 10.9, 1.8)
  }
  dend[4] {pt3dclear()
	pt3dadd(-35.09, 45.78, 9.42, 2.25)
	pt3dadd(-38.9, 48.23, 10.24, 2.25)
	pt3dadd(-44.19, 53.41, 11.83, 2.25)
	pt3dadd(-46.31, 54.76, 15.17, 1.8)
	pt3dadd(-49.49, 56.34, 15.17, 1.8)
	pt3dadd(-52.66, 59.27, 16.02, 1.8)
	pt3dadd(-56.37, 62.19, 16.02, 1.8)
	pt3dadd(-60.44, 65.38, 16.5, 1.8)
	pt3dadd(-65.2, 69.66, 20.27, 1.8)
	pt3dadd(-70.23, 75.52, 20.27, 1.8)
	pt3dadd(-75.26, 81.82, 20.27, 1.8)
	pt3dadd(-80.03, 85.43, 23.35, 1.8)
	pt3dadd(-85.59, 91.06, 23.35, 1.8)
	pt3dadd(-91.15, 96.92, 23.34, 1.8)
	pt3dadd(-98.04, 102.78, 23.34, 1.8)
	pt3dadd(-103.03, 106.88, 23.34, 1.8)
	pt3dadd(-105.41, 108.46, 23.34, 1.8)
	pt3dadd(-106.21, 109.36, 23.34, 1.8)
  }
  dend[5] {pt3dclear()
	pt3dadd(-106.21, 109.36, 23.34, 1.8)
	pt3dadd(-107.53, 112.51, 23.34, 1.8)
	pt3dadd(-114.42, 119.04, 21.49, 1.8)
	pt3dadd(-120.41, 122.1, 21.1, 1.8)
	pt3dadd(-123.85, 124.8, 21.1, 1.8)
	pt3dadd(-127.83, 128.86, 20.87, 1.8)
	pt3dadd(-131.53, 131.33, 22.16, 1.8)
	pt3dadd(-135.24, 133.36, 22.46, 1.8)
	pt3dadd(-139.74, 136.52, 22.46, 1.8)
	pt3dadd(-141.59, 138.32, 22.46, 1.8)
	pt3dadd(-145.57, 140.8, 25.2, 1.8)
	pt3dadd(-150.9, 144.68, 25.2, 1.8)
	pt3dadd(-155.13, 148.28, 25.2, 1.8)
	pt3dadd(-158.84, 150.99, 25.2, 1.8)
	pt3dadd(-161.22, 152.11, 25.2, 1.8)
	pt3dadd(-167.05, 155.49, 25.34, 1.8)
	pt3dadd(-172.83, 159.45, 25.34, 1.8)
	pt3dadd(-178.65, 164.19, 25.34, 1.8)
	pt3dadd(-182.36, 168.92, 25.34, 1.8)
	pt3dadd(-185.54, 177.25, 25.34, 1.8)
	pt3dadd(-190.43, 185.99, 23.18, 1.8)
	pt3dadd(-196.26, 197.47, 26.42, 1.8)
	pt3dadd(-203.41, 207.54, 26.42, 1.8)
	pt3dadd(-209.24, 214.07, 26.42, 1.8)
	pt3dadd(-213.21, 217, 26.42, 1.8)
	pt3dadd(-218.03, 218.58, 26.42, 1.8)
	pt3dadd(-221.47, 223.76, 26.42, 1.8)
	pt3dadd(-222.8, 228.94, 26.42, 1.8)
	pt3dadd(-222.8, 233.9, 25.54, 1.8)
  }
  dend[6] {pt3dclear()
	pt3dadd(-106.21, 109.36, 23.34, 1.8)
	pt3dadd(-109.97, 108.93, 23.34, 1.8)
	pt3dadd(-115.8, 112.76, 23.34, 1.8)
	pt3dadd(-120.56, 115.68, 24.78, 1.8)
	pt3dadd(-125.33, 120.19, 24.78, 1.8)
	pt3dadd(-128.77, 124.02, 24.78, 1.8)
	pt3dadd(-132.57, 127.6, 24.78, 1.8)
	pt3dadd(-135.22, 131.21, 24.78, 1.8)
	pt3dadd(-138.4, 133.46, 24.78, 1.8)
	pt3dadd(-142.63, 136.39, 24.78, 1.8)
	pt3dadd(-145.02, 139.09, 24.78, 1.8)
	pt3dadd(-150.58, 145.4, 24.78, 1.8)
	pt3dadd(-154.97, 147.98, 24.78, 1.8)
	pt3dadd(-158.94, 150.91, 24.78, 1.8)
	pt3dadd(-161.06, 153.39, 24.78, 1.8)
	pt3dadd(-166.36, 157.67, 25.54, 1.8)
	pt3dadd(-171.39, 162.85, 25.54, 1.8)
	pt3dadd(-177.29, 166.88, 25.54, 1.8)
	pt3dadd(-184.7, 172.29, 25.54, 1.8)
	pt3dadd(-194.24, 177.92, 25.73, 1.8)
	pt3dadd(-200.03, 181.83, 30.12, 1.8)
	pt3dadd(-206.91, 187.91, 30.12, 1.8)
	pt3dadd(-213.26, 191.74, 29.47, 1.8)
	pt3dadd(-217.5, 194.44, 29.47, 1.8)
	pt3dadd(-227.2, 195.08, 30.77, 1.8)
	pt3dadd(-238.05, 195.53, 33.54, 1.8)
	pt3dadd(-244.67, 196.65, 33.54, 1.8)
	pt3dadd(-252.01, 197.05, 33.54, 1.8)
	pt3dadd(-253.6, 198.4, 33.54, 1.8)
	pt3dadd(-258.37, 198.4, 30.31, 1.8)
	pt3dadd(-261.02, 196.37, 30.31, 1.8)
  }
  dend[7] {pt3dclear()
	pt3dadd(-8.74, 13.29, 0.05, 2.25)
	pt3dadd(-15.83, 18.55, -0.26, 2.25)
	pt3dadd(-21.12, 23.73, -0.26, 2.25)
	pt3dadd(-25.09, 27.56, -0.06, 2.25)
	pt3dadd(-30.92, 30.71, -1.28, 2.25)
	pt3dadd(-38.33, 35.44, 0.81, 2.25)
	pt3dadd(-44.45, 39.1, -3.01, 2.25)
	pt3dadd(-49.75, 44.06, -3.01, 2.25)
	pt3dadd(-56.1, 50.14, -3.25, 2.25)
	pt3dadd(-63.25, 57.35, -3.51, 2.25)
	pt3dadd(-65.38, 58.98, -3.31, 2.25)
  }
  dend[8] {pt3dclear()
	pt3dadd(-65.38, 58.98, -3.31, 2.25)
	pt3dadd(-66.18, 63.26, -3.31, 1.8)
	pt3dadd(-67.79, 66.33, -3.31, 1.8)
	pt3dadd(-70.44, 72.41, -3.31, 1.8)
	pt3dadd(-76.79, 85.03, -4.42, 1.8)
	pt3dadd(-80.84, 94.89, -6.85, 1.8)
	pt3dadd(-84.01, 104.35, -6.85, 1.8)
	pt3dadd(-87.44, 117.02, -9.26, 1.8)
	pt3dadd(-88.6, 119.42, -7.48, 2.25)
	pt3dadd(-89.39, 121.45, -8.51, 1.8)
  }
  dend[9] {pt3dclear()
	pt3dadd(-89.39, 121.45, -8.51, 1.8)
	pt3dadd(-89.92, 126.41, -8.51, 1.8)
	pt3dadd(-90.72, 128.88, -10.9, 1.8)
  }
  dend[10] {pt3dclear()
	pt3dadd(-90.72, 128.88, -10.9, 1.8)
	pt3dadd(-90.19, 139.25, -8.6, 1.8)
	pt3dadd(-92.38, 152.74, -11.28, 1.8)
	pt3dadd(-93.97, 161.53, -10.08, 1.8)
	pt3dadd(-96.18, 169.51, -6.89, 1.8)
	pt3dadd(-98.57, 174.92, -8.42, 1.8)
	pt3dadd(-100.68, 181.22, -5.9, 1.8)
	pt3dadd(-103.45, 191.14, -5.9, 1.8)
	pt3dadd(-105.3, 200.6, -1.1, 1.8)
	pt3dadd(-107.85, 209.41, -1.1, 1.8)
  }
}
proc shape3d_2() {
  dend[10] {	pt3dadd(-108.91, 215.07, -1.38, 1.8)
	pt3dadd(-109.44, 225.2, 1.98, 1.8)
	pt3dadd(-114.56, 243.62, 1.98, 1.8)
	pt3dadd(-116.94, 250.15, 1.98, 1.8)
	pt3dadd(-119.38, 252, 1.98, 1.8)
	pt3dadd(-119.38, 259.66, 2.5, 1.8)
	pt3dadd(-121.5, 266.42, 4.34, 1.8)
	pt3dadd(-121.77, 268.22, 4.34, 1.8)
	pt3dadd(-115.41, 271.83, 10.65, 1.8)
	pt3dadd(-113.08, 274.08, 9.08, 1.8)
  }
  dend[11] {pt3dclear()
	pt3dadd(-90.72, 128.88, -10.9, 1.8)
	pt3dadd(-96.34, 138.31, -12.78, 1.8)
	pt3dadd(-97.67, 141.01, -12.78, 1.8)
	pt3dadd(-100.05, 149.8, -12.91, 1.8)
	pt3dadd(-106.15, 158.16, -15.98, 1.8)
	pt3dadd(-112.77, 164.24, -15.98, 1.8)
	pt3dadd(-118.34, 167.85, -17.22, 1.8)
	pt3dadd(-128.06, 174.98, -17.22, 1.8)
	pt3dadd(-134.42, 180.62, -17.22, 1.8)
	pt3dadd(-142.36, 188.05, -17.38, 1.8)
	pt3dadd(-152.46, 195.86, -20.89, 1.8)
	pt3dadd(-160.14, 203.74, -22.07, 1.8)
	pt3dadd(-167.82, 214.56, -24.42, 1.8)
	pt3dadd(-173.16, 220.43, -24.42, 1.8)
	pt3dadd(-176.34, 224.04, -24.42, 1.8)
	pt3dadd(-178.46, 229.67, -24.42, 1.8)
	pt3dadd(-181.37, 230.79, -22.82, 1.8)
	pt3dadd(-184.81, 230.79, -22.82, 1.8)
	pt3dadd(-189.05, 234.17, -24.42, 1.8)
  }
  dend[12] {pt3dclear()
	pt3dadd(-89.39, 121.45, -8.51, 1.8)
	pt3dadd(-93.49, 128.61, -6.38, 1.8)
	pt3dadd(-98.52, 136.49, -6.38, 1.8)
	pt3dadd(-103.82, 143.25, -6.38, 1.8)
	pt3dadd(-111.21, 148.63, -7.27, 1.8)
	pt3dadd(-118.89, 158.54, -7.27, 1.8)
	pt3dadd(-125.51, 168.23, -7.17, 1.8)
	pt3dadd(-134.87, 175.36, -3.9, 1.8)
	pt3dadd(-142.28, 183.02, -3.9, 1.8)
	pt3dadd(-147.31, 187.07, -3.9, 1.8)
	pt3dadd(-155.34, 190.35, -3.32, 1.8)
	pt3dadd(-161.96, 195.08, 1.34, 1.8)
	pt3dadd(-172.29, 203.19, 1.34, 1.8)
	pt3dadd(-179.32, 211.5, 1.34, 1.8)
	pt3dadd(-186.47, 219.39, 0.16, 1.8)
	pt3dadd(-193.89, 228.17, 4.59, 1.8)
	pt3dadd(-197.77, 232.03, 4.59, 1.8)
	pt3dadd(-200.95, 238.56, 6.06, 1.8)
	pt3dadd(-200.95, 242.62, 9.85, 1.8)
  }
  dend[13] {pt3dclear()
	pt3dadd(-65.38, 58.98, -3.31, 2.25)
	pt3dadd(-72.94, 65.68, 0.61, 1.8)
	pt3dadd(-78.5, 74.02, 0.61, 1.8)
	pt3dadd(-83.54, 81, 0.61, 1.8)
	pt3dadd(-90.02, 86.88, 3.56, 1.8)
	pt3dadd(-96.9, 92.51, 3.56, 1.8)
	pt3dadd(-106.7, 101.07, 2.23, 1.8)
	pt3dadd(-113.42, 106.23, 2.23, 1.8)
	pt3dadd(-116.07, 108.48, -2.08, 1.8)
  }
  dend[14] {pt3dclear()
	pt3dadd(-116.07, 108.48, -2.08, 1.8)
	pt3dadd(-122.42, 118.17, -2.08, 1.8)
	pt3dadd(-127.19, 124.25, -3.21, 1.8)
	pt3dadd(-132.76, 129.13, -5.59, 1.8)
	pt3dadd(-139.91, 134.54, -5.59, 1.8)
	pt3dadd(-146.26, 139.49, -5.59, 1.8)
	pt3dadd(-152.62, 143.77, -7.07, 1.8)
	pt3dadd(-164.25, 149.88, -7.07, 1.8)
	pt3dadd(-174.05, 156.87, -7.07, 1.8)
	pt3dadd(-181.21, 162.91, -10.17, 1.8)
	pt3dadd(-186.25, 166.96, -12.3, 1.8)
	pt3dadd(-193.13, 169.89, -13.94, 1.8)
	pt3dadd(-204.25, 176.2, -17.22, 1.8)
	pt3dadd(-218.03, 184.06, -19.1, 1.8)
	pt3dadd(-227.83, 191.94, -20.97, 1.8)
	pt3dadd(-235.21, 194.73, -20.97, 1.8)
	pt3dadd(-237.33, 196.98, -24.41, 1.8)
	pt3dadd(-239.45, 196.76, -24.41, 1.8)
	pt3dadd(-250.57, 195.18, -24.41, 1.8)
	pt3dadd(-254.57, 198.8, -24.37, 1.8)
  }
  dend[15] {pt3dclear()
	pt3dadd(-116.07, 108.48, -2.08, 1.8)
	pt3dadd(-120.23, 111.3, 4.71, 1.8)
	pt3dadd(-125, 115.13, 4.71, 1.8)
	pt3dadd(-134.79, 119.86, 8.2, 1.8)
	pt3dadd(-141.41, 126.65, 8.2, 1.8)
	pt3dadd(-149.94, 132.88, 12.15, 1.8)
	pt3dadd(-152.32, 133.11, 12.15, 1.8)
	pt3dadd(-158.68, 142.34, 11.15, 1.8)
	pt3dadd(-163.44, 150.45, 16.93, 1.8)
	pt3dadd(-165.86, 152.75, 21.5, 1.8)
	pt3dadd(-170.63, 157.51, 26.56, 1.8)
	pt3dadd(-175.13, 164.71, 25.85, 1.8)
	pt3dadd(-177.7, 177.84, 64.36, 1.8)
	pt3dadd(-183.79, 189.55, 64.55, 1.8)
	pt3dadd(-189.16, 200.41, 66.02, 1.8)
	pt3dadd(-194.99, 209.2, 67.04, 1.8)
	pt3dadd(-198.33, 214.05, 70.74, 1.8)
	pt3dadd(-201.64, 217.15, 70.74, 1.8)
	pt3dadd(-202.7, 227.97, 72.64, 1.8)
  }
  dend[16] {pt3dclear()
	pt3dadd(0, 0, 0, 2.25)
	pt3dadd(16.94, 18.39, -4.93, 2.25)
	pt3dadd(24.09, 24.24, -3.46, 2.25)
	pt3dadd(28.06, 28.3, -7.31, 2.25)
	pt3dadd(34.82, 32, -9.9, 2.25)
	pt3dadd(39.59, 41.69, -9.9, 2.25)
	pt3dadd(44.35, 55.43, -10.72, 2.25)
	pt3dadd(48.37, 69.59, -13.54, 2.25)
	pt3dadd(49.7, 73.42, -13.54, 2.25)
  }
  dend[17] {pt3dclear()
	pt3dadd(49.7, 73.42, -13.54, 2.25)
	pt3dadd(51.28, 83.78, -14.26, 2.25)
	pt3dadd(55.64, 95.29, -18.33, 2.25)
	pt3dadd(57.75, 101.37, -18.33, 2.25)
	pt3dadd(60.93, 107.45, -18.33, 2.25)
	pt3dadd(63.91, 118.39, -19, 2.25)
	pt3dadd(66.5, 131.68, -21.99, 2.25)
	pt3dadd(70.37, 149.17, -24.64, 2.25)
	pt3dadd(73.02, 160.43, -29.35, 2.25)
	pt3dadd(76.38, 169.44, -31.85, 2.25)
	pt3dadd(79.03, 173.27, -31.51, 2.25)
	pt3dadd(80.08, 175.74, -32.62, 2.25)
  }
  dend[18] {pt3dclear()
	pt3dadd(80.08, 175.74, -32.62, 2.25)
	pt3dadd(86.44, 182.05, -32.03, 1.8)
	pt3dadd(90.11, 184.5, -32.03, 1.8)
	pt3dadd(94.08, 193.74, -32.54, 1.8)
	pt3dadd(97.52, 201.62, -33.26, 1.8)
	pt3dadd(103.43, 208.86, -34.54, 1.8)
	pt3dadd(108.72, 216.74, -34.94, 1.8)
	pt3dadd(114.81, 223.5, -34.94, 1.8)
	pt3dadd(121.68, 227.88, -34.94, 1.8)
	pt3dadd(126.45, 232.61, -35.98, 1.8)
  }
  dend[19] {pt3dclear()
	pt3dadd(80.08, 175.74, -32.62, 2.25)
	pt3dadd(81.34, 180.22, -39.15, 2.25)
  }
  dend[20] {pt3dclear()
	pt3dadd(81.34, 180.22, -39.15, 2.25)
	pt3dadd(84.52, 185.4, -42.31, 2.25)
	pt3dadd(85.05, 191.03, -45.18, 2.25)
	pt3dadd(87.17, 197.11, -45.18, 2.25)
	pt3dadd(91.67, 202.97, -48.05, 2.25)
	pt3dadd(95.11, 207.48, -50.91, 2.25)
	pt3dadd(103.14, 215.03, -53.54, 2.25)
	pt3dadd(107.91, 225.4, -59.58, 1.8)
	pt3dadd(109.76, 230.35, -62.65, 1.8)
	pt3dadd(110, 235.13, -62.65, 1.8)
	pt3dadd(112.91, 240.31, -62.65, 1.8)
	pt3dadd(112.65, 244.37, -66.6, 1.8)
	pt3dadd(121.65, 254.28, -70.75, 1.8)
  }
  dend[21] {pt3dclear()
	pt3dadd(81.34, 180.22, -39.15, 2.25)
	pt3dadd(83.98, 188.33, -31.36, 1.8)
	pt3dadd(87.69, 198.7, -31.36, 1.8)
	pt3dadd(89.65, 206.51, -31.36, 1.8)
	pt3dadd(92.3, 215.3, -30.97, 1.8)
	pt3dadd(94.42, 223.18, -32.46, 1.8)
	pt3dadd(98.11, 234.89, -29.67, 1.8)
	pt3dadd(103.4, 248.4, -29.67, 1.8)
	pt3dadd(107.57, 263.02, -30.7, 1.8)
	pt3dadd(110.48, 275.41, -26.66, 1.8)
	pt3dadd(112.78, 282.83, -26.66, 1.8)
	pt3dadd(113.84, 287.11, -26.66, 1.8)
	pt3dadd(115.96, 296.35, -27.58, 1.8)
	pt3dadd(116.79, 301.33, -27.54, 1.8)
	pt3dadd(121.3, 312.37, -24.79, 1.8)
	pt3dadd(122.62, 315.3, -25.31, 1.8)
  }
  dend[22] {pt3dclear()
	pt3dadd(49.7, 73.42, -13.54, 2.25)
	pt3dadd(56.02, 83.96, -13.54, 2.25)
	pt3dadd(62.11, 96.8, -13.54, 2.25)
	pt3dadd(65.05, 102.41, -15.88, 2.25)
	pt3dadd(67.17, 111.64, -18.26, 2.25)
	pt3dadd(71.4, 119.98, -18.26, 2.25)
	pt3dadd(74.51, 127.88, -18.26, 2.25)
	pt3dadd(80.6, 136.44, -19.95, 2.25)
	pt3dadd(83.52, 142.53, -19.95, 2.25)
	pt3dadd(85.72, 150.96, -19.95, 2.25)
	pt3dadd(89.95, 158.17, -19.77, 2.25)
	pt3dadd(94.19, 168.08, -19.77, 2.25)
	pt3dadd(101.61, 179.46, -20.98, 2.25)
	pt3dadd(104, 188.47, -21.37, 2.25)
	pt3dadd(107.91, 195.36, -21.37, 2.25)
	pt3dadd(114, 201.22, -25.32, 2.25)
	pt3dadd(121.15, 214.96, -27.07, 2.25)
	pt3dadd(127.55, 222.83, -27.07, 2.25)
	pt3dadd(136.29, 238.85, -28.42, 2.25)
	pt3dadd(141.7, 248.49, -28.42, 2.25)
	pt3dadd(146.2, 254.57, -28.42, 2.25)
	pt3dadd(152.29, 264.03, -28.42, 2.25)
	pt3dadd(154.32, 271.66, -28.42, 2.25)
	pt3dadd(157.23, 280.9, -29.41, 2.25)
	pt3dadd(163.06, 288.78, -25.66, 2.25)
	pt3dadd(166.18, 297.33, -21.86, 2.25)
	pt3dadd(167.5, 304.54, -21.01, 2.25)
	pt3dadd(168.56, 310.85, -18.78, 2.25)
	pt3dadd(168.8, 313.3, -16.87, 2.25)
  }
  dend[23] {pt3dclear()
	pt3dadd(0, 0, 0, 2.25)
	pt3dadd(8.19, 16.25, -2.61, 2.25)
	pt3dadd(9.78, 22.79, 0.95, 2.7)
	pt3dadd(11.64, 30.45, 1.32, 2.7)
	pt3dadd(12.79, 35.33, 2.03, 2.7)
	pt3dadd(15.17, 38.71, 2.79, 2.7)
	pt3dadd(16.76, 42.31, 2.62, 2.7)
  }
  dend[24] {pt3dclear()
	pt3dadd(16.76, 42.31, 2.62, 2.7)
	pt3dadd(20.2, 46.59, 7.25, 2.25)
	pt3dadd(22.59, 54.25, 8.01, 2.25)
	pt3dadd(24.65, 58.45, 10.93, 2.25)
	pt3dadd(25.98, 65.21, 12.42, 2.25)
	pt3dadd(27.3, 70.84, 12.04, 2.25)
  }
}
proc shape3d_3() {
  dend[24] {	pt3dadd(30.21, 79.18, 14.83, 2.25)
	pt3dadd(34.64, 91.82, 16.25, 2.25)
	pt3dadd(38.87, 99.47, 16.25, 2.25)
	pt3dadd(44.03, 109.11, 19.57, 2.25)
	pt3dadd(47.74, 120.15, 19.57, 2.25)
	pt3dadd(51.71, 133.52, 21.66, 2.25)
	pt3dadd(53.56, 143.43, 24.48, 2.25)
	pt3dadd(57.77, 155.76, 24.37, 2.25)
	pt3dadd(62.54, 169.06, 28.23, 2.25)
	pt3dadd(64.92, 174.83, 28.23, 2.25)
	pt3dadd(71.54, 184.74, 28.36, 2.25)
	pt3dadd(72.86, 186.1, 28.36, 2.25)
  }
  dend[25] {pt3dclear()
	pt3dadd(72.86, 186.1, 28.36, 2.25)
	pt3dadd(80.28, 192.4, 28.78, 1.8)
	pt3dadd(86.23, 197.83, 26.99, 1.8)
	pt3dadd(91.52, 204.36, 26.99, 1.8)
	pt3dadd(95.76, 210, 26.99, 1.8)
	pt3dadd(100.26, 219.68, 26.99, 1.8)
	pt3dadd(103.05, 224.13, 26.99, 1.8)
	pt3dadd(104.9, 230.89, 26.99, 1.8)
	pt3dadd(108.61, 240.35, 26.99, 1.8)
	pt3dadd(112.84, 252.16, 26.99, 1.8)
	pt3dadd(113.9, 255.77, 26.99, 1.8)
	pt3dadd(113.9, 258.02, 26.99, 1.8)
	pt3dadd(116.81, 260.05, 24.82, 1.8)
  }
  dend[26] {pt3dclear()
	pt3dadd(72.86, 186.1, 28.36, 2.25)
	pt3dadd(78.3, 195.21, 30.11, 2.25)
	pt3dadd(83.86, 202.64, 32.72, 2.25)
	pt3dadd(87.3, 208.95, 32.72, 2.25)
	pt3dadd(87.66, 211.68, 32.64, 2.25)
  }
  dend[27] {pt3dclear()
	pt3dadd(87.66, 211.68, 32.64, 2.25)
	pt3dadd(91.37, 216.86, 35.42, 2.25)
	pt3dadd(94.81, 227.67, 37.9, 1.8)
	pt3dadd(97.91, 233.88, 40.91, 1.8)
	pt3dadd(100.3, 240.42, 40.86, 1.8)
	pt3dadd(102.41, 249.2, 44.14, 1.8)
	pt3dadd(106.64, 258.19, 44.24, 1.8)
	pt3dadd(111.4, 266.3, 47.07, 1.8)
	pt3dadd(114.58, 274.2, 47.01, 1.8)
	pt3dadd(116.19, 281.83, 53.1, 1.8)
	pt3dadd(117.25, 287.69, 56.64, 1.8)
	pt3dadd(118.57, 291.52, 57.72, 1.8)
	pt3dadd(120.69, 297.38, 58.79, 1.8)
  }
  dend[28] {pt3dclear()
	pt3dadd(87.66, 211.68, 32.64, 2.25)
	pt3dadd(83.63, 222.66, 32.64, 1.8)
	pt3dadd(81.25, 232.35, 34.78, 1.8)
	pt3dadd(76.96, 239.18, 34.78, 1.8)
	pt3dadd(73.26, 244.36, 34.78, 1.8)
	pt3dadd(69.55, 255.4, 37.62, 1.8)
	pt3dadd(67.28, 266.44, 39.12, 1.8)
	pt3dadd(66.49, 270.04, 39.12, 1.8)
	pt3dadd(61.72, 282.43, 41.23, 1.8)
	pt3dadd(55.45, 289.86, 44.93, 1.8)
  }
  dend[29] {pt3dclear()
	pt3dadd(16.76, 42.31, 2.62, 2.7)
	pt3dadd(19.65, 50.06, -0.88, 2.25)
	pt3dadd(22.03, 59.07, -3.54, 2.25)
	pt3dadd(23.79, 65.08, -7.32, 2.25)
	pt3dadd(25.11, 68.91, -7.32, 2.25)
	pt3dadd(29.08, 83.1, -9.19, 2.25)
	pt3dadd(32.91, 96.07, -10.74, 2.25)
	pt3dadd(33.97, 103.5, -10.74, 2.25)
	pt3dadd(35.85, 109.26, -10.74, 2.25)
	pt3dadd(38.77, 118.94, -13.58, 2.25)
	pt3dadd(42.47, 128.43, -13.58, 2.25)
	pt3dadd(44.98, 141.89, -15.88, 2.25)
	pt3dadd(46.84, 152.03, -17.94, 2.25)
	pt3dadd(49.65, 167.99, -18.02, 2.25)
	pt3dadd(56, 181.29, -20.55, 2.25)
	pt3dadd(62.62, 199.25, -21.48, 2.25)
	pt3dadd(67.83, 216.35, -23.9, 2.25)
	pt3dadd(71.01, 224.46, -25.84, 2.25)
	pt3dadd(76.83, 238.57, -28.36, 2.25)
	pt3dadd(79.47, 248.7, -30.93, 2.25)
	pt3dadd(81.25, 262.29, -31.47, 2.25)
	pt3dadd(81.52, 266.12, -32.14, 2.25)
	pt3dadd(83.11, 268.82, -32.14, 2.25)
	pt3dadd(83.93, 274.68, -35.94, 2.25)
  }
}
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(2, 3, 5, 6,10,11,12,14,15,18,20,21,22,25,26,27,28,29) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.78358, 0.79119, 0.71258, 0.70042, 0.71561, 0.73167, 0.72623,  0.7061, 0.68621, 0.71831, 0.63073, 0.58476, 0.75931, 0.66558, 0.98724, 0.5, 0.5, 0.88237) 
for i= 0 , 17 { 
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, 4, 7,16,23,24,29) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5,0.067979,0.038323, 0.35558, 0.36559, 0.5,0.067959,0.043886) 
for i= 0 , 7 { 
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 , 17 { 
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) // # 17 
} 
 
 // //***** 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) // # 18 
 
 // //***** Sprout   
 
for i= 0 , 7 { 
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) // # 18 
} 

	  
	}
	func is_art() { return 0 }

	endtemplate GranuleCell44
//************************************************************************************************************