Applications of computational nanophotonics in photonic circuits, self assembly, and solar energy