Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple LAMMPS GUI using Qt library #3870

Merged
merged 108 commits into from Aug 3, 2023
Merged

Conversation

akohlmey
Copy link
Member

Summary

This pull request implements a simple LAMMPS GUI. It is by design very similar to using using a text editor and the command line. The main difference is that the application is linked to the LAMMPS library and thus can execute LAMMPS directly without calling an executable. That makes it a convenient choice in graphical desktop environments like Linux with Gnome or macOS or Windows. While not complete, it is quite usable already.

Related Issue(s)

Please see
https://matsci.org/t/wanted-collaborator-with-experience-in-programming-qt-for-implementing-a-lightweight-lammps-gui/49858

Author(s)

Axel Kohlmeyer, Temple U

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

N/A

Implementation Notes

This is based on a text editor tutorial for Qt with syntax highlighting added. There are several ideas that still need to be implemented some of which require a collaborator with experience in programming with Qt. See the included TODO file. Some of the available and planned functionality are similar to what the LAMMPS shell offers.

This creates a LAMMPS instance via the library interface and feeds it either individual commands or the entire buffer (with an automatic "clear" command inserted beforehand). Of course there is no MPI support, but OpenMP is possible.

One particular property is that any filename to be opened will be converted to an absolute path, the directory part extracted and the current working directory will be changed to that, so it can read external files, e.g. data files when loading, testing benchmark or example inputs from the GUI.

CMake is required.

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • Suitable tests have been added to the unittest tree.
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

Below is a screenshot of the state when this pull request was submitted.
lammps-gui-demo

@akohlmey
Copy link
Member Author

akohlmey commented Aug 1, 2023

@lammps/core I just realized, after merging this we have to change one of the statements on the LAMMPS home page. With this PR LAMMPS is no longer a software without at GUI (albeit a very minimal one). 😉

Copy link
Contributor

@stanmoore1 stanmoore1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this a lot, has potential.

@akohlmey akohlmey merged commit dea8050 into lammps:develop Aug 3, 2023
4 checks passed
@akohlmey akohlmey deleted the lammps-gui branch August 3, 2023 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants