First-principles study of metal-semiconductor contact between MX2 (M = Nb, Pt; X = S, Se) monolayers