From molecular modules to modular materials