-
Notifications
You must be signed in to change notification settings - Fork 1
/
cell.hoc
91 lines (83 loc) · 1.81 KB
/
cell.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
begintemplate B_BallStick
public is_art
public init, topol, basic_shape, subsets, geom, biophys, geom_nseg, biophys_inhomo
public synlist, x, y, z, position, connect2target
public soma, dend
public all
objref synlist
proc init() {
topol()
subsets()
geom()
biophys()
geom_nseg()
synlist = new List()
synapses()
x = y = z = 0 // only change via position
}
create soma, dend
proc topol() { local i
connect dend(0), soma(1)
basic_shape()
}
proc basic_shape() {
soma {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(15, 0, 0, 1)}
dend {pt3dclear() pt3dadd(15, 0, 0, 1) pt3dadd(105, 0, 0, 1)}
}
objref all
proc subsets() { local i
objref all
all = new SectionList()
soma all.append()
dend all.append()
}
proc geom() {
forsec all { }
soma { /*area = 500 */ L = diam = 12.6157 }
dend { L = 200 diam = 1 }
}
external lambda_f
proc geom_nseg() {
forsec all { nseg = int((L/(0.1*lambda_f(100))+.9)/2)*2 + 1 }
}
proc biophys() {
forsec all {
Ra = 100
cm = 1
}
soma {
insert hh
gnabar_hh = 0.12
gkbar_hh = 0.036
gl_hh = 0.0003
el_hh = -54.3
}
dend {
insert pas
g_pas = 0.001
e_pas = -65
}
}
proc biophys_inhomo(){}
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
}
obfunc connect2target() { localobj nc //$o1 target point process, optional $o2 returned NetCon
soma nc = new NetCon(&v(1), $o1)
nc.threshold = 10
if (numarg() == 2) { $o2 = nc } // for backward compatibility
return nc
}
objref syn_
proc synapses() {
/* E0 */ dend syn_ = new ExpSyn(0.8) synlist.append(syn_)
syn_.tau = 2
/* I1 */ dend syn_ = new ExpSyn(0.1) synlist.append(syn_)
syn_.tau = 5
syn_.e = -80
}
func is_art() { return 0 }
endtemplate B_BallStick