Atomic wires nanotubes and their interaction with the semiconducting substrates: a density functional study