// Trying to open ../diagnostic/tstop.dat
 // new end time timtot =   150.
 // Trying to open ../diagnostic/dt_F.dat
 // new dt =  0.002
 // COMPART. LEVEL  RADIUS  LENGTH(MU)
 //   1      1    10.00   42.0
 //   2      2     0.73   20.0
 //   3      3     0.58   57.5
 //   4      3     0.58   57.5
 //   5      3     0.58   57.5
 //   6      4     0.44   57.5
 //   7      4     0.44   57.5
 //   8      4     0.44   57.5
 //   9      4     0.44   57.5
 //  10      4     0.44   57.5
 //  11      4     0.44   57.5
 //  12      4     0.44   57.5
 //  13      4     0.44   57.5
 //  14      4     0.44   57.5
 //  15      2     0.73   20.0
 //  16      3     0.58   57.5
 //  17      3     0.58   57.5
 //  18      3     0.58   57.5
 //  19      4     0.44   57.5
 //  20      4     0.44   57.5
 //  21      4     0.44   57.5
 //  22      4     0.44   57.5
 //  23      4     0.44   57.5
 //  24      4     0.44   57.5
 //  25      4     0.44   57.5
 //  26      4     0.44   57.5
 //  27      4     0.44   57.5
 //  28      2     0.73   20.0
 //  29      3     0.58   57.5
 //  30      3     0.58   57.5
 //  31      3     0.58   57.5
 //  32      4     0.44   57.5
 //  33      4     0.44   57.5
 //  34      4     0.44   57.5
 //  35      4     0.44   57.5
 //  36      4     0.44   57.5
 //  37      4     0.44   57.5
 //  38      4     0.44   57.5
 //  39      4     0.44   57.5
 //  40      4     0.44   57.5
 //  41      2     0.73   20.0
 //  42      3     0.58   57.5
 //  43      3     0.58   57.5
 //  44      3     0.58   57.5
 //  45      4     0.44   57.5
 //  46      4     0.44   57.5
 //  47      4     0.44   57.5
 //  48      4     0.44   57.5
 //  49      4     0.44   57.5
 //  50      4     0.44   57.5
 //  51      4     0.44   57.5
 //  52      4     0.44   57.5
 //  53      4     0.44   57.5
 //  54      2     0.73   20.0
 //  55      3     0.58   57.5
 //  56      3     0.58   57.5
 //  57      3     0.58   57.5
 //  58      4     0.44   57.5
 //  59      4     0.44   57.5
 //  60      4     0.44   57.5
 //  61      4     0.44   57.5
 //  62      4     0.44   57.5
 //  63      4     0.44   57.5
 //  64      4     0.44   57.5
 //  65      4     0.44   57.5
 //  66      4     0.44   57.5
 //  67      2     0.73   20.0
 //  68      3     0.58   57.5
 //  69      3     0.58   57.5
 //  70      3     0.58   57.5
 //  71      4     0.44   57.5
 //  72      4     0.44   57.5
 //  73      4     0.44   57.5
 //  74      4     0.44   57.5
 //  75      4     0.44   57.5
 //  76      4     0.44   57.5
 //  77      4     0.44   57.5
 //  78      4     0.44   57.5
 //  79      4     0.44   57.5
 //  80      2     0.73   20.0
 //  81      3     0.58   57.5
 //  82      3     0.58   57.5
 //  83      3     0.58   57.5
 //  84      4     0.44   57.5
 //  85      4     0.44   57.5
 //  86      4     0.44   57.5
 //  87      4     0.44   57.5
 //  88      4     0.44   57.5
 //  89      4     0.44   57.5
 //  90      4     0.44   57.5
 //  91      4     0.44   57.5
 //  92      4     0.44   57.5
 //  93      2     0.73   20.0
 //  94      3     0.58   57.5
 //  95      3     0.58   57.5
 //  96      3     0.58   57.5
 //  97      4     0.44   57.5
 //  98      4     0.44   57.5
 //  99      4     0.44   57.5
 // 100      4     0.44   57.5
 // 101      4     0.44   57.5
 // 102      4     0.44   57.5
 // 103      4     0.44   57.5
 // 104      4     0.44   57.5
 // 105      4     0.44   57.5
 // 106      2     0.73   20.0
 // 107      3     0.58   57.5
 // 108      3     0.58   57.5
 // 109      3     0.58   57.5
 // 110      4     0.44   57.5
 // 111      4     0.44   57.5
 // 112      4     0.44   57.5
 // 113      4     0.44   57.5
 // 114      4     0.44   57.5
 // 115      4     0.44   57.5
 // 116      4     0.44   57.5
 // 117      4     0.44   57.5
 // 118      4     0.44   57.5
 // 119      2     0.73   20.0
 // 120      3     0.58   57.5
 // 121      3     0.58   57.5
 // 122      3     0.58   57.5
 // 123      4     0.44   57.5
 // 124      4     0.44   57.5
 // 125      4     0.44   57.5
 // 126      4     0.44   57.5
 // 127      4     0.44   57.5
 // 128      4     0.44   57.5
 // 129      4     0.44   57.5
 // 130      4     0.44   57.5
 // 131      4     0.44   57.5
 // 132      0     0.80   50.0
 // 133      0     0.70   50.0
 // 134      0     0.50   50.0
 // 135      0     0.50   50.0
 // 136      0     0.50   50.0
 // 137      0     0.50   50.0
 // Comp1  Comp2  Conductance_between_1_2   
 //  1   132    0.0796751205
 //  1   2    0.0946071642
 //  1   15    0.0946071642
 //  1   28    0.0946071642
 //  1   41    0.0946071642
 //  1   54    0.0946071642
 //  1   67    0.0946071642
 //  1   80    0.0946071642
 //  1   93    0.0946071642
 //  1   106    0.0946071642
 //  1   119    0.0946071642
 //  2   3    0.0174185429
 //  2   4    0.0174185429
 //  2   5    0.0174185429
 //  3   6    0.00766658232
 //  3   7    0.00766658232
 //  3   8    0.00766658232
 //  4   9    0.00766658232
 //  4   10    0.00766658232
 //  4   11    0.00766658232
 //  5   12    0.00766658232
 //  5   13    0.00766658232
 //  5   14    0.00766658232
 //  6   7    0.00598951744
 //  6   8    0.00598951744
 //  7   8    0.00598951744
 //  9   10    0.00598951744
 //  9   11    0.00598951744
 //  10   11    0.00598951744
 //  12   13    0.00598951744
 //  12   14    0.00598951744
 //  13   14    0.00598951744
 //  15   16    0.0174185429
 //  15   17    0.0174185429
 //  15   18    0.0174185429
 //  16   19    0.00766658232
 //  16   20    0.00766658232
 //  16   21    0.00766658232
 //  17   22    0.00766658232
 //  17   23    0.00766658232
 //  17   24    0.00766658232
 //  18   25    0.00766658232
 //  18   26    0.00766658232
 //  18   27    0.00766658232
 //  19   20    0.00598951744
 //  19   21    0.00598951744
 //  20   21    0.00598951744
 //  22   23    0.00598951744
 //  22   24    0.00598951744
 //  23   24    0.00598951744
 //  25   26    0.00598951744
 //  25   27    0.00598951744
 //  26   27    0.00598951744
 //  28   29    0.0174185429
 //  28   30    0.0174185429
 //  28   31    0.0174185429
 //  29   32    0.00766658232
 //  29   33    0.00766658232
 //  29   34    0.00766658232
 //  30   35    0.00766658232
 //  30   36    0.00766658232
 //  30   37    0.00766658232
 //  31   38    0.00766658232
 //  31   39    0.00766658232
 //  31   40    0.00766658232
 //  32   33    0.00598951744
 //  32   34    0.00598951744
 //  33   34    0.00598951744
 //  35   36    0.00598951744
 //  35   37    0.00598951744
 //  36   37    0.00598951744
 //  38   39    0.00598951744
 //  38   40    0.00598951744
 //  39   40    0.00598951744
 //  41   42    0.0174185429
 //  41   43    0.0174185429
 //  41   44    0.0174185429
 //  42   45    0.00766658232
 //  42   46    0.00766658232
 //  42   47    0.00766658232
 //  43   48    0.00766658232
 //  43   49    0.00766658232
 //  43   50    0.00766658232
 //  44   51    0.00766658232
 //  44   52    0.00766658232
 //  44   53    0.00766658232
 //  45   46    0.00598951744
 //  45   47    0.00598951744
 //  46   47    0.00598951744
 //  48   49    0.00598951744
 //  48   50    0.00598951744
 //  49   50    0.00598951744
 //  51   52    0.00598951744
 //  51   53    0.00598951744
 //  52   53    0.00598951744
 //  54   55    0.0174185429
 //  54   56    0.0174185429
 //  54   57    0.0174185429
 //  55   58    0.00766658232
 //  55   59    0.00766658232
 //  55   60    0.00766658232
 //  56   61    0.00766658232
 //  56   62    0.00766658232
 //  56   63    0.00766658232
 //  57   64    0.00766658232
 //  57   65    0.00766658232
 //  57   66    0.00766658232
 //  58   59    0.00598951744
 //  58   60    0.00598951744
 //  59   60    0.00598951744
 //  61   62    0.00598951744
 //  61   63    0.00598951744
 //  62   63    0.00598951744
 //  64   65    0.00598951744
 //  64   66    0.00598951744
 //  65   66    0.00598951744
 //  67   68    0.0174185429
 //  67   69    0.0174185429
 //  67   70    0.0174185429
 //  68   71    0.00766658232
 //  68   72    0.00766658232
 //  68   73    0.00766658232
 //  69   74    0.00766658232
 //  69   75    0.00766658232
 //  69   76    0.00766658232
 //  70   77    0.00766658232
 //  70   78    0.00766658232
 //  70   79    0.00766658232
 //  71   72    0.00598951744
 //  71   73    0.00598951744
 //  72   73    0.00598951744
 //  74   75    0.00598951744
 //  74   76    0.00598951744
 //  75   76    0.00598951744
 //  77   78    0.00598951744
 //  77   79    0.00598951744
 //  78   79    0.00598951744
 //  80   81    0.0174185429
 //  80   82    0.0174185429
 //  80   83    0.0174185429
 //  81   84    0.00766658232
 //  81   85    0.00766658232
 //  81   86    0.00766658232
 //  82   87    0.00766658232
 //  82   88    0.00766658232
 //  82   89    0.00766658232
 //  83   90    0.00766658232
 //  83   91    0.00766658232
 //  83   92    0.00766658232
 //  84   85    0.00598951744
 //  84   86    0.00598951744
 //  85   86    0.00598951744
 //  87   88    0.00598951744
 //  87   89    0.00598951744
 //  88   89    0.00598951744
 //  90   91    0.00598951744
 //  90   92    0.00598951744
 //  91   92    0.00598951744
 //  93   94    0.0174185429
 //  93   95    0.0174185429
 //  93   96    0.0174185429
 //  94   97    0.00766658232
 //  94   98    0.00766658232
 //  94   99    0.00766658232
 //  95   100    0.00766658232
 //  95   101    0.00766658232
 //  95   102    0.00766658232
 //  96   103    0.00766658232
 //  96   104    0.00766658232
 //  96   105    0.00766658232
 //  97   98    0.00598951744
 //  97   99    0.00598951744
 //  98   99    0.00598951744
 //  100   101    0.00598951744
 //  100   102    0.00598951744
 //  101   102    0.00598951744
 //  103   104    0.00598951744
 //  103   105    0.00598951744
 //  104   105    0.00598951744
 //  106   107    0.0174185429
 //  106   108    0.0174185429
 //  106   109    0.0174185429
 //  107   110    0.00766658232
 //  107   111    0.00766658232
 //  107   112    0.00766658232
 //  108   113    0.00766658232
 //  108   114    0.00766658232
 //  108   115    0.00766658232
 //  109   116    0.00766658232
 //  109   117    0.00766658232
 //  109   118    0.00766658232
 //  110   111    0.00598951744
 //  110   112    0.00598951744
 //  111   112    0.00598951744
 //  113   114    0.00598951744
 //  113   115    0.00598951744
 //  114   115    0.00598951744
 //  116   117    0.00598951744
 //  116   118    0.00598951744
 //  117   118    0.00598951744
 //  119   120    0.0174185429
 //  119   121    0.0174185429
 //  119   122    0.0174185429
 //  120   123    0.00766658232
 //  120   124    0.00766658232
 //  120   125    0.00766658232
 //  121   126    0.00766658232
 //  121   127    0.00766658232
 //  121   128    0.00766658232
 //  122   129    0.00766658232
 //  122   130    0.00766658232
 //  122   131    0.00766658232
 //  123   124    0.00598951744
 //  123   125    0.00598951744
 //  124   125    0.00598951744
 //  126   127    0.00598951744
 //  126   128    0.00598951744
 //  127   128    0.00598951744
 //  129   130    0.00598951744
 //  129   131    0.00598951744
 //  130   131    0.00598951744
 //  132   133    0.0348744292
 //  133   134    0.0208024203
 //  133   136    0.0208024203
 //  134   135    0.01570795
 //  134   136    0.01570795
 //  136   137    0.01570795
 /* TCR/TCR_template.hoc
 automatically written from f2nrn/neuron_code_writer.f
 via subroutines that were inserted into the fortran
 code e.g., TCR/integrate_TCR.hoc
 
 The template's form was derived by
 Tom Morse and Michael Hines
 from a template, pyr3_template created
 by Roger Traub and Maciej Lazarewicz when they ported
 
         Traub RD, Buhl EH, Gloveli T, Whittington MA.
 Fast Rhythmic Bursting Can Be Induced in Layer 2/3
 Cortical Neurons by Enhancing Persistent Na(+)
 Conductance or by Blocking BK Channels.J Neurophysiol.
 2003 Feb;89(2):909-21.
 
 to NEURON
 
 */
 
 begintemplate TCR
	public type
 
 // parts of the template were lifted from a default
 // cell writing from Network Builder NetGUI[0]
 
         public is_art
         public init, topol, basic_shape, subsets
         public geom, biophys 
         public synlist, x, y, z, position
         public connect2target
         public set_netcon_src_comp
         // the above function added to set neton
         // compartment source in the presyn cell
 
         public comp, level, Soma, Dendrites
         public Soma_Dendrites, Axon, all
         public presyn_comp, top_level
         // it is the responsibility of the calling
         // program to set the above presynapf_tcrtic
         // compartment number
 
         external traub_connect
         objref this
  create  comp[ 137+1]
         objref level[ 4+1], Soma, Dendrites
         objref Soma_Dendrites, Axon
         objref synlist
