  We present an efficient method for evaluating current-induced forces in
nanoscale junctions, which naturally integrates into the non-equilibrium
Green's function formalism implemented within density functional theory. This
allows us to perform dynamical atomic relaxation in the presence of an electric
current while also evaluating the current-voltage characteristics. The central
idea consists in expressing the system energy density matrix in terms of
Green's functions. In order to validate our implementation we perform a series
of benchmark calculations, both at zero and finite bias. Firstly we evaluate
the current-induced forces acting over an Al nanowire and compare them with
previously published results for fixed geometries. Then we perform structural
relaxation of the same wires under bias and determine the critical voltage at
which they break. We find that, while a perfectly straight wire does not break
at any of the voltages considered, a zigzag wire is more fragile and snaps at
1.4 V, with the Al atoms moving against the electron flow. Finally we
demonstrate the capability of our scheme to tackle the electromigration problem
by studying the current-induced motion of a single Si atom covalently attached
to the sidewall of a (4,4) armchair single-walled carbon nanotube. Our
calculations indicate that if Si is attached along the current path, then
current-induced forces can induce migration. In contrast, if the bonding site
is away from the current path, then the adatom will remain stable regardless of
the voltage. An analysis based on decomposing the total force into a wind and
an electrostatic component, as well as on a detailed evaluation of the bond
currents, shows that this remarkable electromigration phenomenon is due solely
to the position-dependent wind force.
