So the magnesium will interact with two oxygen atoms on the ATP molecule as well as four water molecules and the interaction will hold that substrate in a well defined conformation, a well defined shape that is suitable for the shape of the active side found in that enzyme.