//**************************************************************************
// Begin cell template for MSP_Cell
// load cell template - builds the cell topology, including inserting
// channels and synapses

begintemplate MSP_Cell
public is_art
public init, topol, basic_shape, subsets, geom, memb
public synlist, x, y, z, position, connect2target

public soma, dendrite, spine
public all, Prox_Dend, Mid_Dend, Dist_Dend
public leaf
public gaba, ampa, nmda, mglu, dr

create soma
create dendrite[55]
create spine[2]

objref synlist, leaf, gaba[300], ampa[300], nmda[300], mglu[300], dr[300]

proc init() { 
	topol()
	subsets()
	geom()
	biophys()

	
	forall {Ra = $1 CM = $2}
	geom_nseg()
	compts = 0
	forall {print secname(), " ", nseg  compts = compts + nseg}
	print compts, " compartments"

	synlist = new List()
	leaf    = new List()
	
	synloops()
	x = y = z = 0 // only change via position
}


proc topol() { local i
connect dendrite[0](0), soma(0.5)
connect dendrite[1](0), dendrite[0](1)
connect dendrite[2](0), dendrite[1](1)
connect dendrite[3](0), dendrite[2](1)
connect dendrite[4](0), dendrite[3](1)
connect dendrite[5](0), dendrite[4](1)
connect dendrite[6](0), dendrite[4](1)
connect dendrite[7](0), dendrite[3](1)
connect dendrite[8](0), dendrite[2](1)
connect dendrite[9](0), dendrite[1](1)
connect dendrite[10](0), dendrite[9](1)
connect dendrite[11](0), dendrite[9](1)
connect dendrite[12](0), dendrite[11](1)
connect dendrite[13](0), dendrite[11](1)
connect dendrite[14](0), dendrite[0](1)
connect dendrite[15](0), dendrite[14](1)
connect dendrite[16](0), dendrite[15](1)
connect dendrite[17](0), dendrite[15](1)
connect dendrite[18](0), dendrite[14](1)
connect dendrite[19](0), dendrite[18](1)
connect dendrite[20](0), dendrite[18](1)
connect dendrite[21](0), dendrite[20](1)
connect dendrite[22](0), dendrite[20](1)
connect dendrite[23](0), dendrite[14](1)
connect dendrite[24](0), soma(0.5)
connect dendrite[25](0), soma(0.5)
connect dendrite[26](0), dendrite[25](1)
connect dendrite[27](0), dendrite[25](1)
connect dendrite[28](0), soma(0.5)
connect dendrite[29](0), dendrite[28](1)
connect dendrite[30](0), dendrite[29](1)
connect dendrite[31](0), dendrite[29](1)
connect dendrite[32](0), dendrite[28](1)
connect dendrite[33](0), soma(0.5)
connect dendrite[34](0), soma(0.5)
connect dendrite[35](0), dendrite[34](1)
connect dendrite[36](0), dendrite[35](1)
connect dendrite[37](0), dendrite[36](1)
connect dendrite[38](0), dendrite[36](1)
connect dendrite[39](0), dendrite[35](1)
connect dendrite[40](0), dendrite[39](1)
connect dendrite[41](0), dendrite[39](1)
connect dendrite[42](0), dendrite[34](1)
connect dendrite[43](0), dendrite[42](1)
connect dendrite[44](0), dendrite[42](1)
connect dendrite[45](0), dendrite[44](1)
connect dendrite[46](0), dendrite[45](1)
connect dendrite[47](0), dendrite[45](1)
connect dendrite[48](0), dendrite[47](1)
connect dendrite[49](0), dendrite[47](1)
connect dendrite[50](0), dendrite[44](1)
connect dendrite[51](0), soma(0.5)
connect dendrite[52](0), dendrite[51](1)
connect dendrite[53](0), dendrite[51](1)
connect dendrite[54](0), dendrite[51](1)

 connect spine[0](0), dendrite[1](0.5)
// connect spine[1](0), dendrite[4](0.5)
 connect spine[1](0), dendrite[19](0.5)

 basic_shape()
}

