Toward understanding the thermodynamic viability of zeolites and related frameworks through a simple topological model