In this paper, the uniaxial compression of Mg, Ti, Zr and Co single crystals along the direction is performed by molecular dynamics (MD) to investigate the elastic-to-plastic transition in these hexagonal close-packed (hcp) metals. Two deformation twinning modes are observed in these simulations, including the twinning in Ti, Zr and Co and the [0001] twinning in Mg. The underlying atomistic mechanisms of these twinning modes are analyzed in detail.