Variable-curvature-slab molecular dynamics as a method to determine surface stress