LAMMPS GUI Test version for macOS, Windows and Linux

Dear Axel,

Thank you so much for your hard work. I tried running the GUI for macOS. Here is my system software and hardware information:

Software:

System Software Overview:

  System Version: macOS 12.6.8 (21G725)
  Kernel Version: Darwin 21.6.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal
  Computer Name: Tapashree’s MacBook Air
  User Name: Tapashree Pradhan (tapashreepradhan)
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled
  Time since boot: 17 days 15:52

Hardware:

Hardware Overview:

  Model Name: MacBook Air
  Model Identifier: MacBookAir7,2
  Processor Name: Dual-Core Intel Core i5
  Processor Speed: 1.8 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 3 MB
  Hyper-Threading Technology: Enabled
  Memory: 8 GB
  System Firmware Version: 481.0.0.0.0
  OS Loader Version: 540.120.3~22
  SMC Version (system): 2.27f2

I made changes to my existing .zshrc file as instructed in the README, and all the steps executed perfectly. I’ve attached the screenshot of how the GUI looks in my system.

I know the GUI is in the early development phase, and you’re still incorporating many changes. Here are my few nice-to-have suggestions, just in case you’d like to incorporate them into future versions.

  1. I would appreciate it if all the output windows could be docked inside the code editor window itself instead of having to click on “View” in the top menu to see them—sort of like what we see in Octave or Spyder.
  2. Thank you for adding syntax highlighting to the text editor. For the last five years, I’ve been using a free VS Code extension: Lammps Syntax Highlighting - Visual Studio Marketplace which also synchronizes with LAMMPS documentation periodically and also offers many excellent features aside from syntax highlighting like Autocompletion, Task provider, Hover information (my most used and loved feature as I can quickly refresh my documentation knowledge). Perhaps you can incorporate any of these features for your “Quick Help” modality.
  3. I have no suggestions for the Preferences dialog, as I think you’ve taken care of most of the requirements we users need.
  4. A button in the editor window or instructions at the bottom panel would also be nice for the run and stop functions.
  5. I can’t change the directory where I want to run the app if I start the GUI from the applications folder in macOS. I think I’ve to launch the terminal app and then change the directory before starting the GUI app from the terminal. A feature for this from the app itself would also be nice.

Hope any of this would be useful to you. Thanks again!

1 Like

Thanks a lot for your feedback and also for presenting it so well and lucid.

I think, with the state of version 1.2 it reaching the point where most of the core functionality and what can be implemented fairly easily is done and from now on, adding more features depends on how much effort it is going to be versus the perceived benefit.

That is not likely to happen for three reasons: 1) it is far more effort to do an MDI interface thus somebody else with more experience in GUI programming would have to do that, 2) I never liked those since they kind of require to run applications in fullscreen, which conflicts with what is the most effective way to use screen real estate for me (I learned my craft when screens were not flat but shaped a bit like fishbowls and 800x600 pixel was normal. The IBM workstation screen with 1280x1024 pixel that I was given with an RS/6000 workstation as office computer was consider huge) and 3) most importantly, it does not allow to switch easily between those windows with Alt-Tab.

