-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmosinit_RUNonly.hoc
94 lines (73 loc) · 3.1 KB
/
mosinit_RUNonly.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
////////////////////////////////////////////////////////////////////////////////
// COMMENTS
//
// in set parameters we changed bicarb -- change it back? different citation?
//
// Not opening file correctly. Need to create directory for data?
//
//////////////////// set the random number generator //////////////////////////
use_mcell_ran4(0)
//////////////////// model and interface scripts //////////////////////////////
xopen("setParameters.hoc")
xopen("makeCell.hoc")
xopen("makeWindows.hoc")
xopen("writeGeometry.hoc")
strdef filename, fprefix
fprefix = "no_data"
objref runfile
// create vectors to store header information
objref main_head, list_head, sec_head
objref soma_count, prox_count, midd_count, dist_count
soma_count = new Vector()
prox_count = new Vector()
midd_count = new Vector()
dist_count = new Vector()
//create lists to store lists of sections
objref soma_ecl, soma_KCC2_membp, soma_calc, soma_act_kin, soma_act_phos
objref prox_ecl, prox_KCC2_membp, prox_calc, prox_act_kin, prox_act_phos
objref midd_ecl, midd_KCC2_membp, midd_calc, midd_act_kin, midd_act_phos
objref dist_ecl, dist_KCC2_membp, dist_calc, dist_act_kin, dist_act_phos
//create vectors to store data for writing
objref Ecl_info, KCC2_MP_info, Ca_info, kin_info, phos_info
//create vector for storing spike timingg interval values
objref timesteps
timesteps = new Vector()
proc add_timestep(){
timesteps.append(5) //,-15,-10,-5,-4,-3,-2,-1,0,1,2,3,4,5,10,15,25,50)
}
add_timestep()
// finalize vectors to store data values
Ecl_info = new Vector()
KCC2_MP_info = new Vector()
Ca_info = new Vector()
kin_info = new Vector()
phos_info = new Vector()
// the sampling frequency for recording (in Hz)
rsamp = 2000 // sampling frequency
rstep = 1/(rsamp/1000) // don't change this, it is the time per sample in milliseconds
nstep = tstop*(rsamp/1000) // don't change this, it is the number of samples per run, used to set aside space in memory for each vector
ind_start = 0.1*nstep // beginning of plasticity induction interval, based on start time of 10000 ms in a 100000 ms run
ind_end = (0.4*nstep)-1 // end of plasticity induction interval, based on induction for 30s in a 100000 ms run
//-----------------------------------------------------------------------------
// init()
//-----------------------------------------------------------------------------
// the finalization procedure for the numerical integrator /
proc init() { // sets everything to starting values
finitialize(v_init) // ffinalize takes as an argument voltage of all sections you want it to finalize
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
}
frecord_init()
//reseed()
}
proc run_sim() {local i, j, step, num_steps
for step = 0, timesteps.size()-1 {
clamp_start = start_paired + timesteps.x[step]
xopen("makeClamp.hoc")
//data_init()
run()
}
}
print " ... cell created successfully."