Can ID(of particle) be assigned to multiple particles?

Submitted by terces907 on Sat, 10/26/2013 - 19:57

Hi, all!
Today, I just saved a point data of my project from "Paraview". And i found that in my "output.csv" had something strange.
Normally, In my understanding one ID(of particle) can be assigned to only one particle so that means when you save point data from Paraview inside your output.csv file for each line shouldn't have the same ID i mean no any ID is duplicated in output.csv file (if it's duplicated that mean that the particle can be located on multiple places at one time and that's impossible)
What are you thinking about this?

I don't know that because my understanding is wrong , there's something wrong in Liggghts or there's something wrong with Paraview?

cstoltz | Mon, 10/28/2013 - 11:44

As far as I know, each particle inserted into a LIGGGHTS simulation is assigned a unique ID. You should see this in the dump files. I don't know what happens when you try to output data from Paraview, however. I would have expected it to preserve the ID given that you can load ID as an attribute for classification, similar to radius, force, velocity, etc.


ckloss's picture

ckloss | Thu, 10/31/2013 - 12:15

Hi Chris and terces907,

yes, in the current formulation new tags are given beyond the current max tag.
I know this can be annoying for post-processing.
I had discusssions with Steve Plimpton (LAMMPS) about this, and there are plans we might change this, but this is still on the to-do list.


richti83's picture

richti83 | Thu, 10/31/2013 - 13:27

Hi Chris,

I think I would have trouble with read_data add when there are changes in the atom->tag formulation.

On scriptlevel one can check if an atom exists by checking id[i]!=0 in a loop from i to maxtag (I added a new thermo compute to determine maximum tag)

What's about a new property/atom on scriptlevel and than asign a consecutive number to it ? So the PointID would be unique but not consisted but the property would be.

variable c equal 1
label loop
variable i loop 1 ${atoms}
variable id equal id[$i]
if "${id} == 0" then "next i" &
"jump in.lmp loop"
set atom $i property/atom MyNumber $c
variable c equal $c+1
next i
jump in.lmp loop

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
but I have 7 years user experience using LIGGGHTS®, ParaView and LINUX