species

## Don't show: data(thermo)
thermo$obigt: 1911 aqueous, 3588 total species
## End(Don't show) # set up the basis species basis("CHNOS")
C H N O S ispecies logact state CO2 1 0 0 2 0 1576 -3 aq H2O 0 2 0 1 0 1 0 liq NH3 0 3 1 0 0 66 -4 aq H2S 0 2 0 0 1 67 -7 aq O2 0 0 0 2 0 3316 -80 gas
# add, modify, delete species species(c("CO2","NH3")) # aqueous species
CO2 H2O NH3 H2S O2 ispecies logact state name 1 1 0 0 0 0 1576 -3 aq CO2 2 0 0 1 0 0 66 -3 aq NH3
species(c("CO2","NH3"),"gas") # gases
CO2 H2O NH3 H2S O2 ispecies logact state name 1 1 0 0 0 0 1576 -3 aq CO2 2 0 0 1 0 0 66 -3 aq NH3 3 1 0 0 0 0 3308 0 gas carbon dioxide 4 0 0 1 0 0 3315 0 gas ammonia
# delete the first couple of species species(1:2,delete=TRUE)
CO2 H2O NH3 H2S O2 ispecies logact state name 1 1 0 0 0 0 3308 0 gas carbon dioxide 2 0 0 1 0 0 3315 0 gas ammonia
# modify the logarithms of activities (actually # fugacities) of the remaining species species(1:2,c(-2,-5))
CO2 H2O NH3 H2S O2 ispecies logact state name 1 1 0 0 0 0 3308 -2 gas carbon dioxide 2 0 0 1 0 0 3315 -5 gas ammonia
# set the species to aqueous species(1:2,"aq")
CO2 H2O NH3 H2S O2 ispecies logact state name 1 1 0 0 0 0 1576 -2 aq CO2 2 0 0 1 0 0 66 -5 aq NH3
# delete all the species (returns the existing species # definition, then deletes the species) sd <- species(delete=TRUE) # changing the elements in the basis definition # causes species to be deleted basis(c("CaO", "CO2", "H2O", "SiO2", "MgO", "O2"))
C Ca H Mg O Si ispecies logact state CaO 0 1 0 0 1 0 2073 0 cr CO2 1 0 0 0 2 0 1576 0 aq H2O 0 0 2 0 1 0 1 0 liq SiO2 0 0 0 0 2 1 69 0 aq MgO 0 0 0 1 1 0 2108 0 cr O2 0 0 0 0 2 0 65 0 aq
species(c("dolomite", "quartz", "calcite", "forsterite"))
CaO CO2 H2O SiO2 MgO O2 ispecies logact state name 1 1 2 0 0 1 0 2003 0 cr dolomite 2 0 0 0 1 0 0 2120 0 cr quartz 3 1 1 0 0 0 0 1962 0 cr calcite 4 0 0 0 1 2 0 2031 0 cr forsterite
basis(c("CO2", "H2O", "O2"))
C H O ispecies logact state CO2 1 0 2 1576 0 aq H2O 0 2 1 1 0 liq O2 0 0 2 65 0 aq
species() # NULL
NULL