Dear lammps developers,
I am very happy about the lammps gui for teaching purposes. There is one thing I am wondering about though: The plot that opens to show the thermo data does not seem to contain all data printed in the log file. Is this a bug or a feature and can the behavior be changed?
To give an example (I know that it is a stupid example, because the runtime is nonsense, but just to make my point),
(for a small LJ liquid system)
will result in an empty plot, while the thermo file gives
Step Temp E_pair E_mol TotEng Press
0 0 -0.95476642 0 -0.95476642 -0.00030483441
1 0.047493515 -0.94727429 0 -0.87607855 0.0018230164
2 0.13923691 -0.94708817 0 -0.73836334 0.0041800105
3 0.22307863 -0.95395399 0 -0.61954519 0.0054076575
4 0.29518969 -0.95278547 0 -0.51027768 0.007365816
5 0.36175439 -0.95100534 0 -0.40871291 0.0093013987
6 0.42562369 -0.94836949 0 …
Thanks for your kind words about LAMMPS GUI.
It is not really a bug, but also not really an intended feature. It is more an undesired side effect of the method used to obtain that data.
The explanation is a bit technical: LAMMPS GUI is running LAMMPS in a separate thread and then will read information directly from that thread while it is running. It captures the output to the screen (which can slow down LAMMPS substantially, if there is a lot of output happening quickly) and it will read information about is current state regularly and then update the different parts of the GUI from that information. This is currently done every 100 milliseconds. If the information is updated more frequently, it cannot be read and stored. Thus for examples that run very fast and/or produce output very frequently the 100 milliseconds is too much. However, reducing that time will make the GUI take up more time and be a bit more sluggish because of more “background activity”.
Are you using a pre-compiled executable package or did you compile LAMMPS GUI from source? If the latter, I can tell you which line of code to change and you can experiment with how frequent an update can be tolerated for typical situations. The 100 milliseconds value was found by making tests with a number of input file examples in the LAMMPS bench and examples folders and has been able to capture almost everything for those. Since this is not meant for “exact” results, it is not considered a problem, if an occasional line of thermo output is missed. The full data is retained in the output and can be saved from there.
As an aside, for capturing and post-processing thermo output from the output or log, people should consider using the YAML style thermo output. Please see: 8.3.9. Output structured data from LAMMPS — LAMMPS documentation
Thank you for your fast reply and explanation and for offering to point me to the right line of code! Since this is mainly for teaching purposes, I want to/need to stick to pre-compiled versions tough: We do not have university-computers where we can install the codes for all students in one go, but every student needs to bring their own laptop, leading to widely differing architectures making compiling anything a drama.
In fact, in this respect: is the gui also available for Mac (I do not possess a Mac to test on. I now ran on a windows machine.)?
The most pragmatic solution seems to be to increase the size of the system that we use in our computer lab. That will lead to the students having to wait a bit longer, but will also lead to less output being “lost”. For what we want to achieve (students starting to understand what a force field is, what lammps does and how it works, how to interpret an rdf,…) that will be good enough! In fact, I believe that the gui (which I had never used before today) will make the computer labs go much more smoothly as students do not have to worry any more about getting output into datafile formats that they can use to plot.
Yes, macOS (version 11 (Big Sur) and later with Intel and Apple CPU) and also Linux binaries (Ubuntu 20.04LTS or later and compatible) are available: LAMMPS Static Linux and GUI Binary Download Repository: .
This was the thought that provided the motivation to implement it. We came across this while discussing how to most effectively conduct the tutorial session at the last LAMMPS workshop. Unfortunately, it took about two months to get the app to its current, sufficiently complete state and that was a month too late for the LAMMPS workshop.
I can also look into making this update interval parameter a configuration setting that may be adjusted in the preferences dialog.
I am currently teaching at an ICTP co-organized HPC school in Colombia and thus have no access to my build machines until next week. But there are a few other bugfixes and improvements pending so I will post new binaries some time next week. We are also getting close to making a new “feature release” which will include the updated GUI and then we will also upload the corresponding binary packages for the GUI (and the bundled binaries including a serial LAMMPS executable) to the GitHub releases page for LAMMPS as well.
A configuration setting would indeed be nice (as long as it knows it’s default value and can be reset to something you already know that works most of the time )
Our computer lab is actually next Wednesday, so if you can wait that long with a new release, I could report back anything that we run into during the lab and you could already take that along…
Yes, the “Edit” menu not only has an option to open the Preferences dialog, but also an entry to reset all preferences to their default values.
Doing this the other way around would be even more useful. I should be able to post new packages to LAMMPS Static Linux and GUI Binary Download Repository: . by Monday. With those you would have the latest updates and bugfixes from the development branch. If you then would give feedback, I can integrate it into the release (it is not likely ready by Wednesday, anyway). This way you would not be reporting issues that have already been reported and addressed.
P.S.: one important note.
Until the feature release, the link from “About → LAMMPS GUI Howto” will not work (
Currently the online version is only available with the development version documentation at: 8.6.3. Using the LAMMPS GUI — LAMMPS documentation
For the computer lab it is probably best to ask the students to download the PDF of these pages from the download server.
More importantly though, the link to the online documentation for individual commands available with a right-click of the mouse is available and in my sessions with students so far, this proved to be very helpful.
Both things I had noticed already and I had found the manual via the installation site, where the manual of the GUI is also linked.
The direct link from the console to the manual is indeed a great feature! As a teacher, I am really very happy with the new tool!
FYI. New binary packages with the latest bugfixes and improvements have been posted. These should identify themselves in the “About LAMMPS” dialog as version 1.5.4
@kdd How did your computer lab go? Any problems that need fixing? Crashes? Portability issues?
FWIW, I just posted updated packages with a few minor improvements.
Thanks for asking! Things went find, 2 things we noticed though:
- on some computers the plotting of the snapshot via Run, show image or something the like did not work and gave an error message. We did not try to fix it though as it was not relevant. (Note that those students had the version from 22.8 installed)
- It was confusing for the students that saving an input in a new directory and running it would not make the output go into that directory. Only if you save and the reopen the file the output goes into the desired directory. We had issues with students not finding their output because they did not know where it went.
I think it may be easier to change the working directory upon saving rather than only re-opening. Also, it would be nice if one could display the working directory somehow such that one can check where output goes.
But nothing serious!
Thanks for asking!
Thanks for the feedback.
I would need to know more details so I can reproduce the steps and see what the exact issue is and specifically what the error message is. In some cases, e.g. with syntax errors in the input or an incomplete input, trying to create a snapshot image will fail and then an error of the kind “Cannot load ######: file not found” or similar will appear.
This is a serious issue and needs to be addressed.
UPDATE: It turned out, this requires a simple one-line change. Updated packages are being created…
It is displayed in the status bar on the bottom right, when not running a simulation (then it will be replaced by the progress bar). 8.6.3. Using the LAMMPS GUI — LAMMPS documentation
Hmmm. Just that that is not where the files go (or at least not where they went - may be fixed though by now I judge from what you write)…
Thanks for the update!
The other issue (plotting), we simply have not had any time yet to investigate the issue ourselves. I only know that the problem was not an error in the code. In the first exercise the students just copy pasted some input and it looked OK. I will contact the student(s) for whom this happened and see whether I can figure out some more details.
New packages with fixes were posted today.
They should show v1.5.6 in the About LAMMPS dialog