#######################################
# Juliane Gansert 			  #
# Last Modified: April 3rd, 2008	  #	
# To be run with the software NETWORK #
#######################################

# If a shift in the threshild for action potential
# is desired, this variable needs to be set in the 
# *.par file
global th__


# Below the configuration of the eight cells in the 
# ring network are defined.
# The axons are named A#, were # is the cell number (1-8), the
# soma are named accordingly. The two dendrites of each cell
# are named D1C#, where # is again the cell number.

compartment A1_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A1_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A1_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A1_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A1_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A1_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A1_0 A1_1
connect A1_1 A1_2
connect A1_2 A1_3
connect A1_3 A1_4
connect A1_4 A1_5

compartment A2_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A2_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A2_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A2_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A2_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A2_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A2_0 A2_1
connect A2_1 A2_2
connect A2_2 A2_3
connect A2_3 A2_4
connect A2_4 A2_5

compartment A3_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A3_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A3_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A3_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A3_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A3_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A3_0 A3_1
connect A3_1 A3_2
connect A3_2 A3_3
connect A3_3 A3_4
connect A3_4 A3_5

compartment A4_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A4_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A4_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A4_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A4_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A4_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A4_0 A4_1
connect A4_1 A4_2
connect A4_2 A4_3
connect A4_3 A4_4
connect A4_4 A4_5

compartment A5_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A5_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A5_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A5_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A5_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A5_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A5_0 A5_1
connect A5_1 A5_2
connect A5_2 A5_3
connect A5_3 A5_4
connect A5_4 A5_5

compartment A6_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A6_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A6_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A6_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A6_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A6_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A6_0 A6_1
connect A6_1 A6_2
connect A6_2 A6_3
connect A6_3 A6_4
connect A6_4 A6_5

compartment A7_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A7_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A7_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A7_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A7_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A7_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A7_0 A7_1
connect A7_1 A7_2
connect A7_2 A7_3
connect A7_3 A7_4
connect A7_4 A7_5

compartment A8_0
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A8_1
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A8_2
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A8_3
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A8_4
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
compartment A8_5
  Passive L
  mInst_hTauInf Na
  mTauInf Kd
connect A8_0 A8_1
connect A8_1 A8_2
connect A8_2 A8_3
connect A8_3 A8_4
connect A8_4 A8_5

compartment S1
  Passive L

compartment S2
  Passive L

compartment S3
  Passive L

compartment S4
  Passive L

compartment S5
  Passive L

compartment S6
  Passive L

compartment S7
  Passive L

compartment S8
  Passive L

compartment D1C1_0
  Passive L
compartment D1C1_1
  Passive L
compartment D1C1_2
  Passive L
compartment D1C1_3
  Passive L
compartment D1C1_4
  Passive L
compartment D1C1_5
  Passive L
connect D1C1_0 D1C1_1
connect D1C1_1 D1C1_2
connect D1C1_2 D1C1_3
connect D1C1_3 D1C1_4
connect D1C1_4 D1C1_5

compartment D2C1_0
  Passive L
compartment D2C1_1
  Passive L
compartment D2C1_2
  Passive L
compartment D2C1_3
  Passive L
compartment D2C1_4
  Passive L
compartment D2C1_5
  Passive L
connect D2C1_0 D2C1_1
connect D2C1_1 D2C1_2
connect D2C1_2 D2C1_3
connect D2C1_3 D2C1_4
connect D2C1_4 D2C1_5

compartment D1C2_0
  Passive L
compartment D1C2_1
  Passive L
compartment D1C2_2
  Passive L
compartment D1C2_3
  Passive L
compartment D1C2_4
  Passive L
compartment D1C2_5
  Passive L
connect D1C2_0 D1C2_1
connect D1C2_1 D1C2_2
connect D1C2_2 D1C2_3
connect D1C2_3 D1C2_4
connect D1C2_4 D1C2_5

compartment D2C2_0
  Passive L
compartment D2C2_1
  Passive L
compartment D2C2_2
  Passive L
compartment D2C2_3
  Passive L
