Modelling phase transitions in temperature-responsive flexible metal-organic frameworks: the delicate balance between dispersion and entropy