Chemical potential for the use of gcmc

Dear all,

I wonder how to decide the chemical potential for the use of gcmc.

For the gcmc fix, the chemical potential, mu, is needed.

To my knowledge, the value of chemical potential at certain temperature or pressure can not be calculated and only delta chemical potential can be obtained. For now, I am using the keyword, pressure without exact value of “mu”, which enables to run gcmc.

I would like to know what the “mu”, gcmc command requests, is between the specific chemical potential and delta chemical potential.

Also, In any case, I wonder how other users calculate “mu” value.

Thirdly, the manual says that the keyword, pressure, is used, the “mu” will be ignored. So, if I use the keyword, do I need to care the value of "mu?

Thank you for your advice in advance!


As you indicate, chemical potential is always defined relative to some arbitrary reference. LAMMPS uses a fairly standard definition based on the thermal de Broglie wavelength \Lambda*, but in order to find what range of values works for your application, the best thing is to first use a couple of very small values, sufficient to generate a low pressure vapor phase with different pressures. In this limit, the average pressure p or density rho will be approximatley proportional to exp(mu/kT). Note that this simple relationship between p and mu does not hold for dense phases, and so more effort is required.


\Lambda = Sqrt(h^2 / (2 \Pi m k T)
P_{ideal} \Lambda^3 = k T exp(mu / k T)

Thank you, Aidan

To be clear, (I see the wired character in front of Lambda)

Lambda = Sqrt(h^2 / (2PimkT)

P_{ideal}Lambda^3 = k T* exp(mu/(k*T))

Is this right?

In addition, could you provide the reference of this equation?

I sincerely appreciate your help!


This is as far as I am willing to go. If you need to know more, look at the code, read a text book and do your own testing with low pressures gases.

Dear Aidan,

I wonder that the keyword -pressure in fix gcmc still can be used in the case of multicomponent system.

If yes, the partial pressure depending on its composition in mixtures should be used for individual components?

I understood that multiple fix gcmc command should be used - one fix gcmc for one component.

The pressure keyword just allows you to specify chemical potential in different units:

“The gas reservoir pressure can be specified using the pressure keyword, in which case the user-specified chemical potential is ignored. For non-ideal gas reservoirs, the user may also specify the fugacity coefficient using the fugacity_coeff keyword.”

If you specify multiple gcmc fixes, each fix will perform GCMC moves on a single atom type or molecular type. Think of this as a system that is brought in to thermodynamic equilibrium with multiple reservoirs, each consisting of a single species. The MD system exchanges substance, but not thermal energy or volume with each reservoir. The thermodynamic state of each reservoir is specified by two thermosynamic variables, one of which is temperature, and the other is related to chemical potential. The reservoir temperature is specified by the fix (hopefully close to the average temperature of the MD system, otherwise you are doing a strange simulation). The second thermodynamic variable is one of the following:

A. Chemical potential
B. Pressure, using pressure keyword, assumes reservoir is an ideal gas
C . Fugacity = pressure * fugacity_coefficient, using both pressure and fugacity_coeff keywords

What is fugacity? Well, it is proportional to exp(mu/kT), with prefactor determined by requirement that fugacity/pressure -> 1 as mu -> -Infinity (ideal gas limit).


Thanks, it is a good explanation, Aidan,

You said,

“Think of this as a system that is brought in to thermodynamic equilibrium with multiple reservoirs, each consisting of a single species.”

I understood this.

What I am trying to build up is multicomponent system in nanopore from bulk initial composition. I am curious about how I can control the composition. I guess that it can be done with chemical potential or fugacities. Of course, I know that the composition in nanopore is going to be different from that of the bulk. Normally, the fugacity coefficient and the chemical potential of a certain component in multicomponent system are not simply obtained from molefractionchemical potential or molefractionfugacity (chemical potential and fugacity in a single component system). Therefore, even though the system is under thermodynamic equilibrium with multiple reservoirs, each consisting of a single species, the chemical potential and the fugacity coefficients in the individual reservoirs should not use those in a single component system but those considering multicomponent effect, right?

I have learned never to disregard questions that end in “right?”. I think you are really asking how to specify the mu’s that correspond to a desired bulk composition. Instead of trying to find some simple relationship, which is impossible, except for an ideal gas mixture, just do the calibration directly. Try out different mu’s in a bulk simulation and see what compositions you get. Interpolate on those to estimate the mu’s for your desired composition, iterate until you are close enough.