Computational approach to the study of the line-shape of absorption and electronic circular dichroism spectra