A new set of boundary conditions is proposed for molecular simulations of isolated elastic defects such as dislocations and cracks. The case study of the ⟨111⟩ screw dislocation in body centered cubic (bcc) tungsten, modeled via a phenomenological, n-body cohesion functional, serves validating the new boundary conditions by computing structural properties of this defect and comparing these with results from the literature. Lowest energy configurations of the dislocated crystal have been obtained by molecular statics incorporating the new boundary conditions. The associated displacement and energy landscapes reveal conformal to the predictions of the elastic theory for a screw dislocation embedded in an infinitely extended crystal. In particular, no energy gradients and positional mismatch of atoms are found at the terminations of the computational box, validating thereby the new boundary conditions. Furthermore, it is shown that the structure, the spatial extension, and the excess energy of the two possible core polarizations of this dislocation compare consistently with existing findings for this and other bcc metals. Close to the dislocation line, energy minimization triggers the emergence of anelastic edge displacements extending over distances unexpectedly much larger than the dislocation core radius. Therefore, the conclusion is reached that in molecular simulations, the transverse to the dislocation line dimensions of the atomistic model should be taken considerably larger than it is accustomed. Perspectives opened by the present work are briefly discussed.