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

// Original name on neuroMorpho.org n27-r01-02-sl4.CNG.swc

ndend1=15

  
public  pre_list, connect_pre, subsets, is_art, is_connected
public  vbc2gc, vmc2gc, vhc2gc, vgc2bc, vbc2bc, vmc2bc, vhc2bc, vgc2mc, vbc2mc, vmc2mc, vhc2mc, vgc2hc, vmc2hc
public soma, dend
public all, gcldend, pdend, mdend, ddend

nst=10
	objectvar stim[nst]
double stimdur[nst], stimdel[nst], stimamp[nst]
public stim, stimdur, stimamp, stimdel
create soma, dend[ndend1]
objref syn, pre_list


proc init() {
	pre_list = new List()
	subsets()
	gctemp()
	synapse()
}
objref all, gcldend, pdend, mdend, ddend
proc subsets(){ local i
	objref all, gcldend, pdend, mdend, ddend
	all = new SectionList()
		soma all.append()
		for i=0, 14 dend[i] all.append()
// 		for i=0, 3 gcdend2 [i] all.append()

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

	pdend  = new SectionList()
		for i=1, 6   dend[i] pdend.append()
		dend[10] pdend.append()
		


	mdend  = new SectionList()
		for i=7, 9 dend[i] mdend.append()
		for i=12, 14 dend[i] mdend.append()		


	ddend  = new SectionList()

		dend[11] ddend.append()

}



proc gctemp() {

// 	soma {nseg=1 L=16.8 diam=16.8} // changed L & diam
	
/*	dend [0] {nseg=1  L=27.5855 diam=2.3784}
	dend [1] {nseg=1  L=3.90655 diam=1.546}
	dend [2] {nseg=1  L=49.90057 diam=1.048}
	dend [3] {nseg=1  L=58.66612 diam=1.2018}
	dend [4] {nseg=1  L=77.90403 diam=0.8822}
	dend [5] {nseg=1  L=65.45236 diam=0.7149}
	dend [6] {nseg=1  L=39.08021 diam=0.8525}
	dend [7] {nseg=1  L=28.99695 diam=0.6966}
	dend [8] {nseg=1  L=34.99227 diam=0.6848}
	dend [9] {nseg=1  L=42.50559 diam=0.6237}
	dend [10] {nseg=1 L=59.65832 diam=0.5661}
	dend [11] {nseg=1 L=87.08064 diam=0.6372}
	dend [12] {nseg=1 L=11.72373 diam=0.7863}
	dend [13] {nseg=1 L=78.56052 diam=0.5773}
	dend [14] {nseg=1 L=65.70179 diam=0.6466}
	dend [15] {nseg=1 L=135.75229 diam=0.6171}
	dend [16] {nseg=1 L=23.22847 diam=0.5976}
	dend [17] {nseg=1 L=54.47258 diam=0.6512}
	dend [18] {nseg=1 L=38.29144 diam=0.6966}
	dend [19] {nseg=1 L=42.69891 diam=0.5877}*/
	
	
// 	dend [20] {nseg=1 L=53.60330 diam=0.5795}
// 	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[5](1)
  for i = 11, 12 connect dend[i](0), dend[7](1)
  for i = 13, 14 connect dend[i](0), dend[8](1)
// 	  connect /*axon*/(1), soma(0)
	  basic_shape()

	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 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))
	}
