[lammps-users] Odd Error Message with fix wall/lj126 command

I recently installed the latest version of LAMMPS as I wanted to capture the bug fixes specifically from the 19 Nov 2009 version.

A stripped down version of my code is:
boundary p p s

fix anode C wall/lj126 zlo -11 0.01 1.0 2.5
fix cathode C wall/lj126 zhi 11 0.01 1.0 2.5

and the following error message is returned:

ERROR: Cannot use fix wall in periodic zimension

Is this a bug? Did I compile LAMMPS incorrectly?

Thanks as always,


Dear Brian,
I think wall can not be applied to periodic boundary, please refer to doc page.

That is correct. However, I coded the wall as:

boundary p p s
*s* is non-periodic and shrink-wrapped

That means I applied the wall to a non-periodic boundary, but came up with the following error message (copied and paste directly):

ERROR: Cannot use fix wall in periodic zimension

This does not occur in the lammps-17Nov09 version, but did occur in the latest lammps-21Nov09 version.

The 19 Nov 2009 patch description is:
Reformulated the fix wall/lj93, fix wall/lj126, and fix wall/colloid commands to be self-consistent. Each command can now be used to specify up to 6 flat walls, be used with lattice or box units, and have a velocity or oscillatory motion applied to the walls.

which might be relevant.

Does anyone know why this is?


If you look in fix_wall.cpp there is a typo in the
double line where the
word "zimension" appears. It should read:

... && periodic->zperiodic) ... periodic dimension");

You can change your version now. I'll post a patch
when I'm back in the office next week.


However, I have not applied the wall in a periodic dimension and I am still getting that error message.

If you read my previous message carefully, it changes the line
in 2 places: xperiodic->zperiodic.


Posted a patch for this - 28Nov09 - see if it works now.


With the added “units box” keywords, the code works now. Thanks very much for your prompt help.