The theory of vibrational spectroscopy and its application to polymeric materials