Effect of intermolecular interactions on the electronic spectra of rhodamine 6G