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

	begintemplate GranuleCell41

// Original name on neuroMorpho.org 124893b.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[19] gcldend.append()


	pdend  = new SectionList()
		dend[1] pdend.append()	
		dend[3] pdend.append()	
		for i=8, 9  dend[i] pdend.append()
		dend[11] pdend.append()	
		dend[16] pdend.append()
		dend[25] pdend.append()		
		
		
	mdend  = new SectionList()
		for i=5, 7 dend[i] mdend.append()
		for i=12, 15  dend[i] mdend.append()
		for i=17, 18  dend[i] mdend.append()
		for i=20, 24  dend[i] mdend.append()
		for i=26, 28  dend[i] mdend.append()		  
		

	ddend  = new SectionList()
		dend[2] ddend.append()
		dend[4] ddend.append()
		dend[10] ddend.append()
		dend[29] 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}
		
	

		 

  connect dend(0), soma(1)
  for i = 1, 2 connect dend[i](0), dend[i-1](1)
  connect dend[3](0), dend[1](1)
  for i = 4, 5 connect dend[i](0), dend[3](1)
  for i = 6, 7 connect dend[i](0), dend[5](1)
  connect dend[8](0), dend(1)
  for i = 9, 10 connect dend[i](0), dend[i-1](1)
  connect dend[11](0), dend[9](1)
  for i = 12, 13 connect dend[i](0), dend[11](1)
  for i = 14, 15 connect dend[i](0), dend[13](1)
  connect dend[16](0), dend[8](1)
  for i = 17, 18 connect dend[i](0), dend[16](1)
  connect dend[19](0), soma(0)
  for i = 20, 22 connect dend[i](0), dend[i-1](1)
  connect dend[23](0), dend[21](1)
  connect dend[24](0), dend[20](1)
  connect dend[25](0), dend[19](1)
  for i = 26, 27 connect dend[i](0), dend[i-1](1)
  connect dend[28](0), dend[26](1)
  connect dend[29](0), dend[25](1)
  basic_shape()
  
  
   forsec all {enat = 45 ekf = -90 eks = -90  ek=-90  elca=130 etca=130  esk=-90  el_ichan2 =-70  cao_ccanl=2 }
		 
}
proc shape3d_1() {
  soma {pt3dclear()
	pt3dadd(0, 0, 0, 5.49794)
	pt3dadd(4.73, 22.53, 1.57, 4.51)
  }
  dend {pt3dclear()
	pt3dadd(4.73, 22.53, 1.57, 3.6)
	pt3dadd(7.64, 29.74, 1.57, 3.6)
	pt3dadd(9.23, 34.47, 1.57, 2.7)
	pt3dadd(10.29, 38.3, 1.57, 2.25)
	pt3dadd(11.99, 42.25, 3.42, 2.7)
	pt3dadd(12.78, 44.51, 3.42, 2.7)
  }
  dend[1] {pt3dclear()
	pt3dadd(12.78, 44.51, 3.42, 2.7)
	pt3dadd(17.28, 50.14, 3.17, 1.8)
	pt3dadd(21.26, 55.1, 3.99, 1.8)
	pt3dadd(22.32, 56.45, 6.46, 1.8)
  }
  dend[2] {pt3dclear()
	pt3dadd(22.32, 56.45, 6.46, 1.8)
	pt3dadd(28.49, 59.83, 7.67, 1.8)
	pt3dadd(32.46, 62.31, 11.74, 1.8)
	pt3dadd(38.55, 66.59, 12.98, 1.8)
	pt3dadd(42.52, 69.29, 8.94, 1.8)
	pt3dadd(48.08, 72.9, 8.11, 1.8)
	pt3dadd(54.03, 75.75, 6.07, 1.8)
	pt3dadd(56.94, 78.01, 3.39, 1.8)
	pt3dadd(61.7, 83.86, 0.45, 1.8)
	pt3dadd(65.41, 88.37, -3.43, 1.8)
	pt3dadd(70.18, 93.32, -6.18, 1.8)
	pt3dadd(74.97, 97.93, -6.18, 1.8)
	pt3dadd(82.65, 103.56, -9.5, 1.8)
	pt3dadd(92.18, 111, -9.5, 1.8)
	pt3dadd(99.61, 116.38, -11.41, 1.8)
	pt3dadd(105.97, 120.44, -12.71, 1.8)
	pt3dadd(110.47, 124.04, -12.26, 1.8)
	pt3dadd(116.3, 128.77, -13.99, 1.8)
	pt3dadd(125.07, 134.43, -17.08, 1.8)
	pt3dadd(132.75, 140.29, -17.87, 1.8)
	pt3dadd(139.9, 147.27, -21.18, 1.8)
	pt3dadd(148.67, 156.24, -22.81, 1.8)
	pt3dadd(156.35, 163.44, -24.28, 1.8)
	pt3dadd(165.36, 170.88, -24.65, 1.8)
	pt3dadd(174.07, 175.96, -25.94, 1.8)
	pt3dadd(184.4, 180.46, -27.73, 1.8)
	pt3dadd(192.34, 183.62, -28.79, 1.8)
	pt3dadd(202.66, 184.98, -31.6, 1.8)
	pt3dadd(209.02, 185.88, -34.05, 1.8)
	pt3dadd(213.52, 188.58, -34.05, 1.8)
	pt3dadd(218.02, 195.11, -38.14, 1.8)
	pt3dadd(220.91, 201.08, -38.14, 1.8)
	pt3dadd(223.83, 208.74, -39.93, 1.8)
	pt3dadd(226.74, 215.95, -40.62, 1.8)
	pt3dadd(228.32, 221.21, -41.1, 1.8)
  }
  dend[3] {pt3dclear()
	pt3dadd(22.32, 56.45, 6.46, 1.8)
	pt3dadd(24.46, 60.48, 6.46, 1.8)
	pt3dadd(26.58, 62.96, 7.83, 1.8)
	pt3dadd(27.64, 63.86, 7.83, 1.8)
  }
  dend[4] {pt3dclear()
	pt3dadd(27.64, 63.86, 7.83, 1.8)
	pt3dadd(33.99, 64.99, 6.74, 1.8)
	pt3dadd(40.61, 67.01, 6.74, 1.8)
	pt3dadd(48.29, 69.04, 11.34, 1.8)
	pt3dadd(56.01, 71.03, 11.34, 1.8)
	pt3dadd(63.69, 74.63, 11.34, 1.8)
	pt3dadd(71.11, 78.46, 11.34, 1.8)
	pt3dadd(78.02, 81.3, 10.18, 1.8)
	pt3dadd(84.37, 84.68, 12.25, 1.8)
	pt3dadd(89.14, 86.93, 10.34, 1.8)
	pt3dadd(93.91, 88.51, 8.72, 1.8)
	pt3dadd(100.29, 92.2, 8.72, 1.8)
	pt3dadd(104.53, 95.13, 8.72, 1.8)
	pt3dadd(111.68, 101.89, 8.72, 1.8)
	pt3dadd(119.09, 105.95, 6.81, 1.8)
	pt3dadd(129.99, 112.58, 6.32, 1.8)
	pt3dadd(136.88, 117.54, 7.7, 1.8)
	pt3dadd(142.7, 121.82, 9.68, 1.8)
	pt3dadd(149.35, 127.23, 6.96, 1.8)
	pt3dadd(155.45, 133.09, 6.96, 1.8)
	pt3dadd(157.83, 135.34, 6.96, 1.8)
	pt3dadd(163.39, 141.2, 6.88, 1.8)
	pt3dadd(170.48, 149.33, 3.87, 1.8)
	pt3dadd(176.31, 155.87, 3.87, 1.8)
	pt3dadd(182.14, 161.27, 2.04, 1.8)
	pt3dadd(191.2, 165.05, -0.44, 1.8)
	pt3dadd(196.5, 168.66, 0.71, 1.8)
	pt3dadd(203.38, 171.59, -2.47, 1.8)
	pt3dadd(212.65, 174.52, -2.47, 1.8)
	pt3dadd(215.71, 175.53, -2.94, 1.8)
	pt3dadd(221.54, 177.33, -4.54, 1.8)
	pt3dadd(229.48, 180.93, -7.38, 1.8)
	pt3dadd(236.37, 184.09, -8.42, 1.8)
	pt3dadd(247.13, 188.08, -8.94, 1.8)
	pt3dadd(253.22, 190.33, -11.93, 1.8)
	pt3dadd(259.57, 193.04, -14.09, 1.8)
	pt3dadd(264.83, 195.73, -13.34, 1.8)
	pt3dadd(266.68, 197.53, -11.72, 1.8)
	pt3dadd(269.86, 199.33, -12.48, 1.8)
	pt3dadd(271.72, 199.56, -13.48, 1.8)
  }
  dend[5] {pt3dclear()
	pt3dadd(27.64, 63.86, 7.83, 1.8)
	pt3dadd(30.91, 72.09, 7.83, 1.8)
	pt3dadd(35.68, 80.65, 9.05, 1.8)
	pt3dadd(40.9, 93.02, 9.54, 1.8)
	pt3dadd(45.66, 100.45, 12.37, 1.8)
	pt3dadd(50.37, 107.61, 16.63, 1.8)
	pt3dadd(55.66, 115.94, 16.9, 1.8)
	pt3dadd(60.16, 124.08, 20.1, 1.8)
	pt3dadd(66.23, 133.49, 20.9, 1.8)
	pt3dadd(69.93, 140.92, 22.65, 1.8)
	pt3dadd(75.76, 149.93, 25.82, 1.8)
	pt3dadd(83.21, 160.34, 27.1, 1.8)
	pt3dadd(89.57, 167.55, 28.28, 1.8)
	pt3dadd(97.25, 176.33, 30.58, 1.8)
	pt3dadd(102.24, 180.03, 31.93, 1.8)
	pt3dadd(105.15, 183.18, 31.14, 1.8)
  }
  dend[6] {pt3dclear()
	pt3dadd(105.15, 183.18, 31.14, 1.8)
	pt3dadd(106.21, 184.99, 28.28, 1.8)
	pt3dadd(112.57, 190.17, 28.28, 1.8)
	pt3dadd(118.39, 194.9, 28.28, 1.8)
	pt3dadd(124.95, 200.26, 26.02, 1.8)
	pt3dadd(132.1, 207.47, 24.98, 1.8)
	pt3dadd(136.61, 212.65, 22.46, 1.8)
	pt3dadd(142.43, 220.51, 21.31, 1.8)
	pt3dadd(145.6, 225.24, 18.54, 1.8)
	pt3dadd(149.05, 229.97, 20.49, 1.8)
  }
  dend[7] {pt3dclear()
	pt3dadd(105.15, 183.18, 31.14, 1.8)
	pt3dadd(108.84, 186.13, 32.45, 1.8)
	pt3dadd(111.49, 189.06, 32.45, 1.8)
	pt3dadd(114.14, 191.31, 32.45, 1.8)
	pt3dadd(115.46, 193.56, 32.45, 1.8)
	pt3dadd(121.02, 198.97, 32.45, 1.8)
	pt3dadd(124.99, 206.4, 32.45, 1.8)
	pt3dadd(130.76, 215.21, 31.89, 1.8)
	pt3dadd(136.59, 226.02, 31.89, 1.8)
	pt3dadd(141.3, 229.88, 34.41, 1.8)
	pt3dadd(144.48, 231.23, 34.41, 1.8)
	pt3dadd(147.92, 234.16, 35.43, 1.8)
	pt3dadd(152.69, 236.86, 37.9, 1.8)
  }
  dend[8] {pt3dclear()
	pt3dadd(12.78, 44.51, 3.42, 2.7)
	pt3dadd(11.48, 46.85, 2.02, 2.25)
	pt3dadd(12.01, 51.13, 2.02, 2.25)
	pt3dadd(12.54, 53.39, 2.02, 2.25)
  }
  dend[9] {pt3dclear()
	pt3dadd(12.54, 53.39, 2.02, 2.25)
	pt3dadd(16.77, 60.82, -1.6, 1.8)
	pt3dadd(18.1, 63.3, -2.75, 1.8)
	pt3dadd(18.79, 64.8, -2.04, 2.25)
  }
  dend[10] {pt3dclear()
	pt3dadd(18.79, 64.8, -2.04, 2.25)
	pt3dadd(23.3, 65.48, -1.03, 1.8)
	pt3dadd(29.92, 67.28, -1.03, 1.8)
	pt3dadd(34.68, 68.86, -1.93, 1.8)
	pt3dadd(40.51, 70.66, 0.93, 1.8)
	pt3dadd(44.77, 72.6, 0.93, 1.8)
	pt3dadd(50.33, 75.76, 0.93, 1.8)
	pt3dadd(52.98, 77.56, 0.93, 1.8)
	pt3dadd(58.54, 78.91, 0.93, 1.8)
	pt3dadd(66.48, 80.26, 2.34, 1.8)
	pt3dadd(72.63, 80.88, 2.34, 1.8)
	pt3dadd(81.63, 82.23, 3.57, 1.8)
	pt3dadd(89.04, 83.58, 3.57, 1.8)
	pt3dadd(96.28, 86.78, 3.57, 1.8)
	pt3dadd(102.64, 88.81, 4.63, 1.8)
	pt3dadd(108.46, 91.73, 4.63, 1.8)
	pt3dadd(116.41, 96.24, 4.63, 1.8)
	pt3dadd(122.43, 99.4, 4.63, 1.8)
	pt3dadd(125.6, 100.76, 4.63, 1.8)
	pt3dadd(134.87, 104.36, 4.23, 1.8)
	pt3dadd(142.55, 108.19, 4.23, 1.8)
	pt3dadd(147.57, 111.8, 4.23, 1.8)
	pt3dadd(155.51, 118.34, 4.23, 1.8)
	pt3dadd(163.19, 125.1, 5.62, 1.8)
	pt3dadd(169.54, 130.95, 5.62, 1.8)
	pt3dadd(180.13, 140.66, 5.62, 1.8)
	pt3dadd(188.07, 145.84, 5.37, 1.8)
	pt3dadd(194.96, 149.45, 4.59, 1.8)
	pt3dadd(205.53, 153.23, 5.47, 1.8)
	pt3dadd(215.06, 155.03, 5.47, 1.8)
	pt3dadd(223.53, 156.16, 6.89, 1.8)
	pt3dadd(232.6, 160.05, 6.89, 1.8)
	pt3dadd(241.61, 165.24, 7.06, 1.8)
	pt3dadd(247.7, 170.19, 7.06, 1.8)
	pt3dadd(254.68, 176.03, 7.06, 1.8)
	pt3dadd(260.51, 179.64, 7.06, 1.8)
	pt3dadd(265.81, 182.11, 7.06, 1.8)
	pt3dadd(273.48, 185.27, 8.19, 1.8)
	pt3dadd(281.28, 191.08, 7, 1.8)
  }
  dend[11] {pt3dclear()
	pt3dadd(18.79, 64.8, -2.04, 2.25)
	pt3dadd(18.61, 64.45, -2.04, 1.8)
	pt3dadd(18.61, 64.9, -2.04, 1.8)
  }
  dend[12] {pt3dclear()
	pt3dadd(18.61, 64.9, -2.04, 1.8)
	pt3dadd(25.23, 75.49, -4.22, 1.8)
	pt3dadd(29.73, 84.72, -7.18, 1.8)
	pt3dadd(35.03, 96.54, -8.58, 1.8)
	pt3dadd(39, 108.48, -10.87, 1.8)
	pt3dadd(43.5, 120.34, -13.08, 1.8)
	pt3dadd(46.94, 132.73, -15.54, 1.8)
	pt3dadd(50.11, 143.84, -17.85, 1.8)
	pt3dadd(53.55, 156.68, -20.62, 1.8)
	pt3dadd(58.3, 166.31, -22.72, 1.8)
	pt3dadd(61.74, 175.32, -24.39, 1.8)
	pt3dadd(63.39, 179.25, -24.39, 1.8)
	pt3dadd(67.63, 189.62, -26.82, 1.8)
	pt3dadd(71.6, 198.85, -29.18, 1.8)
	pt3dadd(76.04, 207.79, -30.64, 1.8)
	pt3dadd(80.54, 215.67, -33.34, 1.8)
	pt3dadd(83.98, 221.75, -33.34, 1.8)
	pt3dadd(85.79, 228.33, -35.33, 1.8)
	pt3dadd(89.5, 236.89, -36.77, 1.8)
	pt3dadd(92.14, 243.65, -37.07, 1.8)
  }
}
proc shape3d_2() {
  dend[12] {	pt3dadd(93.99, 249.96, -40.37, 1.8)
  }
  dend[13] {pt3dclear()
	pt3dadd(18.61, 64.9, -2.04, 1.8)
	pt3dadd(13.97, 74.29, -5.25, 1.8)
	pt3dadd(10, 81.5, -7.11, 1.8)
	pt3dadd(6.28, 86.08, -10, 1.8)
	pt3dadd(2.57, 96.22, -12.21, 1.8)
	pt3dadd(-0.07, 105.23, -13.02, 1.8)
	pt3dadd(-2.85, 113.56, -13.02, 1.8)
	pt3dadd(-4.44, 126.63, -13.66, 1.8)
	pt3dadd(-5.52, 135.64, -17.7, 1.8)
	pt3dadd(-6.05, 145.55, -18.92, 1.8)
	pt3dadd(-7.59, 155.79, -22.1, 1.8)
	pt3dadd(-7.59, 160.52, -24.41, 1.8)
	pt3dadd(-8.12, 165.7, -23.76, 1.8)
	pt3dadd(-9.59, 173.06, -29.93, 1.8)
	pt3dadd(-9.32, 175.09, -28.63, 1.8)
	pt3dadd(-11.18, 180.04, -33.33, 1.8)
	pt3dadd(-12.5, 186.8, -34.94, 1.8)
	pt3dadd(-13.46, 187.48, -38.27, 1.8)
  }
  dend[14] {pt3dclear()
	pt3dadd(-13.46, 187.48, -38.27, 1.8)
	pt3dadd(-16.9, 192.88, -40.66, 1.8)
	pt3dadd(-19.28, 198.06, -43.67, 1.8)
	pt3dadd(-21.67, 202.57, -47.23, 1.8)
	pt3dadd(-22.2, 203.47, -47.77, 1.8)
  }
  dend[15] {pt3dclear()
	pt3dadd(-13.46, 187.48, -38.27, 1.8)
	pt3dadd(-13.79, 195.51, -37.14, 1.8)
	pt3dadd(-15.12, 206.77, -37.14, 1.8)
	pt3dadd(-16.59, 214.28, -38.23, 1.8)
	pt3dadd(-15.79, 224.42, -41.66, 1.8)
	pt3dadd(-14.74, 234.78, -41.66, 1.8)
	pt3dadd(-13.28, 244.29, -43.15, 1.8)
	pt3dadd(-11.95, 252.62, -45.88, 1.8)
	pt3dadd(-9.57, 257.8, -45.66, 1.8)
	pt3dadd(-5.96, 259.83, -45.66, 1.8)
	pt3dadd(-3.57, 263.21, -47.62, 1.8)
	pt3dadd(-3.31, 268.16, -47.26, 1.8)
  }
  dend[16] {pt3dclear()
	pt3dadd(12.54, 53.39, 2.02, 2.25)
	pt3dadd(9.76, 61.86, 0, 1.8)
	pt3dadd(7.65, 71.32, -1.86, 1.8)
	pt3dadd(6.34, 77.01, -1.86, 1.8)
	pt3dadd(6.08, 79.48, -1.86, 1.8)
  }
  dend[17] {pt3dclear()
	pt3dadd(6.08, 79.48, -1.86, 1.8)
	pt3dadd(7.4, 83.76, -1.86, 1.8)
	pt3dadd(9.78, 91.87, -1.86, 1.8)
	pt3dadd(12.65, 102.39, 0.26, 1.8)
	pt3dadd(14.5, 107.79, 0.26, 1.8)
	pt3dadd(16.62, 119.96, 1.31, 1.8)
	pt3dadd(18.65, 133.49, 1.74, 1.8)
	pt3dadd(20.24, 144.3, 3.81, 1.8)
	pt3dadd(22.05, 154.79, 3.81, 1.8)
	pt3dadd(25.23, 166.5, 1.57, 1.8)
	pt3dadd(25.94, 172.45, -0.01, 1.8)
	pt3dadd(28.59, 177.18, -0.01, 1.8)
	pt3dadd(31.77, 187.32, -3.41, 1.8)
	pt3dadd(34.15, 197, -6.72, 1.8)
	pt3dadd(34.93, 201.73, -8.17, 1.8)
	pt3dadd(36.25, 211.87, -12.1, 1.8)
	pt3dadd(37.84, 218.63, -15.51, 1.8)
	pt3dadd(39.85, 224.68, -17.69, 1.8)
	pt3dadd(40.65, 230.99, -19.04, 1.8)
	pt3dadd(40.65, 235.5, -20.5, 1.8)
	pt3dadd(41.97, 245.18, -23.49, 1.8)
	pt3dadd(41.14, 255.14, -26.15, 1.8)
	pt3dadd(41.41, 260.77, -26.15, 1.8)
  }
  dend[18] {pt3dclear()
	pt3dadd(6.08, 79.48, -1.86, 1.8)
	pt3dadd(1.63, 85.56, -1.86, 1.8)
	pt3dadd(-3.13, 93.44, -5.78, 1.8)
	pt3dadd(-7.63, 102, -8.05, 1.8)
	pt3dadd(-12.17, 109.88, -8.05, 1.8)
	pt3dadd(-16.93, 120.47, -9.71, 1.8)
	pt3dadd(-22.03, 128.71, -11.87, 1.8)
	pt3dadd(-25.47, 137.95, -11.87, 1.8)
	pt3dadd(-28.39, 147.41, -12.45, 1.8)
	pt3dadd(-31.38, 157.09, -13.93, 1.8)
	pt3dadd(-33.76, 164.97, -13.93, 1.8)
	pt3dadd(-36.41, 171.28, -13.93, 1.8)
	pt3dadd(-42.43, 180.41, -13.93, 1.8)
	pt3dadd(-47.72, 189.87, -15.82, 1.8)
	pt3dadd(-52.63, 197.21, -16.56, 1.8)
	pt3dadd(-56.6, 201.94, -19.03, 1.8)
	pt3dadd(-59.25, 210.72, -19.01, 1.8)
	pt3dadd(-63.17, 219.33, -21.94, 1.8)
	pt3dadd(-64.5, 226.09, -24.26, 1.8)
	pt3dadd(-64.76, 235.33, -27.7, 1.8)
	pt3dadd(-65.53, 242.83, -31.11, 1.8)
	pt3dadd(-66.85, 250.49, -33.3, 1.8)
	pt3dadd(-66.85, 256.12, -36.13, 1.8)
	pt3dadd(-69.25, 257.58, -36.13, 1.8)
	pt3dadd(-69.51, 263.21, -35.58, 1.8)
  }
  dend[19] {pt3dclear()
	pt3dadd(0, 0, 0, 2.7)
	pt3dadd(-4.25, 17.33, 1.57, 2.7)
	pt3dadd(-6.9, 22.51, 0.35, 2.25)
	pt3dadd(-7.95, 28.37, 3.06, 2.25)
	pt3dadd(-9.28, 33.77, 3.45, 1.8)
	pt3dadd(-11.66, 40.83, 6.71, 1.8)
	pt3dadd(-13.51, 49.84, 6.68, 1.8)
	pt3dadd(-15.9, 57.73, 10.78, 1.8)
	pt3dadd(-19.22, 63.37, 12.28, 1.8)
	pt3dadd(-22.14, 68.33, 15.95, 1.8)
	pt3dadd(-27.7, 75.08, 17.49, 1.8)
	pt3dadd(-31.4, 79.59, 18.3, 1.8)
	pt3dadd(-33.79, 82.52, 18.3, 1.8)
	pt3dadd(-34.85, 84.1, 19.41, 1.8)
  }
  dend[20] {pt3dclear()
	pt3dadd(-34.85, 84.1, 19.41, 1.8)
	pt3dadd(-34.14, 88.71, 20.44, 1.8)
	pt3dadd(-32.81, 93.67, 25.13, 1.8)
	pt3dadd(-32.81, 96.14, 25.13, 1.8)
	pt3dadd(-32.02, 97.72, 30.05, 1.8)
	pt3dadd(-31.75, 102.45, 30.05, 1.8)
	pt3dadd(-32.92, 107.61, 31.67, 1.8)
	pt3dadd(-33.72, 115.72, 35.24, 1.8)
	pt3dadd(-34.78, 120.22, 36.74, 1.8)
	pt3dadd(-34.25, 124.5, 36.78, 1.8)
	pt3dadd(-35.79, 129.13, 39.82, 1.8)
	pt3dadd(-35.79, 137.24, 42.32, 1.8)
	pt3dadd(-36.58, 143.55, 43.76, 1.8)
	pt3dadd(-37.72, 148.36, 48.66, 1.8)
	pt3dadd(-37.19, 156.02, 48.66, 1.8)
	pt3dadd(-36.14, 160.07, 48.66, 1.8)
	pt3dadd(-36.14, 161.87, 49.85, 1.8)
  }
  dend[21] {pt3dclear()
	pt3dadd(-36.14, 161.87, 49.85, 1.8)
	pt3dadd(-32.56, 171.29, 49.85, 1.8)
	pt3dadd(-30.7, 180.75, 52.9, 1.8)
	pt3dadd(-27.62, 190.51, 52.6, 1.8)
	pt3dadd(-24.71, 199.97, 51.67, 1.8)
	pt3dadd(-22.15, 207.18, 53.54, 1.8)
	pt3dadd(-21.36, 209.44, 53.01, 1.8)
  }
  dend[22] {pt3dclear()
	pt3dadd(-21.36, 209.44, 53.01, 1.8)
	pt3dadd(-13.94, 216.42, 53.01, 1.8)
	pt3dadd(-9.18, 224.75, 54.83, 1.8)
	pt3dadd(-3.97, 233.39, 54.83, 1.8)
	pt3dadd(1.59, 246, 58.34, 1.8)
	pt3dadd(5.77, 250.98, 59.39, 1.8)
	pt3dadd(8.68, 256.61, 59.39, 1.8)
  }
  dend[23] {pt3dclear()
	pt3dadd(-21.36, 209.44, 53.01, 1.8)
	pt3dadd(-20.6, 214.41, 53.01, 1.8)
	pt3dadd(-18.75, 222.74, 53.74, 1.8)
	pt3dadd(-17.69, 230.85, 53.74, 1.8)
	pt3dadd(-15.81, 241.36, 55.93, 1.8)
	pt3dadd(-14.75, 245.87, 55.93, 1.8)
	pt3dadd(-14.49, 249.92, 55.34, 1.8)
	pt3dadd(-15.46, 256.98, 55.9, 1.8)
	pt3dadd(-15.99, 259.91, 54.81, 1.8)
  }
  dend[24] {pt3dclear()
	pt3dadd(-36.14, 161.87, 49.85, 1.8)
	pt3dadd(-37.79, 170.36, 53.7, 1.8)
	pt3dadd(-38.05, 176.67, 57.26, 1.8)
	pt3dadd(-37.79, 182.98, 58.81, 1.8)
	pt3dadd(-39.19, 188.43, 62.23, 1.8)
	pt3dadd(-40.51, 198.34, 66.36, 1.8)
	pt3dadd(-42.1, 207.35, 69.65, 1.8)
	pt3dadd(-44.38, 216.41, 69.45, 1.8)
	pt3dadd(-46.77, 227.9, 73.02, 1.8)
	pt3dadd(-49.78, 233.43, 73.83, 1.8)
	pt3dadd(-50.57, 240.64, 76.74, 1.8)
	pt3dadd(-52.69, 243.79, 76.74, 1.8)
	pt3dadd(-53.22, 248.75, 79.82, 1.8)
	pt3dadd(-55.85, 252.63, 81.98, 1.8)
	pt3dadd(-61.41, 259.39, 84.81, 1.8)
  }
  dend[25] {pt3dclear()
	pt3dadd(-34.85, 84.1, 19.41, 1.8)
	pt3dadd(-37.77, 84.97, 19.41, 1.8)
	pt3dadd(-43.23, 89.33, 19.41, 1.8)
	pt3dadd(-49.32, 94.96, 18.2, 1.8)
	pt3dadd(-55.14, 100.82, 20.79, 1.8)
	pt3dadd(-59.38, 105.78, 22.58, 1.8)
	pt3dadd(-62.58, 108.75, 23.22, 1.8)
	pt3dadd(-63.64, 109.65, 23.22, 1.8)
  }
  dend[26] {pt3dclear()
	pt3dadd(-63.64, 109.65, 23.22, 1.8)
	pt3dadd(-64.43, 112.81, 20.83, 1.8)
	pt3dadd(-67.61, 124.07, 22.61, 1.8)
	pt3dadd(-68.92, 131.46, 23.9, 1.8)
	pt3dadd(-69.19, 139.12, 25.12, 1.8)
	pt3dadd(-69.45, 142.27, 27.09, 1.8)
  }
  dend[27] {pt3dclear()
	pt3dadd(-69.45, 142.27, 27.09, 1.8)
	pt3dadd(-66.49, 155.29, 29.26, 1.8)
	pt3dadd(-66.75, 164.75, 32.05, 1.8)
	pt3dadd(-69.51, 173.16, 32.05, 1.8)
	pt3dadd(-72.69, 181.72, 30.72, 1.8)
	pt3dadd(-75.6, 192.31, 28.07, 1.8)
	pt3dadd(-78.51, 199.18, 27.79, 1.8)
	pt3dadd(-81.43, 206.84, 27.79, 1.8)
	pt3dadd(-83.28, 212.47, 25.09, 1.8)
	pt3dadd(-86.11, 219.61, 23.99, 1.8)
	pt3dadd(-89.03, 227.04, 22.5, 1.8)
	pt3dadd(-90.61, 232, 22.5, 1.8)
	pt3dadd(-93.45, 239.43, 22.5, 1.8)
	pt3dadd(-96.1, 244.62, 22.5, 1.8)
	pt3dadd(-99.54, 248.22, 22.5, 1.8)
	pt3dadd(-103.77, 250.47, 22.5, 1.8)
	pt3dadd(-105.45, 250.83, 21.73, 1.8)
  }
  dend[28] {pt3dclear()
	pt3dadd(-69.45, 142.27, 27.09, 1.8)
	pt3dadd(-73.7, 150.01, 25.08, 1.8)
	pt3dadd(-79.52, 160.17, 25.08, 1.8)
	pt3dadd(-84.1, 166.93, 24.29, 1.8)
	pt3dadd(-87.81, 173.47, 22.79, 1.8)
	pt3dadd(-91.78, 177.55, 24.91, 1.8)
	pt3dadd(-97.08, 182.28, 22.7, 1.8)
	pt3dadd(-101.83, 185.58, 21.23, 1.8)
	pt3dadd(-108.72, 194.36, 19.5, 1.8)
	pt3dadd(-113.75, 201.8, 20.62, 1.8)
	pt3dadd(-119.89, 207.23, 18.61, 1.8)
  }
}
proc shape3d_3() {
  dend[28] {	pt3dadd(-124.39, 211.06, 16.5, 1.8)
	pt3dadd(-130.48, 213.99, 16.5, 1.8)
	pt3dadd(-137.63, 217.37, 14.85, 1.8)
	pt3dadd(-146.6, 224.16, 14.85, 1.8)
	pt3dadd(-150.84, 227.99, 14.85, 1.8)
	pt3dadd(-153.75, 230.92, 16.36, 1.8)
  }
  dend[29] {pt3dclear()
	pt3dadd(-63.64, 109.65, 23.22, 1.8)
	pt3dadd(-68.03, 115.21, 26.42, 1.8)
	pt3dadd(-72.26, 122.64, 27.2, 1.8)
	pt3dadd(-77.03, 129.85, 28.18, 1.8)
	pt3dadd(-82.37, 136.91, 29.3, 1.8)
	pt3dadd(-85.02, 142.09, 29.3, 1.8)
	pt3dadd(-89.79, 152.23, 31.83, 1.8)
	pt3dadd(-91.45, 155.55, 31.83, 1.8)
	pt3dadd(-97.81, 159.61, 33.75, 1.8)
	pt3dadd(-102.31, 166.59, 38.78, 1.8)
	pt3dadd(-104.96, 172.22, 42.32, 1.8)
	pt3dadd(-105.93, 175.2, 41.34, 1.8)
	pt3dadd(-109.37, 181.08, 42.94, 1.8)
	pt3dadd(-113.61, 188.52, 46.37, 1.8)
	pt3dadd(-117.85, 195.73, 48.22, 1.8)
	pt3dadd(-124.68, 208.89, 52.74, 1.8)
	pt3dadd(-127.86, 215.2, 50.79, 1.8)
	pt3dadd(-133.69, 221.53, 50.06, 1.8)
	pt3dadd(-137.4, 225.14, 48.41, 1.8)
	pt3dadd(-143.75, 228.74, 48.41, 1.8)
	pt3dadd(-150.64, 233.25, 47.87, 1.8)
	pt3dadd(-156.43, 237.96, 49.59, 1.8)
	pt3dadd(-160.93, 243.81, 50.79, 1.8)
	pt3dadd(-164.9, 248.32, 50.02, 1.8)
	pt3dadd(-168.87, 252.82, 51.49, 1.8)
	pt3dadd(-169.19, 252.6, 52.73, 1.8)
  }
}
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 ProximalSynapses 
	objref ProximalSynapsePositions 
	objref DistalSynapses 
	objref DistalSynapsePositions 
	proc synapse() {
	  
  
 // //***** PP syn   
 
DistalSynapses = new Vector(0,0) 
DistalSynapses .append(2,   4 ,  6 ,  7 , 10 , 12 , 15 , 17 , 18 , 22,  23 , 24,  27 , 28 , 29) 
DistalSynapsePositions = new Vector(0,0) 
DistalSynapsePositions .append(0.80606   ,  0.78119    ,  0.6276   ,  0.61607 ,    0.77893 ,     0.9039 ,    0.65133    , 0.90093 ,    0.86817   ,  0.50087  ,   0.50096  ,    0.7306   ,  0.77039  ,   0.75785 ,    0.76651) 
for i= 0 , 14 { 
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  , 8  , 9 , 16,  19) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5    ,     0.5  , 0.0094899 ,    0.28351  ,       0.5  ,   0.43759 ,    0.22609 ,    0.35589) 
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 , 14 { 
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) // # 14 
} 
 
 // //***** 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) // # 15 
 
 // //***** 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) // # 15 
} 

   


	}
	func is_art() { return 0 }

	endtemplate GranuleCell41
//************************************************************************************************************