-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtestderiv.hoc
54 lines (45 loc) · 956 Bytes
/
testderiv.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
{load_file("nrngui.hoc")}
{load_file("defvar.hoc")}
load_file("common.hoc")
begintemplate Cell
public soma, syn, stim
create soma
objref syn, stim
proc init() {
soma {
nseg=1
diam = 10 L = 100
insert hhderiv
stim = new IClamp(.5)
stim.amp= 1
stim.dur = 0.3
// syn = new Gfluct3(.5)
// syn.on = 1
// syn.E_e = 20
// syn.h = 0.5
// syn.noiseFromRandom123(1,2,3)
}
}
endtemplate Cell
ncell = 1
objref cell, cells, nc, netcons, st, stims, nil
pnm = new ParallelNetManager(0)
pc = pnm.pc
tvec = new Vector()
idvec = new Vector()
cells = new List()
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)
}
pc.spike_record(-1, tvec, idvec)
cvode.cache_efficient(1)
pc.set_maxstep(10)
stdinit()
prun("")
spike2file("deriv")
pc.barrier()
quit()