compartment D2C2_4
  Passive L
compartment D2C2_5
  Passive L
connect D2C2_0 D2C2_1
connect D2C2_1 D2C2_2
connect D2C2_2 D2C2_3
connect D2C2_3 D2C2_4
connect D2C2_4 D2C2_5

compartment D1C3_0
  Passive L
compartment D1C3_1
  Passive L
compartment D1C3_2
  Passive L
compartment D1C3_3
  Passive L
compartment D1C3_4
  Passive L
compartment D1C3_5
  Passive L
connect D1C3_0 D1C3_1
connect D1C3_1 D1C3_2
connect D1C3_2 D1C3_3
connect D1C3_3 D1C3_4
connect D1C3_4 D1C3_5

compartment D2C3_0
  Passive L
compartment D2C3_1
  Passive L
compartment D2C3_2
  Passive L
compartment D2C3_3
  Passive L
compartment D2C3_4
  Passive L
compartment D2C3_5
  Passive L
connect D2C3_0 D2C3_1
connect D2C3_1 D2C3_2
connect D2C3_2 D2C3_3
connect D2C3_3 D2C3_4
connect D2C3_4 D2C3_5

compartment D1C4_0
  Passive L
compartment D1C4_1
  Passive L
compartment D1C4_2
  Passive L
compartment D1C4_3
  Passive L
compartment D1C4_4
  Passive L
compartment D1C4_5
  Passive L
connect D1C4_0 D1C4_1
connect D1C4_1 D1C4_2
connect D1C4_2 D1C4_3
connect D1C4_3 D1C4_4
connect D1C4_4 D1C4_5

compartment D2C4_0
  Passive L
compartment D2C4_1
  Passive L
compartment D2C4_2
  Passive L
compartment D2C4_3
  Passive L
compartment D2C4_4
  Passive L
compartment D2C4_5
  Passive L
connect D2C4_0 D2C4_1
connect D2C4_1 D2C4_2
connect D2C4_2 D2C4_3
connect D2C4_3 D2C4_4
connect D2C4_4 D2C4_5

compartment D1C5_0
  Passive L
compartment D1C5_1
  Passive L
compartment D1C5_2
  Passive L
compartment D1C5_3
  Passive L
compartment D1C5_4
  Passive L
compartment D1C5_5
  Passive L
connect D1C5_0 D1C5_1
connect D1C5_1 D1C5_2
connect D1C5_2 D1C5_3
connect D1C5_3 D1C5_4
connect D1C5_4 D1C5_5

compartment D2C5_0
  Passive L
compartment D2C5_1
  Passive L
compartment D2C5_2
  Passive L
compartment D2C5_3
  Passive L
compartment D2C5_4
  Passive L
compartment D2C5_5
  Passive L
connect D2C5_0 D2C5_1
connect D2C5_1 D2C5_2
connect D2C5_2 D2C5_3
connect D2C5_3 D2C5_4
connect D2C5_4 D2C5_5

compartment D1C6_0
  Passive L
compartment D1C6_1
  Passive L
compartment D1C6_2
  Passive L
compartment D1C6_3
  Passive L
compartment D1C6_4
  Passive L
compartment D1C6_5
  Passive L
connect D1C6_0 D1C6_1
connect D1C6_1 D1C6_2
connect D1C6_2 D1C6_3
connect D1C6_3 D1C6_4
connect D1C6_4 D1C6_5

compartment D2C6_0
  Passive L
compartment D2C6_1
  Passive L
compartment D2C6_2
  Passive L
compartment D2C6_3
  Passive L
compartment D2C6_4
  Passive L
compartment D2C6_5
  Passive L
connect D2C6_0 D2C6_1
connect D2C6_1 D2C6_2
connect D2C6_2 D2C6_3
connect D2C6_3 D2C6_4
connect D2C6_4 D2C6_5

compartment D1C7_0
  Passive L
compartment D1C7_1
  Passive L
compartment D1C7_2
  Passive L
compartment D1C7_3
  Passive L
compartment D1C7_4
  Passive L
compartment D1C7_5
  Passive L
