First-principles approaches for accurate predictions of nanostructured materials