Simulations of absorption and fluorescence lineshapes using the reaction coordinate method