Large-scale molecular-dynamics simulations of martensitic nucleation and shape-memory effects in transition metal alloys