  Based on first-principles density functional theory calculations we explore
electronic and magnetic properties of experimentally producible sandwiches and
infinite wires made of repeating benzene molecules and transition-metal atoms
of V, Nb, and Ta. We describe the bonding mechanism in the molecules and in
particular concentrate on the origin of magnetism in these structures. We find
that all the considered systems have sizable magnetic moments and ferromagnetic
spin-ordering, with the single exception of the V3-Bz4 molecule. By including
the spin-orbit coupling into our calculations we determine the easy and hard
axes of the magnetic moment, the strength of the uniaxial magnetic anisotropy
energy (MAE), relevant for the thermal stability of magnetic orientation, and
the change of the electronic structure with respect to the direction of the
magnetic moment, important for spin-transport properties. While for the V-based
compounds the values of the MAE are only of the order of 0.05-0.5 meV per metal
atom, increasing the spin-orbit strength by substituting V with heavier Nb and
Ta allows to achieve an increase in anisotropy values by one to two orders of
magnitude. The rigid stability of magnetism in these compounds together with
the strong ferromagnetic ordering makes them attractive candidates for
spin-polarized transport applications. For a Nb-benzene infinite wire the
occurrence of ballistic anisotropic magnetoresistance is demonstrated.
