AB initio study of the dynamical properties of polythiophene