BeginPackage["BasicBiochemData2`"];

BasicBiochemData2

Data and Programs for Biochemical Thermodynamics

Robert A. Alberty
Department of Chemistry 6-215
Massachusetts Institute of Technology
Cambridge, MA 02139
alberty@mit.edu

Abstract:  The objective of this package is to give the basic thermodynamic data on a large number of species involved in biochemical reactions at 298.15 K, 1 bar, and zero ionic strength and show how to use these data to calculate apparent equilibrium constants K' of biochemical reactions at desired pHs and ionic strengths.  Biochemical reactions are written in terms of sums of species, which are referred to as reactants.  The thermodynamic properties of reactants are referred to as transformed properties because the pH is specified.  Programs are given for calculating the standard thermodynamic properties of reactants from the basic data on species.  Four tables are included to show how the standard transformed Gibbs energies of formation and standard transformed enthalpies of formation of 131 reactants depend on pH and ionic strength.  Programs are given for the calculation of apparent equilibrium constants and other thermodynamic properties of reactions by simply typing in the reaction in the computer.  Examples are given of various uses of these tables, including how to plot the various properties versus pH.

1.0  Introduction

The objective of this package is to give the basic thermodynamic data on a large number of species involved in biochemical reactions at 298.15 K, 1 bar, and zero ionic strength and show how to use these data to calculate apparent equilibrium constants K' of biochemical reactions at desired pHs and ionic strengths.  Programs are given for making all of these calculations and more.  The apparent equilibrium constant is related to the standard transformed Gibbs energy of reaction \(TraditionalForm\`\(Δ\_r\) G'\^o\)and to the standard transformed Gibbs energies of the reactants (Subscript[Δ, f])\(G\_i'\^o\)by (ref. 1-3)
\(TraditionalForm\`\(Δ\_r\) G'\^o\)= ∑ (Subscript[ν, i])'(Subscript[Δ, f])\(G\_i'\^o\)	= - RT ln K'										(1)
The (Subscript[ν, i])' are the stoichiometric numbers of reactants in the biochemical equation (positive for reactants on the right side of the equation and negative for reactants on the left side).  The prime is needed on the stoichiometric numbers to distinguish them from the stoichiomeric numbers in the underlying chemical reactions.  The standard transformed enthalpy of reaction \(TraditionalForm\`\(Δ\_r\) H'\^o\)(heat of reaction) is related to the standard transformed enthalpies of formation (Subscript[Δ, f])\(H\_i'\^o\)of the reactants by 
\(TraditionalForm\`\(Δ\_r\) H'\^o\)= ∑ (Subscript[ν, i])'(Subscript[Δ, f])\(H\_i'\^o\)												(2)
These thermodynamic properties are functions of the pH and ionic strength, and they can be calculated from the standard Gibbs energies of formation (Subscript[Δ, f])(G^◦)and standard enthalpies of formation (Subscript[Δ, f])(H^◦)of the species involved.  The (Subscript[Δ, f])\(G\_i'\^o\)values of 131 reactants as functions of pH and ionic strength and the (Subscript[Δ, f])\(H\_i'\^o\)values of 69 reactants are calculated using the Mathematica programs calcdGmat and calcdHmat (ref. 4).   These functions make it possible to calculate values of these properties at 298.15 K and at pHs in the range 5 to 9 and ionic strengths in the range 0 to 0.35 M.  
	The following tables are given and can be printed out:
table1 gives standard transformed Gibbs energies of formation of 131 reactants at pH 7 and ionic strengths of 0, 0.10, and 0.25 M.
table2 gives standard transformed Gibbs energies of formation of 131 reactants at ionic strength 0.25 M and pH values of 5, 6, 7, 8, and 9.
table3 gives standard transformed enthalpies of formation of 69 reactants at pH 7 and ionic strengths of 0, 0.10, and 0.25 M.
table4 gives standard transformed enthalpies of formation of 69 reactants at ionic strength 0.25 M and pH values of 5, 6, 7, 8, and 9.
These tables can be used to calculate (Subscript[Δ, r])(G^′)◦and (Subscript[Δ, r])(H^′)◦at pH 7 and ionic strengths of 0, 0.10, and 0.25 M or at ionic strength 0.25 M and pHs of 5, 6, 7, 8, and 9 for any reaction for which all the reactants are in these tables.  They can also be used to calculate standard apparent reduction potentials.  The species data can be used to calculate average bindings of hydrogen ions by reactants.  Mathematica programs for carrying out these calculations are provided.
	The basic thermodynamic data comes from classical thermodynamic tables and from experimental measurements of K' and (Subscript[Δ, r])\(H'\^◦\)at a particular pH and ionic strength together with measurements of acid dissociation constants.  Some biochemical reactants consist of a single species, but others are sums of species; for example, ATP is made up of the species (ATP^(4-)), (HATP^(3-)), and (Subscript[H, 2]) (ATP^(2-)) in the pH range 4 to 10 in the absence of metal ions that are bound reversibly.  Therefore, the basic thermodynamic data on biochemical reactions includes the standard Gibbs energies of formation (Subscript[Δ, f])(G^◦)and the standard enthalpies of formation (Subscript[Δ, f])(H^◦)of species at zero ionic strength.    
	The basic data stored for each species is a list of { (Subscript[Δ, f])(G^◦),(Subscript[Δ, f])(H^◦),(Subscript[z, i]),(Subscript[N, Hi])}, where (Subscript[z, i]) is the charge number, and (Subscript[N, Hi]) is the number of hydrogen atoms in the species.  When a reactant is made up of more than one species, the basic data is represented by a matrix with a row for each species.  The values of the standard transformed Gibbs energies of formation (Subscript[Δ, f])(G^′)◦and standard transformed enthalpies of formation (Subscript[Δ, f])(H^′)◦ of these species are functions of pH and ionic strength, where the effects of ionic strength are calculated using the extended Debye-Huckel equation and the effects of pH are calculated using the number of hydrogen atoms in the species.  These functions for reactants are calculated using the Mathematica programs calcdGmat and calcdHmat.   
	This data base is set up in such a way that typing the name of a reactant, say atp (lower case letters are used because capital letters are used for Mathematica operations) yields the function of pH and ionic strength for (Subscript[Δ, f])(G^′)◦and typing the name atph yields the function of pH and ionic strength for (Subscript[Δ, f])(H^′)◦.  These functions can be evaluated at a specific pH and ionic strength by use of the replacement operator (/.), as illustrated by typing atp/.pH->7/.is->.1 or atp/.pH->{6,7,8}/.is->{0..1,.25}.  In addition the average number of hydrogen atoms in a reactant at specified pH and ionic strength can be calculated by taking the derivative of (Subscript[Δ, f])(G^′)◦ with respect to pH.  For example, the number of hydrogen atoms bound by ATP at pH 7 and 0.10 M ionic strength is given by 
(1/RTLog[10])*D[atp,pH]/.pH->7/.is->.1.  
	In writing chemical equations and biochemical equations it is important to be careful with names of reactants.  Chemical reactions are written in terms of species.  In chemical reaction equations, atoms of all elements and electric charges must balance.  Biochemical reaction equations are written in terms of reactants, that is in terms of sums of species, \(\(H\^+\)\)is not included as a reactant and electric charges are not shown or balanced.  In biochemical reaction equations, atoms of all elements other than hydrogen must balance.  The names of the reactants that must be used in making calculations with this data base are given later. 
	 The program calctrGerx can be used to calculate the standard transformed Gibbs energy of reaction (Subscript[Δ, r])(G^′)◦for a biochemical reaction in the form atp+h2o+de=adp+pi, where de is required for the Mathematica operation Solve.  The desired pHs and ionic strengths can be specified.  The program calckprime can be used to calculate the apparent equilibrium constant K' for a reaction at desired pHs and ionic strengths.  The program calctrGerx can also be used to calculate (Subscript[Δ, f])(H^′)◦by typing in a biochemical reaction in the form atph+h2oh+de=adph+pih.    
	When oxidation and reduction are involved in an enzyme-catalyzed reaction, the standard apparent reduction potential for a half reaction can be calculated by typing the half reaction in calcappredpot and specifying the pHs and ionic strengths.  
	The mathematical functions for the standard transformed Gibbs energies of formation of biochemical reactants contain information about the average number of hydrogen atoms bound, as mentioned above.  The change in binding of hydrogen atoms in a biochemical reaction can be calculated by taking the difference between products and reactants, but in using Mathematica there is an easier way and that is to take the derivative of (Subscript[Δ, r])(G^′)◦with respect to pH:  
(Subscript[Δ, r])(Subscript[N, H])= (1/RTln(10))(d(Subscript[Δ, r])(G^′)◦/dpH)										(3)  
	The equilibrium composition for an enzyme-catalyzed reaction or a series of enzyme-catalyzed reactions can be calculated by using equcalcc or equcalccrx.  The first of these programs requires a conservation matrix.  The second requires a stoichiometric matrix.  The second program is recommended, especially when water is involved as a reactant, because the convention that when dilute aqueous solutions are considered, the activity of water is taken to be unity, means that a second Legendre transform is necessary.   
	This version of the package provides eleven additional programs.  One of the prgrams calcdGHT makes it possible to take the effect of temperature into account if enthalpy data are available (ref. 6).  The uses of these programs are illustrated in the notebook.
	Since the standard thermodynamic properties of adenosine have been determined (ref. 7), new values are given for the ATP series.  These changes do not change the values of apparent equilibrium constants that are calculated between reactants in this series, but will be useful in investigating the production of adenosine..
	The current table can be considerably extended by use of the compilations of Goldberg and Tewari of evaluated equilibrium data on biochemical reactions (ref. 8).  Akers and Goldberg have published "BioEqCalc; A Package for Performing Equilibrium Calculations in Biohemical Reactions" (ref. 9).
	I am indebted to NIH 5-R01-GM48358 for support of the research that produced these tables and to Robert A. Goldberg and Ian Brooks for many helpful discussions.
	References:
1.  Alberty, R. A. Biophys. Chem. 1992 42, 117; 1992 43, 239.	
2.  Alberty, R. A.; Goldberg, R. N. Biochemistry 1992 31, 10610.
3.  Alberty, R. A. J. Phys. Chem. 1992 96, 9614.
4.  Alberty, R. A. Arch. Biochem. Biophys. 1998 353, 116; 1998  358, 25.
5.  Alberty, R. A. J. Phys. Chem. B 2001 105, 7865.
6.  Boerio-Goates, J.; Francis, M. R.; Goldberg, R. N.; Ribeiro da Silva, M. A. V.; Ribeiro da Silva, M. D. M. C.; Tewari, Y.  J. Chem. Thermo. 2001 33, 929.
7.  Goldberg, R. N. J. Phys. Chem. Ref. Data 1999 28, 931 and earlier articles in this series. 
8.  Akers, D. L.; Goldberg, R. N. Mathematica J. 2001 8, 1.  (URL: http://www.mathematica-journal.com/issue/v8i1/)

Off[General::spell, General::spell1];

    
calcdGmat::usage = "calcdGmat[speciesmat_] produces the function of \
pH and ionic strength (is) that gives the standard transformed Gibbs energy \
of formation of a reactant (sum of species) at 298.15 K.  The input \
speciesmat is a matrix that gives the standard Gibbs energy of formation, the \
standard enthalpy of formation, the electric charge, and the number of \
hydrogen atoms in each species. There is a row in the matrix for each species \
of the reactant. gpfnsp is a list of the functions for the species.  Energies \
are expressed in kJ mol^-1.";
calcdG3I::usage = "calcdG3I[reactantname_] produces the standard \
transformed Gibbs energies of formation at 298 K, pH 7, and ionic strengths \
of 0, 0.10, and 0.25 M.  The reactant name calls a function of pH and ionic \
strength or a constant.";
calcdG5pH::usage = "calcG5pH[reactantname_] produces the standard \
transformed Gibbs energies of formation at 298 K, ionic strength 0.25 M and \
pHs 5, 6, 7, 8, and 9.  The reactant name calls a function of pH and ionic \
strength.";
calcdHmat::usage = "calcdHmat[speciesmat_] produces the function of \
pH and ionic strength that gives the standard transformed enthalpy of \
formation of a reactant (sum of species) at 298.15 K.  The input is a matrix \
that gives the standard Gibbs energy of formation,the standard enthalpy of \
formation, the electric charge,and the number of hydrogen atoms in the \
species in the reactant.  There is a row in the matrix for each species of \
the reactant.  dhfnsp is a list of the functions for the species.  Energies \
are expressed in kJ mol^-1.";
calcdH3I::usage = "calcdH3I[reactanth_] produces the standard \
transformed enthalpies of formation at 298 K,pH 7,and ionic strengths of \
0,0.10,and 0.25 M.The reactanth name calls a function of pH and ionic \
strength or a constant.";
calcdH5pH::usage = "calcdHpH[reactanth_] produces the standard \
transformed enthalpies of formation at 298 K, ionic strength 0.25 M and pHs \
5, 6, 7, 8, and 9.  The reactanth name with hf calls a function of pH and \
ionic strength or a constant.";
calctrGerx::usage = "calctrGerx[eq_,pHlist_,islist_] produces the \
standard transformed Gibbs energy of reaction in kJ mol^-1 at specified pHs \
and ionic strengths for a biochemical equation typed in the form \
atp+h2o+de==adp+pi.  The names of the reactants call the corresponding \
functions of pH and ionic strength. pHlist and islist can be lists.";
calckprime::usage = "calckprime[eq_,pHlist_,islist_] produces the \
apparent equilibrium constant K' at specified pHs and ionic strengths for a \
biochemical equation typed in the form atp+h2o+de==adp+pi.  The names of the \
reactants call the corresponding functions of pH and ionic strength. pHlist \
and islist can be lists.";
calcpK::usage = "calcpK[speciesmat_,no_,is_] calculates pKs of weak \
acids.";
calcdGHT::usage = "calcdGHT[speciesmat_] calculates the effect of \
temperature on transformed thermodynamic properties.";
calcGef1sp::usage = "calcGef1sp[equat_,pH_,ionstr_,z1_,nH1_] \
calculates the standard Gibbs energy of formation of the species of a \
reactant made up of a single species.";
calcGef2sp::usage = "calcGef2sp[equat_,pH_,ionstr_,z1_,nH1_,pK0_] \
calculates the standard Gibbs energies of formation of the two species of a \
reactant made up of a two species.";
\(\(calcGef3sp::usage = "calcGef3sp[equat_,pH_,ionstr_,z1_,nH1_,pK10_,pK20] calculates the standard Gibbs energies of formation of the three species of a reactant made up of a three species.";\)\)
calcNHrx::usage = "calcNHrx[eq_,pHlist_,islist_] calculates the \
change in binding of hydrogen ions in a biochemical reaction.";
rxthermotab::usage = "rxthermotab[eq_,pHlist_,islist_] calculates a \
table of standard transformed reaction Gibbs energies, apparent equilibrium \
constants, and changes in binding of hydrogen ions in a biochemical reaction.\
";
round::usage = "round[vec_,params_:{4,2}] rounds to the desired \
number of digits.";
mkeqm::usage = "mkeqm[c_List,s_List] types out a biochemical \
reaction from its stoichiometric number vector.";
nameMatrix::usage = "nameMatrix[m_List,s_List] types out the \
biochemical reactions in a system of biochemical reactions from the \
stoichiometric number matrix.";
calcappredpot::usage = "calcappredpot[eq_,nu_,pHlist_,islist_] \
calculates the standard apparent reduction potential of a half reaction at \
the desired pH and ionic strength.";
\(\(equcalcc::usage = "equcalcc[as_,lnk_,no_] calculates the equilibrium composition for a biochemical reaction or a series of biochemical reactions, given the conservation matrix, a list of transformed Gibbs energies of formation, and a list of initial concentrations of reactants.";\)\)
equcalcrx::usage = "equcalcrx[nt_,lnkr_,no_] calculates the \
equilibrium composition for a biochemical reaction or a series of biochemical \
reactions, given the transposed stoichiometric number matrix, the apparent \
equilibrium constants of the reactons, and a list of initial concentrations \
of reactants.";
listfnpHis::usage = "listfnpHis is a list of functions, like atp, \
that gives the standard transformed Gibbs energies of formation of reactants.\
";
listspeciesdata::usage = "listspeciesdata is a list of names, like \
atpsp, of data files on the species of a reactant.";
listdG3I::usage = "listdG3I is a list of vectors, like atpis, that \
give the values of the standard transformed Gibbs energies of formation at pH \
7 and 3 ionic strengths.";
list::usage = "list is a list of names of reactants, each in \
quotation marks.";
listreactantspH::usage = "listreactantspH is a list of vectors, \
like atppH,that give the values of the standard transformed Gibbs energy of \
formation of a reactant at 5 pH values.";
listreactantsh::usage = "listreactantsh is a list of the names in \
quotation marks for the reactants for which the standard transformed enthalpy \
of formation is calculated.";
listhisreactants::usage = "listhisreactants is a vector of the \
values of standard transformed enthalpies of formation of reactants at three \
ionic strengths.";
listfnpHish::usage = "listfnpHish is a function of pH and ionic \
strength that gives the standard transformed enthalpy of formation of a \
reactant.";
listspeciesdatah::usage = "listspeciesdatah is a list of names, \
like atpsp, of data files on the species of a reactant for which the enthalpy \
is known.";
listhpHreactants ::usage = "listhpHreactants is a list of names of \
reactants, like atphpH, that give the values of the standard transformed \
enthalpy of formation at 5 pH values.";
pH::usage = "pH is an independent variable.";
is::usage = "is is ionic strength, which is an independent \
variable.";
atp::usage = "atp is the name of a reactant that yields a function \
of pH and ionic strength for the standard transformed Gibbs energy of \
formation.";
atpsp::usage = "atpsp yields the basic data on the species of the \
reactant.";
atpis::usage = "atpis yields the standard transformed Gibbs energy \
of a reactant at 3 values of the ionic strength.";
atppH::usage = "atppH yields the standard transformed Gibbs energy \
of a reactant at 5 values of the ionic strength.";
atph::usage = "atph yields the function of pH and ionic strength \
that gives the standard transformed enthalpy of formation of atp.";
atphis::usage = "atphis yields the standard transformed enthaply of \
atp at 3 ionic strengths.";
atphpH::usage = "atphis yields the standard transformed enthaply of \
atp at 5 pH values.";
table1::usage = "table1 produces a table of standard transformed \
Gibbs energies of formation of reactants at pH 7 and ionic strengths of 0, \
0.10, and 0.25 M.";
table2::usage = "table2 produces a table of standard transformed \
Gibbs energies of formation of reactants at ionic strength 0.25 M and pHs of \
5, 6, 7, 8, and 9.";
table3::usage = "table3 produces a table of standard transformed \
enthalpies of formation of reactants at pH 7 and ionic strengths of 0, 0.10, \
and 0.25 M.";
table4::usage = "table4 produces a table of standard transformed \
enthalpies of formation of reactants atonic strengths 0.25 M and pHs of 5, 6, \
7, 8, and 9.";

Begin["BasicBiochemData2`Private`"]

2.0  Basic data on the species that make up a reactant.

acetaldehydesp={{-139.,-212.23,0,4}};
acetatesp={{-369.31,-486.01,-1,3},{-396.45,-485.76,0,4}};
acetonesp={{-159.7,-221.71,0,6}};
acetylcoAsp={{-180.36,_,0,3}};
acetylphossp={{-1219.49,_,-2,3},{-1269.08,_,-1,4},{-1298.26,_,0,5}};
aconitatecissp={{-917.13,_,-3,3}};
adeninesp={{310.67,_,0,5},{286.7,_,1,6}};
adenosinesp={{-194.5,-621.3,0,13},{-214.28,637.7,1,14}};
adpsp={{-1906.13,-2626.54,-3,12},{-1947.1,-2620.94,-2,
        13},{-1971.98,-2638.54,-1,14}};
alaninesp={{-371.,-554.8,0,7}};
ammoniasp={{-26.5,-80.29,0,3},{-79.31,-132.51,1,4}};
ampsp={{-1040.45,-1635.37,-2,12},{-1078.86,-1629.97,-1,
        13},{-1101.63,-1648.07,0,14}};
arabinosesp={{-742.23,-1043.79,0,10}};
asparagineLsp={{-525.93,-766.09,0,8}};
aspartatesp={{-695.88,-943.41,-1,6}};
atpsp={{-2768.1,-3619.21,-4,12},{-2811.48,-3612.91,-3,
        13},{-2838.18,-3627.91,-2,14}};
bpgsp={{-2356.14,_,-4,4},{-2401.58,_,-3,5}};
butanolnsp={{-171.84,_,0,10}};
butyratesp={{-352.63,_,-1,7}};
citratesp={{-1162.69,-1515.11,-3,5},{-1199.18,-1518.46,-2,
        6},{-1226.33,-1520.88,-1,7}};
citrateisosp={{-1156.04,_,-3,5},{-1192.57,_,-2,6},{-1219.47,_,-1,7}};
coAsp={{0,_,-1,0},{-47.83,_,0,1}};
coAglutathionesp={{-35.85,_,-1,15}};
co2gsp={{-394.36,-393.5,0,0}};
co2totsp={{-527.81,-677.14,-2,0},{-586.77,-691.99,-1,1},{-623.11,-699.63,0,
        2}};
coaqsp={{-119.9,-120.96,0,0}};
cogsp={{-137.17,-110.53,0,0}};
creatinesp={{-259.2,_,0,9}};
creatininesp={{-23.14,_,0,7}};
cysteineLsp={{-291.,_,-1,6},{-338.82,_,0,7}};
cystineLsp={{-666.51,_,0,12}};
cytochromecoxsp={{0,_,3,0}};
cytochromecredsp={{-24.51,_,2,0}};
dihydroxyacetonephossp={{-1296.26,_,-2,5},{-1328.8,_,-1,6}};
ethanolsp={{-181.64,-288.3,0,6}};
ethylacetatesp={{-337.65,-482.,0,8}};
fadoxsp={{0,_,-2,31}};
fadredsp={{-38.88,_,-2,33}};
fadenzoxsp={{0,_,-2,31}};
fadenzredsp={{-88.6,_,-2,33}};
ferredoxinoxsp={{0,_,1,0}};
ferredoxinredsp={{38.07,_,0,0}};
fmnoxsp={{0,_,-2,19}};
fmnredsp={{-38.88,_,-2,21}};
formatesp={{-351.,-425.55,-1,1}};
fructosesp={{-915.51,-1259.38,0,12}};
fructose6phossp={{-1760.8,_,-2,11},{-1796.6,_,-1,12}};
fructose16phossp={{-2601.4,_,-4,10},{-2639.36,_,-3,11},{-2673.89,_,-2,12}};
fumaratesp={{-601.87,-777.39,-2,2},{-628.14,-774.46,-1,3},{-645.8,-774.88,0,
        4}};
galactosesp={{-908.93,-1255.2,0,12}};
galactose1phossp={{-1756.69,_,-2,11},{-1791.77,_,-1,12}};
glucosesp={{-915.9,-1262.19,0,12}};
glucose1phossp={{-1756.87,_,-2,11},{-1793.98,_,-1,12}};
glucose6phossp={{-1763.94,-2276.44,-2,11},{-1800.59,-2274.64,-1,12}};
glutamatesp={{-697.47,-979.89,-1,8}};
glutaminesp={{-528.02,-805.,0,10}};
glutathioneoxsp={{0,_,-2,30}};
glutathioneredsp={{34.17,_,-2,15},{-13.44,_,-1,16}};
glyceraldehydephossp={{-1288.6,_,-2,5},{-1321.14,_,-1,6}};
glycerolsp={{-497.48,-676.55,0,8}};
glycerol3phossp={{-1358.96,_,-2,7},{-1397.04,_,-1,8}};
glycinesp={{-379.91,-523.,0,5}};
glycolatesp={{-530.95,_,-1,3}};
glycylglycinesp={{-520.2,-734.25,0,8}};
glyoxylatesp={{-468.6,_,-1,1}};
h2aqsp={{17.6,-4.2,0,2}};
h2gsp={{0,0,0,2}};
h2osp={{-237.19,-285.83,0,2}};
h2o2aqsp={{-134.03,-191.17,0,2}};
hydroionsp={{0,0,1,1}};
hydroxypropionatebsp={{-518.4,_,-1,5}};
hypoxanthinesp={{89.5,_,0,4}};
indolesp={{223.8,97.5,0,7}};
ketoglutaratesp={{-793.41,_,-2,4}};
lactatesp={{-516.72,-686.64,-1,5}};
lactosesp={{-1567.33,-2233.08,0,22}};
leucineisoLsp={{-343.9,_,0,13}};
leucineLsp={{-352.25,-643.37,0,13}};
lyxosesp={{-749.14,_,0,10}};
malatesp={{-842.66,_,-2,4},{-872.68,_,-1,5}};
maltosesp={{-1574.69,-2238.06,0,22}};
mannitolDsp={{-942.61,_,0,14}};
mannosesp={{-910.,-1258.66,0,12}};
methanegsp={{-50.72,-74.81,0,4}};
methaneaqsp={{-34.33,-89.04,0,4}};
methanolsp={{-175.31,-245.93,0,4}};
methionineLsp={{-502.92,_,0,11}};
methylamineionsp={{-39.86,-124.93,1,6}};
n2aqsp={{18.7,-10.54,0,0}};
n2gsp={{0,0,0,0}};
nadoxsp={{0,0,-1,26}};
nadredsp={{22.65,-31.94,-2,27}};
nadpoxsp={{-835.18,0,-3,25}};
nadpredsp={{-809.19,-29.18,-4,26}};
o2aqsp={{16.4,-11.7,0,0}};
o2gsp={{0,0,0,0}};
oxalatesp={{-673.9,825.1,-2,0},{-698.33,_,-1,1}};
oxaloacetatesp={{-793.29,_,-2,2}};
oxalosuccinatesp={{-1138.88,_,-2,4}};
palmitatesp={{-259.4,_,-1,31}};
pepsp={{-1263.65,_,-3,2},{-1303.61,_,-2,3}};
pg2sp={{-1496.38,_,-3,4},{-1539.99,_,-2,5}};
pg3sp={{-1502.54,_,-3,4},{-1545.52,_,-2,5}};
phenylalanineLsp={{-207.1,_,0,11}};
pisp={{-1096.1,-1299.,-2,1},{-1137.3,-1302.6,-1,2}};
propanol2sp={{-185.23,-330.83,0,8}};
propanolnsp={{-175.81,_,0,8}};
ppisp={{-1919.86,-2293.47,-4,0},{-1973.86,-2294.87,-3,
        1},{-2012.21,-2295.37,-2,2},{-2025.11,-2290.37,-1,
        3},{-2029.85,-2281.17,0,4}};
pyruvatesp={{-472.27,-596.22,-1,3}};
retinalsp={{0,_,0,28}};
retinolsp={{-27.91,_,0,30}};
ribosesp={{-738.79,-1034.,0,10}};
ribose1phossp={{-1574.49,_,-2,9},{-1612.67,_,-1,10}};
ribose5phossp={{-1582.57,-2041.48,-2,9},{-1620.75,-2030.18,-1,10}};
ribulosesp={{-735.94,-1023.02,0,10}};
serineLsp={{-510.87,_,0,7}};
sorbosesp={{-911.95,-1263.3,0,12}};
succinatesp={{-690.44,-908.68,-2,4},{-722.62,-908.84,-1,5},{-746.64,-912.2,0,
        6}};
succinylcoAsp={{-509.72, _, -1, 4}, {-533.76, _, 0, 
  5}};
sucrosesp={{-1564.7,-2199.87,0,22}};
thioredoxinoxsp={{0,_,0,0}};
thioredoxinredsp={{69.88,_,-2,0},{20.56,_,-1,1},{-25.37,_,0,2}};
tryptophaneLsp={{-114.7,-405.2,0,12}};
tyrosineLsp={{-370.7,_,0,11}};
ubiquinoneoxsp={{0,_,0,90}};
ubiquinoneredsp={{-89.92,_,0,92}};
uratesp={{-325.9,_,-1,3}};
ureasp={{-202.8,-317.65,0,4}};
uricacidsp={{-356.9,_,0,4}};
valineLsp={{-358.65,-611.99,0,11}};
xylosesp={{-750.49,-1045.94,0,10}};
xylulosesp={{-746.15,-1029.65,0,10}};

These thermodynamic values are based on the usual conventions of chemical thermodynamic tables that (Subscript[Δ, f])(G^◦)= (Subscript[Δ, f])(H^◦)= 0 for elements in defined reference states and for (SuperPlus[H])(a=1).  Additional conventions are that (Subscript[Δ, f])(G^◦)= (Subscript[Δ, f])(H^◦)= 0 for \(TraditionalForm\`\(coA\^-\), \ FAD\_ox\^\(\(2\)\(-\)\), \ 
      FADenz\^\(\(2\)\(-\)\), cytochromec\^\(\(3\)\(+\)\), \ 
      ferredoxin\_ox\^\(-4\), \ FMN\^\(\(2\)\(-\)\), \ 
      glutathiome\_ox\^\(\(2\)\(-\)\), \ NAD\_ox\^\(-1\), \ 
      NADP\_ox\^\(\(3\)\(-\)\), \ retinal\^0, \ thioredoxin\_ox\^0, \ 
      and\ \(\(ubiquinone\_ox\^0\)\(.\)\)\)

3.0  Calculation of the functions of pH and ionic strength for the standard transformed Gibbs energy of formation of reactants.

calcdGmat[speciesmat_] := 
Module[{dGzero, zi, nH, pHterm, isterm,gpfnsp},(*This program produces the function of pH and ionic strength (is) that gives the standard transformed Gibbs energy of formation of a reactant (sum of species) at 298.15 K.  The input speciesmat is a matrix that gives the standard Gibbs energy of formation, the standard enthalpy of formation, the electric charge, and the number of hydrogen atoms in each species. There is a row in the matrix for each species of the reactant. gpfnsp is a list of the functions for the species.  Energies are expressed in kJ mol^-1.*)
dGzero = speciesmat[[All,1]];
zi = speciesmat[[All,3]];
nH = speciesmat[[All,4]];
pHterm = nH*8.31451*.29815*Log[10^-pH];
isterm = 2.91482*((zi^2) - nH)*(is^.5)/(1 + 1.6*is^.5);
gpfnsp=dGzero - pHterm - isterm;
-8.31451*.29815*Log[Apply[Plus,Exp[-1*gpfnsp/(8.31451*.29815)]]]]

The following is a list of names of the reactants.  After the calculation using calcdGmat, typing one of these names yields the function of pH and ionic strength that gives the standard transformed Gibbs energy of formation of the reactant at 298.15 K in dilute aqueous solution.

listfnpHis = {acetaldehyde, acetate, acetone, acetylcoA, acetylphos, 
          aconitatecis, adenine, adenosine, adp, alanine, ammonia, amp, 
          arabinose, asparagineL, aspartate, atp, bpg, butanoln, butyrate, 
          citrate, citrateiso, coA, coAglutathione, co2g, co2tot, coaq, cog, 
          creatine, creatinine, cysteineL, cystineL, cytochromecox, 
          cytochromecred, dihydroxyacetonephos, ethanol, ethylacetate, fadox, 
          fadred, fadenzox, fadenzred, ferredoxinox, ferredoxinred, fmnox, 
          fmnred, formate, fructose, fructose6phos, fructose16phos, fumarate, 
          galactose, galactose1phos, glucose, glucose1phos, glucose6phos, 
          glutamate, glutamine, glutathioneox, glutathionered, 
          glyceraldehydephos, glycerol, glycerol3phos, glycine, glycolate, 
          glycylglycine, glyoxylate, h2aq, h2g, h2o, h2o2aq, 
          hydroxypropionateb, hypoxanthine, indole, ketoglutarate, lactate, 
          lactose, leucineisoL, leucineL, lyxose, malate, maltose, mannitolD, 
          mannose, methaneaq, methaneg, methanol, methionineL, 
          methylamineion, n2aq, n2g, nadox, nadred, nadpox, nadpred, o2aq, 
          o2g, oxalate, oxaloacetate, oxalosuccinate, palmitate, pep, pg2, 
          pg3, phenylalanineL, pi, ppi, propanol2, propanoln, pyruvate, 
          retinal, retinol, ribose, ribose1phos, ribose5phos, ribulose, 
          serineL, sorbose, succinate, succinylcoA, sucrose, thioredoxinox, 
          thioredoxinred, tryptophaneL, tyrosineL, ubiquinoneox, 
          ubiquinonered, urate, urea, uricacid, valineL, xylose, 
          xylulose};

The following is a list of names of the entries in the basic thermodynamic data on species making up a reactant.

listspeciesdata = {acetaldehydesp, acetatesp, acetonesp, acetylcoAsp, 
          acetylphossp, aconitatecissp, adeninesp, adenosinesp, adpsp, 
          alaninesp, ammoniasp, ampsp, arabinosesp, asparagineLsp, 
          aspartatesp, atpsp, bpgsp, butanolnsp, butyratesp, citratesp, 
          citrateisosp, coAsp, coAglutathionesp, co2gsp, co2totsp, coaqsp, 
          cogsp, creatinesp, creatininesp, cysteineLsp, cystineLsp, 
          cytochromecoxsp, cytochromecredsp, dihydroxyacetonephossp, 
          ethanolsp, ethylacetatesp, fadoxsp, fadredsp, fadenzoxsp, 
          fadenzredsp, ferredoxinoxsp, ferredoxinredsp, fmnoxsp, fmnredsp, 
          formatesp, fructosesp, fructose6phossp, fructose16phossp, 
          fumaratesp, galactosesp, galactose1phossp, glucosesp, 
          glucose1phossp, glucose6phossp, glutamatesp, glutaminesp, 
          glutathioneoxsp, glutathioneredsp, glyceraldehydephossp, 
          glycerolsp, glycerol3phossp, glycinesp, glycolatesp, 
          glycylglycinesp, glyoxylatesp, h2aqsp, h2gsp, h2osp, h2o2aqsp, 
          hydroxypropionatebsp, hypoxanthinesp, indolesp, ketoglutaratesp, 
          lactatesp, lactosesp, leucineisoLsp, leucineLsp, lyxosesp, 
          malatesp, maltosesp, mannitolDsp, mannosesp, methaneaqsp, 
          methanegsp, methanolsp, methionineLsp, methylamineionsp, n2aqsp, 
          n2gsp, nadoxsp, nadredsp, nadpoxsp, nadpredsp, o2aqsp, o2gsp, 
          oxalatesp, oxaloacetatesp, oxalosuccinatesp, palmitatesp, pepsp, 
          pg2sp, pg3sp, phenylalanineLsp, pisp, ppisp, propanol2sp, 
          propanolnsp, pyruvatesp, retinalsp, retinolsp, ribosesp, 
          ribose1phossp, ribose5phossp, ribulosesp, serineLsp, sorbosesp, 
          succinatesp, succinylcoAsp, sucrosesp, thioredoxinoxsp, 
          thioredoxinredsp, tryptophaneLsp, tyrosineLsp, ubiquinoneoxsp, 
          ubiquinoneredsp, uratesp, ureasp, uricacidsp, valineLsp, xylosesp, 
          xylulosesp};

Now Map is used to apply calcdGmat to each of the matrices of species data.

Clear[acetaldehyde, acetate, acetone, acetylcoA, acetylphos, 
        aconitatecis, adenine, adenosine, adp, alanine, ammonia, amp, 
        arabinose, asparagineL, aspartate, atp, bpg, butanoln, butyrate, 
        citrate, citrateiso, coA, coAglutathione, co2g, co2tot, coaq, cog, 
        creatine, creatinine, cysteineL, cystineL, cytochromecox, 
        cytochromecred, dihydroxyacetonephos, ethanol, ethylacetate, fadox, 
        fadred, fadenzox, fadenzred, ferredoxinox, ferredoxinred, fmnox, 
        fmnred, formate, fructose, fructose6phos, fructose16phos, fumarate, 
        galactose, galactose1phos, glucose, glucose1phos, glucose6phos, 
        glutamate, glutamine, glutathioneox, glutathionered, 
        glyceraldehydephos, glycerol, glycerol3phos, glycine, glycolate, 
        glycylglycine, glyoxylate, h2aq, h2g, h2o, h2o2aq, 
        hydroxypropionateb, hypoxanthine, indole, ketoglutarate, lactate, 
        lactose, leucineisoL, leucineL, lyxose, malate, maltose, mannitolD, 
        mannose, methaneaq, methaneg, methanol, methionineL, methylamineion, 
        n2aq, n2g, nadox, nadred, nadpox, nadpred, o2aq, o2g, oxalate, 
        oxaloacetate, oxalosuccinate, palmitate, pep, pg2, pg3, 
        phenylalanineL, pi, ppi, propanol2, propanoln, pyruvate, retinal, 
        retinol, ribose, ribose1phos, ribose5phos, ribulose, serineL, 
        sorbose, succinate, succinylcoA, sucrose, thioredoxinox, 
        thioredoxinred, tryptophaneL, tyrosineL, ubiquinoneox, ubiquinonered, 
        urate, urea, uricacid, valineL, xylose, xylulose];

Evaluate[listfnpHis] = Map[calcdGmat, listspeciesdata];

The following shows an example of a function of pH and ionic strength for a reactant that gives the standard transformed Gibbs energy of formation.

atp

The value of the standard transformed Gibbs energy of formation of ATP at pH 7 and ionic strength 0.25 M can be calculated in kJ/mol as follows:

atp/.pH->7/.is->.25

The values at pHs 6, 7, and 8 and at ionic strengths 0 and 0.25 M can also be calculated.

atp/.pH->{6,7,8}/.is->{0,.25}

4.0  Calculation of a table of standard transformed Gibbs energies of formation of reactants at pH 7 and ionic strengths of 0, 0.10, and 0.25 M.

calcdG3I[reactantname_]:=Module[{out1,out2,out3},(*This program calculates the standard transformed Gibbs energies of formation at 298 K, pH 7, and ionic strengths of 0, 0.10, and 0.25 M.  The reactant name calls a function of pH and ionic strength or a constant.*)
out1=reactantname/.{pH->7,is->0};
out2=reactantname/.{pH->7,is->.1};
out3=reactantname/.{pH->7,is->.25};
{out1,out2,out3}];

This is a list of the three values to be calculated for each of the reactants.

listdG3I = {acetaldehydeis, acetateis, acetoneis, acetylcoAis, 
          acetylphosis, aconitatecisis, adenineis, adenosineis, adpis, 
          alanineis, ammoniais, ampis, arabinoseis, asparagineLis, 
          aspartateis, atpis, bpgis, butanolnis, butyrateis, citrateis, 
          citrateisois, coAis, coAglutathioneis, co2gis, co2totis, coaqis, 
          cogis, creatineis, creatinineis, cysteineLis, cystineLis, 
          cytochromecoxis, cytochromecredis, dihydroxyacetonephosis, 
          ethanolis, ethylacetateis, fadoxis, fadredis, fadenzoxis, 
          fadenzredis, ferredoxinoxis, ferredoxinredis, fmnoxis, fmnredis, 
          formateis, fructoseis, fructose6phosis, fumarate16phosis, 
          fumarateis, galactoseis, galactose1phosis, glucoseis, 
          glucose1phosis, glucose6phosis, glutamateis, glutamineis, 
          glutathioneoxis, glutathioneredis, glyceraldehydephosis, 
          glycerolis, glycerol3phosis, glycineis, glycolateis, 
          glycylglycineis, glyoxylateis, h2aqis, h2gis, h2ois, h2o2aqis, 
          hydroxypropionatebis, hypoxanthineis, indoleis, ketoglutarateis, 
          lactateis, lactoseis, leucineisoLis, leucineLis, lyxoseis, 
          malateis, maltoseis, mannitolDis, mannoseis, methaneaqis, 
          methanegis, methanolis, methionineLis, methylamineionis, n2aqis, 
          n2gis, nadoxis, nadredis, nadpoxis, nadpredis, o2aqis, o2gis, 
          oxalateis, oxaloacetateis, oxalosuccinateis, palmitateis, pepis, 
          pg2is, pg3is, phenylalanineLis, piis, ppiis, propanol2is, 
          propanolnis, pyruvateis, retinalis, retinolis, riboseis, 
          ribose1phosis, ribose5phosis, ribuloseis, serineLis, sorboseis, 
          succinateis, succinylcoAis, sucroseis, thioredoxinoxis, 
          thioredoxinredis, tryptophaneLis, tyrosineLis, ubiquinoneoxis, 
          ubiquinoneredis, urateis, ureais, uricacidis, valineLis, xyloseis, 
          xyluloseis};

Map is used to apply calcdG3I to each of the functions for reactants.

Clear[acetaldehydeis, acetateis, acetoneis, acetylcoAis, 
        acetylphosis, aconitatecisis, adenineis, adenosineis, adpis, 
        alanineis, ammoniais, ampis, arabinoseis, asparagineLis, aspartateis, 
        atpis, bpgis, butanolnis, butyrateis, citrateis, citrateisois, coAis, 
        coAglutathioneis, co2gis, co2totis, coaqis, cogis, creatineis, 
        creatinineis, cysteineLis, cystineLis, cytochromecoxis, 
        cytochromecredis, dihydroxyacetonephosis, ethanolis, ethylacetateis, 
        fadoxis, fadredis, fadenzoxis, fadenzredis, ferredoxinoxis, 
        ferredoxinredis, fmnoxis, fmnredis, formateis, fructoseis, 
        fructose6phosis, fumarate16phosis, fumarateis, galactoseis, 
        galactose1phosis, glucoseis, glucose1phosis, glucose6phosis, 
        glutamateis, glutamineis, glutathioneoxis, glutathioneredis, 
        glyceraldehydeis, glycerolis, glycerol3phosis, glycineis, 
        glycolateis, glycylglycineis, glyoxylateis, h2aqis, h2gis, h2ois, 
        h2o2aqis, hydroxypropionatebis, hypoxanthineis, indoleis, 
        ketoglutarateis, lactateis, lactoseis, leucineisoLis, leucineLis, 
        lyxoseis, malateis, maltoseis, mannitolDis, mannoseis, methaneaqis, 
        methanegis, methanolis, methionineLis, methylamineionis, n2aqis, 
        n2gis, nadoxis, nadredis, nadpoxis, nadpredis, o2aqis, o2gis, 
        oxalateis, oxaloacetateis, oxalosuccinateis, palmitateis, pepis, 
        pg2is, pg3is, phenylalanineLis, piis, ppiis, propanol2is, 
        propanolnis, pyruvateis, retinalis, retinolis, riboseis, 
        ribose1phosis, ribose5phosis, ribuloseis, serineLis, sorboseis, 
        succinateis, succinylcoAis, sucroseis, thioredoxinoxis, 
        thioredoxinredis, tryptophaneLis, tyrosineLis, ubiquinoneoxis, 
        ubiquinoneredis, urateis, ureais, uricacidis, valineLis, xyloseis, 
        xyluloseis];

Evaluate[listdG3I] = Map[calcdG3I, listfnpHis];

acetoneis

This is a list of the names of reactants.

\(\(list = {"acetaldehyde", "acetate", "acetone", "acetylcoA", "acetylphos", "aconitatecis", "adenine", "adenosine", "adp", "alanine", "ammonia", "amp", "arabinose", "asparagineL", "aspartate", "atp", "bpg", "butanoln", "butyrate", "citrate", "citrateiso", "coA", "coAglutathione", "co2g", "co2tot", "coaq", "cog", "creatine", "creatinine", "cysteineL", "cystineL", "cytochromecox", "cytochromecred", "dihydroxyacetonephos", "ethanol", "ethylacetate", "fadox", "fadred", "fadenzox", "fadenzred", "ferredoxinox", "ferredoxinred", "fmnox", "fmnred", "formate", "fructose", "fructose6phos", "fructose16phos", "fumarate", "galactose", "galactose1phos", "glucose", "glucose1phos", "glucose6phos", "glutamate", "glutamine", "glutathioneox", "glutathionered", "glyceraldehydephos", "glycerol", "glycerol3phos", "glycine", "glycolate", "glycylglycine", "glyoxylate", "h2aq", "h2g", "h2o", "h2o2aq", "hydroxypropionateb", "hypoxanthine", "indole", "ketoglutarate", "lactate", "lactose", "leucineisoL", "leucineL", "lyxose", "malate", "maltose", "mannitolD", "mannose", "methaneaq", "methaneg", "methanol", "methionineL", "methylamineion", "n2aq", "n2g", "nadox", "nadred", "nadpox", "nadpred", "o2aq", "o2g", "oxalate", "oxaloacetate", "oxalosuccinate", "palmitate", "pep", "pg2", "pg3", "phenylalanineL", "pi", "ppi", "propanol2", "propanoln", "pyruvate", "retinal", "retinol", "ribose", "ribose1phos", "ribose5phos", "ribulose", "serineL", "sorbose", "succinate", "succinylcoA", "sucrose", "thioredoxinox", "thioredoxinred", "tryptophaneL", "tyrosineL", "ubiquinoneox", "ubiquinonered", "urate", "urea", "uricacid", "valineL", "xylose", "xylulose"};\)\)

Table 1  Standard Transformed Gibbs Energies of Formation in kJ (mol^(-s)) at 298.15 K, pH 7, and Ionic Strengths of 0, 0.10, 
and 0.25 M

table1=PaddedForm[TableForm[listdG3I,TableHeadings->{list,{"I = 0 M","I = 0.10 M","I = 0.25 M"}},TableSpacing->{.3,3}],{8,2}]

5.0  Calculation of a table of standard transformed Gibbs energies of reactants at pH 5, 6, 7, 8, and 9 and ionic strength 0.25 M

calcdG5pH[reactantname_]:=Module[{out1,out2,out3,out4,out5},(*This program calculates the standard transformed Gibbs energies of formation at 298 K, ionic strength 0.25 M and pHs 5, 6, 7, 8, and 9.  The reactant name calls a function of pH and ionic strength.*)
out1=reactantname/.{pH->5,is->.25};
out2=reactantname/.{pH->6,is->.25};
out3=reactantname/.{pH->7,is->.25};
out4=reactantname/.{pH->8,is->.25};
out5=reactantname/.{pH->9,is->.25};
{out1,out2,out3,out4,out5}];

This is a list of the values to be calculated for each of the reactants.

listreactantspH = {acetaldehydepH, acetatepH, acetonepH, acetylcoApH, 
          acetylphospH, aconitatecispH, adeninepH, adenosinepH, adppH, 
          alaninepH, ammoniapH, amppH, arabinosepH, asparagineLpH, 
          aspartatepH, atppH, bpgpH, butanolnpH, butyratepH, citratepH, 
          citrateisopH, coApH, coAglutathionepH, co2gpH, co2totpH, coaqpH, 
          cogpH, creatinepH, creatininepH, cysteineLpH, cystineLpH, 
          cytochromecoxpH, cytochromecredpH, dihydroxyacetonephospH, 
          ethanolpH, ethylacetatepH, fadoxpH, fadredpH, fadenzoxpH, 
          fadenzredpH, ferredoxinoxpH, ferredoxinredpH, fmnoxpH, fmnredpH, 
          formatepH, fructosepH, fructose6phospH, fructose16phospH, 
          fumaratepH, galactosepH, galactose1phospH, glucosepH, 
          glucose1phospH, glucose6phospH, glutamatepH, glutaminepH, 
          glutathioneoxpH, glutathioneredpH, glyceraldehydephospH, 
          glycerolpH, glycerol3phospH, glycinepH, glycolatepH, 
          glycylglycinepH, glyoxylatepH, h2aqpH, h2gpH, h2opH, h2o2aqpH, 
          hydroxypropionatebpH, hypoxanthinepH, indolepH, ketoglutaratepH, 
          lactatepH, lactosepH, leucineisoLpH, leucineLpH, lyxosepH, 
          malatepH, maltosepH, mannitolDpH, mannosepH, methaneaqpH, 
          methanegpH, methanolpH, methionineLpH, methylamineionpH, n2aqpH, 
          n2gpH, nadoxpH, nadredpH, nadpoxpH, nadpredpH, o2aqpH, o2gpH, 
          oxalatepH, oxaloacetatepH, oxalosuccinatepH, palmitatepH, peppH, 
          pg2pH, pg3pH, phenylalanineLpH, pipH, ppipH, propanol2pH, 
          propanolnpH, pyruvatepH, retinalpH, retinolpH, ribosepH, 
          ribose1phospH, ribose5phospH, ribulosepH, serineLpH, sorbosepH, 
          succinatepH, succinylcoApH, sucrosepH, thioredoxinoxpH, 
          thioredoxinredpH, tryptophaneLpH, tyrosineLpH, ubiquinoneoxpH, 
          ubiquinoneredpH, uratepH, ureapH, uricacidpH, valineLpH, xylosepH, 
          xylulosepH};

Map is used to apply calcdG5pH to each of the functions for the reactants.

Clear[acetaldehydepH, acetatepH, acetonepH, acetylcoApH, 
        acetylphospH, aconitatecispH, adeninepH, adenosinepH, adppH, 
        alaninepH, ammoniapH, amppH, arabinosepH, asparagineLpH, aspartatepH, 
        atppH, bpgpH, butanolnpH, butyratepH, citratepH, citrateisopH, coApH, 
        coAglutathionepH, co2gpH, co2totpH, coaqpH, cogpH, creatinepH, 
        creatininepH, cysteineLpH, cystineLpH, cytochromecoxpH, 
        cytochromecredpH, dihydroxyacetonephospH, ethanolpH, ethylacetatepH, 
        fadoxpH, fadredpH, fadenzoxpH, fadenzredpH, ferredoxinoxpH, 
        ferredoxinredpH, fmnoxpH, fmnredpH, formatepH, fructosepH, 
        fructose6phospH, fructose16phospH, fumaratepH, galactosepH, 
        galactose1phospH, glucosepH, glucose1phospH, glucose6phospH, 
        glutamatepH, glutaminepH, glutathioneoxpH, glutathioneredpH, 
        glyceraldehydephospH, glycerolpH, glycerol3phospH, glycinepH, 
        glycolatepH, glycylglycinepH, glyoxylatepH, h2aqpH, h2gpH, h2opH, 
        h2o2aqpH, hydroxypropionatebpH, hypoxanthinepH, indolepH, 
        ketoglutaratepH, lactatepH, lactosepH, leucineisoLpH, leucineLpH, 
        lyxosepH, malatepH, maltosepH, mannitolDpH, mannosepH, methaneaqpH, 
        methanegpH, methanolpH, methionineLpH, methylamineionpH, n2aqpH, 
        n2gpH, nadoxpH, nadredpH, nadpoxpH, nadpredpH, o2aqpH, o2gpH, 
        oxalatepH, oxaloacetatepH, oxalosuccinatepH, palmitatepH, peppH, 
        pg2pH, pg3pH, phenylalanineLpH, pipH, ppipH, propanol2pH, 
        propanolnpH, pyruvatepH, retinalpH, retinolpH, ribosepH, 
        ribose1phospH, ribose5phospH, ribulosepH, serineLpH, sorbosepH, 
        succinatepH, succinylcoApH, sucrosepH, thioredoxinoxpH, 
        thioredoxinredpH, tryptophaneLpH, tyrosineLpH, ubiquinoneoxpH, 
        ubiquinoneredpH, uratepH, ureapH, uricacidpH, valineLpH, xylosepH, 
        xylulosepH];

Evaluate[listreactantspH] = Map[calcdG5pH, listfnpHis];

Table 2  Standard Transformed Gibbs Energies of Formation of Reactants at 298.15 K, Ionic Strength 0.25 M, and pHs of 5, 6, 7, 8, and 9

table2=PaddedForm[TableForm[listreactantspH,TableHeadings->{list,{"pH 5","pH 6","pH 7","pH 8","pH 9"}},TableSpacing->{.3,2}],{6,2}]

6.0  Calculation of the functions of pH and ionic strength for the standard transformed enthalpies of formation of reactants

\(calcdHmat[speciesmat_] := 
      Module[{dHzero, zi, nH, dhfnsp, dGzero, pHterm, isenth, dgfnsp, 
          dGreactant, 
          ri},  (*This\ program\ produces\ the\ function\ of\ ionic\ strength\ \((is)\) 
            that\ gives\ the\ standard\ transformed\ enthalpy\ of\ formation\ of\ a\ reactant\ \((sum\ of\ species)\)\ at\ 298.15\ K . \ \ The\ input\ is\ a\ matrix\ that\ gives\ the\ standard\ Gibbs\ energy\ of\ formation, 
          the\ standard\ enthalpy\ of\ formation, \ the\ electric\ charge, 
          and\ the\ number\ of\ hydrogen\ atoms\ in\ the\ species\ in\ the\ reactant . \ \ There\ is\ a\ row\ in\ the\ matrix\ for\ each\ species\ of\ the\ reactant . \ \ dhfnsp\ is\ a\ list\ of\ the\ functions\ for\ the\ species . \ \ Energies\ are\ expressed\ in\ kJ\ mol^\(-1. \)*) 
	
        dHzero = speciesmat[\([All, 2]\)]; 
	
        zi = speciesmat[\([All, 3]\)]; 
	nH = speciesmat[\([All, 4]\)]; 
	
        isenth = 
          1.4775*\((\((zi^2)\) - nH)\)*\((is^ .5)\)/\((1 + 1.6*is^ .5)\); 
	
        dhfnsp = 
          dHzero + 
            isenth; 
 (*Now\ calculate\ the\ functions\ for\ the\ standard\ Gibbs\ energies\ of\ formation\ of\ the\ \(\(species\)\(.\)\)*) 
\ 
        dGzero = speciesmat[\([All, 1]\)]; 
pHterm = 
          nH*8.31451* .29815*Log[10^\(-pH\)]; 
gpfnsp = 
          dGzero - pHterm - 
            isenth*2.91482/
                1.44775; 
 (*Now\ calculate\ the\ standard\ transformed\ Gibbs\ energy\ of\ formation\ for\ the\ \(\(reactant\)\(.\)\)*) 
dGreactant = \(-8.31451\)* .29815*
            Log[Apply[Plus, 
                Exp[\(-1\)*
                    gpfnsp/\((8.31451* .29815)\)]]]; 
 (*Now\ calculate\ the\ equilibrium\ mole\ fractions\ of\ the\ species\ in\ the\ reactant\ and\ the\ mole\ fraction - 
            weighted\ average\ of\ the\ functions\ for\ the\ standard\ transformed\ enthalpies\ of\ the\ \(\(species\)\(.\)\)*) 
ri = 
          Exp[\((dGreactant - 
                  gpfnsp)\)/\((8.31451* .29815)\)]; 
ri . 
          dhfnsp]\)

The following is a list of functions for the reactants with which the standard transformed enthalpies of formation can be calculated.  It is shorter than the list of reactants for the transformed Gibbs energies because these is less information about standard enthalpies of formation of species.

listreactantsh={"acetaldehyde","acetate","acetone","adenosine","adp","alanine","ammonia","amp","arabinose","asparagineL","aspartate","atp","citrate","co2g","co2tot","coaq","cog","ethanol","ethylacetate","formate","fructose","fumarate","galactose","glucose","glucose6phos","glutamate","glutamine","glycerol","glycine","glycylglycine","h2aq","h2g","h2o","h2o2aq","indole","lactate","lactose","leucineL","maltose","mannose","methaneg","methaneaq","methanol","methylamineion","n2aq","n2g","nadox","nadpox","nadpred","nadred","o2aq","o2g","pi","ppi","propanol2","pyruvate","ribose","ribose5phos","ribulose","sorbose", "succinate","sucrose","tryptophaneL","urea","valineL","xylose","xylulose"};

listfnpHish={acetaldehydeh,acetateh,acetoneh,adenosineh,adph,alanineh,ammoniah,amph,arabinoseh,asparagineLh,aspartateh, 
 atph,citrateh,co2gh, co2toth, coaqh, cogh, 
   ethanolh, ethylacetateh, 
   formateh, fructoseh, fumarateh, galactoseh,  glucoseh,  
  glucose6phosh,glutamateh, glutamineh, 
  glycerolh,  glycineh, glycylglycineh,  h2aqh, h2gh, h2oh, 
  h2o2aqh,indoleh, lactateh, lactoseh,leucineLh, 
   maltoseh, mannoseh, methanegh, 
  methaneaqh, methanolh,methylamineionh, n2aqh, 
  n2gh, nadoxh, nadpoxh, nadpredh, nadredh, o2aqh, 
  o2gh, pih,ppih, propanol2h, 
  pyruvateh, riboseh,  ribose5phosh,ribuloseh, 
   sorboseh, succinateh, sucroseh, tryptophaneLh,  ureah,  valineLh, xyloseh, 
  xyluloseh};

listspeciesdatah={acetaldehydesp,acetatesp,acetonesp,adenosinesp,adpsp,alaninesp,ammoniasp,ampsp,arabinosesp,asparagineLsp,aspartatesp, 
 atpsp,citratesp,co2gsp, co2totsp, coaqsp, cogsp, 
   ethanolsp, ethylacetatesp, 
   formatesp, fructosesp, fumaratesp, galactosesp,  glucosesp,  
  glucose6phossp,glutamatesp, glutaminesp, 
  glycerolsp,  glycinesp, glycylglycinesp,  h2aqsp, h2gsp, h2osp, 
  h2o2aqsp,indolesp, lactatesp, lactosesp,leucineLsp, 
   maltosesp, mannosesp, methanegsp, 
  methaneaqsp, methanolsp,methylamineionsp, n2aqsp, 
  n2gsp, nadoxsp, nadpoxsp, nadpredsp, nadredsp, o2aqsp, 
  o2gsp,pisp,ppisp, propanol2sp, 
  pyruvatesp, ribosesp,  ribose5phossp,ribulosesp, 
   sorbosesp, succinatesp, sucrosesp, tryptophaneLsp,  ureasp,  valineLsp, xylosesp, 
  xylulosesp};

Map is used to apply calcdHmat to each of the matrices of species data called up by listspeciesdatah.

Clear[acetaldehydeh,acetateh,acetoneh,adenosineh,adph,alanineh,ammoniah,amph,arabinoseh,asparagineLh,aspartateh, 
 atph,citrateh,co2gh, co2toth, coaqh, cogh, 
   ethanolh, ethylacetateh, 
   formateh, fructoseh, fumarateh, galactoseh,  glucoseh,  
  glucose6phosh,glutamateh, glutamineh, 
  glycerolh,  glycineh, glycylglycineh,  h2aqh, h2gh, h2oh, 
  h2o2aqh,indoleh, lactateh, lactoseh,leucineLh, 
   maltoseh, mannoseh, methanegh, 
  methaneaqh, methanolh,methylamineionh, n2aqh, 
  n2gh, nadoxh, nadpoxh, nadpredh, nadredh, o2aqh, 
  o2gh, pih,ppih, propanol2h, 
  pyruvateh, riboseh,  ribose5phosh,ribuloseh, 
   sorboseh, succinateh, sucroseh, tryptophaneLh,  ureah,  valineLh, xyloseh, 
  xyluloseh];

Evaluate[listfnpHish] = 
        Map[calcdHmat, listspeciesdatah];

7.0  Calculation of a table of standard transformed enthalpies of formation of reactants at pH 7 and ionic strengths of 0, 0.10, and 0.25 M

listhisreactants={acetaldehydehis,acetatehis,acetonehis,adenosinehis,adphis,alaninehis,ammoniahis,amphis,arabinosehis,asparagineLhis,aspartatehis, 
 atphis,citratehis,co2ghis, co2tothis, coaqhis, coghis, 
   ethanolhis, ethylacetatehis, 
   formatehis, fructosehis, fumaratehis, galactosehis,  glucosehis,  
  glucose6phoshis,glutamatehis, glutaminehis, 
  glycerolhis,  glycinehis, glycylglycinehis,  h2aqhis, h2ghis, h2ohis, 
  h2o2aqhis,indolehis, lactatehis, lactosehis,leucineLhis, 
   maltosehis, mannosehis, methaneghis, 
  methaneaqhis, methanolhis,methylamineionhis, n2aqhis, 
  n2ghis, nadoxhis, nadpoxhis, nadpredhis, nadredhis, o2aqhis, 
  o2ghis, pihis,ppihis, propanol2his, 
  pyruvatehis, ribosehis,  ribose5phoshis,ribulosehis, 
   sorbosehis, succinatehis, sucrosehis, tryptophaneLhis,  ureahis,  valineLhis, xylosehis, 
  xylulosehis};

calcdH3I[reactanth_]:=Module[{out1,out2,out3},(*This program calculates the standard transformed enthalpies of formation at 298 K, pH 7, and ionic strengths of 0, 0.10, and 0.25 M.  The reactanth name calls a function of pH and ionic strength or a constant.*)
out1=reactanth/.{pH->7,is->0};
out2=reactanth/.{pH->7,is->.1};
out3=reactanth/.{pH->7,is->.25};
{out1,out2,out3}];

Clear[acetaldehydehis,acetatehis,acetonehis,adenosinehis,adphis,alaninehis,ammoniahis,amphis,arabinosehis,asparagineLhis,aspartatehis, 
 atphis,citratehis,co2ghis, co2tothis, coaqhis, coghis, 
   ethanolhis, ethylacetatehis, 
   formatehis, fructosehis, fumaratehis, galactosehis,  glucosehis,  
  glucose6phoshis,glutamatehis, glutaminehis, 
  glycerolhis,  glycinehis, glycylglycinehis,  h2aqhis, h2ghis, h2ohis, 
  h2o2aqhis,indolehis, lactatehis, lactosehis,leucineLhis, 
   maltosehis, mannosehis, methaneghis, 
  methaneaqhis, methanolhis,methylamineionhis, n2aqhis, 
  n2ghis, nadoxhis, nadpoxhis, nadpredhis, nadredhis, o2aqhis, 
  o2ghis, pihis,ppihis, propanol2his, 
  pyruvatehis, ribosehis,  ribose5phoshis,ribulosehis, 
   sorbosehis, succinatehis, sucrosehis, tryptophaneLhis,  ureahis,  valineLhis, xylosehis, 
  xylulosehis];

Map is used to apply calcdH3I to each of the functions for reactants.

Evaluate[listhisreactants] = Map[calcdH3I, listfnpHish];

Table 3  Standard Transformed Enthalpies of Formation (in kJ (mol^(-1))) of Biochemical Reactants at pH 7 and Ionic Strengths of 0, 0.10, and 0.25 M.

table3=PaddedForm[TableForm[listhisreactants,TableHeadings->{listreactantsh,{"I = 0 M","I = 0.10 M","I= 0.25 M"}},TableSpacing->{.3,2}],{8,2}]

8.0  Calculation of the standard transformed enthalpies of formation of reactants at pH 5, 6, 7, 8, and 9 and ionic strength 0.25 M

listhpHreactants={acetaldehydehpH,acetatehpH,acetonehpH,adenosinehpH,adphpH,alaninehpH,ammoniahpH,amphpH,arabinosehpH,asparagineLhpH,aspartatehpH, 
 atphpH,citratehpH,co2ghpH, co2tothpH, coaqhpH, coghpH, 
   ethanolhpH, ethylacetatehpH, 
   formatehpH, fructosehpH, fumaratehpH, galactosehpH,  glucosehpH,  
  glucose6phoshpH,glutamatehpH, glutaminehpH, 
  glycerolhpH,  glycinehpH, glycylglycinehpH,  h2aqhpH, h2ghpH, h2ohpH, 
  h2o2aqhpH,indolehpH, lactatehpH, lactosehpH,leucineLhpH, 
   maltosehpH, mannosehpH, methaneghpH, 
  methaneaqhpH, methanolhpH,methylamineionhpH, n2aqhpH, 
  n2ghpH, nadoxhpH, nadpoxhpH, nadpredhpH, nadredhpH, o2aqhpH, 
  o2ghpH, pihpH,ppihpH, propanol2hpH, 
  pyruvatehpH, ribosehpH,  ribose5phoshpH,ribulosehpH, 
   sorbosehpH, succinatehpH, sucrosehpH, tryptophaneLhpH,  ureahpH,  valineLhpH, xylosehpH, 
  xylulosehpH};

Clear[acetaldehydehpH,acetatehpH,acetonehpH,adenosinehpH,adphpH,alaninehpH,ammoniahpH,amphpH,arabinosehpH,asparagineLhpH,aspartatehpH, 
 atphpH,citratehpH,co2ghpH, co2tothpH, coaqhpH, coghpH, 
   ethanolhpH, ethylacetatehpH, 
   formatehpH, fructosehpH, fumaratehpH, galactosehpH,  glucosehpH,  
  glucose6phoshpH,glutamatehpH, glutaminehpH, 
  glycerolhpH,  glycinehpH, glycylglycinehpH,  h2aqhpH, h2ghpH, h2ohpH, 
  h2o2aqhpH,indolehpH, lactatehpH, lactosehpH,leucineLhpH, 
   maltosehpH, mannosehpH, methaneghpH, 
  methaneaqhpH, methanolhpH,methylamineionhpH, n2aqhpH, 
  n2ghpH, nadoxhpH, nadpoxhpH, nadpredhpH, nadredhpH, o2aqhpH, 
  o2ghpH, pihpH,ppihpH, propanol2hpH, 
  pyruvatehpH, ribosehpH,  ribose5phoshpH,ribulosehpH, 
   sorbosehpH, succinatehpH, sucrosehpH, tryptophaneLhpH,  ureahpH,  valineLhpH, xylosehpH, 
  xylulosehpH];

calcdH5pH[reactanth_]:=Module[{out1,out2,out3,out4,out5},(*This program calculates the standard transformed enthalpies of formation at 298 K, ionic strength 0.25 M and pHs 5, 6, 7, 8, and 9.  The reactanth name calls a function of pH and ionic strength or a constant.*)
out1=reactanth/.{pH->5,is->.25};
out2=reactanth/.{pH->6,is->.25};
out3=reactanth/.{pH->7,is->.25};
out4=reactanth/.{pH->8,is->.25};
out5=reactanth/.{pH->9,is->.25};
{out1,out2,out3,out4,out5}];

Map is used to apply calcdH5pH to each of the functions for the reactants.

Evaluate[listhpHreactants] = 
        Map[calcdH5pH, listfnpHish];

Table 4  Standard Transformed Enthalpies of Formation (in kJ (mol^(-s))) of Biochemical Reactants at I = 0.25 M and pHs of 5, 6, 7, 8, and 9.

table4=PaddedForm[TableForm[listhpHreactants,TableHeadings->{listreactantsh,{"pH 5","pH 6 ","pH 7", "pH 8","pH 9"}},TableSpacing->{.3,2}],{6,2}]

These tables have been given to 0.01 kJ (mol^(-1)).  In general this overemphasizes the accuracy with which these formation properties are known.  However for some reactants for which species are in classical tables, this accuracy is warranted.  An error of 0.01 kJ (mol^(-1))in the standard transformed Gibbs energy of a reaction at 298 K corresponds with an error of about 1% in the value of the apparent equilibrium constant.  It is important to understand that the large number of digits in these tables is required because the thermodynamic information is in differences between entries.
	These tables can be used to calculate changes in standard transformed Gibbs energies of reaction and standard transformed enthalpies of reaction for any biochemical reaction for which all the reactants are in the tables.  Standard transfomed entropies of formation and of reaction can also be calculated.  The advantage of having this notebook is that these propertiec can be calculated at any desired pH in the range 5 to 9 and any ionic strength in the range 0 to 0.35 M.

9.0  Examples of calculations using the database on species

9.1 Calculation of pKs of weak acids

When weak acids have pKs in the range between 4 to 10, the standard Gibbs energies of formation at 298.15 K and zero ionic strength of the various species are given in the database on species.  In using the program calcpK, it is necessary to give the number associated with the pK.  pKs are numbered 1, 2, 3,... from the highest to the lowest in the pH range approximately 4 to 10.

calcpK[speciesmat_, no_, is_] := 
  Module[{lnkzero, sigmanuzsq, lnK},(*Calculates pKs for a weak acid at 298.15 K at specified ionic strengths (is) when the number no of the pK is specified.  pKs are numbered 1,2, 3,... from the highest pK to the lowest pK, but the highest pK for a weak acid may be omitted if it is outside of the range 5 t0 9.  For h3PO4, pK1=calc[pisp,1,{0}] = 7.22.*) 
   lnkzero = (speciesmat[[no + 1,1]] - speciesmat[[no,1]])/
      (8.31451*0.29815); sigmanuzsq = speciesmat[[no,3]]^2 - 
      speciesmat[[no + 1,3]]^2 + 1; 
    lnK = lnkzero + (1.17582*is^0.5*sigmanuzsq)/
       (1 + 1.6*is^0.5); N[-(lnK/Log[10])]]

calcpK[atpsp,1,.25]

calcpK[atpsp,2,.25]

9.2  Calculation of changes in thermodynamic properties of reactions

calctrGerx[eq_, pHlist_, islist_] := 
      Module[{energy},   
energy = 
          Solve[eq, 
            de]; energy[[1, 1, 
              2]] /. pH -> 
              pHlist /. is -> islist]

This program can be used to calculate standard transformed Gibbs energies of reaction or standard transformed enthalpies of reaction in kJ (mol^(-1)).  To calculate the changes in standard transformed enthalpy, an h is appended to the name of the reactant.

dGrxatp = 
      calctrGerx[atp + h2o + de == adp + pi, {5, 6, 7, 8, 9}, 
        0.25]

dHrxatp = 
      calctrGerx[atph + h2oh + de == adph + pih, {5, 6, 7, 8, 9}, 
        0.25]

The corresponding standard transformed entropies of reaction are given by

((dHrxatp - dGrxatp)/0.29815)

where these values are in J (K^(-1)) (mol^(-1)).  The standard transformed entropy of reaction increases rapidly above pH 7 because of the production of hydrogen ions.  There is an increase in the standard transformed entropy because of the increase in the number of species in the reaction.

This program can also be used to produce plots of standard transformed properties of reaction versus pH or ionic strength.

Plot[calctrGerx[atp+h2o+de==adp+pi,pH,.25],{pH,5,9},AxesLabel->{"pH","ΔG'°/(kJ/mol)"}];

9.3  Calculation of apparent equilibrium constants

calckprime[eq_, pHlist_, islist_] := Module[{energy, dG},(*Calculates the apparent equilibrium constant at specified pHs and ionic strengths for a biochemical reaction typed in the form atp+h2o+de==adp+pi.  The names of reactants call the appropriate functions of pH and ionic strength.  pHlist and is list can be lists.*) 
   energy = Solve[eq, de]; 
    dG = energy[[1,1,2]] /. pH -> pHlist /. is -> islist; 
    E^(-(dG/(8.31451*0.29815)))]

calckprime[atp + h2o + de == adp + pi, {5, 6, 7, 8, 9}, 
      0.25]

This program can be also used to pepare plots versus pH or ionic strength.

Plot[Evaluate[calckprime[atp+h2o+de==adp+pi,pH,0.25]],{pH,6,8},AxesLabel->{"pH","K'"}];

9.4  Calculations of changes in binding of hydrogen ions in biochemical reactions

Biochemical reactions are different from chemical reactions in that they may produce or consume non-integer amounts of hydrogen ions.  This is discussed in terms of the change in binding of hydrogen ions (Subscript[Δ, f])(Subscript[N, H]) in a biochemical reaction, which is given by

 (Subscript[Δ, f])(Subscript[N, H]) = -(dlogK'/dpH) = - (1/ln(10))(dlnK'/dpH)
 
 The change in the binding of hydrogen ions in the hydrolysis of ATP can also be plotted as follows:

Plot[Evaluate[-(1/Log[10])*D[Log[calckprime[atp+h2o+de==adp+pi,pH,0.25]],pH]],{pH,5,9},AxesOrigin->{5,-1},AxesLabel->{"pH","\!\(N\_H\)"}];

Since there is a decrease in binding of hydrogen ions in this reaction, hydrogen ions are produced at constant pH.

9.5  Calculation of standard transformed reaction Gibbs energies at other temperatures

The program calcdGHT can be used to produce the function of T, pH, and ionic strength that will give the standard transformed Gibbs energies of formation at other temperatures, provided the standard enthalpies of formation of all the species are known.

calcdGHT[speciesmat_] := Module[{dGzero, dGzeroT, dHzero, 
    zi, nH, gibbscoeff, pHterm, isterm, gpfnsp, dGfn, dHfn},(*This program produces the function of T (in Kelvin), pH, and ionic strength (is) that gives the stndard transformed Gibbs energy of formation of a reactant (sum of species) and the standard transformed enthalpy.  The input speciesmat is a matrix that gives the standard Gibbs energy of formation at 198.15 K, the standard enthalpy of formation at 298.15 K, the electric charge, and the number of hydrogen atoms in each species.  There is a row in the matrix for each species of the reactant.  gpfnsp is a list of the functions for the transformed Gibbs energies of the species.  The output is in the form {dGfn,dHfn}, and the energies are expressed in kJ mol^-1.  The values of the standard transformed Gibbs energy of formation and the standard transformed enthalpy of formation can be calculated at any temperature in the range 273.15 K to 313.15 K, any pH in the range 5 to 9, and any ionic strength in the range 0 to 0.35 M by use of the assignment operator (/.).*) 
   {dGzero, dHzero, zi, nH} = Transpose[speciesmat]; 
    gibbscoeff = (9.20483*t)/10^3 - (1.284668*t^2)/10^5 + 
      (4.95199*t^3)/10^8; dGzeroT = (dGzero*t)/298.15 + 
      dHzero*(1 - t/298.15); pHterm = 
     (nH*8.31451*t*Log[10^(-pH)])/1000; 
    istermG = (gibbscoeff*(zi^2 - nH)*is^0.5)/
      (1 + 1.6*is^0.5); gpfnsp = dGzeroT - pHterm - istermG; 
    dGfn = -((8.31451*t*Log[Plus @@ 
          (E^(-(gpfnsp/((8.31451*t)/1000))))])/1000); 
    dHfn = -(t^2*D[dGfn/t, t]); {dGfn, dHfn}]

Calculate the functions that yield the standard transformed Gibbs energies of the reactants in the reaction atp + h2o = adp + pi at 313.15 K.

atp313 = calcdGHT[
              atpsp][[1]] /. t -> 313.15;

h2o313 = calcdGHT[
              h2osp][[1]] /. t -> 313.15;

adp313 = calcdGHT[
              adpsp][[1]] /. t -> 313.15;

pi313 = calcdGHT[
              pisp][[1]] /. t -> 313.15;

Calculate the standard transformed reaction Gibbs energies for the hydrolysis of ATP at 313.15 K, pHs 5, 6, 7, 8, and 9 and ionic strengths of 0, 0.10, and 0.25 M.

dGerx313 = 
        calctrGerx[
          atp313 + h2o313 + de == adp313 + pi313, {5, 6, 7, 8, 9}, {0, 0.1, 
            0.25}];

TableForm[Transpose[dGerx313], 
      TableHeadings -> {{"I = 0 M", "I = 0.10 M", "I = 0.25 \
M"}, {"pH 5", "pH 6", "pH 7", "pH 8", "pH 9"}}]

9.6  Calculation of the standard transformed Gibbs energies of formation of the species of a reactant from the apparent equilibrium constant of a reaction

To do this all the reactants have to be in the database, except for one or two,  The following three programs, which make this calculation in one step, are based on the concept of the inverse Legendre transform.  The program to be used depends on the number of species in the reactant.  The programs produce entries for the database on species.

calcGef1sp[equat_, pHc_, ionstr_, z1_, nH1_] := 
  Module[{energy, trGereactant},(*This program uses ∑νiΔfGi'°=-RTlnK' to calculate the standard Gibbs energy of formation of the species of a reactant that does not have a pK in the range 4 to 10. The equation is of the form pyruvate+atp-x-adp==-8.31451*.29815*Log[K'], where K' is the apparent equilibrium constant at 298.15 K, pHc, and ionic strength is.  The reactant has charge number z1 and hydrogen atom number nH1.  The output is the species vector without the standard enthalpy of formation.*) 
   energy = Solve[equat, x] /. pH -> pHc /. is -> ionstr; 
    trGereactant = energy[[1,1,2]]; 
    gef1 = trGereactant - nH1*8.31451*0.29815*Log[10]*pHc + 
      (2.91482*(z1^2 - nH1)*ionstr^0.5)/
       (1 + 1.6*ionstr^0.5); {{gef1, _, z1, nH1}}]

calcGef2sp[equat_, pHc_, ionstr_, z1_, nH1_, pK0_] := 
  Module[{energy, trGereactant, pKe, trgefpHis,gef1, gef2},(*This program uses ∑νiΔfGi'°=-RTlnK' to calculate the standard Gibbs energies of formation of the two species of a reactant for which the pK at zero ionic strength is pK0. The equation is of the form pyruvate+atp-x-adp==-8.31451*.29815*Log[K'], where K' is the apparent equilibrium constant at 298.15 K, pHc, and ionic strength is.  The more basic form of the reactant has charge number z1 and hydrogen atom number nH1.  The output is the species matrix without the standard enthalpies of formation.*) 
 energy = Solve[equat, x] /. pH -> pHc /. is -> ionstr; 
    trGereactant = energy[[1,1,2]]; 
    pKe = pK0 + (0.510651*ionstr^0.5*2*z1)/
       (1 + 1.6*ionstr^0.5); trgefpHis = 
     trGereactant + 8.31451*0.29815*Log[1 + 10^(pKe - pHc)]; 
    gef1 = trgefpHis - nH1*8.31451*0.29815*Log[10]*pHc + 
      (2.91482*(z1^2 - nH1)*ionstr^0.5)/
       (1 + 1.6*ionstr^0.5); 
    gef2 = gef1 + 8.31451*0.29815*Log[10^(-pK0)]; 
    {{gef1, _, z1, nH1}, {gef2, _, z1 + 1, nH1 + 1}}]

calcGef3sp[equat_, pHc_, ionstr_, z1_, nH1_, pK10_, 
   pK20_] := Module[{energy, trGereactant, pKe, trgefpHis, 
    gef1, gef2, gef3, pK1e, pK2e},(*This program uses ∑νiΔfGi'°=-RTlnK' to calculate the standard Gibbs energies of formation of the three species of a reactant for which the pKs at zero ionic strength is pK10 and pK20. The equation is of the form pyruvate+atp-x-adp==-8.31451*.29815*Log[K'], where K' is the apparent equilibrium constant at 298.15 K, pHc, and ionic strength is.  The more basic form of the reactant has charge number z1 and hydrogen atom number nH1.  The output is the species matrix without the standard enthalpies of formation of the three species.*) 
   energy = Solve[equat, x] /. pH -> pHc /. is -> ionstr; 
    trGereactant = energy[[1,1,2]]; 
    pK1e = pK10 + (0.510651*ionstr^0.5*2*z1)/
       (1 + 1.6*ionstr^0.5); 
    pK2e = pK20 + (0.510651*ionstr^0.5*(2*z1 + 2))/
       (1 + 1.6*ionstr^0.5); trgefpHis = 
     trGereactant + 8.31451*0.29815*
       Log[1 + 10^(pK1e - pHc) + 10^(pK1e + pK2e - 2*pHc)]; 
    gef1 = trgefpHis - nH1*8.31451*0.29815*Log[10]*pHc + 
      (2.91482*(z1^2 - nH1)*ionstr^0.5)/
       (1 + 1.6*ionstr^0.5); 
    gef2 = gef1 + 8.31451*0.29815*Log[10^(-pK10)]; 
    gef3 = gef2 + 8.31451*0.29815*Log[10^(-pK20)]; 
    {{gef1, _, z1, nH1}, {gef2, _, z1 + 1, nH1 + 1}, 
     {gef3, _, z1 + 2, nH1 + 2}}]

The following example is concerned with biochemical reaction EC 1.1.1.37.  If the standard Gibbs energies of formation of both coA and acetyl coA are unknown, the convention can be adopted that the standard Gibbs energy of formation of \(\(RS\^-\)\) is zero.  The standard Gibbs energy of formatin of RSH can be calculated using the pK at zero ionic strength.

coA2sp = {{0, _, -1, 0}, {-47.83, _, 0, 1}};

coA2 = calcdGmat[coA2sp];

Now the data entry for acetylcoA can be calculated from the apparent equilibrium constant (10.8) of this reaction at pH 7.12 and ionic strength 0.05 M.

acetylcoAsp2 = 
      calcGef1sp[
        citrate + coA2 + nadred - malate - x - nadox - 
            h2o == -8.31451 0.29815 Log[10.8], 7.12, 0.05, 0, 
        3]

acetylcoA2 = calcdGmat[acetylcoAsp2];

This calculation can be verified by using the data on coA and acetylcoA to calculate the apparent equilibrium constant for this reaction at the experimental conditions.

calckprime[
      malate + acetylcoA2 + nadox + h2o + de == citrate + coA2 + nadred, 
      7.12, 0.05]

9.7  Calculation of the thermodynamic properties of a biochemical reaction

It is convenient to be able to calculate the standard transformed reaction Gibbs energy, apparent equilibrium constant, and change in binding of hydrogen ions in a biochemical reaction at a series of pHs and ionic strengths.  The pH dependencies of the standard transformed reaction Gibbs energies and K' can be regarded as a consequence of the change in binding of hydrogen ions.

calcNHrx[eq_, pHlist_, islist_] := Module[{energy},(*This program calculates the change in the binding of hydrogen ions in a biochemical reaaction at specified pHs and ionic strengths.*) 
   energy = Solve[eq, de]; 
    D[energy[[1,1,2]], pH]/(8.31451*0.29815*Log[10]) /. 
      pH -> pHlist /. is -> islist]

rxthermotab[eq_, pHlist_, islist_] := 
      Module[{energy, tg, tk, 
          tn},   
tg = 
          calctrGerx[eq, pHlist, islist]; 
        tk = calckprime[eq, pHlist, islist]; 
        tn = calcNHrx[eq, pHlist, islist]; 
        TableForm[Join[{tg, tk, tn}]]]

rxthermotab[
      pep + adp + de == pyruvate + atp, {5, 6, 7, 8, 9}, {0, 0.1, 
        0.25}]

The first row gives the standard transformed reaction Gibbs energies in kJ (mol^(-1)) at zero ionic strength, the second row at 0.10 M ionic strength, and the third at 0.25 M ionic strength.  The second part of the tsable is made up of apparent equilibrium constants, and the third is made up of changes in the binding of hydrogen ions.  TableHeadings could be added, but this program allows you to use various numbers of pHs and various numbers of ionic strengths.

A vector can be rounded by use of round.

round[vec_, params_:{4, 2}] := 
  Flatten[Map[NumberForm[#1, params] & , {vec}, {2}]]

round[calctrGerx[glucose + atp + de == glucose6phos + adp, 
   {5, 6, 7, 8, 9}, 0.25], {4, 2}]

9.8  Printing out biochemical reactions that correspond with a stoichiometric matrix

A biochemical reaction can be represented by a vector of its stoichiometric numbers.  A system of biochemical reactions is represented by a stoichiometric number matrix.  This stoichiometric number matrix can be used to print out the reactions.  The programs that can be used to print out the biochemical reactions are mkeqm and nameMatrix.

mkeqm[c_List,s_List]:=(*c_List is the list of stoichiometric numbers for a reaction.  s_List is a list of the names of species or reactants.  These names have to be put in quotation marks.*)Map[Max[#,0]&,-c].s->Map[Max[#,0]&,c].s

nameMatrix[m_List,s_List]:=(*m_List is the transposed stoichiometric number matrix for the system of reactions. s_List is a list of the names of species or reactants.  These names have to be put in quotation marks.*)Map[mkeqm[#,s]&,m]

The first three reactions of glycolysis are 
ATP + glucose = ADP + G6P
G6P = F6P
ATP + F6P = ADP + F16P
This system of reactions is represented by the following stoichiometric number matrix.

nu = {{-1, 0, 0}, {-1, 0, -1}, {1, -1, 0}, {1, 0, 
            1}, {0, 1, -1}, {0, 0, 1}};

TableForm[nu]

\(\(names3 = {"Glc", "ATP", "G6P", "ADP", "F6P", "F16BP"};\)\)

TableForm[nu, 
      TableHeadings -> {names3, {"rx 13", "rx 14", "rx \
15"}}]

mkeqm[{-1, -1, 1, 1, 0, 0}, names3]

nameMatrix[Transpose[nu], names3]

9.9  Calculation of standard apparent reduction potentials for half reactions

The standard apparent reduction potential in volts at 298.15 K for a half reaction can be calculated using calcappredpots.  As an example of a half reaction consider (Subscript[NAD, ox]) + \(2 \( e\^-\)\) = (Subscript[NAD, red]):

calcappredpot[eq_, nu_, pHlist_, islist_] := 
  Module[{energy},(*Calculates the standard apparent reduction potential of a half reaction at specified pHs and ionic strengths for a biochemical half reaction typed in the form nadox+de==nadred.  The names of the reactants call the corresponding functions of pH and ionic strength.  nu is the number of electrons involved.  pHlist and islist can be lists.*)
 energy = Solve[eq, de]; 
    -(energy[[1,1,2]]/(nu*96.485)) /. pH -> pHlist /. 
     is -> islist]

\(TableForm[
      Transpose[
        calcappredpot[nadox + de == nadred, 
          2, {5, 6, 7, 8, 9}, {0, 0.1, 0.25}]], 
      TableHeadings -> {{"I=0 M", "I=0.10 M", "I=0.25 M"}, {"pH 5", "pH 6", "pH 7", "pH 8", "pH 9"}}, 
      TableSpacing -> {1, 1}]\)

Plot[calcappredpot[nadox+de==nadred,2,pH,.25],{pH,5,9},AxesLabel->{"pH","E'/V"}];

9.10  Calculation of equilibrium compositions of a single biochemical reaction or a system of biochemical reactions at specified pH

Equilibrium compositions of systems of biochemical reactions can be calculated using the following two programs.  The first was written by Fred Krambeck (Mobil  Research and Development) and the second was written by Krambeck and Alberty.  The Newton-Raphson method is used to iterate to the composition with the lowest possible Gibbs energy or transformed Gibbs energy.

equcalcc[as_,lnk_,no_]:=Module[{l,x,b,ac,m,n,e,k},
(*	as=conservation matrix
lnk=-(1/RT)(Gibbs energy of formation vector at T)
no=initial composition vector *)
(*Setup*)
{m,n}=Dimensions[as];
b=as.no;
ac=as;
(*Initialize*)
l=LinearSolve[ as.Transpose[as],-as.(lnk+Log[n]) ];
(*Solve*)
Do[	e=b-ac.(x=E^(lnk+l.as) );
If[(10^-10)>Max[ Abs[e] ], Break[] ];
l=l+LinearSolve[ac.Transpose[as*Table[x,{m}]],e],
{k,100}];
If[ k=100,Return["Algorithm Failed"] ];
Return[x]
]

equcalcrx[nt_,lnkr_,no_]:=Module[{as,lnk},
(*nt=transposed stoichiometric number matrix
lnkr=ln of equilibrium constants of rxs (vector)
no=initial composition vector*)
(*Setup*)
lnk=LinearSolve[nt,lnkr];
as=NullSpace[nt];
equcalcc[as,lnk,no]
]

The reaction considered here is the hydrolysis of glucose 6-phosphate to glucose and inorganic hosphate at 298.15 K, pH 7, and 0.25 M ionic strength.  The objective is to calculate the equilibrium concentrations when the enzyme is added to a 0.10 M solution of glucose 6-phosphate.
G6P + (Subscript[H, 2])O = Glu + (Subscript[P, i])
This is a single reaction, and so the equilibrium comosition can be readily calculated without a computer program.  However, it involves an important issue that often arises in enzyme-catalyzed reactions, and that is the problem of water as a reactant in dilute aqueous solutions.  The problem is that the activity of water is taken as unity by convention, and so its concentration does not appear in the expression for the apparent equilibrium constant.  The conservation matrix at constant pH is
		G6P	(Subscript[H, 2])O	Glu	(Subscript[P, i])
A' = 	C	6	0	6	0
	O	9	1	6	4
	P	1	0	0	1
Since the activity of water is taken as unity in dilute aqueous solutions independent of the extent of reaction, the (Subscript[H, 2])O column and the oxygen row must be deleted from the conservation matrix:
		G6P	Glu	(Subscript[P, i])
A' = 	C	6	6	0
	P	1	0	1

Therefore the conservation matrix is given by

as = {{6, 6, 0}, {1, 0, 1}};

The standard transformed Gibbs energies of the reactants at 298.15 K, pH 7, and 0.25 M ionic strength are

glucose6phos /. pH -> 
          7 /. is -> 0.25

glucose /. pH -> 
          7 /. is -> 0.25

pi /. pH -> 7 /. is -> 
        0.25

h2o /. pH -> 7 /. is -> 
        0.25

The standard further transformed Gibbs energies of formation in kJ  (mol^(-1)) are

glucose6phosft = -1318.92 - 9 (-155.66)

glucoseft = -426.71 - 6 (-155.66)

pift = -1059.49 - 4 (-155.66)

The equilibrium composition is calculated using

equcalcc[
      as, -{82.02, 507.25, -436.85}/(8.31451 0.29815), {0.1, 
        0, 0}]

It is more convenient to use equcalcrx because it takes a stoichiometric number matrix and a vector of the apparent equilibrium constants for a set of independent reactions in the system.  Note that this program calculates a consevation matrix that is consistent with the stoichiometric number matrix, and uses it in equcalc.  The transposed stoichiometric number matrix nt for the reactin without (Subscript[H, 2])O is given by

nt = {{-1, 1, 1}};

The apparent equilibrium constant is given by

calckprime[glucose6phos + h2o + de == glucose + pi, 7, 0.25]

The equilibrium composition is calculated using

equcalcrx[nt, {Log[108.4]}, {0.1, 0, 0}]

The equilibrium compostion can be verified by calculating the apparent equilibrium constant with the calculated composition

E^(nt . Log[{9.208/10^5, 9.991/10^2, 9.991/10^2}])

A single enzyme-catalyzed reaction has been used in this example, but a system of reactions can be handled in the same way.  The advantage of using matrices and vectors in a computer program is that the same program can be used for large systems of reactions.

End[];

EndPackage[];