Catalyzes the transfer of pyrophosphate from adenosine triphosphate (ATP) to 6-hydroxymethyl-7,8-dihydropterin, an enzymatic step in folate biosynthesis pathway. 6-hydroxymethyl-7,8-dihydropterin + ATP = (7,8-dihydropterin-6-yl)methyl diphosphate + AMP + H(+) Cofactor biosynthesis; tetrahydrofolate biosynthesis; 2-amino-4-hydroxy-6-hydroxymethyl-7,8-dihydropteridine diphosphate from 7,8-dihydroneopterin triphosphate: step 4/4. Belongs to the HPPK family.