ERROR fix widom region extends outside simulation box

Hello all,
I am using LAMMPS (29 Sep 2021). I am using widom particle insertion method to compute chemical potential and using fix gcmc method to insert the water molecules in my system. My simulations run perfectly and in the end I write my data file using write_data command so that I can use the written data for further simulation run time. However, when I read file my written data file for further simulations, I am getting following error

ERROR: Fix widom region extends outside simulation box (src/MC/fix_widom.cpp:123)

I tried to use fix recenter command as well to keep center of system constant. However, I am still getting same issue. Anyone knows how can I solve this problem. Thank you.

Hi,
I think that you have to select a region for the fix widom that is exactly the same (or smaller) as the simulation box.
Simon

Hello,

Thank you for your valuable time and suggestion. I am using the region as

region         gel block  ${xlo} ${xhi}  ${ylo} ${yhi}  ${zlo} ${zhi}

It selects the values equal to the simulation box’s initial size given in the data file. This doesn’t work as well. If you have any other suggestions? Thank you.

Muzaffar

I remember overcoming similar issue by defining the region from xlo+0.1 to xhi-0.1, however it is quite dirty and I am sure that somebody here will come up with a cleaner solution.

1 Like

Do you do a minimization with fix box/relax or and MD run with fix npt or similar?
In that case the dimensions of the initial box may not be suitable anymore.

It would be very useful to see the log file of your run and your input.

1 Like

Thank you. I tried this method and it worked. thanks a lot again for your suggestion.

I wish you a nice and pleasant day,

Muzaffar

I am using MD run fix npt. I checked the log file it works with initial boundary dimensions. Thank you for your suggestion.

Have a nice day,

Muzaffar

But if you want atoms to get inserted in the entire box, why would you use region keyword anyway? The default behaviour is that the atoms are inserted in the box, this keyword is meant for restricting insertion volume.

I just wanted to be more specific in my input script. Yes, you are right. I just realized that region command is not necessary. Thank you for your comment and suggestion.

Muzaffar