Import dump file with all columns properties by python

Dear all,

I want to write a python script to export the last frame of a LAMMPS dump file with all properties. But I have a problem.
How can I get all columns without writing their names in a list? Is there any way? If no, so how can I find all columns that are in the dump file or structure?

for example:
I mean the columns attribute.

export_file(pipeline, "outputfile.dump", "lammps/dump",
    columns = ["Position.X", "Position.Y", "Position.Z", "My Property"])

Kind regards

The data.particles object works like a Python dict type, with the dictionary keys being the particle property names (see PropertyContainer base class). You can obtain all keys using the .keys() method, convert the view to a list of strings, and then pass them as columns argument to export_file():

export_file(pipeline, "outputfile.dump", "lammps/dump", 
    columns = list(pipeline.compute().particles.keys()))
1 Like