-
Notifications
You must be signed in to change notification settings - Fork 0
/
XPPAUT code.txt
51 lines (51 loc) · 1.23 KB
/
XPPAUT code.txt
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
# Simulation of Postnova et al. (2009) model for
reciprocal excitation on XPPAUT
#
# Parameters and Initial conditions
par c=1
par tinc=7500, tdec=920, tgl=30, tox=300
par gL=0.1, gna=3, gk=4, ggl=0.15,
goxGL=0.2, gglOX=0.196
par EL=-60, Ena=50, Ek=-90, Esyn=50
init M=1, v1=-60, v2=-60
#
# Voltage-dependencies
m1=1/(1+exp(-0.25*(v1+25)))
m2=1/(1+exp(-0.25*(v2+25)))
n1inf(v1)=1/(1+exp(-0.25*(v1+25)))
n2inf(v2)=1/(1+exp(-0.25*(v2+25)))
OXinf(v1)=1/(1+exp(-(v1+20)))
binf(v2)=1/(1+exp(-(v2+20)))
#
# Gating variables
n1'=(n1inf(v1)-n1)/2
n2'=(n2inf(v2)-n2)/2
bOX'=(binf(v2)-bOX)/tgl
bGL'=(OXinf(v1)-bGL)/tgl
aox'=(OXinf(v1)*M-aox)/tox
#
# Orexin and Glutamate voltages
v1'=(I1*(f(t)+g(t)+h(t)+k(t))-gL*(v1-
EL)-gna*m1*(v1-Ena)-gk*n1*(v1-Ek)-
gglOX*bOX*(v1-Esyn))/c
v2'=(-gL*(v2-EL)-gna*m2*(v2-Ena)-
gk*n2*(v2-Ek)-ggl*bGL*(v2-Esyn)-
goxGL*aox*(v2-Esyn))/c
M'=(1-M)/tinc-M*OXinf(v1)/tdec
#
# Pulse function (4 500ms pulses to
mimic the circadian cycle)
f(t)=heav(t-t0)-heav(t-t1)
g(t)=heav(t-t2)-heav(t-t3)
h(t)=heav(t-t4)-heav(t-t5)
k(t)=heav(t-t6)-heav(t-t7)
par t0=500, t1=1000, t2=25500, t3=26000
par t4=50500,t5=51000, t6=75500,
t7=76000
par I1=0.9
# Track current
aux ibar=I1*(f(t)+g(t))
@ total=80000, dt=0.1
@ bound=80000
@ xhi=80000,ylo=-100,yhi=30
done