Optimized model potential: exchange and correlation corrections and calculation of magnesium phonon spectrum | Synapse