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

ndend1=24

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


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


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

	mdend  = new SectionList()
		dend[2] mdend.append()
		dend[7] mdend.append()
		for i=9, 10  dend[i] mdend.append()
		for i=17, 19  dend[i] mdend.append()
		dend[20] mdend.append()
		dend[23] mdend.append()	  
		

	ddend  = new SectionList()
		
		for i=3, 5 dend[i] ddend.append()
		for i=11, 12 dend[i] ddend.append()
		dend[19] ddend.append()
		for i=21, 22 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, 3 connect dend[i](0), dend[i-1](1)
  connect dend[4](0), dend[2](1)
  connect dend[5](0), dend[1](1)
  connect dend[6](0), dend(1)
  for i = 7, 8 connect dend[i](0), dend[6](1)
  for i = 9, 10 connect dend[i](0), dend[8](1)
  for i = 11, 12 connect dend[i](0), dend[10](1)
  connect dend[13](0), soma(0)
  for i = 14, 17 connect dend[i](0), dend[i-1](1)
  connect dend[18](0), dend[16](1)
  connect dend[19](0), dend[15](1)
  connect dend[20](0), dend[14](1)
  for i = 21, 22 connect dend[i](0), dend[20](1)
  connect dend[23](0), dend[13](1)
  basic_shape()
}
proc shape3d_1() {
  soma {pt3dclear()
	pt3dadd(0, 0, 0, 6.08492)
	pt3dadd(5.68, 23, -5.9, 3.15)
  }
  dend {pt3dclear()
	pt3dadd(5.68, 23, -5.9, 3.15)
	pt3dadd(7.8, 27.51, -11.34, 3.15)
	pt3dadd(9.92, 33.14, -13.7, 3.15)
	pt3dadd(12.83, 39.45, -19.08, 2.7)
	pt3dadd(15.71, 45.03, -21.78, 2.7)
	pt3dadd(17.57, 49.31, -23.57, 2.7)
	pt3dadd(19.15, 53.14, -25.56, 2.7)
	pt3dadd(19.68, 55.17, -28.07, 2.7)
  }
  dend[1] {pt3dclear()
	pt3dadd(19.68, 55.17, -28.07, 2.7)
	pt3dadd(23.92, 59.67, -29.77, 2.25)
	pt3dadd(29.3, 64.13, -31.36, 2.25)
	pt3dadd(33.8, 68.86, -32.74, 2.25)
	pt3dadd(36.71, 72.69, -31.42, 2.25)
	pt3dadd(37.77, 74.04, -31.42, 2.25)
  }
  dend[2] {pt3dclear()
	pt3dadd(37.77, 74.04, -31.42, 2.25)
	pt3dadd(44.12, 78.32, -35.35, 1.8)
	pt3dadd(48.04, 81.38, -38.13, 1.8)
	pt3dadd(52.54, 83.86, -37.43, 1.8)
	pt3dadd(55.19, 86.79, -40.74, 1.8)
	pt3dadd(59.69, 90.84, -42.83, 1.8)
	pt3dadd(63.4, 95.12, -45.78, 1.8)
	pt3dadd(67.64, 102.1, -47.38, 1.8)
	pt3dadd(71.66, 104.58, -51.71, 1.8)
	pt3dadd(76.96, 112.24, -51.71, 1.8)
	pt3dadd(83.84, 118.55, -56.21, 1.8)
	pt3dadd(86.75, 121.7, -59.13, 1.8)
	pt3dadd(93.09, 131.71, -62.36, 1.8)
	pt3dadd(98.65, 138.24, -64.5, 1.8)
	pt3dadd(104.48, 147.48, -64.5, 1.8)
	pt3dadd(109.57, 153.03, -64.5, 1.8)
	pt3dadd(114.6, 157.54, -63.27, 1.8)
	pt3dadd(119.1, 160.47, -63.27, 1.8)
	pt3dadd(123.6, 162.72, -64.79, 1.8)
	pt3dadd(128.1, 164.97, -64.79, 1.8)
	pt3dadd(136.87, 174.01, -67.3, 1.8)
	pt3dadd(142.96, 181.44, -70.84, 1.8)
	pt3dadd(147.2, 184.82, -70.84, 1.8)
	pt3dadd(147.93, 184.57, -71.85, 1.8)
  }
  dend[3] {pt3dclear()
	pt3dadd(147.93, 184.57, -71.85, 1.8)
	pt3dadd(153.75, 185.48, -74.38, 1.8)
	pt3dadd(160.64, 186.6, -79.22, 1.8)
	pt3dadd(168.32, 188.85, -81.71, 1.8)
	pt3dadd(176.26, 191.33, -89.5, 1.8)
	pt3dadd(188.58, 194.75, -89.7, 1.8)
	pt3dadd(190.17, 194.78, -89.3, 1.8)
  }
  dend[4] {pt3dclear()
	pt3dadd(147.93, 184.57, -71.85, 1.8)
	pt3dadd(148.92, 189.68, -71.85, 1.8)
	pt3dadd(153.43, 194.41, -71.85, 1.8)
	pt3dadd(158.99, 199.37, -74.79, 1.8)
	pt3dadd(163.22, 202.75, -74.79, 1.8)
	pt3dadd(166.93, 204.77, -74.79, 1.8)
	pt3dadd(171.97, 212.23, -73.76, 1.8)
	pt3dadd(174.61, 216.74, -75.42, 1.8)
	pt3dadd(175.41, 222.82, -73.31, 1.8)
	pt3dadd(175.41, 227.78, -74.86, 1.8)
  }
  dend[5] {pt3dclear()
	pt3dadd(37.77, 74.04, -31.42, 2.25)
	pt3dadd(36.87, 77.55, -31.42, 1.8)
	pt3dadd(41.11, 83.41, -32.26, 1.8)
	pt3dadd(45.08, 90.39, -32.58, 1.8)
	pt3dadd(46.67, 98.27, -32.58, 1.8)
	pt3dadd(48.65, 101.4, -32.58, 1.8)
	pt3dadd(55.54, 108.39, -32.58, 1.8)
	pt3dadd(62.42, 118.52, -30.38, 1.8)
	pt3dadd(70.08, 127.19, -27.48, 1.8)
	pt3dadd(79.61, 138.9, -25.47, 1.8)
	pt3dadd(88.54, 148.94, -24.03, 1.8)
	pt3dadd(93.57, 155.24, -24.03, 1.8)
	pt3dadd(99.92, 162.68, -25.68, 1.8)
	pt3dadd(105.76, 168.21, -27.35, 1.8)
	pt3dadd(113.44, 174.96, -27.35, 1.8)
	pt3dadd(115.82, 178.79, -27.35, 1.8)
	pt3dadd(121.12, 181.5, -27.35, 1.8)
	pt3dadd(125.37, 183.38, -27.35, 1.8)
	pt3dadd(132.26, 193.76, -27.35, 1.8)
	pt3dadd(134.64, 197.37, -27.35, 1.8)
	pt3dadd(139.41, 203, -29.06, 1.8)
	pt3dadd(143.37, 208.61, -29.06, 1.8)
	pt3dadd(145.49, 214.01, -29.06, 1.8)
	pt3dadd(145.49, 222.12, -25.9, 1.8)
	pt3dadd(145.34, 231.86, -20.97, 1.8)
	pt3dadd(144.54, 238.17, -20.97, 1.8)
	pt3dadd(144.54, 244.7, -19.47, 1.8)
  }
  dend[6] {pt3dclear()
	pt3dadd(19.68, 55.17, -28.07, 2.7)
	pt3dadd(18.59, 59.65, -30.5, 2.25)
	pt3dadd(19.65, 66.41, -32.98, 2.25)
	pt3dadd(20.18, 68.66, -35.44, 2.25)
  }
  dend[7] {pt3dclear()
	pt3dadd(20.18, 68.66, -35.44, 2.25)
	pt3dadd(23.62, 72.72, -37.98, 1.8)
	pt3dadd(24.68, 77.67, -40.84, 1.8)
	pt3dadd(27.45, 84.41, -41.22, 1.8)
	pt3dadd(28.51, 89.59, -43.5, 1.8)
	pt3dadd(28.77, 96.12, -46.5, 1.8)
	pt3dadd(31.12, 103.66, -49.15, 1.8)
	pt3dadd(33.24, 110.64, -52.12, 1.8)
	pt3dadd(36.15, 121, -54.8, 1.8)
	pt3dadd(39.84, 130.69, -54.8, 1.8)
	pt3dadd(43.81, 140.15, -57.4, 1.8)
	pt3dadd(47.44, 148.76, -60.06, 1.8)
	pt3dadd(51.68, 158.67, -63.88, 1.8)
	pt3dadd(54.98, 166.74, -65.8, 1.8)
	pt3dadd(59.48, 176.65, -68.23, 1.8)
	pt3dadd(65.75, 188.14, -73.34, 1.8)
	pt3dadd(68.67, 191.97, -73.34, 1.8)
	pt3dadd(70.79, 199.18, -73.34, 1.8)
	pt3dadd(75.3, 208.91, -73.34, 1.8)
	pt3dadd(80.86, 218.6, -75.94, 1.8)
	pt3dadd(83.12, 223.36, -78.19, 1.8)
	pt3dadd(87.62, 228.54, -78.19, 1.8)
	pt3dadd(88.15, 233.49, -82.07, 1.8)
	pt3dadd(96.77, 243.71, -87.86, 1.8)
	pt3dadd(98.35, 245.28, -87.86, 1.8)
  }
  dend[8] {pt3dclear()
	pt3dadd(20.18, 68.66, -35.44, 2.25)
	pt3dadd(20.66, 75.99, -35.44, 2.25)
	pt3dadd(20.93, 87.7, -40.73, 2.25)
	pt3dadd(19.35, 96.84, -42.59, 2.25)
	pt3dadd(19.88, 105.85, -47.47, 2.25)
	pt3dadd(20.33, 109.4, -47.95, 2.25)
  }
  dend[9] {pt3dclear()
	pt3dadd(20.33, 109.4, -47.95, 2.25)
	pt3dadd(19.27, 115.49, -47.67, 1.8)
	pt3dadd(20.33, 123.15, -47.67, 1.8)
	pt3dadd(20.33, 130.13, -47.67, 1.8)
	pt3dadd(20.66, 136.48, -47.22, 1.8)
	pt3dadd(20.14, 141.89, -48.09, 1.8)
	pt3dadd(17.75, 152.48, -47.34, 1.8)
	pt3dadd(14.89, 162.96, -47.34, 1.8)
	pt3dadd(12.77, 175.13, -46.21, 1.8)
	pt3dadd(10.35, 186.49, -42.56, 1.8)
	pt3dadd(8.5, 200, -42.56, 1.8)
	pt3dadd(7.28, 212.16, -40.3, 1.8)
	pt3dadd(7.28, 223.43, -36.25, 1.8)
	pt3dadd(6.41, 233.29, -36.25, 1.8)
	pt3dadd(5.61, 242.97, -36.25, 1.8)
	pt3dadd(6.33, 249.28, -38.72, 1.8)
	pt3dadd(6.59, 253.34, -38.33, 1.8)
	pt3dadd(4.21, 263.02, -41.11, 1.8)
	pt3dadd(0.63, 273.11, -44.18, 1.8)
  }
  dend[10] {pt3dclear()
	pt3dadd(20.33, 109.4, -47.95, 2.25)
	pt3dadd(21.66, 112.63, -48.22, 1.8)
	pt3dadd(22.46, 120.74, -51.84, 1.8)
	pt3dadd(23.25, 129.75, -51.84, 1.8)
	pt3dadd(25.58, 138.13, -52.99, 1.8)
	pt3dadd(27.17, 146.02, -56.37, 1.8)
	pt3dadd(28.7, 154.15, -59.46, 1.8)
	pt3dadd(28.86, 161.18, -63.85, 1.8)
	pt3dadd(30.39, 168.84, -70.04, 1.8)
	pt3dadd(30.07, 170.42, -76.22, 1.8)
  }
  dend[11] {pt3dclear()
	pt3dadd(30.07, 170.42, -76.22, 1.8)
	pt3dadd(26.1, 176.96, -83.89, 1.8)
	pt3dadd(21.33, 181.46, -94.26, 1.8)
	pt3dadd(21.6, 185.52, -100.7, 1.8)
	pt3dadd(19.21, 189.57, -102.5, 1.8)
	pt3dadd(17.63, 192.27, -111.87, 1.8)
	pt3dadd(16.28, 198.93, -118.07, 1.8)
	pt3dadd(16.81, 205.69, -124.91, 1.8)
	pt3dadd(14.42, 214.93, -128.38, 1.8)
	pt3dadd(14.54, 222.18, -129.59, 1.8)
	pt3dadd(10.03, 225.11, -129.59, 1.8)
	pt3dadd(4.47, 230.32, -148.03, 1.8)
	pt3dadd(2.35, 235.5, -148.03, 1.8)
  }
  dend[12] {pt3dclear()
	pt3dadd(30.07, 170.42, -76.22, 1.8)
	pt3dadd(30.26, 183.22, -72.83, 1.8)
	pt3dadd(30, 193.35, -76.61, 1.8)
	pt3dadd(28.35, 197.65, -76.61, 1.8)
	pt3dadd(28.08, 210.5, -79.47, 1.8)
	pt3dadd(27.82, 219.96, -76.69, 1.8)
	pt3dadd(27.21, 231.71, -76.69, 1.8)
	pt3dadd(27.67, 238.25, -76.69, 1.8)
	pt3dadd(29.06, 247.49, -76.69, 1.8)
	pt3dadd(30.91, 258.75, -81.19, 1.8)
	pt3dadd(33.85, 269.39, -80.4, 1.8)
  }
  dend[13] {pt3dclear()
	pt3dadd(0, 0, 0, 3.15)
	pt3dadd(6.53, 14.1, 1.62, 3.15)
	pt3dadd(7.59, 19.73, 1.62, 3.15)
	pt3dadd(8.38, 21.33, 3.05, 2.25)
  }
  dend[14] {pt3dclear()
	pt3dadd(8.38, 21.33, 3.05, 2.25)
	pt3dadd(9.44, 22.69, 10.35, 2.25)
	pt3dadd(10.24, 23.59, 10.35, 2.25)
  }
  dend[15] {pt3dclear()
	pt3dadd(10.24, 23.59, 10.35, 2.25)
	pt3dadd(12.09, 26.29, 9.99, 2.25)
	pt3dadd(13.68, 27.19, 12.89, 2.25)
	pt3dadd(17.92, 29.67, 18.44, 2.25)
	pt3dadd(19.5, 31.02, 21.45, 2.25)
	pt3dadd(21.89, 34.4, 25.84, 2.25)
	pt3dadd(23.54, 38.73, 32.06, 2.25)
	pt3dadd(25.39, 42.78, 32.06, 2.25)
	pt3dadd(25.92, 45.48, 35.66, 2.25)
	pt3dadd(24.59, 50.22, 35.66, 2.25)
	pt3dadd(25.92, 54.5, 38.04, 2.25)
	pt3dadd(25.92, 63.06, 39.16, 2.25)
	pt3dadd(26.2, 65, 40.18, 2.25)
  }
  dend[16] {pt3dclear()
	pt3dadd(26.2, 65, 40.18, 2.25)
	pt3dadd(28.32, 73.79, 43.78, 2.25)
	pt3dadd(30.7, 84.38, 48.83, 2.25)
  }
  dend[17] {pt3dclear()
	pt3dadd(30.7, 84.38, 48.83, 2.25)
	pt3dadd(38.6, 96.59, 51.78, 1.8)
	pt3dadd(43.1, 104.93, 50.81, 1.8)
	pt3dadd(43.26, 110.61, 55.3, 1.8)
	pt3dadd(46.44, 116.46, 56.38, 1.8)
  }
}
proc shape3d_2() {
  dend[17] {	pt3dadd(49.62, 125.25, 57.63, 1.8)
	pt3dadd(53.51, 133.56, 62.4, 1.8)
	pt3dadd(58.01, 142.57, 64.53, 1.8)
	pt3dadd(60.66, 154.29, 64.53, 1.8)
	pt3dadd(62.92, 162.33, 67.87, 1.8)
	pt3dadd(69.01, 176.53, 71.4, 1.8)
	pt3dadd(70.26, 182.48, 71.4, 1.8)
	pt3dadd(74.76, 189.47, 75.77, 1.8)
	pt3dadd(76.61, 196.9, 73.41, 1.8)
	pt3dadd(84.54, 208.76, 73.9, 1.8)
  }
  dend[18] {pt3dclear()
	pt3dadd(30.7, 84.38, 48.83, 2.25)
	pt3dadd(29.8, 98.03, 48.2, 1.8)
	pt3dadd(28.74, 107.27, 54.33, 1.8)
	pt3dadd(29.54, 114.03, 56.18, 1.8)
	pt3dadd(29.27, 121.41, 58.55, 1.8)
	pt3dadd(30.59, 128.42, 61.59, 1.8)
	pt3dadd(31.92, 135.4, 63.46, 1.8)
	pt3dadd(31.21, 140.13, 63.46, 1.8)
	pt3dadd(33.59, 149.37, 67.22, 1.8)
	pt3dadd(34.12, 157.93, 69.07, 1.8)
	pt3dadd(32.81, 164.11, 70.74, 1.8)
	pt3dadd(37.05, 174.92, 79.87, 1.8)
	pt3dadd(38.9, 178.52, 86.74, 1.8)
	pt3dadd(37.61, 189.66, 86.74, 1.8)
	pt3dadd(36.55, 190.56, 87.78, 1.8)
	pt3dadd(37.88, 193.04, 87.78, 1.8)
	pt3dadd(38.14, 200.7, 88.12, 1.8)
	pt3dadd(38.93, 211.39, 89.14, 1.8)
	pt3dadd(39.19, 217.92, 89.14, 1.8)
	pt3dadd(39.99, 226.93, 87.31, 1.8)
  }
  dend[19] {pt3dclear()
	pt3dadd(26.2, 65, 40.18, 2.25)
	pt3dadd(24.02, 81.6, 41.78, 1.8)
	pt3dadd(22.16, 91.73, 43.27, 1.8)
	pt3dadd(18.62, 105.24, 43.27, 1.8)
	pt3dadd(18.88, 111.77, 43.27, 1.8)
	pt3dadd(16.42, 121.04, 43.27, 1.8)
	pt3dadd(15.89, 129.6, 45.31, 1.8)
	pt3dadd(16.68, 142.89, 46.42, 1.8)
	pt3dadd(14.68, 153.14, 46.54, 1.8)
	pt3dadd(10.97, 162.15, 49.94, 1.8)
	pt3dadd(8.09, 171.44, 49.94, 1.8)
	pt3dadd(3.32, 183.83, 56.31, 1.8)
	pt3dadd(-2.16, 197.29, 57.54, 1.8)
	pt3dadd(-5.6, 207.88, 62.76, 1.8)
	pt3dadd(-9.04, 224.92, 64.68, 1.8)
	pt3dadd(-11.43, 237.31, 64.68, 1.8)
	pt3dadd(-11.46, 247.79, 68.18, 1.8)
	pt3dadd(-11.99, 259.73, 68.18, 1.8)
	pt3dadd(-11.54, 264.98, 67.98, 1.8)
	pt3dadd(-9.95, 267.46, 63.83, 1.8)
  }
  dend[20] {pt3dclear()
	pt3dadd(10.24, 23.59, 10.35, 2.25)
	pt3dadd(25.96, 38.19, 9.23, 1.8)
	pt3dadd(31.52, 44.27, 9.23, 1.8)
	pt3dadd(36.63, 49.16, 6.29, 1.8)
	pt3dadd(44.31, 56.14, 4.79, 1.8)
	pt3dadd(51.19, 62.45, 2.75, 1.8)
	pt3dadd(58.02, 69.16, 2.75, 1.8)
	pt3dadd(64.64, 77.49, 2.75, 1.8)
	pt3dadd(68.61, 83.8, 1.47, 1.8)
	pt3dadd(74.36, 90.08, 1.47, 1.8)
	pt3dadd(78.86, 99.09, 1.47, 1.8)
	pt3dadd(82.3, 105.4, 1.47, 1.8)
	pt3dadd(83.72, 108.55, -1.42, 1.8)
	pt3dadd(86.37, 111.03, -1.42, 1.8)
	pt3dadd(88.23, 114.19, -1.42, 1.8)
  }
  dend[21] {pt3dclear()
	pt3dadd(88.23, 114.19, -1.42, 1.8)
	pt3dadd(92.99, 118.92, -0.34, 1.8)
	pt3dadd(97.23, 125, -3.85, 1.8)
	pt3dadd(101.9, 130.63, -6.69, 1.8)
	pt3dadd(102.7, 133.33, -6.69, 1.8)
	pt3dadd(109.58, 139.42, -7.9, 1.8)
	pt3dadd(113.55, 144.82, -4.79, 1.8)
	pt3dadd(116.25, 149.51, -4.79, 1.8)
	pt3dadd(118.63, 154.91, -7.32, 1.8)
	pt3dadd(122.6, 160.09, -7.32, 1.8)
	pt3dadd(127.1, 170, -9.4, 1.8)
	pt3dadd(132.43, 188.45, -11.06, 1.8)
	pt3dadd(138.16, 203.97, -11.06, 1.8)
	pt3dadd(143.46, 215.23, -12.89, 1.8)
	pt3dadd(146.78, 221.31, -10.02, 1.8)
	pt3dadd(153.4, 226.94, -10.28, 1.8)
	pt3dadd(155.78, 228.97, -9.46, 1.8)
	pt3dadd(169.55, 228.29, -7.16, 1.8)
  }
  dend[22] {pt3dclear()
	pt3dadd(88.23, 114.19, -1.42, 1.8)
	pt3dadd(88.99, 118.86, -1.42, 1.8)
	pt3dadd(90.05, 128.57, -1.27, 1.8)
	pt3dadd(92.17, 138.48, -2.14, 1.8)
	pt3dadd(91.94, 142.23, -2.14, 1.8)
	pt3dadd(93.52, 146.06, -2.14, 1.8)
	pt3dadd(94.32, 152.37, -2.14, 1.8)
	pt3dadd(96.17, 160.25, -0.23, 1.8)
	pt3dadd(96.93, 174.62, -2.66, 1.8)
	pt3dadd(99.31, 187.46, -3.73, 1.8)
	pt3dadd(99.66, 200.04, -3.73, 1.8)
	pt3dadd(99.93, 206.8, -2.4, 1.8)
	pt3dadd(101.46, 221.24, -2.28, 1.8)
	pt3dadd(102.52, 232.73, -4.44, 1.8)
	pt3dadd(103.53, 240.88, -2.24, 1.8)
	pt3dadd(103.26, 249.9, -2.24, 1.8)
	pt3dadd(104.85, 258.46, -3.7, 1.8)
	pt3dadd(107.12, 266.28, -5.58, 1.8)
	pt3dadd(107.38, 267.64, -6.2, 1.8)
  }
  dend[23] {pt3dclear()
	pt3dadd(8.38, 21.33, 3.05, 2.25)
	pt3dadd(5.49, 27.63, 3.05, 1.8)
	pt3dadd(5.22, 29.89, 3.11, 1.8)
	pt3dadd(9.99, 34.84, 4.01, 1.8)
	pt3dadd(13.17, 42.5, 2.11, 1.8)
	pt3dadd(13.46, 47.08, 2.11, 1.8)
	pt3dadd(17.97, 54.51, -3.15, 1.8)
	pt3dadd(22.73, 62.17, -3.15, 1.8)
	pt3dadd(23.59, 67.83, -3.15, 1.8)
	pt3dadd(27.04, 75.04, -4.93, 1.8)
	pt3dadd(30.21, 85.63, -7.11, 1.8)
	pt3dadd(32.25, 95.49, -5.05, 1.8)
	pt3dadd(33.58, 104.27, -3.3, 1.8)
	pt3dadd(35.65, 116.79, -3.3, 1.8)
	pt3dadd(39.1, 128.5, -2.31, 1.8)
	pt3dadd(42.18, 138.96, -1.73, 1.8)
	pt3dadd(44.23, 145.27, -1.73, 1.8)
	pt3dadd(44.76, 152.03, -1.76, 1.8)
	pt3dadd(46.92, 161.64, -1.76, 1.8)
	pt3dadd(49.57, 171.55, -2.67, 1.8)
	pt3dadd(51.65, 184.22, -2.67, 1.8)
	pt3dadd(53.51, 195.25, -2.18, 1.8)
	pt3dadd(53.86, 209.17, -7.23, 1.8)
	pt3dadd(54.92, 222.23, -7.23, 1.8)
	pt3dadd(54.14, 234.79, -5.06, 1.8)
	pt3dadd(54.14, 246.05, -4.55, 1.8)
	pt3dadd(55.46, 254.79, -3.58, 1.8)
	pt3dadd(55.99, 258.62, -3.49, 1.8)
	pt3dadd(57.05, 262.67, -9.24, 1.8)
  }
}
proc basic_shape() {
  shape3d_1()
  shape3d_2()
}

