Explain chemiosmotic mechanism of atp generation.