-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhh.hoc
90 lines (63 loc) · 1.86 KB
/
hh.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
//{chdir("./hoc/bench")}
{load_file("nrngui.hoc")}
if (!name_declared("MODEL")) { MODEL=0 }
if (!name_declared("NCELLS")) { NCELLS=1 }
if (!name_declared("STOPTIME")) { STOPTIME=100 }
// cells
create cells[10000]
//objref pc
objref cvode
objref tvec, idvec
// $1 : cell id for stimulate
/*
proc mkstim() { local i, num_stim_pos, stim_cell, num_cell, num_stim
num_cell = $1
num_stim_pos = $2
num_stim = $3
ncstimlist = new List()
stimlist = new List()
for(i=0; i<num_stim; i=i+1){
stim_cell = i * (num_cell/(num_stim+1))
if(pc.gid_exists(stim_cell)){
//printf("[makestim:%d] CELL %d\n", pc.id, stim_cell)
stim = new NetStim()
stim.number = 10
stim.start = 2
stim.interval = 50
ncstim = new NetCon(stim, pc.gid2cell(stim_cell).synlist.object(0))
ncstim.delay = 1
ncstim.weight = 0.1
stimlist.append(stim)
ncstimlist.append(ncstim)
}
}
}
*/
// start main
{
cvode = new CVode()
printf("\nCondition : \n")
//printf(" * Process=%d, Thread=%d\n", pc.nhost, NTHREAD)
printf(" * STOPTIME=%f, dt=%f\n", STOPTIME, dt)
printf(" * nCELLS=%d\n", NCELLS)
printf("\nStart Modeling.\n")
// mkcells(NCELLS, MODEL)
// connectcells(NCELLS, NETWORK, NSYNAPSE, SYNAPSE_RANGE)
// spikerecord()
forall { insert hh }
cvode.cache_efficient(1)
stdinit()
printf("Modeling Finished.\n")
printf("Calculation Starts\n")
//modelfin_time = pc.time
//start_waittime = pc.wait_time
//pc.psolve(tstop)
tstop = 200
run()
printf("Calculation Finished !!\n")
//stop_time = pc.time
printf("\nRESULT : \n")
//printf(" * core time : %f sec\n", stop_time-modelfin_time)
//printf("[%d] NC = %d, SYN = %d, tmp_pre = %d, tmp_post = %d\n", pc.id, nclist.count(), synlist.count(), tmp_pre, tmp_post)
}
quit()