If you calculate the variation of Gibbs free energy to the number of ions or water molecules, I suppose you can deal with the chemical potential term. In such matters you may get back to your thermodynamics knowledge - rather than to expect the programs to do it automatically for you.