  Electronic and lattice properties of MgB{$_2$} under uniaxial and hydrostatic
compression are calculated. Lattice properties are optimized automatically by
using the first-principles molecular dynamics (FPMD) method. Features of the
electronic band structures under uniaxial and hydrostatic compression are quite
different each other.