connect D1C7_0 D1C7_1
connect D1C7_1 D1C7_2
connect D1C7_2 D1C7_3
connect D1C7_3 D1C7_4
connect D1C7_4 D1C7_5

compartment D2C7_0
  Passive L
compartment D2C7_1
  Passive L
compartment D2C7_2
  Passive L
compartment D2C7_3
  Passive L
compartment D2C7_4
  Passive L
compartment D2C7_5
  Passive L
connect D2C7_0 D2C7_1
connect D2C7_1 D2C7_2
connect D2C7_2 D2C7_3
connect D2C7_3 D2C7_4
connect D2C7_4 D2C7_5

compartment D1C8_0
  Passive L
compartment D1C8_1
  Passive L
compartment D1C8_2
  Passive L
compartment D1C8_3
  Passive L
compartment D1C8_4
  Passive L
compartment D1C8_5
  Passive L
connect D1C8_0 D1C8_1
connect D1C8_1 D1C8_2
connect D1C8_2 D1C8_3
connect D1C8_3 D1C8_4
connect D1C8_4 D1C8_5

compartment D2C8_0
  Passive L
compartment D2C8_1
  Passive L
compartment D2C8_2
  Passive L
compartment D2C8_3
  Passive L
compartment D2C8_4
  Passive L
compartment D2C8_5
  Passive L
connect D2C8_0 D2C8_1
connect D2C8_1 D2C8_2
connect D2C8_2 D2C8_3
connect D2C8_3 D2C8_4
connect D2C8_4 D2C8_5



 connect S1 A1_0 
node N1 
connect2node S1 N1 
connect2node D1C1_0 N1 
connect2node D2C1_0 N1 

 connect S2 A2_0 
node N2 
connect2node S2 N2 
connect2node D1C2_0 N2 
connect2node D2C2_0 N2 

 connect S3 A3_0 
node N3 
connect2node S3 N3 
connect2node D1C3_0 N3 
connect2node D2C3_0 N3 

 connect S4 A4_0 
node N4 
connect2node S4 N4 
connect2node D1C4_0 N4 
connect2node D2C4_0 N4 

 connect S5 A5_0 
node N5 
connect2node S5 N5 
connect2node D1C5_0 N5 
connect2node D2C5_0 N5 

 connect S6 A6_0 
node N6 
connect2node S6 N6 
connect2node D1C6_0 N6 
connect2node D2C6_0 N6 

 connect S7 A7_0 
node N7 
connect2node S7 N7 
connect2node D1C7_0 N7 
connect2node D2C7_0 N7 

 connect S8 A8_0 
node N8 
connect2node S8 N8 
connect2node D1C8_0 N8 
connect2node D2C8_0 N8 



# Symmetric gap junctions connect the cells 
# to form a circular structure.

synapse D1C1_1 D2C2_1 
GapJunction G 
 
synapse D2C2_1 D1C1_1 
GapJunction G 
 
synapse D1C2_1 D2C3_1 
GapJunction G 
 
synapse D2C3_1 D1C2_1 
GapJunction G 
 
synapse D1C3_1 D2C4_1 
GapJunction G 
 
synapse D2C4_1 D1C3_1 
GapJunction G 
 
synapse D1C4_1 D2C5_1 
GapJunction G 
 
synapse D2C5_1 D1C4_1 
GapJunction G 
 
synapse D1C5_1 D2C6_1 
GapJunction G 
 
synapse D2C6_1 D1C5_1 
GapJunction G 
 
synapse D1C6_1 D2C7_1 
GapJunction G 
 
synapse D2C7_1 D1C6_1 
GapJunction G 
 
synapse D1C7_1 D2C8_1 
GapJunction G 
 
synapse D2C8_1 D1C7_1 
GapJunction G 
 
synapse D2C1_1 D1C8_1 
GapJunction G 
 
synapse D1C8_1 D2C1_1 
GapJunction G 
 

# An chemical synapse connects the axon of cell
# number 2 with the soma of cell number 1:
synapse A2_5 S1 
AlphaFunction A