Structure and electronic properties of deformed single-walled carbon nanotubes: quantum calculations