GCMC crashes with "Out of range atoms" error but the system is fine when running regular MD

Dear LAMMPS users,

My system is periodic in every dimension and it has water confined between two graphene sheets (the direction of confinement is the x-axis, the sheets are in the yz plane). I apply the fix gcmc to the water molecules only.

The fact that I am able to run regular MD on the system, tells me that the error is more likely to be in the input file settings than in the system geometry itself. I cannot see anything blatantly wrong in my input file, but I don’t really have any experience with GCMC.

I use a 2016 LAMMPS installation in Cori, a NERSC supercomputer.

Any help would be greatly appreciated. I have attached here inputs and outputs of the simulation.

Best,
Luis

gcmc_lammps.tar.gz (189 KB)

If it runs fine w/out the fix gcmc command, possibly
it is making insertions that lead to bad geometries
and the out-of-range error. Aidan (Ccd) may have
an idea.

Steve