Why is statistical mechanics relevant to RNA and protein folding?
I’m no physicist, but your statement “To my knowledge statistical mechanics and thermodynamics exist when we have an ensemble of particle such as in a liquid or a gas” is surely incorrect. The problem of protein folding is one of thermodynamics — finding the structure of lowest free energy, and the path by which it is reached from a random coil. 

One of the difficulties relating to the path is that of getting ‘stuck’ in a position in the energy landscape from which the protein cannot escape. This is called ‘frustration’ and there is apparently a quantitative treatment of ‘minimal frustration’ using the statistical mechanics of spin gasses. This is mentioned in a review by Onuchic and Wolynes, available on-line, which you will probably be able to understand better than I can.