Explain the relationship between the structure of ATP synthase and its function. What are the different roles of the $\mathrm{F_1}$ and $\mathrm{F_0}$ units of ATP synthase?