// Created by libAntimony v2.13.0
function GAMMAF(VV, theta, sigma)
  1/(1 + exp(-(VV - theta)/sigma));
end

function ZFUNC(AA, CA, zz)
  1/(1 + AA^zz/CA^zz);
end


model *model_0000001()

  // Compartments and Species:
  compartment compartment_0000001;
  species Ca in compartment_0000001;

  // Assignment Rules:
  INa := gNa*Minfs^pms*hhs*(V - VNa);
  Minfs := GAMMAF(V, thetam, sigmam);
  INaP := gNaP*Pinfs*(V - VNa);
  Pinfs := GAMMAF(V, thetap, sigmap);
  IKdr := gKdr*nns^pns*(V - VK);
  IA := gA*Ainfs^3*bbs*(V - VK);
  Ainfs := GAMMAF(V, thetaa, sigmaa);
  Iz := gZ*zzs*(V - VK);
  ICa := gCa*rrs^2*(V - VCa);
  IKC := gKCa*mKCa*ccs*(V - VK);
  IAHP := gKAHP*qqs*(V - VK);
  mKCa := ZFUNC(ac, Ca, pwrc);

  // Rate Rules:
  hhs' = phi*(GAMMAF(V, thetah, sigmah) - hhs)/(1 + 7.5*GAMMAF(V, t_tauh, -6));
  V' = ((-gL*(V - VL) - INa - INaP - IKdr - IA - Iz - ICa - IKC - IAHP) + Iapp)/Cm;
  nns' = phi*(GAMMAF(V, thetan, sigman) - nns)/(1 + 5*GAMMAF(V, t_taun, -15));
  bbs' = (GAMMAF(V, thetab, sigmab) - bbs)/tauBs;
  zzs' = (GAMMAF(V, thetaz, sigmaz) - zzs)/tauZs;
  rrs' = (GAMMAF(V, thetar, sigmar) - rrs)/tauRs;
  ccs' = (GAMMAF(V, thetac, sigmac) - ccs)/tauKc;
  qqs' = (ZFUNC(aq, Ca, pwrq) - qqs)/tauq;

  // Reactions:
  reaction_0000001:  => Ca; compartment_0000001*(-uuCa*ICa - Ca)/tauCa;

  // Species initializations:
  Ca = 0.000787;

  // Compartment initializations:
  compartment_0000001 = 1;

  // Variable initializations:
  Cm = 1;
  pms = 3;
  pns = 4;
  VNa = 55;
  t_tauh = -40.5;
  t_taun = -27;
  thetaa = -50;
  sigmaa = 20;
  thetab = -80;
  sigmab = -6;
  tauBs = 15;
  sigmam = 9.5;
  sigmah = -7;
  sigman = 10;
  sigmaz = 5;
  gNa = 35;
  gKdr = 6;
  gL = 0.05;
  Iapp = 1;
  gA = 1.4;
  gNaP = 0.2;
  gZ = 1;
  thetaz = -39;
  tauZs = 75;
  phi = 10;
  thetah = -45;
  thetam = -30;
  thetan = -35;
  thetap = -41;
  sigmap = 3;
  VK = -90;
  VL = -70;
  hhs = 0.979199;
  V = -71.962;
  nns = 0.0242166;
  bbs = 0.207565;
  zzs = 0.0013689;
  rrs = 0.005507;
  thetar = -20;
  sigmar = 10;
  tauRs = 1;
  ccs = 0.002486;
  thetac = -30;
  sigmac = 7;
  tauKc = 2;
  qqs = 0;
  aq = 2;
  pwrq = 4;
  tauq = 450;
  VCa = 120;
  pwrc = 1;
  gCa = 0.08;
  gKCa = 10;
  gKAHP = 5;
  ac = 6;
  tauCa = 13;
  uuCa = 0.13;

  // Other declarations:
  var INa, Minfs, hhs, V, INaP, Pinfs, IKdr, nns, IA, Ainfs, bbs, Iz, zzs;
  var ICa, IKC, IAHP, rrs, ccs, qqs, mKCa;
  const compartment_0000001, Cm, pms, pns, VNa, t_tauh, t_taun, thetaa, sigmaa;
  const thetab, sigmab, tauBs, sigmam, sigmah, sigman, sigmaz, gNa, gKdr;
  const gL, Iapp, gA, gNaP, gZ, thetaz, tauZs, phi, thetah, thetam, thetan;
  const thetap, sigmap, VK, VL, thetar, sigmar, tauRs, thetac, sigmac, tauKc;
  const aq, pwrq, tauq, VCa, pwrc, gCa, gKCa, gKAHP, ac, tauCa, uuCa;

  // Unit definitions:
  unit time_unit = 1e-3 second;
  unit mV = 1e-3 volt;

  // Display Names:
  time_unit is "ms";
  V is "VVs";

  // CV terms:
  compartment_0000001 hypernym "http://identifiers.org/obo.go/GO:0005623"
  Ca identity "http://identifiers.org/obo.chebi/CHEBI:29108",
              "http://identifiers.org/kegg.compound/C00076"
end

model_0000001 is "Golomb2006_SomaticBursting_nonzero[Ca]"

model_0000001 model_entity_is "http://identifiers.org/biomodels.db/MODEL1580005336"
model_0000001 model_entity_is "http://identifiers.org/biomodels.db/BIOMD0000000119"
model_0000001 description "http://identifiers.org/pubmed/16807352"
model_0000001 taxon "http://identifiers.org/taxonomy/10114"
model_0000001 hypernym "http://identifiers.org/obo.go/GO:0019227",
                       "http://identifiers.org/obo.go/GO:0005248",
                       "http://identifiers.org/obo.go/GO:0005249"
