The effect of atomic and electronic structure on mechanical properties
of a piece of sodium nanowire is studied with a total-energy method b
ased on the density functional theory. We find that adiabatic elongati
on or compression of the wire results in discrete jumps in total energ
y due to a correlated rearrangement of electron states and atomic stru
cture. and the resulting force shows oscillations in the nanonewton ra
nge. Furthermore, our results indicate that under certain conditions t
he break contact could support well-localized electron states. We disc
uss the results in connection with recent experiments and calculations
on extended nanowires.