Interactions between photosynthesis and respiration in facultative anoxygenic phototrophs