  We present a method for computing locally varying nonlinear mechanical
properties in particle simulations of amorphous solids. Plastic rearrangements
outside a probed region are suppressed by introducing an external field that
directly penalizes large nonaffine displacements. With increasing strength of
the field, plastic deformation can be localized. We characterize the
distribution of local plastic yield stresses (residual local stresses to
instability) with our approach, and assess the correlation of their spatial
maps with plastic activity in a model two-dimensional amorphous solid. Our
approach reduces artefacts inherent in a previous method known as the "frozen
matrix" approach that enforces fully affine deformation, and improves the
prediction of plastic rearrangements from structural information.
