Connect two neurons using hoc code
Posted: Sat Jun 11, 2011 2:47 am
I have written the code for the geometric and biophysical features of a simple neuron using hoc code.
I would like to have two identical neurons to exist and connect the axon1 of neuron1 to the dend2[1], using an alpha synapse. Neuron1 is being stimulated at the soma using a current pulse. I would like to see the response in the second neuron for the stimulus given to the first neuron by establishing the synaptic connectivity as I said.
Thanks in advance.
Sanjay.
The code is as follows:
load_file("nrngui.hoc")
ndend = 2
create soma1, dend1[ndend], axon1
access soma1
soma1 {
nseg = 50
diam = 100
L = 100
Ra = 123.0
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 = 5
L = 2000
Ra = 100
insert hh
}
// Connect things together
connect dend1[0](0), soma1(0)
connect dend1[1](0), soma1(0.2)
connect axon1(0), soma1(1)
// create an electrode in the soma
objectvar stim
stim = new IClamp(0.5)
stim.del = 1
stim.dur = 5
stim.amp = 5
tstop = 25
// SECOND IDENTICAL NEURON
ndend = 2
create soma2, dend2[ndend], axon2
// access soma2
soma2 {
nseg = 50
diam = 100
L = 100
Ra = 123.0
insert hh
}
dend2[0] {
nseg = 25
diam = 5
L = 300
Ra = 100
insert hh
}
dend2[1] {
nseg = 25
diam = 2
L = 300
Ra = 100
insert hh
}
axon2 {
nseg = 25
diam = 5.0
L = 2000
Ra = 100
insert hh
}
// Connect things together
connect dend2[0](0), soma2(0)
connect dend2[1](0), soma2(0.2)
connect axon2(0), soma2(1)
// CONNECTION BETWEEN THE TWO NEURONS
// connect axon1(1),dend2[0](1)
// connect soma1(1),dend2[0](1)
run()
I would like to have two identical neurons to exist and connect the axon1 of neuron1 to the dend2[1], using an alpha synapse. Neuron1 is being stimulated at the soma using a current pulse. I would like to see the response in the second neuron for the stimulus given to the first neuron by establishing the synaptic connectivity as I said.
Thanks in advance.
Sanjay.
The code is as follows:
load_file("nrngui.hoc")
ndend = 2
create soma1, dend1[ndend], axon1
access soma1
soma1 {
nseg = 50
diam = 100
L = 100
Ra = 123.0
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 = 5
L = 2000
Ra = 100
insert hh
}
// Connect things together
connect dend1[0](0), soma1(0)
connect dend1[1](0), soma1(0.2)
connect axon1(0), soma1(1)
// create an electrode in the soma
objectvar stim
stim = new IClamp(0.5)
stim.del = 1
stim.dur = 5
stim.amp = 5
tstop = 25
// SECOND IDENTICAL NEURON
ndend = 2
create soma2, dend2[ndend], axon2
// access soma2
soma2 {
nseg = 50
diam = 100
L = 100
Ra = 123.0
insert hh
}
dend2[0] {
nseg = 25
diam = 5
L = 300
Ra = 100
insert hh
}
dend2[1] {
nseg = 25
diam = 2
L = 300
Ra = 100
insert hh
}
axon2 {
nseg = 25
diam = 5.0
L = 2000
Ra = 100
insert hh
}
// Connect things together
connect dend2[0](0), soma2(0)
connect dend2[1](0), soma2(0.2)
connect axon2(0), soma2(1)
// CONNECTION BETWEEN THE TWO NEURONS
// connect axon1(1),dend2[0](1)
// connect soma1(1),dend2[0](1)
run()