network modeling

Moderator: wwlytton

Post Reply
shahali
Posts: 9
Joined: Tue Jul 17, 2007 2:56 am

network modeling

Post by shahali »

Hi.I want to have a network including 5 presynaptic cells and 2 postsynaptic cells, can I write like this?
create precell[5],postcell[2]


for i=0,4 precell{
pt3dclear() pt3dadd(0, 0, 0, 1)
L = 10/PI diam = 10 cm=16 Ra=110
nseg=1
insert hh
}

for i=0,1 postcell{

create soma, dend[15] ,axon[6]

for i = 0, 2 connect dend(0), soma(0)
for i = 3, 6 connect dend(0),dend[0](1)
for i = 7,10 connect dend(0),dend[1](1)
for i =11,14 connect dend(0),dend[2](1)
for i = 0, 1 connect axon(0),soma(0)
for i = 2, 3 connect axon(0),axon[0](1)
for i = 4, 5 connect axon(0),axon[1](1)
soma {pt3dclear() pt3dadd(0,0,0,1) }
for i = 0,14{dend { pt3dclear()
for i=0,30 {
x = PI*i/30
pt3dadd(200*sin(x), 200*cos(x), 0, 100*sin(4*x))}
}
}
for i = 0,5{ axon[i]
{ pt3dclear()
for i=0,30 {
x = PI*i/30
pt3dadd(200*sin(x), 200*cos(x), 0, 100*sin(4*x))}
}
}

objref all, axons, dendrite
all = new SectionList()
soma all.append()
for i=0, 14 dend[i] all.append()
for i=0, 5 axon[i] all.append()
dendrite= new SectionList()
for i=0, 14 dend[i] dendrite.append()
axons = new SectionList()
for i=0, 5 axon[i] axons.append()
forsec dendrite{ L=20 diam=5 cm=16 Ra=110 insert pas }
forsec axons { L=40 diam=7 cm=16 Ra=110 insert hh}
soma { L = 100 diam = 1 cm=16 Ra=110 insert hh }
forsec all { nseg=3 Ra = 110 cm = 1 }
}
objectvar synapse[5]
for w=0,1 postcell[w] {
j1=0
for i=3,14 {
dend[i] synapse[j1] = new synRodBC(0.5)
setpointer synapse[j1].preCA,precell[i-3].Cai(0.5)
setpointer synapse[j1].vrod,precell[i-3].v(0.5)
j1=j1+1
}
}

but when I stimulate the presynaotic cell nothing happen for postsynaptic cell and when I want to plot for example the voltage of presynaptic cells this comes:

Inappropriate ioctl for device
nrniv: Section access unspecified
ted
Site Admin
Posts: 5786
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Start small. Two cells, simple anatomy and biophysics. When you have that working, go
to three cells. Test after every revision and fix bugs as they arise. Don't wait until you
have many lines of untested code before you start looking for bugs. Use object oriented
programming--define cell classes and create instances of each class; it will make the task
much easier by helping you manage complexity.
Post Reply