That is not likely to be done easily. The issue here is the programming effort required. Most of the hard work is already implemented as part of the Visual Studio environment, so for the extension one just needs to feed it the relevant information and use the existing functions. The text editor “widget” doesn’t have those, so it would all have to be reprogrammed. That said, I do have an idea for how auto-completion could be done (and it can be done even more accurate than with Visual Studio, since the LAMMPS library interface has support to query which features are available, so it would only suggest styles that are available in the given LAMMPS library used.

I’ve heard this now a couple of times and always from macOS users. This seems to be more desirable because of the unusual way that macOS handles the menu bar: rather than at the top of the window it is at the top of the screen. I personally think this is rather confusing (I suppose it isn’t when you are using a mac for a long time), but I will take this under consideration. It feels a bit redundant, but it is justifiable since running LAMMPS is the main purpose of the application. However, please note that almost all commands are also available via hotkeys, so to run one can use Ctrl-Enter (or Command-Enter on a mac) and to stop Ctrl-/

This conflicts with what I consider a unique design feature of the application: when opening a file, the GUI app will change its working directory to the folder where that specific input file was found. This is what is displayed at the right side of the status bar (when LAMMPS is not running). Try opening different input files in the examples tree and see how the working directory follows where the input files are.

Overall, I don’t want to stray too far from having the application behave similar to what people otherwise achieve with multiple applications. The main purpose is to make it easier for people that
are not power users to be productive, i.e. without having to learn using different tools as editor, visualizer and plotting program to get started. But eventually this will be the next step since LAMMPS GUI will never be as good as a proper text editor (like emacs, vi, or visual studio code etc.), as good as a proper visualization program (like OVITO or VMD), or a proper plotting program (like gnuplot, xmgrace, matplotlib/python or excel), so I want to have it “feel” a bit like that. That this is also becoming very useful to myself for rapid testing/debugging (thanks to the many hotkeys and the option to start and stop quickly) is a rather unexpected outcome. But that will hopefully help to motivate me to keep updating and improving it (I have a few ideas for features that are specifically useful for people writing and testing LAMMPS source code).

Thanks again for your suggestions,
Axel.

Dear Axel,

Glad to be of help! Also, thanks for telling us a bit about your early learning days :slight_smile:

I tried your instructions for the directory change situation, and yes, it works as you explained. Thank you. All of my suggestions are nice-to-haves and not at all essential. Indeed, for power users, the preference would always lie in using the command-line option via building and compiling from the source code itself. And the GUI v1.2 has all the necessary features that a beginner would need and is very easily accessible (for example, if I’m the TA of an introductory class teaching molecular dynamics via LAMMPS to absolute beginners, it would be pain-free for them to get started with the GUI and understand all the essential functions LAMMPS can perform).

As for the start/stop function button suggestion, please note that my idea was for you to either have a button for it or mention the hotkeys combination instruction somewhere on the starter window, for example, at the bottom panel. Thank you for taking this suggestion into account.

As soon as the university reopens after the summer and I get access to Linux workstations in the lab, I will also try to test the GUI there. I am looking forward to the auto-completion feature.

Best,
Tapashree

I have just posted updated versions of the packages with run/stop/image buttons at the bottom of the window. It also adds tooltips to them as well as the buttons in the image viewer and a few more small improvements.

1 Like

I’ve just downloaded the LAMMPS GUI for Windows and am very excited to try it. However, I’ve noticed that when I open it up with no prior input, the starting directory is C:/WINDOWS/System32/ (at least on my machine).

This feels … unsafe. Could it default to somewhere in the user’s directory? (Especially since the installer already appears to know how to do a user directory install in %Appdata%.)

Hmmm… I cannot reproduce this. When I start it from the command terminal, it shows the current folder and when I start it from the “Start” menu it shows the “Documents” folder in my home dir.

That makes sense – my “Documents” folder seems to be pinned to a network share instead (Configuration of the My Documents folder - Microsoft Support), because I’m working on a uni-administered laptop. LAMMPS-GUI is able to read and write from the folder when herded there through the GUI’s read/write windows but doesn’t start there. It probably won’t happen in most normal users’ experience.

This is something that is not caused by the executable, but rather by the installer. It creates shortcuts in the start menu and thus are set up to use the Documents folder. Can you try to locate the .lnk file in the start menu folder and see if you can edit it to use %USERHOME% or something otherwise reasonable as default location? I could then update the installer.

Question: When you launch LAMMPS GUI this way, does it open and run in a terminal window?
also from the “Run” dialog in the statusbar at the bottom?

I’ve opened an issue on GitHub:

I attach a screenshot of what I see when I launch LAMMPS GUI:

“About” window: (might be nice to have a button to automatically Copy To Clipboard)

image

I’m not sure about the “Run” dialog in the statusbar at the bottom.

This looks like you have installed the very first version I posted. How about https://download.lammps.org/static/lammps-gui-v1.2-win10-x86_64.exe ?

I’ve since figured out, that this cannot be avoided. Well, technically it is possible with some changes to the CMake script. However, that would make it a non-console application, and that has a bunch of challenges: for example, the method I am using to capture the output from LAMMPS depends on having a console.

Adding a button would be a lot of effort, since this uses a convenience widget where all I have to do is assign the text and icon. But it may be possible to just copy the text always to the clipboard automatically.

Probably a bug: I cannot drag an input file to the GUI window on Windows. For example, when I dragged a file at C:/Users/username/Desktop/foldername/input.lmp to the GUI window, it pops up a warning like

Cannot open file C:/C:/Users/username/Desktop/foldername/input.lmp: 
The filename, directory name, or volume label syntax is incorrect.

It seems that C:/ is duplicated for some reason.
I’m using the version from the post above (https://download.lammps.org/static/lammps-gui-v1.2-win10-x86_64.exe)

1 Like

Definitely a bug. The code to convert an URL received from the drag-n-drop event to a local file was not platform neutral. As it turns out, rather than having to do it manually, there was a built-in function to do it properly.

Have found and fixed a few more bugs and will upload a new set of binaries soon.
Rather than using a development snapshot, I have backported the lammps-gui fixes to the maintenance branch of the stable version, so the updated binaries will be based on the stable version of LAMMPS. If there are no more issues discovered for a while, I will then update the binaries posted on GitHub replace with this version.

Hi all,

New v1.2 binaries with multiple improvements and bugs fixed have been uploaded.
Unless there are new bugs or usability issues reported, I plan to post these on GitHub to replace the v1.0 versions. Changes since last upload:

  • uses 2 Aug 2023 stable version of LAMMPS, not some (experimental?) development snapshot
  • default directory for Windows installer has been changed to the user’s home instead of the “Documents” folder. @srtee please check if that (still) defaults to a system folder on your machine and let me know.
  • drag-n-drop of files on Windows should work now. @initialize please check and let me know
  • images should be created (instead of producing an error message) for systems w/o bonds. @ceciliaalvares please confirm
  • all preferences are now correctly imported from the last saved state.
  • the contents of the “About LAMMPS” dialog are now automatically copied to the clipboard to simplify reporting version and configuration info (@srtee this is the best that can be done without re-implementing the messagebox class).
  • updated docs in the manual. until the next feature release they are at: 8.6.3. Using the LAMMPS GUI — LAMMPS documentation
    which is the link to the online documentation for the develop branch
    Correspondingly, the stable version documentation can only be updated with the first update to the stable version, which will take at least 6 more weeks until publication.
  • guess elements from atom type masses and color by element, when possible. requires “real” or “metal” units currently.
  • A preferences option and pushbutton were added to switch between the default “sticks” and a space-filling VDW style. this uses per-atom covalent radii from the guessed elements and thus is also currently limited to inputs with either “real” or “metal” units
  • a few small improvements to syntax highlighting
  • avoid crashes when closing the app while running LAMMPS
  • default image dimensions can be overridden in the image viewer
  • add “busy” indicator when image generation is running.
  • tooltips for a buttons
  • run/stop/image buttons in the status bar
  • app must be relaunched when accelerator preferences are changed to correctly apply them or when the dynamically loaded LAMMPS library is changed
  • bugfixes when compiling lammps-gui to load LAMMPS dynamically at runtime. provided binaries are directly linked to LAMMPS, so this requires compilation from source.

images should be created (instead of producing an error message) for systems w/o bonds. @ceciliaalvares please confirm

It doesnt seem that it is working for me (even for systems without bonds). I have the same error as before. For what is worth, the error exists no matter if I try to craete the image by clicking the pallette button by the end of the simulation or if I try to do it by going through “View” => “Image window” => “View” (from the image viewer pane).


pic2

Other than that, on my side, the drag and drop is now corrected.

I think the error comes from the space in the name of your user directory. LAMMPS interprets is as two separate tokens, which ends with the Illegal dump image command you see.

1 Like

Yup, I keep forgetting to check for that. I’ve learned the lesson that blanks in file or directory names are a bad idea all too well. :frowning:
I have updated the Windows installer file (.exe) with a version that quotes the filename and should thus not create an error. @ceciliaalvares, if you have the time, please uninstall, re-download, and re-install and try again. Thanks.

So, now I have another error (shown below). When I go to the directory where the image is supposed to have been saved, I find a .ppm file that seems to be empty (also shown below).


I dont know if this is something weird particular of my computer though… it is a working laptop that I got in my PhD that has some “basic usually-existent apps” missing (like I dont have calculator installed or anything). It was already a miracle that I could actually install lammps without having to type an administrator password that I do not possess.

No, your input is just another corner case that I have not anticipated.
This needs some more programming. Stay tuned.

That is not so much a miracle, but the result of hard work and careful research. :wink:

I just uploaded a new version that should address the issue you are seeing and finally get you and image. So, if you have the time, please do one more uninstall, download, reinstall, test cycle.

Thanks.

Ohh I didnt know it was possible to design an app that is able to counter it :ooo

Look… seems to have worked :DD
PS: looks super akward but it is because I took a very weird initial microstate and ran very few steps. The tool should be fine!

1 Like