calcium and magnesium nitrate equation