Pair potentials and simulation of nematic mesophases