Molecular simulation of adsorption and diffusion of hydrogen in metal-organic frameworks