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

// Original name on neuroMorpho.org n16-cont02-sl3.CNG.swc

ndend1=21

  
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, 20 dend [i] all.append()
// 		for i=0, 3 gcdend2 [i] all.append()

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

	pdend  = new SectionList()
		dend[1] pdend.append()
		dend[3] pdend.append()

	mdend  = new SectionList()
		dend[2] mdend.append()
		for i=4, 9 dend[i] mdend.append()
		for i=11, 17 dend[i] mdend.append()
// 		gcdend2 [2] mdend.append()

	ddend  = new SectionList()
		dend [10] ddend.append()
		for i=18, 20 dend [i] ddend.append()

}
proc gctemp() {

// 	soma {nseg=1 L=16.8 diam=16.8} // changed L & diam
// 		
// 	dend [0] {nseg=1  L=8.08992   diam=3.045}
// 	dend [1] {nseg=1  L=11.10724  diam=1.8425}
// 	dend [2] {nseg=1  L=69.67066  diam=0.4972}
// 	dend [3] {nseg=1  L=20.89924  diam=1.3293}
// 	dend [4] {nseg=1  L=48.70296  diam=0.9733}
// 	dend [5] {nseg=1  L=17.93035  diam=0.925}
// 	dend [6] {nseg=1  L=22.50874  diam=1.0821}
// 	dend [7] {nseg=1  L=17.44366  diam=0.7200}
// 	dend [8] {nseg=1  L=27.36375  diam=0.5642}
// 	dend [9] {nseg=1  L=24.39421  diam=0.8429}
// 	dend [10] {nseg=1 L=74.74046  diam=0.5843}
// 	dend [11] {nseg=1 L=54.53852  diam=0.6211}
// 	dend [12] {nseg=1 L=10.22955  diam=0.6490}
// 	dend [13] {nseg=1 L=39.07374  diam=0.60125}
// 	dend [14] {nseg=1 L=40.36853  diam=0.5353}
// 	dend [15] {nseg=1 L=11.10224  diam=0.7311}
// 	dend [16] {nseg=1 L=40.41660  diam=0.7503}
// 	dend [17] {nseg=1 L=40.43790  diam=0.5923}
// 	dend [18] {nseg=1 L=56.82600  diam=0.5770}
// 	dend [19] {nseg=1 L=40.48123  diam=0.6067}
// 	dend [20] {nseg=1 L=37.38714  diam=0.5642}
// 	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[3](1)
	  for i = 7, 8 connect dend[i](0), dend[4](1)
	  for i = 9, 10 connect dend[i](0), dend[5](1)
	  for i = 11, 12 connect dend[i](0), dend[6](1)
	  for i = 13, 14 connect dend[i](0), dend[7](1)
	  for i = 15, 16 connect dend[i](0), dend[9](1)
	  for i = 17, 18 connect dend[i](0), dend[12](1)
	  for i = 19, 20 connect dend[i](0), dend[15](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 shape3d_1() {
  
  
  soma {pt3dclear()
	pt3dadd(1.087, -18, 0.04, 10)
	pt3dadd(1.087, -0.8271, 0.03, 8.545)
  }
  dend {pt3dclear()
	pt3dadd(1.087, -0.8271, 0.03, 8.545)
	pt3dadd(4.36, -4.5, 0.03, 1.67)
	pt3dadd(5.1, -5.42, 0.03, 1.67)
	pt3dadd(5.66, -6.34, 0.53, 1.67)
	pt3dadd(6.03, -6.99, 0.82, 1.67)
  }
  dend[1] {pt3dclear()
	pt3dadd(6.03, -6.99, 0.82, 1.67)
	pt3dadd(7.33, -7.42, -0.16, 1.39)
	pt3dadd(8.53, -8.15, 0.76, 1.86)
	pt3dadd(10.02, -9.07, -0.15, 1.76)
	pt3dadd(11.32, -9.81, 0.24, 1.76)
	pt3dadd(12.71, -10.45, -0.18, 1.76)
	pt3dadd(13.91, -10.82, -0.18, 2.04)
	pt3dadd(15.12, -11.37, -0.56, 2.5)
  }
  dend[2] {pt3dclear()
	pt3dadd(6.03, -6.99, 0.82, 1.67)
	pt3dadd(6.4, -8.82, 1.41, 0.56)
	pt3dadd(7.51, -11.12, 0.88, 0.56)
	pt3dadd(7.51, -12.59, 0.89, 1.02)
	pt3dadd(8.44, -13.51, 0.56, 0.65)
	pt3dadd(9.83, -14.71, 0.56, 0.46)
	pt3dadd(10.48, -16.27, 0.41, 0.46)
	pt3dadd(11.32, -18.2, 1.1, 0.46)
	pt3dadd(12.24, -19.76, 0.82, 0.46)
	pt3dadd(12.43, -21.69, 0.5, 0.74)
	pt3dadd(13.54, -22.89, 0.86, 0.37)
	pt3dadd(14.84, -23.62, 0.95, 0.46)
	pt3dadd(16.05, -24.91, 1.53, 0.46)
	pt3dadd(17.02, -25.68, 1.4, 0.46)
	pt3dadd(17.67, -26.33, 1.28, 0.37)
	pt3dadd(17.85, -27.34, 1.73, 0.46)
	pt3dadd(18.04, -28.26, 1.21, 0.46)
	pt3dadd(18.6, -29.82, 1.63, 0.37)
	pt3dadd(18.97, -31.01, 1.26, 0.37)
	pt3dadd(19.25, -31.75, 1.64, 0.37)
	pt3dadd(19.25, -33.22, 1.36, 0.37)
	pt3dadd(19.15, -34.6, 1.97, 0.46)
	pt3dadd(19.62, -35.7, 1.53, 0.46)
	pt3dadd(20.08, -36.99, 1.76, 0.37)
	pt3dadd(20.92, -38.55, 1.86, 0.37)
	pt3dadd(21.47, -39.29, 1.29, 0.37)
	pt3dadd(21.94, -40.48, 1.34, 0.37)
	pt3dadd(22.21, -41.77, 2.03, 0.46)
	pt3dadd(22.59, -43.79, 2.54, 0.46)
	pt3dadd(23.24, -45.19, 3.17, 0.46)
	pt3dadd(23.06, -46.85, 3.38, 0.46)
	pt3dadd(22.87, -48.5, 3.2, 0.46)
	pt3dadd(23.61, -50.25, 3.5, 0.46)
	pt3dadd(23.8, -52, 4.08, 0.46)
	pt3dadd(23.8, -53.28, 4.2, 0.46)
	pt3dadd(23.89, -54.02, 4.2, 0.65)
	pt3dadd(24.54, -55.31, 3.36, 0.56)
	pt3dadd(25.19, -56.87, 3.17, 0.56)
	pt3dadd(25.56, -58.71, 2.86, 0.46)
	pt3dadd(25.93, -60.45, 3.19, 0.46)
	pt3dadd(26.4, -62.2, 3.62, 0.46)
	pt3dadd(27.23, -64.15, 3.96, 0.37)
	pt3dadd(27.04, -66.08, 4.04, 0.37)
	pt3dadd(26.58, -68.2, 3.84, 0.37)
  }
  dend[3] {pt3dclear()
	pt3dadd(15.12, -11.37, -0.56, 2.5)
	pt3dadd(15.02, -12.62, 1.16, 1.21)
	pt3dadd(15.02, -13.99, 1.43, 1.02)
	pt3dadd(16.04, -14.73, 1.5, 1.02)
	pt3dadd(16.97, -15.28, 1.17, 1.02)
	pt3dadd(18.17, -15.93, 1.17, 1.02)
	pt3dadd(19.38, -16.2, 1.84, 1.11)
	pt3dadd(20.68, -16.66, 1.64, 1.48)
	pt3dadd(21.89, -17.76, 1.06, 1.39)
	pt3dadd(22.91, -18.87, 0.5, 1.39)
	pt3dadd(23.74, -19.79, 0.48, 1.3)
	pt3dadd(25.13, -21.35, 0.81, 1.3)
	pt3dadd(26.15, -22.36, -0.26, 1.3)
	pt3dadd(26.99, -23.19, -0.07, 1.3)
	pt3dadd(27.45, -24.11, -0.54, 1.58)
  }
  dend[4] {pt3dclear()
	pt3dadd(15.12, -11.37, -0.56, 2.5)
	pt3dadd(17.62, -10.82, -0.56, 1.11)
	pt3dadd(19.85, -10.73, -0.64, 1.11)
	pt3dadd(23.13, -10.36, -0.69, 1.11)
	pt3dadd(25.45, -10.36, -0.67, 1.11)
	pt3dadd(27.4, -10.82, -0.44, 1.11)
	pt3dadd(29.81, -11.28, -0.73, 1.11)
	pt3dadd(31.85, -11.37, -1.26, 0.93)
	pt3dadd(33.71, -11.37, -1.26, 1.02)
	pt3dadd(36.1, -11.32, -1.5, 1.02)
	pt3dadd(38.14, -11.42, -1.09, 1.02)
	pt3dadd(39.26, -12.24, -2.1, 0.83)
	pt3dadd(41.11, -12.34, -2.57, 0.83)
	pt3dadd(42.97, -11.97, -2.09, 0.83)
	pt3dadd(43.8, -12.98, -3.04, 0.83)
	pt3dadd(45.01, -13.71, -3.58, 0.74)
	pt3dadd(46.03, -14.17, -4.04, 0.74)
	pt3dadd(47.05, -14.91, -4.37, 0.74)
	pt3dadd(48.57, -15.32, -3.5, 0.74)
	pt3dadd(49.87, -15.78, -4.14, 0.74)
	pt3dadd(51.82, -16.14, -3.46, 0.74)
	pt3dadd(53.21, -16.24, -3.09, 0.83)
	pt3dadd(54.69, -17.15, -3.74, 0.83)
	pt3dadd(56.27, -17.43, -3.75, 0.93)
	pt3dadd(57.66, -17.52, -3.75, 0.93)
	pt3dadd(58.96, -17.71, -4.22, 0.83)
	pt3dadd(59.91, -17.57, -3.89, 1.02)
  }
  dend[5] {pt3dclear()
	pt3dadd(27.45, -24.11, -0.54, 1.58)
	pt3dadd(29.41, -24.66, 0.6, 0.65)
	pt3dadd(30.15, -26.04, -0.35, 0.83)
	pt3dadd(31.63, -26.31, -0.78, 0.83)
	pt3dadd(33.21, -27.41, -1.01, 0.74)
	pt3dadd(33.86, -28.61, -1.59, 0.83)
	pt3dadd(34.88, -29.9, -1.56, 1.02)
	pt3dadd(35.9, -30.45, -1.43, 1.02)
	pt3dadd(37.1, -31.37, -1.73, 0.83)
	pt3dadd(38.22, -32.19, -1.74, 0.83)
	pt3dadd(39.61, -33.11, -1.52, 0.83)
	pt3dadd(40.71, -33.72, -1.01, 1.11)
  }
  dend[6] {pt3dclear()
	pt3dadd(27.45, -24.11, -0.54, 1.58)
	pt3dadd(27.73, -25.67, -0.36, 1.11)
	pt3dadd(28.01, -27.05, -0.94, 1.11)
	pt3dadd(28, -28.38, -1.22, 1.11)
	pt3dadd(27.81, -29.49, -1.32, 1.11)
	pt3dadd(28.46, -30.87, -2.95, 1.11)
	pt3dadd(28.28, -31.97, -3.29, 1.11)
	pt3dadd(28.18, -33.26, -3.29, 1.11)
	pt3dadd(28.28, -33.81, -2.78, 1.11)
	pt3dadd(28.28, -34.91, -2.78, 0.93)
	pt3dadd(28.18, -36.47, -3.33, 0.93)
	pt3dadd(27.54, -37.67, -3.51, 0.83)
	pt3dadd(27.35, -38.86, -3.97, 0.93)
	pt3dadd(27.16, -39.51, -4.48, 1.11)
	pt3dadd(27.07, -40.79, -4.32, 1.11)
	pt3dadd(27.16, -41.8, -4.57, 1.11)
	pt3dadd(27.54, -42.72, -4.7, 0.93)
	pt3dadd(27.72, -43.73, -4.21, 1.11)
	pt3dadd(28, -44.38, -4.21, 1.11)
  }
  dend[7] {pt3dclear()
	pt3dadd(59.91, -17.57, -3.89, 1.02)
	pt3dadd(61, -17.98, -3.8, 0.74)
	pt3dadd(62.39, -18.62, -4.21, 0.74)
	pt3dadd(63.97, -19.27, -3.89, 0.74)
	pt3dadd(65.45, -19.73, -3.74, 0.65)
	pt3dadd(67.03, -19.54, -3.92, 0.65)
	pt3dadd(68.79, -19.91, -4.75, 0.65)
	pt3dadd(70, -19.82, -4.26, 0.65)
	pt3dadd(71.39, -19.73, -5.16, 0.65)
	pt3dadd(73.15, -20.09, -5.43, 0.65)
	pt3dadd(74.36, -20.28, -5.94, 0.65)
	pt3dadd(75.19, -20.37, -5.74, 0.74)
	pt3dadd(75.84, -20.37, -5.2, 0.83)
  }
  dend[8] {pt3dclear()
	pt3dadd(59.91, -17.57, -3.89, 1.02)
	pt3dadd(61.4, -17.02, -3.42, 0.56)
	pt3dadd(63.44, -17.11, -2.99, 0.56)
	pt3dadd(65.39, -17.3, -2.2, 0.56)
	pt3dadd(67.8, -17.3, -2.2, 0.56)
	pt3dadd(70.21, -17.11, -1.41, 0.56)
	pt3dadd(71.97, -16.75, -1.41, 0.56)
	pt3dadd(73.74, -16.01, -1.41, 0.56)
	pt3dadd(76.12, -15.04, -0.63, 0.56)
	pt3dadd(77.79, -14.12, -0.63, 0.56)
	pt3dadd(79.74, -13.66, -0.68, 0.46)
	pt3dadd(81.87, -12.28, 0.02, 0.46)
	pt3dadd(84, -11.73, 0.02, 0.46)
	pt3dadd(84.93, -10.99, -0.74, 0.46)
  }
  dend[9] {pt3dclear()
	pt3dadd(40.71, -33.72, -1.01, 1.11)
	pt3dadd(41.04, -34.91, -0.19, 0.83)
	pt3dadd(41.41, -36.01, -0.36, 0.83)
	pt3dadd(41.78, -37.3, 0.36, 0.83)
	pt3dadd(42.9, -38.68, -0.32, 0.83)
	pt3dadd(44.1, -40.06, -0.42, 0.93)
	pt3dadd(44.38, -40.97, -0.15, 0.83)
	pt3dadd(45.5, -42.35, -0.74, 0.74)
	pt3dadd(46.79, -43.64, -0.31, 0.74)
	pt3dadd(47.81, -45.2, -0.8, 0.74)
	pt3dadd(48.65, -45.85, -0.56, 0.74)
	pt3dadd(50.41, -46.12, -1.92, 0.74)
	pt3dadd(51.25, -47.78, -2.12, 0.83)
	pt3dadd(51.52, -48.88, -1.86, 0.83)
	pt3dadd(52.82, -50.44, -1.86, 0.74)
	pt3dadd(53.57, -50.81, -2.05, 0.93)
	pt3dadd(53.96, -50.84, -1.64, 1.11)
  }
  dend[10] {pt3dclear()
	pt3dadd(40.71, -33.72, -1.01, 1.11)
	pt3dadd(42.66, -33.72, -0.83, 0.56)
	pt3dadd(44.42, -33.54, -1.54, 0.56)
	pt3dadd(46.74, -34, -1.9, 0.56)
	pt3dadd(49.43, -34.27, -1.64, 0.56)
	pt3dadd(51.01, -34.82, -2.56, 0.56)
	pt3dadd(52.77, -35.19, -2.94, 0.56)
	pt3dadd(54.44, -35.28, -2.94, 0.56)
	pt3dadd(56.75, -35.37, -2.38, 0.56)
	pt3dadd(58.7, -35.74, -3.38, 0.56)
	pt3dadd(60.55, -36.2, -3.78, 0.56)
	pt3dadd(62.31, -36.84, -3.95, 0.56)
	pt3dadd(64.26, -37.49, -4.52, 0.56)
	pt3dadd(66.67, -38.77, -4.61, 0.56)
	pt3dadd(68.71, -39.33, -4.53, 0.56)
	pt3dadd(69.46, -40.12, -3.98, 0.56)
	pt3dadd(71.32, -40.39, -4.88, 0.56)
	pt3dadd(73.08, -40.85, -4.88, 0.65)
	pt3dadd(74.38, -41.49, -5.46, 0.56)
	pt3dadd(75.96, -42.32, -5.92, 0.56)
	pt3dadd(77.35, -42.41, -6.6, 0.56)
	pt3dadd(78.37, -42.69, -6.86, 0.65)
	pt3dadd(79.3, -43.61, -6.34, 0.65)
	pt3dadd(80.41, -43.98, -6.23, 0.65)
  }
}
proc shape3d_2() {
  dend[10] {	pt3dadd(81.89, -44.53, -7.65, 0.56)
	pt3dadd(83.22, -44.94, -7.11, 0.56)
	pt3dadd(84.52, -44.85, -9.24, 0.56)
	pt3dadd(85.72, -45.86, -8.92, 0.56)
	pt3dadd(86.93, -45.95, -8.63, 0.56)
	pt3dadd(88.32, -47.05, -9.68, 0.56)
	pt3dadd(90.27, -48.25, -10.1, 0.56)
	pt3dadd(92.22, -48.62, -10.8, 0.56)
	pt3dadd(93.98, -48.89, -11.25, 0.56)
	pt3dadd(95.74, -48.98, -11.53, 0.56)
	pt3dadd(97.86, -49.56, -12.57, 0.56)
	pt3dadd(99.07, -50.29, -13.08, 0.56)
	pt3dadd(100.6, -50.48, -13.39, 0.56)
	pt3dadd(102.1, -51.21, -13.42, 0.56)
	pt3dadd(103.2, -51.21, -13.6, 0.65)
	pt3dadd(104.2, -51.39, -13.66, 0.56)
	pt3dadd(105.5, -51.95, -14.13, 0.56)
	pt3dadd(106.8, -52.13, -14.2, 0.56)
  }
  dend[11] {pt3dclear()
	pt3dadd(28, -44.38, -4.21, 1.11)
	pt3dadd(27.21, -45.51, -4.3, 0.65)
	pt3dadd(27.49, -46.61, -4.03, 0.65)
	pt3dadd(28.04, -47.71, -4.88, 0.56)
	pt3dadd(27.21, -48.08, -4.88, 0.56)
	pt3dadd(27.95, -49.64, -5.12, 0.56)
	pt3dadd(28.32, -51.67, -5.34, 0.56)
	pt3dadd(28.04, -52.68, -5.75, 0.65)
	pt3dadd(27.76, -53.96, -6.03, 0.65)
	pt3dadd(27.58, -55.16, -6.51, 0.65)
	pt3dadd(27.76, -56.26, -6.71, 0.56)
	pt3dadd(27.49, -57.27, -6.79, 0.56)
	pt3dadd(27.12, -58.56, -6.79, 0.65)
	pt3dadd(26.37, -59.39, -6.9, 0.65)
	pt3dadd(25.72, -60.67, -7.03, 0.65)
	pt3dadd(26.09, -61.87, -7.59, 0.65)
	pt3dadd(26.47, -63.98, -8.29, 0.65)
	pt3dadd(26.19, -65.64, -8.06, 0.56)
	pt3dadd(26.46, -67.29, -7.6, 0.56)
	pt3dadd(27.67, -69.22, -7.38, 0.65)
	pt3dadd(26.46, -70.32, -8.27, 0.56)
	pt3dadd(26.84, -72.25, -9.43, 0.56)
	pt3dadd(27.11, -73.63, -8.91, 0.65)
	pt3dadd(27.58, -75.29, -9.49, 0.56)
	pt3dadd(28.41, -76.21, -9.49, 0.56)
	pt3dadd(29.9, -76.85, -9.23, 0.56)
	pt3dadd(29.9, -78.32, -10.26, 0.65)
	pt3dadd(29.99, -79.7, -10.64, 0.65)
	pt3dadd(29.9, -80.99, -10.36, 0.65)
	pt3dadd(29.9, -81.9, -9.85, 0.65)
	pt3dadd(30.01, -83.18, -10.73, 0.56)
	pt3dadd(30.76, -84.65, -10.41, 0.56)
	pt3dadd(30.2, -85.84, -10.9, 0.56)
	pt3dadd(30.48, -87.77, -10.79, 0.56)
	pt3dadd(30.38, -89.15, -11.28, 0.56)
	pt3dadd(30.38, -90.53, -11.91, 0.74)
	pt3dadd(30.57, -91.54, -11.78, 0.65)
  }
  dend[12] {pt3dclear()
	pt3dadd(28, -44.38, -4.21, 1.11)
	pt3dadd(29.3, -45.02, -4.21, 0.65)
	pt3dadd(30.13, -45.47, -3.61, 0.56)
	pt3dadd(30.96, -46.02, -3.33, 0.46)
	pt3dadd(31.98, -47.22, -4, 0.46)
	pt3dadd(32.82, -48.23, -3.76, 0.56)
	pt3dadd(33.74, -48.69, -3.76, 0.56)
	pt3dadd(34.67, -49.24, -3.76, 0.65)
	pt3dadd(35.41, -49.61, -4.04, 0.74)
	pt3dadd(35.88, -49.98, -4.04, 0.74)
  }
  dend[13] {pt3dclear()
	pt3dadd(75.84, -20.37, -5.2, 0.83)
	pt3dadd(75.93, -21.52, -3.55, 0.46)
	pt3dadd(76.21, -22.63, -3.73, 0.46)
	pt3dadd(77.41, -23.27, -3.99, 0.46)
	pt3dadd(78.43, -23.91, -4.1, 0.46)
	pt3dadd(78.99, -24.1, -4.34, 0.56)
	pt3dadd(80.01, -24.47, -4.61, 1.11)
	pt3dadd(81.03, -24.74, -4.97, 0.56)
	pt3dadd(82.24, -25.2, -5.12, 0.56)
	pt3dadd(83.16, -25.29, -5.54, 0.56)
	pt3dadd(84.37, -25.84, -4.91, 0.65)
	pt3dadd(84.93, -26.4, -4.98, 0.56)
	pt3dadd(86.13, -26.4, -5.33, 0.56)
	pt3dadd(87.34, -26.49, -5.04, 0.56)
	pt3dadd(87.89, -27.41, -6.04, 0.56)
	pt3dadd(88.27, -28.05, -6.36, 0.56)
	pt3dadd(89.56, -28.33, -5.87, 0.56)
	pt3dadd(90.14, -28.49, -6.06, 0.56)
	pt3dadd(90.79, -29.41, -6.53, 0.65)
	pt3dadd(91.72, -30.79, -7.03, 0.74)
	pt3dadd(92.55, -31.8, -6.8, 0.56)
	pt3dadd(93.39, -32.35, -7.28, 0.56)
	pt3dadd(94.5, -32.44, -7.73, 0.65)
	pt3dadd(95.61, -32.17, -8.51, 0.65)
	pt3dadd(96.73, -32.26, -8.21, 0.65)
	pt3dadd(97.75, -32.53, -7.91, 0.65)
	pt3dadd(98.86, -32.44, -9.8, 0.56)
	pt3dadd(100.6, -31.98, -10.4, 0.56)
	pt3dadd(100.9, -33.08, -10.87, 0.56)
	pt3dadd(101.5, -33.73, -11.53, 0.74)
	pt3dadd(102.8, -34.28, -11.84, 0.56)
	pt3dadd(103.3, -34.94, -12.25, 0.56)
  }
  dend[14] {pt3dclear()
	pt3dadd(75.84, -20.37, -5.2, 0.83)
	pt3dadd(78.34, -20.28, -4.71, 0.46)
	pt3dadd(80.76, -20.28, -5.03, 0.46)
	pt3dadd(82.24, -20.46, -5.07, 0.46)
	pt3dadd(84.1, -20.64, -5.5, 0.46)
	pt3dadd(85.21, -20.74, -5.36, 0.56)
	pt3dadd(86.04, -20.92, -5.6, 0.74)
	pt3dadd(87.16, -20.64, -5.75, 0.56)
	pt3dadd(88.76, -20.62, -5.85, 0.56)
	pt3dadd(90.25, -20.81, -5.35, 0.56)
	pt3dadd(91.45, -20.81, -5.68, 0.56)
	pt3dadd(92.84, -21.27, -5.57, 0.56)
	pt3dadd(94.42, -21.45, -5.28, 0.56)
	pt3dadd(95.81, -21.64, -5.46, 0.65)
	pt3dadd(97.57, -21.91, -4.91, 0.65)
	pt3dadd(99.06, -22.19, -5.18, 0.56)
	pt3dadd(100.6, -22.46, -4.89, 0.56)
	pt3dadd(102.3, -22.61, -5.29, 0.56)
	pt3dadd(104, -22.61, -5.66, 0.56)
	pt3dadd(105.4, -22.98, -5.29, 0.56)
	pt3dadd(107.1, -22.98, -5.97, 0.46)
	pt3dadd(108.4, -23.07, -6.43, 0.46)
	pt3dadd(110.1, -23.07, -6.04, 0.46)
	pt3dadd(111.8, -22.98, -7.59, 0.37)
	pt3dadd(113.1, -22.42, -7.61, 0.37)
	pt3dadd(114.3, -22.24, -7.61, 0.37)
  }
  dend[15] {pt3dclear()
	pt3dadd(53.96, -50.84, -1.64, 1.11)
	pt3dadd(54.98, -51.71, -0.41, 0.65)
	pt3dadd(56.37, -52.54, -0.75, 0.74)
	pt3dadd(57.3, -53.18, -0.44, 0.74)
	pt3dadd(58.32, -53.92, -1.1, 0.65)
	pt3dadd(59.15, -54.65, -0.54, 0.65)
	pt3dadd(60.63, -54.93, -0.98, 0.65)
	pt3dadd(61.38, -55.66, -1.19, 0.65)
	pt3dadd(61.93, -56.68, -1.23, 0.74)
  }
  dend[16] {pt3dclear()
	pt3dadd(53.96, -50.84, -1.64, 1.11)
	pt3dadd(55.91, -50.38, -3.12, 0.74)
	pt3dadd(56.84, -49.64, -2.61, 0.74)
	pt3dadd(58.14, -49.27, -3.61, 0.74)
	pt3dadd(58.7, -50.29, -5.01, 1.11)
	pt3dadd(59.34, -51.48, -6.36, 1.11)
	pt3dadd(60.09, -52.4, -7.01, 0.83)
	pt3dadd(62.22, -52.68, -6.38, 0.74)
	pt3dadd(63.43, -52.86, -6.38, 0.74)
	pt3dadd(62.87, -53.96, -6.96, 0.74)
	pt3dadd(62.22, -55.16, -7.29, 0.74)
	pt3dadd(64.17, -55.53, -8.02, 0.74)
	pt3dadd(65.75, -55.25, -9.02, 0.74)
	pt3dadd(67.23, -55.16, -9.3, 0.74)
	pt3dadd(67.87, -55.66, -10, 0.74)
	pt3dadd(67.13, -56.95, -10.63, 0.74)
	pt3dadd(67.59, -57.5, -10.94, 0.65)
	pt3dadd(69.08, -57.69, -11.26, 0.65)
	pt3dadd(70, -58.42, -11.54, 0.65)
	pt3dadd(70.47, -59.53, -12.07, 0.65)
	pt3dadd(71.12, -60.08, -12.43, 0.65)
	pt3dadd(71.86, -60.81, -12.86, 0.83)
	pt3dadd(72.88, -60.9, -13.07, 0.74)
	pt3dadd(73.99, -60.72, -13.87, 0.74)
	pt3dadd(74.73, -62.01, -14.66, 0.74)
	pt3dadd(75.38, -63.02, -15.13, 0.74)
	pt3dadd(76.31, -63.75, -14.73, 0.56)
	pt3dadd(77.24, -64.3, -14.49, 0.56)
	pt3dadd(77.98, -64.58, -14.49, 0.56)
  }
  dend[17] {pt3dclear()
	pt3dadd(35.88, -49.98, -4.04, 0.74)
	pt3dadd(36.41, -51.22, -4.37, 0.46)
	pt3dadd(37.33, -52.59, -3.71, 0.46)
	pt3dadd(37.61, -53.61, -3.36, 0.56)
	pt3dadd(37.89, -54.8, -4.08, 0.74)
	pt3dadd(38.63, -55.63, -3.76, 0.65)
	pt3dadd(39.1, -57.01, -4.08, 0.56)
	pt3dadd(39.75, -58.29, -3.78, 0.56)
	pt3dadd(40.58, -59.58, -3.59, 0.56)
	pt3dadd(40.67, -60.41, -3.59, 0.65)
	pt3dadd(40.58, -61.51, -3.34, 0.56)
	pt3dadd(41.14, -62.61, -3.2, 0.56)
	pt3dadd(41.69, -64.18, -4.14, 0.65)
	pt3dadd(42.07, -65.74, -3.79, 0.56)
	pt3dadd(42.99, -66.75, -4.47, 0.56)
	pt3dadd(43.46, -68.5, -4.52, 0.56)
	pt3dadd(43.98, -69.59, -4.27, 0.56)
	pt3dadd(44.35, -71.06, -3.82, 0.74)
	pt3dadd(44.16, -72.17, -3.84, 0.65)
	pt3dadd(44.26, -73.54, -3.58, 0.56)
	pt3dadd(44.81, -74.1, -3.89, 0.56)
	pt3dadd(45.18, -74.92, -3.85, 0.74)
	pt3dadd(45.18, -76.67, -2.71, 0.56)
	pt3dadd(45.93, -77.5, -3.53, 0.56)
	pt3dadd(46.57, -78.6, -2.84, 0.65)
	pt3dadd(47.13, -79.98, -2.33, 0.56)
	pt3dadd(47.69, -80.99, -2.08, 0.56)
	pt3dadd(48.34, -82.18, -2.58, 0.56)
	pt3dadd(48.34, -83.47, -3.02, 0.56)
	pt3dadd(48.89, -84.57, -2.34, 0.56)
  }
  dend[18] {pt3dclear()
	pt3dadd(35.88, -49.98, -4.04, 0.74)
	pt3dadd(37.92, -50.44, -4.27, 0.65)
	pt3dadd(38.66, -51.45, -3.84, 0.56)
	pt3dadd(39.4, -52.83, -3.25, 0.56)
	pt3dadd(40.05, -53.84, -3.58, 0.56)
	pt3dadd(41.17, -55.03, -2.93, 0.56)
	pt3dadd(42.19, -56.32, -3.04, 0.56)
	pt3dadd(43.15, -57.58, -2.77, 0.56)
	pt3dadd(44.08, -58.4, -2.77, 0.56)
  }
}
proc shape3d_3() {
  dend[18] {	pt3dadd(45.19, -59.32, -2.29, 0.56)
	pt3dadd(46.4, -60.52, -2.75, 0.56)
	pt3dadd(47.14, -61.62, -3.05, 0.56)
	pt3dadd(48.25, -62.54, -2.91, 0.56)
	pt3dadd(49.64, -63.46, -2.37, 0.56)
	pt3dadd(50.66, -64.29, -2.81, 0.56)
	pt3dadd(52.05, -65.39, -2.81, 0.56)
	pt3dadd(52.42, -67.04, -2.69, 0.56)
	pt3dadd(52.8, -68.51, -2.25, 0.56)
	pt3dadd(53.45, -70.08, -2.06, 0.56)
	pt3dadd(54.09, -71.45, -1.85, 0.56)
	pt3dadd(55.12, -72.74, -1.52, 0.56)
	pt3dadd(55.96, -73.62, -1.43, 0.65)
	pt3dadd(57.35, -73.89, -1.43, 0.56)
	pt3dadd(57.81, -75.09, -1.92, 0.65)
	pt3dadd(58.83, -76.28, -1.51, 0.74)
	pt3dadd(59.94, -77.2, -1.55, 0.65)
	pt3dadd(60.97, -77.75, -1.2, 0.65)
	pt3dadd(61.61, -78.86, -1.7, 0.65)
	pt3dadd(62.17, -80.23, -1.96, 0.65)
	pt3dadd(63.28, -80.69, -2.19, 0.56)
	pt3dadd(64.58, -81.06, -2.34, 0.65)
	pt3dadd(64.68, -82.72, -1.38, 0.56)
	pt3dadd(65.23, -84, -0.92, 0.56)
	pt3dadd(66.44, -84.92, -1.62, 0.56)
	pt3dadd(67.55, -85.29, -1.85, 0.56)
	pt3dadd(68.48, -86.3, -1.87, 0.46)
	pt3dadd(68.78, -86.85, -1.98, 0.56)
	pt3dadd(69.61, -87.12, -1.96, 0.46)
	pt3dadd(70.63, -87.49, -1.51, 0.46)
	pt3dadd(71.47, -87.58, -1.97, 0.46)
  }
  dend[19] {pt3dclear()
	pt3dadd(61.93, -56.68, -1.23, 0.74)
	pt3dadd(62.34, -57.81, -0.78, 0.56)
	pt3dadd(62.89, -58.73, -1.29, 0.83)
	pt3dadd(63.73, -59.65, -0.06, 0.56)
	pt3dadd(64.65, -60.2, 0.46, 0.56)
	pt3dadd(65.4, -61.85, 0.72, 0.65)
	pt3dadd(65.86, -62.96, 0.04, 0.56)
	pt3dadd(66.79, -63.69, -0.15, 0.56)
	pt3dadd(67.81, -64.61, -0.42, 0.56)
	pt3dadd(68.92, -64.98, -0.27, 0.56)
	pt3dadd(69.01, -66.08, -0.6, 0.56)
	pt3dadd(69.94, -66.54, -0.15, 0.74)
	pt3dadd(71.06, -67, -0.2, 0.74)
	pt3dadd(71.98, -67.55, -0.38, 0.74)
	pt3dadd(73.19, -68.47, -0.24, 0.74)
	pt3dadd(74.39, -69.02, 0.41, 0.56)
	pt3dadd(75.79, -69.39, -0.01, 0.65)
	pt3dadd(76.68, -69.48, -0.01, 0.56)
	pt3dadd(77.24, -70.4, 0.72, 0.74)
	pt3dadd(77.15, -71.32, 0.83, 0.74)
	pt3dadd(76.96, -72.42, 1.15, 0.74)
	pt3dadd(77.52, -73.25, 0.55, 0.56)
	pt3dadd(78.63, -74.17, 0.81, 0.56)
	pt3dadd(79.19, -75.09, 0.74, 0.56)
	pt3dadd(79, -76.47, 1.33, 0.56)
	pt3dadd(79.65, -77.29, 1.33, 0.56)
	pt3dadd(80.02, -78.03, 1.98, 0.56)
	pt3dadd(80.95, -78.4, 1.14, 0.56)
	pt3dadd(81.97, -78.67, 1.14, 0.56)
	pt3dadd(82.34, -79.68, 1.3, 0.56)
	pt3dadd(83.09, -80.05, 1.34, 0.56)
	pt3dadd(83.46, -80.79, 0.88, 0.46)
	pt3dadd(84.38, -81.25, 0.88, 0.46)
	pt3dadd(85.13, -81.98, 1.28, 0.46)
  }
  dend[20] {pt3dclear()
	pt3dadd(61.93, -56.68, -1.23, 0.74)
	pt3dadd(63.6, -58.05, -1.49, 0.56)
	pt3dadd(64.16, -58.97, -1.79, 0.56)
	pt3dadd(65.27, -59.8, -0.88, 0.56)
	pt3dadd(66.2, -60.44, -1.44, 0.56)
	pt3dadd(67.78, -61.46, -1.44, 0.56)
	pt3dadd(68.33, -62.47, -2, 0.65)
	pt3dadd(70.1, -62.56, -1.43, 0.65)
	pt3dadd(71.67, -63.11, -1.56, 0.74)
	pt3dadd(73.25, -63.66, -1.38, 0.56)
	pt3dadd(74.46, -64.03, -1.93, 0.56)
	pt3dadd(75.29, -64.86, -1.93, 0.56)
	pt3dadd(75.66, -65.87, -1.92, 0.56)
	pt3dadd(75.76, -67.15, -1.92, 0.74)
	pt3dadd(76.59, -67.89, -1.11, 0.56)
	pt3dadd(77.7, -68.62, -0.91, 0.56)
	pt3dadd(78.45, -69.64, -0.75, 0.56)
	pt3dadd(79.09, -71.11, -0.49, 0.56)
	pt3dadd(79.28, -71.93, -0.35, 0.56)
	pt3dadd(80.58, -72.39, -0.35, 0.56)
	pt3dadd(81.83, -73.75, -0.12, 0.56)
	pt3dadd(83.22, -73.94, 0.26, 0.56)
	pt3dadd(84.15, -74.49, -0.43, 0.46)
	pt3dadd(84.98, -74.95, -0.43, 0.46)
	pt3dadd(85.72, -75.87, -0.6, 0.46)
	pt3dadd(86.56, -76.51, -0.54, 0.46)
	pt3dadd(87.49, -77.06, -1.01, 0.46)
	pt3dadd(87.86, -77.24, -0.03, 0.46)
  }
}
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 , 6) 
ProximalSynapsePositions = new Vector(0,0) 
ProximalSynapsePositions .append(0.5    ,     0.5   ,  0.31319   ,      0.5,     0.33399  ,   0.32442  ,   0.25843) 
for i= 0 , 6 { 
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 , 6 { 
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 GranuleCell16
/* 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  */