# period boundary condition and simulation region

Dear all:
I have a simple question about the consistency of period boundary condition and simulation region. Usually, the length in each direction is integer times of the lattice constant. For example,
units metal
boundary p p p
lattice fcc 3.0
region cubic block 0 9 0 9 0 9 units box

It is OK!
If the lenth in each direction is NOT integer times of the lattice constant, is it OK in LAMMPS?
For example,
units metal

boundary p p p
lattice fcc 3.0
region cubic block 0 10 0 10 0 10 units box

You will be very appreciated if you could reply.

Best,
Justin

Dear all:
I have a simple question about the consistency of period boundary
condition and simulation region. Usually, the length in each direction is
integer times of the lattice constant. For example,
units metal
boundary p p p
lattice fcc 3.0
region cubic block 0 9 0 9 0 9 units box

It is OK!
If the lenth in each direction is NOT integer times of the lattice
constant, is it OK in LAMMPS?

there is no restriction to multiples of lattice
positions in your choice of box dimensions.
those two are completely independent entities.

however, if you create atom positions based
on a given lattice, it is usually very convenient
to have the box be commensurate with it, or
else you may have atoms with very high potential
energy in some parts of your system due to being
in close contact with other atoms.

axel.

In the ‘region’ command, when you specify ‘units box’ you are telling the program that the 0 9 0 9 0 9 (size of the box) is actually from 0 to 9 x 3.0 (9 times the lattice parameter). Your box is then 0 27 0 27 0 27.

There is no problem if you create a box (without the units box command) that is not a integer times a constant, but you should expect the consequences of doing it.

Rodrigo

I thnk what Rodrigo is saying is valid for units lattice (the default) on the
region command. If you create a periodic box that is not a multiple
of the lattice, it's up to you (LAMMPS will do what you tell it). If you
fill the box with atoms, then you may get near overlaps at the periodic
boundaries, which is generally bad. If you leave open spaec (e.g. a free
surface), then it is generally fine.

Steve