Function reference
eQuilibrator.Equilibrator
— Typestruct Equilibrator
A struct used to reference the equilibrator_api
object.
eq
cc
eQuilibrator.Equilibrator
— MethodEquilibrator(; pH, pMg, ionic_strength, temperature)
A constructor for Equilibrator
. Keyword arguments ionic_strength
and temperature
have units. Any appropriate unit may be used, the conversion is handled internally. This is typically slow to load, ~ 30 seconds, since all the thermodynamic data needs to be loaded into memory.
Example
using eQuilibrator
using Unitful
equilibrator = Equilibrator(pH=6.0, pMg = 2.5, ionic_strength=250.0u"mM", temperature=30.0u"°C")
eQuilibrator.get_ionic_strength
— Methodget_ionic_strength(equilibrator)
Get the ionic strength of equilibrator
.
Example
get_ionic_strength(equilibrator)
eQuilibrator.get_pH
— Methodget_pH(equilibrator)
Get the pH from equilibrator
.
Example
get_pH(equilibrator)
eQuilibrator.get_pMg
— Methodget_pMg(equilibrator)
Get pMg from equilibrator
.
Example
get_pMg(equilibrator)
eQuilibrator.get_temperature
— Methodget_temperature(equilibrator)
Get the temperature of equilibrator
.
Example
get_temperature(equilibrator)
eQuilibrator.reset_equilibrator
— Methodreset_equilibrator(equilibrator)
Reset equilibrator
back to the default starting state with pH = 7.5
, pMg = 3.0
, temperature = 298 K
and ionic_strength = 0.25 M
.
eQuilibrator.set_ionic_strength
— Methodset_ionic_strength(equilibrator, x)
Set the ionic strength of equilibrator
to x
.
Example
set_ionic_strength(equilibrator, 100u"mM")
eQuilibrator.set_pH
— Methodset_pH(equilibrator, x)
Set pH of equilibrator
to x
.
Example
set_pH(equilibrator, 3.5)
eQuilibrator.set_pMg
— Methodset_pMg(equilibrator, x)
Set pMg of equilibrator
to x
.
Example
set_pMg(equilibrator, 1.2)
eQuilibrator.set_temperature
— Methodset_temperature(equilibrator, x)
Set the temperature of equilibrator
to x
.
Example
set_temperature(equilibrator, 40u"°C")
eQuilibrator.dg_prime
— Methoddg_prime(equilibrator, rxn_string; concentrations, balance_warn, skip_unbalanced)
Calculate ΔG' of a reaction described by rxn_string
using the settings in equilibrator
. Optionally, set the concentrations (abundances) of the species involved in the reaction through concentration
. If skip_unbalanced
is true then return nothing
if the reaction is unbalanced. If balance_warn
is false then do not emit a warning when the reaction is unbalanced. Note, concentrations that are smaller than 0.001 mM are capped at 0.001 mM (an eQuilibrator/equilibrator_api) restriction.
Example
equilibrator = Equilibrator()
rxn_string = "bigg.metabolite:atp + bigg.metabolite:h2o = bigg.metabolite:adp + bigg.metabolite:pi"
concens = Dict("bigg.metabolite:atp"=>1u"mM", "bigg.metabolite:adp"=>100u"μM", "bigg.metabolite:pi"=>0.003u"M")
dg_prime(equilibrator, rxn_string; concentrations=concens)
eQuilibrator.ln_reversibility_index
— Methodln_reversibility_index(equilibrator, rxn_string; balance_warn, skip_unbalanced)
Calculate the log of the reversibility index of a reaction described by rxn_string
using settings in equilibrator
. If skip_unbalanced
is true then return nothing
if the reaction is unbalanced. If balance_warn
is false then do not emit a warning when the reaction is unbalanced.
Example
equilibrator = Equilibrator()
rxn_string = "bigg.metabolite:atp + bigg.metabolite:h2o = bigg.metabolite:adp + bigg.metabolite:pi"
ln_reversibility_index(equilibrator, rxn_string)
eQuilibrator.physiological_dg_prime
— Methodphysiological_dg_prime(equilibrator, rxn_string; balance_warn, skip_unbalanced)
Calculate ΔG' at physiological conditions (all concentrations set to 1 mM, 1mbar) of a reaction described by rxn_string
using the settings in equilibrator
. If skip_unbalanced
is true then return nothing
if the reaction is unbalanced. If balance_warn
is false then do not emit a warning when the reaction is unbalanced.
Example
equilibrator = Equilibrator()
rxn_string = "bigg.metabolite:atp + bigg.metabolite:h2o = bigg.metabolite:adp + bigg.metabolite:pi"
physiological_dg_prime(equilibrator, rxn_string)
eQuilibrator.standard_dg_prime
— Methodstandard_dg_prime(equilibrator, rxn_string; balance_warn, skip_unbalanced)
Calculate ΔG⁰ at standard conditons of a reaction described by rxn_string
using the settings in equilibrator
. If skip_unbalanced
is true then return nothing
if the reaction is unbalanced. If balance_warn
is false then do not emit a warning when the reaction is unbalanced.
Note, standard conditions means that all concentrations are set at 1 M.
Example
equilibrator = Equilibrator()
rxn_string = "bigg.metabolite:atp + bigg.metabolite:h2o = bigg.metabolite:adp + bigg.metabolite:pi"
standard_dg_prime(equilibrator, rxn_string)
eQuilibrator.standard_dg_prime_multi
— Methodstandard_dg_prime_multi(equilibrator, rxn_strings; balance_warn, skip_unbalanced, uncertainty_representation, minimize_norm)
Calculate ΔG'⁰ for each rxn_string
in rxn_strings
. The uncertainty_representation
can be either fullrank
, cov
, or sqrt
, and is used to represent the uncertainties. Specifically, cov
returns a full covariance matrix, precision
returna the precision matrix (i.e. the inverse of the covariance matrix), sqrt
returns the square root of the covariance, based on the uncertainty vectors, and fullrank
returns a full-rank square root of the covariance that is a compressed form of the sqrt result. If minimize_norm
is true
, an orthogonal projection is used to minimize the Euclidian norm of the result vector. If balance_warn
is true, emit a warning if any reaction is unbalanced, if skip_unbalanced
is true, return nothing
if an unbalanced reaction is found.
Example
equilibrator = Equilibrator()
ntp3 = "gtp + h2o = gdp + pi"
adk3 = "adp + gdp = amp + gtp"
μ, Q = standard_dg_prime_multi(eq, bigg.([ntp3, adk3]); uncertainty_representation="fullrank")
eQuilibrator.multi_compartmental_standard_dg_prime
— Methodmulti_compartmental_standard_dg_prime(equilibrator, rxn_inner, rxn_outer; potential_difference, pH_outer, pMg_outer, ionic_strength_outer, tolerance)
Calculate ΔG'⁰ for a multicompartment reaction. Assume that equilibrator
corresponds to the thermodynamic conditions of the inner reaction. The potential_difference
across the membrane, as well as the pH_outer
, pMg_outer
, and ionic_strength_outer
can be set. The tolerance
sets the allowed imbalance between the rxn_inner
and rxn_outer
.
Example
equilibrator = Equilibrator()
cyto_rxn = bigg("adp + pi + 2 h = h2o + atp")
peri_rxn = bigg(" = 2 h")
ψ = 0.17u"V"
peri_ionic = 0.2u"M"
peri_pMg = 3.0
peri_pH = 6.5
set_ionic_strength(eq, 250u"mM")
set_pH(eq, 7.4)
set_pMg(eq, 3.0)
dg = multi_compartmental_standard_dg_prime(
eq,
cyto_rxn,
peri_rxn;
e_potential_difference = ψ,
pH_outer = peri_pH,
pMg_outer = peri_pMg,
ionic_strength_outer = peri_ionic,
tolerance=2.0,
)
eQuilibrator.standard_dg_formation
— Methodstandard_dg_formation(equilibrator, mets)
Calculate the ΔG'⁰ of formation for all mets
, as well as the covariance matrix of the errors.
Example
equilibrator = Equilibrator()
mets = bigg.(["atp", "adp", "amp", "pi", "h2o"])
standard_dgf_prime_mu, standard_dgf_cov = standard_dg_formation(eq, mets)
eQuilibrator._lower_bound
— Function_lower_bound(x)
_lower_bound(x, ϵ)
Caps the lower bound of a concentration to ϵ. Return ϵ if x is less than ϵ, otherwise x. This function is not exported.
eQuilibrator._parse_reaction_part
— Method_parse_reaction_part(str, prefix)
Helper function for _parse_reaction_string
. This function is not exported.
eQuilibrator._parse_reaction_string
— Method_parse_reaction_string(str, prefix)
Parse a reaction string and insert the prefix in front of each metabolite. This function is not exported.
eQuilibrator._parse_units
— Method_parse_units(x)
Converts units like kilojoule / mole into kJ/mol. This function is not exported.
eQuilibrator.bigg
— Methodbigg(str)
Return a reaction string that has "bigg.metabolite:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
. A string literal version also exists: bigg"..."
See also kegg
, metanetx
, chebi
.
Example
bigg("atp + h2o = adp + pi")
bigg("atp + h2o = adp + 2*pi")
bigg("atp + h2o = adp + 2 pi")
eQuilibrator.chebi
— Methodchebi(str)
Return a reaction string that has "CHEBI:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
. A string literal version also exists: chebi"..."
See also bigg
, metanetx
, kegg
.
Example
chebi(30616 + 33813 = 456216 + 43474")
chebi(30616 + 33813 = 456216 + 2*43474")
chebi(30616 + 33813 = 456216 + 2 43474")
eQuilibrator.kegg
— Methodkegg(str)
Return a reaction string that has "kegg:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm is different from 13 pgm
but 13*pgm
is the same as 13 pgm
. A string literal version also exists: kegg"..."
See also bigg
, metanetx
, chebi
.
Example
kegg("C00002 + C00001 = C00008 + C00009")
kegg("C00002 + C00001 = C00008 + 2*C00009")
kegg("C00002 + C00001 = C00008 + 2 C00009")
eQuilibrator.metanetx
— Methodmetanetx(str)
Return a reaction string that has "metanetx.chemical:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
. A string literal version also exists: metanetx"..."
Example
metanetx("MNXM3 + MNXM2 = MNXM7 + MNXM9")
metanetx("MNXM3 + MNXM2 = MNXM7 + 2 MNXM9")
metanetx("MNXM3 + MNXM2 = MNXM7 + 2*MNXM9")
eQuilibrator.@bigg_str
— MacroReturn a reaction string that has "bigg.metabolite:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
.
See also kegg
, metanetx
, chebi
.
Example
bigg"atp + h2o = adp + pi"
bigg"atp + h2o = adp + 2*pi"
bigg"atp + h2o = adp + 2 pi"
eQuilibrator.@chebi_str
— MacroReturn a reaction string that has "CHEBI:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
.
See also bigg
, metanetx
, kegg
.
Example
chebi"30616 + 33813 = 456216 + 43474"
chebi"30616 + 33813 = 456216 + 2*43474"
chebi"30616 + 33813 = 456216 + 2 43474"
eQuilibrator.@kegg_str
— MacroReturn a reaction string that has "kegg:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
.
See also bigg
, metanetx
, chebi
.
Example
kegg"C00002 + C00001 = C00008 + C00009"
kegg"C00002 + C00001 = C00008 + 2*C00009"
kegg"C00002 + C00001 = C00008 + 2 C00009"
eQuilibrator.@metanetx_str
— MacroReturn a reaction string that has "metanetx.chemical:"
appended in front of each metabolite. Respects stoichiometric coefficients. "*"
in front of metabolites do not matter, but spaces do matter. So 13pgm
is different from 13 pgm
but 13*pgm
is the same as 13 pgm
.
Example
metanetx"MNXM3 + MNXM2 = MNXM7 + MNXM9"
metanetx"MNXM3 + MNXM2 = MNXM7 + 2 MNXM9"
metanetx"MNXM3 + MNXM2 = MNXM7 + 2*MNXM9"