different behavior with fix rigid and fix npt (iso vs. yz)


I’m simulating water (SPC/E) with two parallel rigid stationary walls immersed in it under NPT conditions

The relevant portion of the script is:

group walls type 3 4

group walla type 3

group wallb type 4

group water type 1 2

compute cmpTemp water temp

compute cmpPress all pressure cmpTemp

fix fShake water shake 0.0001 20 0 b 1 a 1

fix fRigid walls rigid/nve group 2 walla wallb force * off off off torque * off off off

fix fNPT water npt temp 298.0 298.0 100.0 iso 1.0 1.0 1000 dilate water

fix fNPT water npt temp 298.0 298.0 100.0 y 1.0 1.0 1000 z 1.0 1.0 1000 couple yz dilate water

fix_modify fNPT temp cmpTemp press cmpPress

Above there are two possible versions of “fix npt.”

If I use the first one (isotropic), then the x-coordinates of each wall changes over the course of the simulation. Specifically, each wall atom in a given wall moves by the same change in x at each timestep. In addition, their relative position is not preserved.

If I use the second version, then the positions of the walls remain constant.

I was wondering why this difference existed, as I would have expected that position of the walls would not change in the first version of “fix npt.”

Any help understanding this discrepancy is greatly appreciated.

Thank you,


I suggest you first run with fix nve and see if the wall atoms move.

Make sure they are pushed on by the water by checking the force
on the wall atoms and that they still don’t move.

If not, then run with fix npt and verify that wall atoms are not in

your dilate group. If they are not, then they should not be dilated

with the box size change.

In other words, do some debugging yourself. You are the best

person to figure out what is happening.