// Created by libAntimony v2.13.0
model *Fridlyand2003_Ca_flux_pancreatic_cells()

  // Compartments and Species:
  compartment Cytoplasm, ER;
  species Ca_cyt in Cytoplasm, Ca_er in ER, IP3_cyt in Cytoplasm, Na_cyt in Cytoplasm;
  species ATP_cyt in Cytoplasm, $ADP_cyt in Cytoplasm;

  // Assignment Rules:
  ADP_cyt := 4000 - ATP_cyt;
  n_infinity := 1/(1 + exp((Vn - V)/Sn));
  tau_n := c/(exp((V - Vtau)/a) + exp((Vtau - V)/b));
  I_Vca := gmvca*pvca*(V - Vca);
  I_CaPump := Pmcap*Ca_cyt^2/(Kcap^2 + Ca_cyt^2);
  I_NaCa := gnaca*Ca_cyt^5*(V - Vnaca)/(Ca_cyt^5 + Knaca^5);
  I_CRAN := f_CRAN*p_CRAN*(V - Vna);
  I_Na := gmna*pna*(V - Vna);
  I_NaK := Pnak*(F1*f_2*f_3*F4*F5*f_6 - b_1*B2*B3*B4*b_5*B6)/D;
  I_KDr := gmKDr*n*(V - Vk);
  I_KCa := gmkca*f_Ca*(V - Vk);
  I_KATP := gmkatp*Okatp*(V - Vk);
  Vca := (TV/2)*ln(Ca_ec/Ca_cyt);
  Vk := TV*ln(K_ec/K_cyt);
  Vna := TV*ln(Na_ec/Na_cyt);
  Vnaca := TV*(3*ln(Na_ec/Na_cyt) - ln(Ca_ec/Ca_cyt));
  pvca := 1/(1 + exp((Vcah - V)/Kcah));
  f_CRAN := -gm_CRAN/(1 + exp((Ca_er - Kcar)/3));
  p_CRAN := V - V_CRAN;
  pna := 1/(1 + exp((104 + V)/8));
  f_5 := f5_ast*exp(V/(2*TV));
  b_5 := b5_ast*exp(-V/(2*TV));
  F1 := f_1*Na_cyt^3;
  F4 := f_4*K_ec^2;
  F5 := f_5*ATP_cyt;
  B2 := b_2*ADP_cyt;
  B3 := b_3*Na_ec^3;
  B4 := b_4*P;
  B6 := b_6*Ksup^2;
  D := f_2*f_3*F4*F5*f_6 + b_1*f_3*F4*F5*f_6 + b_1*B2*F4*F5*f_6 + b_1*B2*B3*F5*f_6 + b_1*B2*B3*B4*f_6 + b_1*B2*B3*B4*b_5;
  f_Ca := Ca_cyt^4/(Ca_cyt^4 + Kkca^4);
  Okatp := (0.08*(1 + 0.33*(ADP_cyt/Kdd)) + 0.89*(0.165*(ADP_cyt/Kdd))^2)/((1 + 0.165*(ADP_cyt/Kdd))^2*(1 + 0.135*(ADP_cyt/Ktd) + 0.05*(ATP_cyt/Ktt)));
  Jerp := Pcaer*Ca_cyt^2/(Ca_cyt^2 + Kcarp^2);
  O_infinity := Ca_cyt*IP3_cyt^3/((Ca_cyt + Krca)*(IP3_cyt^3 + Kip3^3));
  Jout := (Pleak + Pip3*O_infinity)*(Ca_er - Ca_cyt);

  // Rate Rules:
  n' = (n_infinity - n)/tau_n;
  V' = (0 - (I_Vca + I_CaPump + I_NaCa + I_CRAN + I_Na + I_NaK + I_KDr + I_KCa + I_KATP))/Cm;

  // Reactions:
  Calcium_cyt_Ivca:  => Ca_cyt; fi*-I_Vca/(2*F);
  Calcium_cyt_Inaca:  => Ca_cyt; fi*2*I_NaCa/(2*F);
  Calcium_cyt_Icapump: Ca_cyt => ; fi*2*I_CaPump/(2*F);
  Calcium_cyt_Jerp: 0.01 Ca_cyt => 0.03 Ca_er; Cytoplasm*Jerp;
  Calcium_cyt_Jout: 0.03 Ca_er => 0.01 Ca_cyt; Jout;
  Calcium_cyt_sequestration: Ca_cyt => ; Cytoplasm*ksg*Ca_cyt;
  IP3_synthesis:  => IP3_cyt; Cytoplasm*kip*Ca_cyt^2/(Ca_cyt^2 + Kipca^2);
  IP3_degradation: IP3_cyt => ; Cytoplasm*kdip*IP3_cyt;
  Na_Inaca: Na_cyt => ; 3*I_NaCa/F;
  Na_Inak: Na_cyt => ; 3*I_NaK/F;
  Na_Ina:  => Na_cyt; -I_Na/F;
  Na_Icran:  => Na_cyt; -I_CRAN/F;
  ATP_production:  => ATP_cyt; Cytoplasm*kadp*ADP_cyt;
  ATP_NaKATPase: ATP_cyt => ; I_NaK/F;
  ATP_Capump: ATP_cyt => ; I_CaPump/F;
  ATP_Jerp: ATP_cyt => ; Cytoplasm*Jerp/2;
  ATP_Ca_dependent_consumption: ATP_cyt => ; Cytoplasm*katpca*Ca_cyt*ATP_cyt;
  ATP_consumption: ATP_cyt => ; Cytoplasm*katp*ATP_cyt;

  // Species initializations:
  Ca_cyt = 0.085;
  Ca_er = 22.8;
  IP3_cyt = 0.33;
  Na_cyt = 9858;
  ATP_cyt = 932.1;

  // Compartment initializations:
  Cytoplasm = 7.64e-13;
  ER = 2.8e-13;

  // Variable initializations:
  n = 0.00123;
  n_infinity has dimensionless;
  tau_n has time_unit;
  V = -60.9;
  V has millivolt;
  I_Vca has femtoampere;
  I_CaPump has femtoampere;
  I_NaCa has femtoampere;
  I_CRAN has femtoampere;
  I_Na has femtoampere;
  I_NaK has femtoampere;
  I_KDr has femtoampere;
  I_KCa has femtoampere;
  I_KATP has femtoampere;
  Cm = 6158;
  Cm has femtofarad;
  Vca has millivolt;
  TV = 26.73;
  TV has millivolt;
  Ca_ec = 2600;
  Ca_ec has micromole_per_litre;
  Vk has millivolt;
  K_ec = 8000;
  K_ec has micromole_per_litre;
  K_cyt = 132400;
  K_cyt has micromole_per_litre;
  Vna has millivolt;
  Na_ec = 140000;
  Na_ec has micromole_per_litre;
  Vnaca has millivolt;
  Vcah = -19;
  Vcah has millivolt;
  Kcah = 9.5;
  Kcah has millivolt;
  gm_CRAN = 0.7;
  gm_CRAN has picosiemens_per_millivolt;
  Kcar = 200;
  Kcar has micromole_per_litre;
  p_CRAN has millivolt;
  V_CRAN = 0;
  V_CRAN has millivolt;
  pna has dimensionless;
  f5_ast = 0.002;
  f5_ast has per_microM_per_millisecond;
  b5_ast = 0.03;
  b5_ast has per_millisecond;
  f_1 = 2.5e-10;
  f_1 has per_microMcube_per_millisecond;
  f_4 = 1.5e-08;
  f_4 has per_microMsquare_per_millisecond;
  b_2 = 0.0001;
  b_2 has per_microM_per_millisecond;
  b_3 = 1.72e-17;
  b_3 has per_microMcube_per_millisecond;
  b_4 = 0.0002;
  b_4 has per_microM_per_millisecond;
  P = 4950;
  P has micromole_per_litre;
  b_6 = 6e-07;
  b_6 has per_microM_per_millisecond;
  Ksup = 150400;
  Ksup has micromole_per_litre;
  f_2 = 10;
  f_2 has per_millisecond;
  f_3 = 0.172;
  f_3 has per_millisecond;
  f_6 = 11.5;
  f_6 has per_millisecond;
  b_1 = 100;
  b_1 has per_millisecond;
  f_Ca has dimensionless;
  Kkca = 0.1;
  Kkca has micromole_per_litre;
  Okatp has dimensionless;
  Kdd = 17;
  Kdd has micromole_per_litre;
  Ktd = 26;
  Ktd has micromole_per_litre;
  Ktt = 1;
  Ktt has micromole_per_litre;
  Vn = -14;
  Vn has millivolt;
  Sn = 7;
  Sn has millivolt;
  c = 20;
  c has time_unit;
  Vtau = -75;
  Vtau has millivolt;
  a = 65;
  a has millivolt;
  b = 20;
  b has millivolt;
  gmvca = 770;
  gmvca has picosiemens;
  Pmcap = 2000;
  Pmcap has femtoampere;
  Kcap = 0.1;
  Kcap has micromole_per_litre;
  gnaca = 271;
  gnaca has picosiemens;
  Knaca = 0.75;
  Knaca has micromole_per_litre;
  gmna = 1200;
  gmna has picosiemens;
  Pnak = 600;
  Pnak has femtoampere;
  gmKDr = 3000;
  gmKDr has picosiemens;
  gmkca = 130;
  gmkca has picosiemens;
  gmkatp = 24000;
  gmkatp has picosiemens;
  Jerp has microM_per_millisecond;
  Pcaer = 0.105;
  Pcaer has microM_per_millisecond;
  Kcarp = 0.5;
  Kcarp has micromole_per_litre;
  O_infinity has dimensionless;
  Krca = 0.077;
  Krca has micromole_per_litre;
  Kip3 = 3.2;
  Kip3 has micromole_per_litre;
  Jout has micromole_per_millisecond;
  Pleak = 1e-16;
  Pleak has litres_per_millisecond;
  Pip3 = 1.2e-15;
  Pip3 has litres_per_millisecond;
  fi = 0.01;
  fi has dimensionless;
  F = 9.6485e+16;
  F has fA_msec_per_micromole;
  ksg = 0.0001;
  ksg has per_millisecond;
  fer = 0.03;
  fer has dimensionless;
  kip = 0.0003;
  kip has microM_per_millisecond;
  Kipca = 0.4;
  Kipca has micromole_per_litre;
  kdip = 4e-05;
  kdip has per_millisecond;
  kadp = 0.00037;
  kadp has per_millisecond;
  katpca = 5e-05;
  katpca has per_microM_per_millisecond;
  katp = 5e-05;
  katp has per_millisecond;

  // Other declarations:
  var n, n_infinity, tau_n, V, I_Vca, I_CaPump, I_NaCa, I_CRAN, I_Na, I_NaK;
  var I_KDr, I_KCa, I_KATP, Vca, Vk, Vna, Vnaca, pvca, f_CRAN, p_CRAN, pna;
  var f_5, b_5, F1, F4, F5, B2, B3, B4, B6, D, f_Ca, Okatp, Jerp, Pcaer, O_infinity;
  var Jout;
  const Cytoplasm, ER, Cm, TV, Ca_ec, K_ec, K_cyt, Na_ec, Vcah, Kcah, gm_CRAN;
  const Kcar, V_CRAN, f5_ast, b5_ast, f_1, f_4, b_2, b_3, b_4, P, b_6, Ksup;
  const f_2, f_3, f_6, b_1, Kkca, Kdd, Ktd, Ktt, Vn, Sn, c, Vtau, a, b, gmvca;
  const Pmcap, Kcap, gnaca, Knaca, gmna, Pnak, gmKDr, gmkca, gmkatp, Kcarp;
  const Krca, Kip3, Pleak, Pip3, fi, F, ksg, fer, kip, Kipca, kdip, kadp;
  const katpca, katp;

  // Unit definitions:
  unit substance = 1e-6 mole;
  unit time_unit = 1e-3 second;
  unit millivolt = 1e-3 volt;
  unit femtoampere = 1e-15 ampere;
  unit micromole_per_litre = 1e-6 mole / litre;
  unit picosiemens = 1e-12 siemens;
  unit femtofarad = 1e-15 farad;
  unit per_millisecond = 1 / 1e-3 second;
  unit picosiemens_per_millivolt = 1e-12 siemens / 1e-3 volt;
  unit micromole_per_millisecond = 1e-6 mole / 1e-3 second;
  unit microM_per_millisecond = 1e-6 mole / (1e-3 second * litre);
  unit litres_per_millisecond = litre / 1e-3 second;
  unit per_microM_per_millisecond = litre / (1e-6 mole * 1e-3 second);
  unit per_microMcube_per_millisecond = litre^3 / ((1e-6 mole)^3 * 1e-3 second);
  unit per_microMsquare_per_millisecond = litre^2 / ((1e-6 mole)^2 * 1e-3 second);
  unit per_microM = litre / 1e-6 mole;
  unit fA_msec_per_micromole = 1e-15 ampere * 1e-3 second / 1e-6 mole;

  // Display Names:
  substance is "Micromole";
  time_unit is "milliseconds";
  millivolt is "Voltage";
  femtoampere is "Current";
  micromole_per_litre is "Concentration";
  picosiemens is "Conductance";
  femtofarad is "Capacitance";
  per_millisecond is "Time inverse";
  picosiemens_per_millivolt is "Conductance coefficient";
  micromole_per_millisecond is "amount per time";
  microM_per_millisecond is "concentration per time";
  litres_per_millisecond is "volume per time";
  per_microM_per_millisecond is "per concentration per time";
  per_microMcube_per_millisecond is "per concentration cubed per time";
  per_microMsquare_per_millisecond is "per Concentration square per time";
  per_microM is "per concentration";
  fA_msec_per_micromole is "Faraday constant";
  Cytoplasm is "cytoplasm";
  ER is "endoplasmic reticulum";
  Ca_cyt is "Cytosolic Calcium";
  Ca_er is "ER Calcium";
  IP3_cyt is "Cytosolic IP3";
  Na_cyt is "Cytosolic Sodium";
  ATP_cyt is "Cytosolic ATP";
  ADP_cyt is "Cytosolic ADP";
  F is "Faraday's constant";
  kip is "IP3 production rate constant";
  Kipca is "half activation cytosolic Ca";
  kdip is "IP3 degradation rate constant";
  kadp is "ATP production rate constant";
  katpca is "Ca dependent ATP consumption";
  katp is "Rate constant of ATP consumption";

  // CV terms:
  Cytoplasm identity "http://identifiers.org/go/GO:0005737"
  ER identity "http://identifiers.org/go/GO:0005783"
  Ca_cyt identity "http://identifiers.org/chebi/CHEBI:29108",
                  "http://identifiers.org/kegg.compound/C00076"
  Ca_er identity "http://identifiers.org/chebi/CHEBI:29108",
                 "http://identifiers.org/kegg.compound/C00076"
  IP3_cyt identity "http://identifiers.org/chebi/CHEBI:16595",
                   "http://identifiers.org/kegg.compound/C01245"
  Na_cyt identity "http://identifiers.org/chebi/CHEBI:29101",
                  "http://identifiers.org/kegg.compound/C01330"
  ATP_cyt identity "http://identifiers.org/chebi/CHEBI:15422",
                   "http://identifiers.org/kegg.compound/C00002"
  ADP_cyt identity "http://identifiers.org/chebi/CHEBI:16761",
                   "http://identifiers.org/kegg.compound/C00008"
  Calcium_cyt_Ivca hypernym "http://identifiers.org/go/GO:0005245"
  Calcium_cyt_Inaca hypernym "http://identifiers.org/go/GO:0005432"
  Calcium_cyt_Icapump identity "http://identifiers.org/ec-code/3.6.3.8"
  Calcium_cyt_Icapump part "http://identifiers.org/go/GO:0005388",
                           "http://identifiers.org/go/GO:0005524"
  Calcium_cyt_Jerp identity "http://identifiers.org/ec-code/3.6.3.8"
  Calcium_cyt_Jerp part "http://identifiers.org/go/GO:0005388",
                        "http://identifiers.org/go/GO:0005524"
  Calcium_cyt_Jout part "http://identifiers.org/go/GO:0007204",
                        "http://identifiers.org/go/GO:0005220"
  Calcium_cyt_sequestration identity "http://identifiers.org/go/GO:0051208"
  IP3_synthesis identity "http://identifiers.org/ec-code/3.1.4.11",
                         "http://identifiers.org/go/GO:0004435"
  Na_Inaca identity "http://identifiers.org/go/GO:0005432"
  Na_Inak identity "http://identifiers.org/ec-code/3.6.3.9",
                   "http://identifiers.org/go/GO:0005391"
  Na_Ina hypernym "http://identifiers.org/go/GO:0005248"
  Na_Icran hypernym "http://identifiers.org/go/GO:0005227"
  ATP_production identity "http://identifiers.org/go/GO:0006754"
  ATP_NaKATPase identity "http://identifiers.org/ec-code/3.6.3.9",
                         "http://identifiers.org/go/GO:0005391"
  ATP_Capump identity "http://identifiers.org/ec-code/3.6.3.8",
                      "http://identifiers.org/go/GO:0005388"
  ATP_Jerp identity "http://identifiers.org/ec-code/3.6.3.8",
                    "http://identifiers.org/go/GO:0005388"
  ATP_Ca_dependent_consumption identity "http://identifiers.org/go/GO:0030899"
  ATP_consumption identity "http://identifiers.org/go/GO:0006200"
end

Fridlyand2003_Ca_flux_pancreatic_cells is "Fridlyand2003_Calcium_flux"

Fridlyand2003_Ca_flux_pancreatic_cells model_entity_is "http://identifiers.org/biomodels.db/MODEL0928773489"
Fridlyand2003_Ca_flux_pancreatic_cells model_entity_is "http://identifiers.org/biomodels.db/BIOMD0000000059"
Fridlyand2003_Ca_flux_pancreatic_cells description "http://identifiers.org/pubmed/12644446"
Fridlyand2003_Ca_flux_pancreatic_cells taxon "http://identifiers.org/taxonomy/10090"
Fridlyand2003_Ca_flux_pancreatic_cells identity "http://identifiers.org/kegg.pathway/map04020"
Fridlyand2003_Ca_flux_pancreatic_cells part "http://identifiers.org/go/GO:0050848",
                                            "http://identifiers.org/go/GO:0050796"
Fridlyand2003_Ca_flux_pancreatic_cells container "http://identifiers.org/bto/BTO:0000783"
