The calculating of excess chemical potential is not limited to homogeneous systems, but has also been extended to inhomogeneous systems by the Widom insertion method, or other ensembles such as NPT and NVE.