; MbT-tool - Metabolism-based on Thermodynamics by Araujo P., Gras A. and Ginovart M. - 2016 extensions [matrix sound] globals [reactions rd ra rd1 rd2 molecular-weight e-eeq/mol dGpc gamma_cells b-biomass carbon hydrogen oxygen nitrogen b-co2 b-hco3 b-nh4 b-bio b-h2o b-no3- b-no2- b-n2 b-H+ dGp n m dGr A fs fe yc/c to-print gamma_donor reaction energy_reaction synthesis_reaction dGfa dGs p c c2 y_grams_cells/mol_donor y_mol_C_cell/mol_donor row_matrix column_matrix e_d1 e_d2 x_d1 x_d2] to calculate clear-all if Electron_donor = "--- Organic Reactions ---" or Electron_donor = "--- Inorganic Reactions ---" [output-type "Please, select a valid primary electron donor" error-sound stop] if Electron_donor_2 = "--- Organic Reactions ---" and second_electron_donor? = true or Electron_donor_2 = "--- Inorganic Reactions ---" and second_electron_donor? = true [output-type "Please, select a valid second electron donor" error-sound stop] if Electron_acceptor = "--- Organic Reactions ---" or Electron_acceptor = "--- Inorganic Reactions ---" [output-type "Please, select a valid electron acceptor" error-sound stop] if Electron_donor = Electron_acceptor [output-type "It is not possible that the electron donor is equal to the electron acceptor " error-sound stop] setup-reactions setup-electron-donor setup-electron-acceptor setup-microorganism let check (matrix:get ra 0 25) - (matrix:get rd 0 25) if check = 0 [output-type "It is not possible that the electron donor is equal to the electron acceptor " error-sound stop] setup-thermodynamic if fs <= 0 or fe <= 0 [output-print "With this combination of electron-donor and electron acceptor, is not possible write a global reaction" output-print "Please select another combination or change the efficiency value" error-sound stop] setup-reaction yield-prediction setup-output end to error-sound sound:play-note "TRUMPET" 60 64 0.5 end to setup-thermodynamic if Thermodynamics = "TEEM_1" [ set dGp 35.09 - (matrix:get rd 0 25) ifelse dGp > 0 [set n 1][set n -1] set dGr (matrix:get ra 0 25) - (matrix:get rd 0 25) set A -1 * (((dGp / (efficiency ^ n))+(matrix:get b-biomass 0 25 / efficiency))/(efficiency * dGr)) set fs (1 / (1 + A)) set fe (A / (1 + A)) ] if Thermodynamics = "TEEM_2" [ set dGp 30.09 - (matrix:get rd 0 25) ifelse dGp > 0 [set n 1][set n -1] ifelse Electron_donor = "Methane" or Electron_donor = "Methanol" or Electron_donor = "Formate" [set dGfa 46.53][set dGfa 0] ifelse dGfa > 0 [set m 1][set m n] set p abs (1 / (matrix:get rd 0 c)) set dGr (matrix:get ra 0 25) - (matrix:get rd 0 25) - (q / p)* (-219.2) set dGs ((dGfa - (matrix:get rd 0 25)) / (efficiency ^ m)) + ((30.9 - dGfa)/(efficiency ^ n)) + (matrix:get b-biomass 0 25 / efficiency) set A -1 * dGs / (efficiency * dGr) set fs (1 / (1 + A)) set fe (A / (1 + A)) ] end to yield-prediction set y_grams_cells/mol_donor abs(((matrix:get reaction 0 6) * molecular-weight) / (matrix:get reaction 0 c)) let g_donor (matrix:get rd 0 3 + matrix:get rd 0 5) ifelse g_donor <= 0 [ ][set gamma_donor 1 / g_donor set yc/c (gamma_donor / gamma_cells) * fs] set y_mol_C_cell/mol_donor abs(((matrix:get reaction 0 6) * carbon) / (matrix:get reaction 0 c)) end to setup-reaction set energy_reaction ra matrix:- rd set synthesis_reaction b-biomass matrix:- rd set reaction ((fe matrix:* ra) matrix:+ (fs matrix:* b-biomass) matrix:- (rd)) end to setup-microorganism set b-biomass matrix:make-constant 1 column_matrix 0 if Microorganism = "C(n)H(a)O(b)N(c) - Bacteria, Generic" [set carbon c-carbon set hydrogen c-hydrogen set oxygen c-oxygen set nitrogen c-nitrogen] if Microorganism = "C4.17H8O1.75N - Bacteria, Undefined" [set carbon 4.17 set hydrogen 8 set oxygen 1.75 set nitrogen 1] if Microorganism = "C5H9O2.5N - Agrobacterium tumefaciens, succinate" [set carbon 5 set hydrogen 9 set oxygen 2.5 set nitrogen 1] if Microorganism = "C4H7.2O1.93N - Paracoccus denitrificans, succinate" [set carbon 4 set hydrogen 7.2 set oxygen 1.93 set nitrogen 1] if Microorganism = "C3.85H6.69O1.78N - Escherichia coli, glucose" [set carbon 3.85 set hydrogen 6.69 set oxygen 1.78 set nitrogen 1] if Microorganism = "C4.16H8O1.25N - Escherichia coli, undefined" [set carbon 4.16 set hydrogen 8 set oxygen 1.25 set nitrogen 1] if Microorganism = "C4.17H7.21O1.79N - Klebsiella aerogenes, Glycerol, u=0.85 h-1" [set carbon 4.17 set hydrogen 7.21 set oxygen 1.79 set nitrogen 1] if Microorganism = "C4.54H7.91O1.95N - Klebsiella aerogenes, Glycerol, u=0.1 h-1" [set carbon 4.54 set hydrogen 7.91 set oxygen 1.95 set nitrogen 1] if Microorganism = "C4.17H7.42O1.38N - Aerobacter aerogenes, undefined" [set carbon 4.17 set hydrogen 7.42 set oxygen 1.83 set nitrogen 1] if Microorganism = "C4H8O2N - Bacteria, Undefined" [set carbon 4 set hydrogen 8 set oxygen 2 set nitrogen 1] if Microorganism = "C5H8.33O0.81N - Bacteria, Undefined" [set carbon 5 set hydrogen 8.33 set oxygen 0.81 set nitrogen 1] if Microorganism = "C5H8O2N - Bacteria, acetate, aerobic" [set carbon 5 set hydrogen 8 set oxygen 2 set nitrogen 1] if Microorganism = "C5.3H9.1O2.5N - Stahrch, Methanogenic" [set carbon 5.3 set hydrogen 9.1 set oxygen 2.5 set nitrogen 1] if Microorganism = "C5.1H8.5O2.5N - Glucose, Methanogenic" [set carbon 5.1 set hydrogen 8.5 set oxygen 2.5 set nitrogen 1] if Microorganism = "C4.1H6.8O2.2N - Nutrient Broth, Methanogenic" [set carbon 4.1 set hydrogen 6.8 set oxygen 2.2 set nitrogen 1] if Microorganism = "C5H8.8O3.2N - Leucine, Methanogenic" [set carbon 5 set hydrogen 8.8 set oxygen 3.2 set nitrogen 1] if Microorganism = "C4.9H9O3N - Glycine, Methanogenic" [set carbon 4.9 set hydrogen 9 set oxygen 3 set nitrogen 1] if Microorganism = "C4.7H7.7O2.1N - Octanoate, Methanogenic" [set carbon 4.7 set hydrogen 7.7 set oxygen 2.1 set nitrogen 1] if Microorganism = "C4.9H9.4O2.9N - Acetate, Methanogenic" [set carbon 4.9 set hydrogen 9.4 set oxygen 2.9 set nitrogen 1] if Microorganism = "C9H16O5N - Acetate, Nitrite N source aerobic" [set carbon 9 set hydrogen 16 set oxygen 5 set nitrogen 1] if Microorganism = "C9H15O5N - Acetate, Nitrate N source aerobic" [set carbon 9 set hydrogen 15 set oxygen 5 set nitrogen 1] if Microorganism = "C7H12O4N - Acetate, Ammomia N source aerobic" [set carbon 7 set hydrogen 12 set oxygen 4 set nitrogen 1] if Microorganism = "C5H7O2N - Casein, aerobic" [set carbon 5 set hydrogen 7 set oxygen 2 set nitrogen 1] if Microorganism = "C6.33H10.21O3.53N - Saccharomyces cerevisiae, glucose" [set carbon 6.33 set hydrogen 10.21 set oxygen 3.53 set nitrogen 1] set molecular-weight 12.011 * carbon + 1.008 * hydrogen + 16 * oxygen + 14 * nitrogen if N-Source = "NH4+" [ set e-eeq/mol (4 * carbon + hydrogen - 2 * oxygen - 3 * nitrogen) set b-co2 ((carbon - nitrogen) / e-eeq/mol) set b-hco3 (nitrogen / e-eeq/mol) set b-nh4 (nitrogen / e-eeq/mol) set b-H+ (1) set b-bio (1 / e-eeq/mol) set b-h2o ((2 * carbon - oxygen + nitrogen) / e-eeq/mol) set dGpc (3.324 * molecular-weight / e-eeq/mol) set gamma_cells e-eeq/mol / carbon ] if N-Source = "NO3-" [ set e-eeq/mol (4 * carbon + hydrogen - 2 * oxygen + 5 * nitrogen) set b-co2 (carbon / e-eeq/mol) set b-no3- (nitrogen / e-eeq/mol) set b-H+ ((4 * carbon + hydrogen - 2 * oxygen + 6 * nitrogen) / e-eeq/mol) set b-bio (1 / e-eeq/mol) set b-h2o ((3 * nitrogen + 2 * carbon - oxygen) / e-eeq/mol) set dGpc (3.341 * molecular-weight / e-eeq/mol) set gamma_cells e-eeq/mol / carbon ] if N-Source = "NO2-" [ set e-eeq/mol (4 * carbon + hydrogen - 2 * oxygen + 3 * nitrogen) set b-co2 (carbon / e-eeq/mol) set b-no2- (nitrogen / e-eeq/mol) set b-H+ ((4 * carbon + hydrogen - 2 * oxygen + 4 * nitrogen) / e-eeq/mol) set b-bio (1 / e-eeq/mol) set b-h2o ((2 * nitrogen + 2 * carbon - oxygen) / e-eeq/mol) set dGpc (3.333 * molecular-weight / e-eeq/mol) set gamma_cells e-eeq/mol / carbon ] if N-Source = "N2" [ set e-eeq/mol (4 * carbon + hydrogen - 2 * oxygen) set b-co2 (carbon / e-eeq/mol) set b-n2 (nitrogen / (2 * e-eeq/mol)) set b-H+ (1) set b-bio (1 / e-eeq/mol) set b-h2o ((2 * carbon - oxygen) / e-eeq/mol) set dGpc (3.334 * molecular-weight / e-eeq/mol) set gamma_cells e-eeq/mol / carbon ] matrix:set b-biomass 0 13 (b-n2) matrix:set b-biomass 0 9 (b-no3-) matrix:set b-biomass 0 10 (b-no2-) matrix:set b-biomass 0 1 (b-H+) matrix:set b-biomass 0 2 (1) matrix:set b-biomass 0 3 (b-co2) matrix:set b-biomass 0 4 (b-nh4) matrix:set b-biomass 0 5 (b-hco3) matrix:set b-biomass 0 6 (-1 * b-bio) matrix:set b-biomass 0 7 (-1 * b-h2o) matrix:set b-biomass 0 25 (dGpc) end to setup-electron-donor if Electron_donor = "H2O -> O2" [set rd1 matrix:submatrix reactions 0 0 1 column_matrix set c 7] if Electron_donor = "(S2O3)2- -> (SO4)2-" [set rd1 matrix:submatrix reactions 1 0 2 column_matrix set c 21] if Electron_donor = "S -> (SO4)2-" [set rd1 matrix:submatrix reactions 2 0 3 column_matrix set c 22] if Electron_donor = "(SO3)2- -> (SO4)2-" [set rd1 matrix:submatrix reactions 3 0 4 column_matrix set c 18] if Electron_donor = "H2S + HS- -> (SO3)2-" [set rd1 matrix:submatrix reactions 4 0 5 column_matrix set c 19] if Electron_donor = "H2S + HS- -> (SO4)2-" [set rd1 matrix:submatrix reactions 5 0 6 column_matrix set c 19] if Electron_donor = "N2 -> N2O" [set rd1 matrix:submatrix reactions 6 0 7 column_matrix set c 13] if Electron_donor = "N2O -> NO" [set rd1 matrix:submatrix reactions 7 0 8 column_matrix set c 12] if Electron_donor = "N2 -> NO2-" [set rd1 matrix:submatrix reactions 8 0 9 column_matrix set c 13] if Electron_donor = "NO -> NO2-" [set rd1 matrix:submatrix reactions 9 0 10 column_matrix set c 11] if Electron_donor = "N2 -> NO3-" [set rd1 matrix:submatrix reactions 10 0 11 column_matrix set c 13] if Electron_donor = "NO + N2O -> NO3-" [set rd1 matrix:submatrix reactions 11 0 12 column_matrix set c 12] if Electron_donor = "N2O -> NO3-" [set rd1 matrix:submatrix reactions 12 0 13 column_matrix set c 12] if Electron_donor = "NO -> NO3-" [set rd1 matrix:submatrix reactions 13 0 14 column_matrix set c 11] if Electron_donor = "NO2- -> NO3-" [set rd1 matrix:submatrix reactions 14 0 15 column_matrix set c 10] if Electron_donor = "H2 -> H+" [set rd1 matrix:submatrix reactions 15 0 16 column_matrix set c 14] if Electron_donor = "Fe2+ -> Fe3+" [set rd1 matrix:submatrix reactions 16 0 17 column_matrix set c 16] if Electron_donor = "NH4+ -> N2" [set rd1 matrix:submatrix reactions 17 0 18 column_matrix set c 4] if Electron_donor = "NH4+ -> NO3-" [set rd1 matrix:submatrix reactions 18 0 19 column_matrix set c 4] if Electron_donor = "NH4+ -> NO2-" [set rd1 matrix:submatrix reactions 19 0 20 column_matrix set c 4] if Electron_donor = "Acetate" [set rd1 matrix:submatrix reactions 20 0 21 column_matrix set c 8] if Electron_donor = "Alanine" [set rd1 matrix:submatrix reactions 21 0 22 column_matrix set c 23] if Electron_donor = "Benzoate" [set rd1 matrix:submatrix reactions 22 0 23 column_matrix set c 24] if Electron_donor = "Citrate" [set rd1 matrix:submatrix reactions 23 0 24 column_matrix set c 26] if Electron_donor = "Ethanol" [set rd1 matrix:submatrix reactions 24 0 25 column_matrix set c 27] if Electron_donor = "Formate" [set rd1 matrix:submatrix reactions 25 0 26 column_matrix set c 28] if Electron_donor = "Glucose" [set rd1 matrix:submatrix reactions 26 0 27 column_matrix set c 29] if Electron_donor = "Glutamate" [set rd1 matrix:submatrix reactions 27 0 28 column_matrix set c 30] if Electron_donor = "Glycerol" [set rd1 matrix:submatrix reactions 28 0 29 column_matrix set c 31] if Electron_donor = "Glycine" [set rd1 matrix:submatrix reactions 29 0 30 column_matrix set c 32] if Electron_donor = "Lactate" [set rd1 matrix:submatrix reactions 30 0 31 column_matrix set c 33] if Electron_donor = "Methane" [set rd1 matrix:submatrix reactions 31 0 32 column_matrix set c 34] if Electron_donor = "Methanol" [set rd1 matrix:submatrix reactions 32 0 33 column_matrix set c 35] if Electron_donor = "Palmitate" [set rd1 matrix:submatrix reactions 33 0 34 column_matrix set c 36] if Electron_donor = "Propionate" [set rd1 matrix:submatrix reactions 34 0 35 column_matrix set c 37] if Electron_donor = "Pyruvate" [set rd1 matrix:submatrix reactions 35 0 36 column_matrix set c 38] if Electron_donor = "Succinate" [set rd1 matrix:submatrix reactions 36 0 37 column_matrix set c 39] if Electron_donor = "NTA - Acid nitrilotriacetic" [set rd1 matrix:submatrix reactions 37 0 38 column_matrix set c 40] ifelse second_electron_donor? = true [ if Electron_donor_2 = "H2O -> O2" [set rd2 matrix:submatrix reactions 0 0 1 column_matrix set c2 7] if Electron_donor_2 = "(S2O3)2- -> (SO4)2-" [set rd2 matrix:submatrix reactions 1 0 2 column_matrix set c2 21] if Electron_donor_2 = "S -> (SO4)2-" [set rd2 matrix:submatrix reactions 2 0 3 column_matrix set c2 22] if Electron_donor_2 = "(SO3)2- -> (SO4)2-" [set rd2 matrix:submatrix reactions 3 0 4 column_matrix set c2 18] if Electron_donor_2 = "H2S + HS- -> (SO3)2-" [set rd2 matrix:submatrix reactions 4 0 5 column_matrix set c2 19] if Electron_donor_2 = "H2S + HS- -> (SO4)2-" [set rd2 matrix:submatrix reactions 5 0 6 column_matrix set c2 19] if Electron_donor_2 = "N2 -> N2O" [set rd2 matrix:submatrix reactions 6 0 7 column_matrix set c2 13] if Electron_donor_2 = "N2O -> NO" [set rd2 matrix:submatrix reactions 7 0 8 column_matrix set c2 12] if Electron_donor_2 = "N2 -> NO2-" [set rd2 matrix:submatrix reactions 8 0 9 column_matrix set c2 13] if Electron_donor_2 = "NO -> NO2-" [set rd2 matrix:submatrix reactions 9 0 10 column_matrix set c2 11] if Electron_donor_2 = "N2 -> NO3-" [set rd2 matrix:submatrix reactions 10 0 11 column_matrix set c2 13] if Electron_donor_2 = "NO + N2O -> NO3-" [set rd2 matrix:submatrix reactions 11 0 12 column_matrix set c2 12] if Electron_donor_2 = "N2O -> NO3-" [set rd2 matrix:submatrix reactions 12 0 13 column_matrix set c2 12] if Electron_donor_2 = "NO -> NO3-" [set rd2 matrix:submatrix reactions 13 0 14 column_matrix set c2 11] if Electron_donor_2 = "NO2- -> NO3-" [set rd2 matrix:submatrix reactions 14 0 15 column_matrix set c2 10] if Electron_donor_2 = "H2 -> H+" [set rd2 matrix:submatrix reactions 15 0 16 column_matrix set c2 14] if Electron_donor_2 = "Fe2+ -> Fe3+" [set rd2 matrix:submatrix reactions 16 0 17 column_matrix set c2 16] if Electron_donor_2 = "NH4+ -> N2" [set rd2 matrix:submatrix reactions 17 0 18 column_matrix set c2 4] if Electron_donor_2 = "NH4+ -> NO3-" [set rd2 matrix:submatrix reactions 18 0 19 column_matrix set c2 4] if Electron_donor_2 = "NH4+ -> NO2-" [set rd2 matrix:submatrix reactions 19 0 20 column_matrix set c2 4] if Electron_donor_2 = "Acetate" [set rd2 matrix:submatrix reactions 20 0 21 column_matrix set c2 8] if Electron_donor_2 = "Alanine" [set rd2 matrix:submatrix reactions 21 0 22 column_matrix set c2 23] if Electron_donor_2 = "Benzoate" [set rd2 matrix:submatrix reactions 22 0 23 column_matrix set c2 24] if Electron_donor_2 = "Citrate" [set rd2 matrix:submatrix reactions 23 0 24 column_matrix set c2 26] if Electron_donor_2 = "Ethanol" [set rd2 matrix:submatrix reactions 24 0 25 column_matrix set c2 27] if Electron_donor_2 = "Formate" [set rd2 matrix:submatrix reactions 25 0 26 column_matrix set c2 28] if Electron_donor_2 = "Glucose" [set rd2 matrix:submatrix reactions 26 0 27 column_matrix set c2 29] if Electron_donor_2 = "Glutamate" [set rd2 matrix:submatrix reactions 27 0 28 column_matrix set c2 30] if Electron_donor_2 = "Glycerol" [set rd2 matrix:submatrix reactions 28 0 29 column_matrix set c2 31] if Electron_donor_2 = "Glycine" [set rd2 matrix:submatrix reactions 29 0 30 column_matrix set c2 32] if Electron_donor_2 = "Lactate" [set rd2 matrix:submatrix reactions 30 0 31 column_matrix set c2 33] if Electron_donor_2 = "Methane" [set rd2 matrix:submatrix reactions 31 0 32 column_matrix set c2 34] if Electron_donor_2 = "Methanol" [set rd2 matrix:submatrix reactions 32 0 33 column_matrix set c2 35] if Electron_donor_2 = "Palmitate" [set rd2 matrix:submatrix reactions 33 0 34 column_matrix set c2 36] if Electron_donor_2 = "Propionate" [set rd2 matrix:submatrix reactions 34 0 35 column_matrix set c2 37] if Electron_donor_2 = "Pyruvate" [set rd2 matrix:submatrix reactions 35 0 36 column_matrix set c2 38] if Electron_donor_2 = "Succinate" [set rd2 matrix:submatrix reactions 36 0 37 column_matrix set c2 39] if Electron_donor_2 = "NTA - Acid nitrilotriacetic" [set rd2 matrix:submatrix reactions 37 0 38 column_matrix set c2 40] set e_d1 abs ( 1 / matrix:get rd1 0 c) set e_d2 abs ( 1 / matrix:get rd2 0 c2) let total_electrons (e_d1 + e_d2) set x_d1 (e_d1 / total_electrons) set x_d2 (e_d2 / total_electrons) set rd (x_d1 matrix:* rd1) matrix:+ (x_d2 matrix:* rd2) ] [set rd rd1 matrix:+ rd2] end to setup-electron-acceptor if Electron_acceptor = "O2 -> H2O" [set ra matrix:submatrix reactions 0 0 1 column_matrix ] if Electron_acceptor = "(SO4)2- -> (S2O3)2-" [set ra matrix:submatrix reactions 1 0 2 column_matrix ] if Electron_acceptor = "(SO4)2- -> S" [set ra matrix:submatrix reactions 2 0 3 column_matrix ] if Electron_acceptor = "(SO4)2- -> (SO3)2-" [set ra matrix:submatrix reactions 3 0 4 column_matrix ] if Electron_acceptor = "(SO3)2- -> H2S + HS-" [set ra matrix:submatrix reactions 4 0 5 column_matrix ] if Electron_acceptor = "(SO4)2- -> H2S + HS-" [set ra matrix:submatrix reactions 5 0 6 column_matrix ] if Electron_acceptor = "N2O -> N2" [set ra matrix:submatrix reactions 6 0 7 column_matrix ] if Electron_acceptor = "NO -> N2O" [set ra matrix:submatrix reactions 7 0 8 column_matrix ] if Electron_acceptor = "NO2- -> N2" [set ra matrix:submatrix reactions 8 0 9 column_matrix ] if Electron_acceptor = "NO2- -> NO" [set ra matrix:submatrix reactions 9 0 10 column_matrix ] if Electron_acceptor = "NO3- -> N2" [set ra matrix:submatrix reactions 10 0 11 column_matrix ] if Electron_acceptor = "NO3- -> NO + N2O" [set ra matrix:submatrix reactions 11 0 12 column_matrix ] if Electron_acceptor = "NO3- -> N2O" [set ra matrix:submatrix reactions 12 0 13 column_matrix ] if Electron_acceptor = "NO3- -> NO" [set ra matrix:submatrix reactions 13 0 14 column_matrix ] if Electron_acceptor = "NO3- -> NO2-" [set ra matrix:submatrix reactions 14 0 15 column_matrix ] if Electron_acceptor = "H+ -> H2" [set ra matrix:submatrix reactions 15 0 16 column_matrix ] if Electron_acceptor = "Fe3+ -> Fe2+" [set ra matrix:submatrix reactions 16 0 17 column_matrix ] if Electron_acceptor = "N2 -> NH4+" [set ra matrix:submatrix reactions 17 0 18 column_matrix ] if Electron_acceptor = "NO3- -> NH4+" [set ra matrix:submatrix reactions 18 0 19 column_matrix ] if Electron_acceptor = "NO2- -> NH4+" [set ra matrix:submatrix reactions 19 0 20 column_matrix ] if Electron_acceptor = "Acetate" [set ra matrix:submatrix reactions 20 0 21 column_matrix ] if Electron_acceptor = "Alanine" [set ra matrix:submatrix reactions 21 0 22 column_matrix ] if Electron_acceptor = "Benzoate" [set ra matrix:submatrix reactions 22 0 23 column_matrix ] if Electron_acceptor = "Citrate" [set ra matrix:submatrix reactions 23 0 24 column_matrix ] if Electron_acceptor = "Ethanol" [set ra matrix:submatrix reactions 24 0 25 column_matrix ] if Electron_acceptor = "Formate" [set ra matrix:submatrix reactions 25 0 26 column_matrix ] if Electron_acceptor = "Glucose" [set ra matrix:submatrix reactions 26 0 27 column_matrix ] if Electron_acceptor = "Glutamate" [set ra matrix:submatrix reactions 27 0 28 column_matrix ] if Electron_acceptor = "Glycerol" [set ra matrix:submatrix reactions 28 0 29 column_matrix ] if Electron_acceptor = "Glycine" [set ra matrix:submatrix reactions 29 0 30 column_matrix ] if Electron_acceptor = "Lactate" [set ra matrix:submatrix reactions 30 0 31 column_matrix ] if Electron_acceptor = "Methane" [set ra matrix:submatrix reactions 31 0 32 column_matrix ] if Electron_acceptor = "Methanol" [set ra matrix:submatrix reactions 32 0 33 column_matrix ] if Electron_acceptor = "Palmitate" [set ra matrix:submatrix reactions 33 0 34 column_matrix ] if Electron_acceptor = "Propionate" [set ra matrix:submatrix reactions 34 0 35 column_matrix ] if Electron_acceptor = "Pyruvate" [set ra matrix:submatrix reactions 35 0 36 column_matrix ] if Electron_acceptor = "Succinate" [set ra matrix:submatrix reactions 36 0 37 column_matrix ] if Electron_acceptor = "NTA - Acid nitrilotriacetic" [set ra matrix:submatrix reactions 37 0 38 column_matrix ] end to setup-output output-print " " ifelse second_electron_donor? = true [output-type "(rd) Electron donor(s) --> " output-type Electron_donor output-type " + " output-type Electron_donor_2 output-print " : "] [output-type "(rd) Electron donor --> " output-type Electron_donor output-print " : "] set to-print matrix:copy rd output-all output-print " " output-type "(ra) Electron acceptor --> " output-type Electron_acceptor output-print " : " set to-print matrix:copy ra output-all output-print " " output-type "(rc) Biomass half reaction : " output-type Microorganism output-type " , N-Source : " output-print N-source ifelse (matrix:get b-biomass 0 3) = 0 [ ][output-type precision (matrix:get b-biomass 0 3) 4 output-type " CO2 + "] ifelse (matrix:get b-biomass 0 5) = 0 [ ][output-type precision (matrix:get b-biomass 0 5) 4 output-type " HCO3- + "] ifelse (matrix:get b-biomass 0 4) = 0 [ ][output-type precision (matrix:get b-biomass 0 4) 4 output-type " NH4+ + "] ifelse (matrix:get b-biomass 0 9) = 0 [ ][output-type precision (matrix:get b-biomass 0 9) 4 output-type " NO3- + "] ifelse (matrix:get b-biomass 0 10) = 0 [ ][output-type precision (matrix:get b-biomass 0 10) 4 output-type " NO2- + "] ifelse (matrix:get b-biomass 0 13) = 0 [ ][output-type precision (matrix:get b-biomass 0 13) 4 output-type " N2 + "] ifelse (matrix:get b-biomass 0 1) = 0 [ ][output-type precision (matrix:get b-biomass 0 1) 4 output-type " H+ + "] ifelse (matrix:get b-biomass 0 2) = 0 [ ][output-type precision (matrix:get b-biomass 0 2) 4 output-type " e- --> "] output-type precision abs (matrix:get b-biomass 0 6) 4 output-type " C'" output-type carbon output-type "'H'" output-type hydrogen output-type "'O'" output-type oxygen output-type "'N'" output-type nitrogen output-type " + " output-type precision abs (matrix:get b-biomass 0 7) 4 output-type " H2O " output-type "[ ∆G = " output-type precision (matrix:get b-biomass 0 25) 4 output-print " KJ/e-eq ]" output-print " " output-print "Energy reaction : " set to-print matrix:copy energy_reaction output-all output-print " " output-print "Synthesis reaction : " set to-print matrix:copy synthesis_reaction output-all output-print " " output-type "Balanced equation using " output-type Thermodynamics output-print " : " output-type "[ fe = " output-type precision fe 2 output-type " ] [ fs = " output-type precision fs 2 output-type " ] [ e = " output-type efficiency output-print " ]" set to-print matrix:copy reaction output-all output-print " " output-print "Yield prediction :" output-type "Yg/m = " output-type precision y_grams_cells/mol_donor 3 if Electron_donor = "H2S + HS- -> (SO3)2-" or Electron_donor = "H2S + HS- -> (SO4)2-" [output-print " [ grams_cells/mol_H2S ]"] ifelse Electron_donor = "NO + N2O -> NO3-" [output-print " [ grams_cells/mol_N2O ]"][output-print " [ grams_cells/mol_donor ]"] output-type "Yc/m = " output-type precision y_mol_C_cell/mol_donor 3 if Electron_donor = "H2S + HS- -> (SO3)2-" or Electron_donor = "H2S + HS- -> (SO4)2-" [output-print " [ mol_C_cell/mol_H2S ]"] ifelse Electron_donor = "NO + N2O -> NO3-" [output-print " [ mol_C_cells/mol_N2O ]"][output-print " [ mol_C_cells/mol_donor ]"] ifelse yc/c = 0 [ ][output-type "Yc/c = " output-type precision yc/c 3 output-print " [ mol_C_cell/mol_C_donor ]"] end to output-all ifelse (matrix:get to-print 0 8) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 8) 4 output-type " CH3COO- "] ifelse (matrix:get to-print 0 23) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 23) 4 output-type " CH3CHNH2COO- "] ifelse (matrix:get to-print 0 24) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 24) 4 output-type " C6H5COO- "] ifelse (matrix:get to-print 0 26) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 26) 4 output-type " (COO-)CH2COH(COO-)CH2COO- "] ifelse (matrix:get to-print 0 27) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 27) 4 output-type " CH3CH2OH "] ifelse (matrix:get to-print 0 28) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 28) 4 output-type " HCOO- "] ifelse (matrix:get to-print 0 29) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 29) 4 output-type " C6H12O6 "] ifelse (matrix:get to-print 0 30) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 30) 4 output-type " COOHCH2CH2CHNH2COO- "] ifelse (matrix:get to-print 0 31) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 31) 4 output-type " CH2OHCHOHCH2OH "] ifelse (matrix:get to-print 0 32) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 32) 4 output-type " CH2NH2COOH "] ifelse (matrix:get to-print 0 33) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 33) 4 output-type " CH3CHOHCOO- "] ifelse (matrix:get to-print 0 34) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 34) 4 output-type " CH4 "] ifelse (matrix:get to-print 0 35) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 35) 4 output-type " CH3OH "] ifelse (matrix:get to-print 0 36) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 36) 4 output-type " CH3(CH2)14COO- "] ifelse (matrix:get to-print 0 37) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 37) 4 output-type " CH3CH2COO- "] ifelse (matrix:get to-print 0 38) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 38) 4 output-type " CH3COCOO- "] ifelse (matrix:get to-print 0 39) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 39) 4 output-type " (C4H4O4)2- "] ifelse (matrix:get to-print 0 40) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 40) 4 output-type " (C6H6O6N)3- "] ifelse (matrix:get to-print 0 0) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 0) 4 output-type " O2 "] ifelse (matrix:get to-print 0 3) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 3) 4 output-type " CO2 "] ifelse (matrix:get to-print 0 4) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 4) 4 output-type " NH4+ "] ifelse (matrix:get to-print 0 5) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 5) 4 output-type " HCO3- "] ifelse (matrix:get to-print 0 6) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 6) 4 output-type " C'" output-type carbon output-type "'H'" output-type hydrogen output-type "'O'" output-type oxygen output-type "'N'" output-type nitrogen output-type " "] ifelse (matrix:get to-print 0 7) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 7) 4 output-type " H2O "] ifelse (matrix:get to-print 0 9) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 9) 4 output-type " NO3- "] ifelse (matrix:get to-print 0 10) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 10) 4 output-type " NO2- "] ifelse (matrix:get to-print 0 11) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 11) 4 output-type " NO "] ifelse (matrix:get to-print 0 12) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 12) 4 output-type " N2O "] ifelse (matrix:get to-print 0 13) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 13) 4 output-type " N2 "] ifelse (matrix:get to-print 0 14) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 14) 4 output-type " H2 "] ifelse (matrix:get to-print 0 15) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 15) 4 output-type " Fe3+ "] ifelse (matrix:get to-print 0 16) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 16) 4 output-type " Fe2+ "] ifelse (matrix:get to-print 0 17) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 17) 4 output-type " (SO4)2- "] ifelse (matrix:get to-print 0 18) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 18) 4 output-type " (SO3)2- "] ifelse (matrix:get to-print 0 19) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 19) 4 output-type " H2S "] ifelse (matrix:get to-print 0 20) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 20) 4 output-type " HS- "] ifelse (matrix:get to-print 0 21) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 21) 4 output-type " (S2O3)2- "] ifelse (matrix:get to-print 0 22) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 22) 4 output-type " S "] ifelse (matrix:get to-print 0 1) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 1) 4 output-type " H+ "] ifelse (matrix:get to-print 0 2) <= 0 [ ][output-type "+ " output-type precision (matrix:get to-print 0 2) 4 output-type " e- "] output-type "--> " ifelse (matrix:get to-print 0 6) >= 0 [ ][output-type precision abs (matrix:get to-print 0 6) 4 output-type " C'" output-type carbon output-type "'H'" output-type hydrogen output-type "'O'" output-type oxygen output-type "'N'" output-type nitrogen output-type " "] ifelse (matrix:get to-print 0 8) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 8) 4 output-type " CH3COO- "] ifelse (matrix:get to-print 0 23) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 23) 4 output-type " CH3CHNH2COO- "] ifelse (matrix:get to-print 0 24) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 24) 4 output-type " C6H5COO- "] ifelse (matrix:get to-print 0 26) >= 0 [ ][output-type "+ " output-type precision abs(matrix:get to-print 0 26) 4 output-type " (COO-)CH2COH(COO-)CH2COO- "] ifelse (matrix:get to-print 0 27) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 27) 4 output-type " CH3CH2OH "] ifelse (matrix:get to-print 0 28) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 28) 4 output-type " HCOO- "] ifelse (matrix:get to-print 0 29) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 29) 4 output-type " C6H12O6 "] ifelse (matrix:get to-print 0 30) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 30) 4 output-type " COOHCH2CH2CHNH2COO- "] ifelse (matrix:get to-print 0 31) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 31) 4 output-type " CH2OHCHOHCH2OH "] ifelse (matrix:get to-print 0 32) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 32) 4 output-type " CH2NH2COOH "] ifelse (matrix:get to-print 0 33) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 33) 4 output-type " CH3CHOHCOO- "] ifelse (matrix:get to-print 0 34) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 34) 4 output-type " CH4 "] ifelse (matrix:get to-print 0 35) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 35) 4 output-type " CH3OH "] ifelse (matrix:get to-print 0 36) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 36) 4 output-type " CH3(CH2)14COO- "] ifelse (matrix:get to-print 0 37) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 37) 4 output-type " CH3CH2COO- "] ifelse (matrix:get to-print 0 38) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 38) 4 output-type " CH3COCOO- "] ifelse (matrix:get to-print 0 39) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 39) 4 output-type " (C4H4O4)2- "] ifelse (matrix:get to-print 0 40) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 40) 4 output-type " (C6H6O6N)3- "] ifelse (matrix:get to-print 0 0) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 0) 4 output-type " O2 "] ifelse (matrix:get to-print 0 1) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 1) 4 output-type " H+ "] ifelse (matrix:get to-print 0 2) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 2) 4 output-type " e- "] ifelse (matrix:get to-print 0 3) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 3) 4 output-type " CO2 "] ifelse (matrix:get to-print 0 4) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 4) 4 output-type " NH4+ "] ifelse (matrix:get to-print 0 5) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 5) 4 output-type " HCO3- "] ifelse (matrix:get to-print 0 9) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 9) 4 output-type " NO3- "] ifelse (matrix:get to-print 0 10) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 10) 4 output-type " NO2- "] ifelse (matrix:get to-print 0 11) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 11) 4 output-type " NO "] ifelse (matrix:get to-print 0 12) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 12) 4 output-type " N2O "] ifelse (matrix:get to-print 0 13) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 13) 4 output-type " N2 "] ifelse (matrix:get to-print 0 14) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 14) 4 output-type " H2 "] ifelse (matrix:get to-print 0 15) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 15) 4 output-type " Fe3+ "] ifelse (matrix:get to-print 0 16) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 16) 4 output-type " Fe2+ "] ifelse (matrix:get to-print 0 17) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 17) 4 output-type " (SO4)2- "] ifelse (matrix:get to-print 0 18) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 18) 4 output-type " (SO3)2- "] ifelse (matrix:get to-print 0 19) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 19) 4 output-type " H2S "] ifelse (matrix:get to-print 0 20) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 20) 4 output-type " HS- "] ifelse (matrix:get to-print 0 21) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 21) 4 output-type " (S2O3)2- "] ifelse (matrix:get to-print 0 22) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 22) 4 output-type " S "] ifelse (matrix:get to-print 0 7) >= 0 [ ][output-type "+ " output-type precision abs (matrix:get to-print 0 7) 4 output-type " H2O "] ifelse to-print = reaction or to-print = energy_reaction or to-print = synthesis_reaction[ ][ifelse (matrix:get to-print 0 25) = 0 [ ][output-type "[ ∆G = " output-type precision (matrix:get to-print 0 25) 4 output-type " KJ/e-eq ]"]] output-print " " end to setup-reactions set column_matrix 41 ; type here the number of chemical species involved set row_matrix (column_matrix - 1) ; this number is the number of reduction-half-reactions in this version of the tool. set reactions matrix:make-constant row_matrix column_matrix 0 matrix:set reactions 0 0 (1 / 4) ; O2 matrix:set reactions 0 1 (1) ; H+ matrix:set reactions 0 2 (1) ; e- matrix:set reactions 0 7 (-1 / 2) ; H2O matrix:set reactions 0 25 (-78.72) ; ∆G matrix:set reactions 1 17 (1 / 4) ; (SO4)2- matrix:set reactions 1 1 (5 / 4) ; H+ matrix:set reactions 1 2 (1) ; e- matrix:set reactions 1 7 (-5 / 8) ; H2O matrix:set reactions 1 21 (-1 / 8) ; (S2O3)2- matrix:set reactions 1 25 (23.58) ; ∆G matrix:set reactions 2 17 (1 / 6) ; (SO4)2- matrix:set reactions 2 1 (4 / 3) ; H+ matrix:set reactions 2 2 (1) ; e- matrix:set reactions 2 7 (-2 / 3) ; H2O matrix:set reactions 2 22 (-1 / 6) ; S matrix:set reactions 2 25 (19.15) ; ∆G matrix:set reactions 3 17 (1 / 2) ; (SO4)2- matrix:set reactions 3 1 (1) ; H+ matrix:set reactions 3 2 (1) ; e- matrix:set reactions 3 7 (-1 / 2) ; H2O matrix:set reactions 3 18 (-1 / 2) ; (SO3)2- matrix:set reactions 3 25 (50.30) ; ∆G matrix:set reactions 4 18 (1 / 6) ; (SO3)2- matrix:set reactions 4 1 (5 / 4) ; H+ matrix:set reactions 4 2 (1) ; e- matrix:set reactions 4 7 (-1 / 2) ; H2O matrix:set reactions 4 19 (-1 / 12) ; H2S matrix:set reactions 4 20 (-1 / 12) ; HS- matrix:set reactions 4 25 (11.03) ; ∆G matrix:set reactions 5 17 (1 / 8) ; (SO4)2- matrix:set reactions 5 1 (19 / 16) ; H+ matrix:set reactions 5 2 (1) ; e- matrix:set reactions 5 7 (-1 / 2) ; H2O matrix:set reactions 5 19 (-1 / 16) ; H2S matrix:set reactions 5 20 (-1 / 16) ; HS- matrix:set reactions 5 25 (20.85) ; ∆G matrix:set reactions 6 12 (1 / 2) ; N2O matrix:set reactions 6 1 (1) ; H+ matrix:set reactions 6 2 (1) ; e- matrix:set reactions 6 7 (-1 / 2) ; H2O matrix:set reactions 6 13 (-1 / 2) ; N2 matrix:set reactions 6 25 (-133.469) ; ∆G matrix:set reactions 7 11 (1) ; NO matrix:set reactions 7 1 (1) ; H+ matrix:set reactions 7 2 (1) ; e- matrix:set reactions 7 7 (-1 / 2) ; H2O matrix:set reactions 7 12 (-1 / 2) ; N2O matrix:set reactions 7 25 (-115.829) ; ∆G matrix:set reactions 8 10 (1 / 3) ; NO2- matrix:set reactions 8 1 (4 / 3) ; H+ matrix:set reactions 8 2 (1) ; e- matrix:set reactions 8 7 (-2 / 3) ; H2O matrix:set reactions 8 13 (-1 / 6) ; N2 matrix:set reactions 8 25 (-92.56) ; ∆G matrix:set reactions 9 10 (1) ; NO2- matrix:set reactions 9 1 (2) ; H+ matrix:set reactions 9 2 (1) ; e- matrix:set reactions 9 7 (-1) ; H2O matrix:set reactions 9 11 (-1) ; NO matrix:set reactions 9 25 (-33.718) ; ∆G matrix:set reactions 10 9 (1 / 5) ; NO3- matrix:set reactions 10 1 (6 / 5) ; H+ matrix:set reactions 10 2 (1) ; e- matrix:set reactions 10 7 (-3 / 5) ; H2O matrix:set reactions 10 13 (-1 / 10) ; N2 matrix:set reactions 10 25 (-72.20) ; ∆G matrix:set reactions 11 9 (7 / 24) ; NO3- matrix:set reactions 11 1 (31 / 24) ; H+ matrix:set reactions 11 2 (1) ; e- matrix:set reactions 11 7 (-31 / 48) ; H2O matrix:set reactions 11 11 (-1 / 6) ; NO matrix:set reactions 11 12 (-1 / 16) ; N2O matrix:set reactions 11 25 (-48.274) ; ∆G matrix:set reactions 12 9 (1 / 4) ; NO3- matrix:set reactions 12 1 (5 / 4) ; H+ matrix:set reactions 12 2 (1) ; e- matrix:set reactions 12 7 (-5 / 8) ; H2O matrix:set reactions 12 12 (-1 / 8) ; N2O matrix:set reactions 12 25 (-57.54) ; ∆G matrix:set reactions 13 9 (1 / 3) ; NO3- matrix:set reactions 13 1 (4 / 3) ; H+ matrix:set reactions 13 2 (1) ; e- matrix:set reactions 13 7 (-2 / 3) ; H2O matrix:set reactions 13 11 (-1 / 3) ; NO matrix:set reactions 13 25 (-39.00) ; ∆G matrix:set reactions 14 9 (1 / 2) ; NO3- matrix:set reactions 14 1 (1) ; H+ matrix:set reactions 14 2 (1) ; e- matrix:set reactions 14 7 (-1 / 2) ; H2O matrix:set reactions 14 10 (-1 / 2) ; NO2- matrix:set reactions 14 25 (-41.65) ; ∆G matrix:set reactions 15 1 (1) ; H+ matrix:set reactions 15 2 (1) ; e- matrix:set reactions 15 14 (-1 / 2) ; H2 matrix:set reactions 15 25 (39.87) ; ∆G matrix:set reactions 16 15 (1) ; Fe3+ matrix:set reactions 16 2 (1) ; e- matrix:set reactions 16 16 (-1) ; Fe2+ matrix:set reactions 16 25 (-74.27) ; ∆G matrix:set reactions 17 13 (1 / 6) ; N2 matrix:set reactions 17 1 (4 / 3) ; H+ matrix:set reactions 17 2 (1) ; e- matrix:set reactions 17 4 (-1 / 3) ; NH4+ matrix:set reactions 17 25 (26.70) ; ∆G matrix:set reactions 18 9 (1 / 8) ; NO3- matrix:set reactions 18 1 (5 / 4) ; H+ matrix:set reactions 18 2 (1) ; e- matrix:set reactions 18 7 (-3 / 8) ; H2O matrix:set reactions 18 4 (-1 / 8) ; NH4+ matrix:set reactions 18 25 (-35.11) ; ∆G matrix:set reactions 19 10 (1 / 6) ; NO2- matrix:set reactions 19 1 (4 / 3) ; H+ matrix:set reactions 19 2 (1) ; e- matrix:set reactions 19 4 (-1 / 6) ; NH4+ matrix:set reactions 19 7 (-1 / 3) ; H2O matrix:set reactions 19 25 (-32.93) ; ∆G matrix:set reactions 20 1 (1) ; H+ matrix:set reactions 20 2 (1) ; e- matrix:set reactions 20 3 (1 / 8) ; CO2 matrix:set reactions 20 5 (1 / 8) ; HCO3- matrix:set reactions 20 7 (-3 / 8) ; H2O matrix:set reactions 20 8 (-1 / 8) ; Acetate matrix:set reactions 20 25 (27.40) ; ∆G matrix:set reactions 21 1 (11 / 12) ; H+ matrix:set reactions 21 2 (1) ; e- matrix:set reactions 21 3 (1 / 6) ; CO2 matrix:set reactions 21 4 (1 / 12) ; NH4+ matrix:set reactions 21 5 (1 / 12) ; HCO3- matrix:set reactions 21 7 (-5 / 12) ; H2O matrix:set reactions 21 23 (-1 / 12) ; Alanine matrix:set reactions 21 25 (31.37) ; ∆G matrix:set reactions 22 1 (1) ; H+ matrix:set reactions 22 2 (1) ; e- matrix:set reactions 22 3 (1 / 5) ; CO2 matrix:set reactions 22 5 (1 / 30) ; HCO3- matrix:set reactions 22 7 (-13 / 30) ; H2O matrix:set reactions 22 24 (-1 / 30) ; Benzoate matrix:set reactions 22 25 (27.34) ; ∆G matrix:set reactions 23 1 (1) ; H+ matrix:set reactions 23 2 (1) ; e- matrix:set reactions 23 3 (1 / 6) ; CO2 matrix:set reactions 23 5 (1 / 6) ; HCO3- matrix:set reactions 23 7 (-4 / 9) ; H2O matrix:set reactions 23 26 (-1 / 18) ; Citrate matrix:set reactions 23 25 (33.08) ; ∆G matrix:set reactions 24 1 (1) ; H+ matrix:set reactions 24 2 (1) ; e- matrix:set reactions 24 3 (1 / 6) ; CO2 matrix:set reactions 24 7 (-1 / 4) ; H2O matrix:set reactions 24 27 (-1 / 12) ; Ethanol matrix:set reactions 24 25 (31.18) ; ∆G matrix:set reactions 25 1 (1) ; H+ matrix:set reactions 25 2 (1) ; e- matrix:set reactions 25 5 (1 / 2) ; HCO3- matrix:set reactions 25 7 (-1 / 2) ; H2O matrix:set reactions 25 28 (-1 / 2) ; Formate matrix:set reactions 25 25 (39.19) ; ∆G matrix:set reactions 26 1 (1) ; H+ matrix:set reactions 26 2 (1) ; e- matrix:set reactions 26 3 (1 / 4) ; CO2 matrix:set reactions 26 7 (-1 / 4) ; H2O matrix:set reactions 26 29 (-1 / 24) ; Glucose matrix:set reactions 26 25 (41.35) ; ∆G matrix:set reactions 27 1 (1) ; H+ matrix:set reactions 27 2 (1) ; e- matrix:set reactions 27 3 (1 / 6) ; CO2 matrix:set reactions 27 4 (1 / 18) ; NH4+ matrix:set reactions 27 5 (1 / 9) ; HCO3- matrix:set reactions 27 7 (-4 / 9) ; H2O matrix:set reactions 27 30 (-1 / 18) ; Glutamate matrix:set reactions 27 25 (30.93) ; ∆G matrix:set reactions 28 1 (1) ; H+ matrix:set reactions 28 2 (1) ; e- matrix:set reactions 28 3 (3 / 14) ; CO2 matrix:set reactions 28 7 (-3 / 14) ; H2O matrix:set reactions 28 31 (-1 / 14) ; Glycerol matrix:set reactions 28 25 (33.88) ; ∆G matrix:set reactions 29 1 (1) ; H+ matrix:set reactions 29 2 (1) ; e- matrix:set reactions 29 3 (1 / 6) ; CO2 matrix:set reactions 29 4 (1 / 6) ; NH4+ matrix:set reactions 29 5 (1 / 6) ; HCO3- matrix:set reactions 29 7 (-1 / 2) ; H2O matrix:set reactions 29 32 (-1 / 6) ; Glycine matrix:set reactions 29 25 (39.80) ; ∆G matrix:set reactions 30 1 (1) ; H+ matrix:set reactions 30 2 (1) ; e- matrix:set reactions 30 3 (1 / 6) ; CO2 matrix:set reactions 30 5 (1 / 12) ; HCO3- matrix:set reactions 30 7 (-1 / 3) ; H2O matrix:set reactions 30 33 (-1 / 12) ; Lactato matrix:set reactions 30 25 (32.29) ; ∆G matrix:set reactions 31 1 (1) ; H+ matrix:set reactions 31 2 (1) ; e- matrix:set reactions 31 3 (1 / 8) ; CO2 matrix:set reactions 31 7 (-1 / 4) ; H2O matrix:set reactions 31 34 (-1 / 8) ; Methane matrix:set reactions 31 25 (23.53) ; ∆G matrix:set reactions 32 1 (1) ; H+ matrix:set reactions 32 2 (1) ; e- matrix:set reactions 32 3 (1 / 6) ; CO2 matrix:set reactions 32 7 (-1 / 6) ; H2O matrix:set reactions 32 35 (-1 / 6) ; Methanol matrix:set reactions 32 25 (36.84) ; ∆G matrix:set reactions 33 1 (1) ; H+ matrix:set reactions 33 2 (1) ; e- matrix:set reactions 33 3 (15 / 19) ; CO2 matrix:set reactions 33 5 (1 / 92) ; HCO3- matrix:set reactions 33 7 (-31 / 92) ; H2O matrix:set reactions 33 36 (-1 / 92) ; Palmitate matrix:set reactions 33 25 (27.26) ; ∆G matrix:set reactions 34 1 (1) ; H+ matrix:set reactions 34 2 (1) ; e- matrix:set reactions 34 3 (1 / 7) ; CO2 matrix:set reactions 34 5 (1 / 14) ; HCO3- matrix:set reactions 34 7 (-5 / 14) ; H2O matrix:set reactions 34 37 (-1 / 14) ; Propionate matrix:set reactions 34 25 (27.63) ; ∆G matrix:set reactions 35 1 (1) ; H+ matrix:set reactions 35 2 (1) ; e- matrix:set reactions 35 3 (1 / 5) ; CO2 matrix:set reactions 35 5 (1 / 10) ; HCO3- matrix:set reactions 35 7 (-2 / 5) ; H2O matrix:set reactions 35 38 (-1 / 10) ; Pyruvate matrix:set reactions 35 25 (35.09) ; ∆G matrix:set reactions 36 1 (1) ; H+ matrix:set reactions 36 2 (1) ; e- matrix:set reactions 36 3 (1 / 7) ; CO2 matrix:set reactions 36 5 (1 / 7) ; HCO3- matrix:set reactions 36 7 (-3 / 7) ; H2O matrix:set reactions 36 39 (-1 / 14) ; Succinate matrix:set reactions 36 25 (29.09) ; ∆G matrix:set reactions 37 1 (20 / 18) ; H+ matrix:set reactions 37 2 (1) ; e- matrix:set reactions 37 4 (1 / 18) ; NH4+ matrix:set reactions 37 5 (6 / 18) ; HCO3- matrix:set reactions 37 7 (-12 / 18) ; H2O matrix:set reactions 37 40 (-1 / 18) ; NTA - Acid nitrilotriacetic matrix:set reactions 37 25 (68.889) ; ∆G end to download ifelse second_electron_donor? = true [export-output (word (word behaviorspace-run-number"_rd_("Electron_donor"+"Electron_donor_2")_ra_("Electron_acceptor")_rc_("Microorganism")_N-soruce_("N-Source")_with_"Thermodynamics)".txt")] [export-output (word (word behaviorspace-run-number"_rd_("Electron_donor")_ra_("Electron_acceptor")_rc_("Microorganism")_N-soruce_("N-Source")_with_"Thermodynamics)".txt")] ; Outputfile name with .txt extension and Behaviorspace numering end @#$#@#$#@ GRAPHICS-WINDOW 520 348 765 544 1 1 55.0 1 10 1 1 1 0 1 1 1 -1 1 -1 1 0 0 1 ticks 30.0 CHOOSER 8 10 246 55 Electron_donor Electron_donor "--- Organic Reactions ---" "Acetate" "Alanine" "Benzoate" "Citrate" "Ethanol" "Formate" "Glucose" "Glutamate" "Glycerol" "Glycine" "Lactate" "Methane" "Methanol" "Palmitate" "Propionate" "Pyruvate" "Succinate" "NTA - Acid nitrilotriacetic" "--- Inorganic Reactions ---" "NH4+ -> NO3-" "NH4+ -> NO2-" "NH4+ -> N2" "Fe2+ -> Fe3+" "H2 -> H+" "NO2- -> NO3-" "NO -> NO3-" "N2O -> NO3-" "NO + N2O -> NO3-" "N2 -> NO3-" "NO -> NO2-" "N2 -> NO2-" "N2O -> NO" "N2 -> N2O" "H2S + HS- -> (SO4)2-" "H2S + HS- -> (SO3)2-" "(SO3)2- -> (SO4)2-" "S -> (SO4)2-" "(S2O3)2- -> (SO4)2-" "H2O -> O2" 7 CHOOSER 8 55 246 100 Electron_acceptor Electron_acceptor "--- Organic Reactions ---" "Acetate" "Alanine" "Benzoate" "Citrate" "Ethanol" "Formate" "Glucose" "Glutamate" "Glycerol" "Glycine" "Lactate" "Methane" "Methanol" "Palmitate" "Propionate" "Pyruvate" "Succinate" "NTA - Acid nitrilotriacetic" "--- Inorganic Reactions ---" "NO3- -> NH4+" "NO2- -> NH4+" "N2 -> NH4+" "Fe3+ -> Fe2+" "H+ -> H2" "NO3- -> NO2-" "NO3- -> NO" "NO3- -> N2O" "NO3- -> NO + N2O" "NO3- -> N2" "NO2- -> NO" "NO2- -> N2" "NO -> N2O" "N2O -> N2" "(SO4)2- -> H2S + HS-" "(SO3)2- -> H2S + HS-" "(SO4)2- -> (SO3)2-" "(SO4)2- -> S" "(SO4)2- -> (S2O3)2-" "O2 -> H2O" 5 BUTTON 8 99 246 132 NIL calculate NIL 1 T OBSERVER NIL NIL NIL NIL 1 OUTPUT 8 165 1190 568 12 INPUTBOX 247 56 308 116 c-carbon 3 1 0 Number INPUTBOX 309 56 380 116 c-hydrogen 5.4 1 0 Number INPUTBOX 381 57 447 117 c-oxygen 1.45 1 0 Number INPUTBOX 448 57 517 117 c-nitrogen 0.75 1 0 Number CHOOSER 787 10 925 55 Thermodynamics Thermodynamics "TEEM_1" "TEEM_2" 1 CHOOSER 246 10 692 55 Microorganism Microorganism "C5H7O2N - Casein, aerobic" "C7H12O4N - Acetate, Ammomia N source aerobic" "C9H15O5N - Acetate, Nitrate N source aerobic" "C9H16O5N - Acetate, Nitrite N source aerobic" "C4.9H9.4O2.9N - Acetate, Methanogenic" "C4.7H7.7O2.1N - Octanoate, Methanogenic" "C4.9H9O3N - Glycine, Methanogenic" "C5H8.8O3.2N - Leucine, Methanogenic" "C4.1H6.8O2.2N - Nutrient Broth, Methanogenic" "C5.1H8.5O2.5N - Glucose, Methanogenic" "C5.3H9.1O2.5N - Stahrch, Methanogenic" "C5H8O2N - Bacteria, acetate, aerobic" "C5H8.33O0.81N - Bacteria, Undefined" "C4H8O2N - Bacteria, Undefined" "C4.17H7.42O1.38N - Aerobacter aerogenes, undefined" "C4.54H7.91O1.95N - Klebsiella aerogenes, Glycerol, u=0.1 h-1" "C4.17H7.21O1.79N - Klebsiella aerogenes, Glycerol, u=0.85 h-1" "C4.16H8O1.25N - Escherichia coli, undefined" "C3.85H6.69O1.78N - Escherichia coli, glucose" "C6.33H10.21O3.53N - Saccharomyces cerevisiae, glucose" "C4H7.2O1.93N - Paracoccus denitrificans, succinate" "C5H9O2.5N - Agrobacterium tumefaciens, succinate" "C4.17H8O1.75N - Bacteria, Undefined" "C(n)H(a)O(b)N(c) - Bacteria, Generic" 19 CHOOSER 693 10 785 55 N-Source N-Source "NH4+" "NO3-" "NO2-" "N2" 0 SLIDER 521 57 693 90 efficiency efficiency 0.01 1 0.26 0.01 1 NIL HORIZONTAL INPUTBOX 928 10 978 70 q 0 1 0 Number BUTTON 521 131 693 164 NIL download NIL 1 T OBSERVER NIL NIL NIL NIL 1 TEXTBOX 542 96 686 126 MbT - tool 24 0.0 1 SWITCH 8 131 246 164 second_electron_donor? second_electron_donor? 0 1 -1000 CHOOSER 247 119 517 164 Electron_donor_2 Electron_donor_2 "--- Organic Reactions ---" "Acetate" "Alanine" "Benzoate" "Citrate" "Ethanol" "Formate" "Glucose" "Glutamate" "Glycerol" "Glycine" "Lactate" "Methane" "Methanol" "Palmitate" "Propionate" "Pyruvate" "Succinate" "NTA - Acid nitrilotriacetic" "--- Inorganic Reactions ---" "NH4+ -> NO3-" "NH4+ -> NO2-" "NH4+ -> N2" "Fe2+ -> Fe3+" "H2 -> H+" "NO2- -> NO3-" "NO -> NO3-" "N2O -> NO3-" "NO + N2O -> NO3-" "N2 -> NO3-" "NO -> NO2-" "N2 -> NO2-" "N2O -> NO" "N2 -> N2O" "H2S + HS- -> (SO4)2-" "H2S + HS- -> (SO3)2-" "(SO3)2- -> (SO4)2-" "S -> (SO4)2-" "(S2O3)2- -> (SO4)2-" "H2O -> O2" 1 @#$#@#$#@ ## WHAT IS IT? MbT-tool is an computational tool to write a balanced biochemical equation using the thermodynamic approach “Thermodynamic Electron Equivalents Model” (TEEM) proposed by Perry L. McCarty (McCarty, 2007; Rittmann and McCarty, 2001). The novelty is that this biochemical equation considers in its structure the presence of a microorganism. ## HOW TO USE IT To begin the user has to select: 1. one electron donor and one electron acceptor from the organic half-reactions or from the inorganic half-reactions. 2. After that it will be selected the empirical chemical formula of the cells or input the molar relationship between the four main elements (C, H, O and N). 3. Then the user has to define the N-source to the biomass synthesis half-reaction, it is possible to choose between four different N-sources (NH4+, NO3-, NO2- or N2). 4. With this information the user has to decide the thermodynamic approach to write the balanced biochemical equation, is possible select between TEEM1 or TEEM2, if the user choose TEEM2 is necessary define the number of oxygenase reactions per mole of substrate introducing a entire number in the “q” parameter. 6. To finish the necessary input data the user has to define the energy transfer efficiency (ε) to the biochemical process. With all these information is possible execute MbT-tool clicking on the button “calculate”. With the button “download” the user can obtain the displayed information in one archive with “.txt” extension. ## HOW IT WORKS When the user clicks on the button calculate, the first procedure that the MbT-tool executes is creating a square matrix of i-rows by i-columns called “Reactions”. The number (i) of rows and the columns is the same and represents the number of chemical species programmed in the source code of the tool. Each row stores all numerical coefficients of each reduction-half-reaction with its Gibb’s standard free energy. Therefore each chemical species uses a different column and each half-reactions uses a different row. In all of the cases (except Gibb’s standard free energy) if the numerical coefficient is positive means reaction reactant and if is negative means reaction product. When the matrix reactions is ready, MbT-tool select from its rows the electron donor (Rd) and the electron acceptor (Ra) taking into account the user selection about these half-reactions, and place the corresponding information in different matrixes, the matrix called “Rd” for Rd and the matrix called “Ra” for Ra. In the case of the Rd also is establish what chemical compound is the electron source, this last information will be used in the yield prediction calculations. With the matrixes Rd and Ra ready, MbT-tool setups Rc taking into account the user selection about the microorganism empirical chemical formula and the N-source. This information is stored in a matrix called “b-biomass”. The next step is make the thermodynamic calculations following the mathematical expressions of TEEM taking into account the user selection between TEEM1 or TEEM2, if the TEEM2 model is selected, MbT-tool use value of the parameter “q” that represents the number of oxygenase reactions per mole of substrate, the default value for “q” is zero. Into the thermodynamic calculations the Gibb’s free energy for Rc (∆Gpc) is evaluate depending on the N-source and the estimate value of 3.33 kJ per gram cells (McCarty, 1971; Rittmann and McCarty, 2001). This value is referred to the empirical cell formula of C5H7O2N (Rittmann and McCarty, 2001) and MbT-tool adjust it depending of the user selection about the microorganism empirical chemical formula. To complete the information MbT-tool uses the value of energy-transfer-efficiency (ε) selected by the user. With all this information MbT-tool displays the half-reactions of Rd and Ra with their Gibb’s free energy, the Rc, Re, Rs, the portion of electrons (feo) to generate energy, the portion of electrons (fso) cell synthesis, the energy-transfer-efficiency, the balanced equation (R) in which the microorganisms responsible for the process are included and also the values of bacterial yield prediction using the units (gcells moldonor-1), (molCcells moldonor-1) and (molCcells molCdonor-1). ## THINGS TO NOTICE If the result of the combination between the selectees electron donor and electron acceptor is outside of TEEM1 or TEEM2 scope the MbT-tool doesn´t continue with its calculation and the user view this error message on the screen “With this combination of electron donor and electron acceptor, is not possible write a global reaction. Please select another combination or change the efficiency value”. If the user selects the same half-reaction to electron donor and electron acceptor MbT-tool doesn´t continue with its calculations and the user view this message on the screen “It is not possible that the electron donor is equal to the electron acceptor”. ## THINGS TO TRY To obtain a balanced biochemical equation fitted to the experimental data the user could move the slider “efficiency” and run MbT-tool again. The user has to compare de bacterial yield prediction obtained between different N-sources for the biomass synthesis, and also between the results obtained from TEEM1 or TEEM2 ## EXTENDING THE PROGRAM In the code tab the user could add another half-reaction for the electron donor or for the electron acceptor, using the chemical species programmed just adding another row and also is possible add another chemical specie just adding another column to the matrix “reactions”. The reactants must to be writing with positive coefficient and the products of the new half-reaction must to be writing with negative coefficient. When the user include a new half-reaction is necessary declare it on the chosen menus “Electron_donor” and “Electron_acceptor”. In the case that a new chemical specie is added, is necessary add another reduction-half-reaction, the user must to follow the following steps to do it: i) modify (increase) the number called “column_matrix” this indicates the number of chemical species programmed in the current version of MbT-tool, with the changes on this number the user modifies the number of rows and columns of the matrix “Reactions”, ii) add the new reaction name on the sliders to select “Electron_donor” and “Electron_acceptor”, iii) add new lines of code in the section-code to define the electron donor and the electron acceptor, and iv) add new lines of code in the procedure called “output_all”. ## NETLOGO FEATURES MbT-tool is programed using built-in language primitives and the extension "matrix" of NetLogo. To extend the utility could be necessary program the possibility of write biochemical equations using more than one electron donor or more than one electron acceptor. ## CREDITS AND REFERENCES MbT-Tool. Microbial metabolism as biochemical equations based on thermodynamics: An open-access tool. Araujo P., Gras A. and Ginovart M. - 2016 This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.3.1 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go count turtles @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@