-
Notifications
You must be signed in to change notification settings - Fork 1
/
granule.hoc
120 lines (104 loc) · 2.14 KB
/
granule.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
begintemplate GranuleSpine
public head, neck, all
create head, neck
objref all
proc init() {
all = new SectionList()
head all.append()
neck all.append()
connect head(0), neck(1)
neck { L = 2 diam = .2 }
head { L = 1 diam = 1 }
memb()
}
proc memb() {
forsec all {
insert pas
insert kamt gbar_kamt=0.008 ek=-90
insert nax gbar_nax=0.02 sh_nax=15 ena=60
Ra = 80
cm = 1
g_pas = 1/30000
e_pas = -65
ek = -90
}
}
endtemplate GranuleSpine
begintemplate Granule
public soma, priden, priden2, external_syn
public prilist
public position, x, y, z
objref external_syn
//create soma, priden2[3], priden
create soma, priden2[1], priden
objref prilist
proc init() {
npri = 1
create priden2[npri]
prilist = new SectionList()
priden prilist.append()
for i=0, npri-1 priden2[i] { prilist.append() }
topol()
geometry()
segments()
memb()
x = y = z = 0 // only change via position
}
proc topol() {local i
connect priden(0), soma(1)
for i=0, npri-1 {connect priden2[i](0), priden(.8)}
}
proc segments() {local i
soma.nseg= 1
forsec "priden" nseg = 10
}
proc geometry() {local i
basic_shape()
soma { L = 8 diam = 8}
priden {L=150 diam=.5}
for i=0, npri-1 {priden2[i] {L=100 diam=.4}}
// define_shape()
}
proc basic_shape() {local i
soma {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(0, 1, 0, 1)}
priden {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(0, 1, 0, 1)}
for i=0,npri-1 {
priden2[i] {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(i/npri, 1, 0, 1)}
}
}
proc memb() {
forall {
insert pas
insert kamt gbar_kamt=0.008 ek=-90
insert nax gbar_nax=0.02 sh_nax=15 ena=60
Ra = 80
cm = 1
g_pas = 1/30000
e_pas = -65
ek = -90
}
soma {
gbar_nax=0.04
insert kdrmt gbar_kdrmt=0.006
gbar_kamt = 0.004
cm = 4
g_pas = cm/30000
}
forsec prilist {
cm = 4
g_pas = cm/30000
}
soma {
external_syn = new Exp2Syn(.5)
external_syn.e=0
external_syn.tau1 = 5
external_syn.tau2 = 50
}
}
proc position() { local i
soma for i = 0, n3d()-1 {
pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
}
x = $1 y = $2 z = $3
}
endtemplate Granule