-
Notifications
You must be signed in to change notification settings - Fork 3
/
testgf.hoc
57 lines (47 loc) · 1000 Bytes
/
testgf.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
{load_file("nrngui.hoc")}
{load_file("defvar.hoc")}
load_file("common.hoc")
begintemplate Cell
public soma, syn
create soma
objref syn
proc init() {
soma {
nseg=5
diam = 10 L = 100
insert hh
syn = new Gfluct3(.5)
syn.on = 1
syn.E_e = 20
syn.h = 0.5
syn.noiseFromRandom123(1,2,3)
}
}
endtemplate Cell
ncell = 100
objref cell, cells, nc, netcons, st, stims, nil, rng
pnm = new ParallelNetManager(0)
pc = pnm.pc
tvec = new Vector()
idvec = new Vector()
cells = new List()
// test with non-default global seed
rng = new Random()
rng.Random123_globalindex(2022)
for (gid = pc.id; gid < ncell; gid += pc.nhost) {
pc.set_gid2node(gid, pc.id)
cell = new Cell()
cell.soma pc.cell(gid, new NetCon(&cell.soma.v(.5), nil))
cell.syn.noiseFromRandom123(gid,2,3)
cells.append(cell)
}
tvec = new Vector()
idvec = new Vector()
pc.spike_record(-1, tvec, idvec)
cvode.cache_efficient(1)
pc.set_maxstep(10)
stdinit()
prun("")
spike2file("gf")
pc.barrier()
quit()