-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeCell.hoc
150 lines (139 loc) · 3.58 KB
/
makeCell.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
///////////////////////////////////////////////////////////////////////////////
// makeCell.hoc: script to build the cell
///////////////////////////////////////////////////////////////////////////////
// Create the soma
create soma
access soma
nseg = 1
diam = diameter
L = length
Ra = axial_res
// Create vectors containing set mechanism control parameters
objref distributed_mech_params
distributed_mech_params = new Vector()
distributed_mech_params.append(use_hh)
distributed_mech_params.append(use_ca_channels)
distributed_mech_params.append(use_ca_channels)
distributed_mech_params.append(use_ca_channels)
distributed_mech_params.append(use_kcc2)
distributed_mech_params.append(use_kcc2_transport)
objref point_mech_params
point_mech_params = new Vector()
point_mech_params.append(use_cclamp)
point_mech_params.append(use_gaba)
// Initialize MechanismType objects
// These are lists of all available distributed & point-process mechanisms
objref dmt, pmt
dmt = new MechanismType(0)
pmt = new MechanismType(1)
// Insert CClamp and GABAa synapse
objref cclamp, gaba
for i = 0, point_mech_params.size()-1 {
ref = point_mech_params.x(i)
if (ref == 1) {
if (i == 0) {
pmt.select("CClamp")
pmt.make(cclamp)
cclamp.loc(0.5)
cclamp.dur = duration
cclamp.amp = amplitude
}
if (i == 1) {
pmt.select("GABAa")
pmt.make(gaba)
gaba.loc(0.5)
clprm_GABAa = clprm
C_GABAa = gaba_C
D_GABAa = gaba_D
alpha_GABAa = gaba_alpha
beta_GABAa = gaba_beta
gmax_GABAa = gaba_gmax
cli = cli0_cl_ion
clo = clo0_cl_ion
hco3i = hco3i0_hco3_ion
hco3o = hco3o0_hco3_ion
}
}
}
// Insert pre-synaptic and post-synaptic stimuli
objref stim_pre, stim_post, netcon_pre, netcon_post
if (apply_stim_protocol > 0 && use_cclamp == 1 && use_gaba == 1) {
stim_pre = new NetStim(0.5)
stim_pre.interval = interval_pre
stim_pre.number = number_pre
stim_pre.start = start_pre
stim_pre.noise = noise_pre
stim_post = new NetStim(0.5)
stim_post.interval = interval_post
stim_post.number = number_post
stim_post.start = start_post
stim_post.noise = noise_post
netcon_pre = new NetCon(stim_pre, gaba, 0, 0, 1)
netcon_post = new NetCon(stim_post, cclamp, 0, 0, 1)
}
// Insert distributed mechanisms
for i = 0, distributed_mech_params.size()-1 {
ref = distributed_mech_params.x(i)
if (ref == 1) {
if (i == 0) {
dmt.select("hh")
dmt.make()
gnabar_hh = gnabar
gkbar_hh = gkbar
gl_hh = gl
el_hh = el
}
if (i == 1) {
dmt.select("cad")
dmt.make()
cainf_cad = cainf
cai = cai0_ca_ion
cao = cao0_ca_ion
}
if (i == 2) {
dmt.select("cal")
dmt.make()
gcalbar_cal = gcalbar
}
if (i == 3) {
dmt.select("cat2")
dmt.make()
gcatbar_cat2 = gcatbar
}
if (i == 4) {
dmt.select("KCC2")
dmt.make()
A_M_KCC2 = A_M
B_M_KCC2 = B_M
R_M_KCC2 = R_M
R_MP_KCC2 = R_MP
R_K_KCC2 = R_K
R_P_KCC2 = R_P
V_K_KCC2 = V_K
V_P_KCC2 = V_P
H_K_KCC2 = H_K
H_P_KCC2 = H_P
B_K_KCC2 = B_K
B_P_KCC2 = B_P
mkcc2i0_mkcc2_ion = memb_KCC2 + membp_KCC2
}
if (i == 5) {
dmt.select("KCC2_Transport")
dmt.make()
axD_KCC2_Transport = axD
gtonic_KCC2_Transport = gtonic
R_T_KCC2_Transport = R_T
r_T_KCC2_Transport = r_T
cli = cli0_cl_ion
clo = clo0_cl_ion
}
}
}
// Register ions with NEURON
catype = ion_register("ca", 2)
cltype = ion_register("cl", -1)
hco3type = ion_register("hco3", -1)
// Set styles for the ions
castyle = ion_style("ca_ion", 3, 1, 0, 0, 1)
clstyle = ion_style("cl_ion", 3, 2, 1, 1, 1)
hco3style = ion_style("hco3_ion", 3, 2, 1, 1, 1)