# NOT RUN {
## Swapping basis species
# start with a preset basis definition
b1 <- basis("CHNOS+")
# swap H2(aq) for O2(gas)
b2 <- swap.basis("O2", "H2")
# put oxygen back in
b3 <- swap.basis("H2", "oxygen")
# Interconversion of chemical potentials of elements and
# logarithms of activities of basis species at high temperature
basis("CHNOS+")
bl1 <- basis()$logact
emu <- element.mu(T = 100)
bl2 <- basis.logact(emu, T = 100)
# There's no difference
round(bl2 - bl1, 10)
# }
Run the code above in your browser using DataLab