Looking for Feedback on new Feature in LAMMPS / LAMMPS-GUI

Dear LAMMPS and LAMMPS-GUI users,

Over the last couple of days, I implemented a new feature into the dump image visualization of LAMMPS and LAMMPS-GUI.

Users of the VMD software will know something similar as “DynamicBonds” representation.
This is useful for visualizing simulations, where there are no explicit bonds or where the bond topology will change over time. In the former case, it will draw bonds based on a simple pair-wise cutoff criterion and excludes hydrogen-hydrogen bonds. Also, the bonds may change over time. This is a very simple heuristic approach that can work for pair styles like sw, tersoff, airebo, reaxff and many others more. It should also work for systems with bonds, but will ignore any existing bond topology but rather apply the cutoff criterion (usually not recommended). Please see below for the improved ImageViewer dialog with the new button to enable the autobond feature and the dialog field, where the cutoff may be entered.

The new feature works for my test inputs, so that at this point I would be interested to have (one or more) somebody else try it out and give feedback. You can download LAMMPS test versions from here https://download.lammps.org/testing/.

I am particularly interested in cases where the bonds are not drawn or incorrect or where LAMMPS or LAMMPS-GUI crashes.

2 Likes

I tested a system with 20k atoms and it works fine.

I also tested another system with 500k atoms, in which case the bonds appeared to not showing up at the beginning; but after waiting like 30 seconds they did appear. I think lammps gui is not designed for such a system size, though. The good news is that the UI is still responsive when waiting.

Personally I would use dedicated visualization softwares anyway, but I agree that this is a good feature.

@initialize
Thanks a lot for the feedback.

30 seconds sounds like a lot. If I use the in.lj benchmark input and scale it to 500k atoms, the automatic bond creation takes about a second on my desktop machine. It will take significant times for large systems, because to draw the bonds, all pair-wise distances within the bond cutoff need to be found. This is already sped up by re-using the neighbor list for computing the pairwise force interactions.

The autobond feature is part of LAMMPS within the dump image command and LAMMPS is meant to be used for large systems. In fact, dump image can be attractive compared to other visualization tools, especially for large systems, because it can run in parallel. However some visualization features, do use a significant amount of time (like SSAO in combination with anti-aliasing), but so would using VMD or OVITO with an external raytracing program for visualization.

LAMMPS-GUI has been designed for that. All of the LAMMPS functionality runs in a concurrent thread (or multiple parallel threads) and for visualization LAMMPS-GUI just dispatches a write_dump command to the LAMMPS instance and then updates the image after the command’s completion. You can actually see in the image viewer a little “palette” icon that is illuminated while LAMMPS is processing.

LAMMPS-GUI is not meant to replace a dedicated visualization tool. It is too limited in its capability by what the dump image command provides. That said, it should render images correctly, be efficient doing it, and not crash. So far, it looks like these goals are mostly achieved.

I tried it again with the 500k atom system and realized what the problem is. Namely I did the following steps:

  1. click the bond creation button (to enable it)
  2. change the cutoff value in that input box (the default 1.6 is too small for my system)
  3. press tab (to leave that input box)

I expected the step 3 to automatically trigger the bond calculation, but it didn’t. I had to manually disable and enable bond creation (click the button twice) to actually start the bond calculation. And after that bonds show up in 3~4 seconds.

Regarding the “system size” thing, I think the main problem is the speed of rendering images. Even with bond creation disabled there is noticeable lag when switching view angle or scaling, and it becomes quite laggy with bond creation enabled (I enabled neither SSAO nor anti-aliasing). In comparison, I can drag the perspective view continuously in OVITO even with bond creation enabled (not super smooth but definitely much better). Though I think OVITO do rendering with OpenGL so it’s not really a fair comparison(?). I’m on an integrated GPU (R7 5700G), if that matters.

This looks indeed like a bug.

Correct, dump image is entirely using software rendering. This makes it slow compared to GPU accelerated rendering, but it will run in parallel with MPI and uses distributed memory. So it could handle systems that would be (far) too large for programs like OVITO or VMD.

I think I figured it out. This behavior is due to using an “input validator” class that will reject input that is invalid or out of range. You must have changed the cutoff beyond the accepted range.

I’ve looked at the in more detail and have come to the conclusion, that the provided validator class not suitable for the purpose and thus I am implementing my own. I will post new binaries when this is done.

New binaries with multiple bug fixes and updates are now available at: LAMMPS Testing Download Repository: .

2 Likes

I just uploaded a new set of test binaries for LAMMPS-GUI.
These have additional bugs fixed and now offer have the feature added that in the image viewer (which uses dump image) you can visualize regions. That includes regions where parameters are computed from variables and which are subject to the “move” option. The corresponding “rotate” is not yet implemented.

Feel free to experiment and let me know if there are issues (this is brand new code, there must be some oversights. no normal programmer is that good that there are no glitches :wink:).

There is one more update. This time I changed a few of the color selection options to enter any colors that are supported by dump image. They can be entered as text, but only valid colors will be accepted and there is auto-completion on the list of available color names.

Please note that the colors for the chart windows are independent from that. If you feel there should be more choices, please let me know (and which ones?).

After two weeks and some reorganization work, there are new test versions of LAMMPS-GUI packages posted. This has LAMMPS-GUI version 1.8.2 with mostly internal improvements but also fixes for a few more bugs that were discovered during the recent LAMMPS workshop.

LAMMPS-GUI has now its own git repository: GitHub - akohlmey/lammps-gui: LAMMPS-GUI - The graphical interface for learning and running LAMMPS
Also the documentation has been moved: LAMMPS-GUI Documentation — LAMMPS-GUI Documentation

As usual, any feedback is highly welcome.