/* 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 GranuleCell49
	
// Original name on neuroMorpho.org 418882.CNG.hoc

ndend1=23

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


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


	pdend  = new SectionList()
		dend[1] pdend.append()
		dend[7] pdend.append()
		dend[9] pdend.append()
		dend[13] pdend.append()
		dend[18] pdend.append()
	
	mdend  = new SectionList()
		dend[2] mdend.append()
		dend[4] mdend.append()
		dend[14] mdend.append()
		dend[20] mdend.append()
	/*	for i=3, 4  dend[i] mdend.append()
		dend[14] mdend.append()
		dend[17] mdend.append()
		for i=19, 20  dend[i] mdend.append()	*/	  
		

	ddend  = new SectionList()
		dend[3] ddend.append()
		for i=5, 6 dend[i] ddend.append()
		dend[8] ddend.append()
		for i=10, 12 dend[i] ddend.append()
		for i=15, 17 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)
  for i = 5, 6 connect dend[i](0), dend[4](1)
  connect dend[7](0), dend[1](1)
  for i = 8, 9 connect dend[i](0), dend[7](1)
  for i = 10, 11 connect dend[i](0), dend[i-1](1)
  connect dend[12](0), dend[10](1)
  connect dend[13](0), dend[9](1)
  for i = 14, 15 connect dend[i](0), dend[i-1](1)
  connect dend[16](0), dend[14](1)
  connect dend[17](0), dend[13](1)
  connect dend[18](0), dend(1)
  for i = 19, 20 connect dend[i](0), dend[18](1)
  for i = 21, 22 connect dend[i](0), dend[20](1)
  basic_shape()
}
proc shape3d_1() {
  soma {pt3dclear()
	pt3dadd(0, 0, 0, 4.8378)
	pt3dadd(0.8, 22.8, 1.31, 6.31)
  }
  dend {pt3dclear()
	pt3dadd(0.8, 22.8, 1.31, 6.76)
	pt3dadd(0.8, 28.44, 0.86, 6.76)
  }
  dend[1] {pt3dclear()
	pt3dadd(0.8, 28.44, 0.86, 6.76)
	pt3dadd(5.04, 34.97, 1.42, 4.05)
	pt3dadd(9.27, 41.73, 2.06, 4.05)
	pt3dadd(11.24, 47.43, 2.06, 3.6)
	pt3dadd(14.68, 53.06, 1.94, 3.6)
  }
  dend[2] {pt3dclear()
	pt3dadd(14.68, 53.06, 1.94, 3.6)
	pt3dadd(20.77, 55.77, 4.52, 2.7)
	pt3dadd(26.86, 59.6, 5.22, 2.7)
	pt3dadd(33.22, 60.95, 7.34, 2.7)
	pt3dadd(35.58, 63.08, 9.48, 2.7)
	pt3dadd(41.94, 66.91, 7.74, 2.7)
	pt3dadd(51.21, 70.96, 10.94, 2.7)
	pt3dadd(54.91, 74.12, 10.94, 2.7)
	pt3dadd(58.51, 77.6, 10.94, 2.7)
	pt3dadd(62.48, 81.66, 10.18, 2.25)
	pt3dadd(67.51, 85.49, 12.78, 2.25)
	pt3dadd(73.86, 89.77, 12.78, 2.25)
	pt3dadd(79.16, 93.6, 11.89, 2.25)
	pt3dadd(85.49, 98.58, 11.89, 2.25)
	pt3dadd(89.2, 101.96, 11.89, 2.25)
	pt3dadd(91.58, 104.89, 11.89, 2.25)
	pt3dadd(94.23, 107.59, 11.89, 2.25)
  }
  dend[3] {pt3dclear()
	pt3dadd(94.23, 107.59, 11.89, 2.25)
	pt3dadd(99.79, 107.82, 13.69, 2.25)
	pt3dadd(103.23, 108.49, 10.33, 2.25)
	pt3dadd(106.58, 114.71, 7.56, 2.25)
	pt3dadd(109.75, 123.04, 5.46, 2.25)
	pt3dadd(112.93, 132.05, 2.17, 2.25)
	pt3dadd(113.79, 136.96, 2.17, 2.25)
	pt3dadd(117.24, 143.71, 1.92, 2.25)
	pt3dadd(118.83, 149.12, -0.48, 2.25)
	pt3dadd(120.15, 153.85, -3.7, 2.25)
	pt3dadd(123.38, 158.31, -3.64, 2.25)
	pt3dadd(127.35, 161.68, -3.89, 2.25)
	pt3dadd(131.32, 168.67, -4.46, 2.25)
	pt3dadd(135.56, 174.98, -8.13, 2.25)
	pt3dadd(140.63, 181.33, -12.58, 2.25)
	pt3dadd(144.34, 189.44, -13.81, 1.8)
	pt3dadd(148.84, 198, -13.16, 2.25)
	pt3dadd(155.35, 210.62, -13.16, 2.25)
	pt3dadd(160.65, 220.08, -15, 2.25)
	pt3dadd(166.1, 228.13, -16.27, 2.25)
	pt3dadd(173.25, 238.72, -18.1, 2.25)
	pt3dadd(179.23, 246.93, -17.78, 2.25)
	pt3dadd(186.37, 254.14, -18.01, 2.25)
	pt3dadd(194.05, 262.93, -20.21, 2.25)
	pt3dadd(202.14, 271.11, -22.25, 2.25)
	pt3dadd(206.65, 275.62, -22.25, 2.25)
	pt3dadd(213.79, 282.6, -23.9, 2.25)
	pt3dadd(222.01, 289.38, -26.2, 2.25)
	pt3dadd(225.98, 292.54, -26.81, 2.25)
	pt3dadd(228.63, 295.47, -30.13, 2.25)
  }
  dend[4] {pt3dclear()
	pt3dadd(94.23, 107.59, 11.89, 2.25)
	pt3dadd(101.98, 114.62, 13.1, 2.25)
	pt3dadd(105.48, 118.6, 13.1, 2.25)
	pt3dadd(112.36, 125.13, 15.15, 2.25)
	pt3dadd(116.6, 130.11, 15.4, 2.25)
	pt3dadd(122.16, 136.42, 15.4, 2.25)
	pt3dadd(125.48, 142.22, 15.4, 2.25)
	pt3dadd(129.98, 147.86, 15.4, 2.25)
	pt3dadd(134.48, 153.71, 13.95, 2.25)
	pt3dadd(138.72, 159.79, 16.24, 2.25)
	pt3dadd(141.61, 164.52, 16.24, 2.25)
	pt3dadd(145.05, 170.6, 16.51, 2.25)
	pt3dadd(147.97, 176.69, 16.51, 2.25)
	pt3dadd(157.5, 195.61, 15.78, 2.25)
	pt3dadd(161.14, 200.3, 15.78, 2.25)
	pt3dadd(166.44, 207.06, 14.41, 2.25)
	pt3dadd(168.03, 208.86, 14.41, 2.25)
  }
  dend[5] {pt3dclear()
	pt3dadd(168.03, 208.86, 14.41, 2.25)
	pt3dadd(169.88, 214.26, 14.41, 2.25)
	pt3dadd(170.96, 219.37, 14.41, 1.8)
	pt3dadd(174.66, 227.03, 12.72, 1.8)
	pt3dadd(178.11, 234.02, 11.94, 1.8)
	pt3dadd(179.42, 239.6, 12.51, 1.8)
	pt3dadd(182.34, 246.13, 8.94, 1.8)
	pt3dadd(182.34, 247.48, 8.94, 1.8)
	pt3dadd(180.75, 253.34, 10.54, 1.8)
	pt3dadd(183.81, 260.58, 9.38, 1.8)
	pt3dadd(188.84, 267.78, 7.51, 1.8)
	pt3dadd(189.37, 269.36, 7.87, 1.8)
  }
  dend[6] {pt3dclear()
	pt3dadd(168.03, 208.86, 14.41, 2.25)
	pt3dadd(178.49, 218.68, 18.53, 1.8)
	pt3dadd(183.79, 223.86, 18.53, 1.8)
	pt3dadd(190.14, 229.04, 18.21, 1.8)
	pt3dadd(195.66, 236.65, 19.08, 1.8)
	pt3dadd(202.28, 244.54, 19.02, 1.8)
	pt3dadd(206.25, 249.04, 21.58, 1.8)
	pt3dadd(206.3, 253.5, 21.58, 1.8)
	pt3dadd(211.33, 260.26, 21.58, 1.8)
	pt3dadd(216.89, 266.56, 21.9, 1.8)
	pt3dadd(224.3, 273.77, 22.12, 1.8)
	pt3dadd(231.45, 279.37, 22.86, 1.8)
	pt3dadd(237.8, 285, 24.01, 1.8)
	pt3dadd(239.39, 291.99, 23.54, 1.8)
  }
  dend[7] {pt3dclear()
	pt3dadd(14.68, 53.06, 1.94, 3.6)
	pt3dadd(19.99, 61.9, 5.05, 3.6)
	pt3dadd(23.7, 68.24, 5.05, 3.6)
	pt3dadd(25.56, 72.97, 5.05, 3.6)
	pt3dadd(26.82, 78.6, 5.05, 2.7)
	pt3dadd(28.41, 83.33, 3.02, 2.7)
	pt3dadd(29.46, 87.83, 4.35, 2.7)
  }
  dend[8] {pt3dclear()
	pt3dadd(29.46, 87.83, 4.35, 2.7)
	pt3dadd(28.94, 95.04, -1.01, 2.25)
	pt3dadd(24.66, 109.38, -2.74, 2.25)
	pt3dadd(23.34, 117.49, -2.74, 2.25)
	pt3dadd(21.12, 129.96, -6.97, 2.25)
	pt3dadd(20.06, 139.42, -8.76, 2.25)
	pt3dadd(19.04, 144.12, -10.14, 2.25)
	pt3dadd(17.98, 156.74, -10.14, 2.25)
	pt3dadd(16.39, 171.61, -7.62, 2.25)
	pt3dadd(14.43, 178.15, -7.62, 2.25)
	pt3dadd(13.9, 191.24, -6.84, 1.8)
	pt3dadd(12.77, 199.33, -5.64, 1.8)
	pt3dadd(11.45, 209.46, -6.47, 1.8)
	pt3dadd(10.11, 211.42, -6.38, 1.8)
	pt3dadd(9.32, 218.4, -4.98, 1.8)
	pt3dadd(9.05, 227.86, -6.82, 1.8)
	pt3dadd(7.25, 237.68, -6.82, 1.8)
	pt3dadd(8.57, 245.34, -6.82, 1.8)
	pt3dadd(7.77, 250.52, -6.82, 1.8)
	pt3dadd(7.23, 251.72, -8.55, 1.8)
	pt3dadd(6.17, 262.08, -8.89, 1.8)
	pt3dadd(4.85, 272.44, -9.82, 1.8)
	pt3dadd(3.84, 281.6, -8.73, 1.8)
	pt3dadd(4.9, 289.04, -12.71, 1.8)
	pt3dadd(4.63, 295.12, -15.06, 1.8)
	pt3dadd(4.1, 299.45, -16.28, 1.8)
	pt3dadd(3.31, 304.18, -18.54, 1.8)
	pt3dadd(1.99, 309.36, -21.7, 1.8)
	pt3dadd(0.93, 315.67, -24.27, 1.8)
	pt3dadd(-0.16, 318.5, -25.79, 1.8)
  }
  dend[9] {pt3dclear()
	pt3dadd(29.46, 87.83, 4.35, 2.7)
	pt3dadd(30.56, 90.65, 6.87, 2.25)
	pt3dadd(31.09, 92.9, 6.87, 2.25)
  }
  dend[10] {pt3dclear()
	pt3dadd(31.09, 92.9, 6.87, 2.25)
	pt3dadd(35.32, 101.91, 5.42, 1.8)
	pt3dadd(39.3, 109.79, 7.58, 1.8)
	pt3dadd(42, 118.13, 7.7, 1.8)
	pt3dadd(45.18, 128.04, 5.44, 1.8)
	pt3dadd(46.36, 133.17, 5.44, 1.8)
	pt3dadd(47.95, 142.63, 7.3, 1.8)
	pt3dadd(49.27, 146.46, 8.31, 1.8)
	pt3dadd(55.85, 155.58, 9.78, 1.8)
	pt3dadd(58.24, 159.63, 9.18, 1.8)
	pt3dadd(59.03, 167.74, 10.2, 1.8)
	pt3dadd(61.22, 173.85, 13.1, 1.8)
	pt3dadd(63.6, 180.61, 12.01, 1.8)
	pt3dadd(65.19, 188.72, 15.07, 1.8)
	pt3dadd(66.09, 193.97, 17.23, 1.8)
	pt3dadd(69.01, 200.28, 17.23, 1.8)
	pt3dadd(72.71, 207.71, 17.35, 1.8)
	pt3dadd(77.4, 212.95, 17.98, 1.8)
	pt3dadd(81.11, 215.45, 20.41, 1.8)
	pt3dadd(85.87, 224.91, 19.13, 1.8)
	pt3dadd(88.52, 233.92, 21.07, 1.8)
	pt3dadd(91.4, 242.3, 22.39, 1.8)
	pt3dadd(94.31, 251.31, 23.06, 1.8)
	pt3dadd(97.76, 257.85, 20.63, 1.8)
	pt3dadd(100.35, 266.78, 21.18, 1.8)
	pt3dadd(105.64, 274.66, 21.27, 1.8)
	pt3dadd(110.14, 285.93, 22.94, 1.8)
	pt3dadd(110.83, 290.67, 22.94, 1.8)
	pt3dadd(112.68, 294.5, 25.86, 1.8)
  }
  dend[11] {pt3dclear()
	pt3dadd(112.68, 294.5, 25.86, 1.8)
	pt3dadd(119.3, 299.23, 25.86, 1.8)
	pt3dadd(121.68, 302.39, 26.38, 1.8)
	pt3dadd(123.54, 304.86, 30.79, 1.8)
	pt3dadd(126.88, 306.57, 30.79, 1.8)
	pt3dadd(130.58, 306.12, 33.05, 1.8)
	pt3dadd(132.7, 304.99, 32.34, 1.8)
  }
  dend[12] {pt3dclear()
	pt3dadd(112.68, 294.5, 25.86, 1.8)
	pt3dadd(118.19, 304.48, 25.93, 1.8)
  }
  dend[13] {pt3dclear()
	pt3dadd(31.09, 92.9, 6.87, 2.25)
	pt3dadd(33.28, 105.48, 8.7, 2.25)
	pt3dadd(34.34, 112.69, 9.06, 2.25)
	pt3dadd(33.29, 115.67, 10.84, 2.25)
  }
  dend[14] {pt3dclear()
	pt3dadd(33.29, 115.67, 10.84, 2.25)
	pt3dadd(30.38, 124.68, 11.26, 2.25)
	pt3dadd(26.94, 133.91, 13.87, 2.25)
	pt3dadd(22.44, 142.7, 17.14, 2.25)
	pt3dadd(15.86, 151.4, 21.57, 2.25)
	pt3dadd(9.24, 161.99, 22.46, 2.25)
	pt3dadd(5.23, 164.46, 24.62, 2.25)
	pt3dadd(3.64, 175.95, 29.25, 2.25)
	pt3dadd(2.58, 181.13, 28.9, 2.25)
	pt3dadd(-2.98, 191.95, 29.68, 2.25)
	pt3dadd(-7.41, 198.12, 33.59, 2.25)
	pt3dadd(-8.74, 208.29, 33.68, 2.25)
	pt3dadd(-12.18, 214.14, 36.41, 2.25)
	pt3dadd(-14.03, 213.67, 36.41, 2.25)
  }
  dend[15] {pt3dclear()
	pt3dadd(-14.03, 213.67, 36.41, 2.25)
	pt3dadd(-9, 222.23, 38.88, 2.25)
	pt3dadd(-7.15, 234.17, 42.77, 2.25)
	pt3dadd(-2.14, 244.28, 42.95, 2.25)
	pt3dadd(3.43, 257.57, 46.59, 2.25)
  }
}
proc shape3d_2() {
  dend[15] {	pt3dadd(7.14, 270.86, 47.84, 2.25)
	pt3dadd(11.11, 284.82, 49.68, 2.25)
	pt3dadd(11.89, 292.85, 49.68, 2.25)
	pt3dadd(11.89, 296.23, 50.98, 2.25)
  }
  dend[16] {pt3dclear()
	pt3dadd(-14.03, 213.67, 36.41, 2.25)
	pt3dadd(-19.66, 218.92, 35.37, 2.25)
	pt3dadd(-21.25, 223.65, 37.71, 2.25)
	pt3dadd(-20.99, 231.76, 38.67, 2.25)
	pt3dadd(-23.37, 241.45, 41.4, 2.25)
	pt3dadd(-26.69, 248.2, 46.14, 2.25)
	pt3dadd(-28.28, 253.83, 46.1, 2.25)
	pt3dadd(-28.28, 260.59, 50.09, 2.25)
	pt3dadd(-30.68, 266.02, 50.09, 2.25)
	pt3dadd(-31.48, 270.08, 52.26, 2.25)
  }
  dend[17] {pt3dclear()
	pt3dadd(33.29, 115.67, 10.84, 2.25)
	pt3dadd(34.62, 120.17, 10.84, 2.25)
	pt3dadd(34.35, 132.34, 12.21, 2.25)
	pt3dadd(32.78, 142.55, 12.21, 2.25)
	pt3dadd(32.52, 150.66, 12.21, 2.25)
	pt3dadd(29.92, 161.47, 12.07, 2.25)
	pt3dadd(28.6, 170.93, 12.25, 2.25)
	pt3dadd(25.66, 187.23, 10.45, 2.25)
	pt3dadd(26.98, 200.07, 8.18, 2.25)
	pt3dadd(26.24, 211.1, 9.42, 2.25)
	pt3dadd(27.83, 224.16, 11.79, 2.25)
	pt3dadd(28.23, 238.15, 12.5, 2.25)
	pt3dadd(30.62, 256.62, 17.3, 2.25)
	pt3dadd(33.68, 270.78, 19.02, 2.25)
	pt3dadd(36.86, 285.19, 17.78, 2.25)
	pt3dadd(38.36, 297.57, 17.89, 2.25)
	pt3dadd(38.89, 304.11, 18.7, 2.25)
  }
  dend[18] {pt3dclear()
	pt3dadd(0.8, 28.44, 0.86, 6.76)
	pt3dadd(-5.39, 36.02, 4.46, 3.15)
	pt3dadd(-9.62, 40.07, 3.93, 2.7)
	pt3dadd(-12.8, 44.8, 1.73, 2.7)
	pt3dadd(-18.1, 49.76, 2.65, 2.7)
	pt3dadd(-27.36, 59.75, 3.98, 2.7)
	pt3dadd(-33.72, 66.28, 4.78, 2.7)
	pt3dadd(-39.01, 73.26, 4.78, 2.25)
	pt3dadd(-43.61, 78.44, 4.78, 2.25)
	pt3dadd(-48.64, 87.45, 4.78, 2.25)
	pt3dadd(-52.61, 91.96, 4.78, 2.25)
	pt3dadd(-54.22, 98.57, 5.1, 2.25)
	pt3dadd(-57.93, 106, 4.3, 2.25)
  }
  dend[19] {pt3dclear()
	pt3dadd(-57.93, 106, 4.3, 2.25)
	pt3dadd(-63.22, 117.04, 6.58, 2.25)
	pt3dadd(-67.2, 124.19, 5.36, 1.8)
	pt3dadd(-68.79, 129.6, 4.76, 1.8)
	pt3dadd(-71.17, 135.23, 2.34, 1.8)
	pt3dadd(-74.55, 139.84, 2.34, 1.8)
	pt3dadd(-75.87, 148.63, 2.34, 1.8)
	pt3dadd(-79.32, 158.54, 3.77, 1.8)
	pt3dadd(-84, 168.52, 4.28, 1.8)
	pt3dadd(-88.76, 178.66, 7.89, 1.8)
	pt3dadd(-90.75, 182.91, 7.89, 1.8)
	pt3dadd(-90.22, 195.75, 8.62, 1.8)
	pt3dadd(-92.07, 202.06, 8.62, 1.8)
	pt3dadd(-96, 205.16, 8.62, 1.8)
	pt3dadd(-97.59, 213.27, 12.67, 1.8)
	pt3dadd(-101.56, 219.8, 12.67, 1.8)
	pt3dadd(-101.56, 225.89, 16.28, 1.8)
	pt3dadd(-100.84, 238.15, 15.79, 1.8)
	pt3dadd(-105.07, 245.13, 16.98, 1.8)
	pt3dadd(-107.94, 250.59, 16.98, 1.8)
	pt3dadd(-108.47, 255.77, 20.13, 1.8)
	pt3dadd(-112.71, 263.88, 18.42, 1.8)
	pt3dadd(-117.4, 274.62, 22.02, 1.8)
	pt3dadd(-119.78, 284.31, 22.02, 1.8)
	pt3dadd(-123.8, 295.7, 21.98, 1.8)
	pt3dadd(-127.51, 305.83, 22.55, 1.8)
	pt3dadd(-133.32, 312.77, 22.55, 1.8)
	pt3dadd(-137.03, 321.55, 24.02, 1.8)
	pt3dadd(-138.88, 326.28, 24.02, 1.8)
	pt3dadd(-139.36, 328.21, 23.33, 1.8)
  }
  dend[20] {pt3dclear()
	pt3dadd(-57.93, 106, 4.3, 2.25)
	pt3dadd(-63.46, 112.02, 2.98, 2.25)
	pt3dadd(-67.96, 121.03, 2.2, 2.25)
	pt3dadd(-72.19, 124.43, -0.5, 2.25)
	pt3dadd(-75.9, 130.51, -0.5, 2.25)
	pt3dadd(-79.61, 134.56, -3.32, 2.25)
	pt3dadd(-83.05, 138.62, -4, 2.25)
	pt3dadd(-87.82, 149.43, -4.8, 2.25)
	pt3dadd(-93.39, 157.32, -8.05, 2.25)
	pt3dadd(-97.63, 165.65, -9.76, 2.25)
	pt3dadd(-102.13, 175.79, -11.94, 2.25)
	pt3dadd(-107.54, 182.32, -11.94, 2.25)
	pt3dadd(-112.57, 191.55, -15.25, 2.25)
	pt3dadd(-114.95, 195.83, -14.83, 2.25)
	pt3dadd(-116.36, 196.41, -14.83, 2.25)
  }
  dend[21] {pt3dclear()
	pt3dadd(-116.36, 196.41, -14.83, 2.25)
	pt3dadd(-117.68, 202.27, -17.82, 1.8)
	pt3dadd(-122.72, 211.95, -18.24, 1.8)
	pt3dadd(-126.16, 219.39, -20.51, 1.8)
	pt3dadd(-130.8, 228.87, -20.51, 1.8)
	pt3dadd(-132.12, 235.63, -22.97, 1.8)
	pt3dadd(-132.65, 239.71, -22.97, 1.8)
	pt3dadd(-136.93, 245.49, -24.94, 1.8)
	pt3dadd(-141.96, 254.95, -26.25, 1.8)
	pt3dadd(-144.61, 264.64, -28.7, 1.8)
	pt3dadd(-147.01, 274.27, -28.7, 1.8)
	pt3dadd(-150.72, 281.7, -28.7, 1.8)
	pt3dadd(-152.84, 285.76, -30.9, 1.8)
	pt3dadd(-155.81, 286.68, -29.5, 1.8)
	pt3dadd(-156.34, 285.78, -30.6, 1.8)
  }
  dend[22] {pt3dclear()
	pt3dadd(-116.36, 196.41, -14.83, 2.25)
	pt3dadd(-119.94, 199.81, -14.83, 2.25)
	pt3dadd(-120.47, 202.97, -14.83, 2.25)
	pt3dadd(-119.14, 211.08, -14.83, 2.25)
	pt3dadd(-118.35, 218.96, -14.83, 2.25)
	pt3dadd(-117.98, 228.52, -15.29, 1.8)
	pt3dadd(-116.65, 238.43, -14.35, 1.8)
	pt3dadd(-117.75, 244.29, -14.35, 1.8)
	pt3dadd(-116.17, 255.55, -14.75, 1.8)
	pt3dadd(-117.23, 262.99, -14.75, 1.8)
	pt3dadd(-120.74, 273.37, -16.53, 1.8)
	pt3dadd(-124.97, 281.48, -15.94, 1.8)
	pt3dadd(-130.06, 287.32, -14.43, 1.8)
	pt3dadd(-134.83, 290.24, -14.1, 1.8)
	pt3dadd(-138.27, 294.07, -14.1, 1.8)
	pt3dadd(-140.39, 296.33, -16.18, 1.8)
	pt3dadd(-145.47, 296.94, -17.79, 1.8)
	pt3dadd(-153.41, 302.34, -16.2, 1.8)
	pt3dadd(-157.12, 306.17, -16.2, 1.8)
	pt3dadd(-161.35, 314.73, -17.06, 1.8)
	pt3dadd(-164.41, 318.11, -17.18, 1.8)
	pt3dadd(-165.21, 322.62, -18.98, 1.8)
	pt3dadd(-167.33, 325.77, -19.1, 1.8)
	pt3dadd(-168.65, 328.7, -19.1, 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(3,4,5,6,8,10,11,12,14,15,16,17,19,20,21,22) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.6612,0.81273,    0.5,    0.5,0.79072,0.79826,    0.5,    0.5,0.97183,    0.5,    0.5, 0.7888,0.72024,0.98648,    0.5,    0.5) 
for i= 0 , 15 { 
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) // # 16 
dend[1] 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[2] syn = new Exp2Syn(0.059429) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 18 
dend[7] syn = new Exp2Syn(0.15266) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 19 
dend[18] syn = new Exp2Syn(0.2025) // MC syn *** Estimated 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 20 
 
 // //***** HIPP   
 
dend[3] syn = new Exp2Syn(0.6612) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 21 
dend[4] syn = new Exp2Syn(0.81273) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 22 
dend[5] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 23 
dend[6] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 24 
dend[8] syn = new Exp2Syn(0.79072) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 25 
dend[10] syn = new Exp2Syn(0.79826) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 26 
dend[11] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 27 
dend[12] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 28 
dend[14] syn = new Exp2Syn(0.97183) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 29 
dend[15] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 30 
dend[16] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 31 
dend[17] syn = new Exp2Syn(0.7888) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 32 
dend[19] syn = new Exp2Syn(0.72024) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 33 
dend[20] syn = new Exp2Syn(0.98648) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 34 
dend[21] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 35 
dend[22] syn = new Exp2Syn(0.5) // HIPP 
syn.tau1 = 0.5	syn.tau2 = 6	syn.e = -70 
pre_list.append(syn) // # 36 
 
 // //***** 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) // # 37 
 
 // //***** Sprout   
 
dend[0] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 38 
dend[1] syn = new Exp2Syn(0.5) //Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 39 
dend[2] syn = new Exp2Syn(0.059429) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 40 
dend[7] syn = new Exp2Syn(0.15266) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 41 
dend[18] syn = new Exp2Syn(0.2025) // Sprout 
syn.tau1 = 1.5	syn.tau2 = 5.5	syn.e = 0 
pre_list.append(syn) // # 42 


	}
	func is_art() { return 0 }

	endtemplate GranuleCell49
//************************************************************************************************************