proc shape3d_1() {
//   axon {pt3dclear()
// 	pt3dadd(0.6, -38, 0.01, 0.2)
// 	pt3dadd(0.6, -18, 0.01, 10)
//   }

  
  soma {pt3dclear()
	pt3dadd(0.6, -18, 0.01, 10)
	pt3dadd(0.6, 0.3553, 0, 9.56)
  }
  dend {pt3dclear()
	pt3dadd(0.6, 0.3553, 0, 9.56)
	pt3dadd(5.35, -2.33, 0.08, 1.95)
	pt3dadd(6.18, -2.97, 0.08, 1.95)
	pt3dadd(7.11, -3.52, 0.51, 2.23)
	pt3dadd(8.31, -3.8, -0.7, 2.5)
	pt3dadd(9.58, -4.58, -0.7, 2.5)
	pt3dadd(10.97, -5.59, -0.37, 2.13)
	pt3dadd(12.18, -6.23, -0.54, 1.86)
	pt3dadd(13.29, -6.78, -0.54, 2.13)
	pt3dadd(14.5, -7.7, -0.79, 2.69)
	pt3dadd(15.61, -8.34, -1.12, 2.97)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(0.6, 0.3553, 0, 9.56)
// 	pt3dadd(-5.29, 1.38, 0, 2.23)
// 	pt3dadd(-6.96, 2.3, 0, 1.95)
// 	pt3dadd(-7.79, 3.4, 0.11, 1.76)
// 	pt3dadd(-8.91, 4.6, 0.11, 1.86)
// 	pt3dadd(-9.65, 6.16, -0.41, 1.02)
// 	pt3dadd(-10.2, 7.72, -0.73, 0.93)
// 	pt3dadd(-11.6, 8.55, 0.28, 0.93)
// 	pt3dadd(-12.89, 9.47, 0.28, 0.93)
// 	pt3dadd(-13.54, 10.85, 0.28, 1.3)
// 	pt3dadd(-14.29, 12.41, 0.47, 1.11)
// 	pt3dadd(-15.68, 13.24, 0.47, 0.93)
// 	pt3dadd(-16.79, 14.34, 0.31, 0.83)
// 	pt3dadd(-18.08, 14.97, 0.31, 0.74)
// 	pt3dadd(-19.38, 16.35, -0.27, 0.65)
// 	pt3dadd(-20.68, 17.18, -0.29, 0.46)
// 	pt3dadd(-21.7, 18.37, 0.31, 0.46)
// 	pt3dadd(-22.62, 19.57, -0.67, 0.46)
// 	pt3dadd(-23.18, 20.3, -0.67, 0.46)
// 	pt3dadd(-24.48, 21.4, -0.71, 0.46)
// 	pt3dadd(-25.41, 22.05, -0.81, 0.46)
// 	pt3dadd(-26.24, 22.78, -0.54, 0.46)
// 	pt3dadd(-28.1, 23.15, -0.54, 0.46)
// 	pt3dadd(-29.12, 23.89, -0.71, 0.46)
// 	pt3dadd(-29.58, 24.81, -0.71, 0.65)
// 	pt3dadd(-30.51, 25.27, -0.71, 0.56)
// 	pt3dadd(-31.9, 25.72, -1.31, 0.56)
// 	pt3dadd(-32.83, 26.18, -1.31, 0.56)
// 	pt3dadd(-33.94, 27.1, -0.66, 0.56)
// 	pt3dadd(-34.59, 27.65, -0.66, 0.56)
// 	pt3dadd(-35.42, 28.39, -0.88, 0.56)
// 	pt3dadd(-36.31, 29.09, -1.08, 0.56)
// 	pt3dadd(-37.43, 29.91, -1.65, 0.56)
// 	pt3dadd(-39, 31.11, -1.03, 0.56)
// 	pt3dadd(-40.02, 32.12, -1.28, 0.56)
// 	pt3dadd(-41.32, 33.22, -0.62, 0.56)
// 	pt3dadd(-42.34, 33.68, -0.71, 0.56)
// 	pt3dadd(-43.92, 34.97, -1.04, 0.56)
// 	pt3dadd(-45.4, 35.98, -0.48, 0.56)
// 	pt3dadd(-46.98, 36.99, -0.8, 0.56)
// 	pt3dadd(-48.19, 38, -0.38, 0.56)
// 	pt3dadd(-49.21, 38.74, -0.14, 0.56)
// 	pt3dadd(-50.14, 39.29, -0.14, 0.56)
// 	pt3dadd(-50.78, 40.48, 0.07, 0.56)
// 	pt3dadd(-51.71, 41.31, 0.07, 0.65)
// 	pt3dadd(-52.92, 41.4, -0.81, 0.65)
// 	pt3dadd(-53.66, 42.05, -0.81, 0.65)
// 	pt3dadd(-54.96, 42.87, -0.81, 0.83)
// 	pt3dadd(-55.91, 43.67, -1.25, 0.56)
// 	pt3dadd(-57.12, 43.49, -1.25, 0.56)
// 	pt3dadd(-57.4, 44.41, -1.25, 0.74)
// 	pt3dadd(-57.77, 45.51, -1.66, 0.56)
// 	pt3dadd(-58.7, 46.15, -1.66, 0.56)
// 	pt3dadd(-59.53, 47.07, -1.66, 0.56)
// 	pt3dadd(-60.37, 47.81, -1.83, 0.56)
// 	pt3dadd(-61.2, 48.08, -1.83, 0.65)
// 	pt3dadd(-61.57, 49.19, -1.62, 0.56)
// 	pt3dadd(-62.31, 49.55, -2.01, 0.56)
// 	pt3dadd(-63.15, 49.19, -2, 0.56)
// 	pt3dadd(-63.71, 50.01, -2, 0.56)
// 	pt3dadd(-64.54, 50.66, -2.26, 0.56)
// 	pt3dadd(-65.47, 51.21, -2.26, 0.74)
// 	pt3dadd(-66.21, 51.21, -2.26, 0.74)
// 	pt3dadd(-66.95, 51.76, -2.51, 0.56)
// 	pt3dadd(-67.69, 52.49, -2.51, 0.56)
// 	pt3dadd(-67.6, 53.32, -1.82, 0.56)
// 	pt3dadd(-68.34, 53.51, -2.75, 0.56)
// 	pt3dadd(-69.46, 53.69, -2.75, 0.56)
// 	pt3dadd(-70.66, 53.97, -2.87, 0.56)
// 	pt3dadd(-71.41, 53.87, -2.87, 0.56)
// 	pt3dadd(-71.78, 54.52, -2.87, 0.56)
// 	pt3dadd(-72.7, 54.42, -2.87, 0.56)
// 	pt3dadd(-73.54, 54.7, -2.16, 0.65)
// 	pt3dadd(-74.74, 55.53, -2.16, 0.65)
// 	pt3dadd(-75.58, 55.8, -2.16, 0.56)
// 	pt3dadd(-75.95, 56.26, -2.16, 0.65)
// 	pt3dadd(-76.41, 57.09, -2.16, 0.65)
// 	pt3dadd(-76.86, 57.62, -2.67, 0.83)
// 	pt3dadd(-77.6, 58.08, -3.11, 1.02)
// 	pt3dadd(-77.69, 58.63, -3.11, 1.02)
//   }
  dend[1] {pt3dclear()
	pt3dadd(15.61, -8.34, -1.12, 2.97)
	pt3dadd(17.1, -8.52, -0.97, 1.76)
	pt3dadd(18.21, -9.07, -0.38, 1.76)
	pt3dadd(19.88, -9.53, -0.65, 1.76)
	pt3dadd(21.37, -9.99, -0.46, 1.76)
	pt3dadd(22.66, -10.54, -0.63, 1.76)
	pt3dadd(23.5, -10.91, -1.29, 1.76)
  }
  dend[2] {pt3dclear()
	pt3dadd(15.61, -8.34, -1.12, 2.97)
	pt3dadd(15.24, -10.27, -0.36, 1.48)
	pt3dadd(15.43, -11.56, 0.17, 1.3)
	pt3dadd(15.71, -13.12, 0.17, 1.02)
	pt3dadd(15.71, -14.41, 0.85, 1.02)
	pt3dadd(15.98, -15.61, 0.23, 0.83)
	pt3dadd(16.63, -16.8, 0.72, 0.83)
	pt3dadd(17.19, -17.8, 0.6, 0.74)
	pt3dadd(17.79, -17.78, 0.31, 0.65)
	pt3dadd(18.81, -17.87, 0.31, 0.65)
	pt3dadd(19.28, -18.52, 0.87, 0.65)
	pt3dadd(19.74, -19.8, 0.83, 1.21)
  }
  dend[3] {pt3dclear()
	pt3dadd(23.5, -10.91, -1.29, 1.76)
	pt3dadd(24.6, -10.97, -1.29, 0.93)
	pt3dadd(25.34, -11.43, -1.29, 0.93)
	pt3dadd(26.08, -11.61, -1.29, 1.02)
  }
  dend[4] {pt3dclear()
	pt3dadd(23.5, -10.91, -1.29, 1.76)
	pt3dadd(24.04, -11.89, -0.81, 1.02)
	pt3dadd(25.71, -12.53, -0.46, 0.83)
	pt3dadd(27.01, -12.71, -0.12, 0.83)
	pt3dadd(28.77, -13.54, -1.02, 0.83)
	pt3dadd(29.79, -14.09, 0.22, 0.83)
	pt3dadd(30.72, -15.1, 0.22, 0.83)
	pt3dadd(31.55, -15.56, 0.36, 0.74)
	pt3dadd(32.3, -15.84, 0.36, 0.74)
  }
  dend[5] {pt3dclear()
	pt3dadd(19.74, -19.8, 0.83, 1.21)
	pt3dadd(20.76, -20.17, 1.6, 0.65)
	pt3dadd(21.41, -20.26, 1.9, 0.65)
	pt3dadd(21.97, -20.81, 1.77, 0.65)
	pt3dadd(22.71, -21, 1.58, 0.74)
	pt3dadd(23.54, -21.36, 1.7, 0.74)
	pt3dadd(24.29, -22.1, 1.65, 0.74)
	pt3dadd(24.94, -22.47, 2.34, 0.93)
	pt3dadd(25.77, -23.02, 2.36, 1.11)
  }
  dend[6] {pt3dclear()
	pt3dadd(19.74, -19.8, 0.83, 1.21)
	pt3dadd(19.18, -20.54, 0.83, 0.74)
	pt3dadd(18.63, -21.73, 1.23, 0.65)
	pt3dadd(18.72, -23.02, 1.63, 0.65)
	pt3dadd(19.09, -24.49, 0.97, 0.65)
	pt3dadd(19.83, -26.24, 1.53, 0.65)
	pt3dadd(20.67, -28.17, 0.67, 0.65)
	pt3dadd(21.5, -29.73, 0.65, 0.65)
	pt3dadd(22.06, -31.29, -0.12, 0.65)
	pt3dadd(22.9, -32.39, 0.63, 0.65)
	pt3dadd(23.36, -33.41, 0.63, 0.65)
  }
  dend[7] {pt3dclear()
	pt3dadd(26.08, -11.61, -1.29, 1.02)
	pt3dadd(27.39, -11.99, -1.05, 1.02)
	pt3dadd(28.87, -12.18, -1.05, 1.02)
	pt3dadd(30.64, -12.45, -0.84, 1.02)
	pt3dadd(32.77, -12.82, -1.77, 1.02)
	pt3dadd(34.07, -12.64, -2, 1.02)
	pt3dadd(35.74, -13.09, -2, 1.02)
	pt3dadd(37.41, -13.37, -1.61, 0.93)
	pt3dadd(38.15, -14.11, -1.61, 0.93)
	pt3dadd(39.45, -14.38, -2.48, 0.93)
	pt3dadd(40.86, -14.69, -2.48, 0.93)
	pt3dadd(42.16, -15.06, -2.37, 1.02)
	pt3dadd(43.27, -15.24, -2.34, 1.02)
	pt3dadd(44.67, -15.61, -2.87, 1.02)
	pt3dadd(45.78, -15.89, -2.67, 0.93)
	pt3dadd(46.8, -16.44, -2.67, 1.02)
	pt3dadd(47.36, -17.08, -2.93, 1.02)
	pt3dadd(47.73, -17.63, -2.93, 1.21)
	pt3dadd(48.65, -17.82, -2.93, 1.02)
	pt3dadd(49.4, -18.09, -2.57, 1.02)
	pt3dadd(49.95, -18.74, -2.33, 0.74)
	pt3dadd(50.88, -19.38, -2.33, 0.74)
	pt3dadd(51.53, -19.47, -2.45, 0.93)
	pt3dadd(52.36, -19.75, -2.64, 0.93)
	pt3dadd(53.14, -19.72, -2.31, 1.11)
	pt3dadd(53.98, -20, -2.31, 1.11)
	pt3dadd(54.9, -20.37, -3.17, 0.93)
	pt3dadd(56.02, -20.74, -3.12, 0.93)
	pt3dadd(56.85, -21.1, -2.91, 1.11)
	pt3dadd(57.59, -21.47, -2.91, 1.39)
	pt3dadd(58.43, -22.02, -2.62, 1.67)
  }
  dend[8] {pt3dclear()
	pt3dadd(26.08, -11.61, -1.29, 1.02)
	pt3dadd(26.73, -12.53, -1.88, 0.74)
	pt3dadd(27.56, -13.72, -1.88, 0.74)
	pt3dadd(28.21, -15.01, -1.35, 0.74)
	pt3dadd(28.86, -16.21, -1.27, 0.74)
	pt3dadd(29.61, -16.76, -1.43, 0.74)
	pt3dadd(30.35, -17.31, -1.13, 0.74)
	pt3dadd(30.72, -18.14, -2.05, 0.74)
	pt3dadd(30.81, -19.24, -1.96, 0.74)
	pt3dadd(31.27, -19.88, -1.63, 0.74)
	pt3dadd(32.2, -20.8, -1.52, 0.74)
	pt3dadd(32.76, -22.18, -1.12, 0.74)
	pt3dadd(33.13, -23.1, -1.12, 0.74)
	pt3dadd(33.32, -24.29, -1.1, 0.74)
	pt3dadd(33.87, -25.49, -1.88, 0.65)
	pt3dadd(34.34, -26.78, -1.88, 0.65)
	pt3dadd(35.08, -27.97, -1.34, 0.65)
	pt3dadd(35.63, -28.98, -1.2, 0.83)
	pt3dadd(36.47, -29.63, -1.15, 0.83)
	pt3dadd(36.93, -30.73, -1.35, 0.83)
	pt3dadd(37.68, -31.56, -1.35, 0.83)
	pt3dadd(38.32, -32.56, -1.35, 0.83)
	pt3dadd(39.53, -33.39, -1.35, 0.83)
	pt3dadd(40.17, -34.31, -1.35, 0.74)
  }
}
proc shape3d_2() {
  dend[8] {	pt3dadd(40.73, -35.32, -1.35, 0.93)
	pt3dadd(40.92, -36.79, -1.35, 0.93)
	pt3dadd(41.38, -38.17, -1.35, 0.93)
	pt3dadd(42.12, -39.18, -1.35, 0.65)
	pt3dadd(42.87, -39.82, -1.33, 0.65)
	pt3dadd(43.33, -40.46, -1.54, 0.65)
	pt3dadd(43.89, -40.83, -1.54, 0.93)
  }
  dend[9] {pt3dclear()
	pt3dadd(25.77, -23.02, 2.36, 1.11)
	pt3dadd(26.51, -24.12, 1.8, 0.56)
	pt3dadd(27.35, -25.23, 1.8, 0.56)
	pt3dadd(28.28, -26.42, 1.6, 0.56)
	pt3dadd(29.2, -27.43, 1.6, 0.56)
	pt3dadd(29.76, -28.72, 1.92, 0.56)
	pt3dadd(30.26, -29.73, 2.17, 0.56)
	pt3dadd(30.91, -30.75, 2.17, 0.56)
	pt3dadd(31.74, -31.3, 2.49, 0.56)
	pt3dadd(32.39, -31.85, 2.39, 0.56)
	pt3dadd(33.23, -32.12, 2, 0.65)
	pt3dadd(34.06, -32.49, 2.43, 0.56)
	pt3dadd(34.62, -33.32, 1.94, 0.74)
	pt3dadd(35.08, -33.87, 1.94, 0.65)
	pt3dadd(35.73, -34.61, 1.94, 0.65)
	pt3dadd(36.38, -35.34, 2.35, 0.56)
	pt3dadd(37.03, -35.98, 1.95, 0.56)
	pt3dadd(37.77, -36.63, 1.95, 0.56)
	pt3dadd(38.42, -37.18, 1.72, 0.56)
	pt3dadd(38.89, -37.73, 1.72, 0.56)
	pt3dadd(39.16, -38.01, 1.5, 0.56)
	pt3dadd(39.72, -38.01, 1.5, 0.56)
  }
  dend[10] {pt3dclear()
	pt3dadd(25.77, -23.02, 2.36, 1.11)
	pt3dadd(26.98, -22.74, 2.08, 0.56)
	pt3dadd(27.9, -22.84, 2.06, 0.56)
	pt3dadd(28.83, -23.39, 2.53, 0.56)
	pt3dadd(29.67, -23.75, 2.56, 0.56)
	pt3dadd(30.41, -24.03, 2.56, 0.56)
	pt3dadd(30.87, -24.95, 2.02, 0.65)
	pt3dadd(31.62, -25.59, 2.02, 0.65)
  }
  dend[11] {pt3dclear()
	pt3dadd(58.43, -22.02, -2.62, 1.67)
	pt3dadd(58.69, -23.25, -3.07, 0.83)
	pt3dadd(59.62, -23.62, -3.07, 0.65)
	pt3dadd(61.01, -24.26, -3.09, 0.56)
	pt3dadd(61.75, -25.09, -3.26, 0.56)
	pt3dadd(62.96, -25.46, -3.26, 0.56)
	pt3dadd(63.98, -26.84, -3.58, 0.56)
	pt3dadd(64.72, -27.48, -3.58, 0.56)
	pt3dadd(65.46, -27.76, -3.58, 0.83)
	pt3dadd(66.21, -27.94, -3.37, 0.65)
	pt3dadd(67.04, -28.31, -3.47, 0.65)
	pt3dadd(67.97, -28.86, -3.89, 0.65)
	pt3dadd(68.8, -28.95, -3.32, 0.65)
	pt3dadd(69.82, -29.41, -2.93, 0.65)
	pt3dadd(70.66, -29.69, -2.93, 0.83)
	pt3dadd(71.86, -30.05, -3.4, 0.65)
	pt3dadd(73.75, -30.3, -3.73, 0.65)
	pt3dadd(74.77, -30.94, -4.31, 0.65)
	pt3dadd(76.26, -31.04, -4.25, 0.65)
	pt3dadd(77.56, -31.4, -3.67, 0.65)
	pt3dadd(79.04, -32.05, -4.23, 0.65)
	pt3dadd(80.62, -32.32, -5.03, 0.65)
	pt3dadd(81.55, -32.41, -4.55, 0.65)
	pt3dadd(82.85, -32.69, -4.83, 0.56)
	pt3dadd(84.24, -33.06, -5.29, 0.56)
	pt3dadd(85.54, -33.06, -4.64, 0.56)
	pt3dadd(86.88, -32.93, -4.32, 0.56)
	pt3dadd(87.99, -33.12, -5.53, 0.56)
	pt3dadd(89.01, -33.58, -5.97, 0.74)
	pt3dadd(90.12, -34.04, -5.66, 0.65)
	pt3dadd(91.14, -34.13, -6.14, 0.56)
	pt3dadd(92.35, -34.49, -6.38, 0.56)
	pt3dadd(93.46, -34.31, -5.4, 0.56)
	pt3dadd(94.3, -34.4, -5.4, 0.65)
	pt3dadd(95.6, -34.31, -6.05, 0.56)
	pt3dadd(96.71, -34.04, -6.03, 0.74)
	pt3dadd(97.54, -33.85, -5.65, 0.74)
	pt3dadd(98.47, -33.76, -6.35, 0.65)
	pt3dadd(99.5, -33.82, -6.25, 0.56)
	pt3dadd(101.1, -34.1, -6.08, 0.56)
	pt3dadd(102.2, -33.92, -5.69, 0.56)
	pt3dadd(103.7, -34.19, -6.58, 0.56)
	pt3dadd(105.3, -34.19, -6.8, 0.56)
	pt3dadd(106.5, -34.19, -6.1, 0.56)
	pt3dadd(107.3, -34.01, -6.1, 0.65)
	pt3dadd(108.5, -34.01, -6.89, 0.56)
	pt3dadd(109.6, -34.1, -6.47, 0.56)
	pt3dadd(110.4, -33.92, -6.87, 0.83)
  }
  dend[12] {pt3dclear()
	pt3dadd(58.43, -22.02, -2.62, 1.67)
	pt3dadd(59.63, -21.75, -2.32, 0.93)
	pt3dadd(60.84, -21.84, -2.74, 0.93)
	pt3dadd(61.21, -22.94, -2.23, 0.93)
	pt3dadd(62.42, -23.13, -1.62, 0.74)
	pt3dadd(63.72, -23.49, -1.65, 0.74)
	pt3dadd(64.37, -24.32, -1.37, 0.74)
	pt3dadd(65.57, -24.78, -1.06, 0.74)
	pt3dadd(66.7, -24.73, -1.06, 0.83)
	pt3dadd(68.09, -24.73, -1.06, 0.65)
	pt3dadd(68.92, -25.47, -1.23, 0.65)
	pt3dadd(69.48, -25.93, -1.23, 0.74)
	pt3dadd(70.41, -25.93, -1.23, 0.74)
	pt3dadd(71.15, -26.39, -1.45, 0.74)
	pt3dadd(72.73, -26.48, -0.88, 0.65)
	pt3dadd(73.93, -27.03, -0.49, 0.65)
	pt3dadd(75.32, -27.03, -0.49, 0.65)
	pt3dadd(76.62, -27.12, -0.01, 0.65)
	pt3dadd(77.74, -27.12, -0.01, 0.65)
	pt3dadd(78.94, -27.03, 0.27, 0.65)
	pt3dadd(80.3, -26.75, 0.27, 0.65)
	pt3dadd(81.5, -26.47, 0.27, 0.65)
	pt3dadd(82.25, -26.84, 0.58, 0.65)
	pt3dadd(83.36, -26.84, 0.27, 0.65)
	pt3dadd(84.47, -26.47, 0.27, 0.65)
	pt3dadd(85.77, -26.75, 1.07, 0.65)
	pt3dadd(86.42, -27.58, 1.07, 0.56)
	pt3dadd(86.88, -28.22, 1.36, 0.56)
	pt3dadd(87.9, -28.31, 1.36, 0.56)
	pt3dadd(88.92, -28.49, 1.36, 0.65)
	pt3dadd(89.95, -28.4, 1.1, 0.65)
	pt3dadd(91.06, -28.4, 1.1, 0.56)
	pt3dadd(91.71, -28.49, 0.84, 0.65)
	pt3dadd(92.54, -28.59, 0.84, 0.65)
	pt3dadd(93.16, -29, 1.08, 0.74)
	pt3dadd(93.43, -29.74, 1.75, 0.56)
	pt3dadd(93.25, -30.29, 1.65, 0.56)
  }
  dend[13] {pt3dclear()
	pt3dadd(43.89, -40.83, -1.54, 0.93)
	pt3dadd(44.23, -42.06, -1.54, 0.65)
	pt3dadd(44.79, -43.26, -1.8, 0.65)
	pt3dadd(45.16, -44.27, -1.89, 0.65)
	pt3dadd(45.81, -45.09, -1.41, 0.93)
	pt3dadd(46.18, -46.29, -1.41, 0.93)
	pt3dadd(46.65, -47.21, -1.43, 0.65)
	pt3dadd(47.2, -48.4, -1.77, 0.65)
	pt3dadd(47.94, -49.87, -1.32, 0.65)
	pt3dadd(48.59, -51.16, -2.05, 0.65)
	pt3dadd(49.34, -52.36, -1.41, 0.65)
	pt3dadd(49.89, -53.46, -2.03, 0.65)
	pt3dadd(50.63, -54.29, -1.38, 0.74)
	pt3dadd(51.47, -55.21, -1.46, 0.65)
	pt3dadd(51.84, -56.03, -1.46, 0.65)
	pt3dadd(52.86, -57.23, -0.57, 0.65)
	pt3dadd(53.32, -57.69, -1.38, 0.65)
	pt3dadd(54.07, -58.61, -2.17, 0.65)
	pt3dadd(54.25, -59.43, -2.17, 0.65)
	pt3dadd(54.34, -60.08, -2.17, 0.65)
  }
  dend[14] {pt3dclear()
	pt3dadd(43.89, -40.83, -1.54, 0.93)
	pt3dadd(45.09, -40.65, -1.46, 0.65)
	pt3dadd(46.2, -40.65, -1.01, 0.65)
	pt3dadd(47.6, -40.56, -0.77, 0.65)
	pt3dadd(48.52, -40.19, -0.77, 0.65)
	pt3dadd(49.54, -39.91, -0.57, 0.65)
	pt3dadd(50.75, -39.36, -0.59, 0.65)
	pt3dadd(52.17, -39.23, -0.39, 0.65)
	pt3dadd(54.02, -39.78, -0.21, 0.65)
	pt3dadd(55.23, -40.98, -0.33, 0.65)
	pt3dadd(56.44, -41.16, -0.27, 0.65)
	pt3dadd(57.92, -41.16, 0.52, 0.65)
	pt3dadd(59.59, -41.53, -0.15, 0.65)
	pt3dadd(60.42, -41.81, -0.15, 0.65)
	pt3dadd(61.63, -42.36, -0.14, 0.65)
	pt3dadd(62.74, -42.91, -0.14, 0.65)
	pt3dadd(64.23, -43.55, 0.71, 0.65)
	pt3dadd(65.57, -44.45, 1.07, 0.65)
	pt3dadd(66.5, -45.09, 0.36, 0.56)
	pt3dadd(67.42, -45.92, 0.56, 0.56)
	pt3dadd(68.54, -46.38, 0.81, 0.56)
	pt3dadd(69.56, -46.93, 0.91, 0.56)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
}



	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.28915 ,    0.28778  ,   0.23448,         0.5) 
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 GranuleCell27