Bipolar junction formation in the case of molecular materials