The molecular condensations ahead of Herbig-Haro objects-II. A theoretical investigation of the HH 2 condensation