-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdiffin2d.hoc
93 lines (85 loc) · 1.79 KB
/
diffin2d.hoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//xopen("$(NEURONHOME)/lib/hoc/noload.hoc")
v_init = -75
tstop = 80
dt = 0.01
celsius = 37
create acell_home_
access acell_home_
nsyn1=4
// Single compartment cell
begintemplate Grc
objref synlist, syn1[1],ampa1[1]
objref stim0
public soma, syn1,ampa1, stim0
public synlist, connect2target
create soma
proc init(){
nsyn =$1
objectvar syn1[nsyn],ampa1[nsyn]
synlist= new List()
soma {
nseg = 1
diam = 9.76
L = 9.76
cm = 1
Ra = 100
Area = PI*diam*L*1e-8
insert pas
g_pas=4.11e-4
e_pas=-75
stim0 = new VClamp(0.5)
for i=0, nsyn-1 {
syn1[i]=new GrC_Gludif2(0.5)
ampa1[i] = new AMPA_D2(0.5)//DCO kinetic scheme
//ampa1[i] = new AMPA_D4(0.5) DOC kinetic scheme
setpointer ampa1[i].pglu, syn1[i].glu
}
}
for i=0, nsyn-1 {
synlist.append(syn1[i])
}
}
proc connect2target(){soma $o2=new NetCon(&v(1),$o1)}
endtemplate Grc
begintemplate S1Gen
public pp, connect2target
external acell_home_
objref pp
proc init(){
acell_home_ pp= new SpGen2(0.5)}
proc connect2target(){$o2=new NetCon(pp,$o1)}
endtemplate S1Gen
ncells=1
nmossy=4
objref Mossy[nmossy],GrCell[ncells]
GrCell[0] = new Grc(nsyn1)
for i=0, nmossy -1 {
Mossy[i]= new S1Gen()
}
objref cells, nclist, netcon
{cells = new List() nclist = new List()}
func cell_append() {cells.append($o1)
return cells.count - 1 }
func nc_append() {//srcindex, tarcelindex, synindex
cells.object($1).connect2target(cells.object($2).synlist.object($3),netcon)
netcon.weight = $4 netcon.delay = $5
nclist.append(netcon)
return nclist.count - 1
}
//Network instantiation
for i=0, nmossy-1{
cell_append(Mossy[i])
}
cell_append(GrCell[0])
for i=0, nsyn1-1 {
nc_append(i, 4, i, 1,0)
}
load_proc("nrnmainmenu")
nrnmainmenu()
xopen("grcparam.hoc")
xopen("mossy.hoc")
xopen("post2men.hoc")
xopen("premenu.hoc")
load_file("init2dif.ses")
xopen("fig7or12.hoc")
finitialize(v_init)