how to grab some information from log file to make a new file

Another possibility might be to use the print command and output to a seperate file during runtime (In case you run these simulations more often)

Regards

Wolfgang

By coincidence, I’ve just written a script to do this myself (I wanted some quick and dirty and didn’t have Pizza installed on the cluster): https://github.com/niallj/LAMMPSThermoExtractor

It extracts individual runs to different files (by default, thermo0.dat, thermo1.dat, etc.). It also averages the quantities in the files and gives output similar to the GROMACS g_energy tool. It requires Python3 and NumPy.

Cheers,

Niall

When all else fails, awk will still be there for you:

awk '/Step/,/step/' log.lammps | grep -iv step > mydata.dat

This is a simplification of the awk one-liner for xmgrace at
tools/xmgrace/logplotawk.oneliner

Aidan

2015-12-01 9:33 GMT-07:00 Jackson, Niall <[email protected]...>:

Thanks very much for all your replies! It helps a lot.
I will have a try.