Electromechanical effects in carbon nanotubes: Ab initio and analytical tight-binding calculations