Add thermodynamic potentials

Not ready to be merged. Opening for comments/suggestions.
Please document what sample pressure is supposed to be/do.