proc basic_shape() {
soma {
   pt3dclear()
   }
dendrite[0] {
   pt3dclear()
   pt3dadd(-4.380000,-9.370000,13.000000,1.860000)
   pt3dadd(-5.700000,-14.830000,13.000000,1.730000)
   pt3dadd(-7.700000,-19.360001,15.000000,1.730000)
   }
dendrite[1] {
   pt3dclear()
   pt3dadd(-7.700000,-19.360001,15.000000,1.730000)
   pt3dadd(-9.550000,-22.290001,17.000000,0.800000)
   pt3dadd(-9.960000,-24.240000,17.000000,0.800000)
   }
dendrite[2] {
   pt3dclear()
   pt3dadd(-9.960000,-24.240000,17.000000,0.800000)
   pt3dadd(-10.220000,-25.889999,17.000000,0.800000)
   pt3dadd(-11.150000,-28.150000,17.000000,0.800000)
   pt3dadd(-11.320000,-28.530001,17.000000,0.800000)
   }
dendrite[3] {
   pt3dclear()
   pt3dadd(-11.320000,-28.530001,17.000000,0.800000)
   pt3dadd(-12.350000,-29.040001,17.000000,0.800000)
   }
dendrite[4] {
   pt3dclear()
   pt3dadd(-12.350000,-29.040001,17.000000,0.800000)
   pt3dadd(-14.870000,-29.620001,17.000000,0.800000)
   pt3dadd(-15.660000,-31.219999,16.000000,0.800000)
   pt3dadd(-18.190001,-35.080002,15.000000,0.800000)
   pt3dadd(-18.190001,-37.209999,15.000000,0.800000)
   pt3dadd(-18.320000,-39.470001,15.000000,0.800000)
   }
dendrite[5] {
   pt3dclear()
   pt3dadd(-18.320000,-39.470001,15.000000,0.800000)
   pt3dadd(-21.510000,-40.740002,15.000000,0.800000)
   pt3dadd(-21.510000,-40.869999,15.000000,0.800000)
   pt3dadd(-26.820000,-42.869999,13.000000,0.800000)
   pt3dadd(-30.540001,-45.400002,13.000000,0.800000)
   pt3dadd(-30.400000,-48.730000,13.000000,0.800000)
   pt3dadd(-30.540001,-48.730000,13.000000,0.800000)
   pt3dadd(-33.990002,-51.259998,13.000000,0.800000)
   pt3dadd(-37.580002,-56.060001,13.000000,0.800000)
   pt3dadd(-40.759998,-57.790001,13.000000,0.800000)
   pt3dadd(-44.880001,-61.919998,10.000000,0.660000)
   pt3dadd(-48.200001,-62.990002,10.000000,0.660000)
   pt3dadd(-51.119999,-64.980003,10.000000,0.660000)
   pt3dadd(-51.650002,-67.650002,10.000000,0.660000)
   pt3dadd(-55.369999,-67.120003,8.000000,0.660000)
   pt3dadd(-60.680000,-66.449997,7.000000,0.660000)
   pt3dadd(-61.610001,-69.779999,5.000000,0.660000)
   pt3dadd(-66.660004,-72.180000,3.000000,0.660000)
   pt3dadd(-69.709999,-74.709999,1.000000,0.660000)
   pt3dadd(-71.169998,-75.809998,1.000000,0.660000)
   pt3dadd(-72.629997,-77.510002,-1.000000,0.660000)
   pt3dadd(-74.489998,-78.209999,-1.000000,0.660000)
   pt3dadd(-76.879997,-79.110001,-3.000000,0.660000)
   pt3dadd(-80.870003,-79.500000,-3.000000,0.660000)
   pt3dadd(-81.800003,-80.440002,-6.000000,0.660000)
   pt3dadd(-83.129997,-80.099998,-9.000000,0.660000)
   pt3dadd(-84.720001,-81.040001,-11.000000,0.660000)
   pt3dadd(-86.180000,-81.169998,-12.000000,0.660000)
   pt3dadd(-86.839996,-81.570000,-14.000000,0.660000)
   pt3dadd(-87.769997,-81.300003,-16.000000,0.660000)
   }
dendrite[6] {
   pt3dclear()
   pt3dadd(-18.320000,-39.470001,15.000000,0.800000)
   pt3dadd(-13.140000,-41.869999,14.000000,0.800000)
   pt3dadd(-9.290000,-45.869999,14.000000,0.800000)
   pt3dadd(-8.630000,-50.660000,12.000000,0.800000)
   pt3dadd(-9.550000,-55.060001,12.000000,0.800000)
   pt3dadd(-3.580000,-56.930000,12.000000,0.800000)
   pt3dadd(0.010000,-61.189999,9.000000,0.660000)
   pt3dadd(2.660000,-65.580002,9.000000,0.660000)
   pt3dadd(4.920000,-68.910004,6.000000,0.660000)
   pt3dadd(8.110000,-71.110001,4.000000,0.660000)
   pt3dadd(11.830000,-72.839996,3.000000,0.660000)
   pt3dadd(13.950000,-73.910004,2.000000,0.660000)
   pt3dadd(15.280000,-75.910004,-1.000000,0.660000)
   pt3dadd(13.550000,-78.839996,-3.000000,0.660000)
   pt3dadd(13.820000,-81.239998,-6.000000,0.660000)
   pt3dadd(12.760000,-82.440002,-6.000000,0.660000)
   pt3dadd(10.100000,-83.099998,-6.000000,0.660000)
   pt3dadd(5.190000,-86.959999,-6.000000,0.660000)
   }
dendrite[7] {
   pt3dclear()
   pt3dadd(-12.350000,-29.040001,17.000000,1.060000)
   pt3dadd(-11.820000,-31.170000,17.000000,1.060000)
   pt3dadd(-11.550000,-33.279999,17.000000,1.060000)
   pt3dadd(-10.090000,-38.740002,17.000000,0.930000)
   pt3dadd(-10.220000,-38.740002,17.000000,0.930000)
   pt3dadd(-10.880000,-45.799999,17.000000,0.930000)
   pt3dadd(-9.950000,-50.599998,17.000000,0.930000)
   pt3dadd(-10.350000,-53.529999,19.000000,0.800000)
   pt3dadd(-9.820000,-57.259998,19.000000,0.800000)
   pt3dadd(-12.480000,-62.189999,20.000000,0.800000)
   pt3dadd(-15.130000,-64.720001,17.000000,0.800000)
   pt3dadd(-17.120001,-68.449997,17.000000,0.800000)
   pt3dadd(-17.389999,-71.650002,17.000000,0.660000)
   pt3dadd(-18.190001,-75.639999,15.000000,0.660000)
   pt3dadd(-17.660000,-78.570000,15.000000,0.660000)
   pt3dadd(-17.520000,-82.500000,12.000000,0.660000)
   pt3dadd(-15.130000,-84.629997,12.000000,0.660000)
   pt3dadd(-15.270000,-84.629997,12.000000,0.660000)
   pt3dadd(-16.190001,-87.559998,9.000000,0.660000)
   pt3dadd(-15.800000,-90.099998,9.000000,0.660000)
   pt3dadd(-15.530000,-92.360001,9.000000,0.660000)
   pt3dadd(-14.870000,-94.620003,9.000000,0.660000)
   pt3dadd(-14.870000,-96.889999,9.000000,0.660000)
   pt3dadd(-13.800000,-98.349998,9.000000,0.660000)
   pt3dadd(-13.800000,-98.489998,9.000000,0.660000)
   pt3dadd(-14.070000,-100.889999,9.000000,0.660000)
   pt3dadd(-14.470000,-103.150002,9.000000,0.660000)
   pt3dadd(-14.340000,-105.809998,9.000000,0.660000)
   pt3dadd(-15.400000,-107.680000,9.000000,0.660000)
   pt3dadd(-15.530000,-107.680000,9.000000,0.660000)
   pt3dadd(-16.330000,-110.610001,9.000000,0.530000)
   pt3dadd(-18.049999,-112.870003,9.000000,0.530000)
   pt3dadd(-19.910000,-113.540001,9.000000,0.530000)
   pt3dadd(-20.309999,-114.209999,9.000000,0.530000)
   pt3dadd(-21.110001,-115.540001,9.000000,0.530000)
   pt3dadd(-21.639999,-117.400002,6.000000,0.530000)
   }
dendrite[8] {
   pt3dclear()
   pt3dadd(-11.320000,-28.530001,17.000000,0.800000)
   pt3dadd(-10.390000,-30.330000,32.000000,1.200000)
   pt3dadd(-9.590000,-33.000000,34.000000,1.060000)
   pt3dadd(-9.860000,-36.459999,37.000000,1.060000)
   pt3dadd(-10.390000,-42.849998,43.000000,1.060000)
   pt3dadd(-12.510000,-46.180000,50.000000,1.060000)
   pt3dadd(-14.110000,-44.189999,54.000000,1.060000)
   pt3dadd(-15.700000,-44.320000,60.000000,1.060000)
   pt3dadd(-18.219999,-43.389999,65.000000,0.800000)
   pt3dadd(-18.620001,-45.119999,71.000000,0.800000)
   pt3dadd(-16.500000,-46.450001,77.000000,0.800000)
   }
dendrite[9] {
   pt3dclear()
   pt3dadd(-9.960000,-24.240000,17.000000,0.800000)
   pt3dadd(-13.550000,-25.580000,17.000000,0.660000)
   pt3dadd(-16.070000,-26.910000,22.000000,0.530000)
   pt3dadd(-20.190001,-28.510000,21.000000,0.530000)
   pt3dadd(-23.900000,-29.440001,22.000000,0.530000)
   pt3dadd(-28.150000,-29.020000,22.000000,0.530000)
   pt3dadd(-33.189999,-28.549999,22.000000,0.530000)
   }
dendrite[10] {
   pt3dclear()
   pt3dadd(-33.189999,-28.549999,22.000000,0.660000)
   pt3dadd(-37.709999,-28.480000,21.000000,0.660000)
   pt3dadd(-44.349998,-27.150000,21.000000,0.660000)
   pt3dadd(-49.529999,-28.750000,20.000000,0.530000)
   pt3dadd(-54.709999,-29.820000,18.000000,0.530000)
   pt3dadd(-60.680000,-31.410000,18.000000,0.530000)
   pt3dadd(-61.349998,-32.880001,18.000000,0.530000)
   pt3dadd(-66.389999,-34.349998,17.000000,0.530000)
   pt3dadd(-70.110001,-32.750000,17.000000,0.530000)
   pt3dadd(-72.769997,-35.279999,15.000000,0.530000)
   pt3dadd(-75.290001,-39.009998,15.000000,0.530000)
   pt3dadd(-79.010002,-41.939999,14.000000,0.400000)
   pt3dadd(-81.800003,-46.599998,12.000000,0.400000)
   pt3dadd(-83.389999,-48.330002,12.000000,0.400000)
   pt3dadd(-83.389999,-54.590000,10.000000,0.400000)
   pt3dadd(-83.519997,-59.520000,10.000000,0.400000)
   pt3dadd(-82.459999,-62.320000,10.000000,0.400000)
   pt3dadd(-81.970001,-66.209999,8.000000,0.130000)
   pt3dadd(-83.690002,-68.199997,8.000000,0.130000)
   pt3dadd(-84.489998,-68.739998,8.000000,0.130000)
   pt3dadd(-91.260002,-69.000000,8.000000,0.130000)
   pt3dadd(-95.910004,-70.199997,12.000000,0.130000)
   }
dendrite[11] {
   pt3dclear()
   pt3dadd(-33.189999,-28.549999,22.000000,0.660000)
   pt3dadd(-36.380001,-25.219999,22.000000,0.660000)
   pt3dadd(-38.639999,-22.420000,22.000000,0.660000)
   pt3dadd(-43.820000,-19.889999,22.000000,0.660000)
   pt3dadd(-48.070000,-16.030001,22.000000,0.660000)
   pt3dadd(-50.189999,-14.560000,20.000000,0.660000)
   pt3dadd(-53.110001,-12.960000,20.000000,0.660000)
   pt3dadd(-56.959999,-8.840000,19.000000,0.660000)
   pt3dadd(-59.889999,-8.170000,16.000000,0.660000)
   pt3dadd(-61.880001,-5.640000,16.000000,0.660000)
   pt3dadd(-65.459999,-4.970000,13.000000,0.660000)
   pt3dadd(-68.519997,-3.510000,13.000000,0.660000)
   pt3dadd(-73.830002,-5.240000,13.000000,0.660000)
   pt3dadd(-78.739998,-6.840000,13.000000,0.660000)
   pt3dadd(-80.599998,-8.170000,13.000000,0.530000)
   pt3dadd(-81.400002,-10.970000,13.000000,0.530000)
   pt3dadd(-85.250000,-13.900000,14.000000,0.530000)
   pt3dadd(-88.040001,-15.360000,14.000000,0.530000)
   pt3dadd(-90.029999,-16.959999,16.000000,0.530000)
   pt3dadd(-93.620003,-18.160000,19.000000,0.530000)
   pt3dadd(-96.669998,-18.530001,19.000000,0.530000)
   pt3dadd(-101.449997,-19.459999,19.000000,0.530000)
   pt3dadd(-105.169998,-21.200001,19.000000,0.530000)
   pt3dadd(-109.820000,-21.860001,19.000000,0.530000)
   pt3dadd(-115.680000,-23.389999,19.000000,0.530000)
   }
dendrite[12] {
   pt3dclear()
   pt3dadd(-115.680000,-23.389999,19.000000,0.530000)
   pt3dadd(-123.910004,-23.250000,19.000000,0.270000)
   pt3dadd(-132.139999,-22.990000,19.000000,0.130000)
   pt3dadd(-137.039993,-23.459999,19.000000,0.130000)
   pt3dadd(-142.479996,-23.059999,19.000000,0.130000)
   pt3dadd(-148.460007,-23.730000,19.000000,0.130000)
   pt3dadd(-154.440002,-24.389999,19.000000,0.130000)
   pt3dadd(-159.369995,-23.520000,19.000000,0.130000)
   pt3dadd(-164.130005,-21.059999,19.000000,0.130000)
   pt3dadd(-168.250000,-18.930000,19.000000,0.130000)
   pt3dadd(-173.559998,-15.470000,19.000000,0.130000)
   pt3dadd(-177.429993,-12.200000,19.000000,0.130000)
   }
dendrite[13] {
   pt3dclear()
   pt3dadd(-115.680000,-23.389999,19.000000,0.530000)
   pt3dadd(-120.839996,-26.020000,20.000000,0.530000)
   pt3dadd(-123.360001,-27.350000,20.000000,0.530000)
   pt3dadd(-127.349998,-29.480000,22.000000,0.530000)
   pt3dadd(-132.000000,-30.549999,22.000000,0.270000)
   pt3dadd(-137.839996,-29.879999,25.000000,0.270000)
   }
dendrite[14] {
   pt3dclear()
   pt3dadd(-7.700000,-19.360001,15.000000,1.730000)
   pt3dadd(-5.700000,-24.020000,19.000000,1.590000)
   }
dendrite[15] {
   pt3dclear()
   pt3dadd(-5.700000,-24.020000,19.000000,1.590000)
   pt3dadd(-5.970000,-27.950001,23.000000,1.060000)
   pt3dadd(-10.090000,-30.219999,23.000000,1.060000)
   pt3dadd(-13.940000,-30.549999,26.000000,1.060000)
   pt3dadd(-19.780001,-30.680000,26.000000,0.930000)
   pt3dadd(-23.230000,-31.610001,26.000000,0.930000)
   pt3dadd(-24.559999,-31.680000,26.000000,0.930000)
   pt3dadd(-27.480000,-34.009998,26.000000,0.800000)
   pt3dadd(-33.990002,-35.209999,28.000000,0.800000)
   pt3dadd(-39.299999,-36.939999,28.000000,0.660000)
   pt3dadd(-39.830002,-38.279999,28.000000,0.660000)
   pt3dadd(-43.680000,-39.070000,28.000000,0.660000)
   pt3dadd(-45.150002,-40.009998,33.000000,0.660000)
   pt3dadd(-49.130001,-42.410000,33.000000,0.660000)
   pt3dadd(-50.310001,-43.139999,33.000000,0.660000)
   }
dendrite[16] {
   pt3dclear()
   pt3dadd(-50.310001,-43.139999,33.000000,0.660000)
   pt3dadd(-52.570000,-41.680000,33.000000,0.270000)
   pt3dadd(-56.549999,-44.139999,33.000000,0.270000)
   pt3dadd(-64.120003,-45.869999,42.000000,0.270000)
   pt3dadd(-69.430000,-48.540001,49.000000,0.270000)
   pt3dadd(-69.559998,-48.540001,49.000000,0.270000)
   pt3dadd(-71.019997,-54.259998,49.000000,0.270000)
   pt3dadd(-71.160004,-54.259998,49.000000,0.270000)
   pt3dadd(-72.620003,-60.930000,55.000000,0.270000)
   pt3dadd(-72.750000,-60.930000,55.000000,0.270000)
   pt3dadd(-77.660004,-67.050003,64.000000,0.270000)
   pt3dadd(-77.800003,-67.050003,64.000000,0.270000)
   pt3dadd(-83.239998,-70.779999,71.000000,0.270000)
   pt3dadd(-92.940002,-75.309998,75.000000,0.130000)
   }
dendrite[17] {
   pt3dclear()
   pt3dadd(-50.310001,-43.139999,33.000000,0.660000)
   pt3dadd(-51.250000,-44.400002,33.000000,0.660000)
   pt3dadd(-52.450001,-51.459999,33.000000,0.530000)
   pt3dadd(-52.450001,-52.660000,33.000000,0.530000)
   pt3dadd(-53.110001,-55.459999,33.000000,0.530000)
   pt3dadd(-53.380001,-57.990002,33.000000,0.530000)
   pt3dadd(-57.230000,-61.049999,35.000000,0.400000)
   pt3dadd(-62.939999,-62.650002,35.000000,0.400000)
   pt3dadd(-67.849998,-62.650002,35.000000,0.400000)
   pt3dadd(-69.849998,-63.450001,35.000000,0.400000)
   pt3dadd(-73.300003,-64.489998,35.000000,0.400000)
   pt3dadd(-76.489998,-64.779999,37.000000,0.400000)
   pt3dadd(-82.199997,-64.779999,37.000000,0.400000)
   pt3dadd(-84.190002,-66.779999,37.000000,0.400000)
   pt3dadd(-89.099998,-67.419998,37.000000,0.400000)
   pt3dadd(-95.080002,-67.849998,37.000000,0.400000)
   pt3dadd(-101.320000,-64.889999,37.000000,0.400000)
   pt3dadd(-107.300003,-63.320000,37.000000,0.400000)
   pt3dadd(-113.400002,-64.620003,37.000000,0.400000)
   pt3dadd(-120.709999,-65.160004,37.000000,0.400000)
   pt3dadd(-126.019997,-65.290001,37.000000,0.400000)
   pt3dadd(-132.259995,-65.449997,39.000000,0.400000)
   }
dendrite[18] {
   pt3dclear()
   pt3dadd(-5.700000,-24.020000,19.000000,1.590000)
   pt3dadd(-5.310000,-25.090000,22.000000,1.460000)
   pt3dadd(-1.850000,-28.549999,23.000000,1.200000)
   pt3dadd(3.060000,-32.549999,27.000000,1.200000)
   pt3dadd(6.380000,-34.209999,31.000000,1.060000)
   pt3dadd(7.440000,-36.480000,35.000000,0.930000)
   }
dendrite[19] {
   pt3dclear()
   pt3dadd(7.440000,-36.480000,35.000000,0.930000)
   pt3dadd(7.440000,-42.410000,35.000000,0.800000)
   pt3dadd(7.580000,-46.799999,38.000000,0.800000)
   pt3dadd(9.440000,-50.400002,41.000000,0.800000)
   pt3dadd(9.570000,-52.400002,41.000000,0.800000)
   pt3dadd(11.560000,-58.119999,41.000000,0.800000)
   pt3dadd(13.730000,-63.130001,41.000000,0.800000)
   pt3dadd(17.010000,-69.180000,46.000000,0.800000)
   pt3dadd(17.709999,-73.779999,46.000000,0.800000)
   pt3dadd(19.400000,-78.110001,42.000000,0.800000)
   pt3dadd(19.400000,-78.239998,42.000000,0.800000)
   pt3dadd(18.600000,-81.970001,42.000000,0.660000)
   }
dendrite[20] {
   pt3dclear()
   pt3dadd(7.440000,-36.480000,35.000000,0.930000)
   pt3dadd(7.970000,-37.139999,35.000000,0.930000)
   pt3dadd(12.760000,-38.340000,35.000000,0.930000)
   pt3dadd(15.010000,-38.740002,37.000000,0.930000)
   pt3dadd(20.190001,-37.939999,44.000000,0.930000)
   pt3dadd(25.370001,-38.209999,48.000000,0.930000)
   pt3dadd(29.360001,-36.540001,52.000000,0.930000)
   pt3dadd(33.580002,-38.930000,52.000000,0.930000)
   }
dendrite[21] {
   pt3dclear()
   pt3dadd(33.580002,-38.930000,52.000000,0.930000)
   pt3dadd(35.200001,-39.209999,60.000000,0.930000)
   pt3dadd(40.689999,-36.490002,60.000000,0.930000)
   pt3dadd(44.889999,-36.009998,62.000000,0.930000)
   pt3dadd(50.779999,-34.619999,62.000000,0.930000)
   pt3dadd(57.419998,-33.950001,62.000000,0.930000)
   pt3dadd(60.169998,-33.080002,65.000000,0.930000)
   pt3dadd(65.919998,-31.959999,65.000000,0.930000)
   pt3dadd(71.570000,-30.520000,65.000000,0.930000)
   pt3dadd(78.349998,-29.590000,65.000000,0.930000)
   pt3dadd(83.139999,-29.020000,71.000000,0.660000)
   pt3dadd(89.900002,-27.590000,71.000000,0.660000)
   pt3dadd(95.480003,-26.930000,71.000000,0.660000)
   pt3dadd(100.800003,-25.750000,75.000000,0.660000)
   pt3dadd(105.839996,-28.440001,65.000000,0.630000)
   pt3dadd(109.949997,-29.059999,65.000000,0.630000)
   pt3dadd(114.070000,-27.900000,67.000000,0.630000)
   pt3dadd(118.190002,-27.590000,67.000000,0.630000)
   pt3dadd(123.769997,-28.170000,70.000000,0.630000)
   pt3dadd(123.629997,-28.170000,70.000000,0.630000)
   }
dendrite[22] {
   pt3dclear()
   pt3dadd(33.580002,-38.930000,52.000000,0.930000)
   pt3dadd(36.900002,-42.799999,52.000000,0.800000)
   pt3dadd(39.150002,-48.119999,52.000000,0.800000)
   pt3dadd(42.279999,-48.869999,52.000000,0.800000)
   pt3dadd(46.189999,-51.990002,52.000000,0.660000)
   pt3dadd(47.590000,-55.669998,52.000000,0.660000)
   pt3dadd(49.250000,-59.849998,52.000000,0.400000)
   }
dendrite[23] {
   pt3dclear()
   pt3dadd(-5.700000,-24.020000,19.000000,1.590000)
   pt3dadd(-2.980000,-23.920000,22.000000,0.660000)
   pt3dadd(0.470000,-22.450001,21.000000,0.660000)
   pt3dadd(4.590000,-22.190001,20.000000,0.660000)
   pt3dadd(9.630000,-20.990000,20.000000,0.660000)
   pt3dadd(13.350000,-20.059999,18.000000,0.660000)
   pt3dadd(17.740000,-17.660000,17.000000,0.660000)
   pt3dadd(21.320000,-14.860000,15.000000,0.530000)
   pt3dadd(27.700001,-13.790000,12.000000,0.400000)
   pt3dadd(29.160000,-13.790000,12.000000,0.400000)
   pt3dadd(33.410000,-13.660000,12.000000,0.270000)
   pt3dadd(38.189999,-12.460000,10.000000,0.270000)
   pt3dadd(48.410000,-12.400000,10.000000,0.270000)
   }
dendrite[24] {
   pt3dclear()
   pt3dadd(-5.970000,2.420000,1.000000,1.060000)
   pt3dadd(-9.420000,7.080000,1.000000,1.060000)
   pt3dadd(-13.940000,12.010000,0.000000,0.930000)
   pt3dadd(-17.260000,14.280000,-2.000000,0.800000)
   pt3dadd(-17.520000,15.210000,-2.000000,0.800000)
   pt3dadd(-15.000000,17.070000,-3.000000,0.800000)
   pt3dadd(-11.550000,18.270000,-4.000000,0.800000)
   pt3dadd(-6.900000,19.870001,-5.000000,0.800000)
   pt3dadd(-4.240000,22.000000,-8.000000,0.530000)
   pt3dadd(1.600000,20.010000,-10.000000,0.530000)
   pt3dadd(5.850000,18.940001,-12.000000,0.530000)
   pt3dadd(10.370000,21.200001,-14.000000,0.530000)
   pt3dadd(14.750000,23.200001,-14.000000,0.530000)
   pt3dadd(18.600000,24.129999,-16.000000,0.530000)
   pt3dadd(24.570000,23.139999,-16.000000,0.530000)
   pt3dadd(32.009998,21.940001,-16.000000,0.400000)
   pt3dadd(40.910000,20.870001,-16.000000,0.400000)
   pt3dadd(45.160000,22.000000,-16.000000,0.400000)
   pt3dadd(51.959999,21.340000,-24.000000,0.400000)
   pt3dadd(61.389999,18.940001,-23.000000,0.400000)
   pt3dadd(61.529999,11.610000,-23.000000,0.130000)
   }
   basic_shape2()
   }
   proc basic_shape2() {
dendrite[25] {
   pt3dclear()
   pt3dadd(-6.900000,-4.110000,1.000000,0.660000)
   pt3dadd(-12.740000,-1.840000,1.000000,0.660000)
   pt3dadd(-17.520000,0.290000,1.000000,0.660000)
   pt3dadd(-24.830000,1.620000,1.000000,0.660000)
   pt3dadd(-31.870001,1.360000,1.000000,0.530000)
   pt3dadd(-34.520000,2.150000,-1.000000,0.530000)
   pt3dadd(-37.970001,0.690000,0.000000,0.530000)
   pt3dadd(-41.029999,0.960000,0.000000,0.530000)
   pt3dadd(-45.410000,1.620000,0.000000,0.530000)
   pt3dadd(-47.139999,1.950000,1.000000,0.530000)
   pt3dadd(-50.860001,3.950000,2.000000,0.530000)
   pt3dadd(-53.779999,5.550000,2.000000,0.530000)
   pt3dadd(-55.639999,7.020000,2.000000,0.530000)
   pt3dadd(-58.820000,9.550000,2.000000,0.530000)
   pt3dadd(-60.680000,10.210000,3.000000,0.530000)
   pt3dadd(-64.400002,9.810000,3.000000,0.530000)
   pt3dadd(-66.529999,9.280000,3.000000,0.530000)
   pt3dadd(-70.510002,10.080000,4.000000,0.530000)
   pt3dadd(-71.570000,9.950000,4.000000,0.530000)
   }
dendrite[26] {
   pt3dclear()
   pt3dadd(-71.570000,9.950000,4.000000,0.660000)
   pt3dadd(-73.169998,7.750000,7.000000,0.660000)
   pt3dadd(-77.019997,8.150000,7.000000,0.530000)
   pt3dadd(-77.550003,5.350000,7.000000,0.530000)
   pt3dadd(-78.209999,4.950000,9.000000,0.530000)
   pt3dadd(-79.139999,5.490000,12.000000,0.530000)
   pt3dadd(-79.940002,2.950000,12.000000,0.530000)
   pt3dadd(-81.529999,1.090000,12.000000,0.530000)
   pt3dadd(-85.650002,0.160000,13.000000,0.530000)
   pt3dadd(-87.769997,-3.040000,16.000000,0.400000)
   pt3dadd(-87.910004,-6.500000,18.000000,0.270000)
   pt3dadd(-87.379997,-9.300000,21.000000,0.270000)
   pt3dadd(-87.379997,-10.900000,22.000000,0.270000)
   pt3dadd(-85.379997,-12.900000,25.000000,0.270000)
   pt3dadd(-85.379997,-13.160000,25.000000,0.270000)
   pt3dadd(-85.519997,-16.500000,25.000000,0.270000)
   pt3dadd(-84.989998,-18.360001,27.000000,0.270000)
   pt3dadd(-84.989998,-18.629999,27.000000,0.270000)
   pt3dadd(-86.839996,-18.760000,27.000000,0.270000)
   pt3dadd(-86.980003,-21.959999,30.000000,0.270000)
   pt3dadd(-87.110001,-21.959999,30.000000,0.270000)
   pt3dadd(-89.500000,-23.959999,33.000000,0.270000)
   pt3dadd(-89.629997,-24.090000,33.000000,0.270000)
   pt3dadd(-91.629997,-27.950001,36.000000,0.270000)
   pt3dadd(-94.680000,-29.549999,41.000000,0.270000)
   pt3dadd(-96.540001,-31.680000,41.000000,0.270000)
   pt3dadd(-97.599998,-33.410000,44.000000,0.270000)
   pt3dadd(-99.989998,-34.349998,44.000000,0.270000)
   pt3dadd(-101.449997,-36.480000,48.000000,0.130000)
   pt3dadd(-103.180000,-37.810001,48.000000,0.130000)
   pt3dadd(-104.769997,-41.270000,51.000000,0.130000)
   pt3dadd(-106.500000,-43.540001,54.000000,0.130000)
   pt3dadd(-109.290001,-45.669998,54.000000,0.130000)
   pt3dadd(-113.669998,-48.730000,57.000000,0.130000)
   }
dendrite[27] {
   pt3dclear()
   pt3dadd(-71.570000,9.950000,4.000000,0.530000)
   pt3dadd(-74.489998,10.880000,4.000000,0.530000)
   pt3dadd(-77.680000,10.480000,4.000000,0.530000)
   pt3dadd(-79.269997,12.350000,6.000000,0.530000)
   pt3dadd(-81.269997,13.680000,6.000000,0.530000)
   pt3dadd(-83.129997,14.080000,4.000000,0.530000)
   pt3dadd(-83.919998,16.480000,4.000000,0.530000)
   pt3dadd(-85.120003,17.670000,4.000000,0.530000)
   pt3dadd(-89.099998,17.940001,4.000000,0.530000)
   pt3dadd(-88.970001,17.940001,4.000000,0.530000)
   pt3dadd(-90.029999,19.540001,2.000000,0.530000)
   pt3dadd(-92.290001,19.010000,1.000000,0.530000)
   pt3dadd(-95.610001,20.070000,-1.000000,0.530000)
   pt3dadd(-97.730003,20.600000,-2.000000,0.400000)
   pt3dadd(-100.919998,21.000000,-3.000000,0.400000)
   pt3dadd(-104.769997,21.400000,-4.000000,0.400000)
   pt3dadd(-108.760002,20.740000,-4.000000,0.270000)
   pt3dadd(-111.940002,17.139999,-4.000000,0.270000)
   pt3dadd(-114.440002,14.970000,-4.000000,0.270000)
   pt3dadd(-117.790001,12.610000,-7.000000,0.270000)
   pt3dadd(-119.750000,9.770000,-7.000000,0.270000)
   pt3dadd(-122.040001,6.220000,-7.000000,0.130000)
   pt3dadd(-124.830002,3.690000,-7.000000,0.130000)
   }
dendrite[28] {
   pt3dclear()
   pt3dadd(5.220000,1.680000,5.000000,1.200000)
   pt3dadd(9.340000,2.610000,7.000000,1.200000)
   pt3dadd(12.390000,2.610000,9.000000,1.060000)
   pt3dadd(15.310000,3.810000,10.000000,0.930000)
   pt3dadd(17.969999,7.140000,11.000000,0.930000)
   pt3dadd(19.870001,7.320000,11.000000,0.930000)
   }
dendrite[29] {
   pt3dclear()
   pt3dadd(19.870001,7.320000,11.000000,0.930000)
   pt3dadd(22.879999,7.410000,13.000000,0.800000)
   pt3dadd(25.940001,10.740000,13.000000,0.800000)
   pt3dadd(33.369999,14.870000,15.000000,0.660000)
   pt3dadd(36.160000,18.459999,18.000000,0.530000)
   pt3dadd(39.619999,23.120001,21.000000,0.530000)
   pt3dadd(40.849998,23.440001,21.000000,0.530000)
   }
dendrite[30] {
   pt3dclear()
   pt3dadd(40.849998,23.440001,21.000000,0.530000)
   pt3dadd(42.400002,23.719999,21.000000,0.530000)
   pt3dadd(42.799999,23.719999,21.000000,0.530000)
   pt3dadd(45.590000,26.660000,21.000000,0.530000)
   pt3dadd(50.110001,26.260000,28.000000,0.400000)
   pt3dadd(57.680000,26.389999,30.000000,0.400000)
   pt3dadd(62.590000,27.049999,37.000000,0.270000)
   pt3dadd(68.959999,28.190001,37.000000,0.270000)
   pt3dadd(69.099998,28.190001,37.000000,0.270000)
   pt3dadd(73.750000,31.920000,37.000000,0.270000)
   pt3dadd(74.809998,34.450001,37.000000,0.270000)
   pt3dadd(77.599998,35.779999,37.000000,0.270000)
   pt3dadd(77.860001,35.779999,37.000000,0.270000)
   pt3dadd(85.430000,35.779999,37.000000,0.270000)
   pt3dadd(90.209999,35.180000,37.000000,0.270000)
   pt3dadd(96.320000,35.049999,37.000000,0.270000)
   pt3dadd(101.370003,34.509998,37.000000,0.270000)
   pt3dadd(106.809998,34.509998,37.000000,0.130000)
   pt3dadd(106.949997,34.380001,37.000000,0.130000)
   pt3dadd(111.860001,34.110001,37.000000,0.130000)
   pt3dadd(117.040001,33.119999,37.000000,0.130000)
   pt3dadd(117.300003,32.980000,37.000000,0.130000)
   pt3dadd(121.160004,30.980000,37.000000,0.130000)
   pt3dadd(121.290001,30.850000,37.000000,0.130000)
   pt3dadd(122.879997,29.920000,37.000000,0.130000)
   pt3dadd(129.389999,28.590000,37.000000,0.130000)
   pt3dadd(137.089996,23.120001,37.000000,0.130000)
   }
dendrite[31] {
   pt3dclear()
   pt3dadd(40.849998,23.440001,21.000000,0.530000)
   pt3dadd(40.990002,29.170000,30.000000,0.530000)
   pt3dadd(43.240002,34.090000,30.000000,0.400000)
   pt3dadd(47.230000,41.419998,33.000000,0.400000)
   pt3dadd(49.009998,46.060001,33.000000,0.400000)
   pt3dadd(49.799999,49.660000,33.000000,0.400000)
   pt3dadd(51.340000,54.880001,33.000000,0.130000)
   pt3dadd(45.419998,60.049999,33.000000,0.130000)
   pt3dadd(40.380001,66.180000,33.000000,0.130000)
   pt3dadd(34.660000,71.910004,33.000000,0.130000)
   pt3dadd(29.750000,76.040001,33.000000,0.130000)
   pt3dadd(24.309999,81.099998,33.000000,0.130000)
   pt3dadd(19.340000,85.650002,33.000000,0.130000)
   }
dendrite[32] {
   pt3dclear()
   pt3dadd(19.870001,7.320000,11.000000,0.930000)
   pt3dadd(23.459999,11.580000,20.000000,0.530000)
   pt3dadd(23.990000,18.910000,27.000000,0.530000)
   pt3dadd(23.990000,19.180000,27.000000,0.530000)
   pt3dadd(21.459999,22.900000,27.000000,0.400000)
   pt3dadd(20.590000,27.549999,27.000000,0.400000)
   pt3dadd(21.730000,32.900002,31.000000,0.400000)
   pt3dadd(16.020000,37.160000,33.000000,0.400000)
   pt3dadd(12.490000,40.470001,33.000000,0.400000)
   pt3dadd(9.250000,43.150002,39.000000,0.400000)
   pt3dadd(8.720000,50.209999,45.000000,0.400000)
   }
dendrite[33] {
   pt3dclear()
   pt3dadd(0.930000,-8.790000,-9.000000,1.330000)
   pt3dadd(0.660000,-13.990000,-9.000000,1.330000)
   pt3dadd(-0.130000,-17.980000,-9.000000,1.200000)
   pt3dadd(-1.200000,-18.780001,-15.000000,1.200000)
   pt3dadd(-1.200000,-18.920000,-15.000000,1.200000)
   pt3dadd(-1.330000,-22.250000,-15.000000,1.200000)
   pt3dadd(-2.520000,-25.180000,-17.000000,1.200000)
   pt3dadd(-4.120000,-26.910000,-17.000000,1.200000)
   pt3dadd(-4.120000,-30.370001,-20.000000,1.200000)
   pt3dadd(-3.320000,-33.169998,-20.000000,1.060000)
   pt3dadd(-4.650000,-35.570000,-22.000000,1.060000)
   pt3dadd(-6.510000,-37.029999,-21.000000,1.060000)
   }
dendrite[34] {
   pt3dclear()
   pt3dadd(7.870000,-2.780000,-11.000000,1.330000)
   pt3dadd(10.000000,-2.780000,-11.000000,1.060000)
   }
dendrite[35] {
   pt3dclear()
   pt3dadd(10.000000,-2.780000,-11.000000,1.060000)
   pt3dadd(13.320000,-2.510000,-11.000000,1.060000)
   pt3dadd(17.700001,-2.910000,-11.000000,0.930000)
   pt3dadd(23.410000,-4.510000,-8.000000,0.660000)
   pt3dadd(27.400000,-3.310000,-8.000000,0.660000)
   pt3dadd(27.400000,-3.440000,-8.000000,0.660000)
   pt3dadd(32.439999,-4.370000,-5.000000,0.660000)
   pt3dadd(36.430000,-4.640000,-1.000000,0.660000)
   }
dendrite[36] {
   pt3dclear()
   pt3dadd(36.430000,-4.640000,-1.000000,0.660000)
   pt3dadd(38.150002,-4.570000,-1.000000,0.660000)
   }
dendrite[37] {
   pt3dclear()
   pt3dadd(38.150002,-4.570000,-1.000000,0.660000)
   pt3dadd(43.330002,-4.370000,1.000000,0.660000)
   pt3dadd(51.299999,-6.370000,3.000000,0.660000)
   pt3dadd(56.349998,-7.040000,3.000000,0.660000)
   pt3dadd(60.070000,-7.170000,3.000000,0.660000)
   pt3dadd(60.070000,-7.310000,3.000000,0.660000)
   pt3dadd(62.990002,-6.640000,4.000000,0.660000)
   pt3dadd(67.500000,-7.170000,4.000000,0.660000)
   pt3dadd(67.500000,-7.310000,4.000000,0.660000)
   pt3dadd(72.419998,-9.570000,4.000000,0.660000)
   pt3dadd(76.360001,-12.590000,7.000000,0.660000)
   pt3dadd(76.230003,-12.590000,7.000000,0.660000)
   pt3dadd(83.790001,-16.980000,11.000000,0.660000)
   pt3dadd(82.730003,-16.980000,11.000000,0.660000)
   pt3dadd(88.309998,-21.510000,13.000000,0.660000)
   pt3dadd(93.489998,-27.900000,17.000000,0.660000)
   pt3dadd(93.889999,-33.500000,20.000000,0.660000)
   pt3dadd(97.769997,-37.709999,20.000000,0.660000)
   pt3dadd(101.059998,-40.830002,23.000000,0.660000)
   pt3dadd(100.930000,-40.830002,23.000000,0.660000)
   pt3dadd(103.180000,-42.419998,26.000000,0.660000)
   pt3dadd(107.199997,-45.439999,26.000000,0.660000)
   pt3dadd(111.150002,-49.619999,30.000000,0.660000)
   pt3dadd(118.320000,-54.410000,34.000000,0.530000)
   pt3dadd(124.699997,-60.540001,37.000000,0.530000)
   pt3dadd(132.130005,-65.599998,35.000000,0.530000)
   }
dendrite[38] {
   pt3dclear()
   pt3dadd(38.150002,-4.570000,-1.000000,0.660000)
   pt3dadd(41.740002,-6.840000,-1.000000,0.400000)
   pt3dadd(46.790001,-8.900000,3.000000,0.130000)
   pt3dadd(52.099998,-10.100000,3.000000,0.130000)
   pt3dadd(56.610001,-10.370000,3.000000,0.130000)
   pt3dadd(60.459999,-13.830000,3.000000,0.130000)
   }
dendrite[39] {
   pt3dclear()
   pt3dadd(36.430000,-4.640000,-1.000000,0.660000)
   pt3dadd(40.410000,-0.380000,-1.000000,0.400000)
   pt3dadd(40.410000,-0.110000,-1.000000,0.400000)
   pt3dadd(45.459999,0.150000,4.000000,0.400000)
   pt3dadd(55.020000,7.610000,14.000000,0.400000)
   pt3dadd(62.060001,12.540000,18.000000,0.400000)
   pt3dadd(66.669998,14.490000,18.000000,0.400000)
   pt3dadd(70.419998,16.809999,23.000000,0.400000)
   pt3dadd(70.559998,16.809999,23.000000,0.400000)
   pt3dadd(75.169998,20.090000,23.000000,0.400000)
   pt3dadd(79.059998,23.799999,23.000000,0.400000)
   pt3dadd(79.059998,24.070000,23.000000,0.400000)
   pt3dadd(86.360001,28.200001,23.000000,0.400000)
   pt3dadd(91.059998,29.750000,23.000000,0.400000)
   }
dendrite[40] {
   pt3dclear()
   pt3dadd(91.059998,29.750000,23.000000,0.400000)
   pt3dadd(94.730003,31.790001,23.000000,0.400000)
   pt3dadd(99.209999,39.000000,23.000000,0.400000)
   pt3dadd(102.389999,45.930000,23.000000,0.400000)
   pt3dadd(105.080002,50.779999,23.000000,0.400000)
   pt3dadd(109.830002,53.660000,23.000000,0.400000)
   pt3dadd(113.849998,57.040001,23.000000,0.400000)
   }
dendrite[41] {
   pt3dclear()
   pt3dadd(91.059998,29.750000,23.000000,0.400000)
   pt3dadd(94.379997,27.219999,13.000000,0.270000)
   pt3dadd(94.250000,27.219999,13.000000,0.270000)
   pt3dadd(97.169998,24.420000,7.000000,0.270000)
   pt3dadd(102.349998,20.290001,7.000000,0.270000)
   pt3dadd(105.930000,17.360001,7.000000,0.270000)
   pt3dadd(112.309998,11.360000,7.000000,0.270000)
   pt3dadd(115.360001,4.570000,7.000000,0.270000)
   pt3dadd(115.230003,4.440000,7.000000,0.270000)
   pt3dadd(120.410004,-1.960000,2.000000,0.270000)
   pt3dadd(125.449997,-5.890000,1.000000,0.270000)
   pt3dadd(128.850006,-10.800000,1.000000,0.270000)
   pt3dadd(133.020004,-15.750000,0.000000,0.270000)
   pt3dadd(138.869995,-19.080000,-6.000000,0.270000)
   pt3dadd(143.910004,-25.200001,-6.000000,0.270000)
   pt3dadd(147.630005,-29.670000,0.000000,0.270000)
   }
dendrite[42] {
   pt3dclear()
   pt3dadd(10.000000,-2.780000,-11.000000,1.060000)
   pt3dadd(12.790000,-0.710000,-11.000000,0.800000)
   pt3dadd(15.710000,-0.710000,-11.000000,0.800000)
   pt3dadd(19.160000,0.350000,-11.000000,0.800000)
   pt3dadd(21.420000,1.820000,-11.000000,0.660000)
   pt3dadd(25.270000,1.820000,-14.000000,0.660000)
   pt3dadd(25.270000,1.550000,-14.000000,0.660000)
   pt3dadd(30.980000,3.150000,-9.000000,0.660000)
   pt3dadd(39.480000,3.420000,-7.000000,0.660000)
   pt3dadd(46.790001,3.680000,-3.000000,0.660000)
   pt3dadd(52.169998,4.190000,-3.000000,0.660000)
   }
dendrite[43] {
   pt3dclear()
   pt3dadd(52.169998,4.190000,-3.000000,0.660000)
   pt3dadd(55.279999,4.480000,-3.000000,0.660000)
   pt3dadd(63.119999,5.280000,-1.000000,0.660000)
   pt3dadd(67.500000,5.080000,-1.000000,0.660000)
   pt3dadd(77.059998,5.880000,-1.000000,0.660000)
   pt3dadd(83.300003,7.580000,-1.000000,0.660000)
   pt3dadd(86.230003,8.810000,-1.000000,0.660000)
   pt3dadd(86.360001,8.810000,-1.000000,0.660000)
   pt3dadd(92.459999,11.710000,-1.000000,0.660000)
   pt3dadd(95.790001,13.080000,-1.000000,0.660000)
   }
dendrite[44] {
   pt3dclear()
   pt3dadd(52.169998,4.190000,-3.000000,0.660000)
   pt3dadd(55.889999,2.590000,0.000000,0.400000)
   pt3dadd(65.580002,0.330000,7.000000,0.400000)
   pt3dadd(73.309998,-4.120000,7.000000,0.400000)
   }
dendrite[45] {
   pt3dclear()
   pt3dadd(73.309998,-4.120000,7.000000,0.400000)
   pt3dadd(75.540001,-5.530000,12.000000,0.400000)
   pt3dadd(80.169998,-7.150000,12.000000,0.400000)
   }
dendrite[46] {
   pt3dclear()
   pt3dadd(80.169998,-7.150000,12.000000,0.530000)
   pt3dadd(84.309998,-8.930000,14.000000,0.400000)
   pt3dadd(90.470001,-12.940000,14.000000,0.400000)
   pt3dadd(99.449997,-15.590000,26.000000,0.400000)
   pt3dadd(106.410004,-18.930000,26.000000,0.400000)
   pt3dadd(113.790001,-21.920000,32.000000,0.400000)
   pt3dadd(121.910004,-24.910000,35.000000,0.270000)
   pt3dadd(128.720001,-29.719999,35.000000,0.270000)
   pt3dadd(135.589996,-33.169998,42.000000,0.270000)
   pt3dadd(143.949997,-37.299999,48.000000,0.270000)
   pt3dadd(149.169998,-41.580002,48.000000,0.270000)
   pt3dadd(155.509995,-46.220001,53.000000,0.270000)
   pt3dadd(159.660004,-45.970001,53.000000,0.270000)
   pt3dadd(164.399994,-45.220001,53.000000,0.270000)
   pt3dadd(169.580002,-46.549999,53.000000,0.270000)
   pt3dadd(169.580002,-46.820000,53.000000,0.270000)
   }
dendrite[47] {
   pt3dclear()
   pt3dadd(80.169998,-7.150000,12.000000,0.400000)
   pt3dadd(86.940002,-6.350000,22.000000,0.130000)
   pt3dadd(98.629997,-6.750000,28.000000,0.130000)
   pt3dadd(106.599998,-8.220000,31.000000,0.130000)
   pt3dadd(118.809998,-9.680000,31.000000,0.130000)
   pt3dadd(126.519997,-9.680000,31.000000,0.130000)
   pt3dadd(135.679993,-11.420000,31.000000,0.130000)
   pt3dadd(142.320007,-10.880000,31.000000,0.130000)
   pt3dadd(142.190002,-10.620000,31.000000,0.130000)
   pt3dadd(149.360001,-10.620000,31.000000,0.130000)
   pt3dadd(149.220001,-10.620000,31.000000,0.130000)
   pt3dadd(159.850006,-12.350000,41.000000,0.130000)
   pt3dadd(167.550003,-15.150000,41.000000,0.130000)
   }
dendrite[48] {
   pt3dclear()
   pt3dadd(167.550003,-15.150000,41.000000,0.130000)
   pt3dadd(175.779999,-19.080000,41.000000,0.130000)
   pt3dadd(180.169998,-24.400000,41.000000,0.130000)
   }
dendrite[49] {
   pt3dclear()
   pt3dadd(167.550003,-15.150000,41.000000,0.130000)
   pt3dadd(174.850006,-14.410000,41.000000,0.130000)
   pt3dadd(182.559998,-12.950000,41.000000,0.130000)
   pt3dadd(188.669998,-8.150000,41.000000,0.130000)
   pt3dadd(191.320007,-3.360000,41.000000,0.130000)
   pt3dadd(191.190002,-3.360000,41.000000,0.130000)
   }
dendrite[50] {
   pt3dclear()
   pt3dadd(73.309998,-4.120000,7.000000,0.400000)
   pt3dadd(73.580002,4.000000,14.000000,0.400000)
   pt3dadd(74.510002,12.930000,0.000000,0.400000)
   pt3dadd(71.580002,22.920000,0.000000,0.400000)
   pt3dadd(66.010002,30.110001,-1.000000,0.400000)
   pt3dadd(63.349998,38.639999,-2.000000,0.400000)
   pt3dadd(62.820000,46.099998,-2.000000,0.400000)
   pt3dadd(62.950001,46.230000,-2.000000,0.400000)
   pt3dadd(65.739998,48.759998,-2.000000,0.400000)
   pt3dadd(66.010002,48.759998,-2.000000,0.400000)
   pt3dadd(71.180000,49.660000,-2.000000,0.400000)
   pt3dadd(75.129997,51.619999,2.000000,0.400000)
   pt3dadd(76.760002,56.320000,2.000000,0.400000)
   pt3dadd(79.379997,60.740002,2.000000,0.400000)
   pt3dadd(79.379997,62.209999,2.000000,0.400000)
   pt3dadd(79.910004,70.070000,2.000000,0.400000)
   }
dendrite[51] {
   pt3dclear()
   pt3dadd(4.600000,-6.800000,39.000000,0.930000)
   pt3dadd(4.600000,-6.930000,39.000000,0.930000)
   pt3dadd(7.250000,-8.400000,39.000000,0.930000)
   }
dendrite[52] {
   pt3dclear()
   pt3dadd(7.250000,-8.400000,39.000000,0.930000)
   pt3dadd(9.510000,-9.730000,45.000000,0.930000)
   pt3dadd(11.370000,-11.330000,48.000000,0.930000)
   pt3dadd(16.950001,-13.330000,56.000000,0.530000)
   pt3dadd(16.950001,-13.460000,56.000000,0.530000)
   pt3dadd(24.040001,-12.150000,56.000000,0.530000)
   pt3dadd(31.820000,-11.860000,65.000000,0.530000)
   pt3dadd(38.060001,-14.530000,65.000000,0.530000)
   pt3dadd(42.459999,-11.940000,71.000000,0.530000)
   pt3dadd(48.169998,-8.010000,78.000000,0.530000)
   pt3dadd(54.049999,-8.820000,78.000000,0.530000)
   pt3dadd(59.730000,-8.810000,81.000000,0.270000)
   }
dendrite[53] {
   pt3dclear()
   pt3dadd(7.250000,-8.400000,39.000000,0.930000)
   pt3dadd(8.580000,-10.930000,28.000000,0.400000)
   pt3dadd(8.320000,-14.530000,31.000000,0.400000)
   pt3dadd(8.320000,-14.660000,31.000000,0.400000)
   pt3dadd(18.139999,-18.120001,40.000000,0.400000)
   pt3dadd(26.030001,-17.750000,40.000000,0.400000)
   pt3dadd(32.490002,-18.260000,31.000000,0.400000)
   }
dendrite[54] {
   pt3dclear()
   pt3dadd(7.250000,-8.400000,39.000000,0.930000)
   pt3dadd(14.290000,-7.730000,39.000000,0.400000)
   pt3dadd(20.139999,3.860000,39.000000,0.400000)
   }
spine[0] {
   pt3dclear()
   }
spine[1] {
   pt3dclear()
   }
   
   }

