/* tuftIB/tuftIB_template.hoc
 automatically written from f2nrn/neuron_code_writer.f
 via subroutines that were inserted into the fortran
 code e.g., tuftIB/integrate_tuftIB.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 tuftIB
	public type
    	public name
    	strdef name
 
 // 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 presynaptic
         // compartment number
 
         external traub_connect
         objref this
  create  comp[ 61+1]
         objref level[ 18+1], Soma, Dendrites
         objref Soma_Dendrites, Axon
         objref synlist
func type() {return    6 }

         proc init() {
           doubler = 1
  comp[0] delete_section() // clean up for fortran code
            traub_connect( 61+1)
 
            titlePrint()
 
            presyn_comp = 60
            // 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()
	name = "tuftIB"
         }
         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 "tuftIB 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[ 62] // 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,  56,   0.198609787, 0)
 traub_connect(this,  1,  2,   0.0301519221, 1)
 traub_connect(this,  1,  3,   0.0301519221, 1)
 traub_connect(this,  1,  4,   0.0301519221, 1)
 traub_connect(this,  1,  5,   0.0301519221, 1)
 traub_connect(this,  1,  6,   0.0301519221, 1)
 traub_connect(this,  1,  35,   0.131870466, 1)
 traub_connect(this,  2,  13,   0.0151319918,  1.)
 traub_connect(this,  3,  14,   0.0151319918,  1.)
 traub_connect(this,  4,  15,   0.0151319918,  1.)
 traub_connect(this,  5,  16,   0.0151319918,  1.)
 traub_connect(this,  6,  17,   0.0151319918,  1.)
 traub_connect(this,  7,  35,   0.0143749099,  1.)
 traub_connect(this,  7,  18,   0.00805084797,  1.)
 traub_connect(this,  12,  35,   0.0143749099,  1.)
 traub_connect(this,  12,  23,   0.00805084797,  1.)
 traub_connect(this,  13,  24,   0.0151319918,  1.)
 traub_connect(this,  14,  25,   0.0151319918,  1.)
 traub_connect(this,  15,  26,   0.0151319918,  1.)
 traub_connect(this,  16,  27,   0.0151319918,  1.)
 traub_connect(this,  17,  28,   0.0151319918,  1.)
 traub_connect(this,  18,  29,   0.00805084797,  1.)
 traub_connect(this,  23,  34,   0.00805084797,  1.)
 traub_connect(this,  35,  36,   0.0635858917,  1.)
 traub_connect(this,  36,  37,   0.0572189482,  1.)
 traub_connect(this,  37,  38,   0.0511871097,  1.)
 traub_connect(this,  38,  39,   0.0454903769,  1.)
 traub_connect(this,  39,  40,   0.0401287504,  1.)
 traub_connect(this,  40,  41,   0.0351022313,  1.)
 traub_connect(this,  41,  42,   0.0304108207,  1.)
 traub_connect(this,  42,  43,   0.0260545207,  1.)
 traub_connect(this,  43,  44,   0.0197765666,  1.)
 traub_connect(this,  44,  45,   0.0130771876,  1.)
 traub_connect(this,  45,  46,   0.00929984778,  1.)
 traub_connect(this,  46,  47,   0.00695437146,  1.)
 traub_connect(this,  47,  48,   0.00617996773, 1)
 traub_connect(this,  47,  49,   0.00617996773, 1)
 traub_connect(this,  48,  49,   0.00633553983, 1)
 traub_connect(this,  48,  50,   0.00633553983,  1.)
 traub_connect(this,  49,  51,   0.00633553983,  1.)
 traub_connect(this,  50,  52,   0.00633553983,  1.)
 traub_connect(this,  51,  53,   0.00633553983,  1.)
 traub_connect(this,  52,  54,   0.00633553983,  1.)
 traub_connect(this,  53,  55,   0.00633553983,  1.)
 traub_connect(this,  56,  57,   0.0472757183,  1.)
 traub_connect(this,  57,  58,   0.0208024203, 1)
 traub_connect(this,  57,  59,   0.0208024203, 1)
 traub_connect(this,  58,  59,   0.01570795, 1)
 traub_connect(this,  58,  60,   0.01570795,  1.)
 traub_connect(this,  59,  61,   0.01570795,  1.)
 traub_connect(this,  36,  8,   0.0142102732,  1.)
 traub_connect(this,  37,  9,   0.0140221731,  1.)
 traub_connect(this,  37,  10,   0.0140221731,  1.)
 traub_connect(this,  36,  11,   0.0142102732,  1.)
 traub_connect(this,  8,  19,   0.00805084797,  1.)
 traub_connect(this,  10,  21,   0.00805084797,  1.)
 traub_connect(this,  19,  30,   0.00805084797,  1.)
 traub_connect(this,  21,  32,   0.00805084797,  1.)
 traub_connect(this,  9,  20,   0.00805084797,  1.)
 traub_connect(this,  20,  31,   0.00805084797,  1.)
 traub_connect(this,  11,  22,   0.00805084797,  1.)
 traub_connect(this,  22,  33,   0.00805084797,  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 =  18
 objref level[top_level+1]
 for i=0,top_level { level[i] = new SectionList() }
  
 comp[ 1] { level[ 1].append() L=  25. diam = 2*  9. }
 comp[ 2] { level[ 2].append() L=  60. diam = 2*  0.85 }
 comp[ 3] { level[ 2].append() L=  60. diam = 2*  0.85 }
 comp[ 4] { level[ 2].append() L=  60. diam = 2*  0.85 }
 comp[ 5] { level[ 2].append() L=  60. diam = 2*  0.85 }
 comp[ 6] { level[ 2].append() L=  60. diam = 2*  0.85 }
 comp[ 7] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 8] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 9] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 10] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 11] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 12] { level[ 2].append() L=  60. diam = 2*  0.62 }
 comp[ 13] { level[ 3].append() L=  60. diam = 2*  0.85 }
 comp[ 14] { level[ 3].append() L=  60. diam = 2*  0.85 }
 comp[ 15] { level[ 3].append() L=  60. diam = 2*  0.85 }
 comp[ 16] { level[ 3].append() L=  60. diam = 2*  0.85 }
 comp[ 17] { level[ 3].append() L=  60. diam = 2*  0.85 }
 comp[ 18] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 19] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 20] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 21] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 22] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 23] { level[ 3].append() L=  60. diam = 2*  0.62 }
 comp[ 24] { level[ 4].append() L=  60. diam = 2*  0.85 }
 comp[ 25] { level[ 4].append() L=  60. diam = 2*  0.85 }
 comp[ 26] { level[ 4].append() L=  60. diam = 2*  0.85 }
 comp[ 27] { level[ 4].append() L=  60. diam = 2*  0.85 }
 comp[ 28] { level[ 4].append() L=  60. diam = 2*  0.85 }
 comp[ 29] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 30] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 31] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 32] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 33] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 34] { level[ 4].append() L=  60. diam = 2*  0.62 }
 comp[ 35] { level[ 5].append() L=  75. diam = 2*  2. }
 comp[ 36] { level[ 6].append() L=  75. diam = 2*  1.9 }
 comp[ 37] { level[ 7].append() L=  75. diam = 2*  1.8 }
 comp[ 38] { level[ 8].append() L=  75. diam = 2*  1.7 }
 comp[ 39] { level[ 9].append() L=  75. diam = 2*  1.6 }
 comp[ 40] { level[ 10].append() L=  75. diam = 2*  1.5 }
 comp[ 41] { level[ 11].append() L=  75. diam = 2*  1.4 }
 comp[ 42] { level[ 12].append() L=  75. diam = 2*  1.3 }
 comp[ 43] { level[ 13].append() L=  75. diam = 2*  1.2 }
 comp[ 44] { level[ 14].append() L=  75. diam = 2*  1. }
 comp[ 45] { level[ 15].append() L=  75. diam = 2*  0.8 }
 comp[ 46] { level[ 16].append() L=  75. diam = 2*  0.7 }
 comp[ 47] { level[ 17].append() L=  75. diam = 2*  0.6 }
 comp[ 48] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 49] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 50] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 51] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 52] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 53] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 54] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 55] { level[ 18].append() L=  60. diam = 2*  0.55 }
 comp[ 56] { level[ 0].append() L=  25. diam = 2*  0.9 }
 comp[ 57] { level[ 0].append() L=  50. diam = 2*  0.7 }
 comp[ 58] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 59] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 60] { level[ 0].append() L=  50. diam = 2*  0.5 }
 comp[ 61] { 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, 61 comp[i] all.append()
          }
 
        proc shape() {
 
     comp[1] {pt3dclear() pt3dadd(0.0, 0.0, 0.0, 18.0) pt3dadd(0.0, 12.5, 0.0, 18.0)}
    comp[1] {pt3dadd(-0.0, 25.0, 0.0, 18.0)}
    comp[56] {pt3dclear() pt3dadd(0.0, 0.0, 0.0, 1.8) pt3dadd(12.5, 0.0, 0.0, 1.8)}
    comp[56] {pt3dadd(25.0, 0.0, 0.0, 1.8)}
    comp[35] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 4.0) pt3dadd(-0.0, 62.5, 0.0, 4.0)}
    comp[35] {pt3dadd(-0.0, 100.0, 0.0, 4.0)}
    comp[6] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 1.7) pt3dadd(0.0, 7.0, -24.0, 1.7)}
    comp[6] {pt3dadd(0.0, -11.0, -48.0, 1.7)}
    comp[5] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 1.7) pt3dadd(-24.0, 7.0, 0.0, 1.7)}
    comp[5] {pt3dadd(-48.0, -11.0, 0.0, 1.7)}
    comp[4] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 1.7) pt3dadd(0.0, 7.0, 24.0, 1.7)}
    comp[4] {pt3dadd(0.0, -11.0, 48.0, 1.7)}
    comp[3] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 1.7) pt3dadd(24.0, 7.0, 0.0, 1.7)}
    comp[3] {pt3dadd(48.0, -11.0, 0.0, 1.7)}
    comp[2] {pt3dclear() pt3dadd(-0.0, 25.0, 0.0, 1.7) pt3dadd(0.0, -5.0, 0.0, 1.7)}
    comp[2] {pt3dadd(0.0, -35.0, 0.0, 1.7)}
    comp[57] {pt3dclear() pt3dadd(25.0, 0.0, 0.0, 1.4) pt3dadd(50.0, 0.0, 0.0, 1.4)}
    comp[57] {pt3dadd(75.0, 0.0, 0.0, 1.4)}
    comp[36] {pt3dclear() pt3dadd(-0.0, 100.0, 0.0, 3.8) pt3dadd(-0.0, 137.50002, 0.0, 3.8)}
    comp[36] {pt3dadd(-0.0, 175.0, 0.0, 3.8)}
    comp[12] {pt3dclear() pt3dadd(-0.0, 100.0, 0.0, 1.24) pt3dadd(30.0, 100.0, 0.0, 1.24)}
    comp[12] {pt3dadd(60.0, 100.0, 0.0, 1.24)}
    comp[7] {pt3dclear() pt3dadd(-0.0, 100.0, 0.0, 1.24) pt3dadd(-30.0, 100.0, 0.0, 1.24)}
    comp[7] {pt3dadd(-60.0, 100.0, 0.0, 1.24)}
    comp[17] {pt3dclear() pt3dadd(0.0, -11.0, -48.0, 1.7) pt3dadd(0.0, -29.0, -72.0, 1.7)}
    comp[17] {pt3dadd(0.0, -47.0, -96.0, 1.7)}
    comp[16] {pt3dclear() pt3dadd(-48.0, -11.0, 0.0, 1.7) pt3dadd(-72.0, -29.0, 0.0, 1.7)}
    comp[16] {pt3dadd(-96.0, -47.0, 0.0, 1.7)}
    comp[15] {pt3dclear() pt3dadd(0.0, -11.0, 48.0, 1.7) pt3dadd(0.0, -29.0, 72.0, 1.7)}
    comp[15] {pt3dadd(0.0, -47.0, 96.0, 1.7)}
    comp[14] {pt3dclear() pt3dadd(48.0, -11.0, 0.0, 1.7) pt3dadd(72.0, -29.0, 0.0, 1.7)}
    comp[14] {pt3dadd(96.0, -47.0, -0.0, 1.7)}
    comp[13] {pt3dclear() pt3dadd(0.0, -35.0, 0.0, 1.7) pt3dadd(-0.0, -65.0, -0.0, 1.7)}
    comp[13] {pt3dadd(0.0, -95.0, 0.0, 1.7)}
    comp[59] {pt3dclear() pt3dadd(75.0, 0.0, 0.0, 1.0) pt3dadd(98.0265, -9.735461, 0.0, 1.0)}
    comp[59] {pt3dadd(121.05301, -19.47089, 0.0, 1.0)}
    comp[58] {pt3dclear() pt3dadd(75.0, 0.0, 0.0, 1.0) pt3dadd(98.0265, 9.735458, 0.0, 1.0)}
    comp[58] {pt3dadd(121.05301, 19.47091, 0.0, 1.0)}
    comp[11] {pt3dclear() pt3dadd(-0.0, 175.0, 0.0, 1.24) pt3dadd(-0.0, 175.0, 30.0, 1.24)}
    comp[11] {pt3dadd(0.0, 175.00127, 60.0, 1.24)}
    comp[8] {pt3dclear() pt3dadd(-0.0, 175.0, 0.0, 1.24) pt3dadd(-0.0, 175.0, -30.0, 1.24)}
    comp[8] {pt3dadd(9.6924923E-4, 175.0, -60.0, 1.24)}
    comp[37] {pt3dclear() pt3dadd(-0.0, 175.0, 0.0, 3.6) pt3dadd(0.0, 212.5, 0.0, 3.6)}
    comp[37] {pt3dadd(-0.0, 250.0, 0.0, 3.6)}
    comp[23] {pt3dclear() pt3dadd(60.0, 100.0, 0.0, 1.24) pt3dadd(90.0, 100.0, 0.0, 1.24)}
    comp[23] {pt3dadd(120.0, 100.0, 0.0, 1.24)}
    comp[18] {pt3dclear() pt3dadd(-60.0, 100.0, 0.0, 1.24) pt3dadd(-90.0, 100.0, 0.0, 1.24)}
    comp[18] {pt3dadd(-120.0, 100.0, 0.0, 1.24)}
    comp[28] {pt3dclear() pt3dadd(0.0, -47.0, -96.0, 1.7) pt3dadd(0.0, -65.0, -120.0, 1.7)}
    comp[28] {pt3dadd(0.0, -83.0, -144.0, 1.7)}
    comp[27] {pt3dclear() pt3dadd(-96.0, -47.0, 0.0, 1.7) pt3dadd(-120.0, -65.0, 0.0, 1.7)}
    comp[27] {pt3dadd(-144.0, -83.0, 0.0, 1.7)}
    comp[26] {pt3dclear() pt3dadd(0.0, -47.0, 96.0, 1.7) pt3dadd(0.0, -65.0, 120.0, 1.7)}
    comp[26] {pt3dadd(0.0, -83.0, 144.0, 1.7)}
    comp[25] {pt3dclear() pt3dadd(96.0, -47.0, -0.0, 1.7) pt3dadd(120.0, -65.0, -0.0, 1.7)}
    comp[25] {pt3dadd(144.0, -83.0, -0.0, 1.7)}
    comp[24] {pt3dclear() pt3dadd(0.0, -95.0, 0.0, 1.7) pt3dadd(0.0, -125.0, 0.0, 1.7)}
    comp[24] {pt3dadd(0.0, -155.0, 0.0, 1.7)}
    comp[61] {pt3dclear() pt3dadd(121.05301, -19.47089, 0.0, 1.0) pt3dadd(144.08, -29.206387, 0.0, 1.0)}
    comp[61] {pt3dadd(167.106, -38.941883, 0.0, 1.0)}
    comp[60] {pt3dclear() pt3dadd(121.05301, 19.47091, 0.0, 1.0) pt3dadd(144.08, 29.206413, 0.0, 1.0)}
    comp[60] {pt3dadd(167.106, 38.941814, 0.0, 1.0)}
    comp[22] {pt3dclear() pt3dadd(0.0, 175.00127, 60.0, 1.24) pt3dadd(0.0, 175.00179, 90.00081, 1.24)}
    comp[22] {pt3dadd(0.001051122, 175.00171, 120.0, 1.24)}
    comp[19] {pt3dclear() pt3dadd(9.6924923E-4, 175.0, -60.0, 1.24) pt3dadd(0.0012438841, 175.0, -90.0, 1.24)}
    comp[19] {pt3dadd(0.0015255462, 175.0, -120.0, 1.24)}
    comp[10] {pt3dclear() pt3dadd(-0.0, 250.0, 0.0, 1.24) pt3dadd(30.0, 250.0, 0.0, 1.24)}
    comp[10] {pt3dadd(60.0, 250.0, 0.0, 1.24)}
    comp[9] {pt3dclear() pt3dadd(-0.0, 250.0, 0.0, 1.24) pt3dadd(-30.0, 250.0, 0.0, 1.24)}
    comp[9] {pt3dadd(-60.0, 250.0, 0.0, 1.24)}
    comp[38] {pt3dclear() pt3dadd(-0.0, 250.0, 0.0, 3.4) pt3dadd(0.0, 287.5, 0.0, 3.4)}
    comp[38] {pt3dadd(0.0, 325.0, 0.0, 3.4)}
    comp[34] {pt3dclear() pt3dadd(120.0, 100.0, 0.0, 1.24) pt3dadd(150.0, 100.0, 0.0, 1.24)}
    comp[34] {pt3dadd(180.0, 100.0, 0.0, 1.24)}
    comp[29] {pt3dclear() pt3dadd(-120.0, 100.0, 0.0, 1.24) pt3dadd(-150.0, 100.0, 0.0, 1.24)}
    comp[29] {pt3dadd(-180.0, 100.0, 0.0, 1.24)}
    comp[33] {pt3dclear() pt3dadd(0.001051122, 175.00171, 120.0, 1.24) pt3dadd(0.0014038613, 175.00258, 150.0, 1.24)}
    comp[33] {pt3dadd(0.0017566012, 175.0035, 180.0, 1.24)}
    comp[30] {pt3dclear() pt3dadd(0.0015255462, 175.0, -120.0, 1.24) pt3dadd(0.0025291569, 175.0, -150.0, 1.24)}
    comp[30] {pt3dadd(0.00349254, 175.0, -180.0, 1.24)}
    comp[21] {pt3dclear() pt3dadd(60.0, 250.0, 0.0, 1.24) pt3dadd(90.00086, 250.0, 0.0, 1.24)}
    comp[21] {pt3dadd(120.0, 250.0, 0.0, 1.24)}
    comp[20] {pt3dclear() pt3dadd(-60.0, 250.0, 0.0, 1.24) pt3dadd(-90.0, 249.99913, 0.0, 1.24)}
    comp[20] {pt3dadd(-120.0, 250.0, 0.0, 1.24)}
    comp[39] {pt3dclear() pt3dadd(0.0, 325.0, 0.0, 3.2) pt3dadd(0.0012298224, 362.5, 0.0, 3.2)}
    comp[39] {pt3dadd(0.0018377064, 400.0, 0.0, 3.2)}
    comp[32] {pt3dclear() pt3dadd(120.0, 250.0, 0.0, 1.24) pt3dadd(150.0, 249.99889, 0.0, 1.24)}
    comp[32] {pt3dadd(180.0, 249.99825, 0.0, 1.24)}
    comp[31] {pt3dclear() pt3dadd(-120.0, 250.0, 0.0, 1.24) pt3dadd(-150.0, 249.99908, 0.0, 1.24)}
    comp[31] {pt3dadd(-180.0, 250.0, 0.0, 1.24)}
    comp[40] {pt3dclear() pt3dadd(0.0018377064, 400.0, 0.0, 3.0) pt3dadd(0.002490441, 437.50006, 0.0, 3.0)}
    comp[40] {pt3dadd(0.0030934676, 475.0, 0.0, 3.0)}
    comp[41] {pt3dclear() pt3dadd(0.0030934676, 475.0, 0.0, 2.8) pt3dadd(0.0037013518, 512.5, 0.0, 2.8)}
    comp[41] {pt3dadd(0.004297351, 550.0, 0.0, 2.8)}
    comp[42] {pt3dclear() pt3dadd(0.004297351, 550.0, 0.0, 2.6) pt3dadd(0.004884154, 587.5, 0.0, 2.6)}
    comp[42] {pt3dadd(0.0054990654, 625.0, 0.0, 2.6)}
    comp[43] {pt3dclear() pt3dadd(0.0054990654, 625.0, 0.0, 2.4) pt3dadd(0.006158827, 662.5, 0.0, 2.4)}
    comp[43] {pt3dadd(0.0067429417, 700.0, 0.0, 2.4)}
    comp[44] {pt3dclear() pt3dadd(0.0067429417, 700.0, 0.0, 2.0) pt3dadd(0.007388649, 737.5, 0.0, 2.0)}
    comp[44] {pt3dadd(0.007996533, 775.0, 0.0, 2.0)}

    comp[45] {pt3dclear() pt3dadd(0.007996533, 775.0, 0.0, 1.6) pt3dadd(0.008642241, 812.5001, 0.0, 1.6)}
    comp[45] {pt3dadd(0.009192871, 850.0, 0.0, 1.6)}
    comp[46] {pt3dclear() pt3dadd(0.009192871, 850.0, 0.0, 1.4) pt3dadd(0.009800755, 887.49994, 0.0, 1.4)}
    comp[46] {pt3dadd(0.0104183545, 925.0, 0.0, 1.4)}
    comp[47] {pt3dclear() pt3dadd(0.0104183545, 925.0, 0.0, 1.2) pt3dadd(0.011026239, 962.5, 0.0, 1.2)}
    comp[47] {pt3dadd(0.011648177, 1000.0, 0.0, 1.2)}
    comp[49] {pt3dclear() pt3dadd(0.011648177, 1000.0, 0.0, 1.1) pt3dadd(11.695089, 1027.6318, 0.0, 1.1)}
    comp[49] {pt3dadd(23.37855, 1055.2676, 0.0, 1.1)}
    comp[48] {pt3dclear() pt3dadd(0.011648177, 1000.0, 0.0, 1.1) pt3dadd(-11.669942, 1027.6323, 0.0, 1.1)}
    comp[48] {pt3dadd(-23.352028, 1055.2684, 0.0, 1.1)}
    comp[51] {pt3dclear() pt3dadd(23.37855, 1055.2676, 0.0, 1.1) pt3dadd(35.060993, 1082.8975, 0.0, 1.1)}
    comp[51] {pt3dadd(46.74449, 1110.5272, 0.0, 1.1)}
    comp[50] {pt3dclear() pt3dadd(-23.352028, 1055.2684, 0.0, 1.1) pt3dadd(-35.0342, 1082.8987, 0.0, 1.1)}
    comp[50] {pt3dadd(-46.716194, 1110.5288, 0.0, 1.1)}
    comp[53] {pt3dclear() pt3dadd(46.74449, 1110.5272, 0.0, 1.1) pt3dadd(58.426914, 1138.157, 0.0, 1.1)}
    comp[53] {pt3dadd(70.110405, 1165.7869, 0.0, 1.1)}
    comp[52] {pt3dclear() pt3dadd(-46.716194, 1110.5288, 0.0, 1.1) pt3dadd(-58.39841, 1138.1588, 0.0, 1.1)}
    comp[52] {pt3dadd(-70.08056, 1165.7892, 0.0, 1.1)}
    comp[55] {pt3dclear() pt3dadd(70.110405, 1165.7869, 0.0, 1.1) pt3dadd(81.7928, 1193.4166, 0.0, 1.1)}
    comp[55] {pt3dadd(93.47627, 1221.0565, 0.0, 1.1)}
    comp[54] {pt3dclear() pt3dadd(-70.08056, 1165.7892, 0.0, 1.1) pt3dadd(-81.762665, 1193.4192, 0.0, 1.1)}
    comp[54] {pt3dadd(-93.44476, 1221.0594, 0.0, 1.1)}

 }
         proc biophys() {
 // 
 //       insert the mechanisms and assign max conductances
 // 
 forsec all { insert pas
insert extracellular
	xraxial=1e+09 
	xg=1e+09 
	xc=0 
	e_extracellular  }   // g_pas has two values; soma-dend,axon
 forsec level[ 0] {
       insert naf
       gbar_naf =   0.45
       insert kdr
       gbar_kdr =   0.45
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.042
	insert k2
	gbar_k2 = 0.0005
 }
 forsec level[ 1] {
       insert naf
       gbar_naf =   0.2
       insert nap
       gbar_nap =   0.00016
       insert kdr
       gbar_kdr =   0.17
       insert kc
       gbar_kc =   0.016
       insert ka_ib
       gbar_ka_ib =   0.020
       insert km
       gbar_km =   0.0119
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.01
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   4333.33333
 }
 forsec level[ 2] {
       insert naf
       gbar_naf =   0.075
       insert nap
       gbar_nap =   0.00006
       insert kdr
       gbar_kdr =   0.075
       insert kc
       gbar_kc =   0.016
       insert ka_ib
       gbar_ka_ib =   0.008
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.02
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 3] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 4] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 5] {
       insert naf
       gbar_naf =   0.15
       insert nap
       gbar_nap =   0.00012
       insert kdr
       gbar_kdr =   0.12
       insert kc
       gbar_kc =   0.016
       insert ka_ib
       gbar_ka_ib =   0.008
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 6] {
       insert naf
       gbar_naf =   0.075
       insert nap
       gbar_nap =   0.00006
       insert kdr
       gbar_kdr =   0.075
       insert kc
       gbar_kc =   0.016
       insert ka_ib
       gbar_ka_ib =   0.008
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 7] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.004
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 8] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 9] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 10] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 11] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 12] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 13] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 14] {
       insert naf
       gbar_naf =   0.015
       insert nap
       gbar_nap =   0.000012
       insert kc
       gbar_kc =   0.0005
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.01904
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0045
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 15] {
       insert naf
       gbar_naf =   0.003
       insert nap
       gbar_nap =   0.0000024
       insert kc
       gbar_kc =   0.0012
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.0056
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.001
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 16] {
       insert naf
       gbar_naf =   0.003
       insert nap
       gbar_nap =   0.0000024
       insert kc
       gbar_kc =   0.0012
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.0056
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.001
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 17] {
       insert naf
       gbar_naf =   0.003
       insert nap
       gbar_nap =   0.0000024
       insert kc
       gbar_kc =   0.0012
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.0056
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.001
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0001
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 forsec level[ 18] {
       insert naf
       gbar_naf =   0.003
       insert nap
       gbar_nap =   0.0000024
       insert kc
       gbar_kc =   0.0012
       insert ka_ib
       gbar_ka_ib =   0.0006
       insert km
       gbar_km =   0.0056
       insert k2
       gbar_k2 =   0.0005
       insert kahp_deeppyr
       gbar_kahp_deeppyr =   0.0002
       insert cal
       gbar_cal =   0.0006
       insert cat
       gbar_cat =   0.0001
       insert ar
       gbar_ar =   0.0002
       insert cad
       // *** ca diffusion: beta=1/tau
       beta_cad  =   0.075
       // cafor(I) (FORTRAN) converted to phi (NEURON)
       phi_cad =   86666.6667
 }
 // Special case: individually specified beta_cad's in level  2
       comp[ 2] beta_cad  =   0.02
       comp[ 3] beta_cad  =   0.075
       comp[ 4] beta_cad  =   0.075
       comp[ 5] beta_cad  =   0.02
       comp[ 6] beta_cad  =   0.02
       comp[ 7] beta_cad  =   0.075
       comp[ 8] beta_cad  =   0.075
       comp[ 9] beta_cad  =   0.075
       comp[ 10] beta_cad  =   0.075
       comp[ 11] beta_cad  =   0.075
       comp[ 12] beta_cad  =   0.075
 forsec all {
    cm =   0.9  // assign global specific capac.
 }
 // 
 //  passive membrane resistance (leak) and axial resistance
 // 
 forsec Soma_Dendrites {
    g_pas =   2.E-05
    Ra =   250.
 }
 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("nap")) { gbar_nap *= spine_area_multiplier }
        if (ismembrane("napf")) { gbar_napf *= spine_area_multiplier }
        if (ismembrane("napf_tcr")) { gbar_napf_tcr *= spine_area_multiplier }
        if (ismembrane("naf")) { gbar_naf *= spine_area_multiplier }
        if (ismembrane("naf_tcr")) { gbar_naf_tcr *= spine_area_multiplier }
        if (ismembrane("naf2")) { gbar_naf2 *= spine_area_multiplier }
        if (ismembrane("kc")) { gbar_kc *= spine_area_multiplier }
        if (ismembrane("kc_fast")) { gbar_kc_fast *= spine_area_multiplier }

        if (ismembrane("kahp_deeppyr")) { gbar_kahp_deeppyr *= 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_ib")) { gbar_ka_ib *= spine_area_multiplier }
        if (ismembrane("ka_ib_ib")) { gbar_ka_ib_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
 
        proc position() { local i
 // comp switched to comp[1] since 0 deleted
         forsec all { 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 =  -75.
 }
 // v(1,1)= -70.
 forsec all if (ismembrane("naf")) {fastNa_shift_naf=-3.5}
    // extended initializations from integrate_tuftIB()
// forsec Soma_Dendrites { if (ismembrane("nap")) {gbar_nap *=   0.2}}
// forsec Soma_Dendrites { if (ismembrane("kc")) {gbar_kc *=   2.}}
// forsec Soma_Dendrites { if (ismembrane("cal")) {gbar_cal *=   1.}}
// forsec Soma_Dendrites { if (ismembrane("km")) {gbar_km *=   1.4}}
 comp[48] { if (ismembrane("cal")) {gbar_cal *= 4.5 }}
 comp[49] { if (ismembrane("cal")) {gbar_cal *= 4.5 }}
// comp[52] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[53] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[54] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[55] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[ 42] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[ 43] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}
// comp[ 44] { if (ismembrane("cal")) {gbar_cal *= 2.0 }}

 }
  endtemplate tuftIB