However, my code seems don't work at all. Can you please help me with it? The command window says some syntax error on NetCon part, last line. I just really don't know what I should do. Please help me. Thanks a lot.
Here is the 1st file of code.
Code: Select all
load_file("nrngui.hoc")
print "-{ create cells }-"
begintemplate simpleIAFcell
public soma1, soma2, soma3
public IAF
public x, y, z, x1, y1, z1, x2, y2, z2
public addConnection
objref IAF
create soma1
proc init() {
x = $1
y = $2
z = $3
soma1 {
// set lattice position of the cell
pt3dclear()
pt3dadd(x, y, z, 5)
pt3dadd(x+5, y, z, 5)
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
}
proc addConnection() {
soma1 {
pt3dadd(x+5, y, z, 1)
pt3dadd($1+5, $2, $3, 1)
}
}
//=======================================================================
create soma2
proc init() {
x1 = $4
y1 = $5
z1 = $6
soma2 {
// set lattice position of the cell
pt3dclear()
pt3dadd(x1, y1, z1, 10)
pt3dadd(x1+2, y1, z1, 10)
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
}
proc addConnection() {
soma2 {
pt3dadd(x1+2, y1, z1, 1)
pt3dadd($4+2, $5, $7, 1)
}
}
//========================================================================
create soma3
proc init() {
x2 = $7
y2 = $8
z2 = $9
soma3 {
// set lattice position of the cell
pt3dclear()
pt3dadd(x2, y2, z2, 8)
pt3dadd(x2+10, y2, z2, 8)
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
}
proc addConnection() {
soma3 {
pt3dadd(x2+8, y2, z2, 1)
pt3dadd($7+8, $8, $9, 1)
}
}
//Connect somas together
objref prob
prob = new Random()
aprob = prob.uniform(0,1)
objref CellConnections
CellConnections = new NetCon(soma1, soma2, 10, 1, 0.3)
endtemplate simpleIAFcell
The second file of code I tried to even simpler, but again, nothing works. Can you please kindly tell me what I did wrong? I kind of pretend the soma is still cylinder, like is HH model, but I put IntFire1 on the somas, maybe that's really silly way. Sorry I'm still relatively new to NEURON.
Here is 2nd file of code.
Code: Select all
load_file("nrngui.hoc")
objref IAF
create soma1, soma2, soma3
soma1 {
nseg = 1
diam = 100
L = 100
Ra = 123.0
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
soma2 {
nseg = 1
diam = 50
L = 100
Ra = 123.0
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
soma3 {
nseg = 1
diam = 80
L = 100
Ra = 123.0
// insert IntFire1 point process
IAF = new IntFire1(0.5)
IAF.tau = 10
IAF.refrac = 5
}
// network connection
objref CellConnections
CellConnections = new NetCon(soma1, soma2, 10, 1, 0.5)