[lammps-users] Post-processing of dump file

Hi,
I am using lammps to generate coordinate and velocity data and I use
'compute msd/molecule', 'compute gyration/molecule' and 'compute
bond/local' and periodically output the results. However, I would like
to use a package to do the post-processing with error estimation of
the dump file. I am looking into the md-tracks package, but would like
to know if there are other possibilities worth looking into.
Thanks,
RC

LAMMPS doesn't provide a post-processing tool for this.
But if you find or write one, let us know, and we can include
it in the distribution.

Steve

A couple more comments - the dump local command produces
a large dump-file style output (many items per atom), which
no current LAMMPS post-processing tool will do anything with.

The per-molecule computes that you list generate a global
array of data, which can be passed to other fixes, like fix ave/time
and fix ave/histo and variables for further processing. These can do averages,
min/max, write the results to a file, etc. Maybe that is what you
are already doing when you say outputting the results. But if you
want more sophisticated post-processing (e.g. error estimation), then
I think you would have to write/find your own post-processing.

The Pizza.py tool lets you right such tools in Python. A reader for
it could be written which reads either dump local style files or
the format of files written out by fix ave/time, for example.

Steve

Hi Steve,
During the simulation I use:
compute bl molecule bond/local dist
compute maxbl molecule reduce max c_bl
compute minbl molecule reduce min c_bl
compute avebl molecule reduce ave c_bl
compute rg molecule gyration/molecule

variable N equal count(molecule)
variable re2 equal (x[$N]-x[1])^2+(y[$N]-y[1])^2+(z[N\]\-z\[1\]\)^2 variable rat equal {re2}/(c_rg[1]*c_rg[1])

and output these values using 'thermo_style custom' to monitor the simulation.

However, I would like to average the data across multiple time origins
and trajectories (realizations) with error estimation. I use a 'dump
custom' command to output only atom ID, coordinates and velocities:
dump 1 molecule custom ${NDUMP} c1.bin id x y z vx vy vz

and the file sizes are manageable.

The md-tracks package can do the necessary post-processing, and even
has a utility to convert a lammps dump file to the tracks format used
by its other utilities for calculations. There are some minor issues
that I can work around:
(i) the md-tracks conversion package assumes the atoms are sorted; I
run the dump file through a program to sort it as I could not find a
way to have the 'dump custom' output sorted.
(ii) I use lj units, and md-tracks is set up to handle real units,
(ii) if I have 'dump custom' output to a text file, the md-tracks
conversion package precedes the atom data with 'ITEM: ATOMS id xu
yu...', which causes the conversion program to error out as it seems
to require only 'ITEM: ATOMS' on that line; however, the binary2txt
program in the lammps distribution produces a text file in the
required format.

Is there is a way to sort the dump output, and to control the header
on the ITEM: ATOMS' line?
Thanks,
RC

Is there is a way to sort the dump output, and to control the header
on the ITEM: ATOMS' line?

Re: sort - no way to sort currently though we may release something
soon. The Pizza.py tool can do a post-process sort of dump snapshots.

The ITEM: ATOMS line has additional info so that post-processing
tools know what the columns mean. It's up to the post-processing
tool to ignore that info if it wants.

Steve