Computational investigations of nanophotonic systems