Computational studies of adsorption in metal organic frameworks and interaction of nanoparticles in condensed phases