-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotoneuron_template
57 lines (47 loc) · 1.23 KB
/
motoneuron_template
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
public init, topol, basic_shape, subsets, geom, biophys, geom_nseg, biophys_inhomo, setv
public synlist, x, y, z, position, connect2target
external lambda_f, mn_geom_file
public soma, dend
objref synlist
proc init() {
//print "Making motoneuron"
//print mn_geom_file
topol()
basic_shape()
subsets()
geom_nseg()
biophys()
synlist = new List()
synapses()
x = y = z = 0 // only change via position
}
//{xopen("motoneuron_geometry")}
//{xopen(mn_geom_file)}
// Cannot take mn geom location from outside template... should revisit at some point
//strdef local_geom_file
//sprint(local_geom_file,"%s", mn_geom_file)
{xopen("motoneuron_geometry")}
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[1] syn_ = new ExpSyn(0.5) synlist.append(syn_)
syn_.tau = 3
}
//print "made it past syn_"
proc setv() {
forsec all {
v = $1
}
}
func is_art() { return 0 }