Has anyone used LAMMPS to calculate the pe/atom from existing dump file in native format?

Dear LAMMPS users,

I try to calculate pe/atom from an existing dump file that I have finished the simulation for a while. This particular dump file is a native format (id, type, atom position) in a single timestep. Then, re-dump it into a new dump file (append with pe/atom in each atom line). Please give me a way or a sample script to calculate the pe/atom.


See the rerun command. It can be used in a script

to read an old dump file, then your script can dump out

a new file, with whatever quantities you define, e.g.

the pe/atom for the pair style you choose.