Focusing and defocusing in electron scattering along atomic chains