info {CHNOSZ} | R Documentation |
Search the Thermodynamic Database
Description
Search for species by name or formula, retrieve their thermodynamic properties and parameters, and add proteins to the thermodynamic database.
Usage
info(species = NULL, state = NULL, check.it=TRUE)
Arguments
species |
character, names or formulas of species, or (for |
state |
character, physical states of the species |
check.it |
logical, check GHS and EOS parameters for self-consistency? |
Details
info
is the primary function used for querying the thermodynamic database (thermo()$OBIGT
).
It is often called recursively; first with a character value (or values) for species
indicating the name(s) or formula(s) of the species of interest.
The result of this call is a numeric value, which can be provided as an argument in a second call to info
in order to retrieve a data frame of the thermodynamic properties of the species.
The text of species
is searched in the names, chemical formulas, and abbreviations (in the ‘abbrv’ column) in the thermodynamic database.
If the text of the species
is matched, the index of that species is returned.
If there are multiple matches for the species
, and state
is NULL, the index of first match is returned.
The order of entries in the database is grouped by states in the order ‘aq’, ‘cr’, ‘gas’, ‘liq’.
Therefore, for substances represented by both aqueous and gaseous species, the index of the aqueous species is returned, unless state
is set to ‘gas’.
Note that names (not formulas) of inorganic species, such as ‘oxygen’ and ‘methane’, are used only for the gas.
Names of species including an underscore character are indicative of proteins, e.g. ‘LYSC_CHICK’.
If the name of a protein is provided to info
and the composition of the protein can be found using pinfo
, the thermodyamic properties and parameters of the nonionized protein (calculated using amino acid group additivity) are added to the thermodynamic database.
Included in the return value, as for other species, is the index of the protein in the thermodynamic database or NA
if the protein is not found. Names of proteins and other species can be mixed.
If no exact matches are found, info
searches the database for similar names or formulas using agrep
.
If any of these are found, the results are summarized on the screen, but the function always returns NA in this case.
With a numeric argument, the rows of thermo()$OBIGT
indicated by ispecies
are returned, after removing any order-of-magnitude scaling factors (see thermo
).
If these species are all aqueous or are all not aqueous, the compounded column names used in thermo()$OBIGT
are replaced with names appropriate for the corresponding equations of state.
A missing value of one of the standard molal Gibbs energy (G
) or enthalpy (H
) of formation from the elements or entropy (S
) is calculated from the other two, if available.
If check.it
is TRUE, several checks of self consistency among the thermodynamic properties and parameters are performed using check.GHS
and check.EOS
.
See Also
retrieve
for searching species by element; check.OBIGT
for checking self-consistency of each species.
Examples
## Summary of available data
info()
## Species information
# Search for something named (or whose formula is) "Fe"
si <- info("Fe")
# Use the number to get the full entry
info(si)
# Show data for the higher-temperature phases
info(si:(si+3))
## Dealing with states
# Order of precedence for names:
# aq > cr > gas > liq
info(c("ethanol", "adenosine")) # aq, aq
# State argument overrides the default
info(c("ethanol", "adenosine"), state = c("gas", "cr"))
# Exceptions: gases have precedence for names of methane and inorganic gases
info(c("methane", "oxygen")) # gas, gas
# Formulas default to aqueous species, if available
i1 <- info(c("CH4", "CO2", "CS2", "MgO"))
info(i1)$state # aq, aq, gas, cr
# State argument overrides the default
i2 <- info(c("CH4", "CO2", "MgO"), "gas")
info(i2)$state # gas, gas, NA
## Partial name or formula searches
info("ATP")
info("thiol")
info("MgC")
# Add an extra character to refine a search
# or to search using terms that have exact matches
info("MgC ")
info("acetate ")
info(" H2O")