data(thermo)
## add, modify, delete species
basis("CHNOS")
species(c("CO2","NH3")) # aqueous species
species(c("CO2","NH3"),"gas") # gases
# delete the first couple of species
species(1:2,delete=TRUE)
# modify the logarithms of activities (actually
# fugacities) of the remaining species
species(1:2,c(-2,-5))
# set the species to aqueous
species(1:2,"aq")
# delete all the species
species(delete=TRUE)
## add and delete species
basis(c("CaO","CO2","H2O","SiO2","MgO","O2"))
# a species with Fe (faylite) can be loaded,
# but its initial logarithm of activity is NA to
# indicate that it falls outside the basis definition
species(c("dolomite","quartz","calcite","forsterite","fayalite"))
# changing the elements in the basis definition
# causes species to be deleted
basis(c("CO2","H2O","O2"))
species() # NULL
Run the code above in your browser using DataLab