func type() {return       12 }

         proc init() {
           doubler = 1
  comp[0] delete_section() // clean up for fortran code
            traub_connect( 137+1)
 
            titlePrint()
 
            presyn_comp = 135
            // in Traub model;changed by calling prog.
            objref Soma, Axon, Dendrites, Soma_Dendrites
            objref level
 
            topol()
            shape()
 
            geom()        // the geometry and
            subsets()        // subsets and
            biophys()  // active currents
            synlist = new List() // list of synapses
 // NetGUI[0] stores synapses in the cell object, in 
 // Traub model it is easier to store them outside
            set_doubler() // to double or not
            if (doubler) {double_dend_cond()}
                          /* for taking
  spine membrane area correction into account (the 
  method used doubles max cond's when spines present)
 */
             more_adjustments()
         }
         proc double_dend_cond() {
         /* this function gets replaced later with 
 another one if double_dend_cond() is tacked on. */
         }
 
         proc titlePrint() {
 
 /*              print "
                 print "-----"
                 print "
             print "TCR Neuron Model based on "
             print "Traub RD et al (2005, 2003)"
                 print "
                 print "-----"
 Remove title printing with this comment for now.  
 Printing otherwise repeats (for each cell)
 -too voluminous for a network creation */
         }
 
         proc set_doubler() {doubler=1}
         // this function gets replaced with one that
         // sets doubler to 0 when there are no spines
         // in the cell (for no spines the additional
         // hoc code is written from integrate_cell.f
         // where cell is nRT, TCR.  Woops I just
         // found that deepaxax, deepbask, deepLTS,
         // supaxax, supbask, supLTS all use the script
         // cell/run_fortran.sh to replace the =1's with
         // =0's.  I will change the fortran code to
         // make it all run_fortran.sh replacements or
         // not for uniformity.
         proc topol() {
 // create comp[ 138] // note one greater than numcomp due to fortran indicies
  // last argument, parent location for connection
  // is overwritten to 1 for parents with connected children 
  // in below traub_connect proc calls
 traub_connect(this,  1,  132,   0.0796751205, 0)
 traub_connect(this,  1,  2,   0.0946071642, 1)
 traub_connect(this,  1,  15,   0.0946071642, 1)
 traub_connect(this,  1,  28,   0.0946071642, 1)
 traub_connect(this,  1,  41,   0.0946071642, 1)
 traub_connect(this,  1,  54,   0.0946071642, 1)
 traub_connect(this,  1,  67,   0.0946071642, 1)
 traub_connect(this,  1,  80,   0.0946071642, 1)
 traub_connect(this,  1,  93,   0.0946071642, 1)
 traub_connect(this,  1,  106,   0.0946071642, 1)
 traub_connect(this,  1,  119,   0.0946071642, 1)
 traub_connect(this,  2,  3,   0.0174185429,  1.)
 traub_connect(this,  2,  4,   0.0174185429,  1.)
 traub_connect(this,  2,  5,   0.0174185429,  1.)
 traub_connect(this,  3,  6,   0.00766658232, 1)
 traub_connect(this,  3,  7,   0.00766658232, 1)
 traub_connect(this,  3,  8,   0.00766658232, 1)
 traub_connect(this,  4,  9,   0.00766658232, 1)
 traub_connect(this,  4,  10,   0.00766658232, 1)
 traub_connect(this,  4,  11,   0.00766658232, 1)
 traub_connect(this,  5,  12,   0.00766658232, 1)
 traub_connect(this,  5,  13,   0.00766658232, 1)
 traub_connect(this,  5,  14,   0.00766658232, 1)
 traub_connect(this,  6,  7,   0.00598951744, 1)
 traub_connect(this,  6,  8,   0.00598951744, 1)
 traub_connect(this,  7,  8,   0.00598951744, 1)
 traub_connect(this,  9,  10,   0.00598951744, 1)
 traub_connect(this,  9,  11,   0.00598951744, 1)
 traub_connect(this,  10,  11,   0.00598951744, 1)
 traub_connect(this,  12,  13,   0.00598951744, 1)
 traub_connect(this,  12,  14,   0.00598951744, 1)
 traub_connect(this,  13,  14,   0.00598951744, 1)
 traub_connect(this,  15,  16,   0.0174185429,  1.)
 traub_connect(this,  15,  17,   0.0174185429,  1.)
 traub_connect(this,  15,  18,   0.0174185429,  1.)
 traub_connect(this,  16,  19,   0.00766658232, 1)
 traub_connect(this,  16,  20,   0.00766658232, 1)
 traub_connect(this,  16,  21,   0.00766658232, 1)
 traub_connect(this,  17,  22,   0.00766658232, 1)
 traub_connect(this,  17,  23,   0.00766658232, 1)
 traub_connect(this,  17,  24,   0.00766658232, 1)
 traub_connect(this,  18,  25,   0.00766658232, 1)
 traub_connect(this,  18,  26,   0.00766658232, 1)
 traub_connect(this,  18,  27,   0.00766658232, 1)
 traub_connect(this,  19,  20,   0.00598951744, 1)
 traub_connect(this,  19,  21,   0.00598951744, 1)
 traub_connect(this,  20,  21,   0.00598951744, 1)
 traub_connect(this,  22,  23,   0.00598951744, 1)
 traub_connect(this,  22,  24,   0.00598951744, 1)
 traub_connect(this,  23,  24,   0.00598951744, 1)
 traub_connect(this,  25,  26,   0.00598951744, 1)
 traub_connect(this,  25,  27,   0.00598951744, 1)
 traub_connect(this,  26,  27,   0.00598951744, 1)
 traub_connect(this,  28,  29,   0.0174185429,  1.)
 traub_connect(this,  28,  30,   0.0174185429,  1.)
 traub_connect(this,  28,  31,   0.0174185429,  1.)
 traub_connect(this,  29,  32,   0.00766658232, 1)
 traub_connect(this,  29,  33,   0.00766658232, 1)
 traub_connect(this,  29,  34,   0.00766658232, 1)
 traub_connect(this,  30,  35,   0.00766658232, 1)
 traub_connect(this,  30,  36,   0.00766658232, 1)
 traub_connect(this,  30,  37,   0.00766658232, 1)
 traub_connect(this,  31,  38,   0.00766658232, 1)
 traub_connect(this,  31,  39,   0.00766658232, 1)
 traub_connect(this,  31,  40,   0.00766658232, 1)
 traub_connect(this,  32,  33,   0.00598951744, 1)
 traub_connect(this,  32,  34,   0.00598951744, 1)
 traub_connect(this,  33,  34,   0.00598951744, 1)
 traub_connect(this,  35,  36,   0.00598951744, 1)
 traub_connect(this,  35,  37,   0.00598951744, 1)
 traub_connect(this,  36,  37,   0.00598951744, 1)
 traub_connect(this,  38,  39,   0.00598951744, 1)
 traub_connect(this,  38,  40,   0.00598951744, 1)
 traub_connect(this,  39,  40,   0.00598951744, 1)
 traub_connect(this,  41,  42,   0.0174185429,  1.)
 traub_connect(this,  41,  43,   0.0174185429,  1.)
 traub_connect(this,  41,  44,   0.0174185429,  1.)
 traub_connect(this,  42,  45,   0.00766658232, 1)
 traub_connect(this,  42,  46,   0.00766658232, 1)
 traub_connect(this,  42,  47,   0.00766658232, 1)
 traub_connect(this,  43,  48,   0.00766658232, 1)
 traub_connect(this,  43,  49,   0.00766658232, 1)
 traub_connect(this,  43,  50,   0.00766658232, 1)
 traub_connect(this,  44,  51,   0.00766658232, 1)
 traub_connect(this,  44,  52,   0.00766658232, 1)
 traub_connect(this,  44,  53,   0.00766658232, 1)
 traub_connect(this,  45,  46,   0.00598951744, 1)
 traub_connect(this,  45,  47,   0.00598951744, 1)
 traub_connect(this,  46,  47,   0.00598951744, 1)
 traub_connect(this,  48,  49,   0.00598951744, 1)
 traub_connect(this,  48,  50,   0.00598951744, 1)
 traub_connect(this,  49,  50,   0.00598951744, 1)
 traub_connect(this,  51,  52,   0.00598951744, 1)
 traub_connect(this,  51,  53,   0.00598951744, 1)
 traub_connect(this,  52,  53,   0.00598951744, 1)
 traub_connect(this,  54,  55,   0.0174185429,  1.)
 traub_connect(this,  54,  56,   0.0174185429,  1.)
 traub_connect(this,  54,  57,   0.0174185429,  1.)
 traub_connect(this,  55,  58,   0.00766658232, 1)
 traub_connect(this,  55,  59,   0.00766658232, 1)
 traub_connect(this,  55,  60,   0.00766658232, 1)
 traub_connect(this,  56,  61,   0.00766658232, 1)
 traub_connect(this,  56,  62,   0.00766658232, 1)
 traub_connect(this,  56,  63,   0.00766658232, 1)
 traub_connect(this,  57,  64,   0.00766658232, 1)
 traub_connect(this,  57,  65,   0.00766658232, 1)
 traub_connect(this,  57,  66,   0.00766658232, 1)
 traub_connect(this,  58,  59,   0.00598951744, 1)
 traub_connect(this,  58,  60,   0.00598951744, 1)
 traub_connect(this,  59,  60,   0.00598951744, 1)
 traub_connect(this,  61,  62,   0.00598951744, 1)
 traub_connect(this,  61,  63,   0.00598951744, 1)
 traub_connect(this,  62,  63,   0.00598951744, 1)
 traub_connect(this,  64,  65,   0.00598951744, 1)
 traub_connect(this,  64,  66,   0.00598951744, 1)
 traub_connect(this,  65,  66,   0.00598951744, 1)
 traub_connect(this,  67,  68,   0.0174185429,  1.)
 traub_connect(this,  67,  69,   0.0174185429,  1.)
 traub_connect(this,  67,  70,   0.0174185429,  1.)
 traub_connect(this,  68,  71,   0.00766658232, 1)
 traub_connect(this,  68,  72,   0.00766658232, 1)
 traub_connect(this,  68,  73,   0.00766658232, 1)
 traub_connect(this,  69,  74,   0.00766658232, 1)
 traub_connect(this,  69,  75,   0.00766658232, 1)
 traub_connect(this,  69,  76,   0.00766658232, 1)
 traub_connect(this,  70,  77,   0.00766658232, 1)
 traub_connect(this,  70,  78,   0.00766658232, 1)
 traub_connect(this,  70,  79,   0.00766658232, 1)
 traub_connect(this,  71,  72,   0.00598951744, 1)
 traub_connect(this,  71,  73,   0.00598951744, 1)
 traub_connect(this,  72,  73,   0.00598951744, 1)
 traub_connect(this,  74,  75,   0.00598951744, 1)
 traub_connect(this,  74,  76,   0.00598951744, 1)
 traub_connect(this,  75,  76,   0.00598951744, 1)
 traub_connect(this,  77,  78,   0.00598951744, 1)
 traub_connect(this,  77,  79,   0.00598951744, 1)
 traub_connect(this,  78,  79,   0.00598951744, 1)
 traub_connect(this,  80,  81,   0.0174185429,  1.)
 traub_connect(this,  80,  82,   0.0174185429,  1.)
 traub_connect(this,  80,  83,   0.0174185429,  1.)
 traub_connect(this,  81,  84,   0.00766658232, 1)
 traub_connect(this,  81,  85,   0.00766658232, 1)
 traub_connect(this,  81,  86,   0.00766658232, 1)
 traub_connect(this,  82,  87,   0.00766658232, 1)
 traub_connect(this,  82,  88,   0.00766658232, 1)
 traub_connect(this,  82,  89,   0.00766658232, 1)
 traub_connect(this,  83,  90,   0.00766658232, 1)
 traub_connect(this,  83,  91,   0.00766658232, 1)
 traub_connect(this,  83,  92,   0.00766658232, 1)
 traub_connect(this,  84,  85,   0.00598951744, 1)
 traub_connect(this,  84,  86,   0.00598951744, 1)
 traub_connect(this,  85,  86,   0.00598951744, 1)
 traub_connect(this,  87,  88,   0.00598951744, 1)
 traub_connect(this,  87,  89,   0.00598951744, 1)
 traub_connect(this,  88,  89,   0.00598951744, 1)
 traub_connect(this,  90,  91,   0.00598951744, 1)
 traub_connect(this,  90,  92,   0.00598951744, 1)
 traub_connect(this,  91,  92,   0.00598951744, 1)
 traub_connect(this,  93,  94,   0.0174185429,  1.)
 traub_connect(this,  93,  95,   0.0174185429,  1.)
 traub_connect(this,  93,  96,   0.0174185429,  1.)
 traub_connect(this,  94,  97,   0.00766658232, 1)
 traub_connect(this,  94,  98,   0.00766658232, 1)
 traub_connect(this,  94,  99,   0.00766658232, 1)
 traub_connect(this,  95,  100,   0.00766658232, 1)
 traub_connect(this,  95,  101,   0.00766658232, 1)
 traub_connect(this,  95,  102,   0.00766658232, 1)
 traub_connect(this,  96,  103,   0.00766658232, 1)
 traub_connect(this,  96,  104,   0.00766658232, 1)
 traub_connect(this,  96,  105,   0.00766658232, 1)
 traub_connect(this,  97,  98,   0.00598951744, 1)
 traub_connect(this,  97,  99,   0.00598951744, 1)
 traub_connect(this,  98,  99,   0.00598951744, 1)
 traub_connect(this,  100,  101,   0.00598951744, 1)
 traub_connect(this,  100,  102,   0.00598951744, 1)
 traub_connect(this,  101,  102,   0.00598951744, 1)
 traub_connect(this,  103,  104,   0.00598951744, 1)
 traub_connect(this,  103,  105,   0.00598951744, 1)
 traub_connect(this,  104,  105,   0.00598951744, 1)
 traub_connect(this,  106,  107,   0.0174185429,  1.)
 traub_connect(this,  106,  108,   0.0174185429,  1.)
 traub_connect(this,  106,  109,   0.0174185429,  1.)
 traub_connect(this,  107,  110,   0.00766658232, 1)
 traub_connect(this,  107,  111,   0.00766658232, 1)
 traub_connect(this,  107,  112,   0.00766658232, 1)
 traub_connect(this,  108,  113,   0.00766658232, 1)
 traub_connect(this,  108,  114,   0.00766658232, 1)
 traub_connect(this,  108,  115,   0.00766658232, 1)
 traub_connect(this,  109,  116,   0.00766658232, 1)
 traub_connect(this,  109,  117,   0.00766658232, 1)
 traub_connect(this,  109,  118,   0.00766658232, 1)
 traub_connect(this,  110,  111,   0.00598951744, 1)
 traub_connect(this,  110,  112,   0.00598951744, 1)
 traub_connect(this,  111,  112,   0.00598951744, 1)
 traub_connect(this,  113,  114,   0.00598951744, 1)
 traub_connect(this,  113,  115,   0.00598951744, 1)
 traub_connect(this,  114,  115,   0.00598951744, 1)
 traub_connect(this,  116,  117,   0.00598951744, 1)
 traub_connect(this,  116,  118,   0.00598951744, 1)
 traub_connect(this,  117,  118,   0.00598951744, 1)
 traub_connect(this,  119,  120,   0.0174185429,  1.)
 traub_connect(this,  119,  121,   0.0174185429,  1.)
 traub_connect(this,  119,  122,   0.0174185429,  1.)
 traub_connect(this,  120,  123,   0.00766658232, 1)
 traub_connect(this,  120,  124,   0.00766658232, 1)
 traub_connect(this,  120,  125,   0.00766658232, 1)
 traub_connect(this,  121,  126,   0.00766658232, 1)
 traub_connect(this,  121,  127,   0.00766658232, 1)
 traub_connect(this,  121,  128,   0.00766658232, 1)
 traub_connect(this,  122,  129,   0.00766658232, 1)
 traub_connect(this,  122,  130,   0.00766658232, 1)
 traub_connect(this,  122,  131,   0.00766658232, 1)
 traub_connect(this,  123,  124,   0.00598951744, 1)
 traub_connect(this,  123,  125,   0.00598951744, 1)
 traub_connect(this,  124,  125,   0.00598951744, 1)
 traub_connect(this,  126,  127,   0.00598951744, 1)
 traub_connect(this,  126,  128,   0.00598951744, 1)
 traub_connect(this,  127,  128,   0.00598951744, 1)
 traub_connect(this,  129,  130,   0.00598951744, 1)
 traub_connect(this,  129,  131,   0.00598951744, 1)
 traub_connect(this,  130,  131,   0.00598951744, 1)
 traub_connect(this,  132,  133,   0.0348744292,  1.)
 traub_connect(this,  133,  134,   0.0208024203, 1)
 traub_connect(this,  133,  136,   0.0208024203, 1)
 traub_connect(this,  134,  135,   0.01570795,  1.)
 traub_connect(this,  134,  136,   0.01570795, 1)
 traub_connect(this,  136,  137,   0.01570795,  1.)
 access comp[1] // handy statement if want to start gui's from nrnmainmenu
 }
         proc geom() {
 // the "traub level" subsets are created and defined below
 top_level =  4
 objref level[top_level+1]
 for i=0,top_level { level[i] = new SectionList() }
  
 comp[ 1] { level[ 1].append() L=  42. diam = 2*  10. }
 comp[ 2] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 3] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 4] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 5] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 6] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 7] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 8] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 9] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 10] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 11] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 12] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 13] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 14] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 15] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 16] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 17] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 18] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 19] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 20] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 21] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 22] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 23] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 24] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 25] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 26] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 27] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 28] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 29] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 30] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 31] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 32] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 33] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 34] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 35] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 36] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 37] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 38] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 39] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 40] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 41] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 42] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 43] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 44] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 45] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 46] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 47] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 48] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 49] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 50] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 51] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 52] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 53] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 54] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 55] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 56] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 57] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 58] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 59] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 60] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 61] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 62] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 63] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 64] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 65] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 66] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 67] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 68] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 69] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 70] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 71] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 72] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 73] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 74] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 75] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 76] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
       geom1() /* arbitrary subdivision of geom helps
     to large a function problem in tcr_template */
 }
         proc geom1() {
 comp[ 77] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 78] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 79] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 80] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 81] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 82] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 83] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 84] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 85] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 86] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 87] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 88] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 89] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 90] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 91] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 92] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 93] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 94] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 95] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 96] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 97] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 98] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 99] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 100] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 101] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 102] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 103] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 104] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 105] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 106] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 107] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 108] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 109] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 110] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 111] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 112] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 113] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 114] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 115] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 116] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 117] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 118] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 119] { level[ 2].append() L=  20. diam = 2*  0.73 }
 comp[ 120] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 121] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 122] { level[ 3].append() L=  57.5 diam = 2*  0.584 }
 comp[ 123] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 124] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 125] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 126] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 127] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 128] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 129] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 130] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 131] { level[ 4].append() L=  57.5 diam = 2*  0.438 }
 comp[ 132] { level[ 0].append() L=  50. diam = 2*  0.8 }
 comp[ 133] { level[ 0].append() L=  50. diam = 2*  0.7 }
 comp[ 134] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 135] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 136] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 137] { level[ 0].append() L=  50. diam = 2*  0.5 }
 } 
 // Here are some commonly used subsets of sections
         objref all
         proc subsets() { local i
           objref Soma, Dendrites, Soma_Dendrites, Axon
           objref all
           Soma = new SectionList()
           Dendrites = new SectionList()
           Soma_Dendrites = new SectionList()
           Axon = new SectionList()
           for i=1,top_level {
             forsec level[i] { // recall level 0 is axon, 1 is soma, higher are dends
               Soma_Dendrites.append()
                 if (i>1) {Dendrites.append()}
             }
           }
           forsec level[1] {
             Soma.append()
           }
           forsec level[0] { Axon.append() }
           all = new SectionList()
           for i=1, 137 comp[i] all.append()
          }
 
        proc shape() {
 
 /*      This section could contain statements like
 {pt3dclear() pt3dadd(-1,-1,0,1) pt3dadd(-1,-2,0,1)}
 These visual settings do not effect the electrical
 and chemical systems of equations.              */
 }
         proc biophys() {
 // 
 //       insert the mechanisms and assign max conductances
 // 
 forsec all { insert pas }   // g_pas has two values; soma-dend,axon
 forsec level[ 0] {
       insert naf_tcr
       gbar_naf_tcr =   0.4
       insert kdr
       gbar_kdr =   0.4
       insert ka
       gbar_ka =   0.001
       insert k2
       gbar_k2 =   0.0005
 }
 forsec level[ 1] {
       insert naf_tcr
       gbar_naf_tcr =   0.1
       insert napf_tcr
       gbar_napf_tcr =   0.0002
       insert kdr
       gbar_kdr =   0.075
       insert kc
       gbar_kc =   0.012
       insert ka
       gbar_ka =   0.03
       insert km
       gbar_km =   0 // 0.0005
       insert k2
       gbar_k2 =   0.002
       insert kahp_slower
       gbar_kahp_slower =   0 // 5.E-05
       insert cal
       gbar_cal =   0.0005
       insert cat
       gbar_cat =   0.0005
       insert ar
       gbar_ar =   0.00025
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.02
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   52000.
 }
 forsec level[ 2] {
       insert naf_tcr
       gbar_naf_tcr =   0.1
       insert napf_tcr
       gbar_napf_tcr =   0.0002
       insert kdr
       gbar_kdr =   0.05
       insert kc
       gbar_kc =   0.012
       insert ka
       gbar_ka =   0.03
       insert km
       gbar_km =   0 // 0.0005
       insert k2
       gbar_k2 =   0.002
       insert kahp_slower
       gbar_kahp_slower =   0 // 5.E-05
       insert cal
       gbar_cal =   0.0005
       insert cat
       gbar_cat =   0.005
       insert ar
       gbar_ar =   0.0005
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.05
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   104000.
 }
 forsec level[ 3] {
       insert naf_tcr
       gbar_naf_tcr =   0.005
       insert napf_tcr
       gbar_napf_tcr =   1.E-05
       insert kc
       gbar_kc =   0.02
       insert ka
       gbar_ka =   0.001
       insert km
       gbar_km =   0 // 0.0005
       insert k2
       gbar_k2 =   0.002
       insert kahp_slower
       gbar_kahp_slower =   0 // 5.E-05
       insert cal
       gbar_cal =   0.00025
       insert cat
       gbar_cat =   0.003
       insert ar
       gbar_ar =   0.0003
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.05
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   104000.
 }
 forsec level[ 4] {
       insert naf_tcr
       gbar_naf_tcr =   0.005
       insert napf_tcr
       gbar_napf_tcr =   1.E-05
       insert kc
       gbar_kc =   0.02
       insert ka
       gbar_ka =   0.001
       insert km
       gbar_km =   0 // 0.0005
       insert k2
       gbar_k2 =   0.002
       insert kahp_slower
       gbar_kahp_slower =   0 // 5.E-05
       insert cal
       gbar_cal =   0.00025
       insert cat
       gbar_cat =   0.0005
       insert ar
       gbar_ar =   0.0003
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.05
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   104000.
 }
 forsec all {
    cm =   0.9  // assign global specific capac.
 }
 // 
 //  passive membrane resistance (leak) and axial resistance
 // 
 forsec Soma_Dendrites {
    g_pas =   3.78787879E-05
    Ra =   175.
 }
 forsec Axon {
    g_pas =   0.001
    Ra =   100.
 }
 ceiling_cad = 1e6 //  nearly unlimited Ca concentration
 // print "made it to end of initialization from SCORTMAJ_FRB()"
 }  // end of biophys
 
 // Compartment Area: Dendritic.spines double area of
 // dend. membrane, which in Traubs method is equivalent to
 // only multiplying all dend. max conductances by two
 // (the area is doubled but the volume is const.)
 proc double_dend_cond() {
   spine_area_multiplier = 2
   forsec Dendrites {
        if (ismembrane("napf_tcr")) { gbar_napf_tcr *= spine_area_multiplier }
        if (ismembrane("napf_tcrf")) { gbar_napf_tcrf *= spine_area_multiplier }
        if (ismembrane("napf_tcrf_tcr")) { gbar_napf_tcrf_tcr *= spine_area_multiplier }
        if (ismembrane("naf_tcr")) { gbar_naf_tcr *= spine_area_multiplier }
        if (ismembrane("naf_tcr_tcr")) { gbar_naf_tcr_tcr *= spine_area_multiplier }
        if (ismembrane("naf_tcr2")) { gbar_naf_tcr2 *= spine_area_multiplier }
        if (ismembrane("kc")) { gbar_kc *= spine_area_multiplier }
        if (ismembrane("kc_fast")) { gbar_kc_fast *= spine_area_multiplier }
        if (ismembrane("kahp")) { gbar_kahp *= spine_area_multiplier }
        if (ismembrane("kahp_slower")) { gbar_kahp_slower *= spine_area_multiplier }
        if (ismembrane("km")) { gbar_km *= spine_area_multiplier }
        if (ismembrane("kdr")) { gbar_kdr *= spine_area_multiplier }
        if (ismembrane("kdr_fs")) { gbar_kdr_fs *= spine_area_multiplier }
        if (ismembrane("ka")) { gbar_ka *= spine_area_multiplier }
        if (ismembrane("ka_ib")) { gbar_ka_ib *= spine_area_multiplier }
        if (ismembrane("k2")) { gbar_k2 *= spine_area_multiplier }
        if (ismembrane("cal")) { gbar_cal *= spine_area_multiplier }
        if (ismembrane("cat")) { gbar_cat *= spine_area_multiplier }
        if (ismembrane("cat_a")) { gbar_cat_a *= spine_area_multiplier }
        if (ismembrane("ar")) { gbar_ar *= spine_area_multiplier }
        if (ismembrane("pas")) { g_pas *= spine_area_multiplier }
        cm = cm * spine_area_multiplier
   }
 }
 // double_dend_cond()  // run for cells w/ spines
 
 // The below is after doubling of dendritic area to
 // take into account the effect of spines
 // These areas were used in the FORTRAN code to 
 // compute the conductances from specific conductances.
 //  I AREA(I) (compartments and their areas)
 //  1   2638.9356
 //  2   91.734428
 //  3   210.989184
 //  4   210.989184
 //  5   210.989184
 //  6   158.241888
 //  7   158.241888
 //  8   158.241888
 //  9   158.241888
 //  10   158.241888
 //  11   158.241888
 //  12   158.241888
 //  13   158.241888
 //  14   158.241888
 //  15   91.734428
 //  16   210.989184
 //  17   210.989184
 //  18   210.989184
 //  19   158.241888
 //  20   158.241888
 //  21   158.241888
 //  22   158.241888
 //  23   158.241888
 //  24   158.241888
 //  25   158.241888
 //  26   158.241888
 //  27   158.241888
 //  28   91.734428
 //  29   210.989184
 //  30   210.989184
 //  31   210.989184
 //  32   158.241888
 //  33   158.241888
 //  34   158.241888
 //  35   158.241888
 //  36   158.241888
 //  37   158.241888
 //  38   158.241888
 //  39   158.241888
 //  40   158.241888
 //  41   91.734428
 //  42   210.989184
 //  43   210.989184
 //  44   210.989184
 //  45   158.241888
 //  46   158.241888
 //  47   158.241888
 //  48   158.241888
 //  49   158.241888
 //  50   158.241888
 //  51   158.241888
 //  52   158.241888
 //  53   158.241888
 //  54   91.734428
 //  55   210.989184
 //  56   210.989184
 //  57   210.989184
 //  58   158.241888
 //  59   158.241888
 //  60   158.241888
 //  61   158.241888
 //  62   158.241888
 //  63   158.241888
 //  64   158.241888
 //  65   158.241888
 //  66   158.241888
 //  67   91.734428
 //  68   210.989184
 //  69   210.989184
 //  70   210.989184
 //  71   158.241888
 //  72   158.241888
 //  73   158.241888
 //  74   158.241888
 //  75   158.241888
 //  76   158.241888
 //  77   158.241888
 //  78   158.241888
 //  79   158.241888
 //  80   91.734428
 //  81   210.989184
 //  82   210.989184
 //  83   210.989184
 //  84   158.241888
 //  85   158.241888
 //  86   158.241888
 //  87   158.241888
 //  88   158.241888
 //  89   158.241888
 //  90   158.241888
 //  91   158.241888
 //  92   158.241888
 //  93   91.734428
 //  94   210.989184
 //  95   210.989184
 //  96   210.989184
 //  97   158.241888
 //  98   158.241888
 //  99   158.241888
 //  100   158.241888
 //  101   158.241888
 //  102   158.241888
 //  103   158.241888
 //  104   158.241888
 //  105   158.241888
 //  106   91.734428
 //  107   210.989184
 //  108   210.989184
 //  109   210.989184
 //  110   158.241888
 //  111   158.241888
 //  112   158.241888
 //  113   158.241888
 //  114   158.241888
 //  115   158.241888
 //  116   158.241888
 //  117   158.241888
 //  118   158.241888
 //  119   91.734428
 //  120   210.989184
 //  121   210.989184
 //  122   210.989184
 //  123   158.241888
 //  124   158.241888
 //  125   158.241888
 //  126   158.241888
 //  127   158.241888
 //  128   158.241888
 //  129   158.241888
 //  130   158.241888
 //  131   158.241888
 //  132   251.3272
 //  133   219.9113
 //  134   157.0795
 //  135   157.0795
 //  136   157.0795
 //  137   157.0795
        proc position() { local i
 // comp switched to comp[1] since 0 deleted
         comp[1] 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 targ point process, $o2 returned NetCon
           comp[presyn_comp] $o2 = new NetCon(&v(1),$o1)
	$o2.threshold = 0
         }
         objref syn_
         proc synapses() {
         // place for each compartment that has input
         // statements like 
 //comp[3] syn_=new AlphaSynKinT(1) synlist.append(syn_)
 //comp[4] syn_=new NMDA(1) synlist.append(syn_)
         }
 
 // is not an artificial cell:
      func is_art() { return 0 }
 
 
 
         proc more_adjustments() {
 forsec all {
    // global reversal potentials
    ek =  -95.
    e_pas =  -70.
    ena =   50.
    vca =   125.
    forsec all if (ismembrane("ar")) erev_ar =  -35.
    e_gaba_a =  -81.
 }
  // in FORTRAN do find values
 // i= 2
 // i= 15
 // i= 28
 // i= 41
 // i= 54
 // i= 67
 // i= 80
 // i= 93
 // i= 106
 // i= 119
 //extended initializations
   for i=1,137 {
     comp[i] if (ismembrane("ka")) {gbar_ka*=0.2}
   }
   for i = 132, 137 { // axon
     comp[i] gbar_kdr *= 0.45
   }
   comp[1]  gbar_kdr *= 0.45
   for (i = 2; i<=119; i += 13) {  // level 2
     comp[i] gbar_kdr *= 0.45
   }
 
    persistentNa_shift = 7
 // in the fortran code the napf_tcrf has a 10 mV shift
 // but uses the naf_tcr rates (apham_...) which were
 // created with a -3 mV shift for total 7 mV 
    forsec all { if (ismembrane("napf_tcr")){
                 fastNa_shift_napf_tcr = persistentNa_shift}
    }
 }
          proc set_doubler() {doubler=0}
          // this function sets doubler to 0 
          // because there are no spines
          // in the cell, replacing earlier fnc.
  endtemplate TCR