Some problem with wall/region: Particle outside surface of region

Dear All,
I want to define stiffness parameter for a water drop on a carbon substrate locating at z = 0 plane. Hereby, I have used below commands:


region substrate plane 0.0 0.0 0.0 0.0 0.0 1.0 side in
fix wall3 water wall/region substrate harmonic 1.3198e-6 3.1 6.0

Total water molecules are 17471 and the total carbon atoms are 23500.

The problem is getting this error: Particle outside surface of region used in fix wall/region (src/fix_wall_region.cpp:307). Without these two commands, I do not get any error.

So, I do not exactly know is it because of deforming the substrate into the -z direction and subsequently getting this error? Or may some problem with the value of sigma and cutoff parameter here?

Any commands will be appreciated …

Any comments or suggestions are highly welcome @akohlmey

As per LAMMPS documentation:

The surface of the region only exerts forces on particles “inside” the region; if a particle is “outside” the region it will generate an error, because it has moved through the wall.

We cannot diagnose from afar why this has happened in your particular simulation.

Sure, there is something specious here. So, I attached a simplified case here (please see attached files). You will see that there is a simple water drop on a substrate.

Everything looks fine for the structure and the simulation runs in the case of not using fix wall/region command for the water molecules.

However, when you try to use fix wall/region command to fix the water molecules on a substrate, it gets error after 9000 steps: “Out of range atoms - cannot compute PPPM (src/KSPACE/pppm.cpp:1839)”

I use fix wall/region command just to fix the water molecules with a harmonic potential by which they do not move on the substrate. I also tried alternative command like fix wall/harmonic or fix spring or fix spring/self to fix the water molecules during equilibrium process. But, unfortunately non of them was helpful and they also lead to the similar errors.

These are my tries to fix the water molecules on the substrate. In the literature, they wrote: all the water molecules were fixed via a harmonic potential during equilibrium. What is your procedure to do this?

Thanks for your valuable comments and suggestions …

wetting.data (1.1 MB)
wetting.in (2.2 KB)

Are you sure your initial configuration is somewhat reasonable to start doing some dynamics at this given temperature and timestep? Both of the errors you have could be related to particles moving too fast due to them experiencing unrealistically large forces (see for example ERROR: Out of range atoms - cannot compute PPPM for the second error you got. For the first error, the atoms could have flown outside the region during the dynamics as a consequence of the large force experienced).

Have you also confirmed if your force field is suitable for this specific system you are trying to investigate? Also, you seem to have set some pretty steep potentials at the walls of the regions you defined in the input script you posted. I wonder if this could be the cause.

1 Like

Thanks for your comments.

I checked the input script for several times precisely and understood the reason of getting the “out of range atom” after 9000 steps is because of the movement of substrate atoms. Meaning, I defined a region for soft substrate as follows:

 region subswall plane 0.0 0.0 0.0 0.0 0.0 1.0 side in
 fix wall3 water wall/region subswall harmonic 6.66e-7 3.1 6.0

 fix wall4 carbon spring/self 90000.0 xy
 fix wall5 carbon spring/self 9.8122e-7 z

So, water deforms the substrate and the out of range atom error appears. If you freeze the substrate atom via below command. it seems work fine!

fix 1 carbon setforce 0 0 0

I think you may refer to the value of below command: The reason of choosing 3.1 6.0 is to prevent the out of range atom as the result of substrate deformation.

 fix wall3 water wall/region subswall harmonic 6.66e-7 3.1 6.0

Any comments regarding the simulation of soft substrate are highly welcome …