A single column thalamocortical network model (Traub et al 2005)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:45539
To better understand population phenomena in thalamocortical neuronal ensembles, we have constructed a preliminary network model with 3,560 multicompartment neurons (containing soma, branching dendrites, and a portion of axon). Types of neurons included superficial pyramids (with regular spiking [RS] and fast rhythmic bursting [FRB] firing behaviors); RS spiny stellates; fast spiking (FS) interneurons, with basket-type and axoaxonic types of connectivity, and located in superficial and deep cortical layers; low threshold spiking (LTS) interneurons, that contacted principal cell dendrites; deep pyramids, that could have RS or intrinsic bursting (IB) firing behaviors, and endowed either with non-tufted apical dendrites or with long tufted apical dendrites; thalamocortical relay (TCR) cells; and nucleus reticularis (nRT) cells. To the extent possible, both electrophysiology and synaptic connectivity were based on published data, although many arbitrary choices were necessary.
Reference:
1 . Traub RD, Contreras D, Cunningham MO, Murray H, LeBeau FE, Roopun A, Bibbig A, Wilent WB, Higley MJ, Whittington MA (2005) Single-column thalamocortical network model exhibiting gamma oscillations, sleep spindles, and epileptogenic bursts. J Neurophysiol 93:2194-232 [PubMed]
2 . Traub RD, Contreras D, Whittington MA (2005) Combined experimental/simulation studies of cellular and network mechanisms of epileptogenesis in vitro and in vivo. J Clin Neurophysiol 22:330-42 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Neocortex; Thalamus;
Cell Type(s): Thalamus geniculate nucleus/lateral principal GLU cell; Thalamus reticular nucleus GABA cell; Neocortex U1 L6 pyramidal corticalthalamic GLU cell; Neocortex U1 L2/6 pyramidal intratelencephalic GLU cell; Neocortex fast spiking (FS) interneuron; Neocortex spiking regular (RS) neuron; Neocortex spiking low threshold (LTS) neuron;
Channel(s): I Na,p; I Na,t; I L high threshold; I T low threshold; I A; I K; I M; I h; I K,Ca; I Calcium; I A, slow;
Gap Junctions: Gap junctions;
Receptor(s): GabaA; AMPA; NMDA;
Gene(s):
Transmitter(s):
Simulation Environment: NEURON; FORTRAN;
Model Concept(s): Activity Patterns; Bursting; Temporal Pattern Generation; Oscillations; Simplified Models; Epilepsy; Sleep; Spindles;
Implementer(s): Traub, Roger D ;
Search NeuronDB for information about:  Thalamus geniculate nucleus/lateral principal GLU cell; Thalamus reticular nucleus GABA cell; Neocortex U1 L2/6 pyramidal intratelencephalic GLU cell; Neocortex U1 L6 pyramidal corticalthalamic GLU cell; GabaA; AMPA; NMDA; I Na,p; I Na,t; I L high threshold; I T low threshold; I A; I K; I M; I h; I K,Ca; I Calcium; I A, slow;
Files displayed below are from the implementation
/
nrntraub
net
durand.hoc *
groucho.hoc
groucho_gapbld.hoc *
groucho_gapbld_mix.hoc *
network_specification_interface.hoc *
serial_or_par_wrapper.hoc *
synaptic_compmap_construct.hoc *
synaptic_map_construct.hoc *
                            
/* groucho.hoc
converted from Traub et al 2005's FORTRAN groucho.f for use in NEURON.

This hoc program will create the network model using variables and code that is 
as similar as possible to the original FORTRAN code

Original comments in FORTRAN are retained as hoc comments

*/
// Report starting and stoping of setup time
//system("date> time_groucho_hoc.txt")

// Cell types: superficial pyramidal RS; superficial pyramidal FRB;
// superficial basket; superficial axoaxonic; superficial LTS;
// spiny stellate; tufted deep IB; tufted deep RS; nontufted deep RS;
// deep basket; deep axoaxonic; deep LTS; thalamocortical relay (TCR);
// nucleus reticularis thalami (nRT).

// Fortran:              PROGRAM GROUCHO

// max number of cells of any one type should be 1000; otherwise problems with broadcasting
// axonal potentials (see position code below
        num_suppyrRS = 1000
	num_suppyrFRB =  50
 	num_supbask = 90
	num_supaxax = 90
	num_supLTS = 90
	num_spinstell = 240
	num_tuftIB = 800
	num_tuftRS = 200
	num_nontuftRS = 500
	num_deepbask = 100
	num_deepaxax = 100
	num_deepLTS = 100
	num_TCR = 100
	num_nRT = 100

if (one_tenth_ncell) {
        num_suppyrRS /= 10
	num_suppyrFRB /= 10
 	num_supbask /= 10
	num_supaxax /= 10
	num_supLTS /= 10
	num_spinstell /= 10
	num_tuftIB /= 10
	num_tuftRS /= 10
	num_nontuftRS /= 10
	num_deepbask /= 10
	num_deepaxax /= 10
	num_deepLTS /= 10
	num_TCR /= 10
	num_nRT /= 10
}

//     num_spinstell = 240, num_tuftIB = 500, num_tuftRS = 500,
//    Diego unsure how many tuftRS there are

        numcomp_suppyrRS   = 74
        numcomp_suppyrFRB  = 74
        numcomp_supbask    = 59
        numcomp_supaxax    = 59
        numcomp_supLTS     = 59
        numcomp_spinstell  = 59
        numcomp_tuftIB     = 61
        numcomp_tuftRS     = 61
        numcomp_nontuftRS  = 50
        numcomp_deepbask   = 59
        numcomp_deepaxax   = 59
        numcomp_deepLTS    = 59
        numcomp_TCR        =137
        numcomp_nRT        = 59

        num_suppyrRS_to_suppyrRS = 50
        num_suppyrRS_to_suppyrFRB = 50
        num_suppyrRS_to_supbask   = 90
        num_suppyrRS_to_supaxax   = 90
        num_suppyrRS_to_supLTS    = 90
        num_suppyrRS_to_spinstell =  3
        num_suppyrRS_to_tuftIB    = 60
        num_suppyrRS_to_tuftRS    = 60 
        num_suppyrRS_to_deepbask  = 30
        num_suppyrRS_to_deepaxax  = 30
        num_suppyrRS_to_deepLTS   = 30
        num_suppyrRS_to_nontuftRS =  3
        num_suppyrFRB_to_suppyrRS = 5
        num_suppyrFRB_to_suppyrFRB= 5
        num_suppyrFRB_to_supbask  = 5
        num_suppyrFRB_to_supaxax  = 5
        num_suppyrFRB_to_supLTS   = 5
        num_suppyrFRB_to_spinstell= 1
        num_suppyrFRB_to_tuftIB   = 3
        num_suppyrFRB_to_tuftRS   = 3
        num_suppyrFRB_to_deepbask = 3
         num_suppyrFRB_to_deepaxax = 3 
         num_suppyrFRB_to_deepLTS  = 3 
//        num_suppyrFRB_to_nontuftRS= 3 
         num_suppyrFRB_to_nontuftRS= 1  // small per Thomson & Bannister
        
         num_supbask_to_suppyrRS   = 20 
         num_supbask_to_suppyrFRB  = 20 
         num_supbask_to_supbask    = 20 
         num_supbask_to_supaxax    = 20 
         num_supbask_to_supLTS     = 20 
         num_supbask_to_spinstell  = 20 

         num_supaxax_to_suppyrRS   = 20  // note
         num_supaxax_to_suppyrFRB  = 20   // note
         num_supaxax_to_spinstell  = 5 
         num_supaxax_to_tuftIB     = 5 
         num_supaxax_to_tuftRS     = 5 
         num_supaxax_to_nontuftRS  = 5 

         num_supLTS_to_suppyrRS    = 20 
         num_supLTS_to_suppyrFRB   = 20 
         num_supLTS_to_supbask     = 20 
         num_supLTS_to_supaxax     = 20 
         num_supLTS_to_supLTS      = 20 
         num_supLTS_to_spinstell   = 20 
         num_supLTS_to_tuftIB      = 20 
        
         num_supLTS_to_tuftRS      = 20 
         num_supLTS_to_deepbask    = 20 
         num_supLTS_to_deepaxax    = 20 
         num_supLTS_to_deepLTS     = 20 
         num_supLTS_to_nontuftRS   = 20 
         num_spinstell_to_suppyrRS = 20 
         num_spinstell_to_suppyrFRB= 20 
         num_spinstell_to_supbask  = 20 
         num_spinstell_to_supaxax  = 20 
         num_spinstell_to_supLTS   = 20 
         num_spinstell_to_spinstell= 30 
         num_spinstell_to_tuftIB   = 20 
         num_spinstell_to_tuftRS   = 20 
         num_spinstell_to_deepbask = 20 
         num_spinstell_to_deepaxax = 20 
         num_spinstell_to_deepLTS  = 20 
         num_spinstell_to_nontuftRS= 20 
//        num_tuftIB_to_suppyrRS    = 20 
         num_tuftIB_to_suppyrRS    =  2  // small per Thomson   Bannister
//        num_tuftIB_to_suppyrFRB   = 20 
         num_tuftIB_to_suppyrFRB   =  2  // small per Thomson   Bannister
         num_tuftIB_to_supbask     = 20 
        
         num_tuftIB_to_supaxax     = 20 
         num_tuftIB_to_supLTS      = 20 
         num_tuftIB_to_spinstell   = 20 
         num_tuftIB_to_tuftIB      = 50 
         num_tuftIB_to_tuftRS      = 20 
         num_tuftIB_to_deepbask    = 20 
         num_tuftIB_to_deepaxax    = 20 
         num_tuftIB_to_deepLTS     = 20 
         num_tuftIB_to_nontuftRS   = 20 
//        num_tuftRS_to_suppyrRS    = 20 
         num_tuftRS_to_suppyrRS    =  2  // small per Thomson   Bannister
//        num_tuftRS_to_suppyrFRB   = 20 
         num_tuftRS_to_suppyrFRB   =  2  // small per Thomson   Bannister
         num_tuftRS_to_supbask     = 20 
         num_tuftRS_to_supaxax     = 20 
         num_tuftRS_to_supLTS      = 20 
         num_tuftRS_to_spinstell   = 20 
         num_tuftRS_to_tuftIB      = 20 
         num_tuftRS_to_tuftRS      = 10 
         num_tuftRS_to_deepbask    = 20 
         num_tuftRS_to_deepaxax    = 20 
         num_tuftRS_to_deepLTS     = 20 
         num_tuftRS_to_nontuftRS   = 20 
        
         num_deepbask_to_spinstell = 20 
         num_deepbask_to_tuftIB    = 20 
         num_deepbask_to_tuftRS    = 20 
         num_deepbask_to_deepbask  = 20 
         num_deepbask_to_deepaxax  = 20 
         num_deepbask_to_deepLTS   = 20 
         num_deepbask_to_nontuftRS = 20 
         num_deepaxax_to_suppyrRS  =  5 
         num_deepaxax_to_suppyrFRB =  5 
         num_deepaxax_to_spinstell =  5 
         num_deepaxax_to_tuftIB    =  5 
         num_deepaxax_to_tuftRS    =  5 
         num_deepaxax_to_nontuftRS =  5 
         num_deepLTS_to_suppyrRS   = 10 
        
         num_deepLTS_to_suppyrFRB  = 10 
         num_deepLTS_to_supbask    = 10 
         num_deepLTS_to_supaxax    = 10 
         num_deepLTS_to_supLTS     = 10 
         num_deepLTS_to_spinstell  = 20 
         num_deepLTS_to_tuftIB     = 20 
         num_deepLTS_to_tuftRS     = 20 
         num_deepLTS_to_deepbask   = 20 
         num_deepLTS_to_deepaxax   = 20 
         num_deepLTS_to_deepLTS    = 20 
         num_deepLTS_to_nontuftRS  = 20 
         num_TCR_to_suppyrRS       = 10 
         num_TCR_to_suppyrFRB      = 10 
         num_TCR_to_supbask        = 10 
         num_TCR_to_supaxax        = 10 
//        num_TCR_to_spinstell      = 10 
         num_TCR_to_spinstell      = 20 
         num_TCR_to_tuftIB         = 10 
         num_TCR_to_tuftRS         = 10 
//        num_TCR_to_deepbask       = 10 
         num_TCR_to_deepbask       = 20 
         num_TCR_to_deepaxax       = 10 
         num_TCR_to_nRT            = 25  // note
         num_TCR_to_nontuftRS      = 10 
         num_nRT_to_TCR            = 15  // note
         num_nRT_to_nRT            = 10 
        
         num_nontuftRS_to_suppyrRS = 10 
         num_nontuftRS_to_suppyrFRB= 10 
         num_nontuftRS_to_supbask  = 10 
         num_nontuftRS_to_supaxax  = 10 
         num_nontuftRS_to_supLTS   = 10 
         num_nontuftRS_to_spinstell= 10 
         num_nontuftRS_to_tuftIB   = 10 
         num_nontuftRS_to_tuftRS   = 10 
         num_nontuftRS_to_deepbask = 10 
         num_nontuftRS_to_deepaxax = 10 
         num_nontuftRS_to_deepLTS  = 10 
         num_nontuftRS_to_TCR      = 20 
         num_nontuftRS_to_nRT      = 20 
         num_nontuftRS_to_nontuftRS= 20 

// Begin definition of number of compartments that can be
// contacted for each type of synaptic connection.
         ncompallow_suppyrRS_to_suppyrRS = 36 
         ncompallow_suppyrRS_to_suppyrFRB = 36 
         ncompallow_suppyrRS_to_supbask   = 24 
         ncompallow_suppyrRS_to_supaxax   = 24 
         ncompallow_suppyrRS_to_supLTS    = 24 
         ncompallow_suppyrRS_to_spinstell = 24 
         ncompallow_suppyrRS_to_tuftIB    =  8 
         ncompallow_suppyrRS_to_tuftRS    =  8 
         ncompallow_suppyrRS_to_deepbask  = 24 
         ncompallow_suppyrRS_to_deepaxax  = 24 
         ncompallow_suppyrRS_to_deepLTS   = 24 
         ncompallow_suppyrRS_to_nontuftRS =  7 

         ncompallow_suppyrFRB_to_suppyrRS = 36 
         ncompallow_suppyrFRB_to_suppyrFRB = 36 
         ncompallow_suppyrFRB_to_supbask   = 24 
         ncompallow_suppyrFRB_to_supaxax   = 24 
         ncompallow_suppyrFRB_to_supLTS    = 24 
         ncompallow_suppyrFRB_to_spinstell = 24 
         ncompallow_suppyrFRB_to_tuftIB    =  8 
         ncompallow_suppyrFRB_to_tuftRS    =  8 
         ncompallow_suppyrFRB_to_deepbask  = 24 
         ncompallow_suppyrFRB_to_deepaxax  = 24 
         ncompallow_suppyrFRB_to_deepLTS   = 24 
         ncompallow_suppyrFRB_to_nontuftRS =  7 

         ncompallow_supbask_to_suppyrRS   = 11 
         ncompallow_supbask_to_suppyrFRB   = 11 
         ncompallow_supbask_to_supbask     = 24 
         ncompallow_supbask_to_supaxax     = 24 
         ncompallow_supbask_to_supLTS      = 24 
         ncompallow_supbask_to_spinstell   =  5 

         ncompallow_supLTS_to_suppyrRS    = 53 
         ncompallow_supLTS_to_suppyrFRB    = 53 
         ncompallow_supLTS_to_supbask      = 40 
         ncompallow_supLTS_to_supaxax      = 40 
         ncompallow_supLTS_to_supLTS       = 40 
         ncompallow_supLTS_to_spinstell    = 40 
         ncompallow_supLTS_to_tuftIB       = 40 
         ncompallow_supLTS_to_tuftRS       = 40 
         ncompallow_supLTS_to_deepbask     = 20 
         ncompallow_supLTS_to_deepaxax     = 20 
         ncompallow_supLTS_to_deepLTS      = 20 
         ncompallow_supLTS_to_nontuftRS    = 29 

          ncompallow_spinstell_to_suppyrRS = 24 
         ncompallow_spinstell_to_suppyrFRB = 24 
         ncompallow_spinstell_to_supbask   = 24 
         ncompallow_spinstell_to_supaxax   = 24 
         ncompallow_spinstell_to_supLTS    = 24 
         ncompallow_spinstell_to_spinstell = 24 
         ncompallow_spinstell_to_tuftIB    = 12 
         ncompallow_spinstell_to_tuftRS    = 12 
         ncompallow_spinstell_to_deepbask  = 24 
         ncompallow_spinstell_to_deepaxax  = 24 
         ncompallow_spinstell_to_deepLTS   = 24 
         ncompallow_spinstell_to_nontuftRS =  5 

          ncompallow_tuftIB_to_suppyrRS   = 13 
         ncompallow_tuftIB_to_suppyrFRB    = 13 
         ncompallow_tuftIB_to_supbask      = 24 
         ncompallow_tuftIB_to_supaxax      = 24 
         ncompallow_tuftIB_to_supLTS       = 24 
         ncompallow_tuftIB_to_spinstell    = 24 
         ncompallow_tuftIB_to_tuftIB       = 46 
         ncompallow_tuftIB_to_tuftRS       = 46 
         ncompallow_tuftIB_to_deepbask     = 24 
         ncompallow_tuftIB_to_deepaxax     = 24 
         ncompallow_tuftIB_to_deepLTS      = 24 
         ncompallow_tuftIB_to_nontuftRS    = 43 

          ncompallow_tuftRS_to_suppyrRS   = 13 
         ncompallow_tuftRS_to_suppyrFRB    = 13 
         ncompallow_tuftRS_to_supbask      = 24 
         ncompallow_tuftRS_to_supaxax      = 24 
         ncompallow_tuftRS_to_supLTS       = 24 
         ncompallow_tuftRS_to_spinstell    = 24 
         ncompallow_tuftRS_to_tuftIB       = 46 
         ncompallow_tuftRS_to_tuftRS       = 46 
         ncompallow_tuftRS_to_deepbask     = 24 
         ncompallow_tuftRS_to_deepaxax     = 24 
         ncompallow_tuftRS_to_deepLTS      = 24 
         ncompallow_tuftRS_to_nontuftRS    = 43 

          ncompallow_deepbask_to_spinstell = 5  
         ncompallow_deepbask_to_tuftIB     =  8 
         ncompallow_deepbask_to_tuftRS     =  8 
         ncompallow_deepbask_to_deepbask   = 24 
         ncompallow_deepbask_to_deepaxax   = 24 
         ncompallow_deepbask_to_deepLTS    = 24 
         ncompallow_deepbask_to_nontuftRS  =  8 

          ncompallow_deepLTS_to_suppyrRS = 53 
         ncompallow_deepLTS_to_suppyrFRB   = 53 
         ncompallow_deepLTS_to_supbask     = 20 
         ncompallow_deepLTS_to_supaxax     = 20 
         ncompallow_deepLTS_to_supLTS      = 20 
         ncompallow_deepLTS_to_spinstell   = 40 
         ncompallow_deepLTS_to_tuftIB      = 40 
         ncompallow_deepLTS_to_tuftRS      = 40 
         ncompallow_deepLTS_to_deepbask    = 40 
         ncompallow_deepLTS_to_deepaxax    = 40 
         ncompallow_deepLTS_to_deepLTS     = 40 
         ncompallow_deepLTS_to_nontuftRS   = 29 

         ncompallow_TCR_to_suppyrRS = 24 
         ncompallow_TCR_to_suppyrFRB    = 24 
         ncompallow_TCR_to_supbask      = 12 
         ncompallow_TCR_to_supaxax      = 12 
         ncompallow_TCR_to_spinstell    = 52 
         ncompallow_TCR_to_tuftIB       =  9 
         ncompallow_TCR_to_tuftRS       =  9 
         ncompallow_TCR_to_deepbask     = 12 
         ncompallow_TCR_to_deepaxax     = 12 
         ncompallow_TCR_to_nRT          = 12 
         ncompallow_TCR_to_nontuftRS    =  5 

         ncompallow_nRT_to_TCR  = 11 
         ncompallow_nRT_to_nRT = 53 

          ncompallow_nontuftRS_to_suppyrRS = 4 
          ncompallow_nontuftRS_to_suppyrFRB =  4 
          ncompallow_nontuftRS_to_supbask   = 24 
          ncompallow_nontuftRS_to_supaxax   = 24 
          ncompallow_nontuftRS_to_supLTS    = 24 
          ncompallow_nontuftRS_to_spinstell = 24 
          ncompallow_nontuftRS_to_tuftIB    = 46 
          ncompallow_nontuftRS_to_tuftRS    = 46 
          ncompallow_nontuftRS_to_deepbask  = 24 
          ncompallow_nontuftRS_to_deepaxax  = 24 
          ncompallow_nontuftRS_to_deepLTS   = 24 
          ncompallow_nontuftRS_to_TCR       = 90 
          ncompallow_nontuftRS_to_nRT       = 12 
          ncompallow_nontuftRS_to_nontuftRS = 43 
// End definition of number of allowed compartments that
// can be contacted for each sort of connection

// Note that gj form only between cells of a given type 
//  except suppyrRS/suppyrFRB   tuftIB/tuftRS
// gj/cell = 2 x total gj / # cells
// for proportions  see /home/traub/supergj/tests.f
           totaxgj_suppyrRS =  722
           totaxgj_suppyrFRB =   4 
           totaxgj_suppyr    =  74 
// totaxgj_suppyr = number of "mixed" gj between RS suppyr
// (1st col. of table) and FRB suppyr (3rd col. of table) cells
           totSDgj_supbask   = 200 
           totSDgj_supaxax   =   0 
           totSDgj_supLTS    = 200 
           totaxgj_spinstell = 240 
           totaxgj_tuftIB    = 350 
           totaxgj_tuftRS    = 350 
//          totaxgj_tuft      = 350 
           totaxgj_tuft      =  10 // decr. antidr. bursts in IB 
// totaxgj_tuft for mixed gj between tuftIB (1st) and tuftRS (next)
           totaxgj_nontuftRS = 500 
           totSDgj_deepbask  = 250 
           totSDgj_deepaxax  =   0 
           totSDgj_deepLTS   = 250 
           totaxgj_TCR       = 100  
           totSDgj_nRT       = 250
// Note: no gj between axoaxonic cells.

// Define number of compartments on a cell where a gj might form
           num_axgjcompallow_suppyrRS = 1
           num_axgjcompallow_suppyrFRB= 1
           num_SDgjcompallow_supbask  = 8
           num_SDgjcompallow_supLTS   = 8
           num_axgjcompallow_spinstell= 1
           num_axgjcompallow_tuftIB   = 1
           num_axgjcompallow_tuftRS   = 1
           num_axgjcompallow_nontuftRS= 1
           num_SDgjcompallow_deepbask = 8
           num_SDgjcompallow_deepLTS  = 8
           num_axgjcompallow_TCR      = 1
           num_SDgjcompallow_nRT      = 8

// for NEURON conversion do gap junctions need to be multiplied by a conversion
// factor?  What is the conversion factor?
// Define gap junction conductances.
           gapcon_suppyrRS  = 3.e-3
//          gapcon_suppyrRS  = 0.e-3 // to see if superf. lay. can follow 40 Hz
           gapcon_suppyrFRB = 3.e-3
//          gapcon_suppyrFRB = 0.e-3 // to see if superf. lay. can follow 40 Hz
           gapcon_supbask   = 1.e-3
           gapcon_supaxax   = 0.e-3
           gapcon_supLTS    = 1.e-3
           gapcon_spinstell = 3.e-3
//          gapcon_spinstell = 0.e-3 // to see if ctx follows 40 Hz from thal.
           gapcon_tuftIB    = 4.e-3
//          gapcon_tuftIB    = 0.e-3 // to decr. antidr. bursting
           gapcon_tuftRS    = 4.e-3
//          gapcon_tuftRS    = 0.e-3 // now follow 40 Hz?
           gapcon_nontuftRS = 4.e-3
//          gapcon_nontuftRS = 0.e-3 // to abolish VFO in lay. 6
           gapcon_deepbask  = 1.e-3
           gapcon_deepaxax  = 0.e-3
           gapcon_deepLTS   = 1.e-3
//          gapcon_TCR       = 3.e-3
           gapcon_TCR       = 0.e-3
           gapcon_nRT       = 1.e-3


// Assorted s
             dt = 0.002e0
             Mg = 1.50
// Castro-Alamancos J Physiol  disinhib. neocortex in vitro  uses
// Mg = 1.3
             NMDA_saturation_fact= 80.e0
//                                        = 5.e0

// NMDA conductance developed on one postsynaptic compartment 
// from one type of presynaptic cell  can be at most this
// factor x unitary conductance
// UNFORTUNATELY  with this scheme,if one NMDA cond. set to 0
// on a cell type, all NMDA conductances will be forced to 0
// on that cell type...

           thal_cort_delay = 1.e0
           cort_thal_delay = 5.e0
           how_often = 50
// how_often defines how many time steps between synaptic conductance
// updates, and between broadcastings of axonal voltages.
           axon_refrac_time = 1.5e0

// For these ectopic rate s, assume noisepe checked
// every 200 time steps = 0.4 ms = 1./2.5 ms
          noisepe_suppyrRS   = 1.e0 / (2.5e0 * 10000.e0) 
//                 1.d0 / (2.5e0 * 1000.e0) // USUAL

          noisepe_suppyrFRB  = 1.e0 / (2.5e0 * 10000.e0)
//                 1.d0 / (2.5e0 * 1000.e0) // USUAL

          noisepe_spinstell  =  1.0 / (2.5e0 * 1000.e0)
          noisepe_tuftIB     =  1.0 / (2.5e0 * 1000.e0)
          noisepe_tuftRS     =  1.0 / (2.5e0 * 1000.e0)
          noisepe_nontuftRS  =  1.0 / (2.5e0 * 1000.e0)
          noisepe_TCR        =  1.0 / (2.5e0 * 1000.e0)


// Synaptic conductance time constants. 
          tauAMPA_suppyrRS_to_suppyrRS=2.e0 
          tauNMDA_suppyrRS_to_suppyrRS=130.5e0 
          tauAMPA_suppyrRS_to_suppyrFRB=2.e0 
          tauNMDA_suppyrRS_to_suppyrFRB=130.e0  
          tauAMPA_suppyrRS_to_supbask  =.8e0   
          tauNMDA_suppyrRS_to_supbask  =100.e0 
          tauAMPA_suppyrRS_to_supaxax  =.8e0  
          tauNMDA_suppyrRS_to_supaxax  =100.e0 
          tauAMPA_suppyrRS_to_supLTS   =1.e0  
          tauNMDA_suppyrRS_to_supLTS   =100.e0 
          tauAMPA_suppyrRS_to_spinstell=2.e0   
          tauNMDA_suppyrRS_to_spinstell=130.e0 
          tauAMPA_suppyrRS_to_tuftIB   =2.e0   
          tauNMDA_suppyrRS_to_tuftIB   =130.e0 
          tauAMPA_suppyrRS_to_tuftRS   =2.e0   
          tauNMDA_suppyrRS_to_tuftRS   =130.e0 
          tauAMPA_suppyrRS_to_deepbask =.8e0   
          tauNMDA_suppyrRS_to_deepbask =100.e0 
          tauAMPA_suppyrRS_to_deepaxax =.8e0   
          tauNMDA_suppyrRS_to_deepaxax =100.e0 
          tauAMPA_suppyrRS_to_deepLTS  =1.e0   
          tauNMDA_suppyrRS_to_deepLTS  =100.e0 
          tauAMPA_suppyrRS_to_nontuftRS=2.e0   
          tauNMDA_suppyrRS_to_nontuftRS=130.e0 

          tauAMPA_suppyrFRB_to_suppyrRS=2.e0   
          tauNMDA_suppyrFRB_to_suppyrRS=130.e0  
          tauAMPA_suppyrFRB_to_suppyrFRB=2.e0   
          tauNMDA_suppyrFRB_to_suppyrFRB=130.e0 
          tauAMPA_suppyrFRB_to_supbask  =.8e0   
          tauNMDA_suppyrFRB_to_supbask  =100.e0 
          tauAMPA_suppyrFRB_to_supaxax  =.8e0  
          tauNMDA_suppyrFRB_to_supaxax  =100.e0 
          tauAMPA_suppyrFRB_to_supLTS   =1.e0  
          tauNMDA_suppyrFRB_to_supLTS   =100.e0 
          tauAMPA_suppyrFRB_to_spinstell=2.e0   
          tauNMDA_suppyrFRB_to_spinstell=130.e0 
          tauAMPA_suppyrFRB_to_tuftIB   =2.e0   
          tauNMDA_suppyrFRB_to_tuftIB   =130.e0 
          tauAMPA_suppyrFRB_to_tuftRS   =2.e0   
          tauNMDA_suppyrFRB_to_tuftRS   =130.e0
          tauAMPA_suppyrFRB_to_deepbask =.8e0   
          tauNMDA_suppyrFRB_to_deepbask =100.e0 
          tauAMPA_suppyrFRB_to_deepaxax =.8e0   
          tauNMDA_suppyrFRB_to_deepaxax =100.e0 
          tauAMPA_suppyrFRB_to_deepLTS  =1.e0   
          tauNMDA_suppyrFRB_to_deepLTS  =100.e0 
          tauAMPA_suppyrFRB_to_nontuftRS=2.e0   
          tauNMDA_suppyrFRB_to_nontuftRS=130.e0 

          tauGABA_supbask_to_suppyrRS   =6.e0  
          tauGABA_supbask_to_suppyrFRB  =6.e0  
          tauGABA_supbask_to_supbask    =3.e0  
          tauGABA_supbask_to_supaxax    =3.e0  
          tauGABA_supbask_to_supLTS     =3.e0  
          tauGABA_supbask_to_spinstell  =6.e0  

          tauGABA_supaxax_to_suppyrRS   =6.e0  
          tauGABA_supaxax_to_suppyrFRB  =6.e0  
          tauGABA_supaxax_to_spinstell  =6.e0  
          tauGABA_supaxax_to_tuftIB     =6.e0  
          tauGABA_supaxax_to_tuftRS     =6.e0  
          tauGABA_supaxax_to_nontuftRS  =6.e0  

          tauGABA_supLTS_to_suppyrRS    =20.e0 
          tauGABA_supLTS_to_suppyrFRB   =20.e0 
          tauGABA_supLTS_to_supbask     =20.e0 
          tauGABA_supLTS_to_supaxax     =20.e0 
          tauGABA_supLTS_to_supLTS      =20.e0 
          tauGABA_supLTS_to_spinstell   =20.e0 
          tauGABA_supLTS_to_tuftIB      =20.e0 
          tauGABA_supLTS_to_tuftRS      =20.e0 
          tauGABA_supLTS_to_deepbask    =20.e0 
          tauGABA_supLTS_to_deepaxax    =20.e0 
          tauGABA_supLTS_to_deepLTS     =20.e0 
          tauGABA_supLTS_to_nontuftRS   =20.e0  

          tauAMPA_spinstell_to_suppyrRS =2.e0  
          tauNMDA_spinstell_to_suppyrRS =130.e0 
          tauAMPA_spinstell_to_suppyrFRB=2.e0  
          tauNMDA_spinstell_to_suppyrFRB=130.e0 
          tauAMPA_spinstell_to_supbask  =.8e0  
          tauNMDA_spinstell_to_supbask  =100.e0
          tauAMPA_spinstell_to_supaxax  =.8e0  
          tauNMDA_spinstell_to_supaxax  =100.e0
          tauAMPA_spinstell_to_supLTS   =1.e0  
          tauNMDA_spinstell_to_supLTS   =100.e0
          tauAMPA_spinstell_to_spinstell=2.e0  
          tauNMDA_spinstell_to_spinstell=130.e0 
          tauAMPA_spinstell_to_tuftIB   =2.e0  
          tauNMDA_spinstell_to_tuftIB   =130.e0 
          tauAMPA_spinstell_to_tuftRS   =2.e0  
          tauNMDA_spinstell_to_tuftRS   =130.e0
          tauAMPA_spinstell_to_deepbask =.8e0  
          tauNMDA_spinstell_to_deepbask =100.e0
          tauAMPA_spinstell_to_deepaxax =.8e0  
          tauNMDA_spinstell_to_deepaxax =100.e0
          tauAMPA_spinstell_to_deepLTS  =1.e0  
          tauNMDA_spinstell_to_deepLTS  =100.e0
          tauAMPA_spinstell_to_nontuftRS=2.e0  
          tauNMDA_spinstell_to_nontuftRS=130.e0

          tauAMPA_tuftIB_to_suppyrRS    =2.e0 
          tauNMDA_tuftIB_to_suppyrRS    =130.e0
          tauAMPA_tuftIB_to_suppyrFRB   =2.e0 
          tauNMDA_tuftIB_to_suppyrFRB   =130.e0
          tauAMPA_tuftIB_to_supbask     =.8e0  
          tauNMDA_tuftIB_to_supbask     =100.e0 
          tauAMPA_tuftIB_to_supaxax     =.8e0  
          tauNMDA_tuftIB_to_supaxax     =100.e0 
          tauAMPA_tuftIB_to_supLTS      =1.e0  
          tauNMDA_tuftIB_to_supLTS      =100.e0 
          tauAMPA_tuftIB_to_spinstell   =2.e0   
          tauNMDA_tuftIB_to_spinstell   =130.e0 
          tauAMPA_tuftIB_to_tuftIB      =2.e0  
          tauNMDA_tuftIB_to_tuftIB      =130.e0 
          tauAMPA_tuftIB_to_tuftRS      =2.0e0 
          tauNMDA_tuftIB_to_tuftRS      =130.e0 
          tauAMPA_tuftIB_to_deepbask    =.8e0  
          tauNMDA_tuftIB_to_deepbask    =100.e0 
          tauAMPA_tuftIB_to_deepaxax    =.8e0  
          tauNMDA_tuftIB_to_deepaxax    =100.e0 
          tauAMPA_tuftIB_to_deepLTS     =1.e0  
          tauNMDA_tuftIB_to_deepLTS     =100.e0 
          tauAMPA_tuftIB_to_nontuftRS   =2.0e0 
          tauNMDA_tuftIB_to_nontuftRS   =130.e0 

          tauAMPA_tuftRS_to_suppyrRS    =2.e0 
          tauNMDA_tuftRS_to_suppyrRS    =130.e0
          tauAMPA_tuftRS_to_suppyrFRB   =2.e0 
          tauNMDA_tuftRS_to_suppyrFRB   =130.e0
          tauAMPA_tuftRS_to_supbask     =.8e0  
          tauNMDA_tuftRS_to_supbask     =100.e0 
          tauAMPA_tuftRS_to_supaxax     =.8e0  
          tauNMDA_tuftRS_to_supaxax     =100.e0 
          tauAMPA_tuftRS_to_supLTS      =1.e0  
          tauNMDA_tuftRS_to_supLTS      =100.e0 
          tauAMPA_tuftRS_to_spinstell   =2.e0  
          tauNMDA_tuftRS_to_spinstell   =130.e0 
          tauAMPA_tuftRS_to_tuftIB      =2.e0  
          tauNMDA_tuftRS_to_tuftIB      =130.e0 
          tauAMPA_tuftRS_to_tuftRS      =2.e0  
          tauNMDA_tuftRS_to_tuftRS      =130.e0 
          tauAMPA_tuftRS_to_deepbask    =.8e0  
          tauNMDA_tuftRS_to_deepbask    =100.e0 
          tauAMPA_tuftRS_to_deepaxax    =.8e0  
          tauNMDA_tuftRS_to_deepaxax    =100.e0 
          tauAMPA_tuftRS_to_deepLTS     =1.e0   
          tauNMDA_tuftRS_to_deepLTS     =100.e0 
          tauAMPA_tuftRS_to_nontuftRS   =2.e0  
          tauNMDA_tuftRS_to_nontuftRS   =130.e0 

          tauGABA_deepbask_to_spinstell =6.e0  
          tauGABA_deepbask_to_tuftIB    =6.e0  
          tauGABA_deepbask_to_tuftRS    =6.e0  
          tauGABA_deepbask_to_deepbask  =3.e0  
          tauGABA_deepbask_to_deepaxax  =3.e0  
          tauGABA_deepbask_to_deepLTS   =3.e0  
          tauGABA_deepbask_to_nontuftRS =6.e0  

          tauGABA_deepaxax_to_suppyrRS   =6.e0  
          tauGABA_deepaxax_to_suppyrFRB  =6.e0  
          tauGABA_deepaxax_to_spinstell  =6.e0  
          tauGABA_deepaxax_to_tuftIB     =6.e0  
          tauGABA_deepaxax_to_tuftRS     =6.e0  
          tauGABA_deepaxax_to_nontuftRS  =6.e0  

          tauGABA_deepLTS_to_suppyrRS    =20.e0 
          tauGABA_deepLTS_to_suppyrFRB   =20.e0 
          tauGABA_deepLTS_to_supbask     =20.e0 
          tauGABA_deepLTS_to_supaxax     =20.e0 
          tauGABA_deepLTS_to_supLTS      =20.e0 
          tauGABA_deepLTS_to_spinstell   =20.e0 
          tauGABA_deepLTS_to_tuftIB      =20.e0 
          tauGABA_deepLTS_to_tuftRS      =20.e0 
          tauGABA_deepLTS_to_deepbask    =20.e0 
          tauGABA_deepLTS_to_deepaxax    =20.e0 
          tauGABA_deepLTS_to_deepLTS     =20.e0 
          tauGABA_deepLTS_to_nontuftRS   =20.e0 

          tauAMPA_TCR_to_suppyrRS        =2.e0  
          tauNMDA_TCR_to_suppyrRS        =130.e0
          tauAMPA_TCR_to_suppyrFRB       =2.e0  
          tauNMDA_TCR_to_suppyrFRB       =130.e0
          tauAMPA_TCR_to_supbask         =1.e0  
          tauNMDA_TCR_to_supbask         =100.e0
          tauAMPA_TCR_to_supaxax         =1.e0  
          tauNMDA_TCR_to_supaxax         =100.e0 
          tauAMPA_TCR_to_spinstell       =2.0e0 
          tauNMDA_TCR_to_spinstell       =130.e0
          tauAMPA_TCR_to_tuftIB          =2.e0  
          tauNMDA_TCR_to_tuftIB          =130.e0
          tauAMPA_TCR_to_tuftRS          =2.e0  
          tauNMDA_TCR_to_tuftRS          =130.e0
          tauAMPA_TCR_to_deepbask        =1.e0  
          tauNMDA_TCR_to_deepbask        =100.e0
          tauAMPA_TCR_to_deepaxax        =1.e0  
          tauNMDA_TCR_to_deepaxax        =100.e0
          tauAMPA_TCR_to_nRT             =2.0e0      
          tauNMDA_TCR_to_nRT             =150.e0
          tauAMPA_TCR_to_nontuftRS       =2.0e0     
          tauNMDA_TCR_to_nontuftRS       =130.e0

//         tauGABA1_nRT_to_TCR             =10.e0 
//         tauGABA2_nRT_to_TCR             =30.e0 
//         tauGABA1_nRT_to_nRT             =18.e0 
//         tauGABA2_nRT_to_nRT             =89.e0 
// See notebook entry of 17 Feb. 2004.
// Speed these up per Huntsman & Huguenard (2000)
          tauGABA1_nRT_to_TCR             =3.30e0 
          tauGABA2_nRT_to_TCR             =10.e0 
          tauGABA1_nRT_to_nRT             = 9.e0 
          tauGABA2_nRT_to_nRT             =44.5e0 

          tauAMPA_nontuftRS_to_suppyrRS  =2.e0  
          tauNMDA_nontuftRS_to_suppyrRS  =130.e0
          tauAMPA_nontuftRS_to_suppyrFRB =2.e0  
          tauNMDA_nontuftRS_to_suppyrFRB =130.e0
          tauAMPA_nontuftRS_to_supbask   =.8e0  
          tauNMDA_nontuftRS_to_supbask   =100.e0
          tauAMPA_nontuftRS_to_supaxax   =.8e0  
          tauNMDA_nontuftRS_to_supaxax   =100.e0 
          tauAMPA_nontuftRS_to_supLTS    =1.0e0 
          tauNMDA_nontuftRS_to_supLTS    =100.e0
          tauAMPA_nontuftRS_to_spinstell =2.e0  
          tauNMDA_nontuftRS_to_spinstell =130.e0
          tauAMPA_nontuftRS_to_tuftIB    =2.e0  
          tauNMDA_nontuftRS_to_tuftIB    =130.e0
          tauAMPA_nontuftRS_to_tuftRS    =2.e0  
          tauNMDA_nontuftRS_to_tuftRS    =130.e0
          tauAMPA_nontuftRS_to_deepbask  =.8e0  
          tauNMDA_nontuftRS_to_deepbask  =100.e0
          tauAMPA_nontuftRS_to_deepaxax  =.8e0   
          tauNMDA_nontuftRS_to_deepaxax  =100.e0
     
       tauAMPA_nontuftRS_to_deepLTS   =1.e0  
       tauNMDA_nontuftRS_to_deepLTS   =100.e0
       tauAMPA_nontuftRS_to_TCR       =2.e0  
       tauNMDA_nontuftRS_to_TCR       =130.e0 
       tauAMPA_nontuftRS_to_nRT       =2.0e0 
       tauNMDA_nontuftRS_to_nRT       =100.e0 
       tauAMPA_nontuftRS_to_nontuftRS =2.e0  
       tauNMDA_nontuftRS_to_nontuftRS =130.e0 
// End definition of synaptic time constants

// Synaptic conductance scaling factors.
       gAMPA_suppyrRS_to_suppyrRS =0.25e-3
       gNMDA_suppyrRS_to_suppyrRS = 0.025e-3
       gAMPA_suppyrRS_to_suppyrFRB = 0.25e-3
       gNMDA_suppyrRS_to_suppyrFRB = 0.025e-3
       gAMPA_suppyrRS_to_supbask  =3.00e-3
       gNMDA_suppyrRS_to_supbask  =0.15e-3
       gAMPA_suppyrRS_to_supaxax  =3.0e-3
       gNMDA_suppyrRS_to_supaxax  =0.15e-3
       gAMPA_suppyrRS_to_supLTS   =2.0e-3
       gNMDA_suppyrRS_to_supLTS   =0.15e-3
       gAMPA_suppyrRS_to_spinstell = 0.10e-3
       gNMDA_suppyrRS_to_spinstell = 0.01e-3
       gAMPA_suppyrRS_to_tuftIB   =0.10e-3
       gNMDA_suppyrRS_to_tuftIB   =0.01e-3
       gAMPA_suppyrRS_to_tuftRS   =0.10e-3
       gNMDA_suppyrRS_to_tuftRS   =0.01e-3
       gAMPA_suppyrRS_to_deepbask =1.00e-3
       gNMDA_suppyrRS_to_deepbask =0.10e-3
       gAMPA_suppyrRS_to_deepaxax =1.00e-3
       gNMDA_suppyrRS_to_deepaxax =0.10e-3
       gAMPA_suppyrRS_to_deepLTS  =1.00e-3
       gNMDA_suppyrRS_to_deepLTS  =0.15e-3
       gAMPA_suppyrRS_to_nontuftRS = 0.50e-3
       gNMDA_suppyrRS_to_nontuftRS = 0.05e-3

       gAMPA_suppyrFRB_to_suppyrRS = 0.25e-3
       gNMDA_suppyrFRB_to_suppyrRS = 0.025e-3
       gAMPA_suppyrFRB_to_suppyrFRB = 0.25e-3
       gNMDA_suppyrFRB_to_suppyrFRB = .025e-3
       gAMPA_suppyrFRB_to_supbask  =3.00e-3
       gNMDA_suppyrFRB_to_supbask  =0.10e-3
       gAMPA_suppyrFRB_to_supaxax  =3.0e-3
       gNMDA_suppyrFRB_to_supaxax  =0.10e-3
       gAMPA_suppyrFRB_to_supLTS   =2.0e-3
       gNMDA_suppyrFRB_to_supLTS   =0.10e-3
       gAMPA_suppyrFRB_to_spinstell = 0.10e-3
       gNMDA_suppyrFRB_to_spinstell = 0.01e-3
       gAMPA_suppyrFRB_to_tuftIB   =0.10e-3
       gNMDA_suppyrFRB_to_tuftIB   =0.01e-3
       gAMPA_suppyrFRB_to_tuftRS   =0.10e-3
       gNMDA_suppyrFRB_to_tuftRS   =0.01e-3
       gAMPA_suppyrFRB_to_deepbask =1.00e-3
       gNMDA_suppyrFRB_to_deepbask =0.10e-3
       gAMPA_suppyrFRB_to_deepaxax =1.00e-3
       gNMDA_suppyrFRB_to_deepaxax =0.10e-3
       gAMPA_suppyrFRB_to_deepLTS  =1.00e-3
       gNMDA_suppyrFRB_to_deepLTS  =0.10e-3
       gAMPA_suppyrFRB_to_nontuftRS = 0.50e-3
       gNMDA_suppyrFRB_to_nontuftRS = 0.05e-3

       gGABA_supbask_to_suppyrRS   =1.2e-3
       gGABA_supbask_to_suppyrFRB  =1.2e-3
       gGABA_supbask_to_supbask    =0.2e-3
       gGABA_supbask_to_supaxax    =0.2e-3
       gGABA_supbask_to_supLTS     =0.5e-3
//      gGABA_supbask_to_spinstell  =0.7e-3
       gGABA_supbask_to_spinstell  =0.1e-3 // if main inhib. to spinstell from deep int.

       gGABA_supaxax_to_suppyrRS   =1.2e-3
       gGABA_supaxax_to_suppyrFRB  =1.2e-3
//      gGABA_supaxax_to_spinstell  =1.0e-3
       gGABA_supaxax_to_spinstell  =0.1e-3 // if main inhib. to spinstell from deep int.
       gGABA_supaxax_to_tuftIB     =1.0e-3
       gGABA_supaxax_to_tuftRS     =1.0e-3
       gGABA_supaxax_to_nontuftRS  =1.0e-3


       gGABA_supLTS_to_suppyrRS    =.01e-3
       gGABA_supLTS_to_suppyrFRB   =.01e-3
       gGABA_supLTS_to_supbask     =.01e-3
       gGABA_supLTS_to_supaxax     =.01e-3
       gGABA_supLTS_to_supLTS      =.05e-3
       gGABA_supLTS_to_spinstell   =.01e-3
       gGABA_supLTS_to_tuftIB      =.02e-3
       gGABA_supLTS_to_tuftRS      =.02e-3
       gGABA_supLTS_to_deepbask    =.01e-3
       gGABA_supLTS_to_deepaxax    =.01e-3
       gGABA_supLTS_to_deepLTS     =.05e-3
       gGABA_supLTS_to_nontuftRS   =.01e-3

       gAMPA_spinstell_to_suppyrRS =1.0e-3
       gNMDA_spinstell_to_suppyrRS =0.1e-3
       gAMPA_spinstell_to_suppyrFRB = 1.0e-3
       gNMDA_spinstell_to_suppyrFRB = 0.1e-3
       gAMPA_spinstell_to_supbask  =1.0e-3
       gNMDA_spinstell_to_supbask  =.15e-3
       gAMPA_spinstell_to_supaxax  =1.0e-3
       gNMDA_spinstell_to_supaxax  =.15e-3
       gAMPA_spinstell_to_supLTS   =1.0e-3
       gNMDA_spinstell_to_supLTS   =.15e-3
       gAMPA_spinstell_to_spinstell = 1.0e-3
       gNMDA_spinstell_to_spinstell = 0.1e-3
       gAMPA_spinstell_to_tuftIB   =1.0e-3
       gNMDA_spinstell_to_tuftIB   =0.1e-3
       gAMPA_spinstell_to_tuftRS   =1.0e-3
       gNMDA_spinstell_to_tuftRS   =0.1e-3
       gAMPA_spinstell_to_deepbask =1.0e-3
       gNMDA_spinstell_to_deepbask =.15e-3
       gAMPA_spinstell_to_deepaxax =1.0e-3
       gNMDA_spinstell_to_deepaxax =.15e-3
       gAMPA_spinstell_to_deepLTS  =1.0e-3
       gNMDA_spinstell_to_deepLTS  =.15e-3
       gAMPA_spinstell_to_nontuftRS = 1.0e-3
       gNMDA_spinstell_to_nontuftRS = 0.1e-3

       gAMPA_tuftIB_to_suppyrRS    =0.5e-3
       gNMDA_tuftIB_to_suppyrRS    =0.05e-3
       gAMPA_tuftIB_to_suppyrFRB   =0.5e-3
       gNMDA_tuftIB_to_suppyrFRB   =0.05e-3
       gAMPA_tuftIB_to_supbask     =1.0e-3
       gNMDA_tuftIB_to_supbask     =0.15e-3
       gAMPA_tuftIB_to_supaxax     =1.0e-3
       gNMDA_tuftIB_to_supaxax     =0.15e-3
       gAMPA_tuftIB_to_supLTS      =1.0e-3
       gNMDA_tuftIB_to_supLTS      =0.15e-3
       gAMPA_tuftIB_to_spinstell   =0.5e-3
       gNMDA_tuftIB_to_spinstell   =0.05e-3
       gAMPA_tuftIB_to_tuftIB      =2.0e-3
       gNMDA_tuftIB_to_tuftIB      =0.20e-3
       gAMPA_tuftIB_to_tuftRS      =2.0e-3
       gNMDA_tuftIB_to_tuftRS      =0.20e-3
       gAMPA_tuftIB_to_deepbask    =3.0e-3
       gNMDA_tuftIB_to_deepbask    =0.15e-3
       gAMPA_tuftIB_to_deepaxax    =3.0e-3
       gNMDA_tuftIB_to_deepaxax    =0.15e-3
       gAMPA_tuftIB_to_deepLTS     =2.0e-3
       gNMDA_tuftIB_to_deepLTS     =0.15e-3
       gAMPA_tuftIB_to_nontuftRS   =2.0e-3
       gNMDA_tuftIB_to_nontuftRS   =0.20e-3

       gAMPA_tuftRS_to_suppyrRS    =0.5e-3
       gNMDA_tuftRS_to_suppyrRS    =0.05e-3
       gAMPA_tuftRS_to_suppyrFRB   =0.5e-3
       gNMDA_tuftRS_to_suppyrFRB   =0.05e-3
       gAMPA_tuftRS_to_supbask     =1.0e-3
       gNMDA_tuftRS_to_supbask     =0.15e-3
       gAMPA_tuftRS_to_supaxax     =1.0e-3
       gNMDA_tuftRS_to_supaxax     =0.15e-3
       gAMPA_tuftRS_to_supLTS      =1.0e-3
       gNMDA_tuftRS_to_supLTS      =0.15e-3
       gAMPA_tuftRS_to_spinstell   =0.5e-3
       gNMDA_tuftRS_to_spinstell   =0.05e-3
       gAMPA_tuftRS_to_tuftIB      =1.0e-3
       gNMDA_tuftRS_to_tuftIB      =0.10e-3
       gAMPA_tuftRS_to_tuftRS      =1.0e-3
       gNMDA_tuftRS_to_tuftRS      =0.10e-3
       gAMPA_tuftRS_to_deepbask    =3.0e-3
       gNMDA_tuftRS_to_deepbask    =0.10e-3
       gAMPA_tuftRS_to_deepaxax    =3.0e-3
       gNMDA_tuftRS_to_deepaxax    =0.10e-3
       gAMPA_tuftRS_to_deepLTS     =2.0e-3
       gNMDA_tuftRS_to_deepLTS     =0.10e-3
       gAMPA_tuftRS_to_nontuftRS   =1.0e-3
       gNMDA_tuftRS_to_nontuftRS   =0.10e-3

//      gGABA_deepbask_to_spinstell =1.0e-3
       gGABA_deepbask_to_spinstell =1.5e-3 // ? suppress spiny stellate bursts ?
       gGABA_deepbask_to_tuftIB    =0.7e-3
       gGABA_deepbask_to_tuftRS    =0.7e-3
       gGABA_deepbask_to_deepbask  =0.2e-3
       gGABA_deepbask_to_deepaxax  =0.2e-3
       gGABA_deepbask_to_deepLTS   =0.7e-3
       gGABA_deepbask_to_nontuftRS =0.7e-3

       gGABA_deepaxax_to_suppyrRS   =1.0e-3
       gGABA_deepaxax_to_suppyrFRB  =1.0e-3
//      gGABA_deepaxax_to_spinstell  =1.0e-3
       gGABA_deepaxax_to_spinstell  =1.5e-3 // ? suppress spiny stellate bursts ?
       gGABA_deepaxax_to_tuftIB     =1.0e-3
       gGABA_deepaxax_to_tuftRS     =1.0e-3
       gGABA_deepaxax_to_nontuftRS  =1.0e-3

       gGABA_deepLTS_to_suppyrRS    =.01e-3
       gGABA_deepLTS_to_suppyrFRB   =.01e-3
       gGABA_deepLTS_to_supbask     =.01e-3
       gGABA_deepLTS_to_supaxax     =.01e-3
       gGABA_deepLTS_to_supLTS      =.05e-3
       gGABA_deepLTS_to_spinstell   =.01e-3
//      gGABA_deepLTS_to_tuftIB      =.02e-3
       gGABA_deepLTS_to_tuftIB      =.05e-3 // will this help suppress bursting?
       gGABA_deepLTS_to_tuftRS      =.02e-3
       gGABA_deepLTS_to_deepbask    =.01e-3
       gGABA_deepLTS_to_deepaxax    =.01e-3
       gGABA_deepLTS_to_deepLTS     =.05e-3
       gGABA_deepLTS_to_nontuftRS   =.01e-3

       gAMPA_TCR_to_suppyrRS        =0.5e-3
       gNMDA_TCR_to_suppyrRS        =0.05e-3
       gAMPA_TCR_to_suppyrFRB       =0.5e-3
       gNMDA_TCR_to_suppyrFRB       =0.05e-3
//      gAMPA_TCR_to_supbask         =1.0e-3
       gAMPA_TCR_to_supbask         =0.1e-3
// try a variation in which main feedforward inhibtion from thalamus
// is via deep interneurons.  May be necessary later to include special
// layer 4 interneurons
//      gNMDA_TCR_to_supbask         =.10e-3
       gNMDA_TCR_to_supbask         =.01e-3
//      gAMPA_TCR_to_supaxax         =1.0e-3
       gAMPA_TCR_to_supaxax         =0.1e-3
//      gNMDA_TCR_to_supaxax         =.10e-3
       gNMDA_TCR_to_supaxax         =.01e-3
       gAMPA_TCR_to_spinstell       =1.0e-3
       gNMDA_TCR_to_spinstell       =.10e-3
       gAMPA_TCR_to_tuftIB          =1.5e-3
       gNMDA_TCR_to_tuftIB          =.15e-3
       gAMPA_TCR_to_tuftRS          =1.5e-3
       gNMDA_TCR_to_tuftRS          =.15e-3
//      gAMPA_TCR_to_deepbask        =1.0e-3
       gAMPA_TCR_to_deepbask        =1.5e-3
       gNMDA_TCR_to_deepbask        =.10e-3
       gAMPA_TCR_to_deepaxax        =1.0e-3
       gNMDA_TCR_to_deepaxax        =.10e-3
       gAMPA_TCR_to_nRT             =0.75e-3   
       gNMDA_TCR_to_nRT             =.15e-3
       gAMPA_TCR_to_nontuftRS       =1.0e-3    
       gNMDA_TCR_to_nontuftRS       =.10e-3

//      gGABA_nRT_to_TCR             =1.0e-3
	objref gGABA_nRT_to_TCR
	gGABA_nRT_to_TCR = new Vector(num_nRT+1)

// Values here need to be set below  
       gGABA_nRT_to_nRT             =0.30e-3

       gAMPA_nontuftRS_to_suppyrRS  =0.5e-3
       gNMDA_nontuftRS_to_suppyrRS  =0.05e-3
       gAMPA_nontuftRS_to_suppyrFRB =0.5e-3
       gNMDA_nontuftRS_to_suppyrFRB =0.05e-3
       gAMPA_nontuftRS_to_supbask   =1.0e-3
       gNMDA_nontuftRS_to_supbask   =0.1e-3
       gAMPA_nontuftRS_to_supaxax   =1.0e-3
       gNMDA_nontuftRS_to_supaxax   =0.1e-3
       gAMPA_nontuftRS_to_supLTS    =1.0e-3
       gNMDA_nontuftRS_to_supLTS    =0.1e-3
       gAMPA_nontuftRS_to_spinstell =0.5e-3
       gNMDA_nontuftRS_to_spinstell =0.05e-3
       gAMPA_nontuftRS_to_tuftIB    =1.0e-3
       gNMDA_nontuftRS_to_tuftIB    =0.1e-3
       gAMPA_nontuftRS_to_tuftRS    =1.0e-3
       gNMDA_nontuftRS_to_tuftRS    =0.1e-3
       gAMPA_nontuftRS_to_deepbask  =3.0e-3
       gNMDA_nontuftRS_to_deepbask  =.10e-3
       gAMPA_nontuftRS_to_deepaxax  =3.0e-3
       gNMDA_nontuftRS_to_deepaxax  =.10e-3
       gAMPA_nontuftRS_to_deepLTS   =2.0e-3
       gNMDA_nontuftRS_to_deepLTS   =.10e-3
       gAMPA_nontuftRS_to_TCR       =.75e-3
       gNMDA_nontuftRS_to_TCR       =.075e-3
       gAMPA_nontuftRS_to_nRT       =0.5e-3
       gNMDA_nontuftRS_to_nRT       =0.05e-3
       gAMPA_nontuftRS_to_nontuftRS =1.0e-3
       gNMDA_nontuftRS_to_nontuftRS =0.1e-3
// End defining synaptic conductance scaling factors

// Begin definition of compartments where synaptic connections
// can form.
// Note: many of these arrays used to be INTEGER in FORTRAN.  Since all
// arrays in NEURON are double  that is why they are now double.
// all the plus ones added to the array bounds allow the use of FORTRAN
// index bounds (starting at 1 instead of 0)

	objref compallow_suppyrRS_to_suppyrRS
	compallow_suppyrRS_to_suppyrRS = new Vector()
	{compallow_suppyrRS_to_suppyrRS.append(0.1, 2,3,4,5,6,7,8,9,14,15,16,17,18,19,20,21,26, \
      27,28,29,30,31,32,33,10,11,12,13,22,23,24,25, \
      34,35,36,37)}

	objref compallow_suppyrRS_to_suppyrFRB
	compallow_suppyrRS_to_suppyrFRB=new Vector()
       {compallow_suppyrRS_to_suppyrFRB.append(0.1, 2,3,4,5,6,7,8,9,14,15,16,17,18,19,20,21,26, \
      27,28,29,30,31,32,33,10,11,12,13,22,23,24,25, \
      34,35,36,37)}

	objref compallow_suppyrRS_to_supbask
	compallow_suppyrRS_to_supbask=new Vector()
       {compallow_suppyrRS_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_supaxax
	compallow_suppyrRS_to_supaxax=new Vector()
       {compallow_suppyrRS_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_supLTS
	compallow_suppyrRS_to_supLTS=new Vector()
       {compallow_suppyrRS_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_spinstell
	compallow_suppyrRS_to_spinstell=new Vector()
       {compallow_suppyrRS_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_tuftIB
	compallow_suppyrRS_to_tuftIB=new Vector()
        {compallow_suppyrRS_to_tuftIB.append(0.1, 39,40,41,42,43,44,45,46)}

	objref compallow_suppyrRS_to_tuftRS
	compallow_suppyrRS_to_tuftRS=new Vector()
        {compallow_suppyrRS_to_tuftRS.append(0.1, 39,40,41,42,43,44,45,46)}

	objref compallow_suppyrRS_to_deepbask
	compallow_suppyrRS_to_deepbask=new Vector()
       {compallow_suppyrRS_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_deepaxax
	compallow_suppyrRS_to_deepaxax=new Vector()
       {compallow_suppyrRS_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_deepLTS
	compallow_suppyrRS_to_deepLTS=new Vector()
       {compallow_suppyrRS_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrRS_to_nontuftRS
	compallow_suppyrRS_to_nontuftRS=new Vector()
       {compallow_suppyrRS_to_nontuftRS.append(0.1, 38,39,40,41,42,43,44)}

	objref compallow_suppyrFRB_to_suppyrRS
       	compallow_suppyrFRB_to_suppyrRS=new Vector()
       {compallow_suppyrFRB_to_suppyrRS.append(0.1, 2,3,4,5,6,7,8,9,14,15,16,17,18,19,20,21,26, \
      27,28,29,30,31,32,33,10,11,12,13,22,23,24,25, \
      34,35,36,37)}

	objref compallow_suppyrFRB_to_suppyrFRB
	compallow_suppyrFRB_to_suppyrFRB=new Vector()
       {compallow_suppyrFRB_to_suppyrFRB.append(0.1, 2,3,4,5,6,7,8,9,14,15,16,17,18,19,20,21,26, \
      27,28,29,30,31,32,33,10,11,12,13,22,23,24,25,\
      34,35,36,37)}

	objref compallow_suppyrFRB_to_supbask
	compallow_suppyrFRB_to_supbask=new Vector()
       {compallow_suppyrFRB_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_supaxax
	compallow_suppyrFRB_to_supaxax=new Vector()
       {compallow_suppyrFRB_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_supLTS
	compallow_suppyrFRB_to_supLTS=new Vector()
       {compallow_suppyrFRB_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_spinstell
	compallow_suppyrFRB_to_spinstell=new Vector()
       {compallow_suppyrFRB_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_tuftIB
	compallow_suppyrFRB_to_tuftIB=new Vector()
       {compallow_suppyrFRB_to_tuftIB.append(0.1, 39,40,41,42,43,44,45,46)}


	objref compallow_suppyrFRB_to_tuftRS
       	compallow_suppyrFRB_to_tuftRS=new Vector()
       {compallow_suppyrFRB_to_tuftRS.append(0.1, 39,40,41,42,43,44,45,46)}

	objref compallow_suppyrFRB_to_deepbask
	compallow_suppyrFRB_to_deepbask=new Vector()
       {compallow_suppyrFRB_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_deepaxax
	compallow_suppyrFRB_to_deepaxax=new Vector()
       {compallow_suppyrFRB_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_deepLTS
	compallow_suppyrFRB_to_deepLTS=new Vector()
       {compallow_suppyrFRB_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_suppyrFRB_to_nontuftRS
	compallow_suppyrFRB_to_nontuftRS=new Vector()
       {compallow_suppyrFRB_to_nontuftRS.append(0.1, 38,39,40,41,42,43,44)}

	objref compallow_supbask_to_suppyrRS
	compallow_supbask_to_suppyrRS=new Vector()
       {compallow_supbask_to_suppyrRS.append(0.1, 1,2,3,4,5,6,7,8,9,38,39)}

	objref compallow_supbask_to_suppyrFRB
	compallow_supbask_to_suppyrFRB=new Vector()
      {compallow_supbask_to_suppyrFRB.append(0.1, 1,2,3,4,5,6,7,8,9,38,39)}

	objref compallow_supbask_to_supbask
 	compallow_supbask_to_supbask=new Vector()
      {compallow_supbask_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_supbask_to_supaxax
	compallow_supbask_to_supaxax=new Vector()
       {compallow_supbask_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_supbask_to_supLTS
	compallow_supbask_to_supLTS=new Vector()
       {compallow_supbask_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_supbask_to_spinstell
	compallow_supbask_to_spinstell=new Vector()
       {compallow_supbask_to_spinstell.append(0.1, 1,2,15,28,41)}


	objref compallow_supLTS_to_suppyrRS
	compallow_supLTS_to_suppyrRS=new Vector()
       {compallow_supLTS_to_suppyrRS.append(0.1, 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, \
       31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49, \
       50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66, \
       67,68)}

	objref compallow_supLTS_to_suppyrFRB
	compallow_supLTS_to_suppyrFRB=new Vector()
      {compallow_supLTS_to_suppyrFRB.append(0.1, 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, \
       31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49, \
       50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66, \
       67,68)}

	objref compallow_supLTS_to_supbask
	compallow_supLTS_to_supbask=new Vector()
      {compallow_supLTS_to_supbask.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_supLTS_to_supaxax
	compallow_supLTS_to_supaxax=new Vector()
      {compallow_supLTS_to_supaxax.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_supLTS_to_supLTS
	compallow_supLTS_to_supLTS=new Vector()
      {compallow_supLTS_to_supLTS.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_supLTS_to_spinstell
	compallow_supLTS_to_spinstell=new Vector()
      {compallow_supLTS_to_spinstell.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_supLTS_to_tuftIB
	compallow_supLTS_to_tuftIB=new Vector()
      {compallow_supLTS_to_tuftIB.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
        29,30,31,32,33,34,38,39,40,41,42,43,44,45,46,47, \
        48,49,50,51,52,53,54,55)}

	objref compallow_supLTS_to_tuftRS
	compallow_supLTS_to_tuftRS=new Vector()
      {compallow_supLTS_to_tuftRS.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
        29,30,31,32,33,34,38,39,40,41,42,43,44,45,46,47, \
        48,49,50,51,52,53,54,55)}

	objref compallow_supLTS_to_deepbask
	compallow_supLTS_to_deepbask=new Vector()
      {compallow_supLTS_to_deepbask.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
	47,48,49,50,51)}   

	objref compallow_supLTS_to_deepaxax
	compallow_supLTS_to_deepaxax=new Vector()
      {compallow_supLTS_to_deepaxax.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
	47,48,49,50,51)}

	objref compallow_supLTS_to_deepLTS
	compallow_supLTS_to_deepLTS=new Vector()
      {compallow_supLTS_to_deepLTS.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
	47,48,49,50,51)} 

	objref compallow_supLTS_to_nontuftRS
	compallow_supLTS_to_nontuftRS=new Vector()
      {compallow_supLTS_to_nontuftRS.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
	29,30,31,32,33,34,38,39,40,41,42,43,44)}  

//	objref compallow_spinstell_to_suppyrRS
//	compallow_spinstell_to_suppyrRS=new Vector()
// {compallow_spinstell_to_suppyrRS.append(0.1,  40,41,42,43,44,45,46,47,48,49,50,51,52)}

//	objref compallow_spinstell_to_suppyrFRB
//	compallow_spinstell_to_suppyrFRB=new Vector()
// {compallow_spinstell_to_suppyrFRB.append(0.1, 40,41,42,43,44,45,46,47,48,49,50,51,52)}

// 3 Mar. 2004: Feldmeyer, ..., Sakmann, J Physiol 2002 assert
// that in barrel ctx, spiny stellates go to basal dendrites of
// layer 2/3 pyramids
	objref compallow_spinstell_to_suppyrRS
	compallow_spinstell_to_suppyrRS=new Vector()
      {compallow_spinstell_to_suppyrRS.append(0.1,   2, 3, 4, 5, 6, 7, 8, 9,14,15,16,17,18,19,20,21, \
        26,27,28,29,30,31,32,33)}

	objref compallow_spinstell_to_suppyrFRB
	compallow_spinstell_to_suppyrFRB=new Vector()
      {compallow_spinstell_to_suppyrFRB.append(0.1,   2, 3, 4, 5, 6, 7, 8, 9,14,15,16,17,18,19,20,21, \
        26,27,28,29,30,31,32,33)}

	objref compallow_spinstell_to_supbask
	compallow_spinstell_to_supbask=new Vector()
       {compallow_spinstell_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_supaxax
	compallow_spinstell_to_supaxax=new Vector()
       {compallow_spinstell_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_supLTS
	compallow_spinstell_to_supLTS=new Vector()
       {compallow_spinstell_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_spinstell
	compallow_spinstell_to_spinstell=new Vector()
       {compallow_spinstell_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_tuftIB
	compallow_spinstell_to_tuftIB=new Vector()
       {compallow_spinstell_to_tuftIB.append(0.1,  7,8,9,10,11,12,36,37,38,39,40,41)}

	objref compallow_spinstell_to_tuftRS
	compallow_spinstell_to_tuftRS=new Vector()
       {compallow_spinstell_to_tuftRS.append(0.1,  7,8,9,10,11,12,36,37,38,39,40,41)}

	objref compallow_spinstell_to_deepbask
	compallow_spinstell_to_deepbask=new Vector()
       {compallow_spinstell_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_deepaxax
	compallow_spinstell_to_deepaxax=new Vector()
       {compallow_spinstell_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_deepLTS
	compallow_spinstell_to_deepLTS=new Vector()
       {compallow_spinstell_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_spinstell_to_nontuftRS
	compallow_spinstell_to_nontuftRS=new Vector()
       {compallow_spinstell_to_nontuftRS.append(0.1,  37,38,39,40,41)}

	objref compallow_tuftIB_to_suppyrRS
      	compallow_tuftIB_to_suppyrRS=new Vector()
       {compallow_tuftIB_to_suppyrRS.append(0.1,  40,41,42,43,44,45,46,47,48,49,50,51,52)}

	objref compallow_tuftIB_to_suppyrFRB
	compallow_tuftIB_to_suppyrFRB=new Vector()
      {compallow_tuftIB_to_suppyrFRB.append(0.1,  40,41,42,43,44,45,46,47,48,49,50,51,52)}

	objref compallow_tuftIB_to_supbask
       	compallow_tuftIB_to_supbask=new Vector()
      {compallow_tuftIB_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}
 
	objref compallow_tuftIB_to_supaxax
	compallow_tuftIB_to_supaxax=new Vector()
       {compallow_tuftIB_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_supLTS
	compallow_tuftIB_to_supLTS=new Vector()
       {compallow_tuftIB_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_spinstell
	compallow_tuftIB_to_spinstell=new Vector()
       {compallow_tuftIB_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_tuftIB
	compallow_tuftIB_to_tuftIB=new Vector()
       {compallow_tuftIB_to_tuftIB.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_tuftIB_to_tuftRS
	compallow_tuftIB_to_tuftRS=new Vector()
       {compallow_tuftIB_to_tuftRS.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_tuftIB_to_deepbask
	compallow_tuftIB_to_deepbask=new Vector()
       {compallow_tuftIB_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_deepaxax
	compallow_tuftIB_to_deepaxax=new Vector()
       {compallow_tuftIB_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_deepLTS
	compallow_tuftIB_to_deepLTS=new Vector()
       {compallow_tuftIB_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftIB_to_nontuftRS
	compallow_tuftIB_to_nontuftRS=new Vector()
       {compallow_tuftIB_to_nontuftRS.append(0.1, 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, \
        37,38,39,40,41,42,43,44)}

	objref compallow_tuftRS_to_suppyrRS
	compallow_tuftRS_to_suppyrRS=new Vector()
      {compallow_tuftRS_to_suppyrRS.append(0.1,  40,41,42,43,44,45,46,47,48,49,50,51,52)}

	objref compallow_tuftRS_to_suppyrFRB
      	compallow_tuftRS_to_suppyrFRB=new Vector()
      {compallow_tuftRS_to_suppyrFRB.append(0.1,  40,41,42,43,44,45,46,47,48,49,50,51,52)}

	objref compallow_tuftRS_to_supbask
	compallow_tuftRS_to_supbask=new Vector()
       {compallow_tuftRS_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_supaxax
	compallow_tuftRS_to_supaxax=new Vector()
       {compallow_tuftRS_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_supLTS
	compallow_tuftRS_to_supLTS=new Vector()
       {compallow_tuftRS_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_spinstell
	compallow_tuftRS_to_spinstell=new Vector()
       {compallow_tuftRS_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_tuftIB
	compallow_tuftRS_to_tuftIB=new Vector()
       {compallow_tuftRS_to_tuftIB.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_tuftRS_to_tuftRS
	compallow_tuftRS_to_tuftRS=new Vector()
       {compallow_tuftRS_to_tuftRS.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_tuftRS_to_deepbask
	compallow_tuftRS_to_deepbask=new Vector()
       {compallow_tuftRS_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_deepaxax
	compallow_tuftRS_to_deepaxax=new Vector()
       {compallow_tuftRS_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_deepLTS
	compallow_tuftRS_to_deepLTS=new Vector()
       {compallow_tuftRS_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_tuftRS_to_nontuftRS
	compallow_tuftRS_to_nontuftRS=new Vector()
       {compallow_tuftRS_to_nontuftRS.append(0.1, 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, \
        37,38,39,40,41,42,43,44)}

	objref compallow_deepbask_to_spinstell
	compallow_deepbask_to_spinstell=new Vector()
       {compallow_deepbask_to_spinstell.append(0.1, 1,2,15,28,41)}

	objref compallow_deepbask_to_tuftIB
	compallow_deepbask_to_tuftIB=new Vector()
       {compallow_deepbask_to_tuftIB.append(0.1,  1,2,3,4,5,6,35,36)}

	objref compallow_deepbask_to_tuftRS
	compallow_deepbask_to_tuftRS=new Vector()
      {compallow_deepbask_to_tuftRS.append(0.1,  1,2,3,4,5,6,35,36)}

	objref compallow_deepbask_to_deepbask
	compallow_deepbask_to_deepbask=new Vector()
      {compallow_deepbask_to_deepbask.append(0.1,5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_deepbask_to_deepaxax
	compallow_deepbask_to_deepaxax=new Vector()
       {compallow_deepbask_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_deepbask_to_deepLTS
	compallow_deepbask_to_deepLTS=new Vector()
       {compallow_deepbask_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_deepbask_to_nontuftRS
	compallow_deepbask_to_nontuftRS=new Vector()
       {compallow_deepbask_to_nontuftRS.append(0.1, 1,2,3,4,5,6,35,36)}

	objref compallow_deepLTS_to_suppyrRS
	compallow_deepLTS_to_suppyrRS=new Vector()
       {compallow_deepLTS_to_suppyrRS.append(0.1, 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, \
       31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49, \
       50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66, \
       67,68)}

	objref compallow_deepLTS_to_suppyrFRB
	compallow_deepLTS_to_suppyrFRB=new Vector()
      {compallow_deepLTS_to_suppyrFRB.append(0.1, 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, \
       31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,48,49, \
       50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66, \
       67,68)}

	objref compallow_deepLTS_to_supbask
	compallow_deepLTS_to_supbask=new Vector()
      {compallow_deepLTS_to_supbask.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
        47,48,49,50,51)} 

	objref compallow_deepLTS_to_supaxax
	compallow_deepLTS_to_supaxax=new Vector()
      {compallow_deepLTS_to_supaxax.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
        47,48,49,50,51)}

	objref compallow_deepLTS_to_supLTS
	compallow_deepLTS_to_supLTS=new Vector()
      {compallow_deepLTS_to_supLTS.append(0.1,  8,9,10,11,12,21,22,23,24,25,34,35,36,37,38, \
     47,48,49,50,51)}   

	objref compallow_deepLTS_to_spinstell
	compallow_deepLTS_to_spinstell=new Vector()
      {compallow_deepLTS_to_spinstell.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_deepLTS_to_tuftIB
	compallow_deepLTS_to_tuftIB=new Vector()
      {compallow_deepLTS_to_tuftIB.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
        29,30,31,32,33,34,38,39,40,41,42,43,44,45,46,47, \
        48,49,50,51,52,53,54,55)}

	objref compallow_deepLTS_to_tuftRS
	compallow_deepLTS_to_tuftRS=new Vector()
      {compallow_deepLTS_to_tuftRS.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
        29,30,31,32,33,34,38,39,40,41,42,43,44,45,46,47, \
        48,49,50,51,52,53,54,55)}

	objref compallow_deepLTS_to_deepbask
	compallow_deepLTS_to_deepbask=new Vector()
      {compallow_deepLTS_to_deepbask.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_deepLTS_to_deepaxax
	compallow_deepLTS_to_deepaxax=new Vector()
      {compallow_deepLTS_to_deepaxax.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_deepLTS_to_deepLTS
	compallow_deepLTS_to_deepLTS=new Vector()
      {compallow_deepLTS_to_deepLTS.append(0.1, 5,6,7,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25, \
       26,27,31,32,33,34,35,36,37,38,39,40, \
       44,45,46,47,48,49,50,51,52,53)}

	objref compallow_deepLTS_to_nontuftRS
	compallow_deepLTS_to_nontuftRS=new Vector()
      {compallow_deepLTS_to_nontuftRS.append(0.1,  13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28, \
       29,30,31,32,33,34,38,39,40,41,42,43,44)}

	objref compallow_TCR_to_suppyrRS
	compallow_TCR_to_suppyrRS=new Vector()
       {compallow_TCR_to_suppyrRS.append(0.1, 45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, \
        61,62,63,64,65,66,67,68)}

	objref compallow_TCR_to_suppyrFRB
	compallow_TCR_to_suppyrFRB=new Vector()
       {compallow_TCR_to_suppyrFRB.append(0.1, 45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60, \
        61,62,63,64,65,66,67,68)}

	objref compallow_TCR_to_supbask
	compallow_TCR_to_supbask=new Vector()
       {compallow_TCR_to_supbask.append(0.1, 2,3,4,15,16,17,28,29,30,41,42,43)}

	objref compallow_TCR_to_supaxax
	compallow_TCR_to_supaxax=new Vector()
       {compallow_TCR_to_supaxax.append(0.1, 2,3,4,15,16,17,28,29,30,41,42,43)}

        
	objref compallow_TCR_to_spinstell
	compallow_TCR_to_spinstell=new Vector()
       {compallow_TCR_to_spinstell.append(0.1, 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, \
        37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53)}

	objref compallow_TCR_to_tuftIB
	compallow_TCR_to_tuftIB=new Vector()
       {compallow_TCR_to_tuftIB.append(0.1,  47,48,49,50,51,52,53,54,55)}

	objref compallow_TCR_to_tuftRS
	compallow_TCR_to_tuftRS=new Vector()
       {compallow_TCR_to_tuftRS.append(0.1, 47,48,49,50,51,52,53,54,55)}
 
	objref compallow_TCR_to_deepbask
	compallow_TCR_to_deepbask=new Vector()
       {compallow_TCR_to_deepbask.append(0.1, 2,3,4,15,16,17,28,29,30,41,42,43)}

	objref compallow_TCR_to_deepaxax
	compallow_TCR_to_deepaxax=new Vector()
       {compallow_TCR_to_deepaxax.append(0.1, 2,3,4,15,16,17,28,29,30,41,42,43)}

	objref compallow_TCR_to_nRT
	compallow_TCR_to_nRT=new Vector()
       {compallow_TCR_to_nRT.append(0.1, 2,3,4,15,16,17,28,29,30,41,42,43)}

	objref compallow_TCR_to_nontuftRS
       	compallow_TCR_to_nontuftRS=new Vector()
       {compallow_TCR_to_nontuftRS.append(0.1, 40,41,42,43,44)}


	objref compallow_nRT_to_TCR
	compallow_nRT_to_TCR=new Vector()
       {compallow_nRT_to_TCR.append(0.1, 1,2,15,28,41,54,67,80,93,106,119)}

	objref compallow_nRT_to_nRT
       	compallow_nRT_to_nRT=new Vector()
       {compallow_nRT_to_nRT.append(0.1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, \
        20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35, \
        36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, \
        52,53)}

	objref compallow_nontuftRS_to_suppyrRS
	compallow_nontuftRS_to_suppyrRS=new Vector()
        {compallow_nontuftRS_to_suppyrRS.append(0.1,  41,42,43,44 )}

	objref compallow_nontuftRS_to_suppyrFRB
	compallow_nontuftRS_to_suppyrFRB=new Vector()
        {compallow_nontuftRS_to_suppyrFRB.append(0.1,  41,42,43,44)}


	objref compallow_nontuftRS_to_supbask
	compallow_nontuftRS_to_supbask=new Vector()
       {compallow_nontuftRS_to_supbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_supaxax
	compallow_nontuftRS_to_supaxax=new Vector()
       {compallow_nontuftRS_to_supaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_supLTS
	compallow_nontuftRS_to_supLTS=new Vector()
       {compallow_nontuftRS_to_supLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_spinstell
	compallow_nontuftRS_to_spinstell=new Vector()
       {compallow_nontuftRS_to_spinstell.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_tuftIB
	compallow_nontuftRS_to_tuftIB=new Vector()
       {compallow_nontuftRS_to_tuftIB.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_nontuftRS_to_tuftRS
	compallow_nontuftRS_to_tuftRS=new Vector()
       {compallow_nontuftRS_to_tuftRS.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, \
        38,39,40,41,42,43,44,45,46,47)}

	objref compallow_nontuftRS_to_deepbask
	compallow_nontuftRS_to_deepbask=new Vector()
       {compallow_nontuftRS_to_deepbask.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_deepaxax
	compallow_nontuftRS_to_deepaxax=new Vector()
       {compallow_nontuftRS_to_deepaxax.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_deepLTS
	compallow_nontuftRS_to_deepLTS=new Vector()
       {compallow_nontuftRS_to_deepLTS.append(0.1, 5,6,7,8,9,10,18,19,20,21,22,23,31,32,33,34,35,36, \
        44,45,46,47,48,49)}

	objref compallow_nontuftRS_to_TCR
	compallow_nontuftRS_to_TCR=new Vector()
       {compallow_nontuftRS_to_TCR.append(0.1,   6,  7,  8,  9, 10, 11, 12, 13, 14, \
         19, 20, 21, 22, 23, 24, 25, 26, 27, \
         32, 33, 34, 35, 36, 37, 38, 39, 40, \
         45, 46, 47, 48, 49, 50, 51, 52, 53, \
         58, 59, 60, 61, 62, 63, 64, 65, 66, \
         71, 72, 73, 74, 75, 76, 77, 78, 79, \
         84, 85, 86, 87, 88, 89, 90, 91, 92, \
         97, 98, 99,100,101,102,103,104,105, \
        110,111,112,113,114,115,116,117,118, \
        123,124,125,126,127,128,129,130,131)}

	objref compallow_nontuftRS_to_nRT
	compallow_nontuftRS_to_nRT=new Vector()
      {compallow_nontuftRS_to_nRT.append(0.1,  2,3,4,15,16,17,28,29,30,41,42,43)}

	objref compallow_nontuftRS_to_nontuftRS
	compallow_nontuftRS_to_nontuftRS=new Vector()
      {compallow_nontuftRS_to_nontuftRS.append(0.1,  2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, \
        21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, \
        37,38,39,40,41,42,43,44)}


// Maps of synaptic connectivity.  For simplicity, all contacts
// only made to one compartment.  Axoaxonic cells forced to contact 
// initial axon segments; other compartments will be listed in arrays.

      objref map_suppyrRS_to_suppyrRS, \
      map_suppyrRS_to_suppyrFRB, \
      map_suppyrRS_to_supbask,  \
      map_suppyrRS_to_supaxax, \
      map_suppyrRS_to_supLTS, \
      map_suppyrRS_to_spinstell, \
      map_suppyrRS_to_tuftIB,   \
      map_suppyrRS_to_tuftRS,  \
      map_suppyrRS_to_deepbask,  \
      map_suppyrRS_to_deepaxax,  \
      map_suppyrRS_to_deepLTS,  \
      map_suppyrRS_to_nontuftRS,  \
      map_suppyrFRB_to_suppyrRS


      map_suppyrRS_to_suppyrRS=new Matrix(num_suppyrRS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_suppyrRS_to_suppyrFRB=new Matrix(num_suppyrRS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_suppyrRS_to_supbask=new Matrix(num_suppyrRS_to_supbask+1, \
                                num_supbask+1)
      map_suppyrRS_to_supaxax=new Matrix(num_suppyrRS_to_supaxax+1, \
                                num_supaxax+1)
      map_suppyrRS_to_supLTS=new Matrix(num_suppyrRS_to_supLTS+1 , \
                                num_supLTS+1)
      map_suppyrRS_to_spinstell=new Matrix(num_suppyrRS_to_spinstell+1, \
                                num_spinstell+1)
      map_suppyrRS_to_tuftIB=new Matrix(num_suppyrRS_to_tuftIB+1, \
                                num_tuftIB+1)
      map_suppyrRS_to_tuftRS=new Matrix(num_suppyrRS_to_tuftRS+1, \
                                num_tuftRS+1)
      map_suppyrRS_to_deepbask=new Matrix(num_suppyrRS_to_deepbask+1, \
                                num_deepbask+1)
      map_suppyrRS_to_deepaxax=new Matrix(num_suppyrRS_to_deepaxax+1, \
                                num_deepaxax+1)
      map_suppyrRS_to_deepLTS=new Matrix(num_suppyrRS_to_deepLTS+1, \
                                num_deepLTS+1)
      map_suppyrRS_to_nontuftRS=new Matrix(num_suppyrRS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_suppyrFRB_to_suppyrRS=new Matrix(num_suppyrFRB_to_suppyrRS+1, \
                                num_suppyrRS+1)


	objref map_suppyrFRB_to_suppyrFRB, \
      map_suppyrFRB_to_supbask, \
      map_suppyrFRB_to_supaxax, \
      map_suppyrFRB_to_supLTS, \
      map_suppyrFRB_to_spinstell, \
      map_suppyrFRB_to_tuftIB, \
      map_suppyrFRB_to_tuftRS, \
      map_suppyrFRB_to_deepbask, \
      map_suppyrFRB_to_deepaxax, \
      map_suppyrFRB_to_deepLTS, \
      map_suppyrFRB_to_nontuftRS, \
      map_supbask_to_suppyrRS, \
      map_supbask_to_suppyrFRB, \
      map_supbask_to_supbask, \
      map_supbask_to_supaxax, \
      map_supbask_to_supLTS, \
      map_supbask_to_spinstell, \
      map_supaxax_to_suppyrRS, \
      map_supaxax_to_suppyrFRB, \
      map_supaxax_to_spinstell, \
      map_supaxax_to_tuftIB, \
      map_supaxax_to_tuftRS, \
      map_supaxax_to_nontuftRS, \
      map_supLTS_to_suppyrRS, \
      map_supLTS_to_suppyrFRB, \
      map_supLTS_to_supbask, \
      map_supLTS_to_supaxax, \
      map_supLTS_to_supLTS, \
      map_supLTS_to_spinstell, \
      map_supLTS_to_tuftIB, \
      map_supLTS_to_tuftRS, \
      map_supLTS_to_deepbask, \
      map_supLTS_to_deepaxax, \
      map_supLTS_to_deepLTS, \
      map_supLTS_to_nontuftRS, \
      map_spinstell_to_suppyrRS, \
      map_spinstell_to_suppyrFRB, \
      map_spinstell_to_supbask


      map_suppyrFRB_to_suppyrFRB=new Matrix(num_suppyrFRB_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_suppyrFRB_to_supbask=new Matrix(num_suppyrFRB_to_supbask+1, \
                                num_supbask+1)
      map_suppyrFRB_to_supaxax=new Matrix(num_suppyrFRB_to_supaxax+1, \
                                num_supaxax+1)
      map_suppyrFRB_to_supLTS=new Matrix(num_suppyrFRB_to_supLTS+1, \
                                num_supLTS+1)
      map_suppyrFRB_to_spinstell=new Matrix(num_suppyrFRB_to_spinstell+1, \
                                num_spinstell+1)
      map_suppyrFRB_to_tuftIB=new Matrix(num_suppyrFRB_to_tuftIB+1, \
                                num_tuftIB+1)
      map_suppyrFRB_to_tuftRS=new Matrix(num_suppyrFRB_to_tuftRS+1, \
                                num_tuftRS+1)
      map_suppyrFRB_to_deepbask=new Matrix(num_suppyrFRB_to_deepbask+1, \
                                num_deepbask+1)
      map_suppyrFRB_to_deepaxax=new Matrix(num_suppyrFRB_to_deepaxax+1, \
                                num_deepaxax+1)
      map_suppyrFRB_to_deepLTS=new Matrix(num_suppyrFRB_to_deepLTS+1, \
                                num_deepLTS+1)
      map_suppyrFRB_to_nontuftRS=new Matrix(num_suppyrFRB_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_supbask_to_suppyrRS=new Matrix(num_supbask_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_supbask_to_suppyrFRB=new Matrix(num_supbask_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_supbask_to_supbask=new Matrix(num_supbask_to_supbask+1, \
                                num_supbask+1)
      map_supbask_to_supaxax=new Matrix(num_supbask_to_supaxax+1, \
                                num_supaxax+1)
      map_supbask_to_supLTS=new Matrix(num_supbask_to_supLTS+1, \
                                num_supLTS+1)
      map_supbask_to_spinstell=new Matrix(num_supbask_to_spinstell+1, \
                                num_spinstell+1)
      map_supaxax_to_suppyrRS=new Matrix(num_supaxax_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_supaxax_to_suppyrFRB=new Matrix(num_supaxax_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_supaxax_to_spinstell=new Matrix(num_supaxax_to_spinstell+1, \
                                num_spinstell+1)
      map_supaxax_to_tuftIB=new Matrix(num_supaxax_to_tuftIB+1, \
                                num_tuftIB+1)
      map_supaxax_to_tuftRS=new Matrix(num_supaxax_to_tuftRS+1, \
                                num_tuftRS+1)
      map_supaxax_to_nontuftRS=new Matrix(num_supaxax_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_supLTS_to_suppyrRS=new Matrix(num_supLTS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_supLTS_to_suppyrFRB=new Matrix(num_supLTS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_supLTS_to_supbask=new Matrix(num_supLTS_to_supbask+1, \
                                num_supbask+1)
      map_supLTS_to_supaxax=new Matrix(num_supLTS_to_supaxax+1, \
                                num_supaxax+1)
      map_supLTS_to_supLTS=new Matrix(num_supLTS_to_supLTS+1, \
                                num_supLTS+1)
      map_supLTS_to_spinstell=new Matrix(num_supLTS_to_spinstell+1, \
                                num_spinstell+1)
      map_supLTS_to_tuftIB=new Matrix(num_supLTS_to_tuftIB+1, \
                                num_tuftIB+1)
      map_supLTS_to_tuftRS=new Matrix(num_supLTS_to_tuftRS+1, \
                                num_tuftRS+1)
      map_supLTS_to_deepbask=new Matrix(num_supLTS_to_deepbask+1, \
                                num_deepbask+1)
      map_supLTS_to_deepaxax=new Matrix(num_supLTS_to_deepaxax+1, \
                                num_deepaxax+1)
      map_supLTS_to_deepLTS=new Matrix(num_supLTS_to_deepLTS+1, \
                                num_deepLTS+1)
      map_supLTS_to_nontuftRS=new Matrix(num_supLTS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_spinstell_to_suppyrRS=new Matrix(num_spinstell_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_spinstell_to_suppyrFRB=new Matrix(num_spinstell_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_spinstell_to_supbask=new Matrix(num_spinstell_to_supbask+1, \
                                num_supbask+1)


      objref map_spinstell_to_supaxax, \
      map_spinstell_to_supLTS, \
      map_spinstell_to_spinstell, \
      map_spinstell_to_tuftIB, \
      map_spinstell_to_tuftRS, \
      map_spinstell_to_deepbask, \
      map_spinstell_to_deepaxax, \
      map_spinstell_to_deepLTS, \
      map_spinstell_to_nontuftRS, \
      map_tuftIB_to_suppyrRS, \
      map_tuftIB_to_suppyrFRB, \
      map_tuftIB_to_supbask, \
      map_tuftIB_to_supaxax, \
      map_tuftIB_to_supLTS, \
      map_tuftIB_to_spinstell, \
      map_tuftIB_to_tuftIB, \
      map_tuftIB_to_tuftRS, \
      map_tuftIB_to_deepbask, \
      map_tuftIB_to_deepaxax, \
      map_tuftIB_to_deepLTS, \
      map_tuftIB_to_nontuftRS, \
      map_tuftRS_to_suppyrRS, \
      map_tuftRS_to_suppyrFRB, \
      map_tuftRS_to_supbask, \
      map_tuftRS_to_supaxax, \
      map_tuftRS_to_supLTS

      map_spinstell_to_supaxax=new Matrix(num_spinstell_to_supaxax+1, \
                                num_supaxax+1)
      map_spinstell_to_supLTS=new Matrix(num_spinstell_to_supLTS+1, \
                                num_supLTS+1)
      map_spinstell_to_spinstell=new Matrix(num_spinstell_to_spinstell+1, \
                                num_spinstell+1)
      map_spinstell_to_tuftIB=new Matrix(num_spinstell_to_tuftIB+1, \
                                num_tuftIB+1)
      map_spinstell_to_tuftRS=new Matrix(num_spinstell_to_tuftRS+1, \
                                num_tuftRS+1)
      map_spinstell_to_deepbask=new Matrix(num_spinstell_to_deepbask+1, \
                                num_deepbask+1)
      map_spinstell_to_deepaxax=new Matrix(num_spinstell_to_deepaxax+1, \
                                num_deepaxax+1)
      map_spinstell_to_deepLTS=new Matrix(num_spinstell_to_deepLTS+1, \
                                num_deepLTS+1)
      map_spinstell_to_nontuftRS=new Matrix(num_spinstell_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_tuftIB_to_suppyrRS=new Matrix(num_tuftIB_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_tuftIB_to_suppyrFRB=new Matrix(num_tuftIB_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_tuftIB_to_supbask=new Matrix(num_tuftIB_to_supbask+1, \
                                num_supbask+1)
      map_tuftIB_to_supaxax=new Matrix(num_tuftIB_to_supaxax+1, \
                                num_supaxax+1)
      map_tuftIB_to_supLTS=new Matrix(num_tuftIB_to_supLTS+1, \
                                num_supLTS+1)
      map_tuftIB_to_spinstell=new Matrix(num_tuftIB_to_spinstell+1, \
                                num_spinstell+1)
      map_tuftIB_to_tuftIB=new Matrix(num_tuftIB_to_tuftIB+1, \
                                num_tuftIB+1)
      map_tuftIB_to_tuftRS=new Matrix(num_tuftIB_to_tuftRS+1, \
                                num_tuftRS+1)
      map_tuftIB_to_deepbask=new Matrix(num_tuftIB_to_deepbask+1, \
                                num_deepbask+1)
      map_tuftIB_to_deepaxax=new Matrix(num_tuftIB_to_deepaxax+1, \
                                num_deepaxax+1)
      map_tuftIB_to_deepLTS=new Matrix(num_tuftIB_to_deepLTS+1, \
                                num_deepLTS+1)
      map_tuftIB_to_nontuftRS=new Matrix(num_tuftIB_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_tuftRS_to_suppyrRS=new Matrix(num_tuftRS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_tuftRS_to_suppyrFRB=new Matrix(num_tuftRS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_tuftRS_to_supbask=new Matrix(num_tuftRS_to_supbask+1, \
                                num_supbask+1)
      map_tuftRS_to_supaxax=new Matrix(num_tuftRS_to_supaxax+1, \
                                num_supaxax+1)
      map_tuftRS_to_supLTS=new Matrix(num_tuftRS_to_supLTS+1, \
                                num_supLTS+1)


      objref map_tuftRS_to_spinstell, \
      map_tuftRS_to_tuftIB, \
      map_tuftRS_to_tuftRS, \
      map_tuftRS_to_deepbask, \
      map_tuftRS_to_deepaxax, \
      map_tuftRS_to_deepLTS, \
      map_tuftRS_to_nontuftRS, \
      map_deepbask_to_spinstell, \
      map_deepbask_to_tuftIB, \
      map_deepbask_to_tuftRS, \
      map_deepbask_to_deepbask, \
      map_deepbask_to_deepaxax, \
      map_deepbask_to_deepLTS

      map_tuftRS_to_spinstell=new Matrix(num_tuftRS_to_spinstell+1, \
                                num_spinstell+1)
      map_tuftRS_to_tuftIB=new Matrix(num_tuftRS_to_tuftIB+1, \
                                num_tuftIB+1)
      map_tuftRS_to_tuftRS=new Matrix(num_tuftRS_to_tuftRS+1, \
                                num_tuftRS+1)
      map_tuftRS_to_deepbask=new Matrix(num_tuftRS_to_deepbask+1, \
                                num_deepbask+1)
      map_tuftRS_to_deepaxax=new Matrix(num_tuftRS_to_deepaxax+1, \
                                num_deepaxax+1)
      map_tuftRS_to_deepLTS=new Matrix(num_tuftRS_to_deepLTS+1, \
                                num_deepLTS+1)
      map_tuftRS_to_nontuftRS=new Matrix(num_tuftRS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_deepbask_to_spinstell=new Matrix(num_deepbask_to_spinstell+1, \
                                num_spinstell+1)
      map_deepbask_to_tuftIB=new Matrix(num_deepbask_to_tuftIB+1, \
                                num_tuftIB+1)
      map_deepbask_to_tuftRS=new Matrix(num_deepbask_to_tuftRS+1, \
                                num_tuftRS+1)
      map_deepbask_to_deepbask=new Matrix(num_deepbask_to_deepbask+1, \
                                num_deepbask+1)
      map_deepbask_to_deepaxax=new Matrix(num_deepbask_to_deepaxax+1, \
                                num_deepaxax+1)
      map_deepbask_to_deepLTS=new Matrix(num_deepbask_to_deepLTS+1, \
                                num_deepLTS+1)


      objref map_deepbask_to_nontuftRS, \
      map_deepaxax_to_suppyrRS, \
      map_deepaxax_to_suppyrFRB, \
      map_deepaxax_to_spinstell, \
      map_deepaxax_to_tuftIB, \
      map_deepaxax_to_tuftRS, \
      map_deepaxax_to_nontuftRS, \
      map_deepLTS_to_suppyrRS, \
      map_deepLTS_to_suppyrFRB, \
      map_deepLTS_to_supbask, \
      map_deepLTS_to_supaxax, \
      map_deepLTS_to_supLTS, \
      map_deepLTS_to_spinstell, \
      map_deepLTS_to_tuftIB, \
      map_deepLTS_to_tuftRS, \
      map_deepLTS_to_deepbask, \
      map_deepLTS_to_deepaxax, \
      map_deepLTS_to_deepLTS, \
      map_deepLTS_to_nontuftRS, \
      map_TCR_to_suppyrRS, \
      map_TCR_to_suppyrFRB, \
      map_TCR_to_supbask

      map_deepbask_to_nontuftRS=new Matrix(num_deepbask_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_deepaxax_to_suppyrRS=new Matrix(num_deepaxax_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_deepaxax_to_suppyrFRB=new Matrix(num_deepaxax_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_deepaxax_to_spinstell=new Matrix(num_deepaxax_to_spinstell+1, \
                                num_spinstell+1)
      map_deepaxax_to_tuftIB=new Matrix(num_deepaxax_to_tuftIB+1, \
                                num_tuftIB+1)
      map_deepaxax_to_tuftRS=new Matrix(num_deepaxax_to_tuftRS+1, \
                                num_tuftRS+1)
      map_deepaxax_to_nontuftRS=new Matrix(num_deepaxax_to_nontuftRS+1, \
                                num_nontuftRS+1)
      map_deepLTS_to_suppyrRS=new Matrix(num_deepLTS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      map_deepLTS_to_suppyrFRB=new Matrix(num_deepLTS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      map_deepLTS_to_supbask=new Matrix(num_deepLTS_to_supbask+1, \
                                num_supbask+1)
      map_deepLTS_to_supaxax=new Matrix(num_deepLTS_to_supaxax+1, \
                                num_supaxax+1)
      map_deepLTS_to_supLTS=new Matrix(num_deepLTS_to_supLTS+1, \
                                num_supLTS+1)
      map_deepLTS_to_spinstell=new Matrix(num_deepLTS_to_spinstell+1, \
                                num_spinstell+1)
      map_deepLTS_to_tuftIB=new Matrix(num_deepLTS_to_tuftIB+1, \
                                num_tuftIB+1)
      map_deepLTS_to_tuftRS=new Matrix(num_deepLTS_to_tuftRS+1, \
                                 num_tuftRS+1)
      map_deepLTS_to_deepbask=new Matrix(num_deepLTS_to_deepbask+1, \
                                 num_deepbask+1)
      map_deepLTS_to_deepaxax=new Matrix(num_deepLTS_to_deepaxax+1, \
                                 num_deepaxax+1)
      map_deepLTS_to_deepLTS=new Matrix(num_deepLTS_to_deepLTS+1, \
                                 num_deepLTS+1)
      map_deepLTS_to_nontuftRS=new Matrix(num_deepLTS_to_nontuftRS+1, \
                                 num_nontuftRS+1)
      map_TCR_to_suppyrRS=new Matrix(num_TCR_to_suppyrRS+1, \
                                 num_suppyrRS+1)
      map_TCR_to_suppyrFRB=new Matrix(num_TCR_to_suppyrFRB+1, \
                                 num_suppyrFRB+1)
      map_TCR_to_supbask=new Matrix(num_TCR_to_supbask+1, \
                                 num_supbask+1)


      objref map_TCR_to_supaxax,    \
      map_TCR_to_spinstell, \
      map_TCR_to_tuftIB,   \
      map_TCR_to_tuftRS,     \
      map_TCR_to_deepbask,  \
      map_TCR_to_deepaxax, \
      map_TCR_to_nRT,     \
      map_TCR_to_nontuftRS,  \
      map_nRT_to_TCR,       \
      map_nRT_to_nRT

      map_TCR_to_supaxax=new Matrix(num_TCR_to_supaxax+1, num_supaxax+1)
      map_TCR_to_spinstell=new Matrix(num_TCR_to_spinstell+1,num_spinstell+1)
      map_TCR_to_tuftIB=new Matrix(num_TCR_to_tuftIB+1,num_tuftIB+1)
      map_TCR_to_tuftRS=new Matrix(num_TCR_to_tuftRS+1,num_tuftRS+1)
      map_TCR_to_deepbask=new Matrix(num_TCR_to_deepbask+1,num_deepbask+1)
      map_TCR_to_deepaxax=new Matrix(num_TCR_to_deepaxax+1,num_deepaxax+1)
      map_TCR_to_nRT=new Matrix(num_TCR_to_nRT+1,num_nRT+1)
      map_TCR_to_nontuftRS=new Matrix(num_TCR_to_nontuftRS+1,num_nontuftRS+1)
      map_nRT_to_TCR=new Matrix(num_nRT_to_TCR+1,num_TCR+1)
      map_nRT_to_nRT=new Matrix(num_nRT_to_nRT+1,num_nRT+1)


      objref map_nontuftRS_to_suppyrRS,  \
      map_nontuftRS_to_suppyrFRB, \
      map_nontuftRS_to_supbask,  \
      map_nontuftRS_to_supaxax, \
      map_nontuftRS_to_supLTS,   \
      map_nontuftRS_to_spinstell, \
      map_nontuftRS_to_tuftIB,   \
      map_nontuftRS_to_tuftRS,   \
      map_nontuftRS_to_deepbask,  \
      map_nontuftRS_to_deepaxax, \
      map_nontuftRS_to_deepLTS

      map_nontuftRS_to_suppyrRS=new Matrix(num_nontuftRS_to_suppyrRS+1, \
                                  num_suppyrRS+1)
      map_nontuftRS_to_suppyrFRB=new Matrix(num_nontuftRS_to_suppyrFRB+1, \
                                  num_suppyrFRB+1)
      map_nontuftRS_to_supbask=new Matrix(num_nontuftRS_to_supbask+1, \
                                  num_supbask+1)
      map_nontuftRS_to_supaxax=new Matrix(num_nontuftRS_to_supaxax+1, \
                                  num_supaxax+1)
      map_nontuftRS_to_supLTS=new Matrix(num_nontuftRS_to_supLTS+1, \
                                  num_supLTS+1)
      map_nontuftRS_to_spinstell=new Matrix(num_nontuftRS_to_spinstell+1, \
                                  num_spinstell+1)
      map_nontuftRS_to_tuftIB=new Matrix(num_nontuftRS_to_tuftIB+1, \
                                  num_tuftIB+1)
      map_nontuftRS_to_tuftRS=new Matrix(num_nontuftRS_to_tuftRS+1, \
                                  num_tuftRS+1)
      map_nontuftRS_to_deepbask=new Matrix(num_nontuftRS_to_deepbask+1, \
                                  num_deepbask+1)
      map_nontuftRS_to_deepaxax=new Matrix(num_nontuftRS_to_deepaxax+1, \
                                  num_deepaxax+1)
      map_nontuftRS_to_deepLTS=new Matrix(num_nontuftRS_to_deepLTS+1, \
                                  num_deepLTS+1)


      objref map_nontuftRS_to_TCR, \
      map_nontuftRS_to_nRT,   \
      map_nontuftRS_to_nontuftRS

      map_nontuftRS_to_TCR=new Matrix(num_nontuftRS_to_TCR+1,num_TCR+1)
      map_nontuftRS_to_nRT=new Matrix(num_nontuftRS_to_nRT+1,num_nRT+1)
      map_nontuftRS_to_nontuftRS=new Matrix(num_nontuftRS_to_nontuftRS+1, \
                                  num_nontuftRS+1)

// Maps of synaptic compartments.  For simplicity+1, all contacts
// only made to one compartment.  Axoaxonic cells forced to contact  
// initial axon segments; other compartments will be listed in arrays. 

      objref com_suppyrRS_to_suppyrRS, \
      com_suppyrRS_to_suppyrFRB, \
      com_suppyrRS_to_supbask, \
      com_suppyrRS_to_supaxax, \
      com_suppyrRS_to_supLTS, \
      com_suppyrRS_to_spinstell, \
      com_suppyrRS_to_tuftIB, \
      com_suppyrRS_to_tuftRS, \
      com_suppyrRS_to_deepbask, \
      com_suppyrRS_to_deepaxax, \
      com_suppyrRS_to_deepLTS, \
      com_suppyrRS_to_nontuftRS, \
      com_suppyrFRB_to_suppyrRS

      com_suppyrRS_to_suppyrRS=new Matrix(num_suppyrRS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_suppyrRS_to_suppyrFRB=new Matrix(num_suppyrRS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_suppyrRS_to_supbask=new Matrix(num_suppyrRS_to_supbask+1, \
                                num_supbask+1)
      com_suppyrRS_to_supaxax=new Matrix(num_suppyrRS_to_supaxax+1, \
                                num_supaxax+1)
      com_suppyrRS_to_supLTS=new Matrix(num_suppyrRS_to_supLTS+1 , \
                                num_supLTS+1)
      com_suppyrRS_to_spinstell=new Matrix(num_suppyrRS_to_spinstell+1, \
                                num_spinstell+1)
      com_suppyrRS_to_tuftIB=new Matrix(num_suppyrRS_to_tuftIB+1, \
                                num_tuftIB+1)
      com_suppyrRS_to_tuftRS=new Matrix(num_suppyrRS_to_tuftRS+1, \
                                num_tuftRS+1)
      com_suppyrRS_to_deepbask=new Matrix(num_suppyrRS_to_deepbask+1, \
                                num_deepbask+1)
      com_suppyrRS_to_deepaxax=new Matrix(num_suppyrRS_to_deepaxax+1, \
                                num_deepaxax+1)
      com_suppyrRS_to_deepLTS=new Matrix(num_suppyrRS_to_deepLTS+1, \
                                num_deepLTS+1)
      com_suppyrRS_to_nontuftRS=new Matrix(num_suppyrRS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_suppyrFRB_to_suppyrRS=new Matrix(num_suppyrFRB_to_suppyrRS+1, \
                                num_suppyrRS+1)

      objref com_suppyrFRB_to_suppyrFRB, \
      com_suppyrFRB_to_supbask, \
      com_suppyrFRB_to_supaxax, \
      com_suppyrFRB_to_supLTS, \
      com_suppyrFRB_to_spinstell, \
      com_suppyrFRB_to_tuftIB, \
      com_suppyrFRB_to_tuftRS, \
      com_suppyrFRB_to_deepbask, \
      com_suppyrFRB_to_deepaxax, \
      com_suppyrFRB_to_deepLTS, \
      com_suppyrFRB_to_nontuftRS, \
      com_supbask_to_suppyrRS, \
      com_supbask_to_suppyrFRB, \
      com_supbask_to_supbask, \
      com_supbask_to_supaxax, \
      com_supbask_to_supLTS, \
      com_supbask_to_spinstell, \
      com_supaxax_to_suppyrRS, \
      com_supaxax_to_suppyrFRB, \
      com_supaxax_to_spinstell

      com_suppyrFRB_to_suppyrFRB=new Matrix(num_suppyrFRB_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_suppyrFRB_to_supbask=new Matrix(num_suppyrFRB_to_supbask+1, \
                                num_supbask+1)
      com_suppyrFRB_to_supaxax=new Matrix(num_suppyrFRB_to_supaxax+1, \
                                num_supaxax+1)
      com_suppyrFRB_to_supLTS=new Matrix(num_suppyrFRB_to_supLTS+1, \
                                num_supLTS+1)
      com_suppyrFRB_to_spinstell=new Matrix(num_suppyrFRB_to_spinstell+1, \
                                num_spinstell+1)
      com_suppyrFRB_to_tuftIB=new Matrix(num_suppyrFRB_to_tuftIB+1, \
                                num_tuftIB+1)
      com_suppyrFRB_to_tuftRS=new Matrix(num_suppyrFRB_to_tuftRS+1, \
                                num_tuftRS+1)
      com_suppyrFRB_to_deepbask=new Matrix(num_suppyrFRB_to_deepbask+1, \
                                num_deepbask+1)
      com_suppyrFRB_to_deepaxax=new Matrix(num_suppyrFRB_to_deepaxax+1, \
                                num_deepaxax+1)
      com_suppyrFRB_to_deepLTS=new Matrix(num_suppyrFRB_to_deepLTS+1, \
                                num_deepLTS+1)
      com_suppyrFRB_to_nontuftRS=new Matrix(num_suppyrFRB_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_supbask_to_suppyrRS=new Matrix(num_supbask_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_supbask_to_suppyrFRB=new Matrix(num_supbask_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_supbask_to_supbask=new Matrix(num_supbask_to_supbask+1, \
                                num_supbask+1)
      com_supbask_to_supaxax=new Matrix(num_supbask_to_supaxax+1, \
                                num_supaxax+1)
      com_supbask_to_supLTS=new Matrix(num_supbask_to_supLTS+1, \
                                num_supLTS+1)
      com_supbask_to_spinstell=new Matrix(num_supbask_to_spinstell+1, \
                                num_spinstell+1)
      com_supaxax_to_suppyrRS=new Matrix(num_supaxax_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_supaxax_to_suppyrFRB=new Matrix(num_supaxax_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_supaxax_to_spinstell=new Matrix(num_supaxax_to_spinstell+1, \
                                num_spinstell+1)


      objref com_supaxax_to_tuftIB, \
      com_supaxax_to_tuftRS, \
      com_supaxax_to_nontuftRS, \
      com_supLTS_to_suppyrRS, \
      com_supLTS_to_suppyrFRB, \
      com_supLTS_to_supbask, \
      com_supLTS_to_supaxax, \
      com_supLTS_to_supLTS, \
      com_supLTS_to_spinstell, \
      com_supLTS_to_tuftIB, \
      com_supLTS_to_tuftRS, \
      com_supLTS_to_deepbask, \
      com_supLTS_to_deepaxax, \
      com_supLTS_to_deepLTS, \
      com_supLTS_to_nontuftRS, \
      com_spinstell_to_suppyrRS, \
      com_spinstell_to_suppyrFRB, \
      com_spinstell_to_supbask, \
      com_spinstell_to_supaxax

      com_supaxax_to_tuftIB=new Matrix(num_supaxax_to_tuftIB+1, \
                                num_tuftIB+1)
      com_supaxax_to_tuftRS=new Matrix(num_supaxax_to_tuftRS+1, \
                                num_tuftRS+1)
      com_supaxax_to_nontuftRS=new Matrix(num_supaxax_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_supLTS_to_suppyrRS=new Matrix(num_supLTS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_supLTS_to_suppyrFRB=new Matrix(num_supLTS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_supLTS_to_supbask=new Matrix(num_supLTS_to_supbask+1, \
                                num_supbask+1)
      com_supLTS_to_supaxax=new Matrix(num_supLTS_to_supaxax+1, \
                                num_supaxax+1)
      com_supLTS_to_supLTS=new Matrix(num_supLTS_to_supLTS+1, \
                                num_supLTS+1)
      com_supLTS_to_spinstell=new Matrix(num_supLTS_to_spinstell+1, \
                                num_spinstell+1)
      com_supLTS_to_tuftIB=new Matrix(num_supLTS_to_tuftIB+1, \
                                num_tuftIB+1)
      com_supLTS_to_tuftRS=new Matrix(num_supLTS_to_tuftRS+1, \
                                num_tuftRS+1)
      com_supLTS_to_deepbask=new Matrix(num_supLTS_to_deepbask+1, \
                                num_deepbask+1)
      com_supLTS_to_deepaxax=new Matrix(num_supLTS_to_deepaxax+1, \
                                num_deepaxax+1)
      com_supLTS_to_deepLTS=new Matrix(num_supLTS_to_deepLTS+1, \
                                num_deepLTS+1)
      com_supLTS_to_nontuftRS=new Matrix(num_supLTS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_spinstell_to_suppyrRS=new Matrix(num_spinstell_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_spinstell_to_suppyrFRB=new Matrix(num_spinstell_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_spinstell_to_supbask=new Matrix(num_spinstell_to_supbask+1, \
                                num_supbask+1)
      com_spinstell_to_supaxax=new Matrix(num_spinstell_to_supaxax+1, \
                                num_supaxax+1)

      objref com_spinstell_to_supLTS, \
      com_spinstell_to_spinstell, \
      com_spinstell_to_tuftIB, \
      com_spinstell_to_tuftRS, \
      com_spinstell_to_deepbask, \
      com_spinstell_to_deepaxax, \
      com_spinstell_to_deepLTS, \
      com_spinstell_to_nontuftRS, \
      com_tuftIB_to_suppyrRS, \
      com_tuftIB_to_suppyrFRB, \
      com_tuftIB_to_supbask, \
      com_tuftIB_to_supaxax, \
      com_tuftIB_to_supLTS, \
      com_tuftIB_to_spinstell, \
      com_tuftIB_to_tuftIB, \
      com_tuftIB_to_tuftRS, \
      com_tuftIB_to_deepbask, \
      com_tuftIB_to_deepaxax, \
      com_tuftIB_to_deepLTS, \
      com_tuftIB_to_nontuftRS

      com_spinstell_to_supLTS=new Matrix(num_spinstell_to_supLTS+1, \
                                num_supLTS+1)
      com_spinstell_to_spinstell=new Matrix(num_spinstell_to_spinstell+1, \
                                num_spinstell+1)
      com_spinstell_to_tuftIB=new Matrix(num_spinstell_to_tuftIB+1, \
                                num_tuftIB+1)
      com_spinstell_to_tuftRS=new Matrix(num_spinstell_to_tuftRS+1, \
                                num_tuftRS+1)
      com_spinstell_to_deepbask=new Matrix(num_spinstell_to_deepbask+1, \
                                num_deepbask+1)
      com_spinstell_to_deepaxax=new Matrix(num_spinstell_to_deepaxax+1, \
                                num_deepaxax+1)
      com_spinstell_to_deepLTS=new Matrix(num_spinstell_to_deepLTS+1, \
                                num_deepLTS+1)
      com_spinstell_to_nontuftRS=new Matrix(num_spinstell_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_tuftIB_to_suppyrRS=new Matrix(num_tuftIB_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_tuftIB_to_suppyrFRB=new Matrix(num_tuftIB_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_tuftIB_to_supbask=new Matrix(num_tuftIB_to_supbask+1, \
                                num_supbask+1)
      com_tuftIB_to_supaxax=new Matrix(num_tuftIB_to_supaxax+1, \
                                num_supaxax+1)
      com_tuftIB_to_supLTS=new Matrix(num_tuftIB_to_supLTS+1, \
                                num_supLTS+1)
      com_tuftIB_to_spinstell=new Matrix(num_tuftIB_to_spinstell+1, \
                                num_spinstell+1)
      com_tuftIB_to_tuftIB=new Matrix(num_tuftIB_to_tuftIB+1, \
                                num_tuftIB+1)
      com_tuftIB_to_tuftRS=new Matrix(num_tuftIB_to_tuftRS+1, \
                                num_tuftRS+1)
      com_tuftIB_to_deepbask=new Matrix(num_tuftIB_to_deepbask+1, \
                                num_deepbask+1)
      com_tuftIB_to_deepaxax=new Matrix(num_tuftIB_to_deepaxax+1, \
                                num_deepaxax+1)
      com_tuftIB_to_deepLTS=new Matrix(num_tuftIB_to_deepLTS+1, \
                                num_deepLTS+1)
      com_tuftIB_to_nontuftRS=new Matrix(num_tuftIB_to_nontuftRS+1, \
                                num_nontuftRS+1)

      objref com_tuftRS_to_suppyrRS, \
      com_tuftRS_to_suppyrFRB, \
      com_tuftRS_to_supbask, \
      com_tuftRS_to_supaxax, \
      com_tuftRS_to_supLTS, \
      com_tuftRS_to_spinstell, \
      com_tuftRS_to_tuftIB, \
      com_tuftRS_to_tuftRS, \
      com_tuftRS_to_deepbask, \
      com_tuftRS_to_deepaxax, \
      com_tuftRS_to_deepLTS, \
      com_tuftRS_to_nontuftRS, \
      com_deepbask_to_spinstell, \
      com_deepbask_to_tuftIB, \
      com_deepbask_to_tuftRS, \
      com_deepbask_to_deepbask, \
      com_deepbask_to_deepaxax, \
      com_deepbask_to_deepLTS, \
      com_deepbask_to_nontuftRS

      com_tuftRS_to_suppyrRS=new Matrix(num_tuftRS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_tuftRS_to_suppyrFRB=new Matrix(num_tuftRS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_tuftRS_to_supbask=new Matrix(num_tuftRS_to_supbask+1, \
                                num_supbask+1)
      com_tuftRS_to_supaxax=new Matrix(num_tuftRS_to_supaxax+1, \
                                num_supaxax+1)
      com_tuftRS_to_supLTS=new Matrix(num_tuftRS_to_supLTS+1, \
                                num_supLTS+1)
      com_tuftRS_to_spinstell=new Matrix(num_tuftRS_to_spinstell+1, \
                                num_spinstell+1)
      com_tuftRS_to_tuftIB=new Matrix(num_tuftRS_to_tuftIB+1, \
                                num_tuftIB+1)
      com_tuftRS_to_tuftRS=new Matrix(num_tuftRS_to_tuftRS+1, \
                                num_tuftRS+1)
      com_tuftRS_to_deepbask=new Matrix(num_tuftRS_to_deepbask+1, \
                                num_deepbask+1)
      com_tuftRS_to_deepaxax=new Matrix(num_tuftRS_to_deepaxax+1, \
                                num_deepaxax+1)
      com_tuftRS_to_deepLTS=new Matrix(num_tuftRS_to_deepLTS+1, \
                                num_deepLTS+1)
      com_tuftRS_to_nontuftRS=new Matrix(num_tuftRS_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_deepbask_to_spinstell=new Matrix(num_deepbask_to_spinstell+1, \
                                num_spinstell+1)
      com_deepbask_to_tuftIB=new Matrix(num_deepbask_to_tuftIB+1, \
                                num_tuftIB+1)
      com_deepbask_to_tuftRS=new Matrix(num_deepbask_to_tuftRS+1, \
                                num_tuftRS+1)
      com_deepbask_to_deepbask=new Matrix(num_deepbask_to_deepbask+1, \
                                num_deepbask+1)
      com_deepbask_to_deepaxax=new Matrix(num_deepbask_to_deepaxax+1, \
                                num_deepaxax+1)
      com_deepbask_to_deepLTS=new Matrix(num_deepbask_to_deepLTS+1, \
                                num_deepLTS+1)
      com_deepbask_to_nontuftRS=new Matrix(num_deepbask_to_nontuftRS+1, \
                                num_nontuftRS+1)

      objref com_deepaxax_to_suppyrRS, \
      com_deepaxax_to_suppyrFRB, \
      com_deepaxax_to_spinstell, \
      com_deepaxax_to_tuftIB, \
      com_deepaxax_to_tuftRS, \
      com_deepaxax_to_nontuftRS, \
      com_deepLTS_to_suppyrRS, \
      com_deepLTS_to_suppyrFRB, \
      com_deepLTS_to_supbask, \
      com_deepLTS_to_supaxax, \
      com_deepLTS_to_supLTS, \
      com_deepLTS_to_spinstell, \
      com_deepLTS_to_tuftIB, \
      com_deepLTS_to_tuftRS, \
      com_deepLTS_to_deepbask, \
      com_deepLTS_to_deepaxax, \
      com_deepLTS_to_deepLTS

      com_deepaxax_to_suppyrRS=new Matrix(num_deepaxax_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_deepaxax_to_suppyrFRB=new Matrix(num_deepaxax_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_deepaxax_to_spinstell=new Matrix(num_deepaxax_to_spinstell+1, \
                                num_spinstell+1)
      com_deepaxax_to_tuftIB=new Matrix(num_deepaxax_to_tuftIB+1, \
                                num_tuftIB+1)
      com_deepaxax_to_tuftRS=new Matrix(num_deepaxax_to_tuftRS+1, \
                                num_tuftRS+1)
      com_deepaxax_to_nontuftRS=new Matrix(num_deepaxax_to_nontuftRS+1, \
                                num_nontuftRS+1)
      com_deepLTS_to_suppyrRS=new Matrix(num_deepLTS_to_suppyrRS+1, \
                                num_suppyrRS+1)
      com_deepLTS_to_suppyrFRB=new Matrix(num_deepLTS_to_suppyrFRB+1, \
                                num_suppyrFRB+1)
      com_deepLTS_to_supbask=new Matrix(num_deepLTS_to_supbask+1, \
                                num_supbask+1)
      com_deepLTS_to_supaxax=new Matrix(num_deepLTS_to_supaxax+1, \
                                num_supaxax+1)
      com_deepLTS_to_supLTS=new Matrix(num_deepLTS_to_supLTS+1, \
                                num_supLTS+1)
      com_deepLTS_to_spinstell=new Matrix(num_deepLTS_to_spinstell+1, \
                                num_spinstell+1)
      com_deepLTS_to_tuftIB=new Matrix(num_deepLTS_to_tuftIB+1, \
                                num_tuftIB+1)
      com_deepLTS_to_tuftRS=new Matrix(num_deepLTS_to_tuftRS+1, \
                                 num_tuftRS+1)
      com_deepLTS_to_deepbask=new Matrix(num_deepLTS_to_deepbask+1, \
                                 num_deepbask+1)
      com_deepLTS_to_deepaxax=new Matrix(num_deepLTS_to_deepaxax+1, \
                                 num_deepaxax+1)
      com_deepLTS_to_deepLTS=new Matrix(num_deepLTS_to_deepLTS+1, \
                                 num_deepLTS+1)

      objref com_deepLTS_to_nontuftRS, \
      com_TCR_to_suppyrRS, \
      com_TCR_to_suppyrFRB, \
      com_TCR_to_supbask


      com_deepLTS_to_nontuftRS=new Matrix(num_deepLTS_to_nontuftRS+1, \
                                 num_nontuftRS+1)
      com_TCR_to_suppyrRS=new Matrix(num_TCR_to_suppyrRS+1, \
                                 num_suppyrRS+1)
      com_TCR_to_suppyrFRB=new Matrix(num_TCR_to_suppyrFRB+1, \
                                 num_suppyrFRB+1)
      com_TCR_to_supbask=new Matrix(num_TCR_to_supbask+1, \
                                 num_supbask+1)


      objref com_TCR_to_supaxax,    \
      com_TCR_to_spinstell, \
      com_TCR_to_tuftIB,   \
      com_TCR_to_tuftRS,     \
      com_TCR_to_deepbask,  \
      com_TCR_to_deepaxax, \
      com_TCR_to_nRT,     \
      com_TCR_to_nontuftRS,  \
      com_nRT_to_TCR,       \
      com_nRT_to_nRT

      com_TCR_to_supaxax=new Matrix(num_TCR_to_supaxax+1, num_supaxax+1)
      com_TCR_to_spinstell=new Matrix(num_TCR_to_spinstell+1, num_spinstell+1)
      com_TCR_to_tuftIB=new Matrix(num_TCR_to_tuftIB+1, num_tuftIB+1)
      com_TCR_to_tuftRS=new Matrix(num_TCR_to_tuftRS+1, num_tuftRS+1)
      com_TCR_to_deepbask=new Matrix(num_TCR_to_deepbask+1, num_deepbask+1)
      com_TCR_to_deepaxax=new Matrix(num_TCR_to_deepaxax+1, num_deepaxax+1)
      com_TCR_to_nRT=new Matrix(num_TCR_to_nRT+1, num_nRT+1)
      com_TCR_to_nontuftRS=new Matrix(num_TCR_to_nontuftRS+1, num_nontuftRS+1)
      com_nRT_to_TCR=new Matrix(num_nRT_to_TCR+1, num_TCR+1)
      com_nRT_to_nRT=new Matrix(num_nRT_to_nRT+1, num_nRT+1)


      objref com_nontuftRS_to_suppyrRS, \
      com_nontuftRS_to_suppyrFRB, \
      com_nontuftRS_to_supbask, \
      com_nontuftRS_to_supaxax, \
      com_nontuftRS_to_supLTS, \
      com_nontuftRS_to_spinstell, \
      com_nontuftRS_to_tuftIB

      com_nontuftRS_to_suppyrRS=new Matrix(num_nontuftRS_to_suppyrRS+1, \
                                  num_suppyrRS+1)
      com_nontuftRS_to_suppyrFRB=new Matrix(num_nontuftRS_to_suppyrFRB+1, \
                                  num_suppyrFRB+1)
      com_nontuftRS_to_supbask=new Matrix(num_nontuftRS_to_supbask+1, \
                                  num_supbask+1)
      com_nontuftRS_to_supaxax=new Matrix(num_nontuftRS_to_supaxax+1, \
                                  num_supaxax+1)
      com_nontuftRS_to_supLTS=new Matrix(num_nontuftRS_to_supLTS+1, \
                                  num_supLTS+1)
      com_nontuftRS_to_spinstell=new Matrix(num_nontuftRS_to_spinstell+1, \
                                  num_spinstell+1)
      com_nontuftRS_to_tuftIB=new Matrix(num_nontuftRS_to_tuftIB+1, \
                                  num_tuftIB+1)


      objref com_nontuftRS_to_tuftRS, \
      com_nontuftRS_to_deepbask, \
      com_nontuftRS_to_deepaxax, \
      com_nontuftRS_to_deepLTS, \
      com_nontuftRS_to_TCR, \
      com_nontuftRS_to_nRT,   \
      com_nontuftRS_to_nontuftRS

      com_nontuftRS_to_tuftRS=new Matrix(num_nontuftRS_to_tuftRS+1, \
                                  num_tuftRS+1)
      com_nontuftRS_to_deepbask=new Matrix(num_nontuftRS_to_deepbask+1, \
                                  num_deepbask+1)
      com_nontuftRS_to_deepaxax=new Matrix(num_nontuftRS_to_deepaxax+1, \
                                  num_deepaxax+1)
      com_nontuftRS_to_deepLTS=new Matrix(num_nontuftRS_to_deepLTS+1, \
                                  num_deepLTS+1)
      com_nontuftRS_to_TCR=new Matrix(num_nontuftRS_to_TCR+1, num_TCR+1)
      com_nontuftRS_to_nRT=new Matrix(num_nontuftRS_to_nRT+1, num_nRT+1)
      com_nontuftRS_to_nontuftRS=new Matrix(num_nontuftRS_to_nontuftRS+1,  \
                                  num_nontuftRS+1)
 
// Entries in gjtable(fixed_row,col 1-4) are cell a, compart. of cell a with gj, 
//  cell b, compart. of cell b with gj; entries not repeated 
// which means that for given cell being integrated table 
// must be searched through cols. 1 and 3. 
        objref gjtable_suppyrRS, \
        gjtable_suppyrFRB, \
        gjtable_suppyr   , \
        gjtable_supbask  , \
        gjtable_supaxax  , \
        gjtable_supLTS   , \
        gjtable_spinstell, \
        gjtable_tuftIB   , \
        gjtable_tuftRS   , \
        gjtable_tuft     , \
        gjtable_nontuftRS, \
        gjtable_deepbask , \
        gjtable_deepaxax , \
        gjtable_deepLTS  , \
        gjtable_TCR      , \
        gjtable_nRT

        gjtable_suppyrFRB=new Matrix(totaxgj_suppyrFRB+1, 4+1)
        gjtable_suppyr   =new Matrix(totaxgj_suppyr+1, 4+1)
        gjtable_supbask  =new Matrix(totSDgj_supbask+1, 4+1)
        gjtable_supaxax  =new Matrix(1              +1, 4+1)
        gjtable_supLTS   =new Matrix(totSDgj_supLTS+1, 4+1)
        gjtable_spinstell=new Matrix(totaxgj_spinstell+1, 4+1)
        gjtable_tuftIB   =new Matrix(totaxgj_tuftIB+1, 4+1)
        gjtable_tuftRS   =new Matrix(totaxgj_tuftRS+1, 4+1)
        gjtable_tuft     =new Matrix(totaxgj_tuft+1, 4+1)
        gjtable_nontuftRS=new Matrix(totaxgj_nontuftRS+1, 4+1)
        gjtable_deepbask =new Matrix(totSDgj_deepbask+1, 4+1)
        gjtable_deepaxax =new Matrix(1               +1, 4+1)
        gjtable_deepLTS  =new Matrix(totSDgj_deepLTS+1, 4+1)
        gjtable_TCR      =new Matrix(totaxgj_TCR+1, 4+1)
        gjtable_nRT      =new Matrix(totSDgj_nRT+1, 4+1)
 
//     comment for above: 
// gjtable_suppyr for suppyrRS/suppyrFRB gj, with RS cell 
// in col. 1 and FRB cell in col. 3 
// gjtable_tuft for tuftIB/tuftRS gj, with IB cell 
// in col. 1 and RS cell in col. 3. 
 
 
// define compartments on which gj can form 
     objref table_axgjcompallow_suppyrRS, \
     table_axgjcompallow_suppyrFRB, \
     table_SDgjcompallow_supbask  , \
     table_SDgjcompallow_supLTS   , \
     table_axgjcompallow_spinstell, \
     table_axgjcompallow_tuftIB   , \
     table_axgjcompallow_tuftRS   , \
     table_axgjcompallow_nontuftRS, \
     table_SDgjcompallow_deepbask , \
     table_SDgjcompallow_deepLTS  , \
     table_axgjcompallow_TCR      , \
     table_SDgjcompallow_nRT
                
     table_axgjcompallow_suppyrRS=new Vector()
     table_axgjcompallow_suppyrFRB=new Vector()
     table_SDgjcompallow_supbask  =new Vector()
     table_SDgjcompallow_supLTS   =new Vector()
     table_axgjcompallow_spinstell=new Vector()
     table_axgjcompallow_tuftIB   =new Vector()
     table_axgjcompallow_tuftRS   =new Vector()
     table_axgjcompallow_nontuftRS=new Vector()
     table_SDgjcompallow_deepbask =new Vector()
     table_SDgjcompallow_deepLTS  =new Vector()
     table_axgjcompallow_TCR      =new Vector()
     table_SDgjcompallow_nRT      =new Vector()
                

// above was duplicated and split up to assign values:
// define compartments on which gj can form 
// note an extra 0.1 value is appended first to shift the indicies
// to FORTRAN style values start at index 1. 
// 0.1 will generate an
// error if ever accidentally used which will indicate that the index
// should have started at the next value (1 instead of index 0)

{
     table_axgjcompallow_suppyrRS.append(0.1,74)
     table_axgjcompallow_suppyrFRB.append(0.1, 74)
     table_SDgjcompallow_supbask.append(0.1,3,4,16,17,29,30,42,43)
     table_SDgjcompallow_supLTS.append(0.1, 3,4,16,17,29,30,42,43)
     table_axgjcompallow_spinstell.append(0.1,59)
     table_axgjcompallow_tuftIB.append(0.1, 61)
     table_axgjcompallow_tuftRS.append(0.1,61)
     table_axgjcompallow_nontuftRS.append(0.1,50)
     table_SDgjcompallow_deepbask.append(0.1, 3,4,16,17,29,30,42,43)
     table_SDgjcompallow_deepLTS.append(0.1, 3,4,16,17,29,30,42,43)
     table_axgjcompallow_TCR.append(0.1, 137)
     table_SDgjcompallow_nRT.append(0.1, 3,4,16,17,29,30,42,43)
}
 
//     in the below the // comments were uncommented above: 
// Ectopics to superficial pyr. cells then go to #72, see 
//   supergj.f 
//     table_SDgjcompallow_supbask  [num_SDgjcompallow_supbask  +1]
//               /3,4,16,17,29,30,42,43/, 
//     table_SDgjcompallow_supLTS   [num_SDgjcompallow_supLTS   +1]
//               /3,4,16,17,29,30,42,43/, 
//     table_axgjcompallow_spinstell[num_axgjcompallow_spinstell+1]
//               /59/, 
// Ectopics to spiny stellates then go to #57 
//     table_axgjcompallow_tuftIB   [num_axgjcompallow_tuftIB   +1]
//               /61/, 
//     table_axgjcompallow_tuftRS   [num_axgjcompallow_tuftRS   +1]
//               /61/, 
// Ectopics to tufted pyr. cells then go to #60 
//     table_axgjcompallow_nontuftRS[num_axgjcompallow_nontuftRS+1]
//               /50/, 
// Ectopics to nontufted deep pyr. cells then to #48 
//     table_SDgjcompallow_deepbask [num_SDgjcompallow_deepbask +1]
//               /3,4,16,17,29,30,42,43/, 
//     table_SDgjcompallow_deepLTS  [num_SDgjcompallow_deepLTS  +1]
//               /3,4,16,17,29,30,42,43/, 
//     table_axgjcompallow_TCR      [num_axgjcompallow_TCR      +1]
//               /137/, 
// Ectopics to TCR cells to #135 
//     table_SDgjcompallow_nRT      [num_SDgjcompallow_nRT      +1]
//               /3,4,16,17,29,30,42,43/ 
 
 
// dexptablesmall[i] = dexp[-z+1], i = int [z*1000.], 0<=z<=5. 
// dexptablebig  [i] = dexp[-z+1], i = int [z*10.], 0<=z<=100. 
        objref dexptablesmall // these actually have fortran values at
        objref  dexptablebig  // index 0 (see groucho.f)
        dexptablesmall= new Vector(5000+1) // these actually have fortran values at
        dexptablebig= new Vector(1000+1)  // index 0 (see groucho.f)
// Define arrays, constants, for voltages, applied currents, 
// synaptic conductances, random numbers, etc. 

// This was originally uncommented in the fortran code: 
//       double \
//       V_suppyrRS  [numcomp_suppyrRS+1][  num_suppyrRS+1], \
//       V_suppyrFRB [numcomp_suppyrFRB+1][ num_suppyrFRB+1],  \
//       V_supbask   [numcomp_supbask+1][   num_supbask+1],   \
//       V_supaxax   [numcomp_supaxax+1][   num_supaxax+1],  \
//       V_supLTS    [numcomp_supLTS+1][    num_supLTS+1],  \
//       V_spinstell [numcomp_spinstell+1][ num_spinstell+1], \
//       V_tuftIB    [numcomp_tuftIB+1][    num_tuftIB+1],   \
//       V_tuftRS    [numcomp_tuftRS+1][    num_tuftRS+1],  \
//       V_nontuftRS [numcomp_nontuftRS+1][ num_nontuftRS+1], \
//       V_deepbask  [numcomp_deepbask+1][  num_deepbask+1], \
//       V_deepaxax  [numcomp_deepaxax+1][  num_deepaxax+1], \
//       V_deepLTS   [numcomp_deepLTS+1][   num_deepLTS+1], \
//       V_TCR       [numcomp_TCR+1][       num_TCR+1],    \
//       V_nRT       [numcomp_nRT+1][       num_nRT+1]
//

// this seems like a good place to create the cells as they
// will then have corresponding quantities to the above

// localloadfile("cell_templates.hoc")

objref suppyrRS_[  num_suppyrRS+1]
objref suppyrFRB_[ num_suppyrFRB+1]
objref supbask_[   num_supbask+1]
objref supaxax_[   num_supaxax+1]
objref supLTS_[    num_supLTS+1]
objref spinstell_[ num_spinstell+1]
objref tuftIB_[    num_tuftIB+1]
objref tuftRS_[    num_tuftRS+1]
objref nontuftRS_[ num_nontuftRS+1]
objref deepbask_[  num_deepbask+1]
objref deepaxax_[  num_deepaxax+1]
objref deepLTS_[   num_deepLTS+1]
objref TCR_[       num_TCR+1]
objref nRT_[       num_nRT+1]

if (pmesg) print "Initializing Network"
if (small_model) {
	small_size_network = 40
if (pmesg) print "In test case only ",small_size_network,"cells of each type are created"
	num_suppyrRS = small_size_network
	num_suppyrFRB = small_size_network
	num_supbask = small_size_network
	num_supaxax = small_size_network
	num_supLTS = small_size_network
	num_spinstell = small_size_network
	num_tuftIB = small_size_network
	num_tuftRS = small_size_network
	num_nontuftRS = small_size_network
	num_deepbask = small_size_network
	num_deepaxax = small_size_network
	num_deepLTS = small_size_network
	num_TCR = small_size_network
	num_nRT = small_size_network
}

pnm.ncell = num_suppyrRS + \
	num_suppyrFRB + \
	num_supbask + \
	num_supaxax + \
	num_supLTS + \
	num_spinstell + \
	num_tuftIB + \
	num_tuftRS + \
	num_nontuftRS + \
	num_deepbask + \
	num_deepaxax + \
	num_deepLTS + \
	num_TCR + \
	num_nRT

gid_distribute()
if (pmesg) print "creating ", pnm.ncell," cells:"
if (pmesg) print ""

base_=-1	// variable keeps track of where cells start
// to find the nth cell of type celltype use celltype_base+n as
// index in cells list.
// Note that this converts a fortran style index 1, num_celltype
// to the cells list index (0, total_num_of_cells-1)

spacer = 0
space_between_cells = 10 // microns

func increment_spacer() {
     spacer = spacer + space_between_cells
     return spacer
}

if (pmesg) print "creating ",num_suppyrRS,"suppyrRS cells"
suppyrRS_base=base_
for i=1, num_suppyrRS {
   if (serial) {
      cell_append(new suppyrRS(), 0, 0, increment_spacer())
   } else {
      par_create("cell_append(new suppyrRS(), 0, 0, increment_spacer())")
   }
   base_ = base_ + 1
}

if (pmesg) print "creating ",num_suppyrFRB,"suppyrFRB cells"
suppyrFRB_base=base_
for i=1, num_suppyrFRB {
   if (serial) {
      cell_append(new suppyrFRB(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new suppyrFRB(), 0, 0, increment_spacer())")
   }
   base_ = base_ + 1
}

if (pmesg) print "creating ",num_supbask,"supbask cells"
supbask_base=base_
for i=1, num_supbask {
   if (serial) {
      cell_append(new supbask(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new supbask(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_supaxax,"supaxax cells"
supaxax_base=base_
for i=1, num_supaxax {
   if (serial) {
      cell_append(new supaxax(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new supaxax(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_supLTS,"supLTS cells"
supLTS_base=base_
for i=1, num_supLTS {
   if (serial) {
      cell_append(new supLTS(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new supLTS(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_spinstell,"spinstell cells"
spinstell_base=base_
for i=1, num_spinstell {
   if (serial) {
      cell_append(new spinstell(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new spinstell(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_tuftIB,"tuftIB cells"
tuftIB_base=base_
for i=1, num_tuftIB {
   if (serial) {
      cell_append(new tuftIB(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new tuftIB(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_tuftRS,"tuftRS cells"
tuftRS_base=base_
for i=1, num_tuftRS {
   if (serial) {
      cell_append(new tuftRS(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new tuftRS(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_nontuftRS,"nontuftRS cells"
nontuftRS_base=base_
for i=1, num_nontuftRS {
   if (serial) {
      cell_append(new nontuftRS(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new nontuftRS(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_deepbask,"deepbask cells"
deepbask_base=base_
for i=1, num_deepbask {
   if (serial) {
      cell_append(new deepbask(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new deepbask(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_deepaxax,"deepaxax cells"
deepaxax_base=base_
for i=1, num_deepaxax {
   if (serial) {
      cell_append(new deepaxax(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new deepaxax(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_deepLTS,"deepLTS cells"
deepLTS_base=base_
for i=1, num_deepLTS {
   if (serial) {
      cell_append(new deepLTS(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new deepLTS(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_TCR,"TCR cells"
TCR_base=base_
for i=1, num_TCR {
   if (serial) {
      cell_append(new TCR(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new TCR(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

if (pmesg) print "creating ",num_nRT,"nRT cells"
nRT_base=base_
for i=1, num_nRT {
   if (serial) {
      cell_append(new nRT(), 0, 0, increment_spacer())
   } else {
       par_create("cell_append(new nRT(), 0, 0, increment_spacer())")
   }
    base_ = base_ + 1
}

par_register_cells()
if (pmesg) print "Done creating cells"

// the following were current vectors that create an arbitrary amount of injected
// current in compartments in the cells, used during integration of the network
// These should be implemented in mod files as curr_inject mechanism that is
// inserted into each compartment desired as a point process.  Then the variables
// const.curr_inject and rand_mag.curr_inject determine the constant portion and
// the random portion of current injection into that compartment.
 
//       double \
	objref curr_suppyrRS
	curr_suppyrRS = new Matrix(numcomp_suppyrRS+1,  num_suppyrRS+1)
	objref curr_suppyrFRB
	curr_suppyrFRB = new Matrix(numcomp_suppyrFRB+1, num_suppyrFRB+1)
	objref curr_supbask
	curr_supbask = new Matrix(numcomp_supbask+1,   num_supbask+1)
	objref curr_supaxax
	curr_supaxax = new Matrix(numcomp_supaxax+1,   num_supaxax+1)
	objref curr_supLTS
	curr_supLTS = new Matrix(numcomp_supLTS+1,    num_supLTS+1)
	objref curr_spinstell
	curr_spinstell = new Matrix(numcomp_spinstell+1, num_spinstell+1)
	objref curr_tuftIB
	curr_tuftIB = new Matrix(numcomp_tuftIB+1,    num_tuftIB+1)
	objref curr_tuftRS
	curr_tuftRS = new Matrix(numcomp_tuftRS+1,    num_tuftRS+1)
	objref curr_nontuftRS
	curr_nontuftRS = new Matrix(numcomp_nontuftRS+1, num_nontuftRS+1)
	objref curr_deepbask
	curr_deepbask = new Matrix(numcomp_deepbask+1,  num_deepbask+1)
	objref curr_deepaxax
	curr_deepaxax = new Matrix(numcomp_deepaxax+1,  num_deepaxax+1)
	objref curr_deepLTS
	curr_deepLTS = new Matrix(numcomp_deepLTS+1,   num_deepLTS+1)
	objref curr_TCR
	curr_TCR = new Matrix(numcomp_TCR+1,       num_TCR+1)
	objref curr_nRT
	curr_nRT = new Matrix(numcomp_nRT+1,       num_nRT+1)
 
// The following used to hold the amount of instantaneous conductance in the
// AMPA, NMDA, and GABA_A receptors in each compartment.  
// In NEURON those values will be held in the gampa synaptic point process mechanism.

//      double \
//      gAMPA_suppyrRS   [numcomp_suppyrRS+1][  num_suppyrRS+1], \
//      gAMPA_suppyrFRB  [numcomp_suppyrFRB+1][ num_suppyrFRB+1],  \
//      gAMPA_supbask    [numcomp_supbask+1][   num_supbask+1],   \
//      gAMPA_supaxax    [numcomp_supaxax+1][   num_supaxax+1],  \
//      gAMPA_supLTS     [numcomp_supLTS+1][    num_supLTS+1],  \
//      gAMPA_spinstell  [numcomp_spinstell+1][ num_spinstell+1], \
//      gAMPA_tuftIB     [numcomp_tuftIB+1][    num_tuftIB+1],   \
//      gAMPA_tuftRS     [numcomp_tuftRS+1][    num_tuftRS+1],  \
//      gAMPA_nontuftRS  [numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      gAMPA_deepbask   [numcomp_deepbask+1][  num_deepbask+1], \
//      gAMPA_deepaxax   [numcomp_deepaxax+1][  num_deepaxax+1], \
//      gAMPA_deepLTS    [numcomp_deepLTS+1][   num_deepLTS+1], \
//      gAMPA_TCR        [numcomp_TCR+1][       num_TCR+1],    \
//      gAMPA_nRT        [numcomp_nRT+1][       num_nRT+1]
 
//       double \
//      gNMDA_suppyrRS   [numcomp_suppyrRS+1][  num_suppyrRS+1], \
//      gNMDA_suppyrFRB  [numcomp_suppyrFRB+1][ num_suppyrFRB+1],  \
//      gNMDA_supbask    [numcomp_supbask+1][   num_supbask+1],   \
//      gNMDA_supaxax    [numcomp_supaxax+1][   num_supaxax+1],  \
//      gNMDA_supLTS     [numcomp_supLTS+1][    num_supLTS+1],  \
//      gNMDA_spinstell  [numcomp_spinstell+1][ num_spinstell+1], \
//      gNMDA_tuftIB     [numcomp_tuftIB+1][    num_tuftIB+1],   \
//      gNMDA_tuftRS     [numcomp_tuftRS+1][    num_tuftRS+1],  \
//      gNMDA_nontuftRS  [numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      gNMDA_deepbask   [numcomp_deepbask+1][  num_deepbask+1], \
//      gNMDA_deepaxax   [numcomp_deepaxax+1][  num_deepaxax+1], \
//      gNMDA_deepLTS    [numcomp_deepLTS+1][   num_deepLTS+1], \
//      gNMDA_TCR        [numcomp_TCR+1][       num_TCR+1],    \
//      gNMDA_nRT        [numcomp_nRT+1][       num_nRT+1]
 
//       double \
//      gGABA_A_suppyrRS [numcomp_suppyrRS+1][  num_suppyrRS+1], \
//      gGABA_A_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1],  \
//      gGABA_A_supbask  [numcomp_supbask+1][   num_supbask+1],   \
//      gGABA_A_supaxax  [numcomp_supaxax+1][   num_supaxax+1],  \
//      gGABA_A_supLTS   [numcomp_supLTS+1][    num_supLTS+1],  \
//      gGABA_A_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      gGABA_A_tuftIB   [numcomp_tuftIB+1][    num_tuftIB+1],   \
//      gGABA_A_tuftRS   [numcomp_tuftRS+1][    num_tuftRS+1],  \
//      gGABA_A_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      gGABA_A_deepbask [numcomp_deepbask+1][  num_deepbask+1], \
//      gGABA_A_deepaxax [numcomp_deepaxax+1][  num_deepaxax+1], \
//      gGABA_A_deepLTS  [numcomp_deepLTS+1][   num_deepLTS+1], \
//      gGABA_A_TCR      [numcomp_TCR+1][       num_TCR+1],    \
//      gGABA_A_nRT      [numcomp_nRT+1][       num_nRT+1]

// The following FORTRAN mechanism variables are now contained in the NEURON
// mechanisms.
 
// define membrane and Ca state variables that must be passed 
// to subroutines 
//      double   chi_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//         mnaf_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mnap_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      hnaf_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mkdr_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mka_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      hka_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mk2_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1],  \
//      hk2_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mkm_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mkc_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mkahp_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mcat_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      hcat_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mcal_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1], \
//      mar_suppyrRS[numcomp_suppyrRS+1][ num_suppyrRS+1]
// 
//      double chi_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//         mnaf_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mnap_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      hnaf_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mkdr_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mka_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      hka_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mk2_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1],  \
//      hk2_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mkm_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mkc_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mkahp_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mcat_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      hcat_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mcal_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1], \
//      mar_suppyrFRB[numcomp_suppyrFRB+1][ num_suppyrFRB+1]
// 
//      double chi_supbask [numcomp_supbask , num_supbask+1] , \
//         mnaf_supbask [numcomp_supbask , num_supbask +1], \
//      mnap_supbask [numcomp_supbask , num_supbask +1], \
//      hnaf_supbask [numcomp_supbask , num_supbask +1], \
//      mkdr_supbask [numcomp_supbask , num_supbask +1], \
//      mka_supbask [numcomp_supbask , num_supbask +1], \
//      hka_supbask [numcomp_supbask , num_supbask +1], \
//      mk2_supbask [numcomp_supbask , num_supbask +1],  \
//      hk2_supbask [numcomp_supbask , num_supbask +1], \
//      mkm_supbask [numcomp_supbask , num_supbask +1], \
//      mkc_supbask [numcomp_supbask , num_supbask +1], \
//      mkahp_supbask [numcomp_supbask , num_supbask +1], \
//      mcat_supbask [numcomp_supbask , num_supbask +1], \
//      hcat_supbask [numcomp_supbask , num_supbask +1], \
//      mcal_supbask [numcomp_supbask , num_supbask +1], \
//      mar_supbask [numcomp_supbask , num_supbask +1]
// 
//      double   chi_supaxax [numcomp_supaxax , num_supaxax +1] , \
//         mnaf_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mnap_supaxax [numcomp_supaxax , num_supaxax +1], \
//      hnaf_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mkdr_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mka_supaxax [numcomp_supaxax , num_supaxax +1], \
//      hka_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mk2_supaxax [numcomp_supaxax , num_supaxax +1],  \
//      hk2_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mkm_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mkc_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mkahp_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mcat_supaxax [numcomp_supaxax , num_supaxax +1], \
//      hcat_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mcal_supaxax [numcomp_supaxax , num_supaxax +1], \
//      mar_supaxax [numcomp_supaxax , num_supaxax +1]
// 
//      double   chi_supLTS[numcomp_supLTS+1][ num_supLTS+1] ,\
//         mnaf_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mnap_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      hnaf_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mkdr_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mka_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      hka_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mk2_supLTS[numcomp_supLTS+1][ num_supLTS+1],  \
//      hk2_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mkm_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mkc_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mkahp_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mcat_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      hcat_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mcal_supLTS[numcomp_supLTS+1][ num_supLTS+1], \
//      mar_supLTS[numcomp_supLTS+1][ num_supLTS+1]
// 
//      double  chi_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//        mnaf_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mnap_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      hnaf_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mkdr_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mka_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      hka_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mk2_spinstell[numcomp_spinstell+1][ num_spinstell+1],  \
//      hk2_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mkm_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mkc_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mkahp_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mcat_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      hcat_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mcal_spinstell[numcomp_spinstell+1][ num_spinstell+1], \
//      mar_spinstell[numcomp_spinstell+1][ num_spinstell+1]
// 
// 
//       double  chi_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//         mnaf_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mnap_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      hnaf_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mkdr_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mka_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      hka_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mk2_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1],  \
//      hk2_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mkm_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mkc_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mkahp_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mcat_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      hcat_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mcal_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1], \
//      mar_tuftIB[numcomp_tuftIB+1][ num_tuftIB+1]
// 
//       double  chi_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//         mnaf_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mnap_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      hnaf_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mkdr_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mka_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      hka_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mk2_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1],  \
//      hk2_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mkm_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mkc_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mkahp_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mcat_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      hcat_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mcal_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1], \
//      mar_tuftRS[numcomp_tuftRS+1][ num_tuftRS+1]
// 
//       double  chi_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//         mnaf_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mnap_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      hnaf_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mkdr_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mka_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      hka_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mk2_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1],  \
//      hk2_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mkm_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mkc_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mkahp_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mcat_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      hcat_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mcal_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1], \
//      mar_nontuftRS[numcomp_nontuftRS+1][ num_nontuftRS+1]
// 
//       double  chi_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//         mnaf_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mnap_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      hnaf_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mkdr_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mka_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      hka_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mk2_deepbask[numcomp_deepbask+1][ num_deepbask+1],  \
//      hk2_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mkm_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mkc_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mkahp_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mcat_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      hcat_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mcal_deepbask[numcomp_deepbask+1][ num_deepbask+1], \
//      mar_deepbask[numcomp_deepbask+1][ num_deepbask+1]
// 
//       double  chi_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//         mnaf_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mnap_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      hnaf_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mkdr_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mka_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      hka_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mk2_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1],  \
//      hk2_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mkm_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mkc_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mkahp_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mcat_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      hcat_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mcal_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1], \
//      mar_deepaxax[numcomp_deepaxax+1][ num_deepaxax+1]
// 
//       double  chi_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//         mnaf_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mnap_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      hnaf_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mkdr_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mka_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      hka_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mk2_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1],  \
//      hk2_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mkm_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mkc_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mkahp_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mcat_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      hcat_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mcal_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1], \
//      mar_deepLTS[numcomp_deepLTS+1][ num_deepLTS+1]
// 
//       double  chi_TCR[numcomp_TCR+1][ num_TCR+1], \
//         mnaf_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mnap_TCR[numcomp_TCR+1][ num_TCR+1], \
//      hnaf_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mkdr_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mka_TCR[numcomp_TCR+1][ num_TCR+1], \
//      hka_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mk2_TCR[numcomp_TCR+1][ num_TCR+1],  \
//      hk2_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mkm_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mkc_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mkahp_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mcat_TCR[numcomp_TCR+1][ num_TCR+1], \
//      hcat_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mcal_TCR[numcomp_TCR+1][ num_TCR+1], \
//      mar_TCR[numcomp_TCR+1][ num_TCR+1]
// 
//       double  chi_nRT[numcomp_nRT+1][ num_nRT+1], \
//         mnaf_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mnap_nRT[numcomp_nRT+1][ num_nRT+1], \
//      hnaf_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mkdr_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mka_nRT[numcomp_nRT+1][ num_nRT+1], \
//      hka_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mk2_nRT[numcomp_nRT+1][ num_nRT+1],  \
//      hk2_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mkm_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mkc_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mkahp_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mcat_nRT[numcomp_nRT+1][ num_nRT+1], \
//      hcat_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mcal_nRT[numcomp_nRT+1][ num_nRT+1], \
//      mar_nRT[numcomp_nRT+1][ num_nRT+1]

// These vectors were used to supply random tonic and/or phasic currents
// to cells.  These rolls are given in NEURON to mechanisms.

//       double \
	objref ranvec_suppyrRS
	ranvec_suppyrRS = new Vector(num_suppyrRS+1)
	objref ranvec_suppyrFRB
	ranvec_suppyrFRB = new Vector(num_suppyrFRB+1)
	objref ranvec_supbask
	ranvec_supbask = new Vector(num_supbask+1)
	objref ranvec_supaxax
	ranvec_supaxax = new Vector(num_supaxax+1)
	objref ranvec_supLTS
	ranvec_supLTS = new Vector(num_supLTS+1)
	objref ranvec_spinstell
	ranvec_spinstell = new Vector(num_spinstell+1)
	objref ranvec_tuftIB
	ranvec_tuftIB = new Vector(num_tuftIB+1)
	objref ranvec_tuftRS
	ranvec_tuftRS = new Vector(num_tuftRS+1)
	objref ranvec_nontuftRS
	ranvec_nontuftRS = new Vector(num_nontuftRS+1)
	objref ranvec_deepbask
	ranvec_deepbask = new Vector(num_deepbask+1)
	objref ranvec_deepaxax
	ranvec_deepaxax = new Vector(num_deepaxax+1)
	objref ranvec_deepLTS
	ranvec_deepLTS = new Vector(num_deepLTS+1)
	objref ranvec_TCR
	ranvec_TCR = new Vector(num_TCR+1)
	objref ranvec_nRT
	ranvec_nRT = new Vector(num_nRT+1)

//	maybe this value will be used for a NEURON version of Traub's
//	choice of a random number generator:

	objref seed
	seed = new Vector()
        {seed.append(137.e0)}

// In NEURON the below FORTRAN voltage quantities will be shared with pointers.
 
// Define arrays for distal axon voltages which will be shared 
// between nodes. 
//         double \
//       distal_axon_suppyrRS  [num_suppyrRS+1], \
//       distal_axon_suppyrFRB [num_suppyrRS+1], \
//       distal_axon_supbask   [num_suppyrRS+1], \
//       distal_axon_supaxax   [num_suppyrRS+1], \
//       distal_axon_supLTS    [num_suppyrRS+1],  \
//       distal_axon_spinstell [num_suppyrRS+1],   \
//       distal_axon_tuftIB    [num_suppyrRS+1], \
//       distal_axon_tuftRS    [num_suppyrRS+1], \
//       distal_axon_nontuftRS [num_suppyrRS+1],  \
//       distal_axon_deepbask  [num_suppyrRS+1], \
//       distal_axon_deepaxax  [num_suppyrRS+1], \
//       distal_axon_deepLTS   [num_suppyrRS+1], \
//       distal_axon_TCR       [num_suppyrRS+1],  \
//       distal_axon_nRT       [num_suppyrRS+1], \
//       distal_axon_global    [14000+1] //14000 = 14 x num_suppyrRS \
 
//     about above: 
//      distal_axon_suppyrFRB [num_suppyrFRB+1], 
// make all distal_axon have the length max [num_celltype+1]
 
// distal_axon_global will be concatenation of individual 
// distal_axon vectors        
// positions 1      -  1000  suppyrRS axons 
//           1001   -  2000  suppyrFRB axons
//           2001   -  3000  supbask
//           3001   -  4000  supaxax
//           4001   -  5000  supLTS
//           5001   -  6000  spinstell
//           6001   -  7000  tuftIB
//           7001   -  8000  tuftRS
//           8001   -  9000  nontuftRS
//           9001   - 10000  deepbask
//          10001   - 11000  deepaxax
//          11001   - 12000  deepLTS
//          12001   - 13000  TCR
//          13001   - 14000  nRT

//** The below voltages will be shared in NEURON via pointers to the
//   compartment voltages.

// define arrays for axonal voltges+1][ needed for mixed gj
//         double  \
//         vax_suppyrRS [num_suppyrRS+1],  \
//         vax_suppyrFRB [num_suppyrFRB+1], \
//         vax_tuftIB [num_tuftIB+1], vax_tuftRS [num_tuftRS+1]

//** The below spike times and counts will be handled instead by NEURON's event
//   handling.  In the FORTRAN code these were used to compute the
//   difference between the last spike in a presynaptic cell and the
//   the current time for the purpose of computing the synaptic
//   conductances for the AMPA, NMDA, and GABA_A, wherever they exist(ed).
 
//         double \
//       outtime_suppyrRS  [5000+1][ num_suppyrRS+1], \
//       outtime_suppyrFRB [5000+1][ num_suppyrFRB+1], \
//       outtime_supbask   [5000+1][ num_supbask+1],  \
//       outtime_supaxax   [5000+1][ num_supaxax+1],  \
//       outtime_supLTS    [5000+1][ num_supLTS+1],    \
//       outtime_spinstell [5000+1][ num_spinstell+1],  \
//       outtime_tuftIB    [5000+1][ num_tuftIB+1],  \
//       outtime_tuftRS    [5000+1][ num_tuftRS+1],   \
//       outtime_nontuftRS [5000+1][ num_nontuftRS+1], \
//       outtime_deepbask  [5000+1][ num_deepbask+1], \
//       outtime_deepaxax  [5000+1][ num_deepaxax+1], \
//       outtime_deepLTS   [5000+1][ num_deepLTS+1],  \
//       outtime_TCR       [5000+1][ num_TCR+1],       \
//       outtime_nRT       [5000+1][ num_nRT+1]
 
//         double \
//       outctr_suppyrRS  [num_suppyrRS+1],  \
//       outctr_suppyrFRB [num_suppyrFRB+1], \
//       outctr_supbask   [num_supbask+1],  \
//       outctr_supaxax   [num_supaxax+1], \
//       outctr_supLTS    [num_supLTS+1], \
//       outctr_spinstell [num_spinstell+1], \
//       outctr_tuftIB    [num_tuftIB+1],  \
//       outctr_tuftRS    [num_tuftRS+1], \
//       outctr_nontuftRS [num_nontuftRS+1], \
//       outctr_deepbask  [num_deepbask+1], \
//       outctr_deepaxax  [num_deepaxax+1], \
//       outctr_deepLTS   [num_deepLTS+1], \
//       outctr_TCR       [num_TCR+1],  \
//       outctr_nRT       [num_nRT+1]


//        gettime, time1, time2, time, timtot, gettime  // original declar
       double  t_time[2]
// FORTRAN real's that do not need a declaration because they are not arrays:
// dtime, , e_time      // e_time is dtime output
//        time1, time2, time, timtot
//        presyntime, delta, dexparg, dexparg1, dexparg2
//       integer thisno, display /1/, O
//       integer info, nodes
//       z, z1, z2, 

	double outrcd[20]

//          include 'mpif.h'
// 	character* [MPI_MAXROCESSOR_NAME) name
//	integer resultlength
//        integer debug=0 // either 0 for normal or 1 for ignore 4 cells
                          // tuftRS, TCR, nontuftRS, tuftIB that report
                          // nan
// START EXECUTION PHASE
// this version will be mpif77
//          call trapfpe() // allows floating point exceptions to be trapped in gdb
//          call mpi_init (info)
//          call mpi_comm_rank(mpi_comm_world, thisno, info)
//          call mpi_comm_size(mpi_comm_world, nodes , info)

//	call MPI_GET_PROCESSOR_NAME(name,resultlength,ierr)
//	print *, 'Process ', rank, ' of ', size, ' is alive on ',name

//        write (*,2220)thisno, nodes, name
// 2220	FORMAT("Process ",I2," of ",I2," is alive on ",A18)
//        if (thisno.eq.0) then
//           print *,'dt = ',dt
//        endif

          time1 = 0.e0	//	 used to be =gettime()
          // dtime when called will give elapsed time from start of program

         // outtime_cellname(event_number, cell_number) records the time
	 // of the last presynaptic spike from that cell -tmm

//         for i = 1, 5000 {
//           for j = 1, num_cell {
// settings of outtime_cell[i][j]  = -1.e5 for all cells....
//           } // j {
//         } // do i {

//         timtot =  750.e0
//         timtot = 1600.e0
//          timtot = 0.02e0 // tiny debug time doesn't test 0.05 interval
//          timtot = 0.104e0 // debug time does test 0.05 interval (~40 secs to run)
                          // and writes one set of time points to the GROUNCO110 files
//          timtot = 0.5e0 // minimal time for 5 write's of output voltages (21 minutes)
//          timtot = 1.2e0 // debug time does test 0.05 interval 
//          timtot = dt     // enough for one time step
//          timtot =13.72e0 // took about 38 minutes to get to 6.8 ms then crashed in continued
                          // debuging
         timtot =64.4e0   // projected to take 6 hours at 5.59 minutes computing / msec model time

// the AMPA, NMDA, and GABA_A synapses are all
// alpha functions g = delta exp( -delta/tau )

/* the following generated by
grep distal_axon groucho_orig.f | grep \(L\) |grep  -v if
reveals the presynaptic compartments for chemical synapses:
        distal_axon_suppyrRS (L) = V_suppyrRS (72,L)
        distal_axon_suppyrFRB (L) = V_suppyrFRB (72,L)
        distal_axon_supbask   (L) = V_supbask   (59,L)
        distal_axon_supaxax   (L) = V_supaxax   (59,L)
        distal_axon_supLTS    (L) = V_supLTS    (59,L)
        distal_axon_spinstell (L) = V_spinstell (57,L)
        distal_axon_tuftIB    (L) = V_tuftIB    (60,L)
        distal_axon_tuftRS    (L) = V_tuftRS    (60,L)
        distal_axon_nontuftRS    (L) = V_nontuftRS    (48,L)
        distal_axon_deepbask     (L) = V_deepbask     (59,L)
        distal_axon_deepaxax     (L) = V_deepaxax     (59,L)
        distal_axon_deepLTS      (L) = V_deepLTS      (59,L)
        distal_axon_TCR          (L) = V_TCR          (135,L)
        distal_axon_nRT          (L) = V_nRT          (59,L)
The following variables capture these compartment numbers: */

suppyrRS_presyn_comp = 72
suppyrFRB_presyn_comp = 72
supbask_presyn_comp =  59
supaxax_presyn_comp =  59
supLTS_presyn_comp =   59
spinstell_presyn_comp = 57
tuftIB_presyn_comp =   60
tuftRS_presyn_comp =   60
nontuftRS_presyn_comp =   48
deepbask_presyn_comp =    59
deepaxax_presyn_comp =    59
deepLTS_presyn_comp =     59
TCR_presyn_comp =         135
nRT_presyn_comp =         59


// Compartments contacted by axoaxonic interneurons are IS only
// (I think IS stands for Initial Segment - tmmm)

          for i = 1, num_suppyrRS  {
          for j = 1, num_supaxax_to_suppyrRS  {
             com_supaxax_to_suppyrRS.x[j][i] = 69
          }
          }
          for i = 1, num_suppyrFRB {
          for j = 1, num_supaxax_to_suppyrFRB {
             com_supaxax_to_suppyrFRB.x[j][i] = 69
          }
          }
          for i = 1, num_spinstell {
          for j = 1, num_supaxax_to_spinstell {
             com_supaxax_to_spinstell.x[j][i] = 54
          }
          }
          for i = 1, num_tuftIB    {
          for j = 1, num_supaxax_to_tuftIB    {
             com_supaxax_to_tuftIB.x[j][i] = 56
          }
          }
          for i = 1, num_tuftRS    {
          for j = 1, num_supaxax_to_tuftRS    {
             com_supaxax_to_tuftRS.x[j][i] = 56
          }
          }
          for i = 1, num_nontuftRS    {
          for j = 1, num_supaxax_to_nontuftRS    {
             com_supaxax_to_nontuftRS.x[j][i] = 45
          }
          }
          for i = 1, num_suppyrRS     {
          for j = 1, num_deepaxax_to_suppyrRS     {
             com_deepaxax_to_suppyrRS.x[j][i] = 69
          }
          }
          for i = 1, num_suppyrFRB    {
          for j = 1, num_deepaxax_to_suppyrFRB    {
             com_deepaxax_to_suppyrFRB.x[j][i] = 69
          }
          }
          for i = 1, num_spinstell    {
          for j = 1, num_deepaxax_to_spinstell    {
             com_deepaxax_to_spinstell.x[j][i] = 54
          }
          }
          for i = 1, num_tuftIB       {
          for j = 1, num_deepaxax_to_tuftIB       {
             com_deepaxax_to_tuftIB.x[j][i] = 56 
          }
          }
          for i = 1, num_tuftRS       {
          for j = 1, num_deepaxax_to_tuftRS       {
             com_deepaxax_to_tuftRS.x[j][i] = 56 
          }
          }
          for i = 1, num_nontuftRS       {
          for j = 1, num_deepaxax_to_nontuftRS       {
             com_deepaxax_to_nontuftRS.x[j][i] = 45 
          }
          }
// End section on making axoaxonic cells connect to IS's

// Construct synaptic connectivity tables
                display = 0
	thisno = 0 // thisno is only required for the display
	// of sample settings in the called subroutines below:
	// in the FORTRAN code it represents the (mpi) rank of the process.

{localloadfile("durand.hoc")}
{localloadfile("synaptic_map_construct.hoc")}
{localloadfile("synaptic_compmap_construct.hoc")}

if (pmesg)	print "Constructing suppyrRS_to_suppyrRS maps"
// E:
          map_suppyrRS_to_suppyrRS = synaptic_map_construct (thisno, \
          num_suppyrRS, num_suppyrRS,            \
          num_suppyrRS_to_suppyrRS,    display, "map_suppyrRS_to_suppyrRS")
if (pmesg)	print "Constructing suppyrRS_to_suppyrFRB maps.. and so forth"
// E:
          map_suppyrRS_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_suppyrRS, num_suppyrFRB,           \
          num_suppyrRS_to_suppyrFRB,   display, "map_suppyrRS_to_suppyrFRB")
// I:
          map_suppyrRS_to_supbask = synaptic_map_construct (thisno, \
          num_suppyrRS, num_supbask,             \
          num_suppyrRS_to_supbask,     display, "map_suppyrRS_to_supbask")

          map_suppyrRS_to_supaxax = synaptic_map_construct (thisno, \
          num_suppyrRS, num_supaxax,             \
          num_suppyrRS_to_supaxax,     display, "map_suppyrRS_to_supaxax")
          map_suppyrRS_to_supLTS = synaptic_map_construct (thisno, \
          num_suppyrRS, num_supLTS,              \
          num_suppyrRS_to_supLTS,      display, "map_suppyrRS_to_supLTS")
          map_suppyrRS_to_spinstell = synaptic_map_construct (thisno, \
          num_suppyrRS, num_spinstell,           \
          num_suppyrRS_to_spinstell,   display, "map_suppyrRS_to_spinstell")
          map_suppyrRS_to_tuftIB = synaptic_map_construct (thisno, \
          num_suppyrRS, num_tuftIB,              \
          num_suppyrRS_to_tuftIB,      display, "map_suppyrRS_to_tuftIB")
          map_suppyrRS_to_tuftRS = synaptic_map_construct (thisno, \
          num_suppyrRS, num_tuftRS,              \
          num_suppyrRS_to_tuftRS,      display, "map_suppyrRS_to_tuftRS")
          map_suppyrRS_to_deepbask = synaptic_map_construct (thisno, \
          num_suppyrRS, num_deepbask,            \
          num_suppyrRS_to_deepbask,    display, "map_suppyrRS_to_deepbask")
          map_suppyrRS_to_deepaxax = synaptic_map_construct (thisno, \
          num_suppyrRS, num_deepaxax,            \
          num_suppyrRS_to_deepaxax,    display, "map_suppyrRS_to_deepaxax")
          map_suppyrRS_to_deepLTS = synaptic_map_construct (thisno, \
          num_suppyrRS, num_deepLTS,             \
          num_suppyrRS_to_deepLTS,     display, "map_suppyrRS_to_deepLTS")
if (pmesg)	print "constructing suppyrRS_to_nontuftRS"

          map_suppyrRS_to_nontuftRS = synaptic_map_construct (thisno, \
          num_suppyrRS, num_nontuftRS,           \
          num_suppyrRS_to_nontuftRS,   display, "map_suppyrRS_to_nontuftRS")

if (pmesg)	print "constructing suppyrFRB_to_suppyrRS"

          map_suppyrFRB_to_suppyrRS = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_suppyrRS,            \
          num_suppyrFRB_to_suppyrRS,    display, "map_suppyrFRB_to_suppyrRS")
          map_suppyrFRB_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_suppyrFRB,           \
          num_suppyrFRB_to_suppyrFRB,   display, "map_suppyrFRB_to_suppyrFRB")
          map_suppyrFRB_to_supbask = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_supbask,             \
          num_suppyrFRB_to_supbask,     display, "map_suppyrFRB_to_supbask")
          map_suppyrFRB_to_supaxax = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_supaxax,             \
          num_suppyrFRB_to_supaxax,     display, "map_suppyrFRB_to_supaxax")
          map_suppyrFRB_to_supLTS = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_supLTS,              \
          num_suppyrFRB_to_supLTS,      display, "map_suppyrFRB_to_supLTS")
          map_suppyrFRB_to_spinstell = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_spinstell,           \
          num_suppyrFRB_to_spinstell,   display, "map_suppyrFRB_to_spinstell")
          map_suppyrFRB_to_tuftIB = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_tuftIB,              \
          num_suppyrFRB_to_tuftIB,      display, "map_suppyrFRB_to_tuftIB")
          map_suppyrFRB_to_tuftRS = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_tuftRS,              \
          num_suppyrFRB_to_tuftRS,      display, "map_suppyrFRB_to_tuftRS")
          map_suppyrFRB_to_deepbask = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_deepbask,            \
          num_suppyrFRB_to_deepbask,    display, "map_suppyrFRB_to_deepbask")
          map_suppyrFRB_to_deepaxax = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_deepaxax,            \
          num_suppyrFRB_to_deepaxax,    display, "map_suppyrFRB_to_deepaxax")
          map_suppyrFRB_to_deepLTS = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_deepLTS,             \
          num_suppyrFRB_to_deepLTS,     display, "map_suppyrFRB_to_deepLTS")
          map_suppyrFRB_to_nontuftRS = synaptic_map_construct (thisno, \
          num_suppyrFRB, num_nontuftRS,           \
          num_suppyrFRB_to_nontuftRS,   display, "map_suppyrFRB_to_nontuftRS")

          map_supbask_to_suppyrRS = synaptic_map_construct (thisno, \
          num_supbask, num_suppyrRS,            \
          num_supbask_to_suppyrRS,   display, "map_supbask_to_suppyrRS")
          map_supbask_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_supbask, num_suppyrFRB,           \
          num_supbask_to_suppyrFRB,  display, "map_supbask_to_suppyrFRB")
          map_supbask_to_supbask = synaptic_map_construct (thisno, \
          num_supbask, num_supbask,             \
          num_supbask_to_supbask,    display, "map_supbask_to_supbask")
          map_supbask_to_supaxax = synaptic_map_construct (thisno, \
          num_supbask, num_supaxax,             \
          num_supbask_to_supaxax,    display, "map_supbask_to_supaxax")
          map_supbask_to_supLTS = synaptic_map_construct (thisno, \
          num_supbask, num_supLTS,              \
          num_supbask_to_supLTS,     display, "map_supbask_to_supLTS")
          map_supbask_to_spinstell = synaptic_map_construct (thisno, \
          num_supbask, num_spinstell,           \
          num_supbask_to_spinstell,  display, "map_supbask_to_spinstell")

          map_supaxax_to_suppyrRS = synaptic_map_construct (thisno, \
          num_supaxax, num_suppyrRS,            \
          num_supaxax_to_suppyrRS,   display, "map_supaxax_to_suppyrRS")
          map_supaxax_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_supaxax, num_suppyrFRB,           \
          num_supaxax_to_suppyrFRB,  display, "map_supaxax_to_suppyrFRB")
          map_supaxax_to_spinstell = synaptic_map_construct (thisno, \
          num_supaxax, num_spinstell,           \
          num_supaxax_to_spinstell,  display, "map_supaxax_to_spinstell")
          map_supaxax_to_tuftIB = synaptic_map_construct (thisno, \
          num_supaxax, num_tuftIB,              \
          num_supaxax_to_tuftIB,     display, "map_supaxax_to_tuftIB")
          map_supaxax_to_tuftRS = synaptic_map_construct (thisno, \
          num_supaxax, num_tuftRS,              \
          num_supaxax_to_tuftRS,     display, "map_supaxax_to_tuftRS")
          map_supaxax_to_nontuftRS = synaptic_map_construct (thisno, \
          num_supaxax, num_nontuftRS,              \
          num_supaxax_to_nontuftRS,  display, "map_supaxax_to_nontuftRS")

          map_supLTS_to_suppyrRS = synaptic_map_construct (thisno, \
          num_supLTS,  num_suppyrRS,               \
          num_supLTS_to_suppyrRS ,  display, "map_supLTS_to_suppyrRS")
          map_supLTS_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_supLTS,  num_suppyrFRB,              \
          num_supLTS_to_suppyrFRB,  display, "map_supLTS_to_suppyrFRB")
          map_supLTS_to_supbask = synaptic_map_construct (thisno, \
          num_supLTS,  num_supbask,                \
          num_supLTS_to_supbask,    display, "map_supLTS_to_supbask")
          map_supLTS_to_supaxax = synaptic_map_construct (thisno, \
          num_supLTS,  num_supaxax,                \
          num_supLTS_to_supaxax,    display, "map_supLTS_to_supaxax")
          map_supLTS_to_supLTS = synaptic_map_construct (thisno, \
          num_supLTS,  num_supLTS,                 \
          num_supLTS_to_supLTS,     display, "map_supLTS_to_supLTS")
          map_supLTS_to_spinstell = synaptic_map_construct (thisno, \
          num_supLTS,  num_spinstell,              \
          num_supLTS_to_spinstell,  display, "map_supLTS_to_spinstell")
          map_supLTS_to_tuftIB = synaptic_map_construct (thisno, \
          num_supLTS,  num_tuftIB,                 \
          num_supLTS_to_tuftIB   ,  display, "map_supLTS_to_tuftIB")
          map_supLTS_to_tuftRS = synaptic_map_construct (thisno, \
          num_supLTS,  num_tuftRS,                 \
          num_supLTS_to_tuftRS   ,  display, "map_supLTS_to_tuftRS")
          map_supLTS_to_deepbask = synaptic_map_construct (thisno, \
          num_supLTS,  num_deepbask,               \
          num_supLTS_to_deepbask ,  display, "map_supLTS_to_deepbask")
          map_supLTS_to_deepaxax = synaptic_map_construct (thisno, \
          num_supLTS,  num_deepaxax,               \
          num_supLTS_to_deepaxax ,  display, "map_supLTS_to_deepaxax")
          map_supLTS_to_deepLTS = synaptic_map_construct (thisno, \
          num_supLTS,  num_deepLTS,                \
          num_supLTS_to_deepLTS,    display, "map_supLTS_to_deepLTS")
          map_supLTS_to_nontuftRS = synaptic_map_construct (thisno, \
          num_supLTS,  num_nontuftRS,              \
          num_supLTS_to_nontuftRS,  display, "map_supLTS_to_nontuftRS")

          map_spinstell_to_suppyrRS = synaptic_map_construct (thisno, \
          num_spinstell,  num_suppyrRS,               \
          num_spinstell_to_suppyrRS,   display, "map_spinstell_to_suppyrRS")
          map_spinstell_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_spinstell,  num_suppyrFRB,              \
          num_spinstell_to_suppyrFRB,  display, "map_spinstell_to_suppyrFRB")
          map_spinstell_to_supbask = synaptic_map_construct (thisno, \
          num_spinstell,  num_supbask,                \
          num_spinstell_to_supbask,    display, "map_spinstell_to_supbask")
          map_spinstell_to_supaxax = synaptic_map_construct (thisno, \
          num_spinstell,  num_supaxax,                \
          num_spinstell_to_supaxax,    display, "map_spinstell_to_supaxax")
          map_spinstell_to_supLTS = synaptic_map_construct (thisno, \
          num_spinstell,  num_supLTS,                 \
          num_spinstell_to_supLTS,     display, "map_spinstell_to_supLTS")
          map_spinstell_to_spinstell = synaptic_map_construct (thisno, \
          num_spinstell,  num_spinstell,              \
          num_spinstell_to_spinstell,  display, "map_spinstell_to_spinstell")
          map_spinstell_to_tuftIB = synaptic_map_construct (thisno, \
          num_spinstell,  num_tuftIB,                 \
          num_spinstell_to_tuftIB,     display, "map_spinstell_to_tuftIB")
          map_spinstell_to_tuftRS = synaptic_map_construct (thisno, \
          num_spinstell,  num_tuftRS,                 \
          num_spinstell_to_tuftRS,     display, "map_spinstell_to_tuftRS")
          map_spinstell_to_deepbask = synaptic_map_construct (thisno, \
          num_spinstell,  num_deepbask,               \
          num_spinstell_to_deepbask,   display, "map_spinstell_to_deepbask")
          map_spinstell_to_deepaxax = synaptic_map_construct (thisno, \
          num_spinstell,  num_deepaxax,               \
          num_spinstell_to_deepaxax,   display, "map_spinstell_to_deepaxax")
          map_spinstell_to_deepLTS = synaptic_map_construct (thisno, \
          num_spinstell,  num_deepLTS,                \
          num_spinstell_to_deepLTS,    display, "map_spinstell_to_deepLTS")
          map_spinstell_to_nontuftRS = synaptic_map_construct (thisno, \
          num_spinstell,  num_nontuftRS,              \
          num_spinstell_to_nontuftRS,  display, "map_spinstell_to_nontuftRS")

          map_tuftIB_to_suppyrRS = synaptic_map_construct (thisno, \
          num_tuftIB,  num_suppyrRS,               \
          num_tuftIB_to_suppyrRS,   display, "map_tuftIB_to_suppyrRS")
          map_tuftIB_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_tuftIB,  num_suppyrFRB,              \
          num_tuftIB_to_suppyrFRB,  display, "map_tuftIB_to_suppyrFRB")
          map_tuftIB_to_supbask = synaptic_map_construct (thisno, \
          num_tuftIB,  num_supbask,                \
          num_tuftIB_to_supbask,    display, "map_tuftIB_to_supbask")
          map_tuftIB_to_supaxax = synaptic_map_construct (thisno, \
          num_tuftIB,  num_supaxax,                \
          num_tuftIB_to_supaxax,    display, "map_tuftIB_to_supaxax")
          map_tuftIB_to_supLTS = synaptic_map_construct (thisno, \
          num_tuftIB,  num_supLTS,                 \
          num_tuftIB_to_supLTS,     display, "map_tuftIB_to_supLTS")
          map_tuftIB_to_spinstell = synaptic_map_construct (thisno, \
          num_tuftIB,  num_spinstell,              \
          num_tuftIB_to_spinstell,  display, "map_tuftIB_to_spinstell")
          map_tuftIB_to_tuftIB    = synaptic_map_construct (thisno, \
          num_tuftIB,  num_tuftIB   ,              \
          num_tuftIB_to_tuftIB   ,  display, "map_tuftIB_to_tuftIB")
          map_tuftIB_to_tuftRS    = synaptic_map_construct (thisno, \
          num_tuftIB,  num_tuftRS   ,              \
          num_tuftIB_to_tuftRS   ,  display, "map_tuftIB_to_tuftRS")
          map_tuftIB_to_deepbask  = synaptic_map_construct (thisno, \
          num_tuftIB,  num_deepbask ,              \
          num_tuftIB_to_deepbask ,  display, "map_tuftIB_to_deepbask")
          map_tuftIB_to_deepaxax  = synaptic_map_construct (thisno, \
          num_tuftIB,  num_deepaxax ,              \
          num_tuftIB_to_deepaxax ,  display, "map_tuftIB_to_deepaxax")
          map_tuftIB_to_deepLTS   = synaptic_map_construct (thisno, \
          num_tuftIB,  num_deepLTS  ,              \
          num_tuftIB_to_deepLTS  ,  display, "map_tuftIB_to_deepLTS")
          map_tuftIB_to_nontuftRS = synaptic_map_construct (thisno, \
          num_tuftIB,  num_nontuftRS,              \
          num_tuftIB_to_nontuftRS,  display, "map_tuftIB_to_nontuftRS")

          map_tuftRS_to_suppyrRS  = synaptic_map_construct (thisno, \
          num_tuftRS,  num_suppyrRS ,              \
          num_tuftRS_to_suppyrRS ,  display, "map_tuftRS_to_suppyrRS")
          map_tuftRS_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_tuftRS,  num_suppyrFRB,              \
          num_tuftRS_to_suppyrFRB,  display, "map_tuftRS_to_suppyrFRB")
          map_tuftRS_to_supbask   = synaptic_map_construct (thisno, \
          num_tuftRS,  num_supbask  ,              \
          num_tuftRS_to_supbask  ,  display, "map_tuftRS_to_supbask")
          map_tuftRS_to_supaxax   = synaptic_map_construct (thisno, \
          num_tuftRS,  num_supaxax  ,              \
          num_tuftRS_to_supaxax  ,  display, "map_tuftRS_to_supaxax")
          map_tuftRS_to_supLTS    = synaptic_map_construct (thisno, \
          num_tuftRS,  num_supLTS   ,              \
          num_tuftRS_to_supLTS   ,  display, "map_tuftRS_to_supLTS")
          map_tuftRS_to_spinstell = synaptic_map_construct (thisno, \
          num_tuftRS,  num_spinstell,              \
          num_tuftRS_to_spinstell,  display, "map_tuftRS_to_spinstell")
          map_tuftRS_to_tuftIB    = synaptic_map_construct (thisno, \
          num_tuftRS,  num_tuftIB   ,              \
          num_tuftRS_to_tuftIB   ,  display, "map_tuftRS_to_tuftIB")
          map_tuftRS_to_tuftRS    = synaptic_map_construct (thisno, \
          num_tuftRS,  num_tuftRS   ,              \
          num_tuftRS_to_tuftRS   ,  display, "map_tuftRS_to_tuftRS")
          map_tuftRS_to_deepbask  = synaptic_map_construct (thisno, \
          num_tuftRS,  num_deepbask ,              \
          num_tuftRS_to_deepbask ,  display, "map_tuftRS_to_deepbask")
          map_tuftRS_to_deepaxax  = synaptic_map_construct (thisno, \
          num_tuftRS,  num_deepaxax ,              \
          num_tuftRS_to_deepaxax ,  display, "map_tuftRS_to_deepaxax")
          map_tuftRS_to_deepLTS   = synaptic_map_construct (thisno, \
          num_tuftRS,  num_deepLTS  ,              \
          num_tuftRS_to_deepLTS  ,  display, "map_tuftRS_to_deepLTS")
          map_tuftRS_to_nontuftRS = synaptic_map_construct (thisno, \
          num_tuftRS,  num_nontuftRS,              \
          num_tuftRS_to_nontuftRS,  display, "map_tuftRS_to_nontuftRS")

          map_deepbask_to_spinstell = synaptic_map_construct (thisno, \
          num_deepbask,  num_spinstell,              \
          num_deepbask_to_spinstell,  display, "map_deepbask_to_spinstell")
          map_deepbask_to_tuftIB    = synaptic_map_construct (thisno, \
          num_deepbask,  num_tuftIB   ,              \
          num_deepbask_to_tuftIB   ,  display, "map_deepbask_to_tuftIB")
          map_deepbask_to_tuftRS    = synaptic_map_construct (thisno, \
          num_deepbask,  num_tuftRS   ,              \
          num_deepbask_to_tuftRS   ,  display, "map_deepbask_to_tuftRS")
          map_deepbask_to_deepbask  = synaptic_map_construct (thisno, \
          num_deepbask,  num_deepbask ,              \
          num_deepbask_to_deepbask ,  display, "map_deepbask_to_deepbask")
          map_deepbask_to_deepaxax  = synaptic_map_construct (thisno, \
          num_deepbask,  num_deepaxax ,              \
          num_deepbask_to_deepaxax ,  display, "map_deepbask_to_deepaxax")
          map_deepbask_to_deepLTS   = synaptic_map_construct (thisno, \
          num_deepbask,  num_deepLTS  ,              \
          num_deepbask_to_deepLTS  ,  display, "map_deepbask_to_deepLTS")
          map_deepbask_to_nontuftRS = synaptic_map_construct (thisno, \
          num_deepbask,  num_nontuftRS,              \
          num_deepbask_to_nontuftRS,  display, "map_deepbask_to_nontuftRS")

          map_deepaxax_to_suppyrRS  = synaptic_map_construct (thisno, \
          num_deepaxax,  num_suppyrRS ,              \
          num_deepaxax_to_suppyrRS ,  display, "map_deepaxax_to_suppyrRS")
          map_deepaxax_to_suppyrFRB = synaptic_map_construct (thisno, \
          num_deepaxax,  num_suppyrFRB,              \
          num_deepaxax_to_suppyrFRB,  display, "map_deepaxax_to_suppyrFRB")
          map_deepaxax_to_spinstell = synaptic_map_construct (thisno, \
          num_deepaxax,  num_spinstell,              \
          num_deepaxax_to_spinstell,  display, "map_deepaxax_to_spinstell")
          map_deepaxax_to_tuftIB    = synaptic_map_construct (thisno, \
          num_deepaxax,  num_tuftIB   ,              \
          num_deepaxax_to_tuftIB   ,  display, "map_deepaxax_to_tuftIB")
          map_deepaxax_to_tuftRS    = synaptic_map_construct (thisno, \
          num_deepaxax,  num_tuftRS   ,              \
          num_deepaxax_to_tuftRS   ,  display, "map_deepaxax_to_tuftRS")
          map_deepaxax_to_nontuftRS    = synaptic_map_construct (thisno, \
          num_deepaxax,  num_nontuftRS   ,              \
          num_deepaxax_to_nontuftRS   ,  display, "map_deepaxax_to_nontuftRS")

          map_deepLTS_to_suppyrRS     = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_suppyrRS    ,              \
          num_deepLTS_to_suppyrRS    ,  display, "map_deepLTS_to_suppyrRS")
          map_deepLTS_to_suppyrFRB    = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_suppyrFRB   ,              \
          num_deepLTS_to_suppyrFRB   ,  display, "map_deepLTS_to_suppyrFRB")
          map_deepLTS_to_supbask      = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_supbask     ,              \
          num_deepLTS_to_supbask     ,  display, "map_deepLTS_to_supbask")
          map_deepLTS_to_supaxax      = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_supaxax     ,              \
          num_deepLTS_to_supaxax     ,  display, "map_deepLTS_to_supaxax")
          map_deepLTS_to_supLTS       = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_supLTS      ,              \
          num_deepLTS_to_supLTS      ,  display, "map_deepLTS_to_supLTS")
          map_deepLTS_to_spinstell    = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_spinstell   ,              \
          num_deepLTS_to_spinstell   ,  display, "map_deepLTS_to_spinstell")
          map_deepLTS_to_tuftIB       = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_tuftIB      ,              \
          num_deepLTS_to_tuftIB      ,  display, "map_deepLTS_to_tuftIB")
          map_deepLTS_to_tuftRS       = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_tuftRS      ,              \
          num_deepLTS_to_tuftRS      ,  display, "map_deepLTS_to_tuftRS")
          map_deepLTS_to_deepbask     = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_deepbask    ,              \
          num_deepLTS_to_deepbask    ,  display, "map_deepLTS_to_deepbask")
          map_deepLTS_to_deepaxax     = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_deepaxax    ,              \
          num_deepLTS_to_deepaxax    ,  display, "map_deepLTS_to_deepaxax")
          map_deepLTS_to_deepLTS      = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_deepLTS     ,              \
          num_deepLTS_to_deepLTS     ,  display, "map_deepLTS_to_deepLTS")
          map_deepLTS_to_nontuftRS    = synaptic_map_construct (thisno, \
          num_deepLTS ,  num_nontuftRS   ,              \
          num_deepLTS_to_nontuftRS   ,  display, "map_deepLTS_to_nontuftRS")

          map_TCR_to_suppyrRS     = synaptic_map_construct (thisno, \
          num_TCR ,  num_suppyrRS    ,              \
          num_TCR_to_suppyrRS    ,  display, "map_TCR_to_suppyrRS")
          map_TCR_to_suppyrFRB    = synaptic_map_construct (thisno, \
          num_TCR ,  num_suppyrFRB   ,              \
          num_TCR_to_suppyrFRB   ,  display, "map_TCR_to_suppyrFRB")
          map_TCR_to_supbask      = synaptic_map_construct (thisno, \
          num_TCR ,  num_supbask     ,              \
          num_TCR_to_supbask     ,  display, "map_TCR_to_supbask")
          map_TCR_to_supaxax      = synaptic_map_construct (thisno, \
          num_TCR ,  num_supaxax     ,              \
          num_TCR_to_supaxax     ,  display, "map_TCR_to_supaxax")
          map_TCR_to_spinstell    = synaptic_map_construct (thisno, \
          num_TCR ,  num_spinstell   ,              \
          num_TCR_to_spinstell   ,  display, "map_TCR_to_spinstell")
          map_TCR_to_tuftIB       = synaptic_map_construct (thisno, \
          num_TCR ,  num_tuftIB      ,              \
          num_TCR_to_tuftIB      ,  display, "map_TCR_to_tuftIB")
          map_TCR_to_tuftRS       = synaptic_map_construct (thisno, \
          num_TCR ,  num_tuftRS      ,              \
          num_TCR_to_tuftRS      ,  display, "map_TCR_to_tuftRS")
          map_TCR_to_deepbask     = synaptic_map_construct (thisno, \
          num_TCR ,  num_deepbask    ,              \
          num_TCR_to_deepbask    ,  display, "map_TCR_to_deepbask")
          map_TCR_to_deepaxax     = synaptic_map_construct (thisno, \
          num_TCR ,  num_deepaxax    ,              \
          num_TCR_to_deepaxax    ,  display, "map_TCR_to_deepaxax")
          map_TCR_to_nRT          = synaptic_map_construct (thisno, \
          num_TCR ,  num_nRT         ,              \
          num_TCR_to_nRT         ,  display, "map_TCR_to_nRT")
          map_TCR_to_nontuftRS    = synaptic_map_construct (thisno, \
          num_TCR ,  num_nontuftRS   ,              \
          num_TCR_to_nontuftRS   ,  display, "map_TCR_to_nontuftRS")

          map_nRT_to_TCR          = synaptic_map_construct (thisno, \
          num_nRT ,  num_TCR         ,              \
          num_nRT_to_TCR         ,  display, "map_nRT_to_TCR")
          map_nRT_to_nRT          = synaptic_map_construct (thisno, \
          num_nRT ,  num_nRT         ,              \
          num_nRT_to_nRT         ,  display, "map_nRT_to_nRT")

          map_nontuftRS_to_suppyrRS     = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_suppyrRS    ,              \
          num_nontuftRS_to_suppyrRS    ,  display, "map_nontuftRS_to_suppyrRS")
          map_nontuftRS_to_suppyrFRB    = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_suppyrFRB   ,              \
          num_nontuftRS_to_suppyrFRB   ,  display, "map_nontuftRS_to_suppyrFRB")
          map_nontuftRS_to_supbask      = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_supbask     ,              \
          num_nontuftRS_to_supbask     ,  display, "map_nontuftRS_to_supbask")
          map_nontuftRS_to_supaxax      = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_supaxax     ,              \
          num_nontuftRS_to_supaxax     ,  display, "map_nontuftRS_to_supaxax")
          map_nontuftRS_to_supLTS       = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_supLTS      ,              \
          num_nontuftRS_to_supLTS      ,  display, "map_nontuftRS_to_supLTS")
          map_nontuftRS_to_spinstell    = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_spinstell   ,              \
          num_nontuftRS_to_spinstell   ,  display, "map_nontuftRS_to_spinstell")
          map_nontuftRS_to_tuftIB       = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_tuftIB      ,              \
          num_nontuftRS_to_tuftIB      ,  display, "map_nontuftRS_to_tuftIB")
          map_nontuftRS_to_tuftRS       = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_tuftRS      ,              \
          num_nontuftRS_to_tuftRS      ,  display, "map_nontuftRS_to_tuftRS")
          map_nontuftRS_to_deepbask     = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_deepbask    ,              \
          num_nontuftRS_to_deepbask    ,  display, "map_nontuftRS_to_deepbask")
          map_nontuftRS_to_deepaxax     = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_deepaxax    ,              \
          num_nontuftRS_to_deepaxax    ,  display, "map_nontuftRS_to_deepaxax")
          map_nontuftRS_to_deepLTS      = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_deepLTS     ,              \
          num_nontuftRS_to_deepLTS     ,  display, "map_nontuftRS_to_deepLTS")
          map_nontuftRS_to_TCR          = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_TCR         ,              \
          num_nontuftRS_to_TCR         ,  display, "map_nontuftRS_to_TCR")
          map_nontuftRS_to_nRT          = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_nRT         ,              \
          num_nontuftRS_to_nRT         ,  display, "map_nontuftRS_to_nRT")
          map_nontuftRS_to_nontuftRS    = synaptic_map_construct (thisno, \
          num_nontuftRS ,  num_nontuftRS   ,              \
          num_nontuftRS_to_nontuftRS   ,  display, "map_nontuftRS_to_nontuftRS")
// Finish construction of synaptic connection tables.
if (pmesg)	print " finished construction of cell connection tables"
if (pmesg)	print "Starting construction of compartment map connection tables"
// Construct synaptic compartment maps.  
                display = 0
	objref netcon_list
	netcon_list = new List()
if (pmesg)	print " calling  com_suppyrRS_to_suppyrRS = synaptic_compmap_construct"
          com_suppyrRS_to_suppyrRS = synaptic_compmap_construct (thisno, \
          num_suppyrRS,            \
          num_suppyrRS_to_suppyrRS, \
       ncompallow_suppyrRS_to_suppyrRS, \
        compallow_suppyrRS_to_suppyrRS, display, "com_suppyrRS_to_suppyrRS")
if (pmesg)	print "..."
          com_suppyrRS_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_suppyrRS_to_suppyrFRB, \
         ncompallow_suppyrRS_to_suppyrFRB, \
          compallow_suppyrRS_to_suppyrFRB, display, "com_suppyrRS_to_suppyrFRB")

          com_suppyrRS_to_supbask = synaptic_compmap_construct (thisno, \
          num_supbask  ,             \
          num_suppyrRS_to_supbask, \
         ncompallow_suppyrRS_to_supbask,   \
          compallow_suppyrRS_to_supbask,   display, "com_suppyrRS_to_supbask")

          com_suppyrRS_to_supaxax = synaptic_compmap_construct (thisno, \
          num_supaxax  ,             \
          num_suppyrRS_to_supaxax,   \
         ncompallow_suppyrRS_to_supaxax,   \
          compallow_suppyrRS_to_supaxax,   display, "com_suppyrRS_to_supaxax")

          com_suppyrRS_to_supLTS = synaptic_compmap_construct (thisno, \
          num_supLTS   ,              \
          num_suppyrRS_to_supLTS,    \
         ncompallow_suppyrRS_to_supLTS,    \
          compallow_suppyrRS_to_supLTS,    display, "com_suppyrRS_to_supLTS")

          com_suppyrRS_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_suppyrRS_to_spinstell, \
         ncompallow_suppyrRS_to_spinstell, \
          compallow_suppyrRS_to_spinstell, display, "com_suppyrRS_to_spinstell")

          com_suppyrRS_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_suppyrRS_to_tuftIB   , \
         ncompallow_suppyrRS_to_tuftIB   , \
          compallow_suppyrRS_to_tuftIB   , display, "com_suppyrRS_to_tuftIB")

          com_suppyrRS_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_suppyrRS_to_tuftRS   , \
         ncompallow_suppyrRS_to_tuftRS   , \
          compallow_suppyrRS_to_tuftRS   , display, "com_suppyrRS_to_tuftRS")

          com_suppyrRS_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_suppyrRS_to_deepbask , \
         ncompallow_suppyrRS_to_deepbask , \
          compallow_suppyrRS_to_deepbask , display, "com_suppyrRS_to_deepbask")

          com_suppyrRS_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_suppyrRS_to_deepaxax , \
         ncompallow_suppyrRS_to_deepaxax , \
          compallow_suppyrRS_to_deepaxax , display, "com_suppyrRS_to_deepaxax")

          com_suppyrRS_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_suppyrRS_to_deepLTS  , \
         ncompallow_suppyrRS_to_deepLTS  , \
          compallow_suppyrRS_to_deepLTS  , display, "com_suppyrRS_to_deepLTS")

          com_suppyrRS_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_suppyrRS_to_nontuftRS, \
         ncompallow_suppyrRS_to_nontuftRS, \
          compallow_suppyrRS_to_nontuftRS, display, "com_suppyrRS_to_nontuftRS")

          com_suppyrFRB_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_suppyrFRB_to_suppyrRS , \
         ncompallow_suppyrFRB_to_suppyrRS , \
          compallow_suppyrFRB_to_suppyrRS , display, "com_suppyrFRB_to_suppyrRS")

          com_suppyrFRB_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_suppyrFRB_to_suppyrFRB, \
         ncompallow_suppyrFRB_to_suppyrFRB, \
          compallow_suppyrFRB_to_suppyrFRB, display, "com_suppyrFRB_to_suppyrFRB")

          com_suppyrFRB_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_suppyrFRB_to_supbask  , \
         ncompallow_suppyrFRB_to_supbask  , \
          compallow_suppyrFRB_to_supbask  , display, "com_suppyrFRB_to_supbask")

          com_suppyrFRB_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_suppyrFRB_to_supaxax  , \
         ncompallow_suppyrFRB_to_supaxax  , \
          compallow_suppyrFRB_to_supaxax  , display, "com_suppyrFRB_to_supaxax")

          com_suppyrFRB_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_suppyrFRB_to_supLTS   , \
         ncompallow_suppyrFRB_to_supLTS   , \
          compallow_suppyrFRB_to_supLTS   , display, "com_suppyrFRB_to_supLTS")

          com_suppyrFRB_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_suppyrFRB_to_spinstell, \
         ncompallow_suppyrFRB_to_spinstell, \
          compallow_suppyrFRB_to_spinstell, display, "com_suppyrFRB_to_spinstell")

          com_suppyrFRB_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_suppyrFRB_to_tuftIB   , \
         ncompallow_suppyrFRB_to_tuftIB   , \
          compallow_suppyrFRB_to_tuftIB   , display, "com_suppyrFRB_to_tuftIB")

          com_suppyrFRB_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_suppyrFRB_to_tuftRS   , \
         ncompallow_suppyrFRB_to_tuftRS   , \
          compallow_suppyrFRB_to_tuftRS   , display, "com_suppyrFRB_to_tuftRS")

          com_suppyrFRB_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_suppyrFRB_to_deepbask , \
         ncompallow_suppyrFRB_to_deepbask , \
          compallow_suppyrFRB_to_deepbask , display, "com_suppyrFRB_to_deepbask")

          com_suppyrFRB_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_suppyrFRB_to_deepaxax , \
         ncompallow_suppyrFRB_to_deepaxax , \
          compallow_suppyrFRB_to_deepaxax , display, "com_suppyrFRB_to_deepaxax")

          com_suppyrFRB_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_suppyrFRB_to_deepLTS  , \
         ncompallow_suppyrFRB_to_deepLTS  , \
          compallow_suppyrFRB_to_deepLTS  , display, "com_suppyrFRB_to_deepLTS")

          com_suppyrFRB_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_suppyrFRB_to_nontuftRS, \
         ncompallow_suppyrFRB_to_nontuftRS, \
          compallow_suppyrFRB_to_nontuftRS, display, "com_suppyrFRB_to_nontuftRS")

          com_supbask_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_supbask_to_suppyrRS , \
         ncompallow_supbask_to_suppyrRS , \
          compallow_supbask_to_suppyrRS , display, "com_supbask_to_suppyrRS")

          com_supbask_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_supbask_to_suppyrFRB, \
         ncompallow_supbask_to_suppyrFRB, \
          compallow_supbask_to_suppyrFRB, display, "com_supbask_to_suppyrFRB")

          com_supbask_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_supbask_to_supbask  , \
         ncompallow_supbask_to_supbask  , \
          compallow_supbask_to_supbask  , display, "com_supbask_to_supbask")

          com_supbask_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_supbask_to_supaxax  , \
         ncompallow_supbask_to_supaxax  , \
          compallow_supbask_to_supaxax  , display, "com_supbask_to_supaxax")

          com_supbask_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_supbask_to_supLTS   , \
         ncompallow_supbask_to_supLTS   , \
          compallow_supbask_to_supLTS   , display, "com_supbask_to_supLTS")

          com_supbask_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_supbask_to_spinstell, \
         ncompallow_supbask_to_spinstell, \
          compallow_supbask_to_spinstell, display, "com_supbask_to_spinstell")

//         com_supaxax_to_suppyrRS  = synaptic_compmap_construct (thisno, 
//         num_suppyrRS ,           
//         num_supaxax_to_suppyrRS , 
//        ncompallow_supaxax_to_suppyrRS , 
//         compallow_supaxax_to_suppyrRS , display, "com_supaxax_to_suppyrRS")

//         com_supaxax_to_suppyrFRB = synaptic_compmap_construct (thisno, 
//         num_suppyrFRB,           
//         num_supaxax_to_suppyrFRB, 
//        ncompallow_supaxax_to_suppyrFRB, 
//         compallow_supaxax_to_suppyrFRB, display, "com_supaxax_to_suppyrFRB")

//         com_supaxax_to_spinstell = synaptic_compmap_construct (thisno, 
//         num_spinstell,           
//         num_supaxax_to_spinstell, 
//        ncompallow_supaxax_to_spinstell, 
//         compallow_supaxax_to_spinstell, display, "com_supaxax_to_spinstell")

//         com_supaxax_to_tuftIB    = synaptic_compmap_construct (thisno, 
//         num_tuftIB   ,           
//         num_supaxax_to_tuftIB   , 
//        ncompallow_supaxax_to_tuftIB   , 
//         compallow_supaxax_to_tuftIB   , display, "com_supaxax_to_tuftIB")

//         com_supaxax_to_tuftRS    = synaptic_compmap_construct (thisno, 
//         num_tuftRS   ,           
//         num_supaxax_to_tuftRS   , 
//        ncompallow_supaxax_to_tuftRS   , 
//         compallow_supaxax_to_tuftRS   , display, "com_supaxax_to_tuftRS")

//         com_supaxax_to_nontuftRS = synaptic_compmap_construct (thisno, 
//         num_nontuftRS,           
//         num_supaxax_to_nontuftRS, 
//        ncompallow_supaxax_to_nontuftRS, 
//         compallow_supaxax_to_nontuftRS, display, "com_supaxax_to_nontuftRS")

          com_supLTS_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_supLTS_to_suppyrRS , \
         ncompallow_supLTS_to_suppyrRS , \
          compallow_supLTS_to_suppyrRS , display, "com_supLTS_to_suppyrRS")

          com_supLTS_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_supLTS_to_suppyrFRB, \
         ncompallow_supLTS_to_suppyrFRB, \
          compallow_supLTS_to_suppyrFRB, display, "com_supLTS_to_suppyrFRB")

          com_supLTS_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_supLTS_to_supbask  , \
         ncompallow_supLTS_to_supbask  , \
          compallow_supLTS_to_supbask  , display, "com_supLTS_to_supbask")

          com_supLTS_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_supLTS_to_supaxax  , \
         ncompallow_supLTS_to_supaxax  , \
          compallow_supLTS_to_supaxax  , display, "com_supLTS_to_supaxax")

          com_supLTS_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_supLTS_to_supLTS   , \
         ncompallow_supLTS_to_supLTS   , \
          compallow_supLTS_to_supLTS   , display, "com_supLTS_to_supLTS")

          com_supLTS_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_supLTS_to_spinstell, \
         ncompallow_supLTS_to_spinstell, \
          compallow_supLTS_to_spinstell, display, "com_supLTS_to_spinstell")

          com_supLTS_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_supLTS_to_tuftIB   , \
         ncompallow_supLTS_to_tuftIB   , \
          compallow_supLTS_to_tuftIB   , display, "com_supLTS_to_tuftIB")

          com_supLTS_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_supLTS_to_tuftRS   , \
         ncompallow_supLTS_to_tuftRS   , \
          compallow_supLTS_to_tuftRS   , display, "com_supLTS_to_tuftRS")

          com_supLTS_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_supLTS_to_deepbask , \
         ncompallow_supLTS_to_deepbask , \
          compallow_supLTS_to_deepbask , display, "com_supLTS_to_deepbask")

          com_supLTS_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_supLTS_to_deepaxax , \
         ncompallow_supLTS_to_deepaxax , \
          compallow_supLTS_to_deepaxax , display, "com_supLTS_to_deepaxax")

          com_supLTS_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_supLTS_to_deepLTS  , \
         ncompallow_supLTS_to_deepLTS  , \
          compallow_supLTS_to_deepLTS  , display, "com_supLTS_to_deepLTS")

          com_supLTS_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_supLTS_to_nontuftRS, \
         ncompallow_supLTS_to_nontuftRS, \
          compallow_supLTS_to_nontuftRS, display, "com_supLTS_to_nontuftRS")

          com_spinstell_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_spinstell_to_suppyrRS , \
         ncompallow_spinstell_to_suppyrRS , \
          compallow_spinstell_to_suppyrRS , display, "com_spinstell_to_suppyrRS")

          com_spinstell_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_spinstell_to_suppyrFRB, \
         ncompallow_spinstell_to_suppyrFRB, \
          compallow_spinstell_to_suppyrFRB, display, "com_spinstell_to_suppyrFRB")

          com_spinstell_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_spinstell_to_supbask  , \
         ncompallow_spinstell_to_supbask  , \
          compallow_spinstell_to_supbask  , display, "com_spinstell_to_supbask")

          com_spinstell_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_spinstell_to_supaxax  , \
         ncompallow_spinstell_to_supaxax  , \
          compallow_spinstell_to_supaxax  , display, "com_spinstell_to_supaxax")

          com_spinstell_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_spinstell_to_supLTS   , \
         ncompallow_spinstell_to_supLTS   , \
          compallow_spinstell_to_supLTS   , display, "com_spinstell_to_supLTS")

          com_spinstell_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_spinstell_to_spinstell, \
         ncompallow_spinstell_to_spinstell, \
          compallow_spinstell_to_spinstell, display, "com_spinstell_to_spinstell")

          com_spinstell_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_spinstell_to_tuftIB   , \
         ncompallow_spinstell_to_tuftIB   , \
          compallow_spinstell_to_tuftIB   , display, "com_spinstell_to_tuftIB")

          com_spinstell_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_spinstell_to_tuftRS   , \
         ncompallow_spinstell_to_tuftRS   , \
          compallow_spinstell_to_tuftRS   , display, "com_spinstell_to_tuftRS")

          com_spinstell_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_spinstell_to_deepbask , \
         ncompallow_spinstell_to_deepbask , \
          compallow_spinstell_to_deepbask , display, "com_spinstell_to_deepbask")

          com_spinstell_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_spinstell_to_deepaxax , \
         ncompallow_spinstell_to_deepaxax , \
          compallow_spinstell_to_deepaxax , display, "com_spinstell_to_deepaxax")

          com_spinstell_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_spinstell_to_deepLTS  , \
         ncompallow_spinstell_to_deepLTS  , \
          compallow_spinstell_to_deepLTS  , display, "com_spinstell_to_deepLTS")

          com_spinstell_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_spinstell_to_nontuftRS, \
         ncompallow_spinstell_to_nontuftRS, \
          compallow_spinstell_to_nontuftRS, display, "com_spinstell_to_nontuftRS")

          com_tuftIB_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_tuftIB_to_suppyrRS , \
         ncompallow_tuftIB_to_suppyrRS , \
          compallow_tuftIB_to_suppyrRS , display, "com_tuftIB_to_suppyrRS")

          com_tuftIB_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_tuftIB_to_suppyrFRB, \
         ncompallow_tuftIB_to_suppyrFRB, \
          compallow_tuftIB_to_suppyrFRB, display, "com_tuftIB_to_suppyrFRB")

          com_tuftIB_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_tuftIB_to_supbask  , \
         ncompallow_tuftIB_to_supbask  , \
          compallow_tuftIB_to_supbask  , display, "com_tuftIB_to_supbask")

          com_tuftIB_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_tuftIB_to_supaxax  , \
         ncompallow_tuftIB_to_supaxax  , \
          compallow_tuftIB_to_supaxax  , display, "com_tuftIB_to_supaxax")

          com_tuftIB_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_tuftIB_to_supLTS   , \
         ncompallow_tuftIB_to_supLTS   , \
          compallow_tuftIB_to_supLTS   , display, "com_tuftIB_to_supLTS")

          com_tuftIB_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_tuftIB_to_spinstell, \
         ncompallow_tuftIB_to_spinstell, \
          compallow_tuftIB_to_spinstell, display, "com_tuftIB_to_spinstell")

          com_tuftIB_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_tuftIB_to_tuftIB   , \
         ncompallow_tuftIB_to_tuftIB   , \
          compallow_tuftIB_to_tuftIB   , display, "com_tuftIB_to_tuftIB")

          com_tuftIB_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_tuftIB_to_tuftRS   , \
         ncompallow_tuftIB_to_tuftRS   , \
          compallow_tuftIB_to_tuftRS   , display, "com_tuftIB_to_tuftRS")

          com_tuftIB_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_tuftIB_to_deepbask , \
         ncompallow_tuftIB_to_deepbask , \
          compallow_tuftIB_to_deepbask , display, "com_tuftIB_to_deepbask")

          com_tuftIB_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_tuftIB_to_deepaxax , \
         ncompallow_tuftIB_to_deepaxax , \
          compallow_tuftIB_to_deepaxax , display, "com_tuftIB_to_deepaxax")

          com_tuftIB_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_tuftIB_to_deepLTS  , \
         ncompallow_tuftIB_to_deepLTS  , \
          compallow_tuftIB_to_deepLTS  , display, "com_tuftIB_to_deepLTS")

          com_tuftIB_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_tuftIB_to_nontuftRS, \
         ncompallow_tuftIB_to_nontuftRS, \
          compallow_tuftIB_to_nontuftRS, display, "com_tuftIB_to_nontuftRS")

          com_tuftRS_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_tuftRS_to_suppyrRS , \
         ncompallow_tuftRS_to_suppyrRS , \
          compallow_tuftRS_to_suppyrRS , display, "com_tuftRS_to_suppyrRS")

          com_tuftRS_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_tuftRS_to_suppyrFRB, \
         ncompallow_tuftRS_to_suppyrFRB, \
          compallow_tuftRS_to_suppyrFRB, display, "com_tuftRS_to_suppyrFRB")

          com_tuftRS_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_tuftRS_to_supbask  , \
         ncompallow_tuftRS_to_supbask  , \
          compallow_tuftRS_to_supbask  , display, "com_tuftRS_to_supbask")

          com_tuftRS_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_tuftRS_to_supaxax  , \
         ncompallow_tuftRS_to_supaxax  , \
          compallow_tuftRS_to_supaxax  , display, "com_tuftRS_to_supaxax")

          com_tuftRS_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_tuftRS_to_supLTS   , \
         ncompallow_tuftRS_to_supLTS   , \
          compallow_tuftRS_to_supLTS   , display, "com_tuftRS_to_supLTS")

          com_tuftRS_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_tuftRS_to_spinstell, \
         ncompallow_tuftRS_to_spinstell, \
          compallow_tuftRS_to_spinstell, display, "com_tuftRS_to_spinstell")

          com_tuftRS_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_tuftRS_to_tuftIB   , \
         ncompallow_tuftRS_to_tuftIB   , \
          compallow_tuftRS_to_tuftIB   , display, "com_tuftRS_to_tuftIB")

          com_tuftRS_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_tuftRS_to_tuftRS   , \
         ncompallow_tuftRS_to_tuftRS   , \
          compallow_tuftRS_to_tuftRS   , display, "com_tuftRS_to_tuftRS")

          com_tuftRS_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_tuftRS_to_deepbask , \
         ncompallow_tuftRS_to_deepbask , \
          compallow_tuftRS_to_deepbask , display, "com_tuftRS_to_deepbask")

          com_tuftRS_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_tuftRS_to_deepaxax , \
         ncompallow_tuftRS_to_deepaxax , \
          compallow_tuftRS_to_deepaxax , display, "com_tuftRS_to_deepaxax")

          com_tuftRS_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_tuftRS_to_deepLTS  , \
         ncompallow_tuftRS_to_deepLTS  , \
          compallow_tuftRS_to_deepLTS  , display, "com_tuftRS_to_deepLTS")

          com_tuftRS_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_tuftRS_to_nontuftRS, \
         ncompallow_tuftRS_to_nontuftRS, \
          compallow_tuftRS_to_nontuftRS, display, "com_tuftRS_to_nontuftRS")

          com_deepbask_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_deepbask_to_spinstell, \
         ncompallow_deepbask_to_spinstell, \
          compallow_deepbask_to_spinstell, display, "com_deepbask_to_spinstell")

          com_deepbask_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_deepbask_to_tuftIB   , \
         ncompallow_deepbask_to_tuftIB   , \
          compallow_deepbask_to_tuftIB   , display, "com_deepbask_to_tuftIB")

          com_deepbask_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_deepbask_to_tuftRS   , \
         ncompallow_deepbask_to_tuftRS   , \
          compallow_deepbask_to_tuftRS   , display, "com_deepbask_to_tuftRS")

          com_deepbask_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_deepbask_to_deepbask , \
         ncompallow_deepbask_to_deepbask , \
          compallow_deepbask_to_deepbask , display, "com_deepbask_to_deepbask")

          com_deepbask_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_deepbask_to_deepaxax , \
         ncompallow_deepbask_to_deepaxax , \
          compallow_deepbask_to_deepaxax , display, "com_deepbask_to_deepaxax")

          com_deepbask_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_deepbask_to_deepLTS  , \
         ncompallow_deepbask_to_deepLTS  , \
          compallow_deepbask_to_deepLTS  , display, "com_deepbask_to_deepLTS")

          com_deepbask_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_deepbask_to_nontuftRS, \
         ncompallow_deepbask_to_nontuftRS, \
          compallow_deepbask_to_nontuftRS, display, "com_deepbask_to_nontuftRS")

//         com_deepaxax_to_suppyrRS  = synaptic_compmap_construct (thisno, 
//         num_suppyrRS ,           
//         num_deepaxax_to_suppyrRS , 
//        ncompallow_deepaxax_to_suppyrRS , 
//         compallow_deepaxax_to_suppyrRS , display, "com_deepaxax_to_suppyrRS")

//         com_deepaxax_to_suppyrFRB = synaptic_compmap_construct (thisno, 
//         num_suppyrFRB,           
//         num_deepaxax_to_suppyrFRB, 
//        ncompallow_deepaxax_to_suppyrFRB, 
//         compallow_deepaxax_to_suppyrFRB, display, "com_deepaxax_to_suppyrFRB")

//         com_deepaxax_to_spinstell = synaptic_compmap_construct (thisno, 
//         num_spinstell,           
//         num_deepaxax_to_spinstell, 
//        ncompallow_deepaxax_to_spinstell, 
//         compallow_deepaxax_to_spinstell, display, "com_deepaxax_to_spinstell")

//         com_deepaxax_to_tuftIB    = synaptic_compmap_construct (thisno, 
//         num_tuftIB   ,           
//         num_deepaxax_to_tuftIB   , 
//        ncompallow_deepaxax_to_tuftIB   , 
//         compallow_deepaxax_to_tuftIB   , display, "com_deepaxax_to_tuftIB")

//         com_deepaxax_to_tuftRS    = synaptic_compmap_construct (thisno, 
//         num_tuftRS   ,           
//         num_deepaxax_to_tuftRS   , 
//        ncompallow_deepaxax_to_tuftRS   , 
//         compallow_deepaxax_to_tuftRS   , display, "com_deepaxax_to_tuftRS")

//         com_deepaxax_to_nontuftRS = synaptic_compmap_construct (thisno, 
//         num_nontuftRS,           
//         num_deepaxax_to_nontuftRS, 
//        ncompallow_deepaxax_to_nontuftRS, 
//         compallow_deepaxax_to_nontuftRS, display, "com_deepaxax_to_nontuftRS")

          com_deepLTS_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_deepLTS_to_suppyrRS , \
         ncompallow_deepLTS_to_suppyrRS , \
          compallow_deepLTS_to_suppyrRS , display, "com_deepLTS_to_suppyrRS")

          com_deepLTS_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_deepLTS_to_suppyrFRB, \
         ncompallow_deepLTS_to_suppyrFRB, \
          compallow_deepLTS_to_suppyrFRB, display, "com_deepLTS_to_suppyrFRB")

          com_deepLTS_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_deepLTS_to_supbask  , \
         ncompallow_deepLTS_to_supbask  , \
          compallow_deepLTS_to_supbask  , display, "com_deepLTS_to_supbask")

          com_deepLTS_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_deepLTS_to_supaxax  , \
         ncompallow_deepLTS_to_supaxax  , \
          compallow_deepLTS_to_supaxax  , display, "com_deepLTS_to_supaxax")

          com_deepLTS_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_deepLTS_to_supLTS   , \
         ncompallow_deepLTS_to_supLTS   , \
          compallow_deepLTS_to_supLTS   , display, "com_deepLTS_to_supLTS")

          com_deepLTS_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_deepLTS_to_spinstell, \
         ncompallow_deepLTS_to_spinstell, \
          compallow_deepLTS_to_spinstell, display, "com_deepLTS_to_spinstell")

          com_deepLTS_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_deepLTS_to_tuftIB   , \
         ncompallow_deepLTS_to_tuftIB   , \
          compallow_deepLTS_to_tuftIB   , display, "com_deepLTS_to_tuftIB")

          com_deepLTS_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_deepLTS_to_tuftRS   , \
         ncompallow_deepLTS_to_tuftRS   , \
          compallow_deepLTS_to_tuftRS   , display, "com_deepLTS_to_tuftRS")

          com_deepLTS_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_deepLTS_to_deepbask , \
         ncompallow_deepLTS_to_deepbask , \
          compallow_deepLTS_to_deepbask , display, "com_deepLTS_to_deepbask")

          com_deepLTS_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_deepLTS_to_deepaxax , \
         ncompallow_deepLTS_to_deepaxax , \
          compallow_deepLTS_to_deepaxax , display, "com_deepLTS_to_deepaxax")

          com_deepLTS_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_deepLTS_to_deepLTS  , \
         ncompallow_deepLTS_to_deepLTS  , \
          compallow_deepLTS_to_deepLTS  , display, "com_deepLTS_to_deepLTS")

          com_deepLTS_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_deepLTS_to_nontuftRS, \
         ncompallow_deepLTS_to_nontuftRS, \
          compallow_deepLTS_to_nontuftRS, display, "com_deepLTS_to_nontuftRS")

          com_TCR_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_TCR_to_suppyrRS , \
         ncompallow_TCR_to_suppyrRS , \
          compallow_TCR_to_suppyrRS , display, "com_TCR_to_suppyrRS")

          com_TCR_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_TCR_to_suppyrFRB, \
         ncompallow_TCR_to_suppyrFRB, \
          compallow_TCR_to_suppyrFRB, display, "com_TCR_to_suppyrFRB")

          com_TCR_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_TCR_to_supbask  , \
         ncompallow_TCR_to_supbask  , \
          compallow_TCR_to_supbask  , display, "com_TCR_to_supbask")

          com_TCR_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_TCR_to_supaxax  , \
         ncompallow_TCR_to_supaxax  , \
          compallow_TCR_to_supaxax  , display, "com_TCR_to_supaxax")

          com_TCR_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_TCR_to_spinstell, \
         ncompallow_TCR_to_spinstell, \
          compallow_TCR_to_spinstell, display, "com_TCR_to_spinstell")

          com_TCR_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_TCR_to_tuftIB   , \
         ncompallow_TCR_to_tuftIB   , \
          compallow_TCR_to_tuftIB   , display, "com_TCR_to_tuftIB")
if (pmesg)	print "com_TCR_to_tuftRS"
          com_TCR_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_TCR_to_tuftRS   , \
         ncompallow_TCR_to_tuftRS   , \
          compallow_TCR_to_tuftRS   , display, "com_TCR_to_tuftRS")

          com_TCR_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_TCR_to_deepbask , \
         ncompallow_TCR_to_deepbask , \
          compallow_TCR_to_deepbask , display, "com_TCR_to_deepbask")

          com_TCR_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_TCR_to_deepaxax , \
         ncompallow_TCR_to_deepaxax , \
          compallow_TCR_to_deepaxax , display, "com_TCR_to_deepaxax")

          com_TCR_to_nRT       = synaptic_compmap_construct (thisno, \
          num_nRT      ,           \
          num_TCR_to_nRT      , \
         ncompallow_TCR_to_nRT      , \
          compallow_TCR_to_nRT      , display, "com_TCR_to_nRT")

          com_TCR_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_TCR_to_nontuftRS, \
         ncompallow_TCR_to_nontuftRS, \
          compallow_TCR_to_nontuftRS, display, "com_TCR_to_nontuftRS")

          com_nRT_to_TCR       = synaptic_compmap_construct (thisno, \
          num_TCR      ,           \
          num_nRT_to_TCR      , \
         ncompallow_nRT_to_TCR      , \
          compallow_nRT_to_TCR      , display, "com_nRT_to_TCR")

          com_nRT_to_nRT       = synaptic_compmap_construct (thisno, \
          num_nRT      ,           \
          num_nRT_to_nRT      , \
         ncompallow_nRT_to_nRT      , \
          compallow_nRT_to_nRT      , display, "com_nRT_to_nRT")

          com_nontuftRS_to_suppyrRS  = synaptic_compmap_construct (thisno, \
          num_suppyrRS ,           \
          num_nontuftRS_to_suppyrRS , \
         ncompallow_nontuftRS_to_suppyrRS , \
          compallow_nontuftRS_to_suppyrRS , display, "com_nontuftRS_to_suppyrRS")

          com_nontuftRS_to_suppyrFRB = synaptic_compmap_construct (thisno, \
          num_suppyrFRB,           \
          num_nontuftRS_to_suppyrFRB, \
         ncompallow_nontuftRS_to_suppyrFRB, \
          compallow_nontuftRS_to_suppyrFRB, display, "com_nontuftRS_to_suppyrFRB")

          com_nontuftRS_to_supbask   = synaptic_compmap_construct (thisno, \
          num_supbask  ,           \
          num_nontuftRS_to_supbask  , \
         ncompallow_nontuftRS_to_supbask  , \
          compallow_nontuftRS_to_supbask  , display, "com_nontuftRS_to_supbask")

          com_nontuftRS_to_supaxax   = synaptic_compmap_construct (thisno, \
          num_supaxax  ,           \
          num_nontuftRS_to_supaxax  , \
         ncompallow_nontuftRS_to_supaxax  , \
          compallow_nontuftRS_to_supaxax  , display, "com_nontuftRS_to_supaxax")

          com_nontuftRS_to_supLTS    = synaptic_compmap_construct (thisno, \
          num_supLTS   ,           \
          num_nontuftRS_to_supLTS   , \
         ncompallow_nontuftRS_to_supLTS   , \
          compallow_nontuftRS_to_supLTS   , display, "com_nontuftRS_to_supLTS")

          com_nontuftRS_to_spinstell = synaptic_compmap_construct (thisno, \
          num_spinstell,           \
          num_nontuftRS_to_spinstell, \
         ncompallow_nontuftRS_to_spinstell, \
          compallow_nontuftRS_to_spinstell, display, "com_nontuftRS_to_spinstell")

          com_nontuftRS_to_tuftIB    = synaptic_compmap_construct (thisno, \
          num_tuftIB   ,           \
          num_nontuftRS_to_tuftIB   , \
         ncompallow_nontuftRS_to_tuftIB   , \
          compallow_nontuftRS_to_tuftIB   , display, "com_nontuftRS_to_tuftIB")

          com_nontuftRS_to_tuftRS    = synaptic_compmap_construct (thisno, \
          num_tuftRS   ,           \
          num_nontuftRS_to_tuftRS   , \
         ncompallow_nontuftRS_to_tuftRS   , \
          compallow_nontuftRS_to_tuftRS   , display, "com_nontuftRS_to_tuftRS")

          com_nontuftRS_to_deepbask  = synaptic_compmap_construct (thisno, \
          num_deepbask ,           \
          num_nontuftRS_to_deepbask , \
         ncompallow_nontuftRS_to_deepbask , \
          compallow_nontuftRS_to_deepbask , display, "com_nontuftRS_to_deepbask")

          com_nontuftRS_to_deepaxax  = synaptic_compmap_construct (thisno, \
          num_deepaxax ,           \
          num_nontuftRS_to_deepaxax , \
         ncompallow_nontuftRS_to_deepaxax , \
          compallow_nontuftRS_to_deepaxax , display, "com_nontuftRS_to_deepaxax")

          com_nontuftRS_to_deepLTS   = synaptic_compmap_construct (thisno, \
          num_deepLTS  ,           \
          num_nontuftRS_to_deepLTS  , \
         ncompallow_nontuftRS_to_deepLTS  , \
          compallow_nontuftRS_to_deepLTS  , display, "com_nontuftRS_to_deepLTS")

          com_nontuftRS_to_TCR       = synaptic_compmap_construct (thisno, \
          num_TCR      ,           \
          num_nontuftRS_to_TCR      , \
         ncompallow_nontuftRS_to_TCR      , \
          compallow_nontuftRS_to_TCR      , display, "com_nontuftRS_to_TCR")

          com_nontuftRS_to_nRT       = synaptic_compmap_construct (thisno, \
          num_nRT      ,           \
          num_nontuftRS_to_nRT      , \
         ncompallow_nontuftRS_to_nRT      , \
          compallow_nontuftRS_to_nRT      , display, "com_nontuftRS_to_nRT")

          com_nontuftRS_to_nontuftRS = synaptic_compmap_construct (thisno, \
          num_nontuftRS,           \
          num_nontuftRS_to_nontuftRS, \
         ncompallow_nontuftRS_to_nontuftRS, \
          compallow_nontuftRS_to_nontuftRS, display, "com_nontuftRS_to_nontuftRS")

/////////////////////////////////////////////////////////

// Finished construction of synaptic compartment maps. 
//
/////////////////////////////////////////////////////////
//
// Construct gap-junction tables
//
/////////////////////////////////////////////////////////
if (pmesg)           print "Construct gap-junction tables"

// axax interneurons a special case
// Note: since these reflect that in the FORTRAN code perhaps
// only the first and second cells in each group were at one time
// (note that their total number of gj's is zero)
// connected together in compartment's 12, we are refraining
// from doing anything in NEURON.  If it desired to add these connections
// later it should be a simple manner of either supplying specific NEURON
// code to do it or adding the more generalized code from another cell type
// for more extensive connections.

           gjtable_supaxax.x(1,1) = 1
           gjtable_supaxax.x(1,2) = 12
           gjtable_supaxax.x(1,3) = 2
           gjtable_supaxax.x(1,4) = 12

           gjtable_deepaxax.x(1,1) = 1
           gjtable_deepaxax.x(1,2) = 12
           gjtable_deepaxax.x(1,3) = 2
           gjtable_deepaxax.x(1,4) = 12

// end special case.

	{localloadfile("groucho_gapbld.hoc")}
	{localloadfile("groucho_gapbld_mix.hoc")}

      gjtable_suppyrRS = groucho_gapbld (thisno, num_suppyrRS, \
      totaxgj_suppyrRS  ,  \
      table_axgjcompallow_suppyrRS,  \
      num_axgjcompallow_suppyrRS, 0) 

      // create gap junctions: the below comments reply to all the below but are only listed here for simplicity
      objref suppyrRS_gap[2*totaxgj_suppyrRS+1] // two _gap's per gap junct with fortran indicies 
						// it is less confusing to have all FORTRAN indicies
      // here, than mixing FORTRAN and C style inidicies, since the tables are in FORTRAN indicies.

      // note suppyrRS_gap[0] is unused
      for i=1, totaxgj_suppyrRS {
	if (serial) {
	cellobj(gjtable_suppyrRS.x[i][1]+suppyrRS_base).comp[gjtable_suppyrRS.x[i][2]] suppyrRS_gap[i] = new gGap(0.5)
	cellobj(gjtable_suppyrRS.x[i][3]+suppyrRS_base).comp[gjtable_suppyrRS.x[i][4]] suppyrRS_gap[i+totaxgj_suppyrRS] = new gGap(0.5)

	suppyrRS_gap[i].g = gapcon_suppyrRS  // units?
	suppyrRS_gap[i+totaxgj_suppyrRS].g = gapcon_suppyrRS

	setpointer suppyrRS_gap[i].vgap, cellobj(gjtable_suppyrRS.x[i][3]+suppyrRS_base).comp[gjtable_suppyrRS.x[i][4]].v(0.5)
	setpointer suppyrRS_gap[i+totaxgj_suppyrRS].vgap, cellobj(gjtable_suppyrRS.x[i][1]+suppyrRS_base).comp[gjtable_suppyrRS.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_suppyrRS.x[i][1]+suppyrRS_base, \
		gjtable_suppyrRS.x[i][2], \
		gjtable_suppyrRS.x[i][3]+suppyrRS_base, \
		gjtable_suppyrRS.x[i][4], gapcon_suppyrRS)
	}
      }
/////////////////////////////////////
      gjtable_suppyrFRB = groucho_gapbld (thisno, num_suppyrFRB, \
      totaxgj_suppyrFRB ,  \
      table_axgjcompallow_suppyrFRB, \
      num_axgjcompallow_suppyrFRB,  0) 
      // create gap junctions in same cell class
      objref suppyrFRB_gap[2*totaxgj_suppyrFRB+1] // two _gap's per gap junct with fortran indicies 
	// note suppyrFRB_gap[0] is unused
      for i=1, totaxgj_suppyrFRB {
	if (serial) {
	cellobj(gjtable_suppyrFRB.x[i][1]+suppyrFRB_base).comp[gjtable_suppyrFRB.x[i][2]] suppyrFRB_gap[i] = new gGap(0.5)
	cellobj(gjtable_suppyrFRB.x[i][3]+suppyrFRB_base).comp[gjtable_suppyrFRB.x[i][4]] suppyrFRB_gap[i+totaxgj_suppyrFRB] = new gGap(0.5)

	suppyrFRB_gap[i].g = gapcon_suppyrFRB  // units?
	suppyrFRB_gap[i+totaxgj_suppyrFRB].g = gapcon_suppyrFRB

	setpointer suppyrFRB_gap[i].vgap, cellobj(gjtable_suppyrFRB.x[i][3]+suppyrFRB_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer suppyrFRB_gap[i+totaxgj_suppyrFRB].vgap, cellobj(gjtable_suppyrFRB.x[i][1]+suppyrFRB_base).comp[gjtable_suppyrFRB.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_suppyrFRB.x[i][1]+suppyrFRB_base, \
		gjtable_suppyrFRB.x[i][2], \
		gjtable_suppyrFRB.x[i][3]+suppyrFRB_base, \
		gjtable_suppyrFRB.x[i][4], gapcon_suppyrFRB)
	}
      }

/////////////////////////////////////

      gjtable_suppyr = groucho_gapbld_mix (thisno, num_suppyrRS,         \
      num_suppyrFRB, totaxgj_suppyr,  \
      table_axgjcompallow_suppyrRS, \
      num_axgjcompallow_suppyrRS, 0)

	gapcon_suppyr = gapcon_suppyrRS // NEURON variable only
      // create (mixed) gap junctions between two cell classes
      objref suppyr_gap[2*totaxgj_suppyr+1] // two _gap's per gap junct with fortran indicies, cell types share total number of gj's 
	// note suppyr_gap[0] is unused
      for i=1, totaxgj_suppyr {
	if (serial) {
	cellobj(gjtable_suppyr.x[i][1]+suppyrRS_base).comp[gjtable_suppyr.x[i][2]] suppyr_gap[i] = new gGap(0.5)	        // suppyrRS end
	cellobj(gjtable_suppyr.x[i][3]+suppyrFRB_base).comp[gjtable_suppyr.x[i][4]] suppyr_gap[i+totaxgj_suppyr] = new gGap(0.5) // suppyrFRB end

	suppyr_gap[i].g = gapcon_suppyr  // r for a gj point process located on RS. units?
	suppyr_gap[i+totaxgj_suppyr].g = gapcon_suppyr // r for a gj point process located on FRB

	setpointer suppyr_gap[i].vgap, cellobj(gjtable_suppyr.x[i][3]+suppyrFRB_base).comp[gjtable_suppyr.x[i][4]].v(0.5)
	setpointer suppyr_gap[i+totaxgj_suppyr].vgap, cellobj(gjtable_suppyr.x[i][1]+suppyrRS_base).comp[gjtable_suppyr.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_suppyr.x[i][1]+suppyrRS_base, \
		gjtable_suppyr.x[i][2], \
		gjtable_suppyr.x[i][3]+suppyrFRB_base, \
		gjtable_suppyr.x[i][4], gapcon_suppyr)
	}
      }
/////////////////////////////////////
      
      gjtable_spinstell = groucho_gapbld (thisno, num_spinstell, \
      totaxgj_spinstell ,  \
      table_axgjcompallow_spinstell, \
      num_axgjcompallow_spinstell,  0) 

      // create gap junctions in same cell class
      objref spinstell_gap[2*totaxgj_spinstell+1] // two _gap's per gap junct with fortran indicies 
	// note spinstell_gap[0] is unused
      for i=1, totaxgj_spinstell {
	if (serial) {
	cellobj(gjtable_spinstell.x[i][1]+spinstell_base).comp[gjtable_spinstell.x[i][2]] spinstell_gap[i] = new gGap(0.5)
	cellobj(gjtable_spinstell.x[i][3]+spinstell_base).comp[gjtable_spinstell.x[i][4]] spinstell_gap[i+totaxgj_spinstell] = new gGap(0.5)

	spinstell_gap[i].g = gapcon_spinstell  // units?
	spinstell_gap[i+totaxgj_spinstell].g = gapcon_spinstell

	setpointer spinstell_gap[i].vgap, cellobj(gjtable_spinstell.x[i][3]+spinstell_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer spinstell_gap[i+totaxgj_spinstell].vgap, cellobj(gjtable_spinstell.x[i][1]+spinstell_base).comp[gjtable_spinstell.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_spinstell.x[i][1]+spinstell_base, \
		gjtable_spinstell.x[i][2], \
		gjtable_spinstell.x[i][3]+spinstell_base, \
		gjtable_spinstell.x[i][4], gapcon_spinstell)
	}
      }

/////////////////////////////////////

      gjtable_tuftIB    = groucho_gapbld (thisno, num_tuftIB,    \
      totaxgj_tuftIB    ,  \
      table_axgjcompallow_tuftIB   , \
      num_axgjcompallow_tuftIB   ,  0) 

      // create gap junctions in same cell class
      objref tuftIB_gap[2*totaxgj_tuftIB+1] // two _gap's per gap junct with fortran indicies 
	// note tuftIB_gap[0] is unused
      for i=1, totaxgj_tuftIB {
	if (serial) {
	cellobj(gjtable_tuftIB.x[i][1]+tuftIB_base).comp[gjtable_tuftIB.x[i][2]] tuftIB_gap[i] = new gGap(0.5)
	cellobj(gjtable_tuftIB.x[i][3]+tuftIB_base).comp[gjtable_tuftIB.x[i][4]] tuftIB_gap[i+totaxgj_tuftIB] = new gGap(0.5)

	tuftIB_gap[i].g = gapcon_tuftIB  // units?
	tuftIB_gap[i+totaxgj_tuftIB].g = gapcon_tuftIB

	setpointer tuftIB_gap[i].vgap, cellobj(gjtable_tuftIB.x[i][3]+tuftIB_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer tuftIB_gap[i+totaxgj_tuftIB].vgap, cellobj(gjtable_tuftIB.x[i][1]+tuftIB_base).comp[gjtable_tuftIB.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_tuftIB.x[i][1]+tuftIB_base, \
		gjtable_tuftIB.x[i][2], \
		gjtable_tuftIB.x[i][3]+tuftIB_base, \
		gjtable_tuftIB.x[i][4], gapcon_tuftIB)
	}
      }

/////////////////////////////////////

      gjtable_tuftRS    = groucho_gapbld (thisno, num_tuftRS,    \
      totaxgj_tuftRS    ,  \
      table_axgjcompallow_tuftRS   , \
      num_axgjcompallow_tuftRS   ,  0) 

      // create gap junctions in same cell class
      objref tuftRS_gap[2*totaxgj_tuftRS+1] // two _gap's per gap junct with fortran indicies 
	// note tuftRS_gap[0] is unused
      for i=1, totaxgj_tuftRS {
	if (serial) {
	cellobj(gjtable_tuftRS.x[i][1]+tuftRS_base).comp[gjtable_tuftRS.x[i][2]] tuftRS_gap[i] = new gGap(0.5)
	cellobj(gjtable_tuftRS.x[i][3]+tuftRS_base).comp[gjtable_tuftRS.x[i][4]] tuftRS_gap[i+totaxgj_tuftRS] = new gGap(0.5)

	tuftRS_gap[i].g = gapcon_tuftRS  // units?
	tuftRS_gap[i+totaxgj_tuftRS].g = gapcon_tuftRS

	setpointer tuftRS_gap[i].vgap, cellobj(gjtable_tuftRS.x[i][3]+tuftRS_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer tuftRS_gap[i+totaxgj_tuftRS].vgap, cellobj(gjtable_tuftRS.x[i][1]+tuftRS_base).comp[gjtable_tuftRS.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_tuftRS.x[i][1]+tuftRS_base, \
		gjtable_tuftRS.x[i][2], \
		gjtable_tuftRS.x[i][3]+tuftRS_base, \
		gjtable_tuftRS.x[i][4], gapcon_tuftRS)
	}
      }

/////////////////////////////////////

      gjtable_tuft = groucho_gapbld_mix (thisno, num_tuftIB,         \
      num_tuftRS, totaxgj_tuft,  \
      table_axgjcompallow_tuftIB, \
      num_axgjcompallow_tuftIB, 0)
      gapcon_tuft = gapcon_tuftIB // NEURON variable only
      // create (mixed) gap junctions between two cell classes
      objref tuft_gap[2*totaxgj_tuft+1] // two _gap's per gap junct with fortran indicies, cell types share total number of gj's 
	// note tuft_gap[0] is unused
      for i=1, totaxgj_tuft {
	if (serial) {
	cellobj(gjtable_tuft.x[i][1]+tuftIB_base).comp[gjtable_tuft.x[i][2]] tuft_gap[i] = new gGap(0.5)	        // tuftIB end
	cellobj(gjtable_tuft.x[i][3]+tuftRS_base).comp[gjtable_tuft.x[i][4]] tuft_gap[i+totaxgj_tuft] = new gGap(0.5) // tuftRS end

	tuft_gap[i].g = gapcon_tuft  // units?
	tuft_gap[i+totaxgj_tuft].g = gapcon_tuft

	setpointer tuft_gap[i].vgap, cellobj(gjtable_tuft.x[i][3]+tuftRS_base).comp[gjtable_tuft.x[i][4]].v(0.5)
	setpointer tuft_gap[i+totaxgj_tuft].vgap, cellobj(gjtable_tuft.x[i][1]+tuftIB_base).comp[gjtable_tuft.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_tuft.x[i][1]+tuftIB_base, \
		gjtable_tuft.x[i][2], \
		gjtable_tuft.x[i][3]+tuftRS_base, \
		gjtable_tuft.x[i][4], gapcon_tuft)
	}
      }
/////////////////////////////////////
      
      gjtable_nontuftRS    = groucho_gapbld (thisno, num_nontuftRS,    \
      totaxgj_nontuftRS    ,  \
      table_axgjcompallow_nontuftRS   , \
      num_axgjcompallow_nontuftRS   ,  0) 

      // create gap junctions in same cell class
      objref nontuftRS_gap[2*totaxgj_nontuftRS+1] // two _gap's per gap junct with fortran indicies 
	// note nontuftRS_gap[0] is unused
      for i=1, totaxgj_nontuftRS {
	if (serial) {
	cellobj(gjtable_nontuftRS.x[i][1]+nontuftRS_base).comp[gjtable_nontuftRS.x[i][2]] nontuftRS_gap[i] = new gGap(0.5)
	cellobj(gjtable_nontuftRS.x[i][3]+nontuftRS_base).comp[gjtable_nontuftRS.x[i][4]] nontuftRS_gap[i+totaxgj_nontuftRS] = new gGap(0.5)

	nontuftRS_gap[i].g = gapcon_nontuftRS  // units?
	nontuftRS_gap[i+totaxgj_nontuftRS].g = gapcon_nontuftRS

	setpointer nontuftRS_gap[i].vgap, cellobj(gjtable_nontuftRS.x[i][3]+nontuftRS_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer nontuftRS_gap[i+totaxgj_nontuftRS].vgap, cellobj(gjtable_nontuftRS.x[i][1]+nontuftRS_base).comp[gjtable_nontuftRS.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_nontuftRS.x[i][1]+nontuftRS_base, \
		gjtable_nontuftRS.x[i][2], \
		gjtable_nontuftRS.x[i][3]+nontuftRS_base, \
		gjtable_nontuftRS.x[i][4], gapcon_nontuftRS)
	}
      }

/////////////////////////////////////

      gjtable_supbask      = groucho_gapbld (thisno, num_supbask  ,    \
      totSDgj_supbask      ,  \
      table_SDgjcompallow_supbask     , \
      num_SDgjcompallow_supbask     ,  0) 

      // create gap junctions in same cell class
      objref supbask_gap[2*totSDgj_supbask+1] // two _gap's per gap junct with fortran indicies 
	// note supbask_gap[0] is unused
      for i=1, totSDgj_supbask {
	if (serial) {
	cellobj(gjtable_supbask.x[i][1]+supbask_base).comp[gjtable_supbask.x[i][2]] supbask_gap[i] = new gGap(0.5)
	cellobj(gjtable_supbask.x[i][3]+supbask_base).comp[gjtable_supbask.x[i][4]] supbask_gap[i+totSDgj_supbask] = new gGap(0.5)

	supbask_gap[i].g = gapcon_supbask  // units?
	supbask_gap[i+totSDgj_supbask].g = gapcon_supbask

	setpointer supbask_gap[i].vgap, cellobj(gjtable_supbask.x[i][3]+supbask_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer supbask_gap[i+totSDgj_supbask].vgap, cellobj(gjtable_supbask.x[i][1]+supbask_base).comp[gjtable_supbask.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_supbask.x[i][1]+supbask_base, \
		gjtable_supbask.x[i][2], \
		gjtable_supbask.x[i][3]+supbask_base, \
		gjtable_supbask.x[i][4], gapcon_supbask)
	}
      }

/////////////////////////////////////

      gjtable_supLTS       = groucho_gapbld (thisno, num_supLTS   ,    \
      totSDgj_supLTS       ,  \
      table_SDgjcompallow_supLTS      , \
      num_SDgjcompallow_supLTS      ,  0) 

      // create gap junctions in same cell class
      objref supLTS_gap[2*totSDgj_supLTS+1] // two _gap's per gap junct with fortran indicies 
	// note supLTS_gap[0] is unused
      for i=1, totSDgj_supLTS {
	if (serial) {
	cellobj(gjtable_supLTS.x[i][1]+supLTS_base).comp[gjtable_supLTS.x[i][2]] supLTS_gap[i] = new gGap(0.5)
	cellobj(gjtable_supLTS.x[i][3]+supLTS_base).comp[gjtable_supLTS.x[i][4]] supLTS_gap[i+totSDgj_supLTS] = new gGap(0.5)

	supLTS_gap[i].g = gapcon_supLTS  // units?
	supLTS_gap[i+totSDgj_supLTS].g = gapcon_supLTS

	setpointer supLTS_gap[i].vgap, cellobj(gjtable_supLTS.x[i][3]+supLTS_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer supLTS_gap[i+totSDgj_supLTS].vgap, cellobj(gjtable_supLTS.x[i][1]+supLTS_base).comp[gjtable_supLTS.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_supLTS.x[i][1]+supLTS_base, \
		gjtable_supLTS.x[i][2], \
		gjtable_supLTS.x[i][3]+supLTS_base, \
		gjtable_supLTS.x[i][4], gapcon_supLTS)
	}
      }

/////////////////////////////////////

      gjtable_deepbask     = groucho_gapbld (thisno, num_deepbask ,    \
      totSDgj_deepbask     ,  \
      table_SDgjcompallow_deepbask    , \
      num_SDgjcompallow_deepbask    ,  0) 

      // create gap junctions in same cell class
      objref deepbask_gap[2*totSDgj_deepbask+1] // two _gap's per gap junct with fortran indicies 
	// note deepbask_gap[0] is unused
      for i=1, totSDgj_deepbask {
	if (serial) {
	cellobj(gjtable_deepbask.x[i][1]+deepbask_base).comp[gjtable_deepbask.x[i][2]] deepbask_gap[i] = new gGap(0.5)
	cellobj(gjtable_deepbask.x[i][3]+deepbask_base).comp[gjtable_deepbask.x[i][4]] deepbask_gap[i+totSDgj_deepbask] = new gGap(0.5)

	deepbask_gap[i].g = gapcon_deepbask  // units?
	deepbask_gap[i+totSDgj_deepbask].g = gapcon_deepbask

	setpointer deepbask_gap[i].vgap, cellobj(gjtable_deepbask.x[i][3]+deepbask_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer deepbask_gap[i+totSDgj_deepbask].vgap, cellobj(gjtable_deepbask.x[i][1]+deepbask_base).comp[gjtable_deepbask.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_deepbask.x[i][1]+deepbask_base, \
		gjtable_deepbask.x[i][2], \
		gjtable_deepbask.x[i][3]+deepbask_base, \
		gjtable_deepbask.x[i][4], gapcon_deepbask)
	}
      }

/////////////////////////////////////

      gjtable_deepLTS      = groucho_gapbld (thisno, num_deepLTS  ,    \
      totSDgj_deepLTS      ,  \
      table_SDgjcompallow_deepLTS     , \
      num_SDgjcompallow_deepLTS     ,  0) 

      // create gap junctions in same cell class
      objref deepLTS_gap[2*totSDgj_deepLTS+1] // two _gap's per gap junct with fortran indicies 
	// note deepLTS_gap[0] is unused
      for i=1, totSDgj_deepLTS {
	if (serial) {
	cellobj(gjtable_deepLTS.x[i][1]+deepLTS_base).comp[gjtable_deepLTS.x[i][2]] deepLTS_gap[i] = new gGap(0.5)
	cellobj(gjtable_deepLTS.x[i][3]+deepLTS_base).comp[gjtable_deepLTS.x[i][4]] deepLTS_gap[i+totSDgj_deepLTS] = new gGap(0.5)

	deepLTS_gap[i].g = gapcon_deepLTS  // units?
	deepLTS_gap[i+totSDgj_deepLTS].g = gapcon_deepLTS

	setpointer deepLTS_gap[i].vgap, cellobj(gjtable_deepLTS.x[i][3]+deepLTS_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer deepLTS_gap[i+totSDgj_deepLTS].vgap, cellobj(gjtable_deepLTS.x[i][1]+deepLTS_base).comp[gjtable_deepLTS.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_deepLTS.x[i][1]+deepLTS_base, \
		gjtable_deepLTS.x[i][2], \
		gjtable_deepLTS.x[i][3]+deepLTS_base, \
		gjtable_deepLTS.x[i][4], gapcon_deepLTS)
	}
      }

/////////////////////////////////////

      gjtable_TCR          = groucho_gapbld (thisno, num_TCR      ,    \
      totaxgj_TCR          ,  \
      table_axgjcompallow_TCR         , \
      num_axgjcompallow_TCR         ,  0) 

      // create gap junctions in same cell class
      objref TCR_gap[2*totaxgj_TCR+1] // two _gap's per gap junct with fortran indicies 
	// note TCR_gap[0] is unused
      for i=1, totaxgj_TCR {
	if (serial) {
	cellobj(gjtable_TCR.x[i][1]+TCR_base).comp[gjtable_TCR.x[i][2]] TCR_gap[i] = new gGap(0.5)
	cellobj(gjtable_TCR.x[i][3]+TCR_base).comp[gjtable_TCR.x[i][4]] TCR_gap[i+totaxgj_TCR] = new gGap(0.5)

	TCR_gap[i].g = gapcon_TCR  // units?
	TCR_gap[i+totaxgj_TCR].g = gapcon_TCR

	setpointer TCR_gap[i].vgap, cellobj(gjtable_TCR.x[i][3]+TCR_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer TCR_gap[i+totaxgj_TCR].vgap, cellobj(gjtable_TCR.x[i][1]+TCR_base).comp[gjtable_TCR.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_TCR.x[i][1]+TCR_base, \
		gjtable_TCR.x[i][2], \
		gjtable_TCR.x[i][3]+TCR_base, \
		gjtable_TCR.x[i][4], gapcon_TCR)
	}
      }

/////////////////////////////////////

      gjtable_nRT = groucho_gapbld (thisno, num_nRT      ,    \
      totSDgj_nRT          ,  \
      table_SDgjcompallow_nRT         , \
      num_SDgjcompallow_nRT         ,  0) 

      // create gap junctions in same cell class
      objref nRT_gap[2*totSDgj_nRT+1] // two _gap's per gap junct with fortran indicies 
	// note nRT_gap[0] is unused
      for i=1, totSDgj_nRT {
	if (serial) {
	cellobj(gjtable_nRT.x[i][1]+nRT_base).comp[gjtable_nRT.x[i][2]] nRT_gap[i] = new gGap(0.5)
	cellobj(gjtable_nRT.x[i][3]+nRT_base).comp[gjtable_nRT.x[i][4]] nRT_gap[i+totSDgj_nRT] = new gGap(0.5)

	nRT_gap[i].g = gapcon_nRT  // units?
	nRT_gap[i+totSDgj_nRT].g = gapcon_nRT

	setpointer nRT_gap[i].vgap, cellobj(gjtable_nRT.x[i][3]+nRT_base).comp[gjtable.x[i][4]].v(0.5)
	setpointer nRT_gap[i+totSDgj_nRT].vgap, cellobj(gjtable_nRT.x[i][1]+nRT_base).comp[gjtable_nRT.x[i][2]].v(0.5)
	}else{
		par_gap_create(gjtable_nRT.x[i][1]+nRT_base, \
		gjtable_nRT.x[i][2], \
		gjtable_nRT.x[i][3]+nRT_base, \
		gjtable_nRT.x[i][4], gapcon_nRT)
	}
      }

/////////////////////////////////////


/////////////////////////////////////////////////////////
//
// End of construction of gap-junction tables
//
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
//
// Define synapse, current injection strengths
//
/////////////////////////////////////////////////////////

// Define spread of values for gGABA_nRT_to_TCR
       ranvec_nRT = durand(seed,num_nRT+1,ranvec_nRT)
	gGABA_nRT_to_TCR = ranvec_nRT.mul(1.4e-3).add(0.7e-3).c

proc gaba_weight_read() { localobj f, s
	s = new String()
	sprint(s.s, "../../p2c/other_rnd/%s", $s2)
	f = new File()
	f.ropen(s.s)
	$o1.scanf(f, $o1.size-1)
	$o1.resize($o1.size+1)
	$o1.rotate(1,0)
	if (pmesg) $o1.printf("%g\n")
}

	if (use_p2c_net_connections) {
		gaba_weight_read(gGABA_nRT_to_TCR, "gGABA_nRT_to_TCR.dat")
	}

// Define tonic currents to different cell types
if (pmesg)	print "Adding constant random current injections to the somas"
if (pmesg)	print "  of some cell types."

       ranvec_suppyrRS = durand(seed,num_suppyrRS+1 ,ranvec_suppyrRS )
	curr_suppyrRS  =ranvec_suppyrRS .mul( 0.05e0).add(-0.025e0).c
	set_const_curr_inj(suppyrRS_base, num_suppyrRS, curr_suppyrRS)

       ranvec_suppyrFRB= durand(seed,num_suppyrFRB+1,ranvec_suppyrFRB)
	curr_suppyrFRB =ranvec_suppyrFRB.mul( 0.1e0).add(0.25e0).c
	set_const_curr_inj(suppyrFRB_base, num_suppyrFRB, curr_suppyrFRB)

       ranvec_supbask  = durand(seed,num_supbask+1  ,ranvec_supbask  )
	curr_supbask   =ranvec_supbask  .mul( 0.02e0).add(0.00e0).c
	set_const_curr_inj(supbask_base, num_supbask, curr_supbask)

       ranvec_spinstell= durand(seed,num_spinstell+1,ranvec_spinstell)
	curr_spinstell =ranvec_spinstell.mul( 0.00e0).add(0.00e0).c
	set_const_curr_inj(spinstell_base, num_spinstell, curr_spinstell)

       ranvec_tuftIB   = durand(seed,num_tuftIB+1   ,ranvec_tuftIB   )
	curr_tuftIB    =ranvec_tuftIB   .mul( 0.1e0).add(awake*1.00e0).c
//       curr_tuftIB    (1,L) = 0.10e0 + 0.1e0 *
//       curr_tuftIB    (1,L) = -1.00e0 + 0.1e0 * // ? suppress intrinsic bursting
//       curr_tuftIB    (1,L) = 1.00e0 + 0.1e0 *  //  ? wake up cortex ?
	set_const_curr_inj(tuftIB_base, num_tuftIB, curr_tuftIB)


       ranvec_tuftRS   = durand(seed,num_tuftRS+1   ,ranvec_tuftRS   )
	curr_tuftRS    =ranvec_tuftRS   .mul( 0.1e0).add(awake*1.00e0).c
//       curr_tuftRS    (1,L) = 0.10e0 + 0.1e0 *
//       curr_tuftRS    (1,L) = 1.00e0 + 0.1e0 *  //  ? wake up cortex?
	set_const_curr_inj(tuftRS_base, num_tuftRS, curr_tuftRS)


//     choose an postsyn_cell_num for debug print
       postsyn_cell_num=1
//        print *,thisno,": curr_tuftRS(1,",postsyn_cell_num,") = ",curr_tuftRS(1,postsyn_cell_num), 
//        ", ranvec_tuftRS(postsyn_cell_num) = ",ranvec_tuftRS(postsyn_cell_num), 
//        ", curr_suppyrFRB (1,",postsyn_cell_num,") = ", curr_suppyrFRB (1,postsyn_cell_num), 
//        ",  ranvec_suppyrFRB(postsyn_cell_num) = ", ranvec_suppyrFRB(postsyn_cell_num)

       ranvec_nontuftRS = durand(seed,num_nontuftRS+1 ,ranvec_nontuftRS )
	curr_nontuftRS  =ranvec_nontuftRS .mul( 0.1e0).add(awake*0.75e0).c
//       curr_nontuftRS  (1,postsyn_cell_num) = 0.75e0 + 0.1e0 *  // ? wake up cortex
	set_const_curr_inj(nontuftRS_base, num_nontuftRS, curr_nontuftRS)

       ranvec_nRT       = durand(seed,num_nRT+1       ,ranvec_nRT       )
	curr_nRT        =ranvec_nRT       .mul( 0.05e0).add(0.10e0).c
	set_const_curr_inj(nRT_base, num_nRT, curr_nRT)

// During sz, curr to TCR can be zero
       ranvec_TCR       = durand(seed,num_TCR +1      ,ranvec_TCR       )
	curr_TCR        =ranvec_TCR       .mul( 0.01e0).add(0.00e0).c
//       curr_TCR        (1,postsyn_cell_num) = 1.40e0 + 0.01e0 *
	set_const_curr_inj(TCR_base, num_TCR, curr_TCR)
if (pmesg)	print "Completed adding constant random current injections."

       seed.x[0] = 137.e0

       O = 0
       time = 0.e0

// CODE BELOW FOR "PICROTOXIN": scale all GABA-A
//        GOTO 30
	picrotoxin = 1 // 1 for true - this code mimics apparant default of
			// of FORTRAN code to run with PICROTOXIN code executed
	if (picrotoxin) {
         z1 = 0.06e0  // for intracortical IPSCs
         z2 = 1.00e0  // for intrathalamic IPSCs, usual 1.00
      gGABA_supbask_to_suppyrRS   *= (  z1 )
      gGABA_supbask_to_suppyrFRB  *= (  z1 )
      gGABA_supbask_to_supbask    *= (  z1 )
      gGABA_supbask_to_supaxax    *= (  z1 )
      gGABA_supbask_to_supLTS     *= (  z1 )
      gGABA_supbask_to_spinstell  *= (  z1 )

      gGABA_supaxax_to_suppyrRS   *= (  z1 )
      gGABA_supaxax_to_suppyrFRB  *= (  z1 )
      gGABA_supaxax_to_spinstell  *= (  z1 )
      gGABA_supaxax_to_tuftIB     *= (  z1 )
      gGABA_supaxax_to_tuftRS     *= (  z1 )
      gGABA_supaxax_to_nontuftRS  *= (  z1 )

      gGABA_supLTS_to_suppyrRS    *= (  z1 )
      gGABA_supLTS_to_suppyrFRB   *= (  z1 )
      gGABA_supLTS_to_supbask     *= (  z1 )
      gGABA_supLTS_to_supaxax     *= (  z1 )
      gGABA_supLTS_to_supLTS      *= (  z1 )
      gGABA_supLTS_to_spinstell   *= (  z1 )
      gGABA_supLTS_to_tuftIB      *= (  z1 )
      gGABA_supLTS_to_tuftRS      *= (  z1 )
      gGABA_supLTS_to_deepbask    *= (  z1 )
      gGABA_supLTS_to_deepaxax    *= (  z1 )
      gGABA_supLTS_to_deepLTS     *= (  z1 )
      gGABA_supLTS_to_nontuftRS   *= (  z1 )

      gGABA_deepbask_to_spinstell *= (  z1 )
      gGABA_deepbask_to_tuftIB    *= (  z1 )
      gGABA_deepbask_to_tuftRS    *= (  z1 )
      gGABA_deepbask_to_deepbask  *= (  z1 )
      gGABA_deepbask_to_deepaxax  *= (  z1 )
      gGABA_deepbask_to_deepLTS   *= (  z1 )
      gGABA_deepbask_to_nontuftRS *= (  z1 )

      gGABA_deepaxax_to_suppyrRS   *= ( z1 )
      gGABA_deepaxax_to_suppyrFRB  *= ( z1 )
      gGABA_deepaxax_to_spinstell  *= ( z1 )
      gGABA_deepaxax_to_tuftIB     *= ( z1 )
      gGABA_deepaxax_to_tuftRS     *= ( z1 )
      gGABA_deepaxax_to_nontuftRS  *= ( z1 )

      gGABA_deepLTS_to_suppyrRS    *= ( z1 )
      gGABA_deepLTS_to_suppyrFRB   *= ( z1 )
      gGABA_deepLTS_to_supbask     *= ( z1 )
      gGABA_deepLTS_to_supaxax     *= ( z1 )
      gGABA_deepLTS_to_supLTS      *= ( z1 )
      gGABA_deepLTS_to_spinstell   *= ( z1 )
      gGABA_deepLTS_to_tuftIB      *= ( z1 )
      gGABA_deepLTS_to_tuftRS      *= ( z1 )
      gGABA_deepLTS_to_deepbask    *= ( z1 )
      gGABA_deepLTS_to_deepaxax    *= ( z1 )
      gGABA_deepLTS_to_deepLTS     *= ( z1 )
      gGABA_deepLTS_to_nontuftRS   *= ( z1 )

//        for postsyn_cell = 1, num_nRT { // note L is a reserved name in NEURON
      gGABA_nRT_to_TCR.mul(z2) 
//        }
      gGABA_nRT_to_nRT             = z2 * gGABA_nRT_to_nRT

	} // end if (picrotoxin) {
// 30          CONTINUE
// End "PICROTOXIN" code

// Code below is "NBQX": scale all AMPA
//        GOTO 35
	NBQX = 1 // this variable mimis FORTRAN code default of executing the
		// NBQX code
	if (NBQX) {

//          z1 = 1.00e0  // intracortical e/i
           z1 = 1.00e0  // intracortical e/i // usual 1.00
           z3 = 1.00e0  // TCR -> cortical i // usual 1.0 \
           z4 = 1.00e0  // TCR -> nRT  nontuftRS ->nRT // usual 1.00
           z2 = 2.00e0  // everything else; note that this may be INCREASED, usual 1.0

      gAMPA_suppyrRS_to_suppyrRS= z2 * gAMPA_suppyrRS_to_suppyrRS
      gAMPA_suppyrRS_to_suppyrFRB= z2 * gAMPA_suppyrRS_to_suppyrFRB
      gAMPA_suppyrRS_to_supbask  = z1 * gAMPA_suppyrRS_to_supbask
      gAMPA_suppyrRS_to_supaxax  = z1 * gAMPA_suppyrRS_to_supaxax
      gAMPA_suppyrRS_to_supLTS   = z1 * gAMPA_suppyrRS_to_supLTS
      gAMPA_suppyrRS_to_spinstell= z2 * gAMPA_suppyrRS_to_spinstell
      gAMPA_suppyrRS_to_tuftIB   = z2 * gAMPA_suppyrRS_to_tuftIB
      gAMPA_suppyrRS_to_tuftRS   = z2 * gAMPA_suppyrRS_to_tuftRS
      gAMPA_suppyrRS_to_deepbask = z1 * gAMPA_suppyrRS_to_deepbask
      gAMPA_suppyrRS_to_deepaxax = z1 * gAMPA_suppyrRS_to_deepaxax
      gAMPA_suppyrRS_to_deepLTS  = z1 * gAMPA_suppyrRS_to_deepLTS
      gAMPA_suppyrRS_to_nontuftRS= z2 * gAMPA_suppyrRS_to_nontuftRS

      gAMPA_suppyrFRB_to_suppyrRS= z2 * gAMPA_suppyrFRB_to_suppyrRS
      gAMPA_suppyrFRB_to_suppyrFRB=z2 * gAMPA_suppyrFRB_to_suppyrFRB
      gAMPA_suppyrFRB_to_supbask  =z1 * gAMPA_suppyrFRB_to_supbask
      gAMPA_suppyrFRB_to_supaxax  =z1 * gAMPA_suppyrFRB_to_supaxax
      gAMPA_suppyrFRB_to_supLTS   =z1 * gAMPA_suppyrFRB_to_supLTS
      gAMPA_suppyrFRB_to_spinstell=z2 * gAMPA_suppyrFRB_to_spinstell
      gAMPA_suppyrFRB_to_tuftIB   =z2 * gAMPA_suppyrFRB_to_tuftIB
      gAMPA_suppyrFRB_to_tuftRS   =z2 * gAMPA_suppyrFRB_to_tuftRS
      gAMPA_suppyrFRB_to_deepbask =z1 * gAMPA_suppyrFRB_to_deepbask
      gAMPA_suppyrFRB_to_deepaxax =z1 * gAMPA_suppyrFRB_to_deepaxax
      gAMPA_suppyrFRB_to_deepLTS  =z1 * gAMPA_suppyrFRB_to_deepLTS
      gAMPA_suppyrFRB_to_nontuftRS=z2 * gAMPA_suppyrFRB_to_nontuftRS

      gAMPA_spinstell_to_suppyrRS = z2 * gAMPA_spinstell_to_suppyrRS
      gAMPA_spinstell_to_suppyrFRB= z2 * gAMPA_spinstell_to_suppyrFRB
      gAMPA_spinstell_to_supbask  = z1 * gAMPA_spinstell_to_supbask
      gAMPA_spinstell_to_supaxax  = z1 * gAMPA_spinstell_to_supaxax
      gAMPA_spinstell_to_supLTS   = z1 * gAMPA_spinstell_to_supLTS
      gAMPA_spinstell_to_spinstell= z2 * gAMPA_spinstell_to_spinstell
      gAMPA_spinstell_to_tuftIB   = z2 * gAMPA_spinstell_to_tuftIB
      gAMPA_spinstell_to_tuftRS   = z2 * gAMPA_spinstell_to_tuftRS
      gAMPA_spinstell_to_deepbask = z1 * gAMPA_spinstell_to_deepbask
      gAMPA_spinstell_to_deepaxax = z1 * gAMPA_spinstell_to_deepaxax
      gAMPA_spinstell_to_deepLTS  = z1 * gAMPA_spinstell_to_deepLTS
      gAMPA_spinstell_to_nontuftRS= z2 * gAMPA_spinstell_to_nontuftRS

      gAMPA_tuftIB_to_suppyrRS    = z2 * gAMPA_tuftIB_to_suppyrRS
      gAMPA_tuftIB_to_suppyrFRB   = z2 * gAMPA_tuftIB_to_suppyrFRB
      gAMPA_tuftIB_to_supbask     = z1 * gAMPA_tuftIB_to_supbask
      gAMPA_tuftIB_to_supaxax     = z1 * gAMPA_tuftIB_to_supaxax
      gAMPA_tuftIB_to_supLTS      = z1 * gAMPA_tuftIB_to_supLTS
      gAMPA_tuftIB_to_spinstell   = z2 * gAMPA_tuftIB_to_spinstell
      gAMPA_tuftIB_to_tuftIB      = z2 * gAMPA_tuftIB_to_tuftIB
      gAMPA_tuftIB_to_tuftRS      = z2 * gAMPA_tuftIB_to_tuftRS
      gAMPA_tuftIB_to_deepbask    = z1 * gAMPA_tuftIB_to_deepbask
      gAMPA_tuftIB_to_deepaxax    = z1 * gAMPA_tuftIB_to_deepaxax
      gAMPA_tuftIB_to_deepLTS     = z1 * gAMPA_tuftIB_to_deepLTS
      gAMPA_tuftIB_to_nontuftRS   = z2 * gAMPA_tuftIB_to_nontuftRS

      gAMPA_tuftRS_to_suppyrRS    = z2 * gAMPA_tuftRS_to_suppyrRS
      gAMPA_tuftRS_to_suppyrFRB   = z2 * gAMPA_tuftRS_to_suppyrFRB
      gAMPA_tuftRS_to_supbask     = z1 * gAMPA_tuftRS_to_supbask 
      gAMPA_tuftRS_to_supaxax     = z1 * gAMPA_tuftRS_to_supaxax
      gAMPA_tuftRS_to_supLTS      = z1 * gAMPA_tuftRS_to_supLTS
      gAMPA_tuftRS_to_spinstell   = z2 * gAMPA_tuftRS_to_spinstell
      gAMPA_tuftRS_to_tuftIB      = z2 * gAMPA_tuftRS_to_tuftIB
      gAMPA_tuftRS_to_tuftRS      = z2 * gAMPA_tuftRS_to_tuftRS
      gAMPA_tuftRS_to_deepbask    = z1 * gAMPA_tuftRS_to_deepbask
      gAMPA_tuftRS_to_deepaxax    = z1 * gAMPA_tuftRS_to_deepaxax
      gAMPA_tuftRS_to_deepLTS     = z1 * gAMPA_tuftRS_to_deepLTS
      gAMPA_tuftRS_to_nontuftRS   = z2 * gAMPA_tuftRS_to_nontuftRS

      gAMPA_TCR_to_suppyrRS        = z2 * gAMPA_TCR_to_suppyrRS
      gAMPA_TCR_to_suppyrFRB       = z2 * gAMPA_TCR_to_suppyrFRB
      gAMPA_TCR_to_supbask         = z3 * gAMPA_TCR_to_supbask
      gAMPA_TCR_to_supaxax         = z3 * gAMPA_TCR_to_supaxax
      gAMPA_TCR_to_spinstell       = z2 * gAMPA_TCR_to_spinstell
      gAMPA_TCR_to_tuftIB          = z2 * gAMPA_TCR_to_tuftIB
      gAMPA_TCR_to_tuftRS          = z2 * gAMPA_TCR_to_tuftRS
      gAMPA_TCR_to_deepbask        = z3 * gAMPA_TCR_to_deepbask
      gAMPA_TCR_to_deepaxax        = z3 * gAMPA_TCR_to_deepaxax
      gAMPA_TCR_to_nRT             = z4 * gAMPA_TCR_to_nRT
      gAMPA_TCR_to_nontuftRS       = z2 * gAMPA_TCR_to_nontuftRS

      gAMPA_nontuftRS_to_suppyrRS  = z2 * gAMPA_nontuftRS_to_suppyrRS
      gAMPA_nontuftRS_to_suppyrFRB = z2 * gAMPA_nontuftRS_to_suppyrFRB
      gAMPA_nontuftRS_to_supbask   = z1 * gAMPA_nontuftRS_to_supbask
      gAMPA_nontuftRS_to_supaxax   = z1 * gAMPA_nontuftRS_to_supaxax
      gAMPA_nontuftRS_to_supLTS    = z1 * gAMPA_nontuftRS_to_supLTS
      gAMPA_nontuftRS_to_spinstell = z2 * gAMPA_nontuftRS_to_spinstell
      gAMPA_nontuftRS_to_tuftIB    = z2 * gAMPA_nontuftRS_to_tuftIB
      gAMPA_nontuftRS_to_tuftRS    = z2 * gAMPA_nontuftRS_to_tuftRS
      gAMPA_nontuftRS_to_deepbask  = z1 * gAMPA_nontuftRS_to_deepbask
      gAMPA_nontuftRS_to_deepaxax  = z1 * gAMPA_nontuftRS_to_deepaxax
      gAMPA_nontuftRS_to_deepLTS   = z1 * gAMPA_nontuftRS_to_deepLTS
      gAMPA_nontuftRS_to_TCR       = z2 * gAMPA_nontuftRS_to_TCR
      gAMPA_nontuftRS_to_nRT       = z4 * gAMPA_nontuftRS_to_nRT
      gAMPA_nontuftRS_to_nontuftRS = z2 * gAMPA_nontuftRS_to_nontuftRS
	} // end if (NBQX) {
// 35         CONTINUE
// End "NBQX" section.

// Code below scales TCR output to cortex (not to nRT), AMPA  NMDA
//     goto 60
	scale_TCR_output = 1 // created to handle default FORTRAN
			     // execution of the code below
	if (scale_TCR_output) {
       z = 0.e0

      gAMPA_TCR_to_suppyrRS = z * gAMPA_TCR_to_suppyrRS
      gNMDA_TCR_to_suppyrRS = z * gNMDA_TCR_to_suppyrRS
      gAMPA_TCR_to_suppyrFRB = z * gAMPA_TCR_to_suppyrFRB
      gNMDA_TCR_to_suppyrFRB = z * gNMDA_TCR_to_suppyrFRB
      gAMPA_TCR_to_supbask = z * gAMPA_TCR_to_supbask
      gNMDA_TCR_to_supbask = z * gNMDA_TCR_to_supbask
      gAMPA_TCR_to_supaxax = z * gAMPA_TCR_to_supaxax
      gNMDA_TCR_to_supaxax = z * gNMDA_TCR_to_supaxax
      gAMPA_TCR_to_spinstell = z * gAMPA_TCR_to_spinstell
      gNMDA_TCR_to_spinstell = z * gNMDA_TCR_to_spinstell
      gAMPA_TCR_to_tuftIB = z * gAMPA_TCR_to_tuftIB
      gNMDA_TCR_to_tuftIB = z * gNMDA_TCR_to_tuftIB
      gAMPA_TCR_to_tuftRS = z * gAMPA_TCR_to_tuftRS
      gNMDA_TCR_to_tuftRS = z * gNMDA_TCR_to_tuftRS
      gAMPA_TCR_to_deepbask = z * gAMPA_TCR_to_deepbask
      gNMDA_TCR_to_deepbask = z * gNMDA_TCR_to_deepbask
      gAMPA_TCR_to_deepaxax = z * gAMPA_TCR_to_deepaxax
      gNMDA_TCR_to_deepaxax = z * gNMDA_TCR_to_deepaxax
      gAMPA_TCR_to_nontuftRS = z * gAMPA_TCR_to_nontuftRS
      gNMDA_TCR_to_nontuftRS = z * gNMDA_TCR_to_nontuftRS
	} // end of if (scale_TCR_output) { // 60 CONTINUE

// Code below scales some/all NMDA conductances.
//        GOTO 40
	scale_NMDA_conductances = 1 // mimics default execution of 
				// below FORTRAN code
	if (scale_NMDA_conductances) {
         z1 = 0.2e0 // to interneurons
//        z1 = 0.5e0 // to interneurons
// Usual scaling of NMDA to princ. cells, including FRB, is 0.5
         z2 = 2.5e0 // to  cort. principal cells, except FRB
         z3 = 2.5e0 // to suppyrFRB
         z4 = 0.2e0  // to TCR and nRT and from TCR to cort. princ.
      gNMDA_suppyrRS_to_suppyrRS= z2 * \
       gNMDA_suppyrRS_to_suppyrRS
      gNMDA_suppyrRS_to_suppyrFRB= z3 * \
       gNMDA_suppyrRS_to_suppyrFRB
      gNMDA_suppyrRS_to_supbask  = z1 * \
       gNMDA_suppyrRS_to_supbask
      gNMDA_suppyrRS_to_supaxax  = z1 * \
       gNMDA_suppyrRS_to_supaxax
      gNMDA_suppyrRS_to_supLTS   = z1 * \
       gNMDA_suppyrRS_to_supLTS   
      gNMDA_suppyrRS_to_spinstell= z2 * \
       gNMDA_suppyrRS_to_spinstell
      gNMDA_suppyrRS_to_tuftIB   = z2 * \
       gNMDA_suppyrRS_to_tuftIB
      gNMDA_suppyrRS_to_tuftRS   = z2 * \
       gNMDA_suppyrRS_to_tuftRS  
      gNMDA_suppyrRS_to_deepbask = z1 * \
       gNMDA_suppyrRS_to_deepbask 
      gNMDA_suppyrRS_to_deepaxax = z1 * \
       gNMDA_suppyrRS_to_deepaxax
      gNMDA_suppyrRS_to_deepLTS  = z1 * \
       gNMDA_suppyrRS_to_deepLTS 
      gNMDA_suppyrRS_to_nontuftRS= z2 * \
       gNMDA_suppyrRS_to_nontuftRS
 
      gNMDA_suppyrFRB_to_suppyrRS= z2 * \
       gNMDA_suppyrFRB_to_suppyrRS
      gNMDA_suppyrFRB_to_suppyrFRB= z3 * \
       gNMDA_suppyrFRB_to_suppyrFRB
      gNMDA_suppyrFRB_to_supbask  = z1 * \
       gNMDA_suppyrFRB_to_supbask 
      gNMDA_suppyrFRB_to_supaxax  = z1 * \
       gNMDA_suppyrFRB_to_supaxax 
      gNMDA_suppyrFRB_to_supLTS   = z1 * \
       gNMDA_suppyrFRB_to_supLTS
      gNMDA_suppyrFRB_to_spinstell= z2 * \
       gNMDA_suppyrFRB_to_spinstell
      gNMDA_suppyrFRB_to_tuftIB   = z2 * \
       gNMDA_suppyrFRB_to_tuftIB
      gNMDA_suppyrFRB_to_tuftRS   = z2 * \
       gNMDA_suppyrFRB_to_tuftRS   
      gNMDA_suppyrFRB_to_deepbask = z1 * \
       gNMDA_suppyrFRB_to_deepbask
      gNMDA_suppyrFRB_to_deepaxax = z1 * \
       gNMDA_suppyrFRB_to_deepaxax
      gNMDA_suppyrFRB_to_deepLTS  = z1 * \
       gNMDA_suppyrFRB_to_deepLTS
      gNMDA_suppyrFRB_to_nontuftRS= z2 * \
       gNMDA_suppyrFRB_to_nontuftRS

      gNMDA_spinstell_to_suppyrRS = z2 * \
       gNMDA_spinstell_to_suppyrRS
      gNMDA_spinstell_to_suppyrFRB= z3 * \
       gNMDA_spinstell_to_suppyrFRB
      gNMDA_spinstell_to_supbask  = z1 * \
       gNMDA_spinstell_to_supbask
      gNMDA_spinstell_to_supaxax  = z1 * \
       gNMDA_spinstell_to_supaxax 
      gNMDA_spinstell_to_supLTS   = z1 * \
       gNMDA_spinstell_to_supLTS
      gNMDA_spinstell_to_spinstell= z2 * \
       gNMDA_spinstell_to_spinstell
      gNMDA_spinstell_to_tuftIB   = z2 * \
       gNMDA_spinstell_to_tuftIB 
      gNMDA_spinstell_to_tuftRS   = z2 * \
       gNMDA_spinstell_to_tuftRS 
      gNMDA_spinstell_to_deepbask = z1 * \
       gNMDA_spinstell_to_deepbask 
      gNMDA_spinstell_to_deepaxax = z1 * \
       gNMDA_spinstell_to_deepaxax
      gNMDA_spinstell_to_deepLTS  = z1 * \
       gNMDA_spinstell_to_deepLTS 
      gNMDA_spinstell_to_nontuftRS= z2 * \
       gNMDA_spinstell_to_nontuftRS

      gNMDA_tuftIB_to_suppyrRS    = z2 * \
       gNMDA_tuftIB_to_suppyrRS 
      gNMDA_tuftIB_to_suppyrFRB   = z3 * \
       gNMDA_tuftIB_to_suppyrFRB
      gNMDA_tuftIB_to_supbask     = z1 * \
       gNMDA_tuftIB_to_supbask 
      gNMDA_tuftIB_to_supaxax     = z1 * \
       gNMDA_tuftIB_to_supaxax 
      gNMDA_tuftIB_to_supLTS      = z1 * \
       gNMDA_tuftIB_to_supLTS 
      gNMDA_tuftIB_to_spinstell   = z2 * \
       gNMDA_tuftIB_to_spinstell 
      gNMDA_tuftIB_to_tuftIB      = z2 * \
       gNMDA_tuftIB_to_tuftIB 
      gNMDA_tuftIB_to_tuftRS      = z2 * \
       gNMDA_tuftIB_to_tuftRS  
      gNMDA_tuftIB_to_deepbask    = z1 * \
       gNMDA_tuftIB_to_deepbask 
      gNMDA_tuftIB_to_deepaxax    = z1 * \
       gNMDA_tuftIB_to_deepaxax
      gNMDA_tuftIB_to_deepLTS     = z1 * \
       gNMDA_tuftIB_to_deepLTS   
      gNMDA_tuftIB_to_nontuftRS   = z2 * \
       gNMDA_tuftIB_to_nontuftRS  

      gNMDA_tuftRS_to_suppyrRS    = z2 * \
       gNMDA_tuftRS_to_suppyrRS
      gNMDA_tuftRS_to_suppyrFRB   = z3 * \
       gNMDA_tuftRS_to_suppyrFRB
      gNMDA_tuftRS_to_supbask     = z1 * \
       gNMDA_tuftRS_to_supbask 
      gNMDA_tuftRS_to_supaxax     = z1 * \
       gNMDA_tuftRS_to_supaxax 
      gNMDA_tuftRS_to_supLTS      = z1 * \
       gNMDA_tuftRS_to_supLTS   
      gNMDA_tuftRS_to_spinstell   = z2 * \
       gNMDA_tuftRS_to_spinstell  
      gNMDA_tuftRS_to_tuftIB      = z2 * \
       gNMDA_tuftRS_to_tuftIB
      gNMDA_tuftRS_to_tuftRS      = z2 * \
       gNMDA_tuftRS_to_tuftRS 
      gNMDA_tuftRS_to_deepbask    = z1 * \
       gNMDA_tuftRS_to_deepbask
      gNMDA_tuftRS_to_deepaxax    = z1 * \
       gNMDA_tuftRS_to_deepaxax
      gNMDA_tuftRS_to_deepLTS     = z1 * \
       gNMDA_tuftRS_to_deepLTS   
      gNMDA_tuftRS_to_nontuftRS   = z2 * \
       gNMDA_tuftRS_to_nontuftRS 

      gNMDA_TCR_to_suppyrRS        = z4 * \
       gNMDA_TCR_to_suppyrRS 
      gNMDA_TCR_to_suppyrFRB       = z4 * \
       gNMDA_TCR_to_suppyrFRB 
      gNMDA_TCR_to_supbask         = z1 * \
       gNMDA_TCR_to_supbask
      gNMDA_TCR_to_supaxax         = z1 * \
       gNMDA_TCR_to_supaxax 
      gNMDA_TCR_to_spinstell       = z4 * \
       gNMDA_TCR_to_spinstell 
      gNMDA_TCR_to_tuftIB          = z4 * \
       gNMDA_TCR_to_tuftIB   
      gNMDA_TCR_to_tuftRS          = z4 * \
       gNMDA_TCR_to_tuftRS 
      gNMDA_TCR_to_deepbask        = z1 * \
       gNMDA_TCR_to_deepbask 
      gNMDA_TCR_to_deepaxax        = z1 * \
       gNMDA_TCR_to_deepaxax 
      gNMDA_TCR_to_nRT             = z1 * \
       gNMDA_TCR_to_nRT  
      gNMDA_TCR_to_nontuftRS       = z4 * \
       gNMDA_TCR_to_nontuftRS  

      gNMDA_nontuftRS_to_suppyrRS  = z2 * \
       gNMDA_nontuftRS_to_suppyrRS
      gNMDA_nontuftRS_to_suppyrFRB = z3 * \
      gNMDA_nontuftRS_to_suppyrFRB 
      gNMDA_nontuftRS_to_supbask   = z1 * \
       gNMDA_nontuftRS_to_supbask 
      gNMDA_nontuftRS_to_supaxax   = z1 * \
       gNMDA_nontuftRS_to_supaxax  
      gNMDA_nontuftRS_to_supLTS    = z1 * \
       gNMDA_nontuftRS_to_supLTS 
      gNMDA_nontuftRS_to_spinstell = z2 * \
       gNMDA_nontuftRS_to_spinstell 
      gNMDA_nontuftRS_to_tuftIB    = z2 * \
       gNMDA_nontuftRS_to_tuftIB 
      gNMDA_nontuftRS_to_tuftRS    = z2 * \
       gNMDA_nontuftRS_to_tuftRS 
      gNMDA_nontuftRS_to_deepbask  = z1 * \
      gNMDA_nontuftRS_to_deepbask
      gNMDA_nontuftRS_to_deepaxax  = z1 * \
       gNMDA_nontuftRS_to_deepaxax 
      gNMDA_nontuftRS_to_deepLTS   = z1 * \
       gNMDA_nontuftRS_to_deepLTS
      gNMDA_nontuftRS_to_TCR       = z4 * \
       gNMDA_nontuftRS_to_TCR 
      gNMDA_nontuftRS_to_nRT       = z4 * \
       gNMDA_nontuftRS_to_nRT    
      gNMDA_nontuftRS_to_nontuftRS = z2 * \
       gNMDA_nontuftRS_to_nontuftRS 
	} // end of scaling of NMDA conductances
// 40    CONTINUE
// End section scaling all NMDA conductances.       

// BEGIN guts of main program.
// Each node takes care of all the cells of a particular type.
// On a node: enumerate the cells of its type; calculate their
//  synaptic inputs; set applied currents, including those
//  required by ectopic generation; the numerical integration
//  subroutine; set up the distal_axon vector.  Each node 
//  broadcasts its own distal_axon vector to all the others, and also
//  receives distal_axon vectors from all the others.
// Then, update outtime array and outctr vector.  Repeat.

// the following three lines were the top of the integration loop
// of the FORTRAN program.  They are commented out because the
// integration takes place later with init() and run().
// The code below this is searched for more conversion to NEURON
// especially of remaining details for the chemical and gap-junction
// synapses.

// 1000    O = O + 1
//         time = time + dt
//         if (time.gt.timtot) goto 2000
//       IF (THISNO.EQ.0) THEN
// suppyrRS

// note: the below implies that the synapses and gap junctions are
// updated only every 50 time steps * 0.002 ms /time step = 0.1 ms

//          IF (MOD(O,how_often).eq.0) then

// This loop is being commandeered to setup the synapses (NEURON) 
// rather than its original purpose which was to setup up the 
// instantaneous conductances
	syn_num = num_suppyrRS * num_suppyrRS_to_suppyrRS
if (pmesg)	print "Total number: syn_num = ",syn_num,"suppyrRS_to_suppyrRS synapses"

	threshold = 0 // mV threshold for presynaptic cell - triggers a spike
//	default_delay = 0.05 // .05 ms is the approx. average delay for a spike if the syn conductances
		     // are only updated every 0.1 ms (rough average of 0.1 and 0.002)
	delay = default_delay // used to start setting values
	ampa_weight = gAMPA_suppyrRS_to_suppyrRS
	nmda_weight = gNMDA_suppyrRS_to_suppyrRS
	objref syn_, postsyncell_, presyncell_
//	print "******** The connections to the first cell were printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
//	print "postsyn_cell_num = ", postsyn_cell_num
// Handle suppyrRS   -> suppyrRS
	  for i = 1, num_suppyrRS_to_suppyrRS { // ith synapse on postsyn_cell_num
//	    if (postsyn_cell_num==1) {
//	      print "connection synapse: ",i,", postsyn cell: ",postsyn_cell_num
//	    }
	    j = map_suppyrRS_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse
//	    if (postsyn_cell_num==1) {
//	      print "postsyn comp: ",k,"presyn cell: ",j,", presyn compartment: ", suppyrRS_presyn_comp 
//	    }
// new method is to create the synapse and then immediately connect with it
// If it is desired later to keep track of the synapses in groups of AMPA, NMDA, GABA_A
// then additional lists for these synapses seperately can be created and these can be 
// appended at the same time they are appended to synlist.

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #    , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #    , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)

	}
}
// ***********************************************************
// Handle suppyrFRB  -> suppyrRS
	ampa_weight = gAMPA_suppyrFRB_to_suppyrRS
	nmda_weight = gNMDA_suppyrFRB_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
// ***********************************************************

// Handle supbask    -> suppyrRS
	gaba_weight = gGABA_supbask_to_suppyrRS
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

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

// Handle supaxax    -> suppyrRS

// GABA_A

	gaba_weight = gGABA_supaxax_to_suppyrRS
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }


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

// Handle supLTS     -> suppyrRS


// GABA_A

	gaba_weight = gGABA_supLTS_to_suppyrRS
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle spinstell  -> suppyrRS

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_suppyrRS
	nmda_weight = gNMDA_spinstell_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftIB     -> suppyrRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_suppyrRS
	nmda_weight = gNMDA_tuftIB_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS     -> suppyrRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_suppyrRS
	nmda_weight = gNMDA_tuftRS_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle deepaxax   -> suppyrRS


// GABA_A

	gaba_weight = gGABA_deepaxax_to_suppyrRS
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle deepLTS    -> suppyrRS

// GABA_A

	gaba_weight = gGABA_deepLTS_to_suppyrRS
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR        -> suppyrRS

// AMPA and NMDA

	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_suppyrRS
	nmda_weight = gNMDA_TCR_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay // restore default

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

// Handle nontuftRS  -> suppyrRS

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_suppyrRS
	nmda_weight = gNMDA_nontuftRS_to_suppyrRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrRS if (gidexist(suppyrRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_suppyrRS { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_suppyrRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_suppyrRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_suppyrRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, suppyrRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// End enumeration of suppyrRS
//       ENDIF // if (mod(O,how_often).eq.0)...

// Define phasic currents to suppyrRS cells, ectopic spikes,
// tonic synaptic conductances

/*  this original fortran code:
    if (mod(O,200).eq.0) then

       ranvec_suppyrRS = durand(seed,num_suppyrRS+1 ,ranvec_suppyrRS) 
        for postsyn_cell_num = 1, num_suppyrRS {
         if ((ranvec_suppyrRS(postsyn_cell_num).gt.0.e0).and. \
          (ranvec_suppyrRS(postsyn_cell_num).le.noisepe_suppyrRS)) then
          curr_suppyrRS(72,postsyn_cell_num) = 0.4e0
          ectr_suppyrRS = ectr_suppyrRS + 1
         else
          curr_suppyrRS(72,postsyn_cell_num) = 0.e0
         endif 
        }
      endif

provided a change in the current inject into a compartment (72) of the axon of the
suppyrRS cells.  It flipped randomly back and forth between 0.4e0 (units?) and 0
depending on whether each random number fell between 0 <= random <= noisepe_suppyrRS
The FORTRAN random numbers were evenly distributed between 0 and 1.

Perhaps the best way to integrate these currents into NEURON is through a mechanism
(mod file) that is inserted into these cells compartments.
  
*/
// hoc code for above current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	spacer = 0 // used to start over NetStim's arbitrary y position's 
	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// a uniform delay is irrelevant for the NetStim -> PulseSyn
	// connection since it is poisson process
if (pmesg) 	print "creating ",num_suppyrRS,"NetStim's for suppyrRS cells"
	netstim_suppyrRS_base = base_
	netstim_base_ = 0
	if (serial) {
	} else {
           netstim_suppyrRS_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_suppyrRS {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(suppyrRS_base+postsyn_cell_num)
	    postsyncell_.comp[72] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_suppyrRS_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_suppyrRS

/* Note: noisepe_suppyrRS = 1/(2.5*10^4) was used to select the 0.4 nA pulse if 
0 < rand # (between 0 and 1) < noisepe_suppyrRS
What then is the average interpulse interval?
If we rolled the dice 2.5*10^4 times with an even distribution between 0 and 1 we would expect
to get 1 pulse.  How long does it take to roll that many die?  The dice are rolled every 0.4 ms
so it takes 0.4*2.5*10^4 msec = 10^4 msec = 10 sec (of simulation time)
Therefore interval = 0.4 / noisepe_cellname
*/

	    // the connecting part
    	    nc_append(netstim_suppyrRS_base + postsyn_cell_num, suppyrRS_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(suppyrRS_base+postsyn_cell_num, 72, 0.4e0, 0.4 / noisepe_suppyrRS)
	}
}
	delay = default_delay

//       ELSE IF (THISNO.EQ.1) THEN
// suppyrFRB

// Handle suppyrRS   -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_suppyrFRB
	nmda_weight = gNMDA_suppyrRS_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle suppyrFRB  -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_suppyrFRB
	nmda_weight = gNMDA_suppyrFRB_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle supbask    -> suppyrFRB

// GABA_A

	gaba_weight = gGABA_supbask_to_suppyrFRB
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle supaxax    -> suppyrFRB

// GABA_A

	gaba_weight = gGABA_supaxax_to_suppyrFRB
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle supLTS     -> suppyrFRB

// GABA_A

	gaba_weight = gGABA_supLTS_to_suppyrFRB
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle spinstell  -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_suppyrFRB
	nmda_weight = gNMDA_spinstell_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftIB     -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_suppyrFRB
	nmda_weight = gNMDA_tuftIB_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS     -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_suppyrFRB
	nmda_weight = gNMDA_tuftRS_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle deepaxax   -> suppyrFRB

// GABA_A

	gaba_weight = gGABA_deepaxax_to_suppyrFRB
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle deepLTS    -> suppyrFRB

// GABA_A

	gaba_weight = gGABA_deepLTS_to_suppyrFRB
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle TCR        -> suppyrFRB

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_suppyrFRB
	nmda_weight = gNMDA_TCR_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay

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

// Handle nontuftRS  -> suppyrFRB

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_suppyrFRB
	nmda_weight = gNMDA_nontuftRS_to_suppyrFRB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(suppyrFRB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_suppyrFRB { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_suppyrFRB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_suppyrFRB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_suppyrFRB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, suppyrFRB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// End enumeration of suppyrFRB

// Define currents to suppyrFRB cells, ectopic spikes,
// tonic synaptic conductances
/*
	FORTRAN ---
      if (mod(O,200).eq.0) then
       ranvec_suppyrFRB = durand(seed,num_suppyrFRB+1,ranvec_suppyrFRB) 
        for postsyn_cell_num = 1, num_suppyrFRB if (gidexist(netstim_suppyrFRB_base + postsyn_cell_num)) {
         if ((ranvec_suppyrFRB(postsyn_cell_num).gt.0.e0).and. \
          (ranvec_suppyrFRB(postsyn_cell_num).le.noisepe_suppyrFRB)) then
          curr_suppyrFRB(72,postsyn_cell_num) = 0.4e0
          ectr_suppyrFRB = ectr_suppyrFRB + 1
         else
          curr_suppyrFRB(72,postsyn_cell_num) = 0.e0
         endif 
        }
      endif
*/
// hoc code for poisson process current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// delay is irrelevant (not applicable) for the 
	// NetStim -> PulseSyn connection since it is poisson process
	// (except for the begining of the simulation)

if (pmesg) 	print "creating ",num_suppyrFRB,"NetStim's for suppyrFRB cells"
	if (serial) {
           netstim_suppyrFRB_base = base_
	} else {
           netstim_suppyrFRB_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_suppyrFRB {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(suppyrFRB_base+postsyn_cell_num)
	    postsyncell_.comp[72] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_suppyrFRB_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_suppyrFRB

	    // the connecting part
    	    nc_append(netstim_suppyrFRB_base + postsyn_cell_num, suppyrFRB_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(suppyrFRB_base+postsyn_cell_num, 72, 0.4e0, 0.4 / noisepe_suppyrFRB)
	}
	}
	delay = default_delay

//       ELSE IF (THISNO.EQ.2) THEN
// supbask

// Handle suppyrRS   -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_supbask
	nmda_weight = gNMDA_suppyrRS_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle suppyrFRB  -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_supbask
	nmda_weight = gNMDA_suppyrFRB_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle supbask    -> supbask

// GABA_A

	gaba_weight = gGABA_supbask_to_supbask
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle supLTS     -> supbask

// GABA_A

	gaba_weight = gGABA_supLTS_to_supbask
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

// ***********************************************************
// Handle spinstell  -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_supbask
	nmda_weight = gNMDA_spinstell_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftIB     -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_supbask
	nmda_weight = gNMDA_tuftIB_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS     -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_supbask
	nmda_weight = gNMDA_tuftRS_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle deepLTS?!    -> supbask

// GABA_A

	gaba_weight = gGABA_deepLTS_to_supbask
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle TCR    -> supbask

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_supbask
	nmda_weight = gNMDA_TCR_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay

// ***********************************************************
  
// Handle nontuftRS  -> supbask

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_supbask
	nmda_weight = gNMDA_nontuftRS_to_supbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supbask if (gidexist(supbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_supbask { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_supbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_supbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_supbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_supbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

//       ELSE IF (THISNO.EQ.3) THEN
// supaxax

// Handle suppyrRS   -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_supaxax
	nmda_weight = gNMDA_suppyrRS_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
 
// Handle suppyrFRB  -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_supaxax
	nmda_weight = gNMDA_suppyrFRB_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle supbask    -> supaxax

// GABA_A

	gaba_weight = gGABA_supbask_to_supaxax
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS     -> supaxax

// GABA_A

	gaba_weight = gGABA_supLTS_to_supaxax
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell  -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_supaxax
	nmda_weight = gNMDA_spinstell_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftIB     -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_supaxax
	nmda_weight = gNMDA_tuftIB_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS     -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_supaxax
	nmda_weight = gNMDA_tuftRS_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
   
// Handle deepLTS    -> supaxax

// GABA_A

	gaba_weight = gGABA_deepLTS_to_supaxax
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle TCR        -> supaxax

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_supaxax
	nmda_weight = gNMDA_TCR_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************
  

// Handle nontuftRS  -> supaxax

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_supaxax
	nmda_weight = gNMDA_nontuftRS_to_supaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supaxax if (gidexist(supaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_supaxax { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_supaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_supaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_supaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

//       ELSE IF (THISNO.EQ.4) THEN
// supLTS

// Handle suppyrRS   -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_supLTS
	nmda_weight = gNMDA_suppyrRS_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle suppyrFRB  -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_supLTS
	nmda_weight = gNMDA_suppyrFRB_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supbask    -> supLTS

// GABA_A

	gaba_weight = gGABA_supbask_to_supLTS
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS     -> supLTS

// GABA_A

	gaba_weight = gGABA_supLTS_to_supLTS
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle spinstell  -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_supLTS
	nmda_weight = gNMDA_spinstell_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
  
// Handle tuftIB     -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_supLTS
	nmda_weight = gNMDA_tuftIB_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS     -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_supLTS
	nmda_weight = gNMDA_tuftRS_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
  
// Handle deepLTS    -> supLTS

// GABA_A

	gaba_weight = gGABA_deepLTS_to_supLTS
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle nontuftRS  -> supLTS

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_supLTS
	nmda_weight = gNMDA_nontuftRS_to_supLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_supLTS if (gidexist(supLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_supLTS { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_supLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_supLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(supLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_supLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, supLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
  
 
//       ELSE IF (THISNO.EQ.5) THEN
// spinstell
// Handle suppyrRS    -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_spinstell
	nmda_weight = gNMDA_suppyrRS_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle suppyrFRB   -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_spinstell
	nmda_weight = gNMDA_suppyrFRB_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle supbask?!     -> spinstell

// GABA_A

	gaba_weight = gGABA_supbask_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supbask_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_supbask_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supbask_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supbask_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supbask_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle supaxax     -> spinstell

// GABA_A

	gaba_weight = gGABA_supaxax_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS      -> spinstell

// GABA_A

	gaba_weight = gGABA_supLTS_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell   -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_spinstell
	nmda_weight = gNMDA_spinstell_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
 
// Handle tuftIB      -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_spinstell
	nmda_weight = gNMDA_tuftIB_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

// Handle tuftRS      -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_spinstell
	nmda_weight = gNMDA_tuftRS_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask    -> spinstell

// GABA_A

	gaba_weight = gGABA_deepbask_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepaxax    -> spinstell

// GABA_A

	gaba_weight = gGABA_deepaxax_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS     -> spinstell

// GABA_A

	gaba_weight = gGABA_deepLTS_to_spinstell
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR         -> spinstell

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_spinstell
	nmda_weight = gNMDA_TCR_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS   -> spinstell

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_spinstell
	nmda_weight = gNMDA_nontuftRS_to_spinstell
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_spinstell if (gidexist(spinstell_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_spinstell { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_spinstell.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_spinstell.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(spinstell_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_spinstell

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, spinstell_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

//       ELSE IF (THISNO.EQ.11+10*debug) THEN
// tuftIB
// Handle suppyrRS    -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_tuftIB
	nmda_weight = gNMDA_suppyrRS_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB   -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_tuftIB
	nmda_weight = gNMDA_suppyrFRB_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supaxax     -> tuftIB

// GABA_A

	gaba_weight = gGABA_supaxax_to_tuftIB
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS?!      -> tuftIB!

// GABA_A
	gaba_weight = gGABA_supLTS_to_tuftIB
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell   -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_tuftIB
	nmda_weight = gNMDA_spinstell_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB      -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_tuftIB
	nmda_weight = gNMDA_tuftIB_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
// ***********************************************************


// Handle tuftRS      -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_tuftIB
	nmda_weight = gNMDA_tuftRS_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask    -> tuftIB

// GABA_A

	gaba_weight = gGABA_deepbask_to_tuftIB
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepaxax    -> tuftIB

// GABA_A

	gaba_weight = gGABA_deepaxax_to_tuftIB
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS     -> tuftIB

// GABA_A

	gaba_weight = gGABA_deepLTS_to_tuftIB
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR         -> tuftIB

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_tuftIB
	nmda_weight = gNMDA_TCR_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS   -> tuftIB

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_tuftIB
	nmda_weight = gNMDA_nontuftRS_to_tuftIB
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftIB if (gidexist(tuftIB_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_tuftIB { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_tuftIB.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_tuftIB.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_tuftIB

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, tuftIB_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

// ***********************************************************
/*
// Define currents to tuftIB    cells, ectopic spikes,
// tonic synaptic conductances

      if (mod(O,200).eq.0) then
       ranvec_tuftIB = durand(seed,num_tuftIB+1  ,ranvec_tuftIB  ) 
        for postsyn_cell_num = 1, num_tuftIB   if (gidexist(netstim_tuftIB_base + postsyn_cell_num)) {
         if ((ranvec_tuftIB  (postsyn_cell_num).gt.0.e0).and. \
          (ranvec_tuftIB  (postsyn_cell_num).le.noisepe_tuftIB  )) then
          curr_tuftIB  (60,postsyn_cell_num) = 0.4e0
          ectr_tuftIB   = ectr_tuftIB   + 1
         else
          curr_tuftIB  (60,postsyn_cell_num) = 0.e0
         endif 
        }
      endif
*/

// hoc code for poisson process current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// delay is irrelevant (not applicable) for the 
	// NetStim -> PulseSyn connection since it is poisson process
	// (except for the begining of the simulation)

if (pmesg) 	print "creating ",num_tuftIB,"NetStim's for tuftIB cells"
	if (serial) {
           netstim_tuftIB_base = base_
	} else {
           netstim_tuftIB_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_tuftIB {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(tuftIB_base+postsyn_cell_num)
	    postsyncell_.comp[60] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_tuftIB_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_tuftIB

	    // the connecting part
    	    nc_append(netstim_tuftIB_base + postsyn_cell_num, tuftIB_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(tuftIB_base+postsyn_cell_num, 60, 0.4e0, 0.4 / noisepe_tuftIB)
	}
	}
	delay = default_delay

//       ELSE IF (THISNO.EQ.6+10*debug) THEN
// tuftRS
// Handle suppyrRS    -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_tuftRS
	nmda_weight = gNMDA_suppyrRS_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB   -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_tuftRS
	nmda_weight = gNMDA_suppyrFRB_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supaxax     -> tuftRS

// GABA_A

	gaba_weight = gGABA_supaxax_to_tuftRS
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS      -> tuftRS

// GABA_A

	gaba_weight = gGABA_supLTS_to_tuftRS
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell   -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_tuftRS
	nmda_weight = gNMDA_spinstell_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB      -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_tuftRS
	nmda_weight = gNMDA_tuftIB_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftRS      -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_tuftRS
	nmda_weight = gNMDA_tuftRS_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask    -> tuftRS

// GABA_A

	gaba_weight = gGABA_deepbask_to_tuftRS
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepaxax    -> tuftRS

// GABA_A

	gaba_weight = gGABA_deepaxax_to_tuftRS
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS     -> tuftRS

// GABA_A

	gaba_weight = gGABA_deepLTS_to_tuftRS
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR         -> tuftRS

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_tuftRS
	nmda_weight = gNMDA_TCR_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS   -> tuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_tuftRS
	nmda_weight = gNMDA_nontuftRS_to_tuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_tuftRS if (gidexist(tuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_tuftRS { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_tuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_tuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_tuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, tuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

/*
// Define currents to tuftRS    cells, ectopic spikes,
// tonic synaptic conductances
      if (mod(O,200).eq.0) then
       ranvec_tuftRS = durand(seed,num_tuftRS+1  ,ranvec_tuftRS  ) 
        for postsyn_cell_num = 1, num_tuftRS   if (gidexist(netstim_tuftRS_base + postsyn_cell_num)) {
         if ((ranvec_tuftRS  (postsyn_cell_num).gt.0.e0).and. \
          (ranvec_tuftRS  (postsyn_cell_num).le.noisepe_tuftRS  )) then
          curr_tuftRS  (60,postsyn_cell_num) = 0.4e0
          ectr_tuftRS   = ectr_tuftRS   + 1
         else
          curr_tuftRS  (60,postsyn_cell_num) = 0.e0
         endif 
        }
      endif
*/
// hoc code for poisson process current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// delay is irrelevant (not applicable) for the 
	// NetStim -> PulseSyn connection since it is poisson process
	// (except for the begining of the simulation)

if (pmesg) 	print "creating ",num_tuftRS,"NetStim's for tuftRS cells"
	if (serial) {
           netstim_tuftRS_base = base_
        } else {
	   netstim_tuftRS_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_tuftRS {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(tuftRS_base+postsyn_cell_num)
	    postsyncell_.comp[60] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_tuftRS_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_tuftRS

	    // the connecting part
    	    nc_append(netstim_tuftRS_base + postsyn_cell_num, tuftRS_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(tuftRS_base+postsyn_cell_num, 60, 0.4e0, 0.4 / noisepe_tuftRS)
	}
	}
	delay = default_delay

//       ELSE IF (THISNO.EQ.8+10*debug) THEN
// nontuftRS

// Handle suppyrRS   -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_nontuftRS
	nmda_weight = gNMDA_suppyrRS_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB  -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_nontuftRS
	nmda_weight = gNMDA_suppyrFRB_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supaxax    -> nontuftRS

// GABA_A

	gaba_weight = gGABA_supaxax_to_nontuftRS
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supaxax_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_supaxax_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supaxax_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supaxax_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supaxax_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle supLTS     -> nontuftRS

// GABA_A

	gaba_weight = gGABA_supLTS_to_nontuftRS
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell  -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_nontuftRS
	nmda_weight = gNMDA_spinstell_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB     -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_nontuftRS
	nmda_weight = gNMDA_tuftIB_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftRS     -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_nontuftRS
	nmda_weight = gNMDA_tuftRS_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask   -> nontuftRS

// GABA_A

	gaba_weight = gGABA_deepbask_to_nontuftRS
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepaxax   -> nontuftRS

// GABA_A

	gaba_weight = gGABA_deepaxax_to_nontuftRS
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepaxax_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepaxax_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepaxax_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepaxax_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepaxax_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS    -> nontuftRS

// GABA_A

	gaba_weight = gGABA_deepLTS_to_nontuftRS
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR        -> nontuftRS

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_nontuftRS
	nmda_weight = gNMDA_TCR_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS  -> nontuftRS

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_nontuftRS
	nmda_weight = gNMDA_nontuftRS_to_nontuftRS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nontuftRS if (gidexist(nontuftRS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_nontuftRS { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_nontuftRS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_nontuftRS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_nontuftRS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, nontuftRS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

/*
// Define currents to nontuftRS    cells, ectopic spikes,
// tonic synaptic conductances

      if (mod(O,200).eq.0) then
       ranvec_nontuftRS = durand(seed,num_nontuftRS+1  ,ranvec_nontuftRS  ) 
        for postsyn_cell_num = 1, num_nontuftRS   if (gidexist(netstim_nontuftRS_base + postsyn_cell_num)) {
         if ((ranvec_nontuftRS  (postsyn_cell_num).gt.0.e0).and. \
          (ranvec_nontuftRS  (postsyn_cell_num).le.noisepe_nontuftRS  )) then
          curr_nontuftRS  (48,postsyn_cell_num) = 0.4e0
          ectr_nontuftRS   = ectr_nontuftRS   + 1
         else
          curr_nontuftRS  (48,postsyn_cell_num) = 0.e0
         endif 
        }
      endif
*/
// hoc code for poisson process current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// delay is irrelevant (not applicable) for the 
	// NetStim -> PulseSyn connection since it is poisson process
	// (except for the begining of the simulation)

if (pmesg) 	print "creating ",num_nontuftRS,"NetStim's for nontuftRS cells"
	if (serial) {
           netstim_nontuftRS_base = base_
        } else {
	   netstim_nontuftRS_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_nontuftRS {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(nontuftRS_base+postsyn_cell_num)
	    postsyncell_.comp[48] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_nontuftRS_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_nontuftRS

	    // the connecting part
    	    nc_append(netstim_nontuftRS_base + postsyn_cell_num, nontuftRS_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(nontuftRS_base+postsyn_cell_num, 48, 0.4e0, 0.4 / noisepe_nontuftRS)
	}
	}
	delay = default_delay

//       ELSE IF (THISNO.EQ.9-3*debug) THEN
// deepbask
// Handle suppyrRS   -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_deepbask
	nmda_weight = gNMDA_suppyrRS_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB  -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_deepbask
	nmda_weight = gNMDA_suppyrFRB_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supLTS     -> deepbask

// GABA_A

	gaba_weight = gGABA_supLTS_to_deepbask
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell  -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_deepbask
	nmda_weight = gNMDA_spinstell_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB     -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_deepbask
	nmda_weight = gNMDA_tuftIB_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftRS     -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_deepbask
	nmda_weight = gNMDA_tuftRS_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask   -> deepbask

// GABA_A

	gaba_weight = gGABA_deepbask_to_deepbask
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS    -> deepbask

// GABA_A

	gaba_weight = gGABA_deepLTS_to_deepbask
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR        -> deepbask

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_deepbask
	nmda_weight = gNMDA_TCR_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS  -> deepbask

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_deepbask
	nmda_weight = gNMDA_nontuftRS_to_deepbask
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepbask if (gidexist(deepbask_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_deepbask { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_deepbask.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_deepbask.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepbask_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_deepbask

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepbask_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


//       ELSE IF (THISNO.EQ.10-3*debug) THEN
// deepaxax
// Handle suppyrRS   -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_deepaxax
	nmda_weight = gNMDA_suppyrRS_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB  -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_deepaxax
	nmda_weight = gNMDA_suppyrFRB_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supLTS     -> deepaxax

// GABA_A

	gaba_weight = gGABA_supLTS_to_deepaxax
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle spinstell  -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_deepaxax
	nmda_weight = gNMDA_spinstell_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB     -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_deepaxax
	nmda_weight = gNMDA_tuftIB_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftRS     -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_deepaxax
	nmda_weight = gNMDA_tuftRS_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask   -> deepaxax

// GABA_A

	gaba_weight = gGABA_deepbask_to_deepaxax
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS    -> deepaxax

// GABA_A

	gaba_weight = gGABA_deepLTS_to_deepaxax
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle TCR        -> deepaxax

// AMPA and NMDA
	delay = thal_cort_delay

	ampa_weight = gAMPA_TCR_to_deepaxax
	nmda_weight = gNMDA_TCR_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************


// Handle nontuftRS  -> deepaxax

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_deepaxax
	nmda_weight = gNMDA_nontuftRS_to_deepaxax
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepaxax if (gidexist(deepaxax_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_deepaxax { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_deepaxax.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_deepaxax.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepaxax_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_deepaxax

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepaxax_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

//       ELSE IF (THISNO.EQ.7-3*debug) THEN
// deepLTS
// Handle suppyrRS   -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrRS_to_deepLTS
	nmda_weight = gNMDA_suppyrRS_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrRS_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_suppyrRS_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrRS_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle suppyrFRB  -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_suppyrFRB_to_deepLTS
	nmda_weight = gNMDA_suppyrFRB_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_suppyrFRB_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_suppyrFRB_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_suppyrFRB_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_suppyrFRB_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_suppyrFRB_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(suppyrFRB_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle supLTS     -> deepLTS

// GABA_A

	gaba_weight = gGABA_supLTS_to_deepLTS
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_supLTS_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_supLTS_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_supLTS_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_supLTS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(supLTS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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

// Handle spinstell  -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_spinstell_to_deepLTS
	nmda_weight = gNMDA_spinstell_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_spinstell_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_spinstell_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_spinstell_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_spinstell_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_spinstell_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(spinstell_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftIB     -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftIB_to_deepLTS
	nmda_weight = gNMDA_tuftIB_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftIB_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_tuftIB_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftIB_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftIB_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftIB_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftIB_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle tuftRS     -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_tuftRS_to_deepLTS
	nmda_weight = gNMDA_tuftRS_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_tuftRS_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_tuftRS_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_tuftRS_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_tuftRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_tuftRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(tuftRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle deepbask   -> deepLTS

// GABA_A

	gaba_weight = gGABA_deepbask_to_deepLTS
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepbask_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_deepbask_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepbask_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepbask_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepbask_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle deepLTS    -> deepLTS

// GABA_A

	gaba_weight = gGABA_deepLTS_to_deepLTS
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_deepLTS_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_deepLTS_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_deepLTS_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA_deepLTS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(deepLTS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, gaba_weight, delay)

          }
        }

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


// Handle nontuftRS  -> deepLTS

// AMPA and NMDA

	ampa_weight = gAMPA_nontuftRS_to_deepLTS
	nmda_weight = gNMDA_nontuftRS_to_deepLTS
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_deepLTS if (gidexist(deepLTS_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_deepLTS { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_deepLTS.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_deepLTS.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(deepLTS_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_deepLTS

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, deepLTS_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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

//       ELSE IF (THISNO.EQ.12+10*debug) THEN
// TCR
// Handle nRT       -> TCR

// GABA_A

	objref syn2_	// for a second time constant gaba_a synapse

	for postsyn_cell_num = 1, num_TCR if (gidexist(TCR_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nRT_to_TCR { // ith synapse on postsyn_cell_num
	    // random values of conductance in this special case
	    j = map_nRT_to_TCR.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    gaba_weight = gGABA_nRT_to_TCR.x[j]
	    k = com_nRT_to_TCR.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place **TWO** GABA_A synapses in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(TCR_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA1_nRT_to_TCR
	    // these synapses have gaba_a with two time constants
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn2_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn2_)
	    syn2_.tau = tauGABA2_nRT_to_TCR

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nRT_base + j, TCR_base + postsyn_cell_num, postsyncell_.synlist.count()-2, 0.625*gaba_weight, delay)
	    nc_append(nRT_base + j, TCR_base + postsyn_cell_num, postsyncell_.synlist.count()-1, 0.375*gaba_weight, delay)

          }
        }

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


// Handle nontuftRS -> TCR

// AMPA and NMDA
	delay = cort_thal_delay

	ampa_weight = gAMPA_nontuftRS_to_TCR
	nmda_weight = gNMDA_nontuftRS_to_TCR
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_TCR if (gidexist(TCR_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_TCR { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_TCR.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_TCR.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(TCR_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_TCR

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, TCR_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_TCR

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, TCR_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************
/*
// Define currents to TCR          cells, ectopic spikes,
// tonic synaptic conductances

      if (mod(O,200).eq.0) then
       ranvec_TCR = durand(seed,num_TCR+1     ,ranvec_TCR     ) 
        for postsyn_cell_num = 1, num_TCR      {
         if ((ranvec_TCR     (postsyn_cell_num).gt.0.e0).and. \
          (ranvec_TCR     (postsyn_cell_num).le.noisepe_TCR     )) then
          curr_TCR     (135,postsyn_cell_num) = 0.4e0
          ectr_TCR      = ectr_TCR      + 1
         else
          curr_TCR     (135,postsyn_cell_num) = 0.e0
         endif 
        }
      endif
*/
// hoc code for poisson process current injections:
// synaptic pulse point processes (pulsesyn.mod) are used along with a netstim
// to inject ectopic currents into the cells.

	weight = 1	// the weight is unused for the PulseSyn
	delay = 0	// delay is irrelevant (not applicable) for the 
	// NetStim -> PulseSyn connection since it is poisson process
	// (except for the begining of the simulation)

if (pmesg) 	print "creating ",num_TCR,"NetStim's for TCR cells"
	if (serial) {
           netstim_TCR_base = base_
        } else {
	   netstim_TCR_base = netstim_base_
	}
        for postsyn_cell_num = 1, num_TCR {
	if (serial) {
	// add the PulseSyn to the cell
	    postsyncell_ = cellobj(TCR_base+postsyn_cell_num)
	    postsyncell_.comp[135] syn_ = new PulseSyn(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.amp=0.4e0
	// create and add the NetStim to the artificial cell and connect it to a cell
	    cell_append(new S_NetStim(), 0, increment_spacer(),0)
	    base_ = base_ + 1
	    // setting the netstim interval (time period) parameter (inverse of poisson process frequency)
	    cellobj(netstim_TCR_base + postsyn_cell_num).pp.interval = 0.4 / noisepe_TCR

	    // the connecting part
    	    nc_append(netstim_TCR_base + postsyn_cell_num, TCR_base + postsyn_cell_num,  postsyncell_.synlist.count()-1, weight, delay)
	}else{
		par_netstim_create(TCR_base+postsyn_cell_num, 135, 0.4e0, 0.4 / noisepe_TCR)
	}
	}
	delay = default_delay

//       ELSE IF (THISNO.EQ.13-4*debug) THEN
// nRT
// Handle TCR        -> nRT

// AMPA and NMDA

	ampa_weight = gAMPA_TCR_to_nRT
	nmda_weight = gNMDA_TCR_to_nRT
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nRT if (gidexist(nRT_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_TCR_to_nRT { // ith synapse on postsyn_cell_num
	    j = map_TCR_to_nRT.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_TCR_to_nRT.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nRT_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_TCR_to_nRT

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_TCR_to_nRT

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(TCR_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }

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


// Handle nRT        -> nRT

// GABA_A

	gaba_weight = gGABA_nRT_to_nRT
	for postsyn_cell_num = 1, num_nRT if (gidexist(nRT_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nRT_to_nRT { // ith synapse on postsyn_cell_num
	    j = map_nRT_to_nRT.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nRT_to_nRT.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place GABA_A synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nRT_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauGABA1_nRT_to_nRT
	    // there are two time constants in this gaba_a synapse
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn2_ = new GABAA(0.5)
	    postsyncell_.synlist.append(syn2_)
	    syn2_.tau = tauGABA2_nRT_to_nRT

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nRT_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-2, 0.56*gaba_weight, delay)
	    nc_append(nRT_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-1, 0.44*gaba_weight, delay)
          }
        }

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

// Handle nontuftRS  -> nRT

// AMPA and NMDA
	delay = cort_thal_delay

	ampa_weight = gAMPA_nontuftRS_to_nRT
	nmda_weight = gNMDA_nontuftRS_to_nRT
//	print "******** The connections to the first cell are printed for debugging"
	for postsyn_cell_num = 1, num_nRT if (gidexist(nRT_base+postsyn_cell_num)) { // loop over postsynaptic cells, postsyn_cell_num
	  for i = 1, num_nontuftRS_to_nRT { // ith synapse on postsyn_cell_num
	    j = map_nontuftRS_to_nRT.x(i,postsyn_cell_num) // j = presynaptic cell for ith syn to postsyn_cell_num
	    k = com_nontuftRS_to_nRT.x(i,postsyn_cell_num) // k = compart. # in postsyn_cell_num for postsyn_cell_num's ith synapse

	    // place AMPA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_ = cellobj(nRT_base+postsyn_cell_num)
    if (!section_exists("comp", k, postsyncell_)) { continue }
	    postsyncell_.comp[k] syn_ = new AMPA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauAMPA_nontuftRS_to_nRT

	    // connect to presynaptic cell:
        // arguments (presyn cell #     , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-1, ampa_weight, delay)

	    // place NMDA synapse in compartment k of postsynaptic cell postsyn_cell_num:
	    postsyncell_.comp[k] syn_ = new NMDA(0.5)
	    postsyncell_.synlist.append(syn_)
	    syn_.tau = tauNMDA_nontuftRS_to_nRT

	    // connect to presynaptic cell:
        // arguments ( presyn cell #   , postsyn cell #                  , synapse #                     , weight     , delay)
	    nc_append(nontuftRS_base + j, nRT_base + postsyn_cell_num, postsyncell_.synlist.count()-1, nmda_weight, delay)
          }
        }
	delay = default_delay
// ***********************************************************

// Update outctr's and outtime tables.
// This code is common to all the nodes.
// This section adapted from supergj.f

// NEURON: summary of FORTRAN code:
/* The voltage traces were examined for spikes (thresh > 0 mV)
and if found then a spike counter (outctr_cellname(postsyn_cell_num)) is incremented
and the time for the spike is recorded in outtime_cellname(outctr_cellname(),postsyn_cell_num)
An axon_refrac_time variable is used to judge when the next spike is possible (thresh >0 mV and
delta_t > axon_refrac_time)

Then various voltages and derived quantities are written to 
output files every tenth of a millisecond:
NEURON code equivalents will store the quantities in vectors every tenth of a millisecond.
A second program, vector_writer.hoc will write these vectors to files.

Here is the FORTRAN:
        outrcd( 1) = time
        outrcd( 2) = v_suppyrRS(1,2)
        outrcd( 3) = v_suppyrRS(numcomp_suppyrRS,2)
        outrcd( 4) = v_suppyrRS(43,2)
Here is the NEURON:
*/

/*
objref t_vec
t_vec = new Vector()
{t_vec.record(&t,0.1)}	// this will record the time at 0.1 ms intervals even though dt = 0.002

objref v_suppyrRS_1_2   // compartment 1 in cell 2
v_suppyrRS_1_2 = new Vector()
{v_suppyrRS_1_2.record(&cellobj(2+suppyrRS_base).comp[1].v(0.5), 0.1)}

objref v_suppyrRS_last_2  // last compartment cell 2 (this is a distal axon compartment)
v_suppyrRS_last_2 = new Vector()
{v_suppyrRS_last_2.record(&cellobj(2+suppyrRS_base).comp[numcomp_suppyrRS].v(0.5), 0.1)}

objref v_suppyrRS_43_2   // compartment 43 in cell 2 (oblique dendrite?)
v_suppyrRS_43_2 = new Vector()
{v_suppyrRS_43_2.record(&cellobj(2+suppyrRS_base).comp[43].v(0.5), 0.1)}
*/

/* more FORTRAN network sampling output:
         z = 0.e0
          for i = 1, num_suppyrRS {
           z = z - v_suppyrRS(1,i)
          }
        outrcd( 5) = z / dble(num_suppyrRS) // - av. cell somata 
         z = 0.e0
          for i = 1, numcomp_suppyrRS {
           z = z + gAMPA_suppyrRS(i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_suppyrRS {
           z = z + gNMDA_suppyrRS(i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_suppyrRS {
           z = z + gGABA_A_suppyrRS(i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_suppyrRS(1,3)
        outrcd(10) = v_suppyrRS(1,4)
          z = 0.e0
          for i = 1, num_suppyrRS {
           if(v_suppyrRS(numcomp_suppyrRS,i) .gt. 0.e0) z = z + 1.e0
          }
        outrcd(11) = z   
        outrcd(12) = field_1mm_suppyrRS
        outrcd(13) = field_2mm_suppyrRS

      OPEN(11,FILE='GROUCHO110.suppyrRS')
      WRITE (11,FMT='(13F10.4)') (OUTRCD(I),I=1,13)

       else if (thisno.eq.1) then
        outrcd( 1) = time
        outrcd( 2) = v_suppyrFRB(1,2)
        outrcd( 3) = v_suppyrFRB(numcomp_suppyrFRB,2)
        outrcd( 4) = v_suppyrFRB(43,2)
         z = 0.e0
          for i = 1, num_suppyrFRB {
           z = z - v_suppyrFRB(1,i)
          }
        outrcd( 5) = z / dble(num_suppyrFRB) // - av. cell somata 
         z = 0.e0
          for i = 1, numcomp_suppyrFRB {
           z = z + gAMPA_suppyrFRB(i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_suppyrFRB {
           z = z + gNMDA_suppyrFRB(i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_suppyrFRB {
           z = z + gGABA_A_suppyrFRB(i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_suppyrFRB(1,3)
        outrcd(10) = v_suppyrFRB(1,4)
        outrcd(11) = field_1mm_suppyrFRB
        outrcd(12) = field_2mm_suppyrFRB

      OPEN(12,FILE='GROUCHO110.suppyrFRB')
      WRITE (12,FMT='(12F10.4)') (OUTRCD(I),I=1,12)

       else if (thisno.eq.2) then
        outrcd( 1) = time
        outrcd( 2) = v_supbask  (1,2)
        outrcd( 3) = v_supbask  (numcomp_supbask,2)
        outrcd( 4) = v_supbask  (43,2)
         z = 0.e0
          for i = 1, num_supbask   {
           z = z - v_supbask(1,i)
          }
        outrcd( 5) = z / dble(num_supbask  ) // - av. cell somata 
         z = 0.e0
          for i = 1, numcomp_supbask    {
           z = z + gAMPA_supbask  (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_supbask    {
           z = z + gNMDA_supbask  (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_supbask   {
           z = z + gGABA_A_supbask  (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_supbask  (1,3)
        outrcd(10) = v_supbask  (1,4)
      OPEN(13,FILE='GROUCHO110.supbask')
      WRITE (13,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.3) then
        outrcd( 1) = time
        outrcd( 2) = v_supaxax  (1,2)
        outrcd( 3) = v_supaxax  (numcomp_supaxax  ,2)
        outrcd( 4) = v_supaxax  (43,2)
         z = 0.e0
          for i = 1, num_supaxax   {
           z = z - v_supaxax(1,i)
          }
        outrcd( 5) = z / dble(num_supaxax  ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_supaxax   {
           z = z + gAMPA_supaxax  (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_supaxax   {
           z = z + gNMDA_supaxax  (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_supaxax   {
           z = z + gGABA_A_supaxax  (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_supaxax  (1,3)
        outrcd(10) = v_supaxax  (1,4)
      OPEN(14,FILE='GROUCHO110.supaxax')
      WRITE (14,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.4) then
        outrcd( 1) = time
        outrcd( 2) = v_supLTS   (1,2)
        outrcd( 3) = v_supLTS   (numcomp_supLTS   ,2)
        outrcd( 4) = v_supLTS   (43,2)
         z = 0.e0
          for i = 1, num_supLTS    {
           z = z - v_supLTS(1,i)
          }
        outrcd( 5) = z / dble(num_supLTS   ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_supLTS    {
           z = z + gAMPA_supLTS   (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_supLTS    {
           z = z + gNMDA_supLTS   (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_supLTS    {
           z = z + gGABA_A_supLTS   (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_supLTS   (1,3)
        outrcd(10) = v_supLTS   (1,4)
      OPEN(15,FILE='GROUCHO110.supLTS')
      WRITE (15,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.5) then
        outrcd( 1) = time
        outrcd( 2) = v_spinstell(1,2)
        outrcd( 3) = v_spinstell(numcomp_spinstell,2)
        outrcd( 4) = v_spinstell(43,2)
         z = 0.e0
          for i = 1, num_spinstell {
           z = z - v_spinstell(1,i)
          }
        outrcd( 5) = z / dble(num_spinstell) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_spinstell {
           z = z + gAMPA_spinstell(i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_spinstell {
           z = z + gNMDA_spinstell(i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_spinstell {
           z = z + gGABA_A_spinstell(i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_spinstell(1,3)
        outrcd(10) = v_spinstell(1,4)
      OPEN(16,FILE='GROUCHO110.spinstell')
      WRITE (16,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.11+10*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_tuftIB   (1,4)
        outrcd( 3) = v_tuftIB   (numcomp_tuftIB   ,4)
        outrcd( 4) = v_tuftIB   (43,4)
         z = 0.e0
          for i = 1, num_tuftIB {
           z = z - v_tuftIB(1,i)
          }
        outrcd( 5) = z / dble(num_tuftIB   ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_tuftIB    {
           z = z + gAMPA_tuftIB   (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_tuftIB    {
           z = z + gNMDA_tuftIB   (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_tuftIB    {
           z = z + gGABA_A_tuftIB   (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_tuftIB   (1,3)
        outrcd(10) = v_tuftIB   (1,2)
        outrcd(11) = field_1mm_tuftIB
        outrcd(12) = field_2mm_tuftIB
        outrcd(13) = v_tuftIB (numcomp_tuftIB, 2)
        outrcd(14) = v_tuftIB (1, 8)
        outrcd(15) = v_tuftIB (numcomp_tuftIB, 8)
        outrcd(16) = v_tuftIB (1, 9)
        outrcd(17) = v_tuftIB (numcomp_tuftIB, 9)
        outrcd(18) = v_tuftIB (1, 10)
        outrcd(19) = v_tuftIB (numcomp_tuftIB, 10)
      OPEN(17,FILE='GROUCHO110.tuftIB')
      WRITE (17,FMT='(19F10.4)') (OUTRCD(I),I=1,19)

       else if (thisno.eq.6+10*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_tuftRS   (1,2)
        outrcd( 3) = v_tuftRS   (numcomp_tuftRS   ,2)
        outrcd( 4) = v_tuftRS   (43,2)
         z = 0.e0
          for i = 1, num_tuftRS    {
           z = z - v_tuftRS(1,i)
          }
        outrcd( 5) = z / dble(num_tuftRS   ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_tuftRS    {
           z = z + gAMPA_tuftRS   (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_tuftRS    {
           z = z + gNMDA_tuftRS   (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_tuftRS    {
           z = z + gGABA_A_tuftRS   (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_tuftRS   (1,3)
        outrcd(10) = v_tuftRS   (1,4)
        outrcd(11) = field_1mm_tuftRS
        outrcd(12) = field_2mm_tuftRS
      OPEN(18,FILE='GROUCHO110.tuftRS')
      WRITE (18,FMT='(12F10.4)') (OUTRCD(I),I=1,12)

       else if (thisno.eq.8+10*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_nontuftRS(1,2)
        outrcd( 3) = v_nontuftRS(numcomp_nontuftRS,2)
        outrcd( 4) = v_nontuftRS(43,2)
         z = 0.e0
          for i = 1, num_nontuftRS {
           z = z - v_nontuftRS(1,i)
          }
        outrcd( 5) = z / dble(num_nontuftRS) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_nontuftRS {
           z = z + gAMPA_nontuftRS(i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_nontuftRS {
           z = z + gNMDA_nontuftRS(i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_nontuftRS {
           z = z + gGABA_A_nontuftRS(i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_nontuftRS(1,3)
        outrcd(10) = v_nontuftRS(1,4)
        outrcd(11) = field_1mm_nontuftRS
        outrcd(12) = field_2mm_nontuftRS
      OPEN(19,FILE='GROUCHO110.nontuftRS')
      WRITE (19,FMT='(12F10.4)') (OUTRCD(I),I=1,12)

       else if (thisno.eq.9-3*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_deepbask (1,2)
        outrcd( 3) = v_deepbask (numcomp_deepbask ,2)
        outrcd( 4) = v_deepbask (43,2)
         z = 0.e0
          for i = 1, num_deepbask  {
           z = z - v_deepbask(1,i)
          }
        outrcd( 5) = z / dble(num_deepbask ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_deepbask  {
           z = z + gAMPA_deepbask (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepbask  {
           z = z + gNMDA_deepbask (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepbask  {
           z = z + gGABA_A_deepbask (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_deepbask (1,3)
        outrcd(10) = v_deepbask (1,4)
      OPEN(20,FILE='GROUCHO110.deepbask')
      WRITE (20,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.10-3*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_deepaxax (1,2)
        outrcd( 3) = v_deepaxax (numcomp_deepaxax ,2)
        outrcd( 4) = v_deepaxax (43,2)
         z = 0.e0
          for i = 1, num_deepaxax  {
           z = z - v_deepaxax(1,i)
          }
        outrcd( 5) = z / dble(num_deepaxax ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_deepaxax  {
           z = z + gAMPA_deepaxax (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepaxax  {
           z = z + gNMDA_deepaxax (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepaxax  {
           z = z + gGABA_A_deepaxax (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_deepaxax (1,3)
        outrcd(10) = v_deepaxax (1,4)
      OPEN(21,FILE='GROUCHO110.deepaxax')
      WRITE (21,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.7-3*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_deepLTS  (1,2)
        outrcd( 3) = v_deepLTS  (numcomp_deepLTS  ,2)
        outrcd( 4) = v_deepLTS  (43,2)
         z = 0.e0
          for i = 1, num_deepLTS   {
           z = z - v_deepLTS(1,i)
          }
        outrcd( 5) = z / dble(num_deepLTS  ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_deepLTS   {
           z = z + gAMPA_deepLTS  (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepLTS    {
           z = z + gNMDA_deepLTS  (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_deepLTS   {
           z = z + gGABA_A_deepLTS  (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_deepLTS  (1,3)
        outrcd(10) = v_deepLTS  (1,4)
      OPEN(22,FILE='GROUCHO110.deepLTS')
      WRITE (22,FMT='(10F10.4)') (OUTRCD(I),I=1,10)

       else if (thisno.eq.12+10*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_TCR      (1,2)
        outrcd( 3) = v_TCR      (numcomp_TCR      ,2)
        outrcd( 4) = v_TCR      (43,2)
         z = 0.e0
          for i = 1, num_TCR       {
           z = z - v_TCR(1,i)
          }
        outrcd( 5) = z / dble(num_TCR      ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_TCR       {
           z = z + gAMPA_TCR      (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_TCR       {
           z = z + gNMDA_TCR      (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_TCR       {
           z = z + gGABA_A_TCR      (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_TCR      (1,3)
        outrcd(10) = v_TCR      (1,4)

          z = 0.e0
          for i = 1, num_TCR      {
           if(v_TCR     (numcomp_TCR     ,i) .gt. 0.e0) z = z + 1.e0
          }
        outrcd(11) = z   

      OPEN(23,FILE='GROUCHO110.TCR')
      WRITE (23,FMT='(11F10.4)') (OUTRCD(I),I=1,11)

       else if (thisno.eq.13-4*debug) then
        outrcd( 1) = time
        outrcd( 2) = v_nRT      (1,2)
        outrcd( 3) = v_nRT      (numcomp_nRT      ,2)
        outrcd( 4) = v_nRT      (43,2)
         z = 0.e0
          for i = 1, num_nRT       {
           z = z - v_nRT(1,i)
          }
        outrcd( 5) = z / dble(num_nRT      ) //  -av. cell somata 
         z = 0.e0
          for i = 1, numcomp_nRT        {
           z = z + gAMPA_nRT      (i,2)
          }
        outrcd( 6) = z * 1000.e0 // total AMPA cell 2 
         z = 0.e0
          for i = 1, numcomp_nRT          {
           z = z + gNMDA_nRT      (i,2)
          }
        outrcd( 7) = z * 1000.e0 // total NMDA cell 2 
         z = 0.e0
          for i = 1, numcomp_nRT         {
           z = z + gGABA_A_nRT      (i,2)
          }
        outrcd( 8) = z * 1000.e0 // total GABA-A, cell 2 
        outrcd( 9) = v_nRT      (1,3)
        outrcd(10) = v_nRT      (1,4)

          z = 0.e0
          for i = 1, num_nRT      {
           if(v_nRT     (numcomp_nRT     ,i) .gt. 0.e0) z = z + 1.e0
          }
        outrcd(11) = z   

      OPEN(24,FILE='GROUCHO110.nRT')
      WRITE (24,FMT='(11F10.4)') (OUTRCD(I),I=1,11)

/*  comment catcher */
//system("date >> time_groucho_hoc.txt")
if (pmesg) print "at end"