The function of bivalent metal ions in the reaction catalysed by ATP:creatine phosphotransferase.