objref all, Prox_Dend, Mid_Dend, Dist_Dend


proc subsets() { local i
  objref all, Prox_Dend, Mid_Dend, Dist_Dend
  all = new SectionList()
    soma all.append()
    for i=0, 54 dendrite[i] all.append()
	for i=0, 1 spine[i] all.append()
	
	
//*******************prox*******************
  Prox_Dend = new SectionList()
dendrite[0] Prox_Dend.append()
dendrite[24] Prox_Dend.append()
dendrite[25] Prox_Dend.append()
dendrite[28] Prox_Dend.append()
dendrite[33] Prox_Dend.append()
dendrite[34] Prox_Dend.append()
dendrite[51] Prox_Dend.append()

//dendrite[1] Prox_Dend.append()
//dendrite[14] Prox_Dend.append()
//dendrite[26] Prox_Dend.append()
//dendrite[27] Prox_Dend.append()
//dendrite[29] Prox_Dend.append()
//dendrite[32] Prox_Dend.append()
//dendrite[35] Prox_Dend.append()
//dendrite[42] Prox_Dend.append()
//dendrite[52] Prox_Dend.append()
//dendrite[53] Prox_Dend.append()
//dendrite[54] Prox_Dend.append()
//*******************Mid*******************
  Mid_Dend = new SectionList()
dendrite[1] Mid_Dend.append()
dendrite[14] Mid_Dend.append()
dendrite[26] Mid_Dend.append()
dendrite[27] Mid_Dend.append()
dendrite[29] Mid_Dend.append()
dendrite[32] Mid_Dend.append()
dendrite[35] Mid_Dend.append()
dendrite[42] Mid_Dend.append()
dendrite[52] Mid_Dend.append()
dendrite[53] Mid_Dend.append()
dendrite[54] Mid_Dend.append()
//***
dendrite[2] Mid_Dend.append()
dendrite[9] Mid_Dend.append()
dendrite[15] Mid_Dend.append()
dendrite[18] Mid_Dend.append()
dendrite[23] Mid_Dend.append()
dendrite[30] Mid_Dend.append()
dendrite[31] Mid_Dend.append()
dendrite[36] Mid_Dend.append()
dendrite[39] Mid_Dend.append()
dendrite[43] Mid_Dend.append()
dendrite[44] Mid_Dend.append()
//*******************Dist*******************
  Dist_Dend = new SectionList()
dendrite[3] Dist_Dend.append()
dendrite[8] Dist_Dend.append()
dendrite[10] Dist_Dend.append()
dendrite[11] Dist_Dend.append()
dendrite[16] Dist_Dend.append()
dendrite[17] Dist_Dend.append()
dendrite[19] Dist_Dend.append()
dendrite[20] Dist_Dend.append()
dendrite[37] Dist_Dend.append()
dendrite[38] Dist_Dend.append()
dendrite[40] Dist_Dend.append()
dendrite[41] Dist_Dend.append()
dendrite[45] Dist_Dend.append()
dendrite[50] Dist_Dend.append()
//***
dendrite[4] Dist_Dend.append()
dendrite[7] Dist_Dend.append()
dendrite[12] Dist_Dend.append()
dendrite[13] Dist_Dend.append()
dendrite[21] Dist_Dend.append()
dendrite[22] Dist_Dend.append()
dendrite[46] Dist_Dend.append()
dendrite[47] Dist_Dend.append()
//**
dendrite[5] Dist_Dend.append()
dendrite[6] Dist_Dend.append()
dendrite[48] Dist_Dend.append()
dendrite[49] Dist_Dend.append()

}

