group command and number of atoms

Dear LAMMPS users
I’m trying t simulate a liquid on a solid surface containing some solid particles.
when I create the liquid region, LAMMPS creates 6982 atoms in the region (line 42 in the following log file). In the following I deleted some atoms (399 atoms , lines 53 -112) and instead of them I created other atoms with different lattice constant. Then I defined a group for liquid region (region 4 in log file) and even though I have deleted some atoms from region 4, group command encompasses 7936 atoms (line 116). It is 954 atoms more than LAMPPS has created in the relative region (which I have deleted some atoms of that).

I’m sorry that log file data and my explanation are a bit complicated and raw but I think if you check the number of the lines that I have mentioned, my problem will be obvious for you.
Although I have read the documentation but I don’t know where is my mistake.
I will be appreciate for you answer and advise.

log file :

  1. dimension 3

  2. boundary p sf p

  3. atom_style atomic

  4. neighbor 2 bin

  5. neigh_modify delay 5

Dear LAMMPS users
I'm trying t simulate a liquid on a solid surface containing some solid
particles.
when I create the liquid region, LAMMPS creates 6982 atoms in the region
(line 42 in the following log file). In the following I deleted some atoms
(399 atoms , lines 53 -112) and instead of them I created other atoms with
different lattice constant. Then I defined a group for liquid region (region
4 in log file) and even though I have deleted some atoms from region 4,
group command encompasses 7936 atoms (line 116). It is 954 atoms more than
LAMPPS has created in the relative region (which I have deleted some atoms
of that).

I'm sorry that log file data and my explanation are a bit complicated and
raw but I think if you check the number of the lines that I have mentioned,
my problem will be obvious for you.
Although I have read the documentation but I don't know where is my mistake.

your mistake is that you haven't paid attention to how LAMMPS handles
things differently with reduced (aka lj) units.
the lattice parameter has a different meaning. just look at your
output, the generated lattice spacing and number of atoms per region.
it is *always* helpful to visualize geometries and do so incrementally
while you add commands on your input.

axel.

Thank you Dear Dr. Axel Kohlmeyer
Although I had tested some things and I hade used “metal” units , my input commands were not organized “incrementally”, as you said. I moved the “lattice” command from line 53 to after “group liquid region 4” (line 115) and now the output is OK.
Thank you sir. Thank you so much.