Dear Lammps users,
I am trying to measure the density of a deposited film onto a substrate. After depositing several clusters of atoms, I use the command group to gather all the clusters in a unique group and then use a fix ave/spatial density/mass to determine the number of atoms from this group within my layer.
My problem is that the number of counted atoms in the output file of density/mass is way less than the number of atoms in allNPS group. I should count at leat 160*9 =1 440 atoms, but I have only 227 atoms so far. Does anyone understand why?
Spatial-averaged data for fix 4 and group allNPS
Timestep Number-of-bins
Bin Coord1 Coord2 Coord3 Ncount density/mass
10000 9
1 86.762 86.762 -10.225 0 0
2 86.762 86.762 10.225 0 0
3 86.762 86.762 30.675 0 0
4 86.762 86.762 51.125 227 0.0660322
5 86.762 86.762 71.575 0 0
6 86.762 86.762 92.025 0 0
7 86.762 86.762 112.475 0 0
8 86.762 86.762 132.925 0 0
9 86.762 86.762 153.375 0 0
Here is my input script:
------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.09
variable colors string &
“green blue”
----------------------- ATOM DEFINITION ----------------------------
lattice fcc ${latparam}
region box block 0 20 0 20 -5 40
create_box 1 box
region substrate block 0 20 0 20 0 10
lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region substrate
group substrate region substrate
------------------------ FORCE FIELDS ------------------------------
pair_style eam/alloy
pair_coeff * * Ag.eam.fs Ag
----------------------- VISUALIZATION ----------------------------
dump 1 all image 200 output5/image.*.jpg type type &
axes yes 0.8 0.02 view 80 -30
dump_modify 1 pad 5
----------------------- FIRST IMPACTION ----------------------------
region NP0 sphere 3 2 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP0
group NP0 region NP0
velocity NP0 set 0 0 -8
fix 1 all nvt temp 300.0 300.0 100.0
run 1000
----------------------- SECOND IMPACTION ----------------------------
region NP1 sphere 7 8 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP1
group NP1 region NP1
velocity NP1 set 0 0 -8
run 1000
----------------------- THIRD IMPACTION ----------------------------
region NP2 sphere 13 12 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP2
group NP2 region NP2
velocity NP2 set 0 0 -8
run 1000
----------------------- FOURTH IMPACTION ----------------------------
region NP3 sphere 7 3 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP3
group NP3 region NP3
velocity NP3 set 0 0 -8
run 1000
----------------------- FIFTH IMPACTION ----------------------------
region NP4 sphere 13 2 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP4
group NP4 region NP4
velocity NP4 set 0 0 -8
run 1000
----------------------- SIXTH IMPACTION ----------------------------
region NP5 sphere 3 8 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP5
group NP5 region NP5
velocity NP5 set 0 0 -8
run 1000
----------------------- SEVENTH IMPACTION ----------------------------
region NP6 sphere 8 13 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP6
group NP6 region NP6
velocity NP6 set 0 0 -8
run 1000
----------------------- EIGHTH IMPACTION ----------------------------
region NP7 sphere 7 12 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP7
group NP7 region NP7
velocity NP7 set 0 0 -8
run 1000
----------------------- NINETH IMPACTION ----------------------------
region NP8 sphere 12 13 18 1.5
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP8
group NP8 region NP8
velocity NP8 set 0 0 -8
run 1000
group allNPS union NP0 NP1 NP2 NP3 NP4 NP5 NP6 NP7 NP8
----------------------- DENSITY/MASS ----------------------------
region mid block 0 20 0 20 5 15.9
fix 4 allNPS ave/spatial 200 1 200 x 0 30 y 0 30 z lower 5 density/mass units lattice region mid ave running file sig36.dat
run 1000
SIMULATION DONE
print “All done”
Thanks,
Nawel Boumerdassi