// Wilson 1992 Single Neuron Computation
// dendritic diam(um) * (1+spine/dend ratio)
// also O'Donnell 1993 Synapse
// Koch/Segev Methods in Neuronal Modeling pg 122-3, 1998
proc geom() {
//  forsec Prox_Dend { L = 20     diam = 2.25 }	
//  forsec Mid_Dend  {L = 24.23	diam = 1.10}	// { L = 20		diam = 1 * (1+0.3) }	
//  forsec Dist_Dend {L = 395.2	diam = 0.72}	// { L = 190	diam = 0.5 * (1+2) } 
  soma {  L = 16  diam = 16  }
}



//**********
// use d_lambda function (see neuron website) to assign segments/nodes

func lambda_f() { local i, x1, x2, d1, d2, lam
        if (n3d() < 2) {
                return 1e5*sqrt(diam/(4*PI*$1*Ra*cm))
        }
		// above was too inaccurate with large variation in 3d diameter
		// so now we use all 3-d points to get a better approximate lambda

        x1 = arc3d(0)
        d1 = diam3d(0)
        lam = 0
        for i=1, n3d()-1 {
                x2 = arc3d(i)
                d2 = diam3d(i)
                lam += (x2 - x1)/sqrt(d1 + d2)
                x1 = x2   d1 = d2
        }

        //  length of the section in units of lambda
        lam *= sqrt(2) * 1e-5*sqrt(4*PI*$1*Ra*cm)

        return L/lam
}

