Surface templating via self-assembly of hydrogen-bonded molecular networks is a rapidly developing bottom-up approach in nanotechnology. Using the melamine-PTCDI molecular system as an example we show theoretically that the network stability in the parameter space of temperature versus molecular coupling anisotropy is highly restricted. Our kinetic Monte Carlo simulations predict a structural stability diagram that contains domains of stability of an open honeycomb network, a compact phase, and a high-temperature disordered phase. The results are in agreement with recent experiments, and reveal a relationship between the molecular size and the network stability, which may be used to predict an upper limit on pore-cavity sizes.