Computing the atomic geometry of lattice defects—e.g., point defects, dislocations, crack tips, surfaces, or boundaries—requires an accurate coupling of the local deformations to the long-range elastic field. Periodic or fixed boundary conditions used by classical potentials or density-functional theory may not accurately reproduce the correct bulk response to an isolated defect; this is especi...