proc geom_nseg() {
	freq = 100      // Hz, frequency at which AC length constant will be computed
	d_lambda = 0.15

	forall { nseg = int((L/(d_lambda*lambda_f(freq))+0.9)/2)*2 + 1  }


}
//**********



proc biophys() {
  
  forsec Prox_Dend {
	insert pas

	insert naf
	insert nap

	insert kir
	insert kas
	insert kaf
	insert bkkca
	insert skkca

	insert caldyn
	insert caL
	insert caL13

	insert cadyn
	insert can
	insert caq
	insert car
	insert cat

	//insert er
  }

  forsec Mid_Dend {
	insert pas

	insert naf
	insert nap

	insert kir
	insert kas
	insert kaf
	insert bkkca
	insert skkca

	insert caldyn
	insert caL
   	insert caL13

	insert cadyn
	insert can
	insert caq
	insert car
	insert cat
	
	//insert DR
	//insert er
}

  forsec Dist_Dend {
	insert pas

	insert naf
	insert nap

	insert kir
	insert kas
	insert kaf
	insert bkkca
	insert skkca

	insert caldyn
	insert caL
  	insert caL13

	insert cadyn
	insert can
	insert caq
	insert car
	insert cat
	
	//insert er
  }

  soma {
	insert pas

	insert naf
	insert nap

	insert kir
	insert kas
	insert kaf
	insert krp
	insert bkkca
	insert skkca
	
	insert caldyn
	insert caL
	insert caL13

	insert cadyn
	insert can
	insert caq
	insert car	
	insert cat
	
//insert er
 
 }



forsec "spine"{
	insert pas

	insert naf
	insert nap

	insert kir
	insert kas
	insert kaf
	insert bkkca
	insert skkca

	insert caldyn
	insert caL
	insert caL13

	insert cadyn
	insert can
	insert caq
	insert car
	insert cat	
	
	
	nseg=1
	diam=1
	L=1.273
	}
}






