Forum Navigation
You need to log in to create posts and topics.

LAMMPS trajectory files with bonds

Hi All,

In the documentation ( it says that one needs to provide two trajectory files to display bonds. Does anyone have a simple example of these two files so that I can understand the format?

3 atoms, 1 bond and a few timesteps would be enough I think.

Thanks a lot,



You can find a set of such files in the OVITO test data directory:

  1. LAMMPS data file containing initial atomic positions and initial bond topology:
  2. LAMMPS dump file containing the atomic trajectories:
  3. LAMMPS dump local file containing the varying bond topology for each simulation timestep:

I'm sorry that these are not really "minimal' examples, but I hope they are of use to you anyway. The latter two files can be loaded into OVITO using the Load Trajectory modifier. Note that the files are compressed and OVITO extracts them on the fly. You need to unzip them first if you want to take a look inside.

The file formats are documented here, at least to some extent:


Note that the 1st file in the set is not strictly necessary. It's possible to directly load the second file (LAMMPS dump) containing the atomic trajectories into OVITO and then apply the Load Trajectory modifier just once to load the third file (LAMMPS dump local) containing the varying bond topology. In this case it is important to activate the "Sort particles by ID" option during import of the LAMMPS dump file, because atoms must be in the correct order when the bonds get loaded from the LAMMPS dump local file (which references existing atoms by index, not by unique ID).

Hi Alex,

Perfect, this is extremely useful! Also, I see I can find all the other formats here which is very nice!

Thank you,