An example of input files for molecular gcmc system is needed

Dear all,

  1. You mentioned that " Axel…the latest version of lammps I am using…that might be the reason for error happened while patch applied… "

Yongbiao answer: So, what is the solution. Should I use a old stable version? Or something else I can do?

  1. You mentioned that "

“nvt+gcmc results should agrees with the result of npt and nvt”.

I have no idea what this statement means.

  1. How do you check whether a gcmc simulation has converged ?
  2. Do you check the chemical potential ?
  3. What do you want out of gcmc simulation ?

These are some of the questions that you should start asking !."

Yongbiao answer:

By saying “nvt+gcmc results should agrees with the result of npt and nvt”, I mean,

If you perform nvt or npt simulation for a system, say, CO2 gas, you can obtain a density under a temperature T and a pressure P.

Then you turn to nvt+gcmc, the same density should be obtained under the same T and P. One difference is that in nvt+gcmc the number of molecules is fluctuated.

  1. How do you check whether a gcmc simulation has converged ?
    Answer: I check by compare the density, the pressure, the temperature to that of nvt simulation or npt simulation. For monoatomic systems, this check agrees very well. But in the systems of water or CO2, the temperature and pressure goes to very very high, the density goes to 0 or very very high. This can not be correct.

  2. Do you check the chemical potential ?

Answer: Yes, I checked. I also tried different values of potentials, just for tests. None of them works.

  1. What do you want out of gcmc simulation ?

Answer: I what to study some adsorption issues. But the first step must be making sure that gcmc works well. So I choose the simple systems such as Argon, CO2 and water to test the code. Because for these systems the results can be found in the liaterature. If I can not reproduce these results, it means my adsorption results can not be correct.

I have been learniing this method for long time. At the beginning I tested the SPCE water system, it does not work. So I thought maybe I should start from a evern simpler system, then I turned to the argon system. I found that nvt+gcmc works very well for argon systems. I thought I have known how to run gcmc simulation with lammps. Then I turned to CO2 for further tests. But it does not work. I spent much time on it but could not find why. I do not think the theory is difficult. Anyway, an example will help a lot. That is the reason why I am asking for an example. I think an example will tell me what my problem is.

I will be very grateful to your help!



Aidan can look at your fix gcmc Qs. Regarding your patch Q, what

patch did you try to apply to which version of LAMMPS, and

what was the specific error that occurred, and how did you apply the patch?


Dear Steve and all,

Actually I did not apply any patch to lammps code. I installed lammps by "svn co svn:// LAMMPS_17Jan16 ", and nothing more.

In one reply to me, Jithu said that “Axel…the latest version of lammps I am using…that might be the reason for error happened while patch applied…” Is this reply not to me?

As for the specific error, actually there is no error message, this is even worse than there is.

As I said before, I first run nvt, then npt, and finally nvt+gcmc. For argon (monoatomic) system, all these three simulations work well and the results agree with each other. I mean, the temperature, the pressure, and the density are nearly the same. When I go to molecular systems (spce water[liquid at 300K], CO2[gas at 280K]), nvt and npt works well (for water, lj/cut/coul/long is used and for CO2 lj/cut/coul/cut is used). When I perform nvt+gcmc, the simulation is unstable, the temperature and pressure go to very high value, and the density goes to zero or very high value. This can not be correct.

It is hard for me to describe the problem very clearly. I have attached my input files for CO2. A simple test will be much helpful.

I have tried different parameters. For example, in “fix ID group-ID gcmc N X M type seed T mu displace”, very large or very small values for N, X, and M, using full_energy or not, using chemcal potential or pressure. For water, maybe it does not work because it is a dense liquid phase, but it should work for CO2 gas.

In a word, I use the nearly latest version of lammps, and have found that gcmc works for moniatomic system but not for molecular system.

One more question: When lammps code is updated, I think, not all the functions are tested again (it is not feasible either). So, what is the latest version where fix-gcmc was tested for molecular system?

Thanks a lot for your help!

All the best,


coo.txt (252 Bytes)

in.parameter (2.21 KB)

data_nvt (17.8 KB)