proc position() { local i
  soma for i = 0, n3d()-1 {
    pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
  }
  x = $1  y = $2  z = $3
}

proc connect2target() { //$o1 target point process, $o2 returned NetCon
  soma $o2 = new NetCon(&v(1), $o1)
}

func is_art() { return 0 }



proc synloops() {
	//***************************
	//Build AMPA synapses
	// Inner dends AMPA
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[0] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[24] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[25] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[28] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[33] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[34] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[51] ampa[i] = new AMPAt(0.5)    synlist.append(ampa[i]) 
	}
	
	//Second level dends
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[1] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[14] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[26] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[27] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[29] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[32] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[35] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[42] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[52] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[53] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[54] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	
	
	
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[2] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[9] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[15] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[18] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[23] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[30] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[31] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[36] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[39] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[43] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[44] ampa[i] = new AMPAt(onode)  synlist.append(ampa[i]) 
	}
	
	//Outer_level Dends
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[3] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[8] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[10] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[11] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[16] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[17] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[19] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[20] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[37] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[38] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[40] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[41] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[45] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[50] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
				
				
				
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[4] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[7] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[12] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[13] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[21] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[22] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[46] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[47] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}



	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[5] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[6] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[48] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[49] ampa[i] = new AMPAt(onode)   synlist.append(ampa[i]) 
	}

	for i = 0, 0  {				// 4 in each distal dend
		spine[0] ampa[i] = new AMPAt(0.5)   synlist.append(ampa[i]) 
	}
	for i = 0, 0  {				// 4 in each distal dend
		spine[1] ampa[i] = new AMPAt(0.5)   synlist.append(ampa[i]) 
	}

	
	synloopsNMDA()	
	}
	//***************************
	
	
	
	proc synloopsNMDA(){
	//***************************
	//Build NMDA synapses
	// Inner dends NMDA
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[0] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[24] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[25] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[28] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[33] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[34] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[51] nmda[i] = new NMDAt(0.5)    synlist.append(nmda[i]) 
	}
	
	//Second level dends
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[1] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[14] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[26] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[27] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[29] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[32] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[35] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[42] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[52] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[53] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[54] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}


	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[2] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[9] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[15] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[18] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[23] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[30] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[31] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[36] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[39] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[43] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[44] nmda[i] = new NMDAt(onode)  synlist.append(nmda[i]) 
	}
	
	//Outer_level Dends
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[3] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[8] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[10] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[11] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[16] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[17] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[19] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[20] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[37] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[38] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[40] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[41] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[45] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[50] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	
	
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[4] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[7] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[12] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[13] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[21] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[22] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[46] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[47] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	
	
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[5] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[6] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[48] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[49] nmda[i] = new NMDAt(onode)   synlist.append(nmda[i]) 
	}
	
	
	for i = 0, 0  {				// 1 in each distal dend
		spine[0] nmda[i] = new NMDAt(0.5)   synlist.append(nmda[i]) 
	}
	for i = 0, 0  {				// 1 in each distal dend
		spine[1] nmda[i] = new NMDAt(0.5)   synlist.append(nmda[i]) 
	}

	//***************************
	synloopsMGLU()
	}
	
	
	proc synloopsMGLU() {
		//***************************
	//Build MGLU synapses
	// Inner dends MGLU
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[0] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[24] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[25] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[28] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[33] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[34] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[51] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	
	//Second level dends
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[1] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[14] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[26] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[27] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[29] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[32] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[35] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[42] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[52] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[53] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[54] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	
	
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[2] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[9] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			//dendrite[15] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[18] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[23] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[30] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[31] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[36] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[39] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[43] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[44] mglu[i] = new MGLUt(onode)  synlist.append(mglu[i]) 
	}
	
	//Outer_level dends
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[3] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[8] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[10] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[11] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[16] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[17] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[19] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[20] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[37] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[38] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[40] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[41] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[45] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[50] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}


	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[4] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[7] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[12] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[13] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[21] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[22] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[46] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[47] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}


	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[5] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[6] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[48] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[49] mglu[i] = new MGLUt(onode)   synlist.append(mglu[i]) 
	}
	
	for i = 0, 1  {		// 0 in soma, 1 in each prox dend
			spine[0] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	for i = 0, 1  {		// 0 in soma, 1 in each prox dend
			spine[1] mglu[i] = new MGLUt(0.5)    synlist.append(mglu[i]) 
	}
	
	//***************************
	synloopsGABA()
	}
	
	proc synloopsGABA() {
	
	//***************************
	//Build GABA synapses
	// soma GABA
	for i = 0, 15 {		// 16 in soma
			soma gaba[i] = new GABAt(0.5) 	synlist.append(gaba[i])
	}
	
	// Inner dends GABA
		for i = 0, 2  {	// 3 each
			dendrite[0] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[24] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[25] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[28] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[33] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[34] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
		for i = 0, 2  {	// 3 each
			dendrite[51] gaba[i] = new GABAt(0.5)    synlist.append(gaba[i]) 
		}
	
	//Second level dends
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[1] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[14] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[26] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[27] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[29] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[32] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[35] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[42] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[52] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[53] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[54] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	
	
	
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[2] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[9] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[15] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[18] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[23] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[30] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[31] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[36] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[39] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[43] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	for i = 0, 2  {				// 2 in each mid dend
			dendrite[44] gaba[i] = new GABAt(0.5)  synlist.append(gaba[i]) 
	}
	
	//Outer_level Dends
	for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[3] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[8] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[10] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[11] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[16] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[17] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[19] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[20] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[37] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[38] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[40] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[41] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[45] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[50] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}


		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[4] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[7] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[12] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[13] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[21] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[22] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[46] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[47] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}


		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[5] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[6] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[48] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
		for i = 0, 1  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[49] gaba[i] = new GABAt(onode)   synlist.append(gaba[i]) 
	}
	
		for i = 0, 0  {				// 4 in each distal dend
			spine[0] gaba[i] = new GABAt(0.5)   synlist.append(gaba[i]) 
		}
		for i = 0, 0  {				// 4 in each distal dend
			spine[1] gaba[i] = new GABAt(0.5)   synlist.append(gaba[i]) 
	}

	//**************************
		synloopsDR()
}	// end synloops()


	proc synloopsDR() {
		//***************************
	//Build DR synapses
	// Inner dends DR
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[0] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
//			setpointer dendrite[0].mu_caL(0.5),DAsyn[0].msg
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[24] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[25] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[28] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[33] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[34] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	for i = 0, 0  {		// 0 in soma, 1 in each prox dend
			dendrite[51] dr[i] = new DRt(0.5)    synlist.append(dr[i]) 
	}
	
	//Second level dends
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[1] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[14] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[26] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[27] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[29] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[32] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[35] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[42] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[52] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[53] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[54] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	
	
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[2] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[9] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			//dendrite[15] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[18] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[23] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[30] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[31] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[36] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[39] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[43] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	for i = 0, 1  {				// 2 in each mid dend
			onode = (i+1)/3		// 0.33, 0.66
			dendrite[44] dr[i] = new DRt(onode)  synlist.append(dr[i]) 
	}
	
	//Outer_level dends
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[3] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[8] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[10] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[11] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[16] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[17] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[19] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[20] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[37] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[38] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[40] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[41] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[45] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[50] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}


	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[4] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[7] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[12] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[13] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[21] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[22] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[46] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[47] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}


	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[5] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[6] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[48] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}
	for i = 0, 3  {				// 4 in each distal dend
			onode = (i+1)/5		// 0.2, 0.4, 0.6, 0.8
			dendrite[49] dr[i] = new DRt(onode)   synlist.append(dr[i]) 
	}

		for i = 0, 1  {				// 4 in each distal dend
			spine[0] dr[i] = new DRt(0.5)   synlist.append(dr[i]) 
		}
		for i = 0, 1  {				// 4 in each distal dend
			spine[1] dr[i] = new DRt(0.5)   synlist.append(dr[i]) 
	}
	//***************************
	}


endtemplate MSP_Cell

//**************************************************************************