Molecular dynamics simulation of the chemical potentials of mixtures