-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.hoc
executable file
·148 lines (110 loc) · 3.05 KB
/
main.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
objref somatodendritic, dendritic
/* Global */
celsius = 37
v_init = -70
/* Passive membrane */
ra = 150 // decrease ad to decrease of soma vth variability, increase axon's vth variability
global_ra = ra
rm = 30000 // g_pas=1/rm
c_m = 0.5
cm_myelin = 0.02
g_pas_node = 0.02
/* Active channels */
// Nav
Ena = 60
gna12_soma = 80
gna12_dend = 80
gna12_ais_max = 3200 // Nav1.2
gna16_ais_max = 3200 // Nav1.6
gna16_nakeaxon= 300
gna12_myelin=20 // Nav1.2 at myelins
gna16_node = 3200 // Nav1.6 at node
// usetable
usetable=0
usetable_na=0
usetable_na12=0
usetable_na16=0
usetable_kca=0
usetable_km=0
usetable_kv=0
vhalf_na12 = -30
vhalf_na16 = -43
vhalf_na = -30
vhalf_na12_stoch = -30
vhalf_na16_stoch = -43
vhalf_na_stoch = -30
// Kv
Ek = -90
gkv_soma = 20
gkv_dend = 10
gkv_axon = 1000
// Km
gkm = .3
gkm_soma = gkm
// Kca
gkca = 3
gkca_soma = gkca
// Ca
Eca=140
gca = .3
gca_soma = gca
// gamma
gamma_na = gamma
gamma_na12 = gamma
gamma_na16 = gamma
gamma_na_stoch = gamma
gamma_na12_stoch = gamma
gamma_na16_stoch = gamma
// ------------------------------------------------
// Cell Geometry
// ------------------------------------------------
/* Clean up */
forall delete_section()
/* Soma and Dendrites */
load_file("morphology/soma_dendrites.hoc")
// build a sectionlist for soma and dendrites
somatodendritic = new SectionList()
forall {
if (L/nseg>40) {
nseg = L/40 + 1
} // make sure no segments exceed 40 uM length. Note, soma.nseg remains 10.
somatodendritic.append() // soma and dendrites are all included
}
// build a sectionlist for dendrites only
dendritic = new SectionList()
forsec somatodendritic dendritic.append()
soma dendritic.remove() // remove soma for pure dendritic sectionlist
/* Axon */
axonOnSoma=1
load_file ("morphology/axon.hoc")
create_axon()
/* Spines */
aspiny = 0 // 0 for spiny
if (!aspiny) {
load_file ("morphology/spines.hoc")
add_spines(dendritic,spine_dens)
}
distance(0,axonOnSoma) // set the point where axon seated on soma as the origin
// ----------------------------------------------------
// Insert Density Mechanisms
// ----------------------------------------------------
load_file ("density_mechs.hoc")
// Install passive membrane properties
install_passive()
printf("stoch,%d\n",stoch)
// Install active channels
//install_channels()
if(stoch==0){
install_channels()
}
if(stoch==1){
install_channels_stoch()
}
// -----------------------------------------------------------
// Experiments: Insert Point Processes or Something Else
// -----------------------------------------------------------
xopen("recording.hoc")
// Call the Session "hu_all"
xopen ("c.ses")
/* Where Ini */
xopen("inject_soma.hoc")