  We present a general-purpose parameterization of the atomic cluster expansion
(ACE) for magnesium. The ACE shows outstanding transferability over a broad
range of atomic environments and captures physical properties of bulk as well
as defective Mg phases in excellent agreement with reference first-principles
calculations. We demonstrate the computational efficiency and the predictive
power of ACE by calculating properties of extended defects and by evaluating
the P-T phase diagram covering temperatures up to 3000 K and pressures up to 80
GPa. We compare the ACE predictions with those of other interatomic potentials,
including the embedded-atom method, an angular-dependent potential, and a
recently developed neural network potential. The comparison reveals that ACE is
the only model that is able to predict correctly the phase diagram in close
agreement with experimental observations.
