How do I change the existing Exp2Syn.mod to model the slow decay constant ?
Code: Select all
COMMENT
2 Two state kinetic scheme synapse described by rise time tau1,
3 and decay time constant tau2. The normalized peak condunductance is 1.
4 Decay time MUST be greater than rise time.
5
6 The solution of A->G->bath with rate constants 1/tau1 and 1/tau2 is
7 A = a*exp(-t/tau1) and
8 G = a*tau2/(tau2-tau1)*(-exp(-t/tau1) + exp(-t/tau2))
9 where tau1 < tau2
10
11 If tau2-tau1 -> 0 then we have a alphasynapse.
12 and if tau1 -> 0 then we have just single exponential decay.
13
14 The factor is evaluated in the
15 initial block such that an event of weight 1 generates a
16 peak conductance of 1.
17
18 Because the solution is a sum of exponentials, the
19 coupled equations can be solved as a pair of independent equations
20 by the more efficient cnexp method.
21
22 ENDCOMMENT
23
24 NEURON {
25 POINT_PROCESS Exp2Syn
26 RANGE tau1, tau2, e, i
27 NONSPECIFIC_CURRENT i
28
29 RANGE g
30 }
31
32 UNITS {
33 (nA) = (nanoamp)
34 (mV) = (millivolt)
35 (uS) = (microsiemens)
36 }
37
38 PARAMETER {
39 tau1=.1 (ms) <1e-9,1e9>
40 tau2 = 10 (ms) <1e-9,1e9>
41 e=0 (mV)
42 }
43
44 ASSIGNED {
45 v (mV)
46 i (nA)
47 g (uS)
48 factor
49 }
50
51 STATE {
52 A (uS)
53 B (uS)
54 }
55
56 INITIAL {
57 LOCAL tp
58 if (tau1/tau2 > .9999) {
59 tau1 = .9999*tau2
60 }
61 A = 0
62 B = 0
63 tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1)
64 factor = -exp(-tp/tau1) + exp(-tp/tau2)
65 factor = 1/factor
66 }
67
68 BREAKPOINT {
69 SOLVE state METHOD cnexp
70 g = B - A
71 i = g*(v - e)
72 }
73
74 DERIVATIVE state {
75 A' = -A/tau1
76 B' = -B/tau2
77 }
78
79 NET_RECEIVE(weight (uS)) {
80 A = A + weight*factor
81 B = B + weight*factor
82 }