Real-time vibrations of a carbon nanotube