Matlab code to extract the data from lammps log file. This code is an add-on to the readlog file created by Arun K. Subramaniyan.
// Run Rules //
- Both files has to be opened at the same time in Matlab.
- Make sure both files are in same location as the log file otherwise modify line number 1 in ColumnsForLAMMPSLog.m
// Instructions: //
- Run the ColumnsForLAMMPSLog.m code and type the number of the run-stage to extract the data from. ex: relaxation 1 , compression, heating, cooling e.t.c
- It will generate column vectors of the thermo_style data for that run
- You can plot these values using matlab plot functions
Note: Sometimes the reader will fail if the log file run did not end in the expected way of "Loop time of ... " This happens usually when using gpu packages or it might happen with packages that I did not use previously. Modifying that line to the expected format should solve the issue.
Update: LAMMPS 23JUN version aligns the thermo headings, the code will not work with these new log files. However, it is not diffcult to use any data extract tool.
Happy Simulations !