Particles in the topology dataset have identifiers but trajectory particles do not

Try the following lammps input files:
in.in (139 Bytes)
in.lmp (288 Bytes)

After running in.in, the file in.dcd will be created. Open in.lmp in OVITO and load in.dcd as trajectory. Now this error appears:

Particles in the topology dataset have identifiers but trajectory particles do not.
This likely is a mistake. Please ensure the trajectory file contains identifiers too.

Indeed the error is gone after ticking “Sort particles by ID” in the “LAMMPS data reader” section of the input file, but this is quite unintuitive imo (no hints about this to users).

Thank you for bringing this issue to our attention. I have looked into the situation you described and am convinced that OVITO’s behavior in this case is fundamentally correct, i.e., that an error should be raised.

But you are right, the message is not easy to understand and does not make it clear what really needs to be done to avoid the error. We will revise the error message. What do you think of the following version?

The particle identifiers in the topology dataset do not form a contiguous range of integers starting at 1, and the trajectory particles have no identifiers. The association of trajectories with their corresponding particles is ambiguous in this situation. Please ensure that either the trajectory file also contains identifiers, or that the particles in the topology dataset are sorted and have consecutive identifiers. The topology file reader may offer an option to sort particles by ID.

What do you think of the following version?

I get what it means, but I think this is too long (the error message box is only two lines high) and the most useful message is placed at the end, so it could be difficult to notice. If the error message box has an adaptive size then I think this is fine.

Btw from lammps documentation:

For the atom, custom, cfg, grid, and local styles, sorting is off by default. For the dcd, extxyz, grid/vtk, xtc, xyz, and molfile styles, sorting by atom ID or grid ID is on by default. See the dump_modify page for details.

Thanks for the suggestion. In OVITO 3.14.0 we have redesigned the error message UI to make reading the entire text easier.

1 Like