Fix gcmc with multiple molecules

Dear LAMMPS users and developers,

Thank you all for such a powerful mail list in which I could find answers to most of my questions by searching the list. However, I have a question regarding using Fix GCMC for multiple molecules. I am using lammps (16 Feb 2016).

I made two molecule data files for CO2 and CH4 and I was able to use fix gcmc for each of them separately and it works fine. Now I wanted to do insertion/deletion of both molecules simultaneously but I encounter the error “molecule toplogy/atom exceeds system topology/atom”. I had this error for insertion/deletion of one molecule but I could solve it by employing the create_box command, thanks to mail list and documentations. I kind of suspect where the error come from. Here is what I did.

In CH4 molecule template file, I am using type 1 for C and type 2 for H as,


1 1

2 2

3 2

4 2

5 2

In CO2 molecule template file, I am using type 3 for C and type 4 for O as,


1 3

2 4

3 4

The reason I am using 3 and 4 for types of CO2 atoms is to differentiate them from CH4 atoms and also I want to define interaction between CO2 atoms and CH4 atoms. For example,

pair_coeff 2 3 lj/cut/coul/long 0.0526 3.165

I am suspecting that choosing atom stypes 3 and 4 for CO2 is my problem because lammps is assuming that this molecule (CO2) has four atom types as shown in log.lammps:

Read molecule co2:

3 atoms with 4 types

So my question would be that should I use type 3 and 4 for CO2 atoms or I should use types 1 and 2 again similar to CH4? If I use 3 and 4 as atom types of CO2, then I need to increase number of atom types in create_box command which I believe is not the right way to do it.

If I choose types 1 and 2, then how can I define interactions between atoms because as documentations says the pair_coeff with same types will override, e.g. (second one will be used by lammps (If I understood correctly)):

pair_coeff 1 2 lj/cut/coul/long 0.1 2.5

pair_coeff 1 2 lj/cut/coul/long 0.0526 3.165

The fix gcmc commands I am using are as follows,

fix LL co2 gcmc 10 100 100 0 29494 300.0 -1 0.5 mol co2 pressure 80 region L

fix RR ch4 gcmc 10 100 100 0 29494 300.0 -1 0.5 mol ch4 pressure 80 region R

Please let me know if the simple script is needed. Thank you in advance!