GCMC with region command

dear LAMMPS users,

I am using GCMC to fill a box with methane molecules. When I use the “region” option to specify a block within the original simulation box, the algorithm takes roughly 10x as long. Is there a reason for this and is there a way to eliminate the extra computational load?

Evan L.

In general, the added computational cost of the region option is small, but there may be exceptions to this. Can you send me a small example?

Aidan

Hi Aidan,

I have run several test cases to try and identify the problem. I have determined that the problem only exists when the “mol” keyword is used with the “region” command (works fine without “mol”). For example when filling a 100x100x100 box with atomistic methane, I ran on 40 cpus and the total wall time was 55.23 s. However when I reduced the region using “region insert block 10 50 10 50 10 50”, the total wall time was 1500 s. My gut feeling (I have no proof for this) is that the “region” command combined with the “mol” command somehow is not able to parallelize due to the “empty” space surrounding the region of interest.

I have attached some simple example files if you have an interest in testing this.

Thanks,

Evan L.

mtn.txt (499 Bytes)

system_gcmc_region.in (1.37 KB)

system_gcmc.in (1.33 KB)

system.data (521 Bytes)

log_region.lammps (3.59 KB)

log_noregion.lammps (65.8 KB)

Evan,

I took a look at your example and observed the same thing. The loss of performance occurs when combining the region and mol keywords. After every MC move, the entire list of active GCMC atoms/molecules is regenerated from scratch. With region and molecule, this requires calculating the the center-of-mass of every molecule. This turns out to be a very expensive operation. The best solution would be replace the full list generation with a list update operation. I do not have time to undertake this right now.

Aidan