Bifunctional enzyme that catalyzes the phosphorylation of ribose at O-5 in a reaction requiring ATP and magnesium, and the reversible conversion of ribose 5-phosphate to ribulose 5-phosphate. ATP + D-ribose = ADP + D-ribose 5-phosphate + H(+) aldehydo-D-ribose 5-phosphate = D-ribulose 5-phosphate Requires a divalent cation, most likely magnesium in vivo, as an electrophilic catalyst to aid phosphoryl group transfer. It is the chelate of the metal and the nucleotide that is the actual substrate. Activated by a monovalent cation that binds near, but not in, the active site. The most likely occupant of the site in vivo is potassium. Also activated by ammonium ion. Ion binding induces a conformational change that may alter substrate affinity. Carbohydrate metabolism; D-ribose degradation; D-ribose 5-phosphate from beta-D-ribopyranose: step 2/2. Carbohydrate degradation; pentose phosphate pathway; D-ribose 5-phosphate from D-ribulose 5-phosphate (non-oxidative stage): step 1/1. By elevated hydrostatic pressure. In the N-terminal section; belongs to the carbohydrate kinase PfkB family. Ribokinase subfamily. In the C-terminal section; belongs to the ribose 5-phosphate isomerase family.