# Change the extension of the file to .ode to run it with XPPAUT, Winpp or Oscill8

# Hong, Zamborszky, Csikasz-Nagy 
# Minimum Criteria for DNA Damage-Induced Phase Advances in Circadian Rhythms

# parameters for the messenger RNA of the clock protein (Per mRNA)
par n=2, J=0.3, kms=1, kmd=0.1, Dex=0

# parameters for the clock protein (PER)
par kcps=0.5, kcpd=0.525, ka=100, kd=0.01, kp1=10, Jp=0.05, Chk2=0

# parameters for the dimer clock protein (PER/PER)
par kcp2d=0.0525, kp2=0.1

# parameters for the transcription factor (BMAL1/CLK) and its inhibition
par kicd=0.01, kica=20, TFtot=0.5, Chk2C=0

# differential equations

# Messenger RNA of the clock proteins (Per mRNA):
M'=Dex+kms*TF^n/(J^n+TF^n)-kmd*M

# Monomer clock proteins (PER):
CP'=kcps*M-kcpd*CP-2*ka*CP^2+2*kd*CP2-kp1*CP/(Jp+CP+2*CP2+2*IC)-Chk2*CP

# Dimer form of clock proteins (PER/PER):
CP2'=ka*CP^2-kd*CP2-kcp2d*CP2+kicd*IC-kica*CP2*TF-kp2*CP2/(Jp+CP+2*CP2+2*IC)-Chk2*CP2

# Transcription factor (BMAL1/CLK):
TF'=kcp2d*IC+kicd*IC-kica*TF*CP2+kp2*IC/(Jp+CP+2*CP2+2*IC)+Chk2c*IC

# Inactive complex of clock dimers and transcription factor:
IC= TFtot-TF

# Total amount of clock proteins (PER on Fig. 2):
CPtot=CP+2*CP2+2*IC

# initial conditions

init M=1.4
init CP=0.037
init CP2=0.046
init TF=0.13

done