The water vapor and trace gas impurities play important roles on CO2 capture performance using porous materials. We investigated the effects of H2O, SO2, and O-2 on CO2 capture in a series of ZIFs with same SOD topology but different functional groups, such as ZIF-8, ZIF-90, ZIF-Cl, ZIF-NO2, and SALEM-2 by grand canonical Monte Carlo simulations. The results show that H2O and SO2 show a cooperative effect on CO2 adsorption in ZIF-NO2 and ZIF-90 containing polar functional groups, which results in enhanced CO2/N-2 selectivity in presence of H2O or SO2. Especially, the presence of H2O or SO2 can enhance the CO2 uptake amounts and the CO2/N-2 selectivity in ZIF-NO2 at all H2O or SO2 concentration. On the other hand, the presence of H2O, SO2 has negligible effect on CO2 adsorption and CO2/N-2 separation in ZIF-8, ZIF-Cl, and SALEM-2. The presence of O-2 has no effect on CO2 capture in all of the materials investigated. Our results indicate that, by changing the functionalities of ZIF materials, H2O and SO2 may play a positive role during CO2 adsorption and separation process. (C) 2017 Elsevier Ltd. All rights reserved.