Thermodynamic constraints shape the structure of carbon fixation pathways.