Calculation of vibrational line shifts for molecular dimers