Atomistic simulation of the structural and elastic properties of magnesite