diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c33628ac04..58b001be24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/compile-msvc.yml b/.github/workflows/compile-msvc.yml index 5ae0654ee0..5c6ceeefb4 100644 --- a/.github/workflows/compile-msvc.yml +++ b/.github/workflows/compile-msvc.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 7bda3a071f..b1c23e1f6a 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/unittest-macos.yml b/.github/workflows/unittest-macos.yml index ea979ca94f..6970faceaa 100644 --- a/.github/workflows/unittest-macos.yml +++ b/.github/workflows/unittest-macos.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/cmake/Modules/Packages/ML-PACE.cmake b/cmake/Modules/Packages/ML-PACE.cmake index 6cdb751617..ce8f02f5f4 100644 --- a/cmake/Modules/Packages/ML-PACE.cmake +++ b/cmake/Modules/Packages/ML-PACE.cmake @@ -1,6 +1,6 @@ -set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources") +set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.10.04.tar.gz" CACHE STRING "URL for PACE evaluator library sources") -set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball") +set(PACELIB_MD5 "70ff79f4e59af175e55d24f3243ad1ff" CACHE STRING "MD5 checksum of PACE evaluator library tarball") mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_MD5) GetFallbackURL(PACELIB_URL PACELIB_FALLBACK) diff --git a/cmake/packaging/LAMMPS_DMG_Background.png b/cmake/packaging/LAMMPS_DMG_Background.png index 5ceb55c5e7..978b7d1987 100644 Binary files a/cmake/packaging/LAMMPS_DMG_Background.png and b/cmake/packaging/LAMMPS_DMG_Background.png differ diff --git a/cmake/packaging/MacOSXBundleInfo.plist.in b/cmake/packaging/MacOSXBundleInfo.plist.in index 33ce5a602b..bc08591e97 100644 --- a/cmake/packaging/MacOSXBundleInfo.plist.in +++ b/cmake/packaging/MacOSXBundleInfo.plist.in @@ -17,7 +17,7 @@ CFBundleLongVersionString ${MACOSX_BUNDLE_LONG_VERSION_STRING} CFBundleName - LAMMPS + LAMMPS_GUI CFBundlePackageType APPL CFBundleShortVersionString diff --git a/cmake/packaging/README.macos b/cmake/packaging/README.macos index 0325045983..d7583e7034 100644 --- a/cmake/packaging/README.macos +++ b/cmake/packaging/README.macos @@ -9,7 +9,7 @@ of the available packages. The following individual commands are included: binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt -After copying the lammps-gui folder into your Applications folder, please follow +After copying the LAMMPS_GUI folder into your Applications folder, please follow these steps: 1. Open the Terminal app @@ -23,7 +23,7 @@ these steps: 3. Add the following lines to the end of the file, save it, and close the editor - LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents + LAMMPS_INSTALL_DIR=/Applications/LAMMPS_GUI.app/Contents LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files @@ -38,9 +38,9 @@ these steps: the changes from .zprofile automatically. Note: the above assumes you use the default shell (zsh) that comes with - MacOS. If you customized MacOS to use a different shell, you'll need to modify - that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands - to modify the same environment variables. + MacOS. If you customized MacOS to use a different shell, you'll need to + modify that shell's init file (.cshrc, .bashrc, etc.) instead with + appropiate commands to modify the same environment variables. 5. Try running LAMMPS (which might fail, see step 7) @@ -50,10 +50,10 @@ these steps: lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo - Depending on the size and resolution of your screen, the fonts may - be too small to read. This can be adjusted by setting the environment - variable QT_FONT_DPI. The default value would be 72, so to increase - the fonts by a third one can add to the .zprofile file the line + Depending on the size and resolution of your screen, the fonts may be too + small to read. This can be adjusted by setting the environment variable + QT_FONT_DPI. The default value would be 72, so to increase the fonts by a + third, one can add to the .zprofile file the line export QT_FONT_DPI=96 @@ -61,9 +61,9 @@ these steps: 7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt) - MacOS will likely block the initial run of the executables, since they - were downloaded from the internet and are missing a known signature from an - identified developer. Go to "Settings" and search for "Security settings". It - should display a message that an executable like "lmp" was blocked. Press + MacOS will likely block the initial run of the executables, since they were + downloaded from the internet and are missing a known signature from an + identified developer. Go to "Settings" and search for "Security settings". + It should display a message that an executable like "lmp" was blocked. Press "Open anyway", which might prompt you for your admin credentials. Afterwards "lmp" and the other executables should work as expected. diff --git a/cmake/packaging/build_linux_tgz.sh b/cmake/packaging/build_linux_tgz.sh index e0222858ce..48e3017f61 100755 --- a/cmake/packaging/build_linux_tgz.sh +++ b/cmake/packaging/build_linux_tgz.sh @@ -4,7 +4,7 @@ APP_NAME=lammps-gui DESTDIR=${PWD}/../LAMMPS_GUI echo "Delete old files, if they exist" -rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz +rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64.tar.gz echo "Create staging area for deployment and populate" DESTDIR=${DESTDIR} cmake --install . --prefix "/" @@ -69,7 +69,7 @@ do \ done pushd .. -tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI +tar -czvvf LAMMPS_GUI-Linux-amd64.tar.gz LAMMPS_GUI popd echo "Cleanup dir" diff --git a/cmake/packaging/build_macos_dmg.sh b/cmake/packaging/build_macos_dmg.sh index 5204e519c2..4da3e40eaf 100755 --- a/cmake/packaging/build_macos_dmg.sh +++ b/cmake/packaging/build_macos_dmg.sh @@ -3,7 +3,7 @@ APP_NAME=lammps-gui echo "Delete old files, if they exist" -rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg +rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch.dmg echo "Create initial dmg file with macdeployqt" macdeployqt lammps-gui.app -dmg @@ -22,8 +22,8 @@ ln -s /Applications . mv ${APP_NAME}.app/Contents/Resources/README.txt . mkdir .background mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png -mv ${APP_NAME}.app LAMMPS.app -cd LAMMPS.app/Contents +mv ${APP_NAME}.app LAMMPS_GUI.app +cd LAMMPS_GUI.app/Contents echo "Attach icons to LAMMPS console and GUI executables" echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc @@ -75,7 +75,7 @@ echo ' set statusbar visible to false set toolbar visible to false set the bounds to { 100, 40, 868, 640 } - set position of item "'LAMMPS'.app" to { 190, 216 } + set position of item "'LAMMPS_GUI'.app" to { 190, 216 } set position of item "Applications" to { 576, 216 } set position of item "README.txt" to { 190, 400 } end tell @@ -96,12 +96,12 @@ sync echo "Unmount modified disk image and convert to compressed read-only image" hdiutil detach "${DEVICE}" -hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg" +hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS_GUI-macOS-multiarch.dmg" echo "Attach icon to .dmg file" echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc -Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg -SetFile -a C LAMMPS-macOS-multiarch.dmg +Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch.dmg +SetFile -a C LAMMPS_GUI-macOS-multiarch.dmg rm icon.rsrc echo "Delete temporary disk images" diff --git a/cmake/packaging/build_windows_vs.cmake b/cmake/packaging/build_windows_vs.cmake index f051ff351f..283425ff65 100644 --- a/cmake/packaging/build_windows_vs.cmake +++ b/cmake/packaging/build_windows_vs.cmake @@ -1,7 +1,7 @@ # CMake script to be run post installation to build zipped package # clean up old zipfile and deployment tree -file(REMOVE LAMMPS-Win10-amd64.zip) +file(REMOVE LAMMPS_GUI-Win10-amd64.zip) file(REMOVE_RECURSE LAMMPS_GUI) file(RENAME ${INSTNAME} LAMMPS_GUI) @@ -21,8 +21,15 @@ file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR) file(REMOVE qtdeploy.bat) +# download and uncompress static FFMpeg and gzip binaries +file(DOWNLOAD "https://download.lammps.org/thirdparty/ffmpeg-gzip.zip" ffmpeg-gzip.zip) +file(WRITE unpackzip.ps1 "Expand-Archive -Path ffmpeg-gzip.zip -DestinationPath LAMMPS_GUI") +execute_process(COMMAND powershell -ExecutionPolicy Bypass -File unpackzip.ps1) +file(REMOVE unpackzip.ps1) +file(REMOVE ffmpeg-gzip.zip) + # create zip archive -file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip") +file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS_GUI-Win10-amd64.zip") execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1) file(REMOVE makearchive.ps1) file(REMOVE_RECURSE LAMMPS_GUI) diff --git a/cmake/presets/macos-multiarch.cmake b/cmake/presets/macos-multiarch.cmake index 58ef013f68..8ceaec11f8 100644 --- a/cmake/presets/macos-multiarch.cmake +++ b/cmake/presets/macos-multiarch.cmake @@ -10,5 +10,3 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) set(BUILD_MPI FALSE CACHE BOOL "" FORCE) -set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE) -set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE) diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index e250b3ec7c..233b825d01 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -488,8 +488,9 @@ using CMake or Make. .. code-block:: bash - -D BUILD_TOOLS=value # yes or no (default) - -D BUILD_LAMMPS_SHELL=value # yes or no (default) + -D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt + -D BUILD_LAMMPS_SHELL=value # yes or no (default). Build lammps-shell + -D BUILD_LAMMPS_GUI=value # yes or no (default). Build lammps-gui The generated binaries will also become part of the LAMMPS installation (see below). @@ -503,7 +504,6 @@ using CMake or Make. make binary2txt # build only binary2txt tool make chain # build only chain tool make micelle2d # build only micelle2d tool - make thermo_extract # build only thermo_extract tool cd lammps/tools/lammps-shell make # build LAMMPS shell diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index 6c46f6d672..e622f9f208 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -177,13 +177,13 @@ configuration is selected with the *-C* flag: ctest -C Debug -The CMake scripts in LAMMPS have basic support for being compiled using a -multi-config build system, but not all of it has been ported. This is in -particular applicable to compiling packages that require additional libraries -that would be downloaded and compiled by CMake. The "windows" preset file -tries to keep track of which packages can be compiled natively with the -MSVC compilers out-of-the box. Not all of those external libraries are -portable to Windows, either. +The CMake scripts in LAMMPS have basic support for being compiled using +a multi-config build system, but not all of it has been ported. This is +in particular applicable to compiling packages that require additional +libraries that would be downloaded and compiled by CMake. The +``windows.cmake`` preset file tries to keep track of which packages can +be compiled natively with the MSVC compilers out-of-the box. Not all of +the external libraries are portable to Windows, either. Installing CMake diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 6e2069c0ec..393d7e1c20 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -722,9 +722,10 @@ This list was last updated for version 4.0.1 of the Kokkos library. ``cmake/presets`` folder, ``kokkos-serial.cmake``, ``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``, ``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable - the KOKKOS package and enable some hardware choice. So to compile - with CUDA device parallelization (for GPUs with CC 5.0 and up) - with some common packages enabled, you can do the following: + the KOKKOS package and enable some hardware choices. For GPU + support those preset files must be customized to match the + hardware used. So to compile with CUDA device parallelization with + some common packages enabled, you can do the following: .. code-block:: bash @@ -886,6 +887,50 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder. ---------- +.. _machdyn: + +MACHDYN package +------------------------------- + +To build with this package, you must download the Eigen3 library. +Eigen3 is a template library, so you do not need to build it. + +.. tabs:: + + .. tab:: CMake build + + .. code-block:: bash + + -D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes + -D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location) + + If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be + downloaded and inside the CMake build directory. If the Eigen3 + library is already on your system (in a location where CMake + cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the + ``Eigen3`` include file is in. + + .. tab:: Traditional make + + You can download the Eigen3 library manually if you prefer; follow + the instructions in ``lib/machdyn/README``. You can also do it in one + step from the ``lammps/src`` dir, using a command like these, + which simply invokes the ``lib/machdyn/Install.py`` script with the + specified args: + + .. code-block:: bash + + make lib-machdyn # print help message + make lib-machdyn args="-b" # download to lib/machdyn/eigen3 + make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 + + Note that a symbolic (soft) link named ``includelink`` is created + in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it + will use this link. You should not need to edit the + ``lib/machdyn/Makefile.lammps`` file. + +---------- + .. _mliap: ML-IAP package @@ -1431,6 +1476,55 @@ ML-POD package ---------- +.. _ml-quip: + +ML-QUIP package +--------------------------------- + +To build with this package, you must download and build the QUIP +library. It can be obtained from GitHub. For support of GAP +potentials, additional files with specific licensing conditions need +to be downloaded and configured. The automatic download will from +within CMake will download the non-commercial use version. + +.. tabs:: + + .. tab:: CMake build + + .. code-block:: bash + + -D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes + -D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location) + -D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK + # value = no (default) or yes + + CMake will try to download and build the QUIP library from GitHub, + if it is not found on the local machine. This requires to have git + installed. It will use the same compilers and flags as used for + compiling LAMMPS. Currently this is only supported for the GNU + and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you + want to use a previously compiled and installed QUIP library and + CMake cannot find it. + + The QUIP library requires LAPACK (and BLAS) and CMake can identify + their locations and pass that info to the QUIP build script. But + on some systems this triggers a (current) limitation of CMake and + the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in + those cases to use the bundled linear algebra library and work around + the limitation. + + .. tab:: Traditional make + + The download/build procedure for the QUIP library, described in + ``lib/quip/README`` file requires setting two environment + variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by + the ``lib/quip/Makefile.lammps`` file which is used when you + compile and link LAMMPS with this package. You should only need + to edit ``Makefile.lammps`` if the LAMMPS build can not use its + settings to successfully build on your system. + +---------- + .. _plumed: PLUMED package @@ -1952,55 +2046,6 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to ---------- -.. _ml-quip: - -ML-QUIP package ---------------------------------- - -To build with this package, you must download and build the QUIP -library. It can be obtained from GitHub. For support of GAP -potentials, additional files with specific licensing conditions need -to be downloaded and configured. The automatic download will from -within CMake will download the non-commercial use version. - -.. tabs:: - - .. tab:: CMake build - - .. code-block:: bash - - -D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes - -D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location) - -D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK - # value = no (default) or yes - - CMake will try to download and build the QUIP library from GitHub, - if it is not found on the local machine. This requires to have git - installed. It will use the same compilers and flags as used for - compiling LAMMPS. Currently this is only supported for the GNU - and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you - want to use a previously compiled and installed QUIP library and - CMake cannot find it. - - The QUIP library requires LAPACK (and BLAS) and CMake can identify - their locations and pass that info to the QUIP build script. But - on some systems this triggers a (current) limitation of CMake and - the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in - those cases to use the bundled linear algebra library and work around - the limitation. - - .. tab:: Traditional make - - The download/build procedure for the QUIP library, described in - ``lib/quip/README`` file requires setting two environment - variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by - the ``lib/quip/Makefile.lammps`` file which is used when you - compile and link LAMMPS with this package. You should only need - to edit ``Makefile.lammps`` if the LAMMPS build can not use its - settings to successfully build on your system. - ----------- - .. _scafacos: SCAFACOS package @@ -2048,50 +2093,6 @@ To build with this package, you must download and build the ---------- -.. _machdyn: - -MACHDYN package -------------------------------- - -To build with this package, you must download the Eigen3 library. -Eigen3 is a template library, so you do not need to build it. - -.. tabs:: - - .. tab:: CMake build - - .. code-block:: bash - - -D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes - -D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location) - - If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be - downloaded and inside the CMake build directory. If the Eigen3 - library is already on your system (in a location where CMake - cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the - ``Eigen3`` include file is in. - - .. tab:: Traditional make - - You can download the Eigen3 library manually if you prefer; follow - the instructions in ``lib/smd/README``. You can also do it in one - step from the ``lammps/src`` dir, using a command like these, - which simply invokes the ``lib/smd/Install.py`` script with the - specified args: - - .. code-block:: bash - - make lib-smd # print help message - make lib-smd args="-b" # download to lib/smd/eigen3 - make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 - - Note that a symbolic (soft) link named ``includelink`` is created - in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it - will use this link. You should not need to edit the - ``lib/smd/Makefile.lammps`` file. - ----------- - .. _vtk: VTK package diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index bc6445f813..63ccac534d 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -182,6 +182,7 @@ make a copy of one of them and modify it to suit your needs. cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers + cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake # compile serial multi-arch binaries on macOS Presets that have names starting with "windows" are specifically for compiling LAMMPS :doc:`natively on Windows ` and diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 5aabb7967c..7301d1345e 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -69,7 +69,7 @@ OPT. * :doc:`drude/transform/inverse ` * :doc:`dt/reset (k) ` * :doc:`edpd/source ` - * :doc:`efield ` + * :doc:`efield (k) ` * :doc:`efield/tip4p ` * :doc:`ehex ` * :doc:`electrode/conp (i) ` @@ -181,6 +181,7 @@ OPT. * :doc:`pour ` * :doc:`precession/spin ` * :doc:`press/berendsen ` + * :doc:`press/langevin ` * :doc:`print ` * :doc:`propel/self ` * :doc:`property/atom (k) ` @@ -232,7 +233,7 @@ OPT. * :doc:`spring ` * :doc:`spring/chunk ` * :doc:`spring/rg ` - * :doc:`spring/self ` + * :doc:`spring/self (k) ` * :doc:`srd ` * :doc:`store/force ` * :doc:`store/state ` diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index c45a1d778c..923c040aaf 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -265,7 +265,7 @@ OPT. * :doc:`smd/tri_surface ` * :doc:`smd/ulsph ` * :doc:`smtbq ` - * :doc:`snap (k) ` + * :doc:`snap (ik) ` * :doc:`soft (go) ` * :doc:`sph/heatconduction ` * :doc:`sph/idealgas ` @@ -305,5 +305,5 @@ OPT. * :doc:`wf/cut ` * :doc:`ylz ` * :doc:`yukawa (gko) ` - * :doc:`yukawa/colloid (go) ` + * :doc:`yukawa/colloid (gko) ` * :doc:`zbl (gko) ` diff --git a/doc/src/Howto_lammps_gui.rst b/doc/src/Howto_lammps_gui.rst index 4b89af53b7..165ed84d95 100644 --- a/doc/src/Howto_lammps_gui.rst +++ b/doc/src/Howto_lammps_gui.rst @@ -1,111 +1,310 @@ Using the LAMMPS GUI ==================== -LAMMPS GUI is a simple graphical text editor that is linked to the -:ref:`LAMMPS C-library interface ` and thus can run LAMMPS -directly using the contents of the editor's text buffer as input. - -This is similar to what people traditionally would do to run LAMMPS: -using a regular text editor to edit the input and run the necessary -commands, possibly including the text editor, too, from a command line -terminal window. That is quite effective when running LAMMPS on -high-performance computing facilities and when you are very proficient -in using the command line. The main benefit of a GUI application is -that this integrates well with graphical desktop environments and many -basic tasks can be done directly from within the GUI without switching -to a text console or requiring external programs or scripts to extract -data from the generated output. This makes it easier for beginners to -get started running simple LAMMPS simulations and thus very suitable for -tutorials on LAMMPS. But also makes it easier to switch to a full -featured text editor and more sophisticated visualization and analysis -tools. +This document describes **LAMMPS GUI version 1.5**. ----- +LAMMPS GUI is a graphical text editor customized for editing LAMMPS +input files that is linked to the :ref:`LAMMPS library ` +and thus can run LAMMPS directly using the contents of the editor's text +buffer as input. It can retrieve and display information from LAMMPS +while it is running, display visualizations created with the :doc:`dump +image command `, and is adapted specifically for editing +LAMMPS input files through text completion and reformatting, and linking +to the online LAMMPS documentation for known LAMMPS commands and styles. + +.. note:: + + Pre-compiled, ready-to-use LAMMPS GUI executables for Linux (Ubuntu + 20.04LTS or later and compatible), macOS (version 11 aka Big Sur or + later), and Windows (version 10 or later) :ref:`are available + ` for download. They may be linked to a + development version of LAMMPS in case they need features not yet + available in a released version. Serial LAMMPS executables of the + same LAMMPS version are included as well. The source code for the + LAMMPS GUI is included in the LAMMPS source code and can be found in + the ``tools/lammps-gui`` folder. It can be compiled alongside LAMMPS + when :doc:`compiling with CMake `. + +LAMMPS GUI tries to provide an experience similar to what people +traditionally would do to run LAMMPS using a command line window: + +- editing inputs with a text editor +- run LAMMPS on the input with selected command line flags +- and then use or extract data from the created files and visualize it + +That procedure is quite effective for people proficient in using the +command line, as that allows them to use tools for the individual steps +which they are most comfortable with. It is often required when running +LAMMPS on high-performance computing facilities. + +The main benefit of using the LAMMPS GUI application instead is that +many basic tasks can be done directly from the GUI without switching to +a text console window or using external programs, let alone writing +scripts to extract data from the generated output. It also integrates +well with graphical desktop environments. + +LAMMPS GUI thus makes it easier for beginners to get started running +simple LAMMPS simulations. It is very suitable for tutorials on LAMMPS +since you only need to learn how to use a single program for most tasks +and thus time can be saved and people can focus on learning LAMMPS. It +is also designed to keep the barrier low when you decide to switch to a +full featured, standalone programming editor and more sophisticated +visualization and analysis tools and run LAMMPS from a command line. + The following text provides a detailed tour of the features and -functionality of the LAMMPS GUI. This document describes LAMMPS GUI -version 1.2. +functionality of the LAMMPS GUI. + +Suggestions for new features and reports of bugs are always welcome. +You can use the :doc:`the same channels as for LAMMPS itself +` for that purpose. + +----- Main window ----------- -When LAMMPS GUI starts, it will show the main window with either an -empty buffer, or have a file loaded. In the latter case it may look like -the following: +When LAMMPS GUI starts, it will show a main window with either an +empty buffer or the contents of a loaded file. In the latter case it +may look like the following: .. image:: JPG/lammps-gui-main.png :align: center :scale: 50% -There is the menu bar at the top, then the main editor buffer with the -input file contents in the center with line numbers on the left and the -input colored according to the LAMMPS input file syntax. At the bottom -is the status bar, which shows the status of LAMMPS execution on the -left ("Ready." when idle) and the current working directory on the -right. The size of the main window will be stored when exiting and -restored when starting again. The name of the current file in the -buffer is shown in the window title and the text `*modified*` is added -in case the buffer has modifications that are not yet saved to a file. +There is the typical menu bar at the top, then the main editor buffer, +and a status bar at the bottom. The input file contents are shown +with line numbers on the left and the input is colored according to +the LAMMPS input file syntax. The status bar shows the status of +LAMMPS execution on the left (e.g. "Ready." when idle) and the current +working directory on the right. The name of the current file in the +buffer is shown in the window title; the word `*modified*` is added if +the buffer edits have not yet saved to a file. The size of the main +window will be stored when exiting and restored when starting again. Opening Files ^^^^^^^^^^^^^ The LAMMPS GUI application will try to open the first command line -argument as input file, further arguments are ignored. When no -argument is given LAMMPS GUI will start with an empty buffer. -Files can also be opened via the ``File`` menu or by drag-and-drop -of a file from a file manager to the editor window. Only one -file can be open at a time, so opening a new file with a filled -buffer will close this buffer and in case the buffer has unsaved -modifications will ask to either cancel the load, discard the -changes or save them. - +argument as a LAMMPS input script, further arguments are ignored. +When no argument is given, LAMMPS GUI will start with an empty buffer. +Files can also be opened via the ``File`` menu or by drag-and-drop of +a file from a graphical file manager into the editor window. Only one +file can be open at a time, so opening a new file with a filled buffer +will close the buffer. If the buffer has unsaved modifications, you +will be asked to either cancel the operation, discard the changes, or +save them. Running LAMMPS ^^^^^^^^^^^^^^ From within the LAMMPS GUI main window LAMMPS can be started either from -the ``Run`` menu, by the hotkey `Ctrl-Enter` (`Command-Enter` on macOS), -or by clicking on the green button in the status bar. LAMMPS runs in a -separate thread, so the GUI stays responsive and thus it is able to -interact with the calculation and access its data. It is important to -note, that LAMMPS is using the contents of the input buffer for the run, -**not** the file it was read from. If there are unsaved changes in the -buffer, they *will* be used. +the ``Run`` menu using the ``Run LAMMPS from Editor Buffer`` entry, by +the keyboard shortcut `Ctrl-Enter` (`Command-Enter` on macOS), or by +clicking on the green "Run" button in the status bar. All of these +operations will cause LAMMPS to process the entire input script, which +may contain multiple :doc:`run ` or :doc:`minimize ` +commands. + +LAMMPS runs in a separate thread, so the GUI stays responsive and is +able to interact with the running calculation and access data it +produces. It is important to note that running LAMMPS this way is +using the contents of the input buffer for the run (via the +:cpp:func:`lammps_commands_string()` function of the LAMMPS C-library +interface), and **not** the original file it was read from. Thus, if +there are unsaved changes in the buffer, they *will* be used. As an +alternative, it is also possible to run LAMMPS by reading the contents +of a file from the ``Run LAMMPS from File`` menu entry or with +`Ctrl-Shift-Enter`. This option may be required in some rare cases +where the input uses some functionality that is not compatible with +running LAMMPS from a string buffer. For consistency, any unsaved +changes in the buffer must be either saved to the file or undone +before LAMMPS can be run from a file. .. image:: JPG/lammps-gui-running.png :align: center :scale: 75% -While LAMMPS is running, the contents of the status bar change: on the -left side there is a text indicating that LAMMPS is running, which will -contain the selected number of threads, if thread-parallel acceleration -was selected in the ``Preferences`` dialog. On the right side, a -progress bar is shown that displays the estimated progress on the -current :doc:`run command `. Additionally, two windows will open: -the log window with the captured screen output and the chart window with -a line graph created from the thermodynamic output of the run. +While LAMMPS is running, the contents of the status bar change. On +the left side there is a text indicating that LAMMPS is running, which +will also show the number of active threads, if thread-parallel +acceleration was selected in the ``Preferences`` dialog. On the right +side, a progress bar is shown that displays the estimated progress for +the current :doc:`run command `. -The run can be stopped cleanly by using either the ``Stop LAMMPS`` entry -in the ``Run`` menu, the hotkey `Ctrl-/` (`Command-/` on macOS), or -clicking on the red button in the status bar. This will cause that the -running LAMMPS process will complete the current iteration and then -stop. This is equivalent to the command :doc:`timer timeout 0 ` -and implemented by calling the :cpp:func:`lammps_force_timeout()` -function of the LAMMPS C-library interface. +Also, the line number of the currently executed command will be +highlighted in green. +.. image:: JPG/lammps-gui-run-highlight.png + :align: center + :scale: 75% + +If an error occurs (in the example below the command :doc:`label +