<< Main Manual 

Tutorial #2. Coupling Neurons through Synaptic Connections 

This tutorial assumes that you have completed Tutorial #1.

2.1. Establishing an Excitatory Connection between CA1 Neurons

In order to be able to connect different neurons to one another we need to have a variable that is recognized by all the neuron types as 'Excitatory'. To achieve that, we can create a connection_target_file called connectionTypes.txt in the working directory as follows:

connectionTypes.txt

# string user uses to refer to this connection type  : list of variables that are connected by this connection type, e.g.,
# Excitatory: s_AMPA s_NMDA
# Inhibitory: s_GLY s_GABA
# Electrical: V
Excitatory: s

Now, we need to create a synaptic current that uses this s variable. Edit the zca.oden file to include the text in red.

zca.oden:

# Excitatory cortical neurons, 0 [Ca].
#
number Cm=1.0
number pms=3,pns=4
number VNa=55.0,t_tauh=-40.5,t_taun=-27.0
number thetaa=-50.0,sigmaa=20.0,thetab=-80.0,sigmab=-6.0,tauBs=15.0
number sigmam=9.5,sigmah=-7.0,sigman=10.0,sigmaz=5.0,sigmak=7
#
p gNa=35.0,gKdr=6.0,gL=0.05,Iapp=0.661914
p gA=1.4,gNaP=0.3,gZ=1.0
p thetaz=-39.0,tauZs=75.0
p phi=10.0, thetah=-45.0
p thetam=-30.0,thetan=-35.0,thetap=-47.0,sigmap=3.0
p VK=-90.0,VL=-70.0
p gsyn=1, taus=15, thetas=-10, sigmas=-2
#
GAMMAF(VV,theta,sigma)=1.0/(1.0+exp(-(VV-theta)/sigma))
#ZFUNC(AA,CA,zz)=1/(1+(AA^zz/CA^zz))
#
VVs'=(-gL*(VVs-VL)-INa-INaP-IKdr-IA-Iz-Isyn+Iappx)/Cm
hhs'=phi*(GAMMAF(VVs,thetah,sigmah)-hhs)/(1.0+7.5*GAMMAF(VVs,t_tauh,-6.0))
nns'=phi*(GAMMAF(VVs,thetan,sigman)-nns)/(1.0+5.0*GAMMAF(VVs,t_taun,-15.0))
bbs'=(GAMMAF(VVs,thetab,sigmab)-bbs)/tauBs
zzs'=(GAMMAF(VVs,thetaz,sigmaz)-zzs)/tauZs
s'=((1-s)*sinf(VVs)-s)/taus
#
Iappx=Iapp
#Iappx=if(t<=3.0)then(Iapp)else(0.0)
Minfs=GAMMAF(VVs,thetam,sigmam)
Pinfs=GAMMAF(VVs,thetap,sigmap)
Ainfs=GAMMAF(VVs,thetaa,sigmaa)
sinf(V)=1./(1.+exp((V-thetas)/sigmas))
#
INa=gNa*(Minfs^pms)*hhs*(VVs-VNa)
INaP=gNaP*Pinfs*(VVs-VNa)
IKdr=gKdr*(nns^pns)*(VVs-VK)
IA=gA*Ainfs^3*bbs*(VVs-VK)
Iz=gZ*zzs*(VVs-VK)
Isyn=gsyn*sum(s)*VVs
#
init VVs=-71.81327
init hhs=0.98786
init nns=0.02457
init bbs=0.203517
init zzs=0.00141
init s=0.0


This addition now causes the neuron to keep track of when a spike is generated by increasing its own s variable. Each neuron's synaptic current is dependent on all the presynaptic neurons' s variables. To access the presynaptic neurons' s variables, we use the special NeuronetExperimenter function,  sum(s) function, which indicates that NeuronetExperimenter should sum all the presynaptic neurons' s variables. Other special functions are also available to access presynaptic neuron variables (see the Special Functions for Implementing Neuron Connectivity section of the .oden file format documentation).

Then as in Tutorial #1, from a terminal, do the following:


> nne_build

Running a Simulation

Now, generate stubs of a zca.net, zca.setup, and control.exp as demonstrated in Tutorial #1.

First, we need to adjust our .setup file (note that we now are implicitly outputting the new s state variable).

zca.setup:
Network zca.net                            # Indicates the simulator should use the network in zca.net
Dt 0.05                                    #       with a timestep of 0.05
Print Step Size 1                          #       and should output data every time step
Output t VVs hhs nns bbs zzs s             #       and should output time and each of the state variables for all the neurons
Experiment control 1                       #       and should run the experiment in control.exp once

Adding a Second Neuron to the Network

Now, we will add a second neuron to the zca.net file (the text in red). This can be accomplished by simply copying and pasting from the Neuron ID line to the end of the original zca.net file. In a later tutorial, we will see how to make this generation of additional neurons easier. 

zca.net:
Neuron ID:   1
Neuron Name: zca
   Excitatory Connections To:

     Initial conditions:
     VVs        -71.8133
     hhs        0.98786
     nns        2.457e-02
     bbs        0.203517
     zzs        1.41e-03
     s          0

     Associated Variable Values:
     Cm         1
     Iapp       0.661914
     VK         -90
     VL         -70
     VNa        55
     gA         1.4
     gKdr       6
     gL         5.e-02
     gNa        35
     gNaP       0.3
     gZ         1
     gsyn       1
     phi        10
     pms        3
     pns        4
     sigmaa     20
     sigmab     -6
     sigmah     -7
     sigmak     7
     sigmam     9.5
     sigman     10
     sigmap     3
     sigmas     -2
     sigmaz     5
     t_tauh     -40.5
     t_taun     -27
     tauBs      15
     tauZs      75
     taus       15
     thetaa     -50
     thetab     -80
     thetah     -45
     thetam     -30
     thetan     -35
     thetap     -47
     thetas     -10
     thetaz     -39

