Calculation of collisional energy transfer rates in highly excited molecules