Help using NetCon

Moderator: wwlytton

Post Reply
AT98
Posts: 1
Joined: Tue Nov 27, 2018 12:42 pm

Help using NetCon

Post by AT98 » Wed Nov 28, 2018 12:37 pm

Hi, I am new to NEURON and need some help implementing NetCon. I want to connect two cells, apply a stimulus in the first cell, and then monitor the voltage in the second one. I'm not sure how to use NetCon to do this, or how to monitor voltage in the second cell (I think I'm using ExpSyn correctly, though). My code is pasted below. Please let me know if you see my mistake! Thanks.

load_file(“nrngui.hoc”)
ndend=2

create soma1, dend1[ndend], axon1
access soma1

soma1 {
nseg=50
diam = 100
L = 100
Ra = 123
insert hh
}

dend1[0] {
nseg=25
diam = 2
L = 300
Ra = 100
insert hh
}
dend1[1] {
nseg=25
diam = 2
L = 300
Ra = 100
insert hh
}

axon1 {
nseg = 25
diam = 2
L = 300
Ra = 100
insert hh
}

connect dend1[0](0), soma1(0)
connect axon1(0), soma1(1)

objectvar stim
stim = new IClamp(0.5)
stim.del=1
stim.dur = 5
stim.amp = 5

tstop = 25

ndend = 2
create soma2, dend2[ndend], axon2
access soma2

soma2 {
nseg = 50
diam = 100
L = 100
Ra = 123.0
insert hh
}

dend2[1] {
nseg=25
diam = 2
L = 300
Ra = 100
insert hh
}

axon2 {
nseg = 25
diam = 2
L = 300
Ra = 100
insert hh
}

connect dend2[0](0), soma2(0)
connect axon2(0), soma2(1)

objectvar syn[1]
dend2[0] syn[0] = new ExpSyn(0)

access soma1
netcon = new NetCon(&v(1), syn[0]) // need to fix this to connect soma1 to syn[0]
access soma2
run()

ted
Site Admin
Posts: 5370
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Help using NetCon

Post by ted » Thu Nov 29, 2018 12:28 pm

First, thank you for your interest in NEURON.

The rest of this post may sound like a music teacher asking an enthusiastic novice pianist to put aside Liszt's Transcendental Etudes for just long enough to practice some scales, but so be it.

This is the quickest way to learn how to use NetCons:
1. Make a network in which two artificial spiking cells are connected with a NetCon.
2. Make a network in which the presynaptic cell is an artificial spiking cell (maybe a NetStim) and the postsynaptic cell is a single compartment model cell.
3. Make a network in which both the pre- and postsynaptic cells are single compartment model cells.

Next, get used to the idea that cell classes are the only practical way to make network models whose cells have more than one section. Don't worry about how to write the code that defines a cell class. Instead, use the CellBuilder to specify the anatomical and biophysical properties of your cell classes--see the CellBuilder tutorial at https://neuron.yale.edu/neuron/docs. For good examples of serial and parallel implementations of network models in hoc, see https://neuron.yale.edu/neuron/static/p ... nm2008.pdf.

Post Reply