We present a fully relativistic first principles based theoretical approach for the calculation of the spectral properties of magnetic impurities on the surface of a superconducting substrate, providing a material specific framework for the investigation of the Yu--Shiba--Rusinov (YSR) states. By using a suitable orbital decomposition of the local densities of states we discuss in great details the formation of the YSR states for an Mn adatom and for two kinds of Mn dimers placed on the Nb(110) surface and compare our results to recent experimental findings. In case of the adatom we find that the spin-orbit coupling slightly shifts some of the YSR peaks and also the local spin-polarization on the Nb atoms have marginal effects to the their positions. Moreover, by scaling the exchange field on the Mn site we could explain the lack of the $d_{x^2-y^2}$-like YSR state in the spectrum. While our results for a close packed ferromagnetic dimer are in satisfactory agreement with the experimentally observed splitting of the YSR states, in case of an antiferromagnetic dimer we find that the spin-orbit coupling is not sufficiently large to explain the splitting of the YSR states seen in the experiment. Changing the relative orientation of the magnetic moments in this dimer induces splitting of the YSR states and also shifts their energy, leading even to the formation of a zero bias peak in case of the deepest YSR state.