The role of divalent cations in the mechanism of enzyme catalyzed phosphoryl and nucleotidyl transfer reactions