-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNmdaAmpaSpineSynStim.hoc
56 lines (43 loc) · 1.34 KB
/
NmdaAmpaSpineSynStim.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
if (name_declared("pkgversions") != 4 ) { execute("strdef pkgversions") }
sprint(pkgversions,"%sNmdaAmpaSpineSynStim = $Revision: 1.6 $, ",pkgversions)
load_file("Spine.hoc")
/*
NmdaAmpaSpineSynStim - NMDA-AMPA synapse on spine with netstim stimulus
s = new NmdaAmpaSpineSynStim() - creates NmdaAmpaSpineSynStim s
s.loc(x) - locates at x on the current section
s.get_distance() - returns distance from origin specified by distance()
*/
begintemplate NmdaAmpaSpineSynStim
public loc, get_distance, event, destroy
public ampasyn, nmdasyn, netcon, nmdanetcon, netstim, spine
objref ampasyn, nmdasyn, netcon, nmdanetcon, netstim, spine
proc init() {
spine = new Spine($1)
spine.head {
ampasyn = new AmpaSyn(0.5)
nmdasyn = new NmdaSyn(0.5)
netstim = new NetStim(0.5)
netcon = new NetCon(netstim,ampasyn)
nmdanetcon = new NetCon(netstim,nmdasyn)
}
}
proc event() {
netcon.event($1)
nmdanetcon.event($1)
}
proc loc() {
spine.loc($1)
}
func get_distance() {
dist = distance(ampasyn.get_loc()) // Seems to work, though not documented
pop_section() // needed to keep the stack in order
return dist
}
proc destroy() {
objref ampasyn
objref nmdasyn
objref netstim
objref netcon
objref nmdanetcon
}
endtemplate NmdaAmpaSpineSynStim