A thylakoid is part of an internal membrane system of chloroplasts folded repeatedly into a stack of disks called grana. It contains chlorophyll, which power the formation of NADPH from NADP+ and H+, and enzymes required to form ATP, NADPH, or both in photosynthesis. The stacks connect by membranous channels as a single functional compartment.
The molecular mechanism of ATP generation in chloroplasts is similar to that in mitochondria.