Understanding quasi-1D atomic-scale nanowires from ab initio theory: Electron transport, optical and thermodynamical properties