  Computing the atomic geometry of lattice defects--point defects,
dislocations, crack tips, surfaces, or boundaries--requires an accurate
coupling of the local strain field to the long-range elastic field. Periodic
boundary conditions used by classical potentials or density-functional theory
may not accurately reproduce the correct bulk response to an isolated defect;
this is especially true for dislocations. Recently, flexible boundary
conditions have been developed to produce the correct long-range strain field
from a defect--effectively "embedding" a defect in a finite cell with infinite
bulk response, isolating it from either periodic images or free surfaces.
Flexible boundary conditions require the calculation of the bulk response with
the lattice Green function (LGF). While the LGF can be computed from the
dynamical matrix, for supercell methods (periodic boundary conditions) it can
only be calculated up to a maximum range. We illustrate how to accurately
calculate the lattice Green function and estimate the error using a cutoff
dynamical matrix combined with knowledge of the long-range behavior of the
lattice Green function. The effective range of deviation of the lattice Green
function from the long-range elastic behavior provides an important length
scale in multiscale quasi-continuum and flexible boundary-condition
calculations, and measures the error introduced with periodic boundary
conditions.
