First-principles simulations of nanostructured materials: graphenic 2D-sheets and semiconducting oxide nanoparticles