Machine learning for metallurgy II. A neural-network potential for magnesium | Synapse