proc connect_pre() {  // $o1 target point process, $o2 returned NetCon
	soma $o2 = new NetCon (&v(1), $o1)
	//alternative statement		$o1.soma pre_list.append(new NetCon(soma.v(1),syn,0,Delsyn,0))
	}

	objref syn
	objref DistalSynapses 
	objref DistalSynapsePositions 
	proc synapse() { 

 
 // //***** PP syn   
 
DistalSynapses = new Vector(0,0) 
DistalSynapses .append(2, 3, 4, 5, 7, 9,11,12,17,18,19,21,22) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.92452,    0.5,    0.5,0.83374,0.87552,0.82803,0.67063,0.68758,0.92526,0.88547, 0.8333,0.76696,0.76125) 
for i= 0 , 12 { 
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) // 
} 
 
 // //***** MC syn   
 
dend[0] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 13 
dend[1] syn = new Exp2Syn(0.040058) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 14 
dend[6] syn = new Exp2Syn(0.068061) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 15 
dend[13] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 16 
dend[14] syn = new Exp2Syn(0.5) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 17 
dend[15] syn = new Exp2Syn(0.2977) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 18 
dend[20] syn = new Exp2Syn(0.14889) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 19 
 
 // //***** HIPP   
 
dend[2] syn = new Exp2Syn(0.92452) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 20 
dend[3] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 21 
dend[4] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 22 
dend[5] syn = new Exp2Syn(0.83374) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 23 
dend[7] syn = new Exp2Syn(0.87552) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 24 
dend[9] syn = new Exp2Syn(0.82803) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 25 
dend[11] syn = new Exp2Syn(0.67063) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 26 
dend[12] syn = new Exp2Syn(0.68758) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 27 
dend[17] syn = new Exp2Syn(0.92526) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 28 
dend[18] syn = new Exp2Syn(0.88547) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 29 
dend[19] syn = new Exp2Syn(0.8333) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 30 
dend[21] syn = new Exp2Syn(0.76696) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 31 
dend[22] syn = new Exp2Syn(0.76125) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 32 
 
 // //***** 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) // # 33 
 
 // //***** Sprout   
 
dend[0] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 34 
dend[1] syn = new Exp2Syn(0.040058) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 35 
dend[6] syn = new Exp2Syn(0.068061) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 36 
dend[13] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 37 
dend[14] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 38 
dend[15] syn = new Exp2Syn(0.2977) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 39 
dend[20] syn = new Exp2Syn(0.14889) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 40 
	  
 

}
	func is_art() { return 0 }

	endtemplate GranuleCell63
//************************************************************************************************************