Adiabatic entangling gate of Bose-Einstein condensates based on the minimum function