Add thermodynamic potentials

Not ready to be merged. Opening for comments/suggestions.
You might be right to be worried. I suspect it's ok to do as I did and just replace 0-Pth with P-Pth, but I didn't think hard about it because it's not part of Gibbs calculations, but it's definitely worth checking.