ATP + D-ribose 5-phosphate = 5-phospho-alpha-D-ribose 1-diphosphate + AMP + H(+) Binds 1 Mg(2+) ion per subunit. May be due to an intron retention. Belongs to the ribose-phosphate pyrophosphokinase family.