// Created by libAntimony v2.13.0
function function_1(V, substrate, Km)
  V*substrate/(Km + substrate);
end

function_1.sboTerm = 29

function_1 is "degradation (Michaelis_Menten_Equation)"

function LightFunction(t, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)
  (lightOffset + 0.5*lightAmplitude*(1 + tanh(cyclePeriod*((t + phase)/cyclePeriod - floor(floor(t + phase)/cyclePeriod))/twilightPeriod)) - 0.5*lightAmplitude*(1 + tanh((cyclePeriod*((t + phase)/cyclePeriod - floor(floor(t + phase)/cyclePeriod)) - photoPeriod)/twilightPeriod))) + 0.5*lightAmplitude*(1 + tanh((cyclePeriod*((t + phase)/cyclePeriod - floor(floor(t + phase)/cyclePeriod)) - cyclePeriod)/twilightPeriod));
end

LightFunction.sboTerm = 475

LightFunction is "tanh() light function"


model *MODEL1001130000()

  // Compartments and Species:
  compartment compartment_;
  species cLm in compartment_, cLc in compartment_, cLn in compartment_, cTm in compartment_;
  species cTc in compartment_, cTn in compartment_, cXm in compartment_, cXc in compartment_;
  species cXn in compartment_, cYm in compartment_, cYc in compartment_, cYn in compartment_;
  species cPn in compartment_, cAm in compartment_, cAc in compartment_, cAn in compartment_;

  // Reactions:
  reaction_1:  => cLm; (compartment_*g0^alpha/(g0^alpha + cAn^alpha))*(LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)*(q1*cPn + n0) + n1*cXn^a/(g1^a + cXn^a));
  reaction_0: cLm => ; compartment_*function_1(m1, cLm, k1);
  reaction_2:  => cLc; compartment_*p1*cLm;
  reaction_3: cLc -> cLn; compartment_*(r1*cLc - r2*cLn);
  reaction_4: cLc => ; compartment_*function_1(m2, cLc, k2);
  reaction_5: cLn => ; compartment_*function_1(m3, cLn, k3);
  reaction_6:  => cTm; (compartment_*n2*cYn^b/(g2^b + cYn^b))*(g3^c/(g3^c + cLn^c));
  reaction_7: cTm => ; compartment_*function_1(m4, cTm, k4);
  reaction_9: cYc -> cYn; compartment_*(r7*cYc - r8*cYn);
  reaction_10: cYn => ; compartment_*function_1(m14, cYn, k12);
  reaction_11:  => cYc; compartment_*p4*cYm;
  reaction_12: cYc => ; compartment_*function_1(m13, cYc, k11);
  reaction_13: cXc -> cXn; compartment_*(r5*cXc - r6*cXn);
  reaction_14: cXc => ; compartment_*function_1(m10, cXc, k8);
  reaction_15:  => cXc; compartment_*p3*cXm;
  reaction_16: cXn => ; compartment_*function_1(m11, cXn, k9);
  reaction_17:  => cAc; compartment_*p6*cAm;
  reaction_18: cAc -> cAn; compartment_*(r9*cAc - r10*cAn);
  reaction_19: cAc => ; compartment_*function_1(m17, cAc, k15);
  reaction_20: cAn => ; compartment_*function_1(m18, cAn, k16);
  reaction_21:  => cPn; (1 - LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod))*p5*compartment_;
  reaction_22: cPn => ; LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)*q3*cPn*compartment_;
  reaction_23: cPn => ; compartment_*m15*cPn/(k13 + cPn);
  reaction_25:  => cAm; LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)*q4*cPn*compartment_;
  reaction_26:  => cAm; compartment_*n6*cLn^g/(g7^g + cLn^g);
  reaction_27: cAm => ; compartment_*m16*cAm/(k14 + cAm);
  reaction_28:  => cXm; compartment_*n3*cTn^d/(g4^d + cTn^d);
  reaction_29: cXm => ; compartment_*m9*cXm/(k7 + cXm);
  reaction_30:  => cTc; p2*compartment_*cTm;
  reaction_31: cTc -> cTn; compartment_*(-r4*cTn + r3*cTc);
  reaction_32: cTc => ; compartment_*(1 - LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod))*m5*cTc/(k5 + cTc);
  reaction_33: cTc => ; m6*compartment_*cTc/(k5 + cTc);
  reaction_34: cTn => ; compartment_*(1 - LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod))*m7*cTn/(k6 + cTn);
  reaction_38: cTn => ; m8*compartment_*cTn/(k6 + cTn);
  reaction_39:  => cYm; compartment_*(LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)*q2*cPn + (LightFunction(time, lightOffset, lightAmplitude, phase, photoPeriod, cyclePeriod, twilightPeriod)*n4 + n5)*g5^e/(g5^e + cTn^e))*(g6^f/(g6^f + cLn^f));
  reaction_40: cYm => ; compartment_*m12*cYm/(k10 + cYm);

  // Species initializations:
  cLm = 0.4625;
  cLc = 0.0132;
  cLn = 0.0699;
  cTm = 0.4303;
  cTc = 10.2965;
  cTn = 0.5402;
  cXm = 0.0957;
  cXc = 1.5413;
  cXn = 0.4585;
  cYm = 0.0303;
  cYc = 0.0041;
  cYn = 0.0122;
  cPn = 0.8476;
  cAm = 14.6921;
  cAc = 0.7027;
  cAn = 0.8648;

  // Compartment initializations:
  compartment_ = 1;

  // Variable initializations:
  q1 = 4.1954;
  n0 = 0.05;
  g0 = 1;
  alpha = 4;
  n1 = 7.8142;
  a = 1.2479;
  g1 = 3.1383;
  m1 = 1.999;
  k1 = 2.392;
  p1 = 0.8295;
  r1 = 16.8363;
  r2 = 0.1687;
  m2 = 20.44;
  k2 = 1.5644;
  m3 = 3.6888;
  k3 = 1.2765;
  n2 = 3.0087;
  b = 1.0258;
  g2 = 0.0368;
  g3 = 0.2658;
  c = 1.0258;
  m4 = 3.8231;
  k4 = 2.5734;
  p2 = 4.324;
  r3 = 0.3166;
  r4 = 2.1509;
  m5 = 0.0013;
  m6 = 3.1741;
  k5 = 2.7454;
  m7 = 0.0492;
  m8 = 4.0424;
  k6 = 0.4033;
  n3 = 0.2431;
  d = 1.4422;
  g4 = 0.5388;
  m9 = 10.1132;
  k7 = 6.5585;
  p3 = 2.147;
  r5 = 1.0352;
  r6 = 3.3017;
  m10 = 0.2179;
  k8 = 0.6632;
  m11 = 3.3442;
  k9 = 17.1111;
  q2 = 2.4017;
  n4 = 0.0857;
  n5 = 0.1649;
  g5 = 1.178;
  g6 = 0.0645;
  e = 3.6064;
  f = 1.0237;
  m12 = 4.297;
  k10 = 1.7303;
  p4 = 0.2485;
  r7 = 2.2123;
  r8 = 0.2002;
  m13 = 0.1347;
  k11 = 1.8258;
  m14 = 0.6114;
  k12 = 1.8066;
  p5 = 0.5;
  k13 = 1.2;
  m15 = 1.2;
  q3 = 1;
  q4 = 2.4514;
  g = 1.0258;
  n6 = 8.0706;
  g7 = 0.0004;
  m16 = 12.2398;
  k14 = 10.3617;
  p6 = 0.2907;
  r9 = 0.2528;
  r10 = 0.2212;
  m17 = 4.4505;
  k15 = 0.0703;
  m18 = 0.0156;
  k16 = 0.6104;
  lightAmplitude = 1;
  lightOffset = 0;
  cyclePeriod = 24;
  photoPeriod = 12;
  phase = 0;
  twilightPeriod = 0.0416666667;

  // Other declarations:
  const compartment_, q1, n0, g0, alpha, n1, a, g1, m1, k1, p1, r1, r2, m2;
  const k2, m3, k3, n2, b, g2, g3, c, m4, k4, p2, r3, r4, m5, m6, k5, m7;
  const m8, k6, n3, d, g4, m9, k7, p3, r5, r6, m10, k8, m11, k9, q2, n4, n5;
  const g5, g6, e, f, m12, k10, p4, r7, r8, m13, k11, m14, k12, p5, k13, m15;
  const q3, q4, g, n6, g7, m16, k14, p6, r9, r10, m17, k15, m18, k16, lightAmplitude;
  const lightOffset, cyclePeriod, photoPeriod, phase, twilightPeriod;

  // Unit definitions:
  unit time_unit = 3600 second;
  unit substance = 1e-9 mole;

  // Display Names:
  substance is "nM";
  compartment_ is "cell";
  cLm is "LHY mRNA";
  cLc is "LHY protein in cytoplasm";
  cLn is "LHY protein in nucleus";
  cTm is "TOC1 mRNA";
  cTc is "TOC1 protein  in cytoplasm";
  cTn is "TOC1 protein in nucleus";
  cXm is "X mRNA";
  cXc is "X protein in cytoplasm";
  cXn is "X protein in nucleus";
  cYm is "Y mRNA";
  cYc is "Y protein in the cytoplasm";
  cYn is "Y protein in nucleus";
  cPn is "light sensitive protein P";
  cAm is "PPR7/9 mRNA";
  cAc is "PPR7/9 protein in cytoplasm";
  cAn is "PPR7/9 protein in nucleus";
  reaction_1 is "cLm transcription";
  reaction_0 is "cLm degradation";
  reaction_2 is "cLc translation";
  reaction_3 is "LHY protein translocation";
  reaction_4 is "cLc degradation";
  reaction_5 is "cLn degradation";
  reaction_6 is "cTm  transcription ";
  reaction_7 is "cTm degradation";
  reaction_9 is "Y protein translocation";
  reaction_10 is "cYn degradation";
  reaction_11 is "cYc translation";
  reaction_12 is "cYc degradation";
  reaction_13 is "X protein translocation";
  reaction_14 is "cXc degradation";
  reaction_15 is "cXc translation";
  reaction_16 is "cXn degradation";
  reaction_17 is "cAc translation";
  reaction_18 is "PPR7/9 protein translocation";
  reaction_19 is "cAc degradation";
  reaction_20 is "cAn degradation";
  reaction_21 is "light dependent production of protein P";
  reaction_22 is "light activation protein P degradation";
  reaction_23 is "cPn degradation";
  reaction_25 is "light activation of cAm transcription";
  reaction_26 is "light independent cAm transcription";
  reaction_27 is "cAm degradation";
  reaction_28 is "cXm transcription";
  reaction_29 is "cXm degradation";
  reaction_30 is "cTc translation";
  reaction_31 is "TOC1 protein translocation";
  reaction_32 is "light activation degradation of cTc";
  reaction_33 is "light independent degradation of cTc";
  reaction_34 is "light activation degradation of cTn";
  reaction_38 is "light independent degradation cTn";
  reaction_39 is "cYm transcription";
  reaction_40 is "cYm degradation";

  // SBO terms:
  compartment_.sboTerm = 290
  cLm.sboTerm = 278
  cLc.sboTerm = 245
  cLn.sboTerm = 245
  cTm.sboTerm = 278
  cTc.sboTerm = 245
  cTn.sboTerm = 245
  cXm.sboTerm = 278
  cXc.sboTerm = 245
  cXn.sboTerm = 245
  cYm.sboTerm = 278
  cYc.sboTerm = 245
  cYn.sboTerm = 245
  cPn.sboTerm = 245
  cAm.sboTerm = 278
  cAc.sboTerm = 245
  cAn.sboTerm = 245
  q1.sboTerm = 337
  n0.sboTerm = 186
  g0.sboTerm = 186
  alpha.sboTerm = 261
  n1.sboTerm = 186
  a.sboTerm = 190
  g1.sboTerm = 363
  m1.sboTerm = 324
  k1.sboTerm = 27
  p1.sboTerm = 153
  r1.sboTerm = 153
  r2.sboTerm = 156
  m2.sboTerm = 324
  k2.sboTerm = 26
  m3.sboTerm = 324
  k3.sboTerm = 27
  n2.sboTerm = 186
  b.sboTerm = 190
  g2.sboTerm = 363
  g3.sboTerm = 261
  c.sboTerm = 190
  m4.sboTerm = 324
  k4.sboTerm = 27
  p2.sboTerm = 153
  r3.sboTerm = 153
  r4.sboTerm = 156
  m5.sboTerm = 324
  m6.sboTerm = 324
  k5.sboTerm = 27
  m7.sboTerm = 324
  m8.sboTerm = 324
  k6.sboTerm = 27
  n3.sboTerm = 186
  d.sboTerm = 190
  g4.sboTerm = 363
  m9.sboTerm = 324
  k7.sboTerm = 27
  p3.sboTerm = 153
  r5.sboTerm = 153
  r6.sboTerm = 156
  m10.sboTerm = 324
  k8.sboTerm = 27
  m11.sboTerm = 324
  k9.sboTerm = 27
  q2.sboTerm = 337
  n4.sboTerm = 186
  n5.sboTerm = 186
  g5.sboTerm = 261
  g6.sboTerm = 261
  e.sboTerm = 190
  f.sboTerm = 190
  m12.sboTerm = 324
  k10.sboTerm = 27
  p4.sboTerm = 153
  r7.sboTerm = 153
  r8.sboTerm = 156
  m13.sboTerm = 324
  k11.sboTerm = 27
  m14.sboTerm = 324
  k12.sboTerm = 27
  p5.sboTerm = 153
  k13.sboTerm = 27
  m15.sboTerm = 324
  q3.sboTerm = 337
  q4.sboTerm = 337
  g.sboTerm = 190
  n6.sboTerm = 186
  g7.sboTerm = 363
  m16.sboTerm = 324
  k14.sboTerm = 27
  p6.sboTerm = 153
  r9.sboTerm = 153
  r10.sboTerm = 156
  m17.sboTerm = 324
  k15.sboTerm = 27
  m18.sboTerm = 324
  k16.sboTerm = 27
  lightOffset.sboTerm = 477
  cyclePeriod.sboTerm = 447
  photoPeriod.sboTerm = 447
  phase.sboTerm = 476
  twilightPeriod.sboTerm = 347
  reaction_1.sboTerm = 183
  reaction_0.sboTerm = 179
  reaction_2.sboTerm = 184
  reaction_3.sboTerm = 185
  reaction_4.sboTerm = 179
  reaction_5.sboTerm = 179
  reaction_6.sboTerm = 183
  reaction_7.sboTerm = 179
  reaction_9.sboTerm = 185
  reaction_10.sboTerm = 179
  reaction_11.sboTerm = 184
  reaction_12.sboTerm = 179
  reaction_13.sboTerm = 185
  reaction_14.sboTerm = 179
  reaction_15.sboTerm = 184
  reaction_16.sboTerm = 179
  reaction_17.sboTerm = 184
  reaction_18.sboTerm = 185
  reaction_19.sboTerm = 179
  reaction_20.sboTerm = 179
  reaction_21.sboTerm = 393
  reaction_22.sboTerm = 179
  reaction_23.sboTerm = 179
  reaction_25.sboTerm = 183
  reaction_26.sboTerm = 183
  reaction_27.sboTerm = 179
  reaction_28.sboTerm = 183
  reaction_29.sboTerm = 179
  reaction_30.sboTerm = 184
  reaction_31.sboTerm = 185
  reaction_32.sboTerm = 179
  reaction_33.sboTerm = 179
  reaction_34.sboTerm = 179
  reaction_38.sboTerm = 179
  reaction_39.sboTerm = 183
  reaction_40.sboTerm = 179

  // CV terms:
  compartment_ hypernym "http://identifiers.org/go/GO:0005623"
  cLm hypernym "http://identifiers.org/chebi/CHEBI:33699"
  cLc identity "http://identifiers.org/uniprot/O81713"
  cLn identity "http://identifiers.org/uniprot/O81713"
  cTm hypernym "http://identifiers.org/chebi/CHEBI:33699"
  cTc identity "http://identifiers.org/uniprot/Q9LKL2"
  cTn identity "http://identifiers.org/uniprot/Q9LKL2"
  cXm hypernym "http://identifiers.org/chebi/CHEBI:33699"
  cYm hypernym "http://identifiers.org/chebi/CHEBI:33699"
  cYc version "http://identifiers.org/uniprot/Q9SQI2"
  cYn version "http://identifiers.org/uniprot/Q9SQI2"
  cAm hypernym "http://identifiers.org/chebi/CHEBI:33699"
  cAc part "http://identifiers.org/uniprot/Q8L500",
           "http://identifiers.org/uniprot/Q93WK5"
  cAn part "http://identifiers.org/uniprot/Q8L500",
           "http://identifiers.org/uniprot/Q93WK5"
  reaction_1 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_0 hypernym "http://identifiers.org/go/GO:0006402"
  reaction_2 hypernym "http://identifiers.org/go/GO:0006412"
  reaction_3 hypernym "http://identifiers.org/go/GO:0000060"
  reaction_4 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_5 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_6 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_7 hypernym "http://identifiers.org/go/GO:0006402"
  reaction_9 hypernym "http://identifiers.org/go/GO:0000060"
  reaction_10 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_11 hypernym "http://identifiers.org/go/GO:0006412"
  reaction_12 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_13 hypernym "http://identifiers.org/go/GO:0000060"
  reaction_14 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_15 hypernym "http://identifiers.org/go/GO:0006412"
  reaction_16 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_17 hypernym "http://identifiers.org/go/GO:0006412"
  reaction_18 hypernym "http://identifiers.org/go/GO:0000060"
  reaction_19 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_20 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_21 hypernym "http://identifiers.org/go/GO:0045727"
  reaction_22 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_23 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_25 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_26 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_27 hypernym "http://identifiers.org/go/GO:0006402"
  reaction_28 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_29 hypernym "http://identifiers.org/go/GO:0006402"
  reaction_30 hypernym "http://identifiers.org/go/GO:0006412"
  reaction_31 hypernym "http://identifiers.org/go/GO:0000060"
  reaction_32 hypernym "http://identifiers.org/go/GO:0045732"
  reaction_32 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_33 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_34 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_38 hypernym "http://identifiers.org/go/GO:0030163"
  reaction_39 hypernym "http://identifiers.org/go/GO:0006351"
  reaction_40 hypernym "http://identifiers.org/go/GO:0006402"
end

MODEL1001130000 is "Adams2012 - Locke2006 Circadian Rhythm model refined with Input Signal Light Function"

MODEL1001130000 model_entity_is "http://identifiers.org/biomodels.db/MODEL1001130000"
MODEL1001130000 model_entity_is "http://identifiers.org/biomodels.db/BIOMD0000000476"
MODEL1001130000 description "http://identifiers.org/pubmed/22855577"
MODEL1001130000 origin "http://identifiers.org/biomodels.db/BIOMD0000000089"
MODEL1001130000 hypernym "http://identifiers.org/go/GO:0042752"
MODEL1001130000 taxon "http://identifiers.org/taxonomy/3702"
