Text this: Statistical mechanics and stability of macromolecules