Microscopic driving potential for a dinuclear system