Selective sorption of hydrocarbons by tunable sorbents such as metal-organic frameworks is the most promising alternative to traditional cryogenic distillation. Here, density functional theory is used to investigate the selective sorption of C2C4 hydrocarbons by MOF-74-Mg/Zn via periodic and molecular cluster calculations. Both methods agree in showing significant differences in binding energies between olefins and paraffins at the open metal sites of the MOF. The binding energies found using molecular cluster models, however, are significantly smaller than those obtained from the periodic approach, exemplifying the importance of fully accounting for the chemical environment experienced by the adsorbed hydrocarbons.