protons

assignpKasToSpecies(mets, neutralMolfileDir, msDistrDir, pKaDir)[source]

Use each metabolite’s InChI and ChemAxon’s cxcalc (calculator plugin) to get pKas(I = 0), charges and numbers of protons for all microspecies present at pH 5-9.

Usage

[metList, noMolMetList] = mol2sdf(mets, molfileDir, sdfFileName, includeRs)

Inputs

  • mets – Cell array of metabolite ID. Current implementation assumes ID are formatted as BiGG_ID[Compartment]; e.g., ‘atp[c]’ for ATP in cytosol.
  • neutralMolfileDir – Path to directory containing molfiles for neutral metabolites. Molfiles must be named with the metabolite ID in mets; e.g., atp.mol.
  • msDistrDir – Path to directory containing metabolite species distributions at pH 5, 6, 7, 8 and 9. Species distributions are created with the ChemAxon calculator plugin. Names of SD files containing species distributions should be formatted as metID_msdistr_pHA.sdf; e.g., atp_msdistr_pH5.sdf.
  • pKaDir – Path to directory containing pKa estimates for metabolites. pKas are estimated with the ChemAxon calculator plugin. Names of text files containing pKa estimates should be formatted as metID_pkas.txt; e.g., atp_pkas.txt.

Output

  • speciespKas – Structure containing the following fields for each metabolite:
    • .inchis - n x 1 cell array with a species-specific InChI string for each species. inchis(1) = InChI for species 1 etc. Note that species 1 is the species with the fewest hydrogen atoms etc.
    • .formulas - n x 1 cell array with species-specific chemical formulas.
    • .zs - n x 1 vector containing the charge on each species.
    • .nHs - n x 1 vector containing the number of hydrogen atoms in each species.
    • .majorMSpH7 - n x 1 boolean vector with a logical 1 in the row for the major microspecies at pH 7 according to ChemAxon.
    • .abundanceAtpH7 - n x 1 vector with species percentage abundance at pH 7.
    • .pKas - n x n matrix where element i, j is the pKa for the acid-base equilibrium between species i and j.
    • includedMets - Cell array of metabolite ID for those metabolites that were included in speciespKas. Should include all metabolites that had molfiles in neutralMolfileDir.
getMetaboliteMsDistr(mets, molfiledir, msdistrdir, phs)[source]

Calculate microspecies distributions at all pH values in phs using ChemAxon’s cxcalc. Metabolite mol files in molfiledir are input to cxcalc. Mol file names should correspond to the metabolite ID in mets (it is assumed that compartment assignments are appended to the end of metabolite ID in the format metID[c]). Microspecies distributions are returned as .sdf files in msdistrdir

Usage

getMetaboliteMsDistr(mets, molfiledir, msdistrdir, phs)

Inputs

  • mets – metabolites
  • molfiledir – directory with mol files
  • msdistrdir – directory with microspecies distributions
  • phs – pH values
getMetabolitepKa(mets, molfiledir, pkadir)[source]

Compute pKas of the metabolites listed in mets using ChemAxon’s cxcalc. Metabolite mol files in molfiledir are input to cxcalc. Mol file names should correspond to the metabolite ID in mets (it is assumed that compartment assignments are appended to the end of metabolite ID in the format metID[c]). Text files with pKas are returned in pkadir.

Usage

getMetabolitepKa(mets, molfiledir, pkadir)

Inputs

  • mets – metabolites
  • molfiledir – directory with mol files
  • pkadir – directory with text files with pKas
inchi2mol(inchis, filenames, outputdir, overwrite)[source]

Convert InChI strings to mol files using OpenBabel. Compatible with Windows and Unix.

Usage

successbool = inchi2mol(inchis, filenames, outputdir, overwrite)

Inputs

  • inchisn x 1 Cell array of InChI strings
  • filenamesn x 1 Cell array of mol file names without file extension. Default is {‘1’ ;‘2’ ;...}
  • outputdir – Directory for mol files. Default is ‘CurrentDirectorymolfiles’.
  • overwrite – 0, [1]. Specify whether to overwrite existing mol files in outputdir.

