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


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

ndend1=12

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

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

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


	mdend  = new SectionList()
		for i=3, 8   dend[i] mdend.append()
		 dend[10] mdend.append()

	ddend  = new SectionList()
		dend[1] ddend.append()
		dend[9] ddend.append()
		dend[11] 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 = 0, 1 connect dend[i](0), soma(1)
  for i = 2, 3 connect dend[i](0), dend(1)
  for i = 4, 5 connect dend[i](0), dend[2](1)
  for i = 6, 7 connect dend[i](0), dend[3](1)
  for i = 8, 9 connect dend[i](0), dend[5](1)
  for i = 10, 11 connect dend[i](0), dend[8](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 }  // make catau slower70e-3 	cao=2 cai=50.e-6 

}
		

proc shape3d_1() {
//   axon {pt3dclear()
// 	pt3dadd(0.05882, -38, -0.01, 0.2)
// 	pt3dadd(0.05882, -18, -0.01, 10)
//   }
  soma {pt3dclear()
	pt3dadd(0.05882, -18, -0.01, 10)
	pt3dadd(0.05882, 0.1941, -0.01, 8.246)
  }
  dend {pt3dclear()
	pt3dadd(0.05882, 0.1941, -0.01, 8.246)
	pt3dadd(4.66, -1.87, 1.85, 2.32)
	pt3dadd(5.77, -2.52, 2.95, 2.32)
	pt3dadd(6.98, -3.16, 3.2, 2.32)
	pt3dadd(8.09, -3.71, 2.28, 2.23)
	pt3dadd(9.85, -4.26, 3.91, 2.04)
	pt3dadd(11.25, -4.54, 3.64, 1.95)
	pt3dadd(12.45, -4.92, 5.26, 1.76)
	pt3dadd(13.56, -5.38, 5.26, 1.76)
	pt3dadd(14.95, -6.39, 5.43, 1.67)
	pt3dadd(16.44, -6.95, 5.2, 1.67)
	pt3dadd(17.74, -7.41, 5.2, 1.67)
	pt3dadd(18.57, -8.23, 4.88, 1.39)
	pt3dadd(19.78, -9.15, 4.88, 1.39)
	pt3dadd(20.8, -9.89, 5.6, 1.11)
	pt3dadd(21.73, -10.71, 5.6, 1.11)
	pt3dadd(22.75, -11.36, 5.6, 1.11)
	pt3dadd(23.67, -12, 5.6, 1.11)
	pt3dadd(24.18, -12.62, 5.14, 1.02)
	pt3dadd(25.02, -13.17, 5.14, 1.21)
	pt3dadd(26.13, -13.54, 6.3, 1.02)
	pt3dadd(26.59, -13.72, 6.3, 1.02)
  }
  dend[1] {pt3dclear()
	pt3dadd(0.05882, 0.1941, -0.01, 8.246)
	pt3dadd(4.36, 3.4, 0, 1.21)
	pt3dadd(5.19, 3.86, 0, 1.02)
	pt3dadd(6.31, 3.95, 1.28, 1.02)
	pt3dadd(7.24, 3.95, 0.22, 1.02)
	pt3dadd(7.79, 3.77, 1.4, 1.11)
	pt3dadd(8.72, 3.86, 1.62, 1.11)
	pt3dadd(9.74, 3.77, 1.62, 1.11)
	pt3dadd(10.57, 3.4, 1.62, 0.83)
	pt3dadd(11.97, 3.95, 1.62, 0.83)
	pt3dadd(12.71, 4.6, 1.19, 0.83)
	pt3dadd(13.73, 4.6, 1.83, 0.93)
	pt3dadd(14.75, 5.24, 2.45, 0.93)
	pt3dadd(15.31, 5.7, 2.45, 0.74)
	pt3dadd(15.77, 6.25, 2.45, 0.74)
	pt3dadd(16.6, 6.71, 1.76, 0.74)
	pt3dadd(17.53, 6.71, 2.06, 0.56)
	pt3dadd(18.18, 6.43, 3.13, 1.02)
	pt3dadd(19.02, 6.07, 4.26, 0.83)
	pt3dadd(19.67, 5.51, 3.96, 0.74)
	pt3dadd(20.41, 5.61, 4.58, 0.65)
	pt3dadd(21.34, 5.79, 4.58, 0.65)
	pt3dadd(21.93, 5.76, 3.4, 0.74)
	pt3dadd(23.13, 5.76, 3.96, 0.74)
	pt3dadd(24.43, 5.67, 3.86, 0.74)
	pt3dadd(25.54, 6.22, 4.08, 0.93)
	pt3dadd(26.38, 6.5, 4.08, 0.93)
	pt3dadd(27.12, 7.14, 4.08, 1.02)
	pt3dadd(27.86, 7.69, 4.08, 1.02)
	pt3dadd(29.07, 8.06, 3.91, 0.74)
	pt3dadd(30.18, 8.15, 4.88, 0.74)
	pt3dadd(31.3, 8.43, 5.24, 0.74)
	pt3dadd(32.41, 8.34, 5.79, 0.74)
	pt3dadd(33.24, 8.61, 6.07, 0.74)
	pt3dadd(34.26, 8.52, 6.07, 0.74)
	pt3dadd(35.11, 8.9, 6.07, 0.74)
	pt3dadd(36.22, 8.81, 6.4, 0.74)
	pt3dadd(37.24, 8.99, 6.4, 0.65)
	pt3dadd(38.07, 8.72, 6.4, 0.65)
	pt3dadd(39.09, 8.72, 7.01, 0.74)
	pt3dadd(40.11, 8.99, 7.01, 0.74)
	pt3dadd(40.86, 8.72, 6.85, 0.56)
	pt3dadd(41.69, 8.44, 7.7, 0.56)
	pt3dadd(42.9, 8.16, 7.7, 0.56)
	pt3dadd(44.01, 7.8, 8.06, 0.56)
	pt3dadd(44.85, 7.34, 8.32, 0.56)
	pt3dadd(45.59, 7.43, 8.32, 0.56)
	pt3dadd(46.05, 7.34, 8.32, 0.65)
	pt3dadd(46.52, 7.25, 7.83, 0.56)
	pt3dadd(47.44, 7.15, 7.33, 0.56)
	pt3dadd(48.41, 7.43, 7.33, 0.56)
	pt3dadd(48.96, 7.89, 7.33, 0.56)
	pt3dadd(49.52, 8.17, 7.86, 0.56)
	pt3dadd(50.26, 8.26, 8.76, 0.46)
	pt3dadd(50.63, 8.81, 8.76, 0.46)
	pt3dadd(51.37, 8.81, 8.76, 0.56)
	pt3dadd(52.12, 9.18, 8.12, 0.46)
	pt3dadd(52.77, 9.36, 8.65, 0.46)
	pt3dadd(53.51, 9.73, 9.13, 0.46)
	pt3dadd(53.97, 9.45, 9.13, 0.46)
	pt3dadd(54.43, 8.9, 9.13, 0.46)
	pt3dadd(55.36, 8.99, 9.13, 0.46)
	pt3dadd(56.01, 9.27, 10.07, 0.46)
	pt3dadd(57.4, 9.09, 10.2, 0.46)
	pt3dadd(58.42, 8.54, 9.55, 0.46)
	pt3dadd(59.26, 8.26, 10.6, 0.46)
	pt3dadd(59.82, 7.89, 10.6, 0.46)
	pt3dadd(60.65, 7.52, 10.6, 0.46)
	pt3dadd(61.98, 7.53, 9.98, 0.46)
	pt3dadd(63, 7.26, 9.98, 0.46)
	pt3dadd(63.39, 7.16, 11.03, 0.46)
	pt3dadd(64.5, 6.98, 11.03, 0.46)
	pt3dadd(65.24, 7.16, 11.04, 0.56)
	pt3dadd(66.27, 7.16, 11.04, 0.56)
	pt3dadd(67.01, 6.89, 11.3, 0.56)
	pt3dadd(68.03, 6.71, 11.85, 0.56)
	pt3dadd(68.58, 7.16, 11.48, 0.56)
	pt3dadd(69.42, 7.72, 10.7, 0.56)
	pt3dadd(70.72, 8.18, 10.02, 0.65)
	pt3dadd(72.29, 8.45, 9.72, 0.65)
	pt3dadd(73.13, 9.28, 9.72, 0.65)
	pt3dadd(74.34, 9.46, 9.72, 0.65)
	pt3dadd(75.86, 9.9, 10.54, 0.65)
	pt3dadd(77.44, 10.36, 10.54, 0.65)
	pt3dadd(78.37, 9.9, 10.54, 0.65)
	pt3dadd(79.2, 10.36, 10.54, 0.65)
	pt3dadd(80.13, 10.64, 10.54, 0.65)
	pt3dadd(81.24, 10.54, 9.83, 0.65)
	pt3dadd(82.26, 10.82, 9.83, 0.65)
	pt3dadd(83.38, 10.91, 9.83, 0.65)
	pt3dadd(84.12, 11, 9.47, 0.74)
	pt3dadd(85.51, 10.91, 9.47, 0.74)
	pt3dadd(86.62, 10.73, 9.38, 0.74)
	pt3dadd(87.64, 10.82, 9.38, 0.74)
	pt3dadd(89.07, 10.83, 9.38, 0.74)
	pt3dadd(90, 11.29, 9.38, 0.74)
	pt3dadd(90.92, 11.38, 9.5, 0.74)
	pt3dadd(92.87, 11.48, 9.5, 0.74)
	pt3dadd(94.36, 11.57, 9.5, 0.74)
	pt3dadd(95.66, 11.48, 9.29, 0.74)
	pt3dadd(97.05, 11.48, 9.29, 0.74)
	pt3dadd(98.16, 12.21, 9.29, 0.74)
	pt3dadd(99.18, 12.67, 9.29, 0.74)
	pt3dadd(100.5, 12.58, 9.19, 0.74)
	pt3dadd(102, 12.54, 9.19, 0.65)
	pt3dadd(103, 12.91, 9.19, 0.65)
	pt3dadd(103.8, 13.28, 9.19, 0.65)
	pt3dadd(105.1, 13.09, 8.27, 0.65)
	pt3dadd(105.8, 12.82, 8.27, 0.65)
	pt3dadd(107, 12.45, 8.72, 0.65)
	pt3dadd(108.5, 11.99, 8.74, 0.65)
	pt3dadd(110.3, 11.16, 8.36, 0.65)
	pt3dadd(111.6, 10.89, 9.59, 0.65)
	pt3dadd(112.8, 10.89, 8.23, 0.65)
	pt3dadd(113.8, 9.97, 8.23, 0.65)
	pt3dadd(115.2, 9.6, 8.23, 0.65)
	pt3dadd(116.6, 9.41, 8.23, 0.65)
	pt3dadd(118.2, 8.86, 8.87, 0.65)
	pt3dadd(119.6, 8.77, 7.69, 0.65)
	pt3dadd(121.4, 8.59, 9.34, 0.65)
	pt3dadd(122.7, 8.03, 9.34, 0.65)
	pt3dadd(124.6, 8.4, 9.34, 0.65)
	pt3dadd(125.8, 8.22, 8.52, 0.65)
	pt3dadd(127.4, 8.49, 8.52, 0.65)
	pt3dadd(129.1, 8.82, 9.53, 0.65)
	pt3dadd(130.8, 9.19, 9.53, 0.65)
	pt3dadd(132.2, 9.28, 9.53, 0.65)
	pt3dadd(133.2, 9.74, 9.53, 0.65)
	pt3dadd(134.7, 9.65, 9.53, 0.65)
	pt3dadd(136.4, 9.74, 9.36, 0.65)
	pt3dadd(137.6, 9.74, 9.35, 0.65)
	pt3dadd(138.9, 10.02, 9.35, 0.65)
	pt3dadd(140.5, 10.11, 9.17, 0.65)
	pt3dadd(142.9, 10.32, 9.17, 0.65)
	pt3dadd(144.1, 10.32, 9.17, 0.65)
	pt3dadd(145.4, 10.41, 9.11, 0.65)
  }
//   dendrite {pt3dclear()
// 	pt3dadd(0.05882, 0.1941, -0.01, 8.246)
// 	pt3dadd(-4.27, -0.55, -0.01, 2.32)
// 	pt3dadd(-5.1, 0.18, -1.14, 2.13)
// 	pt3dadd(-6.59, 0.83, -1.21, 1.58)
// 	pt3dadd(-7.61, 1.29, -0.54, 1.3)
// 	pt3dadd(-8.81, 2.39, -2.23, 1.3)
// 	pt3dadd(-9.93, 3.22, -2.82, 1.11)
// 	pt3dadd(-10.67, 3.95, -2.82, 0.93)
// 	pt3dadd(-11.97, 4.5, -2.82, 0.74)
// 	pt3dadd(-13.27, 4.69, -3.17, 0.74)
// 	pt3dadd(-14.47, 5.42, -3.15, 0.74)
// 	pt3dadd(-15.03, 5.7, -3.15, 0.74)
// 	pt3dadd(-15.49, 5.88, -2.69, 0.74)
// 	pt3dadd(-16.88, 6.99, -2.91, 0.74)
// 	pt3dadd(-17.25, 7.63, -3.03, 0.74)
// 	pt3dadd(-18, 8, -3.03, 0.74)
// 	pt3dadd(-18.46, 8.27, -1.98, 0.74)
//   }
  dend[2] {pt3dclear()
	pt3dadd(26.59, -13.72, 6.3, 1.02)
	pt3dadd(27.53, -14.69, 7.19, 0.83)
	pt3dadd(28.46, -15.43, 7.4, 0.83)
	pt3dadd(29.3, -15.8, 7.95, 0.74)
	pt3dadd(29.85, -16.07, 7.55, 0.74)
	pt3dadd(30.32, -16.17, 6.93, 0.74)
  }
  dend[3] {pt3dclear()
	pt3dadd(26.59, -13.72, 6.3, 1.02)
	pt3dadd(28.26, -13.26, 6.53, 0.83)
	pt3dadd(29.28, -12.89, 7.76, 0.74)
	pt3dadd(30.49, -12.43, 7.86, 0.74)
	pt3dadd(31.6, -11.97, 7.63, 0.93)
	pt3dadd(32.99, -11.42, 7.63, 0.93)
	pt3dadd(34.2, -11.42, 7.63, 0.93)
	pt3dadd(35.87, -11.61, 8.1, 0.93)
	pt3dadd(37.26, -11.88, 7.68, 0.93)
	pt3dadd(38.37, -12.52, 7.68, 0.93)
	pt3dadd(39.12, -12.43, 7.68, 0.83)
	pt3dadd(39.95, -12.16, 7.68, 0.83)
	pt3dadd(41.48, -12.44, 7.68, 0.83)
	pt3dadd(43.15, -12.71, 8.04, 0.83)
	pt3dadd(44.36, -12.62, 8.23, 0.74)
	pt3dadd(45.29, -12.62, 8.23, 0.74)
	pt3dadd(46.59, -12.44, 8.3, 0.74)
  }
}
proc shape3d_2() {
  dend[3] {	pt3dadd(47.98, -12.62, 8.67, 0.74)
	pt3dadd(49.46, -13.35, 8.67, 0.74)
	pt3dadd(50.48, -13.91, 8.16, 0.74)
	pt3dadd(51.78, -14.27, 8.16, 0.74)
	pt3dadd(52.62, -14.64, 8.12, 0.74)
	pt3dadd(53.26, -15.01, 8.12, 0.74)
	pt3dadd(54.56, -15.41, 9.29, 0.74)
	pt3dadd(55.86, -15.78, 9.22, 0.74)
	pt3dadd(57.07, -15.96, 9.22, 0.74)
	pt3dadd(58.46, -15.87, 8.75, 0.74)
	pt3dadd(59.94, -15.96, 9.11, 0.74)
	pt3dadd(61.24, -15.96, 9.79, 0.83)
	pt3dadd(62.26, -16.05, 9.79, 0.93)
	pt3dadd(63.28, -16.24, 9.79, 1.11)
	pt3dadd(63.93, -16.42, 10.06, 1.3)
	pt3dadd(64.3, -16.51, 10.06, 1.48)
  }
  dend[4] {pt3dclear()
	pt3dadd(30.32, -16.17, 6.93, 0.74)
	pt3dadd(31.53, -17.08, 6.93, 0.65)
	pt3dadd(33.1, -17.54, 6.79, 0.65)
	pt3dadd(34.31, -18.46, 7.49, 0.56)
	pt3dadd(35.33, -18.92, 7.49, 0.56)
	pt3dadd(36.17, -19.65, 7.27, 0.56)
	pt3dadd(37.37, -20.02, 8.05, 0.56)
	pt3dadd(38.67, -20.2, 8.37, 0.56)
	pt3dadd(39.78, -20.85, 8.79, 0.56)
	pt3dadd(41.17, -21.77, 7.71, 0.56)
	pt3dadd(42.29, -22.69, 7.71, 0.56)
	pt3dadd(43.03, -23.33, 8.88, 0.56)
	pt3dadd(43.49, -23.42, 8.64, 0.56)
	pt3dadd(44.23, -23.8, 8.64, 0.56)
	pt3dadd(44.88, -24.54, 8.61, 0.56)
	pt3dadd(45.62, -25, 8.61, 0.56)
	pt3dadd(46.45, -25.55, 9.52, 0.56)
	pt3dadd(47.29, -26.01, 9.52, 0.56)
	pt3dadd(48.31, -26.56, 9.83, 0.56)
	pt3dadd(49.51, -27.02, 9.83, 0.56)
	pt3dadd(50.81, -27.39, 10.13, 0.56)
	pt3dadd(52.11, -28.12, 10.13, 0.56)
	pt3dadd(52.85, -28.86, 10.21, 0.56)
	pt3dadd(53.41, -29.23, 10.21, 0.56)
	pt3dadd(54.15, -29.96, 9.44, 0.56)
	pt3dadd(54.8, -30.79, 9.46, 0.56)
	pt3dadd(55.45, -31.25, 9.98, 0.56)
	pt3dadd(56.01, -31.71, 10.35, 0.56)
	pt3dadd(56.47, -32.35, 10.35, 0.56)
	pt3dadd(57.21, -32.71, 11.08, 0.74)
	pt3dadd(58.05, -32.89, 11.08, 0.56)
	pt3dadd(59.07, -33.17, 11.08, 0.56)
	pt3dadd(59.9, -33.63, 10.76, 0.56)
	pt3dadd(61.2, -34.18, 10.86, 0.56)
	pt3dadd(62.31, -34.64, 10.86, 0.56)
	pt3dadd(63.24, -34.83, 11.41, 0.56)
	pt3dadd(64.17, -35.19, 11.41, 0.46)
	pt3dadd(65, -35.65, 11.41, 0.46)
	pt3dadd(65.93, -36.11, 11.41, 0.46)
	pt3dadd(67.14, -36.48, 11.11, 0.46)
	pt3dadd(68.07, -37.12, 11.11, 0.46)
	pt3dadd(68.81, -37.77, 11.11, 0.46)
	pt3dadd(69.64, -38.41, 11.29, 0.46)
	pt3dadd(70.79, -38.54, 11.95, 0.46)
	pt3dadd(71.63, -39.27, 12.24, 0.46)
	pt3dadd(72.09, -39.82, 11.53, 0.56)
	pt3dadd(72.55, -40.37, 11.53, 1.02)
	pt3dadd(73.2, -40.47, 11.53, 0.83)
  }
  dend[5] {pt3dclear()
	pt3dadd(30.32, -16.17, 6.93, 0.74)
	pt3dadd(31.34, -16.07, 6.93, 0.56)
	pt3dadd(32.36, -16.17, 6.6, 0.56)
	pt3dadd(33.47, -16.17, 6.59, 0.65)
	pt3dadd(34.68, -16.35, 6.49, 0.65)
	pt3dadd(36.35, -16.53, 6.21, 0.65)
	pt3dadd(37.55, -16.9, 6.21, 0.65)
	pt3dadd(38.67, -16.72, 6.7, 0.65)
	pt3dadd(39.41, -16.81, 6.7, 0.65)
	pt3dadd(40.43, -16.72, 6.7, 0.65)
	pt3dadd(41.4, -16.18, 6.7, 0.65)
	pt3dadd(42.33, -16.46, 5.74, 0.83)
	pt3dadd(43.44, -16.83, 5.74, 0.83)
	pt3dadd(44.27, -17.38, 6.13, 0.74)
	pt3dadd(45.39, -18.02, 6.13, 0.74)
	pt3dadd(46.22, -18.3, 7.19, 0.74)
	pt3dadd(47.43, -18.85, 7.19, 0.74)
	pt3dadd(48.36, -19.13, 6.4, 0.65)
	pt3dadd(49.19, -19.4, 7.24, 0.65)
  }
  dend[6] {pt3dclear()
	pt3dadd(64.3, -16.51, 10.06, 1.48)
	pt3dadd(64.81, -17.52, 10.06, 0.83)
	pt3dadd(65.74, -18.35, 9.24, 0.74)
	pt3dadd(66.3, -19.36, 9.24, 0.74)
	pt3dadd(67.6, -19.18, 10.47, 0.65)
	pt3dadd(68.71, -19.45, 10.92, 0.65)
	pt3dadd(69.64, -19.82, 10.92, 0.65)
	pt3dadd(70.57, -20.28, 10.92, 0.56)
	pt3dadd(71.31, -20.65, 11.15, 0.83)
	pt3dadd(72.05, -21.01, 11.15, 0.65)
	pt3dadd(72.61, -21.29, 11.09, 0.65)
	pt3dadd(73.07, -22.21, 11.09, 0.56)
	pt3dadd(73.35, -23.04, 11.09, 0.56)
	pt3dadd(73.81, -24.32, 11.65, 0.56)
	pt3dadd(74.83, -24.69, 11.2, 0.46)
	pt3dadd(75.48, -25.52, 11.6, 0.46)
	pt3dadd(76.22, -26.07, 11, 0.46)
	pt3dadd(76.97, -26.9, 11.86, 0.46)
	pt3dadd(77.99, -27.36, 11.86, 0.46)
	pt3dadd(78.64, -27.63, 11.86, 0.46)
	pt3dadd(79.01, -28, 11.68, 0.46)
  }
  dend[7] {pt3dclear()
	pt3dadd(64.3, -16.51, 10.06, 1.48)
	pt3dadd(65.14, -15.96, 10.06, 0.83)
	pt3dadd(65.97, -15.96, 10.06, 0.83)
	pt3dadd(67.39, -15.94, 10.06, 0.74)
	pt3dadd(69.25, -16.13, 9.82, 0.74)
	pt3dadd(70.64, -16.4, 9.82, 0.74)
	pt3dadd(71.38, -16.68, 10.35, 0.74)
	pt3dadd(72.77, -17.05, 10.35, 0.74)
	pt3dadd(73.88, -17.78, 10.35, 0.74)
	pt3dadd(74.81, -17.97, 10.35, 0.74)
	pt3dadd(75.74, -18.06, 10.42, 0.74)
	pt3dadd(76.57, -18.61, 10.42, 0.74)
	pt3dadd(77.78, -19.16, 10.34, 0.74)
	pt3dadd(78.62, -19.44, 10.34, 0.74)
	pt3dadd(79.45, -19.53, 10.34, 0.74)
	pt3dadd(80.31, -19.91, 10.47, 0.83)
	pt3dadd(81.33, -19.73, 10.47, 0.74)
	pt3dadd(82.35, -19.73, 11.3, 0.83)
	pt3dadd(83.55, -19.73, 11.3, 0.83)
	pt3dadd(84.67, -20, 11.31, 0.56)
	pt3dadd(85.87, -20.28, 11.92, 0.56)
	pt3dadd(87.17, -20.83, 12.27, 0.56)
	pt3dadd(88.28, -21.2, 11.34, 0.56)
	pt3dadd(89.12, -21.47, 11.34, 0.74)
	pt3dadd(90.14, -21.38, 11.99, 0.56)
	pt3dadd(91.07, -21.57, 11.99, 0.65)
  }
  dend[8] {pt3dclear()
	pt3dadd(49.19, -19.4, 7.24, 0.65)
	pt3dadd(50.51, -19.98, 7.26, 0.56)
	pt3dadd(51.35, -20.53, 6.77, 0.56)
	pt3dadd(52.09, -20.9, 7.51, 0.56)
	pt3dadd(52.83, -21.45, 7.51, 0.56)
	pt3dadd(53.85, -22.09, 7.75, 0.56)
	pt3dadd(54.78, -22.37, 7.3, 0.56)
	pt3dadd(55.24, -22.83, 7.3, 0.56)
	pt3dadd(56.45, -23.2, 7.3, 0.65)
	pt3dadd(57.38, -23.29, 7.3, 0.65)
	pt3dadd(58.4, -23.47, 6.19, 0.65)
	pt3dadd(59.42, -23.47, 6.19, 0.65)
	pt3dadd(60.25, -23.38, 6.19, 0.56)
	pt3dadd(61.18, -23.66, 6.19, 0.65)
	pt3dadd(62.02, -23.93, 6.19, 0.65)
	pt3dadd(62.48, -24.02, 6.44, 0.56)
	pt3dadd(63.41, -24.23, 6.2, 0.56)
	pt3dadd(64.43, -24.32, 6.14, 0.56)
	pt3dadd(65.35, -24.41, 6.56, 0.65)
	pt3dadd(66.37, -24.59, 6.56, 0.56)
	pt3dadd(67.67, -24.87, 6.56, 0.56)
	pt3dadd(69.25, -25.15, 6.56, 0.65)
	pt3dadd(70.46, -25.15, 6.56, 0.65)
	pt3dadd(71.75, -25.15, 6.08, 0.65)
	pt3dadd(72.5, -25.15, 6.08, 0.65)
	pt3dadd(73.7, -25.24, 6.08, 0.56)
	pt3dadd(74.63, -25.24, 6.08, 0.56)
	pt3dadd(75.56, -25.33, 6.08, 0.65)
	pt3dadd(76.41, -25.43, 7.09, 0.65)
	pt3dadd(77.25, -25.61, 7.09, 0.56)
	pt3dadd(78.27, -25.61, 6.9, 0.65)
	pt3dadd(78.82, -25.7, 6.9, 0.74)
  }
  dend[9] {pt3dclear()
	pt3dadd(49.19, -19.4, 7.24, 0.65)
	pt3dadd(50.12, -19.31, 7.24, 0.65)
	pt3dadd(51.14, -19.4, 7.24, 0.56)
	pt3dadd(52.07, -20.04, 7.24, 0.56)
	pt3dadd(52.72, -20.41, 7.66, 0.56)
	pt3dadd(53.36, -20.6, 7.66, 0.56)
	pt3dadd(54.76, -20.73, 7.66, 0.56)
	pt3dadd(56.34, -20.91, 6.92, 0.56)
	pt3dadd(57.45, -21, 6.92, 0.56)
	pt3dadd(58.57, -21.09, 7.39, 0.56)
	pt3dadd(59.77, -21.37, 7.93, 0.56)
	pt3dadd(61.07, -21.37, 7.44, 0.65)
	pt3dadd(62.09, -21.46, 7.34, 0.65)
	pt3dadd(63.48, -21.37, 7.7, 0.65)
	pt3dadd(64.78, -21.09, 7.18, 0.65)
	pt3dadd(65.52, -21.09, 6.84, 0.56)
	pt3dadd(66.54, -21.09, 7.86, 0.56)
	pt3dadd(67.03, -20.94, 7.86, 0.65)
	pt3dadd(67.96, -20.58, 8.7, 0.65)
	pt3dadd(69.07, -20.3, 8.7, 0.74)
	pt3dadd(69.72, -20.21, 8.63, 0.74)
	pt3dadd(70.93, -19.93, 8.63, 0.74)
	pt3dadd(71.67, -19.56, 8.39, 0.74)
	pt3dadd(72.51, -19.84, 8.39, 0.65)
	pt3dadd(73.62, -19.75, 9.5, 0.65)
	pt3dadd(74.46, -19.93, 9.79, 0.65)
	pt3dadd(75.38, -19.75, 8.77, 0.56)
	pt3dadd(76.22, -19.29, 9.55, 0.65)
	pt3dadd(77.33, -19.2, 9.55, 0.65)
	pt3dadd(78.44, -18.83, 9.55, 0.65)
	pt3dadd(79.46, -18.65, 9.81, 0.65)
	pt3dadd(80.86, -18.28, 9.5, 0.65)
	pt3dadd(82.25, -18, 9.11, 0.65)
	pt3dadd(83.37, -17.54, 9.11, 0.65)
	pt3dadd(84.02, -17.45, 9.83, 0.65)
	pt3dadd(84.85, -17.26, 9.83, 0.56)
	pt3dadd(85.87, -16.9, 9.83, 0.56)
	pt3dadd(87.08, -16.53, 9.83, 0.56)
  }
}
proc shape3d_3() {
  dend[9] {	pt3dadd(88.28, -16.53, 9.83, 0.74)
	pt3dadd(89.12, -16.44, 10.44, 0.83)
	pt3dadd(90.42, -16.35, 10.44, 0.74)
	pt3dadd(91.25, -16.16, 10.44, 0.65)
	pt3dadd(92.55, -16.07, 10.44, 0.65)
	pt3dadd(94.26, -16.04, 10.44, 0.65)
	pt3dadd(95.84, -16.23, 11.33, 0.65)
	pt3dadd(97.14, -16.04, 11.33, 0.65)
	pt3dadd(98.25, -16.04, 11.33, 0.65)
	pt3dadd(99.36, -15.4, 11.33, 0.65)
	pt3dadd(100.4, -15.49, 10.58, 0.65)
	pt3dadd(101.2, -15.31, 10.58, 0.74)
	pt3dadd(102.3, -15.03, 10.26, 0.74)
	pt3dadd(103.1, -15.03, 10.26, 0.74)
	pt3dadd(104, -15.22, 10.98, 0.74)
	pt3dadd(105.2, -15.03, 10.56, 0.56)
	pt3dadd(105.9, -14.94, 10.56, 0.56)
	pt3dadd(107.2, -14.78, 11.31, 0.56)
	pt3dadd(108.5, -14.78, 11.78, 0.56)
	pt3dadd(109.8, -15.06, 12.17, 0.56)
	pt3dadd(110.8, -15.34, 12.59, 0.56)
	pt3dadd(111.7, -15.15, 12.59, 0.56)
	pt3dadd(113, -15.06, 12.95, 0.56)
	pt3dadd(114.5, -14.78, 12.94, 0.56)
	pt3dadd(116.3, -14.6, 12.97, 0.56)
	pt3dadd(117.7, -14.6, 13.26, 0.56)
	pt3dadd(119, -14.6, 13.52, 0.56)
	pt3dadd(120.4, -14.29, 13.52, 0.56)
	pt3dadd(121.5, -14.11, 13.52, 0.56)
	pt3dadd(122, -13.92, 13.52, 0.56)
  }
  dend[10] {pt3dclear()
	pt3dadd(78.82, -25.7, 6.9, 0.74)
	pt3dadd(79.35, -26.75, 6.9, 0.65)
	pt3dadd(79.72, -27.48, 6.95, 0.56)
	pt3dadd(80.55, -27.57, 6.95, 0.56)
	pt3dadd(80.55, -28.49, 6.95, 0.56)
	pt3dadd(80.83, -29.04, 6.95, 0.56)
	pt3dadd(81.76, -29.5, 6.95, 0.65)
	pt3dadd(82.32, -30.06, 6.05, 0.56)
	pt3dadd(83.15, -30.42, 5.64, 0.56)
	pt3dadd(84.27, -30.97, 5.64, 0.56)
	pt3dadd(84.82, -31.8, 5.32, 0.56)
	pt3dadd(85.19, -32.26, 5.72, 0.56)
	pt3dadd(86.31, -32.63, 5.72, 0.56)
	pt3dadd(86.86, -32.9, 6.2, 0.56)
	pt3dadd(87.7, -33.73, 5.13, 0.56)
	pt3dadd(88.07, -34.19, 5.13, 0.56)
	pt3dadd(88.9, -34.47, 5.13, 0.56)
  }
  dend[11] {pt3dclear()
	pt3dadd(78.82, -25.7, 6.9, 0.74)
	pt3dadd(80.12, -25.98, 6.9, 0.56)
	pt3dadd(81.24, -26.35, 7.3, 0.56)
	pt3dadd(82.07, -26.9, 6.73, 0.56)
	pt3dadd(83.37, -27.27, 6.73, 0.56)
	pt3dadd(84.39, -27.54, 6.77, 0.56)
	pt3dadd(86.25, -27.73, 7.11, 0.56)
	pt3dadd(87.73, -27.91, 7.11, 0.56)
	pt3dadd(88.56, -28.09, 7.11, 0.56)
	pt3dadd(89.61, -28.22, 6.92, 0.56)
	pt3dadd(91.28, -28.31, 6.92, 0.56)
	pt3dadd(92.4, -28.68, 6.92, 0.56)
	pt3dadd(93.23, -28.49, 7.51, 0.56)
	pt3dadd(94.44, -28.04, 7.51, 0.56)
	pt3dadd(95.92, -28.13, 7.51, 0.56)
	pt3dadd(96.94, -28.4, 6.97, 0.56)
	pt3dadd(98.24, -28.59, 6.97, 0.56)
	pt3dadd(99.63, -28.4, 6.97, 0.56)
	pt3dadd(100.9, -28.49, 6.97, 0.56)
	pt3dadd(101.9, -28.31, 6.35, 0.56)
	pt3dadd(103.2, -28.9, 6.35, 0.56)
	pt3dadd(105, -29.27, 6.9, 0.56)
	pt3dadd(106.5, -29.64, 6.9, 0.56)
	pt3dadd(108.5, -29.91, 6.57, 0.56)
	pt3dadd(110.2, -29.91, 7.64, 0.56)
	pt3dadd(111.7, -30.01, 6.96, 0.56)
	pt3dadd(112.9, -30.56, 6.96, 0.56)
	pt3dadd(114, -30.74, 6.96, 0.56)
	pt3dadd(115.3, -31.11, 6.96, 0.56)
	pt3dadd(116.7, -31.32, 6.54, 0.65)
	pt3dadd(117.7, -31.59, 6.54, 0.65)
	pt3dadd(119.2, -31.87, 6.98, 0.65)
	pt3dadd(120.5, -32.24, 6.98, 0.65)
	pt3dadd(121.8, -32.79, 6.98, 0.65)
	pt3dadd(123.2, -33.07, 7.29, 0.65)
	pt3dadd(124.2, -32.7, 7.29, 0.65)
	pt3dadd(125.2, -32.51, 7.57, 0.74)
	pt3dadd(126.5, -32.88, 7.57, 0.83)
	pt3dadd(127.3, -32.88, 7.57, 0.65)
	pt3dadd(128, -33.16, 7.57, 0.65)
	pt3dadd(129.7, -33.42, 7.57, 0.65)
	pt3dadd(130.8, -33.51, 7.57, 0.56)
	pt3dadd(132.3, -33.51, 6.99, 0.56)
	pt3dadd(134.2, -33.6, 6.68, 0.56)
	pt3dadd(135.5, -33.88, 6.38, 0.56)
	pt3dadd(136.6, -33.97, 6.38, 0.56)
	pt3dadd(137.9, -34.25, 6.38, 0.56)
	pt3dadd(138.4, -34.43, 7.42, 0.56)
  }
}
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 
	proc synapse() { 
  
 // //***** PP syn   
 
 
 // //***** MC syn   
 
ProximalSynapses = new Vector(0,0) 
ProximalSynapses .append(0 , 1 , 2 , 3 , 4 , 5) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5   ,  0.15074   ,      0.5   ,  0.20796,     0.10776  ,   0.26866) 
for i= 0 , 5 { 
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 , 5 { 
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 GranuleCell40