Interatomic potentials between distinct atoms from first-principles calculation and lattice-inversion method