System enclosed between walls

Dear Ray,

Thank you for your quick response. However, I still have the same problem. I do not understand why “units box” should be a problem,because I define

units lj

boundary f f f

atom_style sphere

If I do not understand wrong, the command “units box” should consider Lennard-Jones units.
Maybe I need to consider something more because my atom_style is “sphere”?
Because it is strange to have particles inside of the wall, due to the parameter k
is high (in particular, k=1e8).

Thank you for your time.


Please read the doc page:


I admit I am new to this thread, so the following suggestion may not
be relevant.
There was a discussion about how to use fix wall/region recently:

I do not understand why "units box" should be a problem

I agree. But did you mean "units lj"?

I've attached a file containing LAMMPS input script commands that
define a cylindrical region enclosed by a wall. (This example works
with "units lj". It's the same example from the post above.) You
will have to modify the shape of the region if you want two plates.
(Try creating a region which is the intersection of two planar

Last, I checked (years ago) the documentation could be improved. I
think I had to step through the code with a debugger to figure out how
to get "fix region/wall" to work the way I expected. But fix
wall/region does work (as long as the shape of your region is not
convex, I think). I use it frequently.

I hope this helps.

P.S. You can also try building your wall out of immobile particles.
If you don't mind using moltemplate, then there are several examples
of how to do this located below: (input
files included)|attachment (2.36 KB)