The energies of electron transfer between pyrophosphate metal complexes and hydrated metal complexes, which is the key reaction that models the radical ion mechanism of adenosine triphosphate (ATP) synthesis, were calculated. A threshold dependence of the energy on the number of water molecules n in the ion hydration sphere was established: for n < 4 the reaction is exothermic, while for n ≥ 4 it is endothermic. The switching of the energy regime accounts for the fact that ATP is synthesized only in molecular machines, enzymes, rather than in homogeneous aqueous solutions. It was predicted theoretically that the radical ion ATP synthesis may be catalyzed by not only magnesium ions as in living cells but also by calcium, zinc, barium, cadmium, and tin ions. This prediction was experimentally confirmed by the discovery of the magnetic isotope effect in the calcium- and zinc-catalyzed ATP synthesis by creatine kinase. The efficiency of ATP synthesis in the presence of ions with magnetic nuclei 43Ca and 67Zn is almost twice as high as that in the presence of the same ions with nonmagnetic nuclei 40Ca and 64Zn.