Extracting continuum-like deformation and stress from molecular dynamics simulations