Neuron ID:   2

Neuron Name: zca
   Excitatory Connections To:

     Initial conditions:
     VVs        -71.8133
     hhs        0.98786
     nns        2.457e-02
     bbs        0.203517
     zzs        1.41e-03
     s          0

     Associated Variable Values:
     Cm         1
     VK         -90
     VL         -70
     VNa        55
     gA         1.4
     gKdr       6
     gL         5.e-02
     gNa        35
     gNaP       0.3
     gZ         1
     gsyn       1
     phi        10
     pms        3
     pns        4
     sigmaa     20
     sigmab     -6
     sigmah     -7
     sigmak     7
     sigmam     9.5
     sigman     10
     sigmap     3
     sigmas     -2
     sigmaz     5
     t_tauh     -40.5
     t_taun     -27
     tauBs      15
     tauZs      75
     taus       15
     thetaa     -50
     thetab     -80
     thetah     -45
     thetam     -30
     thetan     -35
     thetap     -47
     thetas     -10
     thetaz     -39

To make the results a bit more interesting, change the VVs initial condition under the second Neuron ID heading to -55.

Excerpt of zca.net:
Neuron ID:   2
Neuron Name: zca
   Excitatory Connections To:

     Initial conditions:
     VVs        -55
     hhs        0.98786
     nns        2.457e-02
     bbs        0.203517
     zzs        1.41e-03
     s          0


Then, run the simulation as before:
> NeuronetExperimenter zca.setup              

After the simulation completes, there is a neuron_1.txt and neuron_2.txt file in the zca/ directory. Plotting these data, we can see that the two neurons are slightly out of phase with one another because of the altered initial condition in neuron #2.

2 neurons (unconnected)

Connecting the Two Neurons

Now, we would like to go ahead and connect the two neurons. To achieve this, we simply indicate in the zca.net file which other neuron each neuron is connected to using their respective ID numbers (add the text in red to your zca.net file). See the .net file documentation for a description of additional ways of specifiying connectivity.
 
zca.net:
Neuron ID:   1
Neuron Name: zca
   Excitatory Connections To:
      2

     Initial conditions:
     VVs        -71.8133
     hhs        0.98786
     nns        2.457e-02
     bbs        0.203517
     zzs        1.41e-03
     s          0

     Associated Variable Values:
     Cm         1
     Iapp       0.661914
     VK         -90
     VL         -70
     VNa        55
     gA         1.4
     gKdr       6
     gL         5.e-02
     gNa        35
     gNaP       0.3
     gZ         1
     gsyn       1
     phi        10
     pms        3
     pns        4
     sigmaa     20
     sigmab     -6
     sigmah     -7
     sigmak     7
     sigmam     9.5
     sigman     10
     sigmap     3
     sigmas     -2
     sigmaz     5
     t_tauh     -40.5
     t_taun     -27
     tauBs      15
     tauZs      75
     taus       15
     thetaa     -50
     thetab     -80
     thetah     -45
     thetam     -30
     thetan     -35
     thetap     -47
     thetas     -10
     thetaz     -39

Neuron ID:   2
Neuron Name: zca
   Excitatory Connections To:
      1

     Initial conditions:
     VVs        -55
     hhs        0.98786
     nns        2.457e-02
     bbs        0.203517
     zzs        1.41e-03
     s          0

     Associated Variable Values:
     Cm         1
     VK         -90
     VL         -70
     VNa        55
     gA         1.4
     gKdr       6
     gL         5.e-02
     gNa        35
     gNaP       0.3
     gZ         1
     gsyn       1
     phi        10
     pms        3
     pns        4
     sigmaa     20
     sigmab     -6
     sigmah     -7
     sigmak     7
     sigmam     9.5
     sigman     10
     sigmap     3
     sigmas     -2
     sigmaz     5
     t_tauh     -40.5
     t_taun     -27
     tauBs      15
     tauZs      75
     taus       15
     thetaa     -50
     thetab     -80
     thetah     -45
     thetam     -30
     thetan     -35
     thetap     -47
     thetas     -10
     thetaz     -39

Running the simulation now, results in a pair of synchronously bursting neurons:

2 neurons (connected)

Additional Types of Connections

This example loosely modeled AMPAR-mediated synaptic transmission, but suppose you are interested in adding an additional excitatory synaptic current such as an NMDAR-mediated current with its own constituent properties (e.g., Mg2+ block, slower kinetics, etc.). In that case, add an additional variable to the connectionTypes.txt file after the connection type (e.g., Excitatory), and add the appropriate equations to your .oden file.

For example,

connectionTypes.txt

# string user uses to refer to this connection type  : list of variables that are connected by this connection type, e.g.,
Excitatory: s_AMPA s_NMDA
Inhibitory: s_GLY s_GABA
Electrical: V

Finally, inhibitory or electrical connections (or any other hypothetical type) can be added in a similar way as long as the .net file is updated to include text with [Connection Type] Connected To:  to specify the connectivity arrangement for each neuron.

This completes the example showing a pair of excitatory neurons in a network.

>> Tutorial #3. Changing Neuronal Parameters Before and During a Simulation

<< Main Manual