No of Neighbours = 560 for Total No of Atoms modelled in simulation 8

Dear Lammps users,
I am currently learning to utilize Lammps software for atomistic simulations to extract material parameters necessary for continuum modeling of materials and alloys, such as employing crystal plasticity. I am writing to seek your assistance regarding some doubts I have encountered while interpreting the simulation results from the Lammps log file.
I have come across a few sections in the log file that I am having trouble comprehending. I would be extremely grateful if you guys help me with these

  1. The following portion of the output appears in the log file, and I am unsure about its significance:
    Nlocal: 2 ave 2 max 2 min
    Histogram: 4 0 0 0 0 0 0 0 0 0
    Nghost: 459 ave 459 max 459 min
    Histogram: 4 0 0 0 0 0 0 0 0 0
    Neighs: 140 ave 151 max 129 min
    Histogram: 1 0 1 0 0 0 0 1 0 1

  2. In Lammps simulations, a total of 8 atoms were modeled as indicated in the Lammps log file:
    replicate 1 1 1
    Replicating atoms …
    orthogonal box = (0 0 0) to (5.6568542 5.6568542 4)
    2 by 2 by 1 MPI processor grid
    8 atoms
    replicate CPU = 0.004 seconds
    However, later in the output file, it shows that the number of neighbors is equal to 560:
    Total # of neighbors = 560
    Ave neighs/atom = 70
    Neighbor list builds = 0
    Dangerous builds = 0
    I am puzzled as to how the number of neighbors can be 560 for only 8 atoms in the simulation.

Thank you for taking the time to review my inquiries. Your guidance will be immensely valuable to me in gaining a better understanding of these simulation results.

Best Regards,
Vikram Roy
Country: India

First off, you should read about and understand the domain decomposition parallelization that LAMMPS employs and become familiar with the nomenclature (e.g. local versus ghost atoms).
A starting point is in the manual: 4.4. Parallel algorithms — LAMMPS documentation
but studying the latest LAMMPS paper can also provide a lot of insight.

  • Nlocal: number of local atoms (2 average across all MPI processes, 2 maximum, 2 minimum)
  • Histogram is a histogram of the data above, but since there is no distribution, there is no information.
    For large calculations with many MPI process and many atoms, one can get a sense of the distribution, e.g. if there is an imbalance of the number of atoms per MPI process.
  • Nghost: number of ghost atoms, i.e. copies from periodic images
  • Number of neighbors in the neighbor list for each atom, also compared across all MPI processes

It makes no sense at all to run in parallel with only 8 atoms. The overhead of running in parallel is far larger than the time gained by running the calculations in parallel (since they are so fast with so few atoms). You usually need hundreds of atoms per MPI process for efficient parallelization. LAMMPS does not do quantum mechanics, so calculations are much faster.

LAMMPS does not employ minimum image conventions (otherwise it would have to reject your simulation, even on a single process), so you can have a cutoff that is larger than half the box length. The larger the cutoff, the more ghosts are needed.

Tip: replace your replicate 1 1 1 command with replicate 10 10 10 and observe what changes.

Thankyou akohmey for your reply, I have changed the replicate 1 1 1 to replicate 10 10 10 and now I have 8000 atoms in my simulation as per the output file:
replicate 10 10 10
Replicating atoms …
orthogonal box = (0 0 0) to (56.568542 56.568542 40)
1 by 1 by 1 MPI processor grid
8000 atoms
replicate CPU = 0.001 seconds

Still the no of neighbours are 56000
Total # of neighbors = 560000
Ave neighs/atom = 70
Neighbor list builds = 1
Dangerous builds = 0

From your reply I think that it has to do something with cutoff specified in the potential file.
I header of current potential file is
Al EAM from Phys. Rev. B 59, 3393 (1999) in the LAMMPS setfl format.
Conversion by C. A. Becker from Y. Mishin files.
30 December 2008. Interatomic Potentials Repository
1 Al
10000 0.2000000000000000E-03 10000 0.6287210000000000E-03 0.6287210000000000E+01
13 0.2698200000E+02 0.4050000000E+01 fcc

I think I need to find out where is cut off specified in this header. If you can help I would be extremely grateful.
Thankyou for taking time to review my quieries.

Exactly. You should have the same average number of neighbors per atom as before.
But the ratio of local versus ghost atoms should be different.

Why?

I think you should rather spend your time studying text books on MD simulations and taking a class on statistical mechanics and/or thermodynamics. Everything that you were asking about becomes self-evident, once you understand the basics of the method better.

Thankyou very much akohlmey for your help & support.

Many thanks, Akohlmey, for your valuable support and responses throughout. I recently completed a Molecular Dynamics course, and currently, I am delving into the usage of the Lammps software.

It took me a while, but I have finally grasped the reason behind my previous uncertainty concerning the number of neighbors (No. of Neighbours = 560) in the simulation of 8 atoms.

I wanted to modify the cutoff parameter in the potential file, just to see and verify that the no of neighbors is controlled by the cutoff parameter.