The ATP synthase protein complex functions as a mill, powered by the flow of hydrogen ions. Multiple copies of this complex reside in mitochondrial and chloroplast membranes of eukaryotes and in the plasma membranes of prokaryotes. Each of the four parts of ATP synthase consists of a number of polypeptide subunits.