Manipulating entropy and porosity in functional materials