Role of photosynthesis in energy flow