Energetics of charges in organic semiconductors and at organic donor–acceptor interfaces