Theoretical model for the hcp-bcc transition in Mg.