A problem when using fix GCMC with molecules

Dear Aidan,

I find a problem when using fix GCMC with water molecules.

I have noticed that both the command “molecule” and “fix GCMC” have an option for offsets of atom types. For “molecule”, we can set the offset value by the keyword “toff”; for “fix GCMC”, we can specify the offset by the keyword “type” for inserted molecules. Assuming the offset value to be 2, I guess the following two cases should be the same:

“molecule ID file offset 2 0 0 0 0

fix ID group-ID gcmc N X M 0 seed T mu displace keyword values …”

“molecule ID file offset 0 0 0 0

fix ID group-ID gcmc N X M 2 seed T mu displace keyword values …”

However, the results of simulation just proves that I am wrong and I don’t know why.

I have attached the input file and the molecule file. I was trying to model the adsorption behavior of water molecules in a slit surrounded by SiO2.

Best Regards,
Mingyang Chen

adsorption.in (4.87 KB)

water1.molecule (424 Bytes)

there is no need to repost the same question three times.

we currently have the LAMMPS users workshop in albuquerque, so please
have some patience until next week until people have time to look into
problems seriously.


Good catch. The total offset should be the sum of the offsets
specified in the molecule and fix gcmc commands. The current LAMMPS
code mostly follows this rule, but not when calculating molecule mass
and center of mass during setup, where it was ignoring the fix gcmc
offset. I just checked in corrected code. Now you can even do:

molecule water water1.molecule offset 1 0 0 0 0
fix 1 water_group gcmc 1 10 10 1 34565 300.0 ${chem} 0.1 mol water

although I would not recommend it.