Interactions between magnesium ions, pH, glucose-6-phosphate, and NADPH/NADP+ ratios in the modulation of chloroplast glucose-6-phosphate dehydrogenase in vitro