Interfacial Engineering of Metal-Semiconductor and p-n Junctions by Self Assembled Monolayers of Oriented Dipoles