Novel scheme to compute chemical potentials of chain molecules on a lattice