[lammps-users] dumping of thermodynamics in header of trajectory

Hello all,
I need to dump various thermodynamic quantities (pressure, ke, pe) in the header of my trajectory file in order to do some post trajectory analysis. I’ve created a new dump format (see attached) that seems to work in serial, but not in parallel. In parallel, the code simply hangs, with no cpu activity or output. I thought it had to do with how the various quantites are computed in parallel (I’m using output->thermo->temperature->compute_scalar() etc.), but can’t seem to get around this. Does anyone have an idea of what I’m doing wrong?

Best,
Tamara

dump_vac.cpp (3.11 KB)

dump_vac.h (912 Bytes)

Call like compute_scalar() are parallel in the sense that all procs
need to call them, though only one proc should write to your file.

Why not leave LAMMPS as it is with the global thermo info written
to the log file, per-atom info written to the dump file, and have your
analysis tool read both files to do its post-processing?

Steve