Thermodynamics and the structure of living systems