Dear all,
I recently encountered the “ERROR: Lost atoms” message. Now I understand that during a simulation, atoms can become ‘lost’ if they cross non-periodic boundaries or move too far away. Also, I observed that when “thermo lost warn or ignore” is set, lost atoms are deleted, and the simulation continues. Here, I’m curious about how lost atoms are deleted and found that it happens during the re-neighboring process.
I read the document, “4.7 How a timestep works” in the LAMMPS manual, and gained an understanding of the re-neighboring process. However, I couldn’t locate the specific part of the source code responsible for deleting lost atoms. Does anyone know about this? Below is the pseudocode of the re-neighboring process in “4.7 How a timestep works”.

There is none.
As described in the text following the graph you are quoting, during the neighbor list rebuild first all ghost atoms are deleted, then atoms that have moved outside the subdomain are communicated to the neighboring subdomains (in 6 steps: left, right, top, bottom, front, and back) in comm->exchange()
. And finally the ghost atoms recreated in comm->borders()
.
If an atom has however moved so far that it would need to be sent to the subdomain next to the neighboring one, it cannot be communicated and thus it will be lost.
Dear akohlmey,
Thanks for your comment. Your comments have helped me a lot in understanding the issue of lost atoms in LAMMPS.
However, I still have a question about the statement “communicated to the neighboring subdomains (in 6 steps: left, right, top, bottom, front, and back) in comm->exchange()
” in your comment.
First, the figure below shows the communication process for exchanging atoms between neighboring subdomains, as I understand it. The blue atoms are owned by Processor 1, and the orange atoms are owned by Processor 2. After several timesteps without re-neighboring, one of the blue atoms migrates to the neighboring subdomain region, and one of the orange atoms also cross into next region. Then, during the exchanging process, the orange atom (indexed as 12) becomes an owned atom of Processor 1, and the blue atom (indexed as 9) becomes owned atom of Processor 2. This represents my understanding of the communication process for exchanging atoms. Is this understanding correct??
If so, I believes that the a subdomain should communicate with 26 neighboring subdomains in 3D. In addition to the six direct neighbors (left, right, top, bottom, front, and back), this includes diagonal neighbors (upper left, lower left, etc.) to account for atoms that move across subdomain boundaries in diagonal directions. I’d like to humbly ask for your opinion on this.
Sincerely,
Kevin
Please study the recent LAMMPS paper or Parallel algorithms section of the LAMMPS manual.
Only six exchange communications are needed for the regular “brick” decomposition style communication pattern. More exchanges are only required for “tiled” decomposition.
Thank you. With your comments and some additional study, I now have a complete understanding of how the lost atom issue occurs in LAMMPS. Have a great day!
Kevin
That is great. With that level of understanding, you can now help others that are asking here about lost atoms or similar.
2 Likes