Merged in old ThermodynamicState for convenience, until we replace oldrepex completely.