-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrundemo.hoc
More file actions
77 lines (58 loc) · 1.78 KB
/
Copy pathrundemo.hoc
File metadata and controls
77 lines (58 loc) · 1.78 KB
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
//----------------------------------------------------------------------------
// define a panel to run the different demos
//----------------------------------------------------------------------------
proc make_demopanel() {
xpanel("Simulations of thalamic reticular network")
xlabel("Simulations of thalamic reticular network")
xbutton("Fig. 5a","restart(\"Fig5A\")")
xbutton("Fig. 5b","restart(\"Fig5B\")")
xbutton("Fig. 6a","restart(\"Fig6A\")")
xbutton("Fig. 6b","restart(\"Fig6B\")")
xbutton("Fig. 6c","restart(\"Fig6C\")")
xbutton("Fig. 6d","restart(\"Fig6D\")")
xbutton("Fig. 13a","restart(\"Fig13A\")")
xbutton("Fig. 13b","restart(\"Fig13B\")")
xpanel(5,100)
}
load_file("nrngui.hoc")
objref pwman
pwman = new PWManager()
proc rm_panel() {
pwman.hide(1)
}
make_demopanel()
ismenu=0
//----------------------------------------------------------------------------
// define a panel to run the different demos
//----------------------------------------------------------------------------
load_file("nrngui.hoc")
strdef tstr
objref El
electrodes_present=0 // after electrodes are created they must be
// destroyed if simulation restarted
proc destroy_elec() {
execute("objref stim, vc",El)
}
pwmcnt = PWManager[0].count // the initial GUIs should not be dismissed
ismenu=0 // determines if electrode is defined
proc restart() { local i
if (electrodes_present) {
destroy_elec()
}
forall delete_section()
for i=0, n_graph_lists-1 {
graphList[i].remove_all()
}
flush_list.remove_all()
fast_flush_list.remove_all()
doNotify()
for (i= PWManager[0].count-1; i >= pwmcnt; i -= 1) {
PWManager[0].close(i)
doNotify()
}
stoprun = 0
cvode_active(0)
sprint(tstr, "%s.hoc", $s1)
load_file(1, tstr)
ismenu=0 // used to reopen run control window
}