I am new to programming on Neuron. I am trying to create 2 neurons (each with 1 soma, 1 dendrite and 1 axon). I connected axon1 with dend2 and then I connected axon2 with dend1. I also put an IClamp to stimulate soma1. I am expecting that initial stimulation to produce a continuous closed-loop excitatory state. However, I am getting an error with my NexCon source value: &axon1. I still receive an error if include .v(0.5). Do you know what I am doing incorrectly?
Here is my code:
Code: Select all
load_file("nrngui.hoc")
create soma1
soma1 {
nseg = 1
diam = 30
L = 30
Ra = 100.0
insert hh
insert pas
}
create dend1
dend1 {
nseg = 23
diam = 1
L = 600
Ra = 100
insert hh
insert pas
}
create axon1
axon1 {
nseg = 3
diam = 1
L = 1000
Ra = 100
insert hh
insert pas
}
// Connect parts together
connect dend1(0), soma1(0)
connect axon1(0), soma1(1)
// create an electrode in the soma
objectvar stim
soma1 {
stim = new IClamp(0.5)
stim.del = 100
stim.dur = 5
stim.amp = .45
}
tstop = 500
// SECOND IDENTICAL NEURON
create soma2
soma2 {
nseg = 1
diam = 30
L = 30
Ra = 100.0
insert hh
insert pas
}
create dend2
dend2 {
nseg = 23
diam = 1
L = 600
Ra = 100
insert hh
insert pas
}
create axon2
axon2 {
nseg = 3
diam = 1
L = 1000
Ra = 100
insert hh
insert pas
}
// Connect parts together
connect dend2(0), soma2(0)
connect axon2(0), soma2(1)
// Placing synapse on dend2
objectvar syn1
dend2 {
syn1 = new Exp2Syn(0.5)
syn1.tau1 = 0.5
syn1.tau2 = 1.0
syn1.e = 0
}
// Connecting axon1 to dend2
objectvar connection1
connection1 = new NetCon(&axon1, syn1, -20, 1, 1 ))
// Placing synapse on dend1
objectvar syn2
dend1 {
syn2 = new Exp2Syn(0.5)
syn2.tau1 = 0.5
syn2.tau2 = 1.0
syn2.e = 0
}
// Connecting axon2 to axon1
objectvar connection2
connection2 = new NetCon(&axon2, syn2, -20, 1, 1 ))