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

Multiple snapshots/frames in one file

Hi All,

Is it possible to load multiple frames from a single (supported) file into Ovito? Currently I'm using Lammps data files, stl and obj files but could not figure out how I should store multiple frames in one of those files so that Ovito would read them. The idea is that I want to avoid having separate files along my simulation for each snapshot because it gets inconvenient very quickly.

If this is possible, a simple example of those formats (Lammps, stl and obj) would be greatly appreciated.

Thank you,


Hi Botond,

OVITO is able to read multiple animation frames from file formats that support the storage of simulation trajectories. But the formats you've specifically mentioned (LAMMPS data, STL, OBJ) do not support multiple frames. I'm not sure if you are suggesting this step, but as a developer I would be reluctant to extend these file formats without authority. OVITO would be the only software to support such a custom extension.

I would rather recommend you to use an existing file format that already supports trajectories if you can. At least for particle data there are couple of formats to choose from which OVITO can read:

  • LAMMPS dump
  • XYZ
  • PDB
  • NetCDF/Amber (binary)
  • XTC (binary)
  • GSD (binary)
  • ..and a few more

The binary formats provide the advantage that they allow random access to the simulation frames stored in a file. OVITO doesn't have to scan or read the entire file first before loading a specific frame from the trajectory.


Hi Alex,

Thank you for all your help! As you might have noticed from my other post, I'm trying to visualize a trajectory of a mesh-like simulation and, at the same time, avoid using many small files. I wasn't suggesting this step but now I think I am 🙂

Something simple would do, like for all the supported ASCII formats, define a line separator and make Ovito read everything in between two separators as a separate file. The user could define whatever separator they want and stack their data accordingly. I understand this is non-standard, but would allow trajectories for any supported ASCII format which is nice I think.

Regarding random access, I don't know if this would work in an ASCII file but maybe Ovito could read the file once and keep the position of the delimiters only in memory to quickly navigate to any snapshot afterwards.

Regarding the LAMMPS dump, would you have a multi-snapshot trajectory file example? Since I don't actually use LAMMPS, an example file that works would be useful for me to mimic the format.

Thanks a lot,