After defining the basis
species of your system you can use species
to identify the species of interest.
A species is operationally a combination of a name
and state
, which are columns of the thermodynamic database in thermo$obigt
.
The function operates on one or more character values of species
.
For each first match of species
(optionally restricted to a state
among aq, cr, gas, liq) to the name of a species or a formula or abbreviation in the thermodynamic database, a row is added to thermo$species
.
The data frame in thermo$species
holds the identifying characteristics of the species as well as the stoichiometric reaction coefficients for the formation of each of the species from the basis species, the logarithms of activities or fugacities that are used by affinity
.
The default values for logarithms of activities are -3 for aqueous (aq) species and 0 for others.
If state
is NULL
(the default), species in any state can be matched in the thermodynamic database.
If there are multiple matches for a species, the one that is in the state given by thermo$opt$state
is chosen, otherwise the matching (or \(n\)'th matching duplicate) species is used.
Note that the state
s of species representing phases of minerals that undergo phase transitions are coded as cr1, cr2, cr3, ...
(phases with increasing temperature).
If state
is cr when one of these minerals is matched, all the phase species are added.
To modify the logarithms of activities of species (logarithms of fugacities for gases) provide one or more numeric values of species
referring to the rownumbers of the species dataframe, or species
NULL, to modify all currently defined species.
The values in state
, if numeric, are interpreted as the logarithms of activities, or if character are interpreted as states to which the species should be changed.
If species
is numeric and delete
is TRUE
, the rows representing these species are deleted from the dataframe; if the only argument is delete
and it is TRUE
, all the species are removed.