lattice and create_atoms command

When I use lattice and create_atoms command create atoms for some regions, I use the following commands

#-------------------------model----------------------------
lattice fcc 0.4
region box block 0 110 0 30 0 20
create_box 2 box
#--------------------------boundary------------------------
region region_boundary_top block 0 110 0 30 0 3
region region_boundary_bottom block 0 110 0 30 17 20
#--------------------------flow zone-----------------------

region region_flow_all block 0 110 0 30 3 17

#--------------------------create atoms--------------------
create_atoms 1 region region_boundary_top
create_atoms 1 region region_boundary_bottom

#---------------------------group---------------------------

group group_boundary_top region region_boundary_top

group group_flow_all region region_flow_all

and the results is shown as follows:

46200atoms in group group_boundary_top
39600atoms in group group_boundary_bottom

13200 atoms in group group_flow_all

So my questions are
(1) why the number of atoms in ‘group_boundary_top’ and ‘group_boundary_bottom’ are not equal?
(2) Because I want to create another type atoms using ‘create_atoms random’ command in the region named ‘region_flow_all’. And I do not need to include atoms belong to ‘group_boundary_top’ and ‘group_boundary_bottom’ in ‘group_flow_all’. So what I should do? Definition a region slightly less than ‘region_flow_all’ for ‘group_flow_all’ such as ‘region region_flow_all block 0 110 0 30 3.1 16.9’? Thank you very much for your suggestions.

Best wishes,
Qiangqiang Sun

When I use lattice and create_atoms command create atoms for some regions,
I use the following commands

#-------------------------model----------------------------
lattice fcc 0.4
region box block 0 110 0 30 0
    20
create_box 2 box
#--------------------------boundary------------------------
region region_boundary_top block 0
110 0 30 0 3
region region_boundary_bottom block 0
110 0 30 17 20
#--------------------------flow zone-----------------------

region region_flow_all block 0
110 0 30 3 17

#--------------------------create atoms--------------------
create_atoms 1 region region_boundary_top
create_atoms 1 region region_boundary_bottom

#---------------------------group---------------------------

group group_boundary_top region region_boundary_top

group group_flow_all region region_flow_all

and the results is shown as follows:

46200atoms in group group_boundary_top
39600atoms in group group_boundary_bottom

13200 atoms in group group_flow_all

So my questions are
(1) why the number of atoms in 'group_boundary_top' and
'group_boundary_bottom' are not equal?

​because you have periodic boundary conditions and you chose your regions
such that atoms would be placed *exactly* on the box boundaries.​ LAMMPS
tries hard to not put two atoms on top of each other at locations that are
identical due to PBC.

(2) Because I want to create another type atoms using 'create_atoms
random' command in the region named 'region_flow_all'. And I do not need to
include atoms belong to 'group_boundary_top' and 'group_boundary_bottom' in
'group_flow_all'. So what I should do? Definition a region slightly less
than 'region_flow_all' for 'group_flow_all' such as 'region
region_flow_all block 0 110 0
30 3.1 16.9'? Thank you very much for your suggestions.

how about, you ​try it out and carefully visualize the results? you are the
best judge as to whether a command does produce the results that you are
looking for,
it is easy to check for overlapping atoms with delete_atoms overlap.

axel.