  An extensive {\it ab initio} study of the physical properties of both linear
and zigzag atomic chains of all 4$d$ and 5$d$ transition metals (TM) within the
GGA by using the accurate PAW method, has been carried out. All the TM linear
chains are found to be unstable against the corresponding zigzag structures.
All the TM chains, except Nb, Ag and La, have a stable (or metastable) magnetic
state in either the linear or zigzag or both structures. Magnetic states appear
also in the sufficiently stretched Nb and La linear chains and in the largely
compressed Y and La chains. The spin magnetic moments in the Mo, Tc, Ru, Rh, W,
Re chains could be large ($\geq$1.0 $\mu_B$/atom). Structural transformation
from the linear to zigzag chains could suppress the magnetism already in the
linear chain, induce the magnetism in the zigzag structure, and also cause a
change of the magnetic state (ferromagnetic to antiferroamgetic or vice verse).
The calculations including the spin-orbit coupling reveal that the orbital
moments in the Zr, Tc, Ru, Rh, Pd, Hf, Ta, W, Re, Os, Ir and Pt chains could be
rather large ($\geq$0.1 $\mu_B$/atom). Importantly, large magnetic anisotropy
energy ($\geq$1.0 meV/atom) is found in most of the magnetic TM chains,
suggesting that these nanowires could have fascinating applications in
ultrahigh density magnetic memories and hard disks. In particular, giant
magnetic anisotropy energy ($\geq$10.0 meV/atom) could appear in the Ru, Re,
Rh, and Ir chains. Furthermore, the magnetic anisotropy energy in several
elongated linear chains could be as large as 40.0 meV/atom. A
spin-reorientation transition occurs in the Ru, Ir, Ta, Zr, La and Zr, Ru, La,
Ta and Ir linear chains when they are elongated. Remarkably, all the 5$d$ as
well as Tc and Pd chains show the colossal magnetic anisotropy (i.e., it is
impossible to rotate magnetization into certain directions). Finally, the
electronic band structure and density of states of the nanowires have also been
calculated in order to understand the electronic origin of the large magnetic
anisotropy and orbital magnetic moment as well as to estimate the conduction
electron spin polarization.
