Electronic and structural properties of ultrathin tungsten nanowires and nanotubes by density functional theory calculation