Chemical potential calculation

Dear lammps users and development team,

I have a system composing two solutions with different compositions(high salinity and low salinity) initially separated by a thin membrane. A constant pressure is applied to the low salinity reservoir to push molecules of water to cross through the membrane (mixed high salinity + water). My objective is to calculate the chemical potential of solutes in low and high salinity reservoirs as well as in the mixed state. I am going to use fix-gcmc. My concern is whether this command would give a reasonable answer to chemical potentials.

P.S. I checked available literature in this regard, however they mostly used different software and program to calculate thermodynamic properties such as chemical potential.

Your suggestions would be appreciated and thanks in advance.

Best regards

MajiD

Chemical potentials of a dissociating solute such as NaCl presents extra challenges that I don’t want to get in to here. A simpler question would be “How do I calculate the chemical potential of H2O?” Since fix gcmc necessarily computes the energy change for random insertion attempts, it could be used to calculate the chemical potential of water using the Widom formula:

exp(-mu/kT) = <exp(-deltaU_ins/kT)>

where deltaU_ins is the energy change associated with an insertion attempt. However, while the fix calculates deltaU_ins, it currently does not save statistics for this quantity. It would be easy to add Sum(deltaU_ins) or Sum(exp(-deltaU_ins/kT)) to the global vector (currently has 8 entries) of quantities computed by the fix. Same for deltaU_del.

Aidan