Flexible boundary codes for the atomistic simulation of dislocations and other defects have been developed in the past mainly by Sinclair , Gehlen et al., and Sinclair et al.. These codes permitted the use of smaller atomic arrays than rigid boundary codes, gave descriptions of core non-linear effects and allowed fair assessments of the Peierls stress for dislocation motion. Green functions (continuum or discrete) or surface traction forces were used to relax the boundary atoms.
A much simpler approach is followed here. Core and mobility effects at the boundary are accounted for by a dipole tensor centered at the dislocation line, whose components constitute six more parameters of the minimization process. Results are presented for  dislocations in NiAl. It is shown that, within the limitations of the technique, reliable values of the Peierls stress are obtained.