Integrated computational approaches for spectroscopic studies of molecular systems in the gas phase and in solution: Pyrimidine as a test case