-
Notifications
You must be signed in to change notification settings - Fork 1
/
forfig1-springer.hoc
102 lines (84 loc) · 1.83 KB
/
forfig1-springer.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
91
92
93
94
95
96
97
98
99
100
101
// to show IPSP on M0 - no EPSP input
load_file("nrngui.hoc")
load_file("mitral-lss.hoc")
load_file("gc-ka.hoc")
cvode.active(1)
Vrest = -65
dt = 1
celsius=35
tstop=200
objref nconp[3], net, netp[3], g, b, synp, nil, stim, apc
objref mt[3], gc[3], train, outfile, coeff[3], table
objref nc[27]
//objref mitral, mitralt, tmitral, tmitralt, pmitral, pmitralt
for i=0, 1 {
mt[i] = new Mitral()
gc[i] = new GC()
}
weight=.1
amp=.03
rel=0.2
inh=13
synstr=3
nmdafactor=0.0035
frac=1
mt[0].soma {
stim = new IClamp(.5)
stim.amp=0.5
stim.dur=4
stim.del=2
}
temp=100
flag=0
b = new VBox()
b.intercept(1)
g = new Graph()
g.size(0,tstop,-70,0)
g.xaxis(1)
g.addvar("mt[0].soma.v(0.5)",1,1,0.7,1,2)
g.addvar("mt[1].soma.v(0.5)",2,2,0.7,0.98,2)
g.exec_menu("10% Zoom out")
xpanel("",1)
xvalue("distance (0-1000)","temp")
xbutton("runm", "runm()")
xstatebutton("GC1",&flag)
xpanel()
b.intercept(0)
b.map()
////////////////// circuit definition
///// gc <-> mt
mt[0].secden[1] nc[1]= new NetCon(&v(0),gc[0].synmt[0],-40,1,synstr*nmdafactor)
mt[0].secden[1] nc[2]= new NetCon(&v(0),gc[0].sampa[0],-40,1,synstr*1e-3)
mt[0].secden[1] nc[16]= new NetCon(&v(0.4),gc[1].synmt[2],-40,1,synstr*nmdafactor)
mt[0].secden[1] nc[17]= new NetCon(&v(0.4),gc[1].sampa[2],-40,1,synstr*1e-3)
gc[0].dend[4] nc[6]= new NetCon(&v(1),mt[1].igp[0][2],-40,1,inh*1e-3)
gc[1].dend[0] nc[9]= new NetCon(&v(1),mt[1].igp[1][0],-40,1,0*1e-3)
////////////////// end circuit definition
proc init() {
t=0
finitialize(Vrest)
fcurrent()
forall {
v=Vrest
if (ismembrane("nax")) {e_pas=v+(ina+ik)/g_pas
} else {
e_pas=v+ik/g_pas
}
}
cvode.re_init()
g.begin()
g.plot(t)
}
proc advance() {
fadvance()
g.plot(t)
g.flush()
doNotify()
}
proc runm() {
if (temp>1000) temp=1000
mt[1].secden[0] mt[1].igp[0][2].loc(temp/1000)
nc[9].weight=flag*inh*1e-3
init()
run()
}