log2txt volume

Hi All,

I’m trying to use log2txt to output volume. My log looks something like:

---------------- Step 26000000 ----- CPU = 52331.9713 (sec) ----------------
TotEng = -98054.7272 KinEng = 28638.0727 Temp = 300.2431
PotEng = -126692.7999 E_bond = 12879.6411 E_angle = 9352.5462
E_dihed = 3479.2225 E_impro = 0.0000 E_vdwl = -152404.2096
E_coul = 0.0000 E_long = 0.0000 Press = -12.5327
Volume = 2792934.3886

I’ve tried:

log2txt.py log.lammps data.txt “Volume”

but got an error message.

This works: log2txt.py log.lammps data.txt “TotEng”

Any ideas on how to get the volume would be great.


Don't use thermo style multi.

HA! Thanks Axel. So there’s no work around?

Write your own parser?

Why does the log2txt not get the volume in this case?

why does it smell bad when i fart?

or asked differently: why should it work if you feed it data in the
wrong format?

log2txt depends on the “log” module. It can only works with the table-like format. Even thermo-style re-defination can produce wrong results. You must be careful.

Keep in mind that LAMMPS is an open-source software.

tools/python/log2txt.py should work with any log file format

LAMMPS produces, e.g. multi. It probably won’t work if

you change from “multi” to “one” in the middle of single log file

with multiple runs.

I just tried this (with or without the quotes) on log.lammps
produced by bench/in.rhodo, and it works fine:

log2txt.py ~/lammps/src/log.lammps tmp.data “Volume”