Topological construction of mesoporous materials