Ammonia capture and flexible transformation of M-2(INA) (M=Cu, Co, Ni, Cd) series materials.