Output

  • successbooln x 1 logical vector with 1 at indices corresponding to inchis that were successfully converted to mol files and 0 elsewhere.
moleFraction(metAbbr, Alberty2006, metAbbrAlbertyAbbr, temp, pHa, is, chi)[source]

Mole fraction of different metabolite species that make up a reactant

Usage

mf = moleFraction(metAbbr, Alberty2006, metAbbrAlbertyAbbr, temp, pHa, is, chi)

Inputs

  • metAbbr – reconstruction reactant abbreviation
  • Alberty2006 – Basic data on the metabolite species that make up a reactant, compiled by Robert A. Alberty, Massachusetts Institute of Technology. In Print: Robert A. Alberty, Biochemical Thermodynamics: Applications of Mathematica. John Wiley & Sons, 2006. p391-395 Online: BasicBioChemData3.nb http://library.wolfram.com/infocenter/MathSource/5704/
  • metAbbrAlbertyAbbr – mapping from model metabolite primary key to primary key of reactants in Alberty2006

Optional inputs

  • temp
  • pHa
  • is
  • temp
  • chi

Output

  • mf – mole fraction at equilibrium
moleFractionStats(modelT)[source]

Plots of mole fraction statistics.

Plot a histogram of the number of metabolite species relevant between pH 5 and 9, and a stacked bar chart of the mole fractions of reactants with significant (<0.99) distributions over more than one metabolite species.

Usage

moleFractionStats(modelT)

Input

  • modelT – structure with fields:
    • .S
    • .officialName
    • .mf
plotActivityCoefficients(modelT)[source]

Plots statistics on activity coefficients.

Plots a histogram of the distribution of activity coefficients also a curve of activity coefficients for different charges at a range of ionic strengths

Usage

[n, edges, lambda] = plotActivityCoefficients(modelT)

Input

  • modelT – structure with fields:
    • model.met(i).lambda - activity coefficient
    • model.temp - temperature

Outputs

  • n
  • edges
  • lambda
plotMoleFraction(metAbbr, Alberty2006, metAbbrAlbertyAbbr, PHmin, PHmax, ISmin, ISmax, CHImin, CHImax, TEMPmin, TEMPmax, N)[source]

Plot the mole fractions of metabolite species of a reactant as a function of pH, ionic strength, charge and temperature.

Usage

plotMoleFraction(metAbbr, Alberty2006, metAbbrAlbertyAbbr, PHmin, PHmax, ISmin, ISmax, CHImin, CHImax, TEMPmin, TEMPmax, N)

Inputs

  • metAbbr – reconstruction reactant abbreviation
  • Alberty2006 – Basic data on the metabolite species that make up a reactant, compiled by Robert A. Alberty, Massachusetts Institute of Technology. In Print: Robert A. Alberty, Biochemical Thermodynamics: Applications of Mathematica. John Wiley & Sons, 2006. p391-395 Online: BasicBioChemData3.nb http://library.wolfram.com/infocenter/MathSource/5704/
  • metAbbrAlbertyAbbr – mapping from model metabolite primary key to primary key of reactants in Alberty2006
  • PHmin – Minimum glass electrode pH
  • PHmax – Maximum glass electrode pH
  • ISmin – Ionic strength minimum
  • ISmax – Ionic strength maximum
  • CHImin – Electrical potential minimum
  • CHImax – Electrical potential maximum
  • TEMPmin – temperature minimum
  • TEMPmax – temperature maximum
  • N
realpH(pHa, temp, is)[source]

Apparent glass electrode pH is not the same as real pH for thermodynamic calculations.

Given the experimental glass electrode measurement of pH, this function returns the pH to be used for thermodynamic calculations, pHc = -log10[H+], by subtracting the effect of the ion atmosphere around H+ which reduces its activity coefficient below unity. See p49 Alberty 2003.

Usage

[pHr, pHAdjustment] = realpH(pHa, temp, is)

Inputs

  • pHa – apparent pH, measured by glass electrode experimentally
  • temp – experimentally measured temperature
  • is – estimate of ionic strength

Outputs

  • pHr – real pH to be used for thermodynamic calculations
  • pHAdjustment – adjustment to pH