Synthesis, physicochemical and atomistic analysis of templated polymerisation in metal-organic frameworks (MOFs)