Compare commits

...

64 Commits

Author SHA1 Message Date
ce756540e8 recognize STL files starting with "solid binary" as binary files 2023-09-22 08:04:25 -04:00
bb462b9ea3 plug memory leak 2023-09-22 08:04:18 -04:00
63eda98779 we don't need a lattice for creating atoms from a STL mesh 2023-09-22 08:04:09 -04:00
0ca72bb58e silence uninitialized access valgrind warning 2023-09-21 07:33:24 -04:00
a6bcf507e1 flag version as update 1 2023-09-19 14:37:13 -04:00
a1621a7229 Apply fix for hipfft paths in ROCm >= 6.0 2023-09-19 10:45:21 -04:00
62d41c6afb fix cut-n-paste issue 2023-09-14 00:29:00 -04:00
5480d25e36 add missing newline 2023-09-13 16:35:10 -04:00
a4145ec852 reorder to have sections in alphabetical order again 2023-09-13 16:34:11 -04:00
5b16f15b25 change refereces to lib/smd and smd to lib/machdyn and machdyn 2023-09-13 16:33:55 -04:00
e77aaba3a4 remove dead code 2023-09-13 16:33:33 -04:00
7f08e8d11c Initialize ADIOS dumps only the first time when
used in multiple runs (for custom/adios dump style)
2023-09-13 08:57:14 -04:00
f62b129dec update docs with settings for building tools with CMake 2023-09-01 18:54:42 -04:00
db967a5bbf there is no "thermo_extract" tool (anymore) 2023-09-01 18:54:28 -04:00
f20af66312 update some tables and comments for the current state of LAMMPS 2023-09-01 18:54:01 -04:00
01766c7631 Fix bug in MDI energy 2023-09-01 07:33:36 -04:00
7846bb59db silence compiler warning 2023-08-31 15:25:03 -04:00
c27951cb1f update unit tests for change in read_restart 2023-08-31 04:45:38 -04:00
4ab82d76ad make atom_modify map settings in restart file overridable 2023-08-30 23:52:14 -04:00
c6cbc1f965 list manual versions on Manual home page 2023-08-28 15:35:02 -04:00
88e58e9189 fix typo 2023-08-28 13:12:36 -04:00
e14005c443 must initialize typefirst now after recent changes from @dsbolin 2023-08-25 10:19:30 -04:00
9570c2fb50 must use array delete and not scalar delete on char array 2023-08-25 10:05:32 -04:00
180ce5277f A few bug fixes for fix srd 2023-08-24 12:29:27 -04:00
e81b86e114 clarify the documentation for the extract_atom numpy wrapper 2023-08-23 20:02:51 -04:00
6c6262a637 the MESONT package depends on the MOLECULE package since the last upgrade 2023-08-23 19:04:01 -04:00
062bb88561 fix element mapping bug in pair style hdnnp when used as a hybrid sub-style 2023-08-23 07:21:39 -04:00
cf5b653a9a Fix bug in Kokkos ReaxFF on GPUs when border comm is on host 2023-08-22 16:48:59 -04:00
c5a5e4a099 more fixes for file and pathnames with blanks 2023-08-21 16:11:03 -04:00
ccab900342 enable/disable VDW mode pushbutton depending on whether valid element info is present 2023-08-21 13:25:41 -04:00
fc400af724 avoid write_dump image failing when not all elements can be recognized 2023-08-21 12:27:30 -04:00
b1ea4d9601 fix write_dump command string so it can handle paths with blanks 2023-08-21 09:08:16 -04:00
2ca3be7b16 workaround for imageviewer GUI glitch on macOS 2023-08-20 19:11:37 -04:00
31b94aa1b0 fix copy-n-paste bug 2023-08-20 00:24:30 -04:00
b1b94980fa make vdwfactor consistent and speed up rendering for VDW mode by skipping bonds 2023-08-20 00:12:58 -04:00
770ad34267 speed up SSAO with OpenMP multi-threading, if available 2023-08-19 20:12:33 -04:00
10c523a950 use more consistent way to update checkboxes and labels by assigning names 2023-08-19 17:58:30 -04:00
62ef884564 use more consistent way to update checkboxes by assigning names 2023-08-19 16:44:11 -04:00
b3860a82de add missing file for embedding icons into windows executable 2023-08-19 15:22:54 -04:00
1deb3d8865 correctly extract local file name from dropped URI 2023-08-19 15:14:08 -04:00
266e519013 consistently use bool for echo and cite flags 2023-08-19 14:13:04 -04:00
fffb86cb02 automatically copy "About LAMMPS" dialog text to clipboard 2023-08-19 09:29:22 -04:00
fcaabe510e deleted one file too many 2023-08-18 01:56:53 -04:00
a6043d92cb remove obsolete files 2023-08-18 01:47:29 -04:00
ee16f6503e update LAMMPS GUI code with PR 3890 content 2023-08-17 22:50:10 -04:00
84168fc84d use fastest zlib compression settings to reduce serial overhead when writing PNG images 2023-08-17 22:44:41 -04:00
8a5fd08fa1 update documentation for LAMMPS GUI v1.2 2023-08-16 03:42:12 -04:00
8944609419 make dark gray really dark gray 2023-08-16 02:58:56 -04:00
e90478e932 update 2023-08-16 02:42:41 -04:00
52c23785c5 fix error with C++17 in AWPMD package 2023-08-16 02:42:35 -04:00
088ff4ad27 update LAMMPS GUI to version 1.2 2023-08-16 02:38:07 -04:00
e32ae65aa1 add flag used by LAMMPS GUI 2023-08-16 02:24:45 -04:00
a5bf853c35 changes to make example script in ASPHERE/tri run 2023-08-15 23:50:53 -04:00
b0a1b58c68 update clang-format detection for compatibility with Debian 2023-08-14 18:49:39 -04:00
bdaf3c64a6 silence warning about a setting that was added to silence warnings 2023-08-14 12:06:09 -04:00
ccc478ad96 flag if we are cross-compiling 2023-08-14 11:55:40 -04:00
fadb210052 clean up all created files 2023-08-14 11:54:56 -04:00
c105a187d9 fix duplicate implicit reference
# Conflicts:
#	doc/src/Speed_kokkos.rst
2023-08-14 11:54:22 -04:00
d74f86f2cd indexing bugfix for compute global/atom 2023-08-14 11:50:23 -04:00
c5b35970dc disable *all* MPI-IO related testing 2023-08-14 11:50:12 -04:00
5626836995 disable MPI-IO based restart writing (for now) 2023-08-14 11:50:02 -04:00
53111f8c0e bugfix for pair style dpd/gpu from Trung 2023-08-14 11:47:49 -04:00
e0ca512f50 avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-14 11:40:26 -04:00
e87bad43f9 flag maintenance branch 2023-08-03 14:26:47 -04:00
145 changed files with 5923 additions and 1502 deletions

View File

@ -1,3 +1,4 @@
# -*- CMake -*- master configuration file for building LAMMPS
########################################
# CMake build system
# This file is part of LAMMPS
@ -12,11 +13,6 @@ endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
# set policy to silence warnings about missing executable permissions in
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD)
endif()
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
@ -404,6 +400,7 @@ pkg_depends(CG-DNA MOLECULE)
pkg_depends(CG-DNA ASPHERE)
pkg_depends(ELECTRODE KSPACE)
pkg_depends(EXTRA-MOLECULE MOLECULE)
pkg_depends(MESONT MOLECULE)
# detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF)
@ -893,13 +890,23 @@ else()
endif()
include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
OUTPUT_VARIABLE GIT_DESCRIBE
ERROR_QUIET
WORKING_DIRECTORY ${LAMMPS_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message(STATUS "<<< Build configuration >>>
LAMMPS Version: ${PROJECT_VERSION}
LAMMPS Version: ${PROJECT_VERSION} ${GIT_DESCRIBE}
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
CMake Version: ${CMAKE_VERSION}
Build type: ${LAMMPS_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
endif()
###############################################################################
# Print package summary
###############################################################################
@ -1028,6 +1035,14 @@ endif()
if(BUILD_LAMMPS_SHELL)
message(STATUS "<<< Building LAMMPS Shell >>>")
endif()
if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS GUI >>>")
if(LAMMPS_GUI_USE_PLUGIN)
message(STATUS "Loading LAMMPS library as plugin at run time")
else()
message(STATUS "Linking LAMMPS library at compile time")
endif()
endif()
if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>")
if(ENABLE_COVERAGE)

View File

@ -1,5 +1,7 @@
# Find clang-format
find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-17.0
clang-format-16.0
clang-format-15.0
clang-format-14.0
clang-format-13.0
@ -19,7 +21,7 @@ if(ClangFormat_EXECUTABLE)
OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*")
if(clang_format_version MATCHES "^(Ubuntu |Debian |)clang-format version .*")
# Arch Linux output:
# clang-format version 10.0.0
#
@ -32,9 +34,15 @@ if(ClangFormat_EXECUTABLE)
# Ubuntu 22.04 LTS output:
# Ubuntu clang-format version 14.0.0-1ubuntu1
#
# Debian 11 output:
# Debian clang-format version 11.0.1-2
#
# Debian 12 output:
# Debian clang-format version 14.0.6
#
# Fedora 36 output:
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*"
string(REGEX REPLACE "^(Ubuntu |Debian |)clang-format version ([0-9.]+).*"
"\\2"
ClangFormat_VERSION
"${clang_format_version}")

View File

@ -1,26 +1,64 @@
#!/bin/bash -vx
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI
DESTDIR=${PWD}/LAMMPS_GUI
SYSROOT="$1"
echo "Delete old files, if they exist"
rm -rvf ${DESTDIR} LAMMPS-Win10-amd64.zip
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
echo "Add required dependencies for Qt"
for dll in Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll
# no static libs needed
rm -rvf ${DESTDIR}/lib
# but the LAMMPS lib
echo "Copying required DLL files"
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/${dll} ${DESTDIR}/bin/
done
for dir in styles platforms imageformats
do \
mkdir -p ${DESTDIR}/${dir}
cp -r /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/${dir}/*.dll ${DESTDIR}/${dir}
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
pushd ..
zip -9rv LAMMPS-Win10-amd64.zip LAMMPS_GUI
popd
exit 0
echo "Copy required Qt plugins"
mkdir -p ${DESTDIR}/qt5plugins
for plugin in imageformats platforms styles
do \
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
done
echo "Check dependencies of DLL files"
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
cat > ${DESTDIR}/bin/qt.conf <<EOF
[Paths]
Plugins = ../qt5plugins
EOF
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI

View File

@ -1,6 +1,9 @@
#!/bin/sh
# wrapper for bundled executables
# reset locale to avoid problems with decimal numbers
export LC_ALL=C
BASEDIR=$(dirname "$0")
EXENAME=$(basename "$0")

View File

@ -32,6 +32,7 @@ set(WIN_PACKAGES
INTERLAYER
KSPACE
LEPTON
MACHDYN
MANIFOLD
MANYBODY
MC
@ -45,6 +46,7 @@ set(WIN_PACKAGES
MOLECULE
MOLFILE
OPENMP
OPT
ORIENT
PERI
PHONON

View File

@ -489,8 +489,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).
@ -504,7 +505,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

View File

@ -881,6 +881,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
@ -1479,6 +1523,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
@ -2000,55 +2093,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
@ -2096,50 +2140,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

View File

@ -100,6 +100,7 @@ Tutorials howto
Howto_cmake
Howto_github
Howto_lammps_gui
Howto_pylammps
Howto_wsl

View File

@ -0,0 +1,402 @@
Using the LAMMPS GUI
====================
LAMMPS GUI is a simple graphical text editor that is linked to the
:ref:`LAMMPS C-library interface <lammps_c_api>` 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.
-----
The following text provides a detailed tour of the features and
functionality of the LAMMPS GUI. This document describes LAMMPS GUI
version 1.2.
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:
.. 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.
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.
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.
.. 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 <run>`. 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.
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 `timer timeout 0 <timer>` and
implemented by calling the :cpp:func:`lammps_force_timeout()` function
of the LAMMPS C-library interface.
Viewing Snapshot Images
^^^^^^^^^^^^^^^^^^^^^^^
By selecting the ``View Image`` entry in the ``Run`` menu, by hitting
the `Ctrl-I` (`Command-I` on macOS) hotkey or by clicking on the
"palette" button in the status bar, LAMMPS GUI will issue a
:doc:`write_dump image <dump_image>` command and read the resulting
snapshot image into an image viewer window. When possible, LAMMPS
GUI will try to detect which elements the atoms correspond to (via
their mass) and then colorize them accordingly. Otherwise just some
predefined sequence of colors are assigned to different atom types.
.. image:: JPG/lammps-gui-image.png
:align: center
:scale: 50%
The default image size, some default image quality settings, the view
style and some colors can be changed in the ``Preferences`` dialog
window. From the image viewer window further adjustments can be made:
actual image size, high-quality rendering, anti-aliasing, view style,
display of box or axes, zoom factor. The the image can be rotated
horizontally and vertically and it is possible to only display the atoms
within a predefined group (default is "all"). After each change, the
image is rendered again and the display updated. The small palette icon
on the top left will be colored while LAMMPS is running to render the
image and it will be grayed out again, when it is done. When there are
many items to show and high quality images with anti-aliasing are
requested, re-rendering can take several seconds. From the ``File``
menu, the shown image can be saved to a file permanently or copied into
the cut-n-paste buffer for pasting into another application.
Editor Functions
^^^^^^^^^^^^^^^^
The editor has most the usual functionality that similar programs have:
text selection via mouse or with cursor moves while holding the Shift
key, Cut, Copy, Paste, Undo, Redo. All of these editing functions are
available via hotkeys. When trying to exit the editor with a modified
buffer, a dialog will pop up asking whether to cancel the quit, or don't
save or save the buffer's contents to a file.
Context Specific Help
^^^^^^^^^^^^^^^^^^^^^
.. image:: JPG/lammps-gui-popup-help.png
:align: center
:scale: 50%
A unique feature of the LAMMPS GUI is the option to look up the
documentation for the command in the current line. This can be achieved
by either clicking the right mouse button or by using the `Ctrl-?`
hotkey. When clicking the mouse there are additional entries in the
context menu that will open the corresponding documentation page in the
online LAMMPS documentation. When using the hotkey, the first of those
entries will be chosen directly.
Menu
----
The menu bar the entries ``File``, ``Edit``, ``Run``, ``View``, and ``About``.
Instead of using the mouse to click on them, the individual menus can also
be activated by hitting the `Alt` key together with the corresponding underlined
letter, that is `Alt-f` will activate the ``File`` menu. For the corresponding
activated sub-menus, also the underlined letter, together with the `Alt` key can
be used to select instead of the mouse.
File
^^^^
The ``File`` menu offers the usual options:
- ``New`` will clear the current buffer and reset the file name to ``*unknown*``
- ``Open`` will open a dialog to select a new file
- ``Save`` will save the current file; if the file name is ``*unknown*``
a dialog will open to select a new file name
- ``Save As`` will open a dialog to select and new file name and save
the buffer to it
- ``Quit`` will exit LAMMPS GUI. If there are unsaved changes, a dialog
will appear to either cancel the quit, save or don't save the file.
In addition, up to 5 recent file names will be listed after the ``Open``
entry that allows to re-open recent files. This list is stored when
quitting and recovered when starting again.
Edit
^^^^
The ``Edit`` menu offers the usual editor functions like ``Undo``,
``Redo``, ``Cut``, ``Copy``, ``Paste``, but also offers to open the
``Preferences`` dialog and to delete all stored preferences so they
will be reset to their defaults.
Run
^^^
The ``Run`` menu allows to start and stop a LAMMPS process. Rather than
calling the LAMMPS executable as a separate executable, the LAMMPS GUI
is linked to the LAMMPS library and thus can run LAMMPS internally
through the :ref:`LAMMPS C-library interface <lammps_c_api>`.
Specifically, a LAMMPS instance will be created by calling
:cpp:func:`lammps_open_no_mpi` and then the buffer contents run by
calling :cpp:func:`lammps_commands_string`. Certain commands and
features are only available, after a LAMMPS instance is created. Its
presence is indicated by a small LAMMPS ``L`` logo in the status bar at
the bottom left of the main window.
The LAMMPS calculation will be run in a concurrent thread so that the
GUI will stay responsive and will be updated during the run. This can
be used to tell the running LAMMPS instance to stop at the next
timestep. The ``Stop LAMMPS`` entry will do this by calling
:cpp:func:`lammps_force_timeout`, which is equivalent to a :doc:`timer
timeout 0 <timer>` command.
The ``Set Variables`` entry will open a dialog box where :doc:`index style variables <variable>`
can be set. Those variables will be passed to the LAMMPS instance when
it is created and are thus set *before* a run is started.
.. image:: JPG/lammps-gui-variables.png
:align: center
:scale: 75%
The ``Set Variables`` dialog will be pre-populated with entries that are
set as index variables in the input and any variables that are used but
not defined as far as the built-in parser can detect them. New rows for
additional variables can be added through the ``Add Row`` button and
existing rows deleted by clicking on the ``X`` icons on the right.
The ``View Image`` entry will send a :doc:`dump image <dump_image>`
command to the LAMMPS instance, read the resulting file, and show it in
an ``Image Viewer`` window.
The ``View in OVITO`` entry will launch `OVITO <https://ovito.org>`_
with a :doc:`data file <write_data>` of the current state of the system.
This option is only available, if the LAMMPS GUI can find the OVITO
executable in the system path.
The ``View in VMD`` entry will instead launch VMD, also to load a
:doc:`data file <write_data>` of the current state of the system. This
option is only available, if the LAMMPS GUI can find the VMD executable
in the system path.
View
^^^^
The ``View`` menu offers to show or hide the three optional windows
with log output, graphs, or images. The default settings for those
can be changed in the ``Preferences dialog``.
About
^^^^^
The ``About`` menu finally offers a couple of dialog windows and an
option to launch the LAMMPS online documentation in a web browser. The
``About LAMMPS GUI`` entry displays a dialog with a summary of the
configuration settings of the LAMMPS library in use and the version
number of LAMMPS GUI itself. The ``Quick Help`` displays a dialog with
a minimal description of LAMMPS GUI. And ``LAMMPS Manual`` will open
the main page of this LAMMPS documentation at https://docs.lammps.org/.
Preferences
-----------
The ``Preferences`` dialog allows to customize some of the behavior
and looks of the LAMMPS GUI application. The settings are grouped
and each group is displayed within a tab.
.. |guiprefs1| image:: JPG/lammps-gui-prefs-general.png
:width: 25%
.. |guiprefs2| image:: JPG/lammps-gui-prefs-accel.png
:width: 25%
.. |guiprefs3| image:: JPG/lammps-gui-prefs-image.png
:width: 25%
|guiprefs1| |guiprefs2| |guiprefs3|
General Settings:
^^^^^^^^^^^^^^^^^
- *Echo input to log:* when checked, all input commands, including
variable expansions, will be echoed to the log window. This is
equivalent to using `-echo screen` at the command line. There is no
log *file* produced since it always uses `-log none`.
- *Include citation details:* when checked full citation info will be
included to the log window. This is equivalent to using `-cite
screen` on the command line.
- *Show log window by default:* when checked, the screen output of a
LAMMPS run will be collected in a log window during the run
- *Show chart window by default:* when checked, the thermodynamic
output of a LAMMPS run will be collected and displayed in a chart
window as line graphs.
- *Replace log window on new run:* when checked, an existing log
window will be replaced on a new LAMMPS run, otherwise each run will
create a new log window.
- *Replace chart window on new run:* when checked, an existing chart
window will be replaced on a new LAMMPS run, otherwise each run will
create a new chart window.
- *Replace image window on new render:* when checked, an existing
chart window will be replaced when a new snapshot image is requested,
otherwise each command will create a new image window.
- *Path to LAMMPS Shared Library File:* this options is only available
when LAMMPS GUI was compiled to load the LAMMPS library at run time
instead of being linked to it directly. With the ``Browse..`` button
or by changing the text, a different shared library file with a
different compilation of LAMMPS with different settings or from a
different version can be loaded. After this setting was changed,
LAMMPS GUI needs to be re-launched.
- *Select Default Font:* Opens a font selection dialog where the type
and size for the default font (used for everything but the editor and
log) of the application can be set.
- *Select Text Font:* Opens a font selection dialog where the type and
size for the text editor and log font of the application can be set.
Accelerators:
^^^^^^^^^^^^^
This tab enables to select which accelerator package is used and is
equivalent to using the `-suffix` and `-package` flags on the command
line. Only settings supported by the LAMMPS library and local hardware
are available. The `Number of threads` field allows to set the maximum
number of threads for the accelerator packages that use threads.
Snapshot Image:
^^^^^^^^^^^^^^^
This tab allows to set some defaults for the snapshot images displayed
in the ``Image Viewer`` window, like its dimensions and the zoom factor
applied. The *Antialias* switch requests to render images with twice
the number of pixels for width and height and then smoothly scales the
image back to the requested size. This produces higher quality images
with smoother edges at the expense of requiring more CPU time to render
the image. The *HQ Image mode* option turns on using a screen space
ambient occlusion mode (SSAO) when rendering images. This is also more
time consuming, but produces a more 'spatial' representation of the
system. The *VDW Style* checkbox selects whether atoms are represented
by space filling spheres when checked or by smaller spheres and stick.
Finally there are a couple of drop down lists to select the background
and box color.
Hotkeys
-------
Almost all functionality is accessible from the menu or via hotkeys.
The following hotkeys are available (On macOS use the Command key
instead of Ctrl/Control).
.. list-table::
:header-rows: 1
:widths: auto
* - Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+Enter
- Run LAMMPS
- Ctrl+Shift+A
- About LAMMPS GUI
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+/
- Stop Active Run
- Ctrl+Shift+H
- Quick Help
* - CTRL+S
- Save File
- Ctrl+C
- Copy text
- Ctrl+Shift+V
- Set Variables
- Ctrl+Shift+G
- LAMMPS GUI Howto
* - Ctrl+Shift+S
- Save File As
- Ctrl+X
- Cut text
- Ctrl+I
- Create Snapshot Image
- Ctrl+Shift+M
- LAMMPS Manual
* - Ctrl+Q
- Quit
- Ctrl+V
- Paste text
- Ctrl+P
- Preferences
- Ctrl+?
- Context Help
Further editing keybindings `are documented with the Qt documentation
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
case of conflicts the list above takes precedence.

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -23,10 +23,23 @@ coordinated.
----------
The content for this manual is part of the LAMMPS distribution. The
online version always corresponds to the latest feature release version.
If needed, you can build a local copy of the manual as HTML pages or a
PDF file by following the steps on the :doc:`Build_manual` page. If you
The content for this manual is part of the LAMMPS distribution in its
doc directory.
* The version of the manual on the LAMMPS website corresponds to the
latest LAMMPS feature release. It is available at:
`https://docs.lammps.org/ <https://docs.lammps.org/>`_.
* A version of the manual corresponding to the latest LAMMPS stable
release (state of the *stable* branch on GitHub) is available online
at: `https://docs.lammps.org/stable/
<https://docs.lammps.org/stable/>`_
* A version of the manual with the features most recently added to
LAMMPS (state of the *develop* branch on GitHub) is available at:
`https://docs.lammps.org/latest/ <https://docs.lammps.org/latest/>`_
If needed, you can build a copy on your local machine of the manual
(HTML pages or PDF file) for the version of LAMMPS you have
downloaded. Follow the steps on the :doc:`Build_manual` page. If you
have difficulties viewing the pages, please :ref:`see this note
<webbrowser>`.

View File

@ -18,7 +18,7 @@ package was developed primarily by Christian Trott (Sandia) and Stan
Moore (Sandia) with contributions of various styles by others,
including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez
(Sandia). For more information on developing using Kokkos abstractions
see the Kokkos `Wiki <https://github.com/kokkos/kokkos/wiki>`_.
see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
Kokkos currently provides support for 4 modes of execution (per MPI
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
@ -29,11 +29,12 @@ produce an executable compatible with a specific hardware.
.. admonition:: C++14 support
:class: note
Kokkos requires using a compiler that supports the c++14 standard. For
some compilers, it may be necessary to add a flag to enable c++14 support.
Kokkos version 3.x requires using a compiler that supports the c++14 standard.
For some compilers, it may be necessary to add a flag to enable c++14 support.
For example, the GNU compiler uses the -std=c++14 flag. For a list of
compilers that have been tested with the Kokkos library, see the Kokkos
`README <https://github.com/kokkos/kokkos/blob/master/README.md>`_.
compilers that have been tested with the Kokkos library, see the
`requirements document of the Kokkos Wiki
<https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
.. admonition:: NVIDIA CUDA support
:class: note

View File

@ -645,106 +645,49 @@ LAMMPS GUI
Overview
^^^^^^^^
LAMMPS GUI is essentially a small graphical text editor that is linked
to the :ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run
LAMMPS directly using the contents of the editor's text buffer as input.
This is similar to what people usually would do using a text editor to
edit the input and then a command line terminal window to run the input
commands. The main benefit is that this integrates very well with
graphical desktop environments and that it is easier to use for
beginners in running computations and thus very suitable for tutorials
on LAMMPS. A small difference is that for the LAMMPS GUI it is not
require to first commit its buffer of the text editor to a file.
LAMMPS GUI is a simple graphical text editor that is linked to the
:ref:`LAMMPS C-library interface <lammps_c_api>` 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. This similarity is a design goal. While making it easy
for beginners to start with LAMMPS, it is also the intention to simplify
the transition to workflows like most experienced LAMMPS users do.
All features have been extensively exposed to hotkeys, so that there is
also appeal for experienced LAMMPS users, too, especially for
prototyping and testing simulations setups.
Features
^^^^^^^^
The main window of the LAMMPS GUI is a generic text editor window with
line numbers and syntax highlighting set up for LAMMPS input files. It
can be used to edit any kind of text file, though. The output of a run
is captured and displayed in a separate dialog window and *not* sent to
the console or a log file (unless the :doc:`log command <log>` is used
in the input. The log window is regularly updated during the run and a
progress bar for the run command shown at the bottom of the main window.
Starting a new run will open another log windows. The state of LAMMPS
will be reset between two runs. After the simulation is finished, an
image of the simulated system can be created and shown in an image
viewer window. Ongoing runs can be stopped at the next iteration via
triggering a timeout.
A detailed discussion and explanation of all features and functionality
are in the :doc:`Howto_lammps_gui` tutorial Howto page.
When opening a file, the editor will determine the directory where the
file resides and switch its current working directory to the folder of
that file. Many LAMMPS inputs contain commands that read other files,
typically from the folder of the input file. The GUI will always show
the current working directory in the bottom. The editor window can also
receive (entire) files via drag-n-drop from a file manager GUI or a
desktop environment. When exiting the GUI with a modified buffer, a
dialog asking to either cancel, ignore the modifications, or save the
file with show up. Same when attempting to load a new file into a
modified buffer.
Here are a few highlights of LAMMPS GUI
Hotkeys
^^^^^^^
Almost all functionality is accessible from the menu or via hotkeys.
The following hotkeys are available (On macOS use the Command key
instead of Ctrl (aka Control)).
.. list-table::
:header-rows: 1
:widths: auto
* - Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+V
- Paste text
- Ctrl+Q
- Quit (Main Window only)
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+Enter
- Run LAMMPS
- Ctrl+W
- Close (Log and Image Window only)
* - CTRL+S
- Save File
- Ctrl+C
- Copy text
- Ctrl+/
- Stop Active Run
- Ctrl+P
- Preferences
* - Ctrl+Shift+S
- Save File As
- Ctrl+X
- Cut text
- Ctrl+I
- Create Snapshot Image
- Ctrl+Shift+/
- Quick Help
Further editing keybindings `are documented with the Qt documentation
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
case of conflicts the list above takes precedence.
- Text editor with syntax highlighting customized for LAMMPS
- Text editor will switch working directory to folder of file in buffer
- Text editor will remember up to 5 recent files
- Context specific LAMMPS command help via online documentation
- LAMMPS is running in a concurrent thread, so the GUI remains responsive
- Support for accelerator packages
- Progress bar indicates that LAMMPS is running
- LAMMPS can be started and stopped with a hotkey
- Screen output is captured in a Log Window
- Thermodynamic output is captured and displayed as line graph in a Chart Window
- Visualization of current state in Image Viewer (via :doc:`dump image <dump_image>`)
- Many adjustable settings and preferences that are persistent
- Dialog to set variables from the LAMMPS command line
Parallelization
^^^^^^^^^^^^^^^
Due to its nature as a graphical application, it is not possible to use
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading is
available and enabled by default.
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading and GPU
acceleration is available and enabled by default.
Prerequisites and portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -752,63 +695,65 @@ Prerequisites and portability
LAMMPS GUI is programmed in C++ based on the C++11 standard and using
the `Qt GUI framework <https://www.qt.io/product/framework>`_.
Currently, Qt version 5.12 or later is required; Qt 5.15LTS is
recommended Qt 6.x not (yet) supported. Furthermore, CMake version 3.16
is required and LAMMPS must be configured with ``-D
LAMMPS_EXCETIONS=on`` and ``-D BUILD_MPI=off``. It has been successfully
compiled and tested on:
recommended; Qt 6.x not (yet) supported. Building LAMMPS with CMake 3.16
or later is required. The LAMMPS GUI has been successfully compiled and tested on:
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
- Windows 10 and 11 x86_64 with MinGW / GCC 10.0 cross-compiler on Fedora 38, Qt version 5.15LTS
Pre-compiled executables
^^^^^^^^^^^^^^^^^^^^^^^^
Pre-compiled LAMMPS executables including the GUI are currently
available from https://download.lammps.org/static. You can unpack the
archive (or mount the macOS disk image) and run the GUI directly in
place. The folder may also be moved around and added to the ``PATH``
environment variable so the executables will be found automatically. The
LAMMPS GUI executable is called ``lammps-gui`` and takes no arguments or
will interpret the first argument as filename to load.
available from https://download.lammps.org/static or
https://github.com/lammps/lammps/releases. You can unpack the archives
(or mount the macOS disk image) and run the GUI directly in place. The
folder may also be moved around and added to the ``PATH`` environment
variable so the executables will be found automatically. The LAMMPS GUI
executable is called ``lammps-gui`` and either takes no arguments or
attempts to load the first argument as LAMMPS input file.
Compilation
^^^^^^^^^^^
The source for the LAMMPS GUI is included with the LAMMPS source code
distribution in the folder `tools/lammps-gui` and thus it can be can be
built as part of a regular LAMMPS compilation.
:doc:`Using CMake <Howto_cmake>` is required.
To enable its compilation the CMake variable ``-D BUILD_LAMMPS_GUI=on``
must be set when creating the CMake configuration. All other settings
(compiler, flags, compile type) for LAMMPS GUI are then inherited from
the regular LAMMPS build. If the Qt library is packaged for Linux
distributions, then its location is typically auto-detected since the
required CMake configuration files are stored in a location where CMake
can find them without additional help. Otherwise, the location of the
Qt library installation must be indicated by setting
``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to a folder inside
the Qt installation that contains the file ``Qt5Config.cmake``.
distribution in the folder ``tools/lammps-gui`` and thus it can be can
be built as part of a regular LAMMPS compilation. :doc:`Using CMake
<Howto_cmake>` is required. To enable its compilation, the CMake
variable ``-D BUILD_LAMMPS_GUI=on`` must be set when creating the CMake
configuration. All other settings (compiler, flags, compile type) for
LAMMPS GUI are then inherited from the regular LAMMPS build. If the Qt
library is packaged for Linux distributions, then its location is
typically auto-detected since the required CMake configuration files are
stored in a location where CMake can find them without additional help.
Otherwise, the location of the Qt library installation must be indicated
by setting ``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to
a folder inside the Qt installation that contains the file
``Qt5Config.cmake``.
It is also possible to build the LAMMPS GUI as a standalone executable
(e.g. when LAMMPS has been compiled with traditional make), then the
CMake configuration needs to be told where to find the LAMMPS headers
and the LAMMPS library, via `-D LAMMPS_SOURCE_DIR=/path/to/lammps/src`.
CMake will try to guess a build folder with the LAMMPS library from that
path, but it can also be set with `-D LAMMPS_LIB_DIR=/path/to/lammps/lib`.
It should be possible to build the LAMMPS GUI as a standalone
compilation (e.g. when LAMMPS has been compiled with traditional make),
then the CMake configuration needs to be told where to find the LAMMPS
headers and the LAMMPS library, via ``-D
LAMMPS_SOURCE_DIR=/path/to/lammps/src``. CMake will try to guess a
build folder with the LAMMPS library from that path, but it can also be
set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
Rather than linking to the LAMMPS library during compilation, it is also
possible to compile the GUI with a plugin loader library that will load
the LAMMPS library dynamically at runtime during the start of the GUI
from a shared library; e.g. `liblammps.so` or `liblammps.dylib` or
`liblammps.dll` (depending on the operating system). This has the
from a shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
``liblammps.dll`` (depending on the operating system). This has the
advantage that the LAMMPS library can be updated LAMMPS without having
to recompile the GUI. The ABI of the LAMMPS C-library interface is very
stable and generally backward compatible. This feature is enabled by
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then
``-D LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS distribution.
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS
distribution.
Platform notes
^^^^^^^^^^^^^^
@ -818,7 +763,7 @@ macOS
When building on macOS, the build procedure will try to manufacture a
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg'
target (i.e. `cmake --build <build dir> --target dmg` or `make dmg`.
target (i.e. ``cmake --build <build dir> --target dmg`` or ``make dmg``.
To build multi-arch executables that will run on both, arm64 and x86_64
architectures natively, it is necessary to set the CMake variable ``-D
@ -831,29 +776,50 @@ version.
Windows
"""""""
On Windows currently only compilation from within Visual Studio 2022 is
supported and tested. Using CMake and Ninja as build system is
required. Qt needs to be installed, tested was a package downloaded from
https://www.qt.io, into the ``C:\\Qt`` folder. There is a custom
`x64-GUI-MSVC` build configuration provided that will activate building
the `lammps-gui.exe` executable in addition to LAMMPS. When requesting
an installation from the `Build` menu, it will create a compressed zip
file with the executables and required dependent .dll files. This zip
file can be uncompressed and ``lammps-gui.exe`` run directly from there.
The uncompressed folder can be added to the ``PATH`` environment and
LAMMPS and LAMMPS GUI can be launched from anywhere from the command
line.
On Windows either native compilation from within Visual Studio 2022 with
Visual C++ is supported and tested, or compilation with the MinGW / GCC
cross-compiler environment on Fedora Linux.
**Visual Studio**
Using CMake and Ninja as build system are required. Qt needs to be
installed, tested was a binary package downloaded from
https://www.qt.io, which installs into the ``C:\\Qt`` folder by default.
There is a custom `x64-GUI-MSVC` build configuration provided in the
``CMakeSettings.json`` file that Visual Studio uses to store different
compilation settings for project. Choosing this configuration will
activate building the `lammps-gui.exe` executable in addition to LAMMPS
through importing package selection from the ``windows.cmake`` preset
file and enabling building the LAMMPS GUI and disabling building with MPI.
When requesting an installation from the `Build` menu in Visual Studio,
it will create a compressed ``LAMMPS-Win10-amd64.zip`` zip file with the
executables and required dependent .dll files. This zip file can be
uncompressed and ``lammps-gui.exe`` run directly from there. The
uncompressed folder can be added to the ``PATH`` environment and LAMMPS
and LAMMPS GUI can be launched from anywhere from the command line.
**MinGW64 Cross-compiler**
The standard CMake build procedure can be applied and the
``mingw-cross.cmake`` preset used. By using ``mingw64-cmake`` the CMake
command will automatically include a suitable CMake toolset file (the
regular cmake command can be used after that). After building the
libraries and executables, you can build the target 'zip'
(i.e. ``cmake --build <build dir> --target zip`` or ``make zip``
to stage all installed files into a LAMMPS_GUI folder and then
run a script to copy all required dependencies, some other files,
and create a zip file from it.
Linux
"""""
Version 5.12 or later of the Qt library and CMake version 3.16 are
required and those are provided by, e.g., Ubuntu 20.04LTS. Thus older
Linux distributions are not likely to be supported, while more recent
ones will work, even for pre-compiled executables (see above). After
compiling with ``cmake --build <build folder>``, use
``cmake --build <build folder> --target tgz`` or ``make tgz`` to build
a ``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
Version 5.12 or later of the Qt library is required. Those are provided
by, e.g., Ubuntu 20.04LTS. Thus older Linux distributions are not
likely to be supported, while more recent ones will work, even for
pre-compiled executables (see above). After compiling with
``cmake --build <build folder>``, use ``cmake --build <build
folder> --target tgz`` or ``make tgz`` to build a
``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
support libraries.
----------

View File

@ -223,7 +223,7 @@ result. I.e. the last 2 columns of thermo output will be the same:
system pressure.
The compute stress/atom can be used in a number of ways. Here is an
example to compute a 1-d pressure profile in z-direction across the
example to compute a 1-d pressure profile in x-direction across the
complete simulation box. You will need to adjust the number of bins and the
selections for time averaging to your specific simulation. This assumes
that the dimensions of the simulation cell does not change.

View File

@ -24,7 +24,7 @@ Examples
.. code-block:: LAMMPS
fix pl all plumed all plumed plumedfile plumed.dat outfile p.log
fix pl all plumed plumedfile plumed.dat outfile p.log
Description
"""""""""""

View File

@ -2,7 +2,7 @@
units lj
atom_style tri
atom_modify first big
atom_modify first big map yes
read_data data.tri.srd
@ -52,12 +52,12 @@ pair_coeff 1 2 0.0 1.0 0.0
timestep 0.001
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398
fix 2 small srd 20 big 1.0 0.25 49894 &
fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
fix 2 small srd 20 big 1.0 1.0 49894 &
search 0.2 cubic warn 0.0001 shift yes 49829 &
overlap yes collision noslip
overlap yes collision noslip inside ignore
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6
fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
# diagnostics
@ -73,8 +73,8 @@ compute 2 all ke
compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms
thermo 1000
thermo_style custom step f_1 c_tsmall f_2[9] temp press
thermo 100
thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
thermo_modify temp tbig
compute 10 all property/atom corner1x corner1y corner1z &
@ -93,9 +93,9 @@ unfix 3
change_box all triclinic
fix 2 small srd 20 big 1.0 0.25 49894 &
fix 2 small srd 20 big 1.0 1.0 49894 &
search 0.2 cubic warn 0.0001 shift yes 49829 &
overlap yes collision noslip tstat yes
overlap yes collision noslip tstat yes inside ignore
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type &

View File

@ -0,0 +1,812 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-114-gdad8081d55-modified)
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:537)
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
units lj
atom_style tri
atom_modify first big map yes
read_data data.tri.srd
Reading data file ...
orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
2 by 2 by 2 MPI processor grid
reading atoms ...
1500 atoms
1500 triangles
read_data CPU = 0.007 seconds
# add small particles as hi density lattice
lattice sc 0.4
Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088
region box block INF INF INF INF INF INF
lattice sc 20.0
Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315
create_atoms 2 region box
Created 91125 atoms
using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
create_atoms CPU = 0.002 seconds
group big type 1
1500 atoms in group big
group small type 2
91125 atoms in group small
set group small mass 0.01
Setting atom values ...
91125 settings made for mass
# delete overlaps
# must set 1-2 cutoff to non-zero value
pair_style lj/cut 1.5
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0
delete_atoms overlap 1.5 small big
System init for delete_atoms ...
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.8
ghost atom cutoff = 1.8
binsize = 0.9, bins = 19 19 19
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) command delete_atoms, occasional
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
(2) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
WARNING: Delete_atoms cutoff > minimum neighbor cutoff (../delete_atoms.cpp:312)
Deleted 76354 atoms, new total = 16271
# SRD run
reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule/intra big include big
comm_modify mode multi group big vel yes
neigh_modify include big
# no pairwise interactions with small particles
pair_style tri/lj 3.5
pair_coeff 1 1 0.1 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0 0.0
# use fix SRD to push small particles out from inside big ones
# if comment out, big particles won't see SRD particles
timestep 0.001
fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
create bodies CPU = 0.000 seconds
125 rigid bodies with 1500 atoms
1.8601881 = max distance from body owner to body atom
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore
fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
# diagnostics
compute tsmall small temp/deform
compute tbig big temp
variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big)
compute_modify tbig extra/dof -4500
compute 1 big erotate/asphere
compute 2 all ke
compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms
thermo 100
thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
thermo_modify temp tbig
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:527)
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2
@Article{Intveld08,
author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest},
title = {Accurate and Efficient Methods for Modeling Colloidal
Mixtures in an Explicit Solvent using Molecular Dynamics},
journal = {Comput.\ Phys.\ Commut.},
year = 2008,
volume = 179,
pages = {320--329}
}
@article{Shire2020,
author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin},
title = {{DEM} Simulations of Polydisperse Media: Efficient Contact
Detection Applied to Investigate the Quasi-Static Limit},
journal = {Computational Particle Mechanics},
year = {2020}
@article{Monti2022,
author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava,
Ishan and Silbert, Leonardo E. and Grest, Gary S.
and Lechman, Jeremy B.},
title = {Large-scale frictionless jamming with power-law particle
size distributions},
journal = {Phys. Rev. E},
volume = {106}
issue = {3}
year = {2022}
}
- fix srd command: doi:10.1063/1.3419070
@Article{Petersen10,
author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and
G. S. Grest and in 't Veld, P. J. and P. R. Schunk},
title = {Mesoscale Hydrodynamics via Stochastic Rotation
Dynamics: Comparison with {L}ennard-{J}ones Fluid},
journal = {J.~Chem.\ Phys.},
year = 2010,
volume = 132,
pages = 174106
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:71)
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:405)
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 2.9202881 0.87320391
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 17 17 17
SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829
SRD per actual grid cell = -3.9971745
SRD viscosity = -34.162587
big/SRD mass density ratio = -3.3753691
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
# of rescaled SRD velocities = 0
ave/max small velocity = 19.970837 35.150443
ave/max big velocity = 0 0
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.8
ghost atom cutoff = 3.8
binsize = 16.874681, bins = 1 1 1
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair tri/lj, perpetual
attributes: half, newton on
pair build: half/multi/newton
stencil: half/multi/3d
bin: multi
Per MPI rank memory allocation (min/avg/max) = 125.9 | 126.4 | 126.7 Mbytes
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
0 0 1.4401779 0 -0.15917996 0 0
100 0.36662911 1.1475389 0.24585067 1.0290503 1.1382325 18
200 0.73133134 1.0558153 0.49986673 0.73932383 1.049638 34
300 1.1229361 1.0218621 0.82641583 0.7589689 1.0205369 40
400 1.5826262 0.99541508 1.2201293 0.69171726 0.99190857 52
500 1.8834563 0.99351667 1.4778822 1.0147794 1.0005581 63
600 2.4225372 0.98954834 1.8740966 1.1362893 0.99760042 61
700 3.0172772 0.99153625 2.3351502 1.3284877 0.98731355 39
800 3.5307913 1.0012521 2.6477224 1.1404922 0.9846605 52
900 3.757064 0.99743944 2.7220653 1.4078087 0.97538456 55
1000 4.3165268 1.002214 3.055501 1.2252972 0.99123745 63
1100 4.2796945 1.0075233 3.1022956 1.1893685 1.0139864 69
1200 4.3719315 1.0037271 3.0054509 1.3886162 1.002661 64
1300 4.5628012 0.99368316 3.2690604 1.3621012 0.9810568 56
1400 4.6954389 0.99365088 3.1940001 1.8485712 0.99571089 71
1500 5.0270163 0.99455258 3.4120396 1.5992539 0.98294263 77
1600 5.5897797 1.0021621 3.647347 1.7796904 0.98967622 66
1700 5.5330194 1.0130853 3.6407996 1.8005429 1.0068955 62
1800 5.3606928 1.0090284 3.5863618 1.3308757 1.0214092 59
1900 5.6086195 1.0071865 3.7427101 1.5296314 0.99886937 55
2000 5.3726474 1.0064207 3.603621 1.9473142 0.99999816 54
2100 5.836183 1.0124553 3.7321841 1.7889397 1.0188986 59
2200 5.5090061 1.0113832 3.5884963 1.6617781 1.0071583 59
2300 5.4011211 1.0095947 3.520406 1.8937582 0.99689983 61
2400 5.2219281 1.0053246 3.3699458 1.7231672 0.99899754 59
2500 5.7695275 1.0141459 3.6211469 1.7767598 1.0143133 65
2600 5.4206253 1.0182828 3.521774 2.0800518 1.0081603 70
2700 5.1401099 1.0085209 3.4200563 2.4019836 1.0107652 59
2800 6.5420721 1.0159876 4.1996904 1.863842 1.0160738 61
2900 5.9082962 1.0106921 3.7223419 2.0586998 1.0073885 67
3000 5.6556123 1.0099021 3.6768976 1.921987 1.0068962 76
3100 5.2913762 1.0008567 3.4103831 1.9831969 0.99187526 80
3200 5.1032361 0.99756662 3.1967156 2.2448433 0.99743574 93
3300 5.2622386 1.0024934 3.3325614 2.0078097 1.0047789 86
3400 5.1247527 0.99810102 3.1363556 1.8907269 0.98936508 82
3500 4.9424333 1.0009344 3.2153968 1.9002728 0.99161849 71
3600 5.1243735 1.0037377 3.3117313 2.1267438 1.0078943 65
3700 5.5045819 1.0006119 3.5686193 2.3466538 0.99876164 68
3800 5.5355384 1.0022639 3.6701457 2.0383269 1.0008683 76
3900 6.4915796 1.0137733 4.3225864 2.6996933 1.0064787 79
4000 6.6631737 1.0236248 4.3057163 2.6352666 1.0255232 75
4100 6.2999507 1.0263876 4.0101385 2.5479077 1.0168303 79
4200 6.7902489 1.0247392 4.4616158 2.4926177 1.0191403 91
4300 6.505908 1.0182073 4.0675428 2.168754 1.0177101 74
4400 5.9554283 1.0115938 3.5787297 2.9258144 1.0133896 72
4500 6.2276609 1.0202416 3.8211204 2.5308249 1.0174385 74
4600 6.0485727 1.0195757 3.8217434 2.6421797 1.0201441 78
4700 6.511063 1.0220764 3.933486 2.8591093 1.0147269 83
4800 6.9478172 1.0106414 4.345402 3.3257663 1.00469 85
4900 6.7547045 1.0211842 4.1874576 3.6503845 1.022873 94
5000 7.2603949 1.0234313 4.5393985 3.4667806 1.0222306 105
5100 7.1899652 1.0256566 4.5421834 3.8137207 1.0317242 99
5200 7.1960739 1.026746 4.4288606 3.5523675 1.0242269 97
5300 7.1294458 1.017883 4.5799808 3.3917274 1.0145317 99
5400 6.2810892 1.0291953 4.0109229 2.8604571 1.0289438 97
5500 6.15246 1.0288734 3.8714587 3.2760394 1.0210757 89
5600 6.5860526 1.0192882 4.0272883 3.3124298 1.0096258 93
5700 7.0296116 1.0097293 4.2652722 3.6049788 1.012463 82
5800 6.8372302 1.0140065 4.2205065 4.3686183 1.0088542 93
5900 7.8887098 1.0090612 4.9724078 4.457317 1.0045137 92
6000 10.120663 1.0312443 6.3025192 4.72018 1.0374722 91
6100 9.1318265 1.0304199 5.7084296 4.244548 1.0259056 97
6200 8.9758903 1.0295285 5.1842704 4.870955 1.0178851 95
6300 9.0088218 1.022484 5.3742805 5.1554352 1.0138365 101
6400 10.470322 1.0287848 6.4602103 4.5461489 1.0335978 105
6500 11.100779 1.0347405 6.9630121 4.9840664 1.0339044 99
6600 10.139333 1.0476079 6.4284839 4.5523893 1.0433517 104
6700 8.9706766 1.0386262 5.8387485 4.247024 1.0408151 101
6800 7.7799532 1.0362651 4.9946283 4.6093924 1.0274763 102
6900 8.0866551 1.0337743 4.9942769 4.1679939 1.0454805 102
7000 8.0224277 1.0193598 4.9380527 3.9173115 1.0185001 109
7100 7.8361001 1.0211143 4.872673 5.3471479 1.024779 110
7200 7.8542147 1.0057183 4.8666653 4.668317 0.99980296 122
7300 7.9313852 1.0159181 5.0062527 4.1410294 1.0195705 114
7400 7.2769846 1.0155245 4.6349779 4.9138895 1.0005886 119
7500 7.5974523 1.0196295 4.7918247 4.2525935 1.0211412 124
7600 6.7835063 1.0203187 4.2674694 4.9251624 1.0218296 113
7700 6.4039017 1.0119494 4.1086667 5.5240525 1.0078246 118
7800 7.0715134 1.0149015 4.2450776 4.8796778 1.0164737 125
7900 6.3626535 1.02294 4.202778 4.482164 1.0235878 136
8000 6.2423869 1.0212553 4.0460303 5.2753307 1.0124884 132
8100 6.550891 1.0223318 4.2993545 5.2634985 1.0163244 143
8200 6.9122202 1.008347 4.3551124 5.4108909 1.0084913 142
8300 6.9104634 1.0103936 4.4622206 5.6762373 0.99559355 143
8400 6.4918879 1.0084381 4.1050732 5.8389788 1.0036021 135
8500 7.4377218 1.0216662 4.5229841 5.5431311 1.0260799 123
8600 7.572198 1.0228381 4.9058913 7.1028185 1.0015164 116
8700 8.204675 1.03457 5.2231696 6.4790244 1.0214635 132
8800 8.3118914 1.0381333 5.1795799 6.7437722 1.0290086 132
8900 8.2559198 1.0268665 5.218352 7.2191395 1.019804 138
9000 8.0403128 1.0339414 4.9310394 6.4942331 1.041527 156
9100 7.1773079 1.0397062 4.4993688 7.0272109 1.0388012 167
9200 7.1793935 1.0373589 4.3481663 7.4894459 1.0078785 157
9300 8.3705146 1.0248112 5.1036971 8.2173072 1.010168 156
9400 9.4935002 1.0252907 5.7846951 9.7466018 1.028941 170
9500 9.5208037 1.0371093 5.9635099 7.6444933 1.022673 165
9600 8.9992217 1.0292895 5.6224192 8.8071452 1.0101362 169
9700 8.682661 1.0422224 5.3997636 8.6827834 1.0337928 149
9800 7.6191562 1.0350948 4.7198842 8.6125595 1.0300395 151
9900 8.0910913 1.0319432 4.8843183 7.9013334 1.0272495 167
10000 7.4438347 1.0186098 4.7184985 8.999795 0.99762661 177
Loop time of 162.325 on 8 procs for 10000 steps with 16271 atoms
Performance: 5322.658 tau/day, 61.605 timesteps/s, 1.002 Matom-step/s
99.3% CPU use with 8 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 33.647 | 64.106 | 79.639 | 169.5 | 39.49
Neigh | 0.30808 | 0.44033 | 0.50863 | 9.8 | 0.27
Comm | 26.611 | 43.438 | 74.998 | 215.7 | 26.76
Output | 0.0072573 | 0.0087791 | 0.0097993 | 0.9 | 0.01
Modify | 53.171 | 54.121 | 55.362 | 12.3 | 33.34
Other | | 0.2104 | | | 0.13
Nlocal: 2033.88 ave 2601 max 1413 min
Histogram: 1 2 0 0 0 0 2 1 1 1
Nghost: 1647.25 ave 1714 max 1617 min
Histogram: 4 0 1 0 0 1 1 0 0 1
Neighs: 12482.8 ave 17009 max 8679 min
Histogram: 1 1 1 0 1 1 2 0 0 1
Total # of neighbors = 99862
Ave neighs/atom = 6.1374224
Neighbor list builds = 562
Dangerous builds = 0
#undump 1
#undump 2
unfix 3
change_box all triclinic
Changing box ...
triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0)
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
fix 3 all deform 1 xy erate 0.05 units box remap v
run 40000
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 2.9202881 0.87320391
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 13 13 13
SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419
SRD per actual grid cell = -2.775698
SRD viscosity = -12.180602
big/SRD mass density ratio = -5.5653033
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
# of rescaled SRD velocities = 1
ave/max small velocity = 16.14994 40
ave/max big velocity = 1.6952661 5.2200074
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.8
ghost atom cutoff = 3.8
binsize = 13.499745, bins = 1 1 1
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair tri/lj, perpetual
attributes: half, newton on
pair build: half/multi/newton/tri
stencil: half/multi/3d/tri
bin: multi
Per MPI rank memory allocation (min/avg/max) = 106.9 | 107.5 | 107.7 Mbytes
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
10000 7.4438347 1.0189789 4.7184481 7.9505614 0 0
10100 7.0770142 1.0021471 4.4491455 6.606701 1 141
10200 6.7628072 1.002308 4.152988 8.5190386 1 125
10300 6.5333319 1.0007472 4.1295404 8.2341747 1 109
10400 6.3237519 1.0024029 3.8636034 9.4058128 1 95
10500 6.6411054 1.0026261 4.2975997 7.6122304 1 82
10600 5.7470775 1.0004827 3.7959947 7.3091777 1 67
10700 5.9744919 1.0014977 3.6885649 7.5517197 1 59
10800 5.8028731 1.0029627 3.7553961 6.2787087 1 49
10900 5.3755286 1.0019318 3.5334739 7.1318348 1 41
11000 5.3915962 1.001463 3.483172 7.6362496 1 40
11100 5.8683672 1.0022459 3.6697589 6.9711866 1 33
11200 5.4351801 0.99956703 3.4548447 7.0745257 1 29
11300 4.9397513 1.0008287 3.1990325 6.0917337 1 27
11400 4.9159845 1.0017862 3.0005677 7.653817 1 26
11500 4.9243103 1.0013135 3.1799841 7.744414 1 23
11600 5.2036357 1.0017984 3.2963749 7.540477 1 22
11700 4.8991892 1.0020757 3.1773032 8.7218471 1 27
11800 4.9489399 1.003438 3.1679764 7.1605486 1 26
11900 4.82398 1.0019946 3.1939566 7.1397869 1 21
12000 4.3531411 1.000532 2.8321416 7.6672501 1 23
12100 4.8226081 1.0018898 3.0382137 6.8343432 1 25
12200 4.7456418 1.0032116 2.9186038 7.3067818 1 20
12300 4.4280468 1.0005857 2.734593 8.0365684 1 22
12400 4.7311239 1.0000982 2.8898839 7.9231831 1 22
12500 4.7261054 1.0016127 2.9090517 7.6085854 1 24
12600 4.7719025 1.0016702 2.9736761 7.6101796 1 26
12700 4.386248 1.001394 2.8508378 6.4765102 1 28
12800 4.3313538 1.0019737 2.6258221 6.3164681 1 19
12900 4.2219861 1.0007469 2.5345699 7.0901077 1 22
13000 4.1775643 1.0011891 2.5807017 7.3579938 1 25
13100 4.3060837 1.0008671 2.5974066 6.9301328 1 22
13200 4.3529062 0.99996469 2.7571632 6.7806287 1 21
13300 4.2178709 1.000673 2.7819091 7.6449064 1 18
13400 4.2714169 1.0021294 2.7280794 8.0986691 1 18
13500 4.3430969 1.0037732 2.6768429 8.1267941 1 18
13600 4.3664374 1.0016083 2.6470186 6.2797727 1 20
13700 4.4904769 1.0008993 2.7885718 7.7410193 1 22
13800 4.2966193 1.001532 2.73862 7.9651302 1 21
13900 4.4003185 1.0009984 2.7484129 8.7160439 1 24
14000 4.5948292 1.0011748 2.9051777 7.842121 1 22
14100 4.6901122 1.0001265 2.9404111 8.9953816 1 20
14200 4.8517518 0.99998743 2.9647625 6.6450509 1 22
14300 4.889628 1.0018051 3.0891097 7.2671824 1 20
14400 4.578862 1.0010629 2.8239776 6.1317183 1 23
14500 4.0865406 1.0013917 2.5119661 6.864665 1 19
14600 4.30688 1.0009041 2.6817814 6.9007433 1 18
14700 4.1295726 1.002342 2.6032093 7.1441648 1 15
14800 4.2176021 1.0015157 2.7332903 6.8394683 1 16
14900 4.2012664 0.99986345 2.6498409 7.4568241 1 15
15000 4.6124269 1.0014751 2.9584178 7.9341875 1 16
15100 4.947327 1.0010615 3.0784409 7.6241305 1 21
15200 5.253281 1.002095 3.3093754 8.1872718 1 25
15300 5.2642369 1.0017799 3.1511136 7.4668389 1 25
15400 5.1967916 1.0029407 3.247548 8.0840111 1 23
15500 5.7465412 1.001896 3.468834 9.5990471 1 15
15600 6.2245772 1.0021086 3.6127689 7.8242016 1 19
15700 5.5626191 0.99984979 3.3893723 7.8124588 1 20
15800 5.5945727 1.0010291 3.3442448 7.0116922 1 17
15900 5.4450219 1.0006248 3.3132381 8.4803413 1 15
16000 5.7800459 1.001449 3.5002534 8.7989456 1 19
16100 6.1168718 1.0008109 3.8081142 8.0119729 1 18
16200 5.4901649 1.0020643 3.3673653 7.3483134 1 17
16300 5.4051694 1.0015652 3.3560012 7.4641983 1 19
16400 5.4237612 1.0012686 3.3816406 7.3845086 1 14
16500 5.1935593 1.001754 3.3340381 7.8607712 1 16
16600 5.539343 1.0021073 3.4164309 8.1541097 1 12
16700 5.8922923 1.0013792 3.553426 7.5220576 1 14
16800 5.956937 1.0005959 3.7630589 8.7417987 1 13
16900 5.469721 1.0016219 3.5531223 8.6721994 1 13
17000 5.3110154 1.001142 3.4167244 7.4644182 1 15
17100 5.9226035 0.99918238 4.0244287 6.5172028 1 16
17200 5.4897042 0.99981565 3.4350691 5.6840394 1 20
17300 5.4302636 1.0021571 3.421473 6.4317025 1 21
17400 5.5559131 1.0013807 3.4951403 6.874191 1 24
17500 5.4068006 1.0010448 3.4506835 7.7069504 1 22
17600 4.9283792 1.0007628 3.1736308 7.3098058 1 20
17700 4.9319722 0.99935896 3.0956257 8.2120111 1 15
17800 4.6842391 1.00037 2.9602433 7.4116352 1 17
17900 4.7714682 1.0009332 2.9666778 7.5925131 1 17
18000 4.7233188 1.0035687 3.0991778 7.1636357 1 10
18100 4.6487958 1.0020255 3.10781 6.8468658 1 12
18200 4.6284129 1.0012617 3.089724 6.3082275 1 13
18300 4.7136404 0.99962415 3.1261978 7.3359556 1 15
18400 5.0367681 1.0011016 3.2413493 8.3910633 1 14
18500 4.9658104 1.0025407 3.2420827 7.4701216 1 17
18600 4.6100059 1.0014508 3.0216884 6.553483 1 17
18700 4.3246452 1.0016721 2.7810363 6.7450293 1 19
18800 4.9415788 1.0012406 3.1661907 7.5544034 1 18
18900 5.3930915 1.000138 3.2557456 7.350955 1 21
19000 5.1938599 1.0007364 3.2398733 6.5397956 1 22
19100 5.4433048 1.0019191 3.2699245 8.3625772 1 22
19200 6.1303261 1.0004005 3.7823203 8.0537369 1 22
19300 5.5762518 1.0008117 3.5689121 8.3714373 1 22
19400 5.1316743 0.9999834 3.099381 7.405287 1 23
19500 5.2064799 1.0012007 3.3059455 7.3499127 1 25
19600 5.1650099 1.0023314 3.3759492 7.3637616 1 21
19700 5.8316278 1.0023317 3.601564 7.153887 1 19
19800 5.6435147 1.0010657 3.4967581 6.8899334 1 21
19900 5.4071193 0.99961357 3.4977894 6.1068438 1 20
20000 5.5058495 1.000982 3.5185057 8.5657603 1 19
20100 5.6551271 1.0025852 3.5672369 7.8242273 1 20
20200 5.7196886 1.002283 3.6010925 7.1449072 1 22
20300 5.5593553 1.0009987 3.4363398 8.4141755 1 21
20400 5.5550247 1.001081 3.3950874 8.0222131 1 20
20500 5.4510415 0.99997273 3.5505093 7.5243655 1 18
20600 5.8014064 1.0007611 3.8084579 7.6583499 1 18
20700 5.7337315 1.0020309 3.7973684 8.7376766 1 17
20800 5.2512898 0.99901254 3.5027763 7.8902791 1 14
20900 5.3245034 1.0014504 3.3354615 6.7030716 1 17
21000 5.2071731 1.0020459 3.3881369 5.8616999 1 20
21100 5.3187535 1.0010762 3.2845672 8.1422146 1 21
21200 5.5298545 0.99942313 3.4393978 7.1183144 1 22
21300 5.8430744 1.0008652 3.719408 7.8522038 1 20
21400 5.8190457 1.0017046 3.5624252 7.8150165 1 20
21500 6.004585 1.0035276 3.9161914 7.7719377 1 21
21600 6.7202635 0.99970072 3.9642141 8.7934294 1 18
21700 6.8590346 1.0007883 4.4285217 8.9014638 1 20
21800 6.627638 1.0012117 4.1154082 8.3153026 1 22
21900 7.8281047 1.0008299 4.8842343 8.4016227 1 20
22000 7.200038 1.0014681 4.4141419 9.4091956 1 18
22100 7.7442011 1.0018051 4.7850371 8.9885489 1 15
22200 7.4770203 1.0033558 4.7512643 8.4898148 1 17
22300 8.1080801 1.0000019 5.2725185 9.2314625 1 14
22400 7.8068311 1.0020672 4.9055683 8.4064748 1 12
22500 7.4594636 1.0008427 4.6586396 8.5102986 1 11
22600 6.9380609 1.0024634 4.2435619 10.395118 1 16
22700 6.9338066 1.001056 4.3436179 7.9126284 1 18
22800 6.8049493 1.0020052 4.1443407 7.8228868 1 18
22900 6.2280158 1.0021474 3.7695343 7.3179647 1 20
23000 5.649403 1.0017128 3.5941976 7.2964709 1 19
23100 5.3203116 1.001912 3.3807399 6.6454551 1 15
23200 5.8172882 1.0005742 3.6625896 8.4256312 1 15
23300 5.9647182 1.0015466 3.9106019 8.3303303 1 14
23400 5.9784055 1.0034542 3.7229235 7.7934273 1 14
23500 5.377627 1.00192 3.5481778 6.8195124 1 17
23600 5.4807136 1.0014662 3.563123 7.6356376 1 18
23700 5.8896329 1.0013553 3.7990694 8.5513408 1 13
23800 6.3463707 0.9999403 3.9609397 8.5741923 1 11
23900 6.656669 1.0014998 4.1993183 9.0862996 1 13
24000 7.583723 1.0025057 4.7628652 7.5007245 1 20
24100 6.9868359 1.0014089 4.4369841 7.692833 1 25
24200 7.1966062 1.0013149 4.4384528 9.5264821 1 18
24300 6.7765706 1.0007065 4.3500477 9.4974154 1 16
24400 7.0853466 1.0013246 4.409163 9.2215823 1 17
24500 6.9603823 1.0004247 4.4866051 7.7870058 1 20
24600 6.9208291 0.99953329 4.2298144 6.5732392 1 21
24700 6.5005518 1.0026848 4.0003505 7.8094715 1 22
24800 5.8421948 1.0012055 3.6686768 7.6078157 1 26
24900 5.8410604 1.0023428 3.746177 6.8971309 1 22
25000 5.8728511 1.0001747 3.7170134 7.4456816 1 19
25100 6.0217168 1.000624 3.7756108 6.6542452 1 20
25200 6.1939015 1.0017861 3.8943084 9.395821 1 25
25300 6.161998 1.0010373 3.9255122 6.2228884 1 28
25400 5.5850406 1.0018505 3.5129832 7.2551309 1 24
25500 6.0286276 1.0009028 3.8580887 6.8065265 1 24
25600 5.6262228 1.0005097 3.4574446 7.5061246 1 21
25700 6.1348187 1.0009828 3.8073512 7.4818375 1 17
25800 6.09781 1.0026426 3.9585383 9.0915939 1 21
25900 6.2673667 1.0002269 3.8182813 9.2134822 1 21
26000 6.6001776 1.0020444 4.041386 8.0403555 1 18
26100 6.3063025 1.0016633 3.8649839 8.8149734 1 19
26200 6.0046983 1.002332 3.5380766 8.6145656 1 17
26300 5.9627788 1.0005401 3.56864 6.7821213 1 15
26400 5.0547314 0.9998295 3.2106781 9.2935351 1 15
26500 5.256781 1.0013131 3.2946631 8.8590275 1 15
26600 5.6250355 1.0023929 3.5243033 8.8985058 1 17
26700 6.0197165 1.0018323 3.7973947 7.3093402 1 17
26800 5.4556541 1.0015309 3.4295107 8.2342049 1 18
26900 5.420428 1.0024996 3.4374201 7.1444636 1 16
27000 6.165624 1.0019174 3.8726016 8.6588275 1 20
27100 6.7131697 1.0006541 4.266264 8.7063389 1 24
27200 6.4855163 1.0016139 4.2029778 7.667611 1 29
27300 6.0525608 1.000478 3.9169723 7.4515279 1 25
27400 6.1426194 1.0014522 3.9176108 6.8689671 1 24
27500 6.5981349 1.0001143 4.0620686 8.6804552 1 27
27600 6.7827138 1.0016694 4.2764286 9.3912843 1 21
27700 6.6368902 1.0025149 4.1452128 9.1814523 1 24
27800 6.9791025 1.0019486 4.3989933 7.9446882 1 24
27900 6.617142 1.0015736 4.360571 9.3732108 1 26
28000 7.2818263 1.0014101 4.6041512 8.2398587 1 28
28100 7.2543709 1.0007625 4.5724787 7.7373488 1 22
28200 7.0631847 1.0023922 4.4021705 8.3290554 1 29
28300 7.2999952 1.0012593 4.4655563 8.612666 1 27
28400 7.4124538 1.0014043 4.5011335 8.379391 1 29
28500 7.0350937 1.0011392 4.3528091 7.8167375 1 24
28600 7.9659642 1.0031684 4.8732467 8.0661929 1 30
28700 7.2865919 1.0010958 4.6650146 8.0325989 1 32
28800 7.7039529 1.0027912 4.8299888 9.5471747 1 30
28900 8.3288847 1.0012438 5.0785288 8.8964877 1 31
29000 7.9348665 1.0021794 4.9393968 9.5531767 1 31
29100 8.2473389 1.0013795 4.9890359 9.7697184 1 29
29200 8.6383362 1.0018356 4.9856954 7.6402719 1 25
29300 8.2504592 1.0011048 4.9631793 7.9466724 1 24
29400 8.0502922 1.0010516 5.2521065 8.4515028 1 26
29500 7.9475896 1.0012951 4.8584644 9.1225463 1 19
29600 8.5641641 1.0016228 5.4361335 9.2045399 1 23
29700 8.9932021 1.0011848 5.5727205 8.6045729 1 23
29800 8.0320178 1.0019073 5.2837013 8.9335413 1 22
29900 8.2676522 1.0012734 5.2213798 8.8966896 1 24
30000 9.1848984 1.001747 5.9147628 12.096129 1 27
30100 10.184519 0.99977427 6.4260136 11.140491 1 27
30200 9.271472 1.0023983 6.0252189 9.6954338 1 30
30300 9.0751572 1.000851 5.6010295 9.734426 1 28
30400 9.4581261 1.0018449 5.6987258 9.70456 1 34
30500 9.1574751 0.99944001 5.582217 9.300318 1 27
30600 8.619312 1.001388 5.3503985 8.2759155 1 26
30700 7.9370031 1.0026674 5.0702831 8.5368014 1 28
30800 7.9221619 1.0019077 5.1278637 11.046922 1 26
30900 9.9722884 1.0025903 6.4055506 10.167311 1 25
31000 8.8648667 0.99962676 5.4777514 10.142102 1 21
31100 8.576344 1.000906 5.3216342 8.7984921 1 18
31200 7.8480974 1.0010341 4.9584917 9.0696437 1 16
31300 8.3536183 1.0005758 5.208516 9.7971514 1 15
31400 8.5301933 1.0007603 5.2241536 9.0257241 1 17
31500 8.5196226 1.0018215 5.0576064 8.8847294 1 19
31600 8.1470823 1.0023147 4.9182956 9.0205413 1 20
31700 8.1475888 1.0005764 5.1814113 9.0603162 1 16
31800 7.8629717 1.0014194 4.9221218 9.366291 1 16
31900 7.7206559 1.0021082 4.9167636 7.4136735 1 16
32000 7.5152809 1.0004752 4.6330638 8.830959 1 16
32100 8.2693974 1.0011751 4.9094804 9.427636 1 13
32200 8.3067661 0.9997006 4.9036865 9.0374633 1 17
32300 7.2068514 1.0007866 4.3580755 8.6445065 1 17
32400 6.885063 1.0011887 4.1528011 8.1199454 1 16
32500 6.9147014 1.0020825 4.160405 7.5398034 1 19
32600 6.8809668 1.000971 4.3312782 8.2157688 1 16
32700 6.4818892 1.0000885 3.9433899 7.309605 1 22
32800 6.6875555 1.0018674 4.1017504 7.2327183 1 22
32900 7.6118502 0.99975736 4.4498951 8.5072395 1 19
33000 7.7576909 1.0022061 4.7239551 9.2132467 1 22
33100 7.8616235 1.000482 5.0031322 9.349805 1 20
33200 8.2620563 1.0015059 5.2482188 10.286446 1 17
33300 8.0217099 1.0015466 5.1166876 9.1381844 1 20
33400 7.6565746 1.0024855 4.7594208 9.2646824 1 22
33500 7.9633887 1.0010334 4.6754116 9.1085184 1 23
33600 7.9566834 1.0024542 4.6712679 9.2046594 1 25
33700 8.2639384 1.0003021 5.1326892 8.0930215 1 24
33800 8.5648917 1.0000947 5.2099387 8.8127486 1 21
33900 8.3593557 1.0002488 5.1291354 8.5938391 1 25
34000 8.1922068 1.0030011 5.1441189 7.1529563 1 24
34100 8.4260308 1.0004639 5.5876122 9.0450303 1 28
34200 8.3014654 1.0002204 5.1964772 8.4920822 1 33
34300 7.4736545 1.0010306 4.7932244 7.8442244 1 30
34400 7.0023126 1.0024002 4.5665168 8.4702188 1 29
34500 7.3797703 1.000813 4.7224014 8.4098954 1 30
34600 7.7158761 0.99973161 4.7441628 8.5818592 1 29
34700 7.6135895 1.0015768 4.6612844 7.2195952 1 28
34800 7.0458078 0.99992638 4.2805357 7.4162305 1 32
34900 7.6190708 1.0007146 4.8064968 8.2709405 1 27
35000 7.4614294 1.0006051 4.7807207 7.7137359 1 28
35100 7.7008336 1.0008263 4.6823621 7.0208513 1 26
35200 8.1510766 1.000271 5.1781834 7.3231692 1 24
35300 7.5106275 1.0010438 4.6988185 8.9418343 1 25
35400 7.8116652 1.0009688 4.8622216 7.4624002 1 17
35500 7.2159785 1.0027484 4.543984 8.3177043 1 21
35600 7.6978875 1.0004834 4.7021203 8.3706905 1 20
35700 7.7827655 1.0019919 4.775879 8.6083292 1 15
35800 7.8433537 1.001844 4.7506574 7.3250009 1 15
35900 7.9456497 1.0004336 4.7925775 7.9824359 1 18
36000 8.1044513 1.0022261 5.1213755 9.211699 1 16
36100 7.6657532 1.0025661 4.751804 8.9770412 1 19
36200 7.909323 1.0035462 4.8435293 10.232493 1 21
36300 8.4188244 1.0016775 5.4337725 9.2060079 1 24
36400 8.7352689 1.0011274 5.6313351 8.6202832 1 24
36500 8.3459273 1.0005659 5.187336 6.9333716 1 21
36600 7.7118105 1.0018769 4.9293347 8.2789615 1 14
36700 7.8069879 1.0014021 4.7782709 8.4841233 1 15
36800 7.862085 1.0005342 4.8680692 8.1055023 1 16
36900 7.9469362 1.0027815 4.9339095 9.157722 1 16
37000 7.9085375 1.0024851 5.0921374 8.9374239 1 16
37100 8.9464869 1.0005734 5.6837772 8.806998 1 16
37200 8.1482632 1.0021175 5.1266453 8.5772094 1 18
37300 7.7958072 1.0026336 4.788431 8.3233372 1 19
37400 7.3647655 1.0015482 4.4786134 9.6606112 1 23
37500 7.3071882 1.0003912 4.681549 8.6319438 1 17
37600 7.8672509 1.0000478 4.7981944 8.3051478 1 14
37700 7.9306696 0.99923102 4.9316544 9.3672856 1 15
37800 7.7397949 0.99948557 5.1168552 8.5978047 1 17
37900 7.9121039 1.0020122 4.9866234 7.640888 1 14
38000 7.433451 1.0007901 4.6254894 8.0853539 1 14
38100 7.4636908 1.0021552 4.8472833 8.1975615 1 10
38200 7.4453077 1.0010305 4.6910943 7.8192603 1 13
38300 7.0488536 1.0012587 4.5490462 8.190036 1 16
38400 8.0686748 1.0016782 5.0747029 7.7242015 1 15
38500 7.9575875 1.0007137 4.8361776 8.05268 1 15
38600 7.6690498 1.0027522 4.8823286 9.1926516 1 20
38700 7.1567 1.002374 4.5600354 10.098089 1 19
38800 6.9100518 1.0008695 4.4101446 7.8832032 1 19
38900 6.8021882 1.0017647 4.1844125 8.1858761 1 21
39000 8.3996464 1.0010263 4.8183813 8.0997387 1 16
39100 8.4533834 1.0021643 5.074254 11.291904 1 19
39200 8.2406701 1.002062 5.0117425 8.778159 1 24
39300 8.3134114 1.0008218 5.0067136 7.9871787 1 22
39400 7.4307571 1.0014205 4.5858283 8.8596594 1 25
39500 7.1146821 1.0016367 4.5021057 7.4890018 1 22
39600 8.0048978 0.99992107 4.9235747 7.8770845 1 24
39700 8.070853 1.0029024 5.0842957 9.020664 1 21
39800 7.6939108 1.0012543 4.8986595 8.3306129 1 20
39900 7.2915444 1.00267 4.5038291 8.3844384 1 20
40000 7.3023994 1.0020441 4.4960911 8.1023709 1 18
40100 7.0221648 1.0033695 4.6374149 8.3756822 1 24
40200 7.4114756 1.0019246 4.6733475 7.6547258 1 23
40300 7.5323108 1.0005472 4.8284493 8.2820085 1 26
40400 7.3890772 1.0010491 4.6599273 8.9203575 1 19
40500 7.5786764 1.0016114 4.8166885 8.6760107 1 25
40600 8.165763 1.0006961 5.1488995 7.9321524 1 22
40700 8.1277597 0.99933464 5.0441567 10.069551 1 16
40800 8.1050904 1.0024705 5.4408599 8.3244459 1 21
40900 7.805318 1.0022992 4.9965408 9.7193723 1 21
41000 9.0130932 1.0006842 5.7931112 6.1646073 1 20
41100 8.0387975 1.0017359 5.3355655 9.6123191 1 21
41200 8.4484723 1.0014151 5.4461007 8.5146504 1 27
41300 8.6181909 1.0007562 5.2963876 9.1122306 1 30
41400 9.6762899 1.0010931 5.950456 9.2851025 1 25
41500 9.9414226 1.0016186 6.1433384 10.741453 1 24
41600 9.3348435 1.0003483 5.9291766 11.460717 1 20
41700 9.6125587 1.0013661 5.8530052 9.2105722 1 19
41800 11.383056 1.0032034 7.1988684 10.312945 1 22
41900 10.884524 1.0034888 6.9126707 10.775457 1 20
42000 11.071218 1.0026753 7.0004189 10.740627 1 20
42100 11.054304 1.0008347 6.9602414 8.9885498 1 22
42200 22.478691 1.0020466 14.997099 12.72513 1 19
42300 18.303508 1.0027626 11.336523 12.638769 1 18
42400 15.998712 1.0030312 9.4092725 11.070501 1 24
42500 15.034488 1.0024472 9.3543751 11.48052 1 28
42600 14.538257 1.0033153 9.2523745 10.909576 1 27
42700 13.986613 1.001458 8.5544184 10.765136 1 29
42800 13.240256 1.0027899 8.2014429 10.506497 1 32
42900 12.784336 1.0001406 8.0823431 12.258209 1 33
43000 13.374145 1.0012996 8.4207155 10.32817 1 31
43100 13.142334 1.0022503 8.5908808 10.152205 1 32
43200 12.669284 1.0018944 7.8511966 10.580104 1 32
43300 13.155032 1.001144 8.0337768 10.6652 1 39
43400 12.155928 1.0019472 7.5886584 11.234772 1 35
43500 12.385603 1.0007639 7.8865245 9.3868914 1 32
43600 12.236179 1.0027456 7.7521353 10.456701 1 42
43700 11.49535 1.0008758 7.3633144 8.8490079 1 40
43800 11.469157 1.0015845 7.0035577 10.594522 1 41
43900 11.228266 1.0013014 7.0137223 8.0653711 1 38
44000 10.56742 1.0016631 6.6908938 8.1094154 1 35
44100 9.8964699 1.0008351 6.3550438 8.6578181 1 36
44200 9.041539 1.0019541 5.6721401 8.6518043 1 38
44300 9.0767434 1.0034191 5.7446596 8.3838528 1 38
44400 9.2299608 1.0019526 5.7117964 8.3106491 1 37
44500 9.458981 1.0030409 5.7612138 7.7679755 1 37
44600 8.9611997 1.0014848 5.6490756 6.9224078 1 37
44700 8.0853184 1.0018894 5.2288749 8.0910912 1 32
44800 7.9999755 1.0015853 4.8088312 7.1854304 1 30
44900 7.6598023 1.0009751 4.6690664 7.1999858 1 28
45000 7.4939315 1.0010307 4.8119666 7.9615769 1 26
45100 7.4690079 0.99913423 4.9704428 7.6026835 1 32
45200 7.7001199 1.001626 4.9315953 7.4926686 1 25
45300 7.8794405 1.0011648 4.8624857 8.0804457 1 26
45400 7.493909 1.0016257 4.7631808 8.0330626 1 26
45500 7.5963141 1.0005825 4.7220659 7.0971298 1 23
45600 7.9028612 1.0017008 4.9561022 8.440428 1 23
45700 7.2285584 1.0006033 4.5521456 9.385579 1 23
45800 7.5687284 1.0024318 4.8557498 8.3052658 1 23
45900 7.8938604 1.0013937 5.1393944 5.5323667 1 26
46000 8.318466 1.0020803 5.4761811 8.2227801 1 25
46100 7.9169512 1.0024598 5.0406355 8.64365 1 27
46200 7.5535458 1.0016318 4.8010133 9.370726 1 26
46300 7.8926896 1.0001525 5.18463 7.9830196 1 27
46400 7.487145 1.002671 4.7718312 8.300134 1 29
46500 7.3564658 1.0006114 4.6762189 7.34947 1 26
46600 7.2261291 1.0005569 4.4751221 6.5847138 1 27
46700 7.2943203 1.0020164 4.3335327 7.7296507 1 25
46800 8.5849411 1.0014634 5.4501531 9.0933014 1 25
46900 10.176752 1.0023799 6.0456779 9.4050423 1 16
47000 9.1913098 1.0029076 5.7577256 9.1826215 1 22
47100 9.5479771 1.0022102 6.1100973 8.9440056 1 28
47200 9.9944172 1.0004924 6.3649417 9.1507264 1 25
47300 9.3543283 1.0013246 6.0873147 10.41657 1 24
47400 8.594101 1.0020068 5.6864295 9.2388304 1 24
47500 9.3191964 1.002411 6.0537511 9.3506828 1 23
47600 8.1615734 1.001364 5.3757905 10.303962 1 30
47700 8.3615046 1.0003075 5.2727936 9.3162209 1 32
47800 8.3566467 1.0026031 5.4379524 7.7644422 1 33
47900 8.4062556 1.0006471 5.3098736 8.0181121 1 33
48000 8.2233307 1.0012304 4.9650027 9.2644288 1 34
48100 8.4495256 1.000088 4.9940422 10.01023 1 27
48200 8.8068097 1.0014275 5.4732649 8.410093 1 31
48300 8.0008187 1.0017459 4.7732764 9.25726 1 27
48400 7.7242529 1.0026909 4.9084505 8.7147295 1 30
48500 8.3752816 1.001333 5.1071228 8.2267308 1 32
48600 9.0777805 1.0019328 5.7331841 9.6679383 1 29
48700 9.3623061 1.0001767 5.7117062 8.396895 1 25
48800 8.1186637 1.0013185 5.2697427 8.6058372 1 27
48900 7.3685497 1.0007173 4.6097553 7.8047228 1 24
49000 7.1661421 1.0023152 4.5389038 8.8759552 1 22
49100 6.9857144 1.0016394 4.6489319 8.2022359 1 24
49200 6.7160336 1.0018413 4.2488082 8.3393245 1 25
49300 7.9703755 1.0010628 5.2328567 7.968278 1 28
49400 8.2628465 1.0010877 5.2292977 8.0196533 1 27
49500 8.1436558 1.0015175 5.0344712 8.0712037 1 30
49600 8.5182498 1.0021589 5.1029028 8.6869789 1 28
49700 8.3604444 1.0015016 5.0333696 9.4861656 1 25
49800 7.336335 1.0020055 4.6365173 8.7210022 1 30
49900 7.432996 1.0016415 4.7090587 8.7033033 1 29
50000 7.4937053 1.001014 4.7212573 9.0890363 1 29
Loop time of 999.576 on 8 procs for 40000 steps with 16271 atoms
Performance: 3457.466 tau/day, 40.017 timesteps/s, 651.116 katom-step/s
99.3% CPU use with 8 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 293.48 | 403.7 | 545.29 | 357.5 | 40.39
Neigh | 2.4176 | 3.2721 | 3.8303 | 25.2 | 0.33
Comm | 163.58 | 305.88 | 419.83 | 416.7 | 30.60
Output | 0.032483 | 0.034794 | 0.040514 | 1.2 | 0.00
Modify | 281.15 | 285.67 | 293.8 | 24.3 | 28.58
Other | | 1.023 | | | 0.10
Nlocal: 2033.88 ave 2657 max 1198 min
Histogram: 2 0 0 0 0 2 1 0 1 2
Nghost: 1628.12 ave 1719 max 1569 min
Histogram: 2 0 1 1 2 1 0 0 0 1
Neighs: 13566 ave 18212 max 8488 min
Histogram: 1 0 0 1 2 1 2 0 0 1
Total # of neighbors = 108528
Ave neighs/atom = 6.6700264
Neighbor list builds = 2447
Dangerous builds = 2
Total wall time: 0:19:22

View File

@ -1,243 +0,0 @@
LAMMPS (1 Feb 2014)
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
units lj
atom_style tri
atom_modify first big
read_data data.tri.srd
orthogonal box = (-8.43734 -8.43734 -8.43734) to (8.43734 8.43734 8.43734)
2 by 2 by 2 MPI processor grid
reading atoms ...
1500 atoms
1500 triangles
# add small particles as hi density lattice
lattice sc 0.4
Lattice spacing in x,y,z = 1.35721 1.35721 1.35721
region box block INF INF INF INF INF INF
lattice sc 20.0
Lattice spacing in x,y,z = 0.368403 0.368403 0.368403
create_atoms 2 region box
Created 91125 atoms
group big type 1
1500 atoms in group big
group small type 2
91125 atoms in group small
set group small mass 0.01
91125 settings made for mass
# delete overlaps
# must set 1-2 cutoff to non-zero value
pair_style lj/cut 1.5
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0
delete_atoms overlap 1.5 small big
Deleted 76354 atoms, new total = 16271
# SRD run
reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule big include big
communicate multi group big vel yes
neigh_modify include big
# no pairwise interactions with small particles
pair_style tri/lj 3.5
pair_coeff 1 1 0.1 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0 0.0
# use fix SRD to push small particles out from inside big ones
# if comment out, big particles won't see SRD particles
timestep 0.001
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398
125 rigid bodies with 1500 atoms
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6
# diagnostics
compute tsmall small temp/deform
compute tbig big temp
variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big)
compute 1 big erotate/asphere
compute 2 all ke
compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms
thermo 1000
thermo_style custom step f_1 c_tsmall f_2[9] temp press
thermo_modify temp tbig
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439)
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
run 10000
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:385)
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 1.46014 0.436602
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 67 67 67
SRD grid size: request, actual (xyz) = 0.25, 0.251861 0.251861 0.251861
SRD per actual grid cell = 0.0647662
SRD viscosity = -1.09837
big/SRD mass density ratio = 24.668
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
# of rescaled SRD velocities = 0
ave/max small velocity = 19.9708 35.1504
ave/max big velocity = 0 0
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:76)
Memory usage per processor = 116.135 Mbytes
Step 1 tsmall 2[9] Temp Press
0 0 1.4405441 0 0 -0.15917996
1000 1.0535509 1.1241378 1.1224038 0 0.15526438
2000 2.4635987 1.0240667 0.94231519 0 0.011069846
3000 3.1093028 1.0070585 1.0176028 0 0.34124888
4000 2.9524179 1.0101774 1.0311733 0 -0.22118101
5000 2.9175438 1.0109144 1.0284445 0 0.1839507
6000 3.3200928 0.99108983 0.95968219 0 1.0229339
7000 3.3020156 0.99661428 0.98000621 0 2.3333851
8000 4.1500999 0.99129645 0.99723707 0 4.3054414
9000 6.537028 1.0074533 1.0251098 0 18.782913
10000 16.233245 1.0145766 1.0219787 0 147.83787
Loop time of 228.558 on 8 procs for 10000 steps with 16271 atoms
Pair time (%) = 145.018 (63.4492)
Neigh time (%) = 32.6283 (14.2757)
Comm time (%) = 43.3283 (18.9572)
Outpt time (%) = 0.000848889 (0.00037141)
Other time (%) = 7.58254 (3.31755)
Nlocal: 2033.88 ave 2092 max 1902 min
Histogram: 1 0 0 0 1 1 0 1 1 3
Nghost: 2805 ave 2855 max 2751 min
Histogram: 1 0 2 1 0 0 0 2 1 1
Neighs: 30026.5 ave 38700 max 24367 min
Histogram: 1 0 2 1 3 0 0 0 0 1
Total # of neighbors = 240212
Ave neighs/atom = 14.7632
Neighbor list builds = 501
Dangerous builds = 0
#undump 1
#undump 2
unfix 3
change_box all triclinic
triclinic box = (-5.0624 -5.0624 -5.0624) to (5.0624 5.0624 5.0624) with tilt (0 0 0)
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
fix 3 all deform 1 xy erate 0.05 units box remap v
run 40000
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 1.46014 0.436602
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 40 40 40
SRD grid size: request, actual (xyz) = 0.25, 0.25312 0.25312 0.25312
SRD per actual grid cell = -1.93929
SRD viscosity = -0.36972
big/SRD mass density ratio = -0.836253
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
# of rescaled SRD velocities = 1
ave/max small velocity = 16.0639 40
ave/max big velocity = 2.05735 6.73052
Memory usage per processor = 65.2471 Mbytes
Step 1 tsmall 2[9] Temp Press
10000 16.233245 1.0144194 0 0 146.27032
11000 17.301043 1.0619209 1 0 84.226323
12000 13.481177 1.063945 1 0 80.42834
13000 12.616615 1.0536125 1 0 68.365053
14000 12.16592 1.0581344 1 0 59.709941
15000 10.811557 1.0650453 1 0 59.869798
16000 9.9303081 1.0641012 1 0 59.289126
17000 10.452639 1.0589904 1 0 52.680235
18000 9.2488947 1.0556713 1 0 51.044123
19000 8.7179788 1.0566791 1 0 50.927924
20000 7.8641299 1.0668891 1 0 53.961014
21000 8.4333975 1.0628003 1 0 54.677068
22000 8.554623 1.0591872 1 0 51.784737
23000 7.895462 1.0598512 1 0 53.26885
24000 7.7014869 1.055569 1 0 54.236941
25000 7.508138 1.0581539 1 0 53.297709
26000 8.0707381 1.0586451 1 0 51.411341
27000 8.224223 1.0585509 1 0 52.775784
28000 8.8720461 1.0648837 1 0 49.681447
29000 8.503895 1.0538278 1 0 52.478556
30000 8.2272425 1.0625583 1 0 52.795709
31000 8.4626161 1.0599557 1 0 52.905343
32000 7.7410527 1.0587681 1 0 57.464472
33000 7.2765481 1.0677531 1 0 59.46728
34000 7.036016 1.0640728 1 0 60.636828
35000 8.497203 1.0577458 1 0 55.257312
36000 8.9218761 1.0585038 1 0 55.668201
37000 8.0469115 1.0561193 1 0 58.711565
38000 8.6456966 1.0663818 1 0 53.691658
39000 8.566667 1.0616928 1 0 52.866468
40000 7.7081259 1.0577046 1 0 54.105829
41000 7.4051952 1.0570277 1 0 56.094997
42000 7.331432 1.0632261 1 0 55.661067
43000 7.5587053 1.0602077 1 0 54.30762
44000 7.4521497 1.0594391 1 0 52.993548
45000 7.6234559 1.0641992 1 0 53.352202
46000 8.0659693 1.0609367 1 0 50.302682
47000 7.5227882 1.0563543 1 0 50.43551
48000 8.0798684 1.0628968 1 0 48.419201
49000 7.130784 1.0594143 1 0 50.656081
50000 7.3219268 1.0608236 1 0 54.808358
Loop time of 1651.84 on 8 procs for 40000 steps with 16271 atoms
Pair time (%) = 1232.76 (74.6296)
Neigh time (%) = 171.893 (10.4061)
Comm time (%) = 193.625 (11.7218)
Outpt time (%) = 0.00338289 (0.000204795)
Other time (%) = 53.5578 (3.24231)
Nlocal: 2033.88 ave 2229 max 1953 min
Histogram: 2 1 2 2 0 0 0 0 0 1
Nghost: 2757.88 ave 2810 max 2692 min
Histogram: 1 1 1 0 1 0 0 1 1 2
Neighs: 30098.6 ave 37369 max 25592 min
Histogram: 1 3 0 1 0 1 1 0 0 1
Total # of neighbors = 240789
Ave neighs/atom = 14.7987
Neighbor list builds = 2007
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation

View File

@ -23,7 +23,7 @@ class WavePacket;
///\en Template for v=der operation in \ref Wavepacket::int2phys_der()
template<class Type>
struct eq_second : public binary_function <Type, Type, Type> {
struct eq_second {
Type operator()(const Type& /* _Left */, const Type& _Right) const{
return _Right;
}
@ -31,7 +31,7 @@ struct eq_second : public binary_function <Type, Type, Type> {
///\en Template for v=-der operation in \ref Wavepacket::int2phys_der()
template<class Type>
struct eq_minus_second : public binary_function <Type, Type, Type> {
struct eq_minus_second {
Type operator()(const Type& /* _Left */, const Type& _Right) const{
return -_Right;
}

View File

@ -30,6 +30,7 @@ colvar::colvar()
after_restart = false;
kinetic_energy = 0.0;
potential_energy = 0.0;
period = 0.0;
#ifdef LEPTON
dev_null = 0.0;

View File

@ -301,9 +301,10 @@ __kernel void k_dpd_fast(const __global numtyp4 *restrict x_,
__local numtyp4 coeff[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
__local numtyp sp_lj[4];
__local numtyp sp_sqrt[4];
if (tid<4)
if (tid<4) {
sp_lj[tid]=sp_lj_in[tid];
sp_sqrt[tid]=sp_sqrt_in[tid];
}
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
coeff[tid]=coeff_in[tid];
}

View File

@ -31,8 +31,8 @@ checksums = { \
# help message
HELP = """
Syntax from src dir: make lib-smd args="-b"
or: make lib-smd args="-p /usr/include/eigen3"
Syntax from src dir: make lib-machdyn args="-b"
or: make lib-machdyn args="-p /usr/include/eigen3"
Syntax from lib dir: python Install.py -b
or: python Install.py -p /usr/include/eigen3"
@ -40,8 +40,8 @@ Syntax from lib dir: python Install.py -b
Example:
make lib-smd args="-b" # download/build in default lib/smd/eigen-eigen-*
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
make lib-machdyn args="-b" # download/build in default lib/machdyn/eigen-eigen-*
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
"""
pgroup = parser.add_mutually_exclusive_group()
@ -105,7 +105,7 @@ if buildflag:
edir = os.path.join(homepath, "eigen-%s" % version)
os.rename(edir, eigenpath)
# create link in lib/smd to Eigen src dir
# create link in lib/machdyn to Eigen src dir
print("Creating link to Eigen include folder")
if os.path.isfile("includelink") or os.path.islink("includelink"):

View File

@ -4,7 +4,7 @@ to use the MACHDYN package in a LAMMPS input script.
The Eigen library is available at http://eigen.tuxfamily.org. It's
a general C++ template library for linear algebra.
You can type "make lib-smd" from the src directory to see help on how
You can type "make lib-machdyn" from the src directory to see help on how
to download build this library via make commands, or you can do the
same thing by typing "python Install.py" from within this directory,
or you can do it manually by following the instructions below.
@ -12,13 +12,13 @@ or you can do it manually by following the instructions below.
Instructions:
1. Download the Eigen tarball at http://eigen.tuxfamily.org and
unpack the tarball either in this /lib/smd directory or somewhere
unpack the tarball either in this lib/machdyn directory or somewhere
else on your system. It should unpack with into a directory with
a name similar to eigen-eigen-bdd17ee3b1b3. You can rename
the directory to just "eigen" if you wish. Note that Eigen is a
template library, so you do not have to build it.
2. Create a soft link in this dir (lib/smd)
2. Create a soft link in this dir (lib/machdyn)
to the eigen directory. E.g if you unpacked Eigen in this dir:
% ln -s eigen-eigen-bdd17ee3b1b3 includelink
If you unpacked Eigen somewhere else and renamed

View File

@ -1,7 +1,14 @@
# Settings that the LAMMPS build will import when this package library is used
# See the README file for more explanation
python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :)
python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags --embed > /dev/null 2>&1 && python-config --ldflags --embed || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) )
python_SYSPATH =
ifeq ($(shell type python3 >/dev/null 2>&1; echo $$?), 0)
PYTHON=python3
PYTHONCONFIG = python3-config
else
PYTHONCONFIG = python-config
PYTHON=python
endif
python_SYSINC = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --includes || :)
python_SYSLIB = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed || (which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags || :) )
python_SYSPATH =

View File

@ -63,12 +63,16 @@ class numpy_wrapper:
.. note::
While the returned arrays of per-atom data are dimensioned
for the range [0:nmax] - as is the underlying storage -
the data is usually only valid for the range of [0:nlocal],
unless the property of interest is also updated for ghost
atoms. In some cases, this depends on a LAMMPS setting, see
for example :doc:`comm_modify vel yes <comm_modify>`.
The returned arrays of per-atom data are by default dimensioned
for the range [0:nlocal] since that data is *always* valid. The
underlying storage for the data, however, is typically allocated
for the range of [0:nmax]. Whether there is valid data in the range
[nlocal:nlocal+nghost] depends on whether the property of interest
is also updated for ghost atoms. This is not often the case. In
some cases, it depends on a LAMMPS setting, see for example
:doc:`comm_modify vel yes <comm_modify>`. By using the optional
*nelem* parameter the size of the returned NumPy can be overridden.
There is no check whether the number of elements chosen is valid.
:param name: name of the property
:type name: string

View File

@ -281,8 +281,8 @@ void DumpAtomADIOS::init_style()
auto nstreams = std::to_string(num_aggregators);
internal->io.SetParameters({{"substreams", nstreams}});
if (me == 0)
utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n", filename,
nstreams);
utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n",
filename, nstreams);
}
internal->io.DefineVariable<uint64_t>("ntimestep");
@ -325,6 +325,6 @@ void DumpAtomADIOS::init_style()
// it will be correctly defined at the moment of write
size_t UnknownSizeYet = 1;
internal->varAtoms = internal->io.DefineVariable<double>(
"atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns});
"atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns});
}
}

View File

@ -290,58 +290,60 @@ void DumpCustomADIOS::init_style()
/* Define the group of variables for the atom style here since it's a fixed
* set */
internal->io = internal->ad->DeclareIO(internal->ioName);
if (!internal->io.InConfigFile()) {
// if not defined by user, we can change the default settings
// BPFile is the default writer
internal->io.SetEngine("BPFile");
int num_aggregators = multiproc;
if (num_aggregators == 0) num_aggregators = 1;
auto nstreams = std::to_string(num_aggregators);
internal->io.SetParameters({{"substreams", nstreams}});
if (me == 0)
utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n", filename,
nstreams);
if (!internal->io) {
internal->io = internal->ad->DeclareIO(internal->ioName);
if (!internal->io.InConfigFile()) {
// if not defined by user, we can change the default settings
// BPFile is the default writer
internal->io.SetEngine("BPFile");
int num_aggregators = multiproc;
if (num_aggregators == 0) num_aggregators = 1;
auto nstreams = std::to_string(num_aggregators);
internal->io.SetParameters({{"substreams", nstreams}});
if (me == 0)
utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n",
filename, nstreams);
}
internal->io.DefineVariable<uint64_t>("ntimestep");
internal->io.DefineVariable<uint64_t>("natoms");
internal->io.DefineVariable<int>("nprocs");
internal->io.DefineVariable<int>("ncolumns");
internal->io.DefineVariable<double>("boxxlo");
internal->io.DefineVariable<double>("boxxhi");
internal->io.DefineVariable<double>("boxylo");
internal->io.DefineVariable<double>("boxyhi");
internal->io.DefineVariable<double>("boxzlo");
internal->io.DefineVariable<double>("boxzhi");
internal->io.DefineVariable<double>("boxxy");
internal->io.DefineVariable<double>("boxxz");
internal->io.DefineVariable<double>("boxyz");
internal->io.DefineAttribute<int>("triclinic", domain->triclinic);
int *boundaryptr = reinterpret_cast<int *>(domain->boundary);
internal->io.DefineAttribute<int>("boundary", boundaryptr, 6);
auto nColumns = static_cast<size_t>(size_one);
internal->io.DefineAttribute<std::string>("columns", internal->columnNames.data(), nColumns);
internal->io.DefineAttribute<std::string>("columnstr", columns);
internal->io.DefineAttribute<std::string>("boundarystr", boundstr);
internal->io.DefineAttribute<std::string>("LAMMPS/dump_style", "custom");
internal->io.DefineAttribute<std::string>("LAMMPS/version", lmp->version);
internal->io.DefineAttribute<std::string>("LAMMPS/num_ver", std::to_string(lmp->num_ver));
internal->io.DefineVariable<uint64_t>("nme",
{adios2::LocalValueDim}); // local dimension variable
internal->io.DefineVariable<uint64_t>("offset",
{adios2::LocalValueDim}); // local dimension variable
// atom table size is not known at the moment
// it will be correctly defined at the moment of write
size_t UnknownSizeYet = 1;
internal->varAtoms = internal->io.DefineVariable<double>(
"atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns});
}
internal->io.DefineVariable<uint64_t>("ntimestep");
internal->io.DefineVariable<uint64_t>("natoms");
internal->io.DefineVariable<int>("nprocs");
internal->io.DefineVariable<int>("ncolumns");
internal->io.DefineVariable<double>("boxxlo");
internal->io.DefineVariable<double>("boxxhi");
internal->io.DefineVariable<double>("boxylo");
internal->io.DefineVariable<double>("boxyhi");
internal->io.DefineVariable<double>("boxzlo");
internal->io.DefineVariable<double>("boxzhi");
internal->io.DefineVariable<double>("boxxy");
internal->io.DefineVariable<double>("boxxz");
internal->io.DefineVariable<double>("boxyz");
internal->io.DefineAttribute<int>("triclinic", domain->triclinic);
int *boundaryptr = reinterpret_cast<int *>(domain->boundary);
internal->io.DefineAttribute<int>("boundary", boundaryptr, 6);
auto nColumns = static_cast<size_t>(size_one);
internal->io.DefineAttribute<std::string>("columns", internal->columnNames.data(), nColumns);
internal->io.DefineAttribute<std::string>("columnstr", columns);
internal->io.DefineAttribute<std::string>("boundarystr", boundstr);
internal->io.DefineAttribute<std::string>("LAMMPS/dump_style", "custom");
internal->io.DefineAttribute<std::string>("LAMMPS/version", lmp->version);
internal->io.DefineAttribute<std::string>("LAMMPS/num_ver", std::to_string(lmp->num_ver));
internal->io.DefineVariable<uint64_t>("nme",
{adios2::LocalValueDim}); // local dimension variable
internal->io.DefineVariable<uint64_t>("offset",
{adios2::LocalValueDim}); // local dimension variable
// atom table size is not known at the moment
// it will be correctly defined at the moment of write
size_t UnknownSizeYet = 1;
internal->varAtoms = internal->io.DefineVariable<double>(
"atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns});
}

View File

@ -150,6 +150,7 @@ if (test $1 = "MOLECULE") then
depend GPU
depend KOKKOS
depend FEP
depend MESONT
depend OPENMP
depend INTEL
fi

View File

@ -980,9 +980,12 @@ void CommKokkos::borders()
} else {
atomKK->sync(Host,ALL_MASK);
k_sendlist.sync<LMPHostType>();
k_sendlist.modify<LMPHostType>();
atomKK->modified(Host,ALL_MASK); // needed here for atom map
int prev_auto_sync = lmp->kokkos->auto_sync;
lmp->kokkos->auto_sync = 1;
CommBrick::borders();
lmp->kokkos->auto_sync = prev_auto_sync;
k_sendlist.modify<LMPHostType>();
atomKK->modified(Host,ALL_MASK);
}
if (comm->nprocs == 1 && !ghost_velocity && !forward_comm_classic)

View File

@ -114,7 +114,7 @@
typedef cufftDoubleComplex FFT_DATA;
#endif
#elif defined(FFT_HIPFFT)
#include "hipfft.h"
#include <hipfft/hipfft.h>
#if defined(FFT_SINGLE)
#define hipfftExec hipfftExecC2C
#define HIPFFT_TYPE HIPFFT_C2C

View File

@ -1129,8 +1129,6 @@ void EwaldDisp::compute_energy_peratom()
/* ---------------------------------------------------------------------- */
#define swap(a, b) { register double t = a; a= b; b = t; }
void EwaldDisp::compute_virial()
{
memset(virial, 0, 6*sizeof(double));

View File

@ -1017,7 +1017,7 @@ void FixMDIQM::request_qm_energy()
// QM energy = <PE + <KE_ELEC or <ENERGY, depending on engine options
if (pe_exists && keelec_exists) {
int pe_energy, keelec_energy;
double pe_energy, keelec_energy;
ierr = MDI_Send_command("<PE", mdicomm);
if (ierr) error->all(FLERR, "MDI: <PE command");

View File

@ -1848,7 +1848,7 @@ void FixMDIQMMM::request_qm_energy()
// QM energy = <PE + <KE_ELEC or <ENERGY, depending on engine options
if (pe_exists && keelec_exists) {
int pe_energy, keelec_energy;
double pe_energy, keelec_energy;
ierr = MDI_Send_command("<PE", mdicomm);
if (ierr) error->all(FLERR, "MDI: <PE command");

40
src/MESONT/Install.sh Executable file
View File

@ -0,0 +1,40 @@
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
mode=$1
# enforce using portable C locale
LC_ALL=C
export LC_ALL
# arg1 = file, arg2 = file it depends on
action () {
if (test $mode = 0) then
rm -f ../$1
elif (! cmp -s $1 ../$1) then
if (test -z "$2" || test -e ../$2) then
cp $1 ..
if (test $mode = 2) then
echo " updating src/$1"
fi
fi
elif (test -n "$2") then
if (test ! -e ../$2) then
rm -f ../$1
fi
fi
}
# some styles in MESONT have base classes in MOLECULE
if (test $1 = 1) then
if (test ! -e ../bond_harmonic.cpp) then
echo "Must install MOLECULE package with MESONT"
exit 1
fi
fi
for file in *.cpp *.h; do
action ${file}
done

View File

@ -200,7 +200,7 @@ void PairHDNNP::coeff(int narg, char **arg)
emap = "";
for (int i = 2; i < narg; i++) {
if (strcmp(arg[i], "NULL") != 0) {
if (i != 2) emap += ",";
if (!emap.empty()) emap += ",";
emap += std::to_string(i - 1) + ":" + arg[i];
map[i - 1] = 1;
}

View File

@ -674,7 +674,7 @@ void FixSRD::pre_neighbor()
hi = nbin2z - 1;
}
for (iz = lo; iz < hi; iz++)
for (iz = lo; iz <= hi; iz++)
for (ix = 0; ix < nbin2x; ix++)
for (iy = 0; iy < nbin2y; iy++) {
ibin = iz * nbin2y * nbin2x + iy * nbin2x + ix;
@ -1423,6 +1423,7 @@ void FixSRD::collisions_multi()
tagint *tag = atom->tag;
int *mask = atom->mask;
int nlocal = atom->nlocal;
Big* bigfirst;
for (i = 0; i < nlocal; i++) {
if (!(mask[i] & groupbit)) continue;
@ -1432,6 +1433,7 @@ void FixSRD::collisions_multi()
ibounce = 0;
jlast = -1;
typefirst = -1;
dt = dt_big;
while (true) {
@ -1443,8 +1445,8 @@ void FixSRD::collisions_multi()
k = binbig[ibin][m];
big = &biglist[k];
j = big->index;
if (j == jlast) continue;
type = big->type;
if ((j == jlast) && (type == typefirst)) continue;
if (type == SPHERE)
inside = inside_sphere(x[i], x[j], big);
@ -1498,6 +1500,7 @@ void FixSRD::collisions_multi()
t_first = t_remain;
jfirst = j;
typefirst = type;
bigfirst = big;
xscollfirst[0] = xscoll[0];
xscollfirst[1] = xscoll[1];
xscollfirst[2] = xscoll[2];
@ -1514,6 +1517,7 @@ void FixSRD::collisions_multi()
if (t_first == 0.0) break;
j = jlast = jfirst;
type = typefirst;
big = bigfirst;
xscoll[0] = xscollfirst[0];
xscoll[1] = xscollfirst[1];
xscoll[2] = xscollfirst[2];
@ -2645,7 +2649,6 @@ void FixSRD::parameterize()
if (radius && radius[i] > 0.0) {
double r = radfactor * radius[i];
volbig += 4.0 / 3.0 * MY_PI * r * r * r;
;
} else if (ellipsoid && ellipsoid[i] >= 0) {
double *shape = ebonus[ellipsoid[i]].shape;
volbig += 4.0 / 3.0 * MY_PI * shape[0] * shape[1] * shape[2] * radfactor * radfactor *
@ -2658,7 +2661,7 @@ void FixSRD::parameterize()
MathExtra::sub3(c2, c1, c2mc1);
MathExtra::sub3(c3, c1, c3mc1);
MathExtra::cross3(c2mc1, c3mc1, cross);
volbig += 0.5 * MathExtra::len3(cross);
volbig += 0.5 * MathExtra::len3(cross) * WIDTH;
}
}
} else {

View File

@ -438,8 +438,8 @@ void ComputeGlobalAtom::compute_peratom()
}
}
}
++m;
}
++m;
}
/* ----------------------------------------------------------------------

View File

@ -358,7 +358,7 @@ void CreateAtoms::command(int narg, char **arg)
// lattice to box, but not consistent with other uses of units=lattice
// triclinic remapping occurs in add_single()
if ((style == BOX) || (style == REGION) || (style == MESH)) {
if ((style == BOX) || (style == REGION)) {
if (nbasis == 0) error->all(FLERR, "Cannot create atoms with undefined lattice");
} else if (scaleflag == 1) {
xone[0] *= domain->lattice->xlattice;
@ -1055,6 +1055,9 @@ void CreateAtoms::add_mesh(const char *filename)
throw TokenizerException("Invalid STL mesh file format", "");
line += 6;
if (utils::strmatch(line, "^binary"))
throw TokenizerException("Invalid STL mesh file format", "");
if (comm->me == 0)
utils::logmesg(lmp, "Reading STL object {} from text file {}\n", utils::trim(line), filename);
@ -1153,6 +1156,7 @@ void CreateAtoms::add_mesh(const char *filename)
utils::logmesg(lmp, " read {} triangles with {:.2f} atoms per triangle added in {} mode\n",
ntriangle, ratio, mesh_name[mesh_style]);
}
if (fp) fclose(fp);
}
/* ----------------------------------------------------------------------

View File

@ -929,6 +929,9 @@ void Image::compute_SSAO()
int pixelstart = static_cast<int> (1.0*me/nprocs * npixels);
int pixelstop = static_cast<int> (1.0*(me+1)/nprocs * npixels);
#if defined(_OPENMP)
#pragma omp parallel for
#endif
for (int index = pixelstart; index < pixelstop; index++) {
int x = index % width;
int y = index / width;
@ -1090,7 +1093,7 @@ void Image::write_PNG(FILE *fp)
}
png_init_io(png_ptr, fp);
png_set_compression_level(png_ptr,Z_BEST_COMPRESSION);
png_set_compression_level(png_ptr,Z_BEST_SPEED);
png_set_IHDR(png_ptr,info_ptr,width,height,8,PNG_COLOR_TYPE_RGB,
PNG_INTERLACE_NONE,PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT);
@ -1384,7 +1387,7 @@ double *Image::color2rgb(const char *color, int index)
{0/255.0, 0/255.0, 139/255.0},
{0/255.0, 139/255.0, 139/255.0},
{184/255.0, 134/255.0, 11/255.0},
{169/255.0, 169/255.0, 169/255.0},
{69/255.0, 69/255.0, 69/255.0},
{0/255.0, 100/255.0, 0/255.0},
{189/255.0, 183/255.0, 107/255.0},
{139/255.0, 0/255.0, 139/255.0},

View File

@ -786,6 +786,10 @@ argument string.
- Description of return value
- Data type
- Uses index
* - setup
- 1 if setup is not completed and thus thermo data invalid, 0 otherwise
- pointer to int
- no
* - step
- timestep when the last thermo output was generated or -1
- pointer to bigint
@ -824,7 +828,10 @@ void *lammps_last_thermo(void *handle, const char *what, int index)
BEGIN_CAPTURE
{
if (strcmp(what, "step") == 0) {
if (strcmp(what, "setup") == 0) {
val = (void *) &lmp->update->setupflag;
} else if (strcmp(what, "step") == 0) {
val = (void *) th->get_timestep();
} else if (strcmp(what, "num") == 0) {

View File

@ -831,9 +831,12 @@ void ReadRestart::header()
} else if (flag == ATOM_ID) {
atom->tag_enable = read_int();
} else if (flag == ATOM_MAP_STYLE) {
atom->map_style = read_int();
// we should be able to enable an atom map, even
// if the simulation in the restart didn't use one
int itmp = read_int();
if (atom->map_user == Atom::MAP_NONE) atom->map_style = itmp;
} else if (flag == ATOM_MAP_USER) {
atom->map_user = read_int();
read_int(); // ignored
} else if (flag == ATOM_SORTFREQ) {
atom->sortfreq = read_int();
} else if (flag == ATOM_SORTBIN) {

View File

@ -1 +1,2 @@
#define LAMMPS_VERSION "2 Aug 2023"
#define LAMMPS_UPDATE "Update 1"

View File

@ -16,15 +16,11 @@ chain: chain.o
micelle2d: micelle2d.o
ifort micelle2d.o -o micelle2d
thermo_extract: thermo_extract.o
gcc -g thermo_extract.o -o thermo_extract
stl_bin2txt: stl_bin2txt.o
g++ -g stl_bin2txt.o -o stl_bin2txt
clean:
rm binary2txt chain micelle2d
rm thermo_extract
rm *.o
#

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(lammps-gui VERSION 1.0.0 LANGUAGES CXX)
project(lammps-gui VERSION 1.2.4 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
@ -16,10 +16,6 @@ mark_as_advanced(LAMMPS_GUI_USE_PLUGIN)
if(NOT LAMMPS_EXCEPTIONS)
message(FATAL_ERROR "Must enable LAMMPS_EXCEPTIONS for building the LAMMPS GUI")
endif()
if(BUILD_MPI)
message(FATAL_ERROR "Must disable BUILD_MPI for building the LAMMPS GUI")
endif()
# when this file is included as subdirectory in the LAMMPS build, many settings are directly imported
if(LAMMPS_DIR)
set(LAMMPS_HEADER_DIR ${LAMMPS_SOURCE_DIR})
@ -60,12 +56,21 @@ endif()
set(LAMMPS_PLUGINLIB_DIR ${LAMMPS_DIR}/examples/COUPLE/plugin)
if(LAMMPS_GUI_USE_PLUGIN)
if(APPLE)
message(FATAL_ERROR "Dynamic loading of the LAMMPS library currently not supported on this platform")
endif()
enable_language(C)
set(PLUGIN_LOADER_SRC ${LAMMPS_PLUGINLIB_DIR}/liblammpsplugin.c)
endif()
# include resource compiler to embed icons into the executable on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
enable_language(RC)
set(ICON_RC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lmpicons.rc)
endif()
# we require Qt 5 and at least version 5.12 at that.
find_package(Qt5 5.12 REQUIRED COMPONENTS Widgets)
find_package(Qt5 5.12 REQUIRED COMPONENTS Widgets Charts)
set(PROJECT_SOURCES
main.cpp
@ -75,6 +80,8 @@ set(PROJECT_SOURCES
highlighter.h
imageviewer.cpp
imageviewer.h
chartviewer.cpp
chartviewer.h
lammpsgui.cpp
lammpsgui.h
lammpsgui.ui
@ -82,10 +89,15 @@ set(PROJECT_SOURCES
lammpswrapper.cpp
lammpswrapper.h
linenumberarea.h
logwindow.cpp
logwindow.h
preferences.cpp
preferences.h
setvariables.cpp
setvariables.h
stdcapture.cpp
${PLUGIN_LOADER_SRC}
${ICON_RC_FILE}
)
qt5_add_resources(PROJECT_SOURCES lammpsgui.qrc)
@ -110,7 +122,7 @@ else()
endif()
target_include_directories(lammps-gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(lammps-gui PRIVATE LAMMPS_GUI_VERSION="${PROJECT_VERSION}")
target_link_libraries(lammps-gui PRIVATE Qt5::Widgets)
target_link_libraries(lammps-gui PRIVATE Qt5::Widgets Qt5::Charts)
if(BUILD_OMP)
find_package(OpenMP COMPONENTS CXX REQUIRED)
target_link_libraries(lammps-gui PRIVATE OpenMP::OpenMP_CXX)
@ -172,8 +184,23 @@ elseif(MSVC)
get_filename_component(QT5_BIN_DIR "${Qt5Core_DIR}/../../../bin" ABSOLUTE)
get_filename_component(INSTNAME ${CMAKE_INSTALL_PREFIX} NAME)
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -D INSTNAME=${INSTNAME} -D VC_INIT=\"${VC_INIT}\" -D QT5_BIN_DIR=\"${QT5_BIN_DIR}\" -P \"${CMAKE_SOURCE_DIR}/packaging/build_windows_vs.cmake\" WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/..\" COMMAND_ECHO STDOUT)")
elseif((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
install(TARGETS lammps-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES $<TARGET_RUNTIME_DLLS:lammps-gui> TYPE BIN)
install(FILES $<TARGET_RUNTIME_DLLS:lammps> TYPE BIN)
install(FILES $<TARGET_RUNTIME_DLLS:lmp> TYPE BIN)
add_custom_target(zip
COMMAND sh -vx ${LAMMPS_DIR}/cmake/packaging/build_windows_cross_zip.sh ${CMAKE_INSTALL_PREFIX}
DEPENDS lmp lammps-gui
COMMENT "Create zip file with windows binaries"
BYPRODUCT LAMMPS-Win10-amd64.zip
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(TARGETS lammps-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lammps-gui.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lammps-input.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lammps-input.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/text/x-application-lammps.xml)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons/hicolor DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/)
install(CODE [[
file(GET_RUNTIME_DEPENDENCIES
LIBRARIES $<TARGET_FILE:lammps>

View File

@ -1,322 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 7.0.2, 2023-07-24T17:46:27. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{ed0d4570-2589-4771-8b12-00999b3e43be}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
<value type="bool" key="AutoTest.Framework.Boost">true</value>
<value type="bool" key="AutoTest.Framework.CTest">false</value>
<value type="bool" key="AutoTest.Framework.Catch">true</value>
<value type="bool" key="AutoTest.Framework.GTest">true</value>
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
</valuemap>
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
<value type="int" key="AutoTest.RunAfterBuild">0</value>
<value type="bool" key="AutoTest.UseGlobal">true</value>
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
<value type="QString" key="ClangCodeModel.WarningConfigId">Builtin.BuildSystem</value>
<valuemap type="QVariantMap" key="ClangTools">
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">2</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{287695d9-d112-4f65-92b5-675d1d6bc655}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="CMake.Build.Type">Debug</value>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/akohlmey/compile/lammps/tools/build-lammps-gui-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="CMake.Build.Type">Release</value>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/akohlmey/compile/lammps/tools/build-lammps-gui-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/akohlmey/compile/lammps/tools/build-lammps-gui-Desktop-RelWithDebInfo</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/akohlmey/compile/lammps/tools/build-lammps-gui-Desktop-MinSizeRel</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">clean</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">4</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">lammps-gui</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.lammps-gui</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">lammps-gui</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/akohlmey/compile/lammps/tools/build-lammps-gui-Desktop-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

Binary file not shown.

View File

@ -1,104 +1,14 @@
LAMMPS GUI
# Overview
LAMMPS GUI is essentially a small graphical text editor that is linked
to the LAMMPS library and thus can run LAMMPS using the contents of the
text buffer as input. This is similar to what people usually would do
using a text editor to edit the input and then a command line terminal
window to run the input commands. The main benefit is that this
integrates very well with graphical desktop environments and that it is
easier to use for beginners in running computations and thus very
suitable for tutorials on LAMMPS.
text buffer as input directly without requiring an additional LAMMPS
executable. It can also capture and show the screen output, a line graph
of thermodynamic data and snapshot images in separate windows.
# Features
The main window of the LAMMPS GUI is a text editor window with syntax
highlighting set up for LAMMPS input files. It can be used to edit any
kind of text file, but then trying to run those files will cause errors.
The output of a run is captured and displayed in a separate window
dialog. The log window is updated during the run and a progress bar for
each run command shown in the main window. Starting a new run will open
another log windows. After the simulation is finished, an image of the
simulated system can be created and shown in another window. Ongoing
runs can be stopped at the next iteration via triggering a timeout.
When opening a file, the editor will determine the directory where the
file resides and switch its current working directory to that folder.
Many LAMMPS inputs contain commands that read other files, typically
from the folder with the input file. The GUI will show the current
working directory. The editor window can also receive (entire) files
via drag-n-drop from a file manager GUI or a desktop environment.
Almost all commands are accessible via hotkeys. Which those hotkeys are,
is shown next to the entries in the menu. Log and image viewer windows
can be closed with CTRL-W (or Command-W on macOS). The "About LAMMPS"
dialog will show the LAMMPS version and the features included into the
LAMMPS library linked to the LAMMPS GUI.
Due to its nature as a graphical application, it is not possible to use
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading is
available.
# Prerequisites and portability
LAMMPS GUI is programmed using the Qt cross-platform GUI toolkit,
currently using Qt version 5.15LTS for better compatibility with older
compilers. It has been successfully compiled and tested on:
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36
# Compilation
The source for the LAMMPS GUI is included with the LAMMPS source code
distribution in the folder `tools/lammps-gui` and thus it can be can be
built as part of a regular LAMMPS compilation. Using CMake is required.
To enable its compilation the CMake variable `-D BUILD_LAMMPS_GUI=on`
must be set when creating the CMake configuration. All other settings
(compiler, flags, compile type) for LAMMPS GUI are then inherited from
the regular LAMMPS build. If the Qt library is packaged for Linux
distributions, then its location is typically auto-detected since the
required CMake configuration files are stored in a location where CMake
can find them without additional help. Otherwise, the location of the
Qt library installation must be indicated by setting `-D
Qt5_DIR=/path/to/qt5/lib/cmake/Qt5`, which is a path to a folder inside
the Qt installation that contains the file `Qt5Config.cmake`.
It is also possible to build the LAMMPS GUI as a standalone executable
(e.g. when LAMMPS has been compiled with traditional make), then the
CMake configuration needs to be told where to find the LAMMPS headers
and the LAMMPS library, via `-D LAMMPS_SOURCE_DIR=/path/to/lammps/src`.
CMake will try to guess a build folder with the LAMMPS library from that
path, but it can also be set with `-D LAMMPS_LIB_DIR=/path/to/lammps/lib`.
Rather than linking to the LAMMPS library during compilation, it is also
possible to compile the GUI with a plugin loader library that will load
the LAMMPS library at runtime during startup of the GUI from a shared
library; e.g. `liblammps.so` or `liblammps.dylib` or `liblammps.dll`
depending on the operating system. This has the advantage that the
LAMMPS library can be updated LAMMPS without having to recompile the
GUI. The ABI of the LAMMPS C-library interface is very stable and
generally backward compatible. This feature is enabled by setting
`-D LAMMPS_GUI_USE_PLUGIN=on` and then
`-D LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader`. Typically, this
would be the `examples/COUPLE/plugin` folder of the LAMMPS distribution.
# Platform notes
## macOS
When building on macOS, the build procedure will try to manufacture a
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg. To build multi-arch
executables that will run on both, arm64 and x86_64 architectures
natively, it is necessary to set the CMake variable
`-D CMAKE_OSX_ARCHITECTURES=arm64;x86_64`. To achieve wide compatibility
with different macOS versions, you can also set
`-D CMAKE_OSX_DEPLOYMENT_TARGET=11.0` which will set compatibility to macOS
11 (Big Sur) and later, even if you are compiling on a more recent macOS
version.
Detailed documentation about installing and using LAMMPS GUI is in
the LAMMPS manual.
--------
updated by Axel Kohlmeyer, 08/1023
updated by Axel Kohlmeyer, 2023-08-12

View File

@ -2,18 +2,20 @@ LAMMPS-GUI TODO list:
# Short term goals
- add CTRL-q hotkey to log windows so you can exit the entire application (add do you really want to? dialog to this)
- rewrite syntax highlighting to be line oriented instead of word oriented.
handle first part of line based on regular expressions, then advance and only highlight strings and numbers.
handle "&" continuation and multiline strings with """ like C style comments in Qt docs example
- add "syntax check" with enabled "-skiprun" flag
- add multi-tab settings dialog where certain properties can be set through customizing the LAMMPS command line
+ select Font
- add list of 5(?) most recently opened/saved files to file dialog (and also write to settings state on exit) (note: must store full path!)
- need to handle "label" and "jump" commands from within ?
- switch input file editor to read-only while loop is running
- triple quoted heredocs don't work with lammps_commands_string()
# Long term ideas
- rewrite entire application to build the App and its layout manually
- port to Qt6
- also a rewrite should establish consistent naming conventions. now we have a mix of LAMMPS style, Qt style, and others.
- add option to attach a debugger to the running program (highly non-portable, need customization support in preferences)
- write a "wizard" dialog that can be used for beginners to create an input file template for a few typical use scenarios
- use the "lammps_get_last_thermo" function to get access to thermodynamic data during a run and add plot/graph dialog that can plot one or more of those graphs while the simulation is still running
- possibly also implement a callback interface, so that external programs can be called after thermo data is updated.
- support single stepping, i.e. process input line by line (need to detect continuation chars!) with highlighting active line(s)
- have command text input file in/above status bar where individual commands can be tested. have insert button to copy line into file at the current point
- have command text input line in/above status bar where individual commands can be tested. have insert button to copy line into file at the current point
- support text completion as done with lammps-shell
- have context menu for known commands to offer retrieving help by dispatching URL to webbrowser (process index from sphinx for that purpose)
- add a "python" mode, where instead of launching LAMMPS, python is loaded that the LAMMPS python module is made available.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,248 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "chartviewer.h"
#include <QHBoxLayout>
#include <QLineSeries>
#include <QSettings>
#include <QVBoxLayout>
using namespace QtCharts;
ChartWindow::ChartWindow(const QString &_filename, QWidget *parent) :
QWidget(parent), menu(new QMenuBar), file(new QMenu("&File")), active_chart(-1),
filename(_filename)
{
auto *top = new QHBoxLayout;
menu->addMenu(file);
menu->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
columns = new QComboBox;
top->addWidget(menu);
top->addWidget(columns);
saveAsAct = file->addAction("&Save Graph As...", this, &ChartWindow::saveAs);
saveAsAct->setIcon(QIcon(":/document-save-as.png"));
exportCsvAct = file->addAction("&Export data to CSV...", this, &ChartWindow::exportCsv);
exportCsvAct->setIcon(QIcon(":/application-calc.png"));
exportDatAct = file->addAction("Export data to &Gnuplot...", this, &ChartWindow::exportDat);
exportDatAct->setIcon(QIcon(":/application-plot.png"));
file->addSeparator();
closeAct = file->addAction("&Close", this, &QWidget::close);
closeAct->setIcon(QIcon(":/window-close.png"));
auto *layout = new QVBoxLayout;
layout->addLayout(top);
setLayout(layout);
connect(columns, SIGNAL(currentIndexChanged(int)), this, SLOT(change_chart(int)));
QSettings settings;
resize(settings.value("chartx", 500).toInt(), settings.value("charty", 320).toInt());
}
int ChartWindow::get_step() const
{
if (charts.size() > 0) {
auto *v = charts[0];
return (int)v->get_step(v->get_count() - 1);
} else {
return -1;
}
}
void ChartWindow::reset_charts()
{
while (layout()->count() > 1) {
auto *item = layout()->takeAt(1);
if (item) {
layout()->removeItem(item);
delete item->widget();
delete item;
}
}
charts.clear();
columns->clear();
active_chart = 0;
}
void ChartWindow::add_chart(const QString &title, int index)
{
auto *chart = new ChartViewer(title, index);
layout()->addWidget(chart);
columns->addItem(title, index);
columns->show();
// hide all but the first chart added
if (charts.size() > 0) chart->hide();
charts.append(chart);
active_chart = 0;
}
void ChartWindow::add_data(int step, double data, int index)
{
for (auto &c : charts)
if (c->get_index() == index) c->add_data(step, data);
}
void ChartWindow::saveAs()
{
if (charts.empty() || (active_chart < 0)) return;
QString defaultname = filename + "." + columns->currentText() + ".png";
if (filename.isEmpty()) defaultname = columns->currentText() + ".png";
QString fileName = QFileDialog::getSaveFileName(this, "Save Chart as Image", defaultname,
"Image Files (*.jpg *.png *.bmp *.ppm)");
if (!fileName.isEmpty()) {
charts[active_chart]->grab().save(fileName);
}
}
void ChartWindow::exportDat()
{
if (charts.empty() || (active_chart < 0)) return;
QString defaultname = filename + ".dat";
if (filename.isEmpty()) defaultname = "lammpsdata.dat";
QString fileName = QFileDialog::getSaveFileName(this, "Save Chart as Gnuplot data", defaultname,
"Image Files (*.dat)");
if (!fileName.isEmpty()) {
QFile file(fileName);
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
file.write("# Thermodynamic data from ");
file.write(filename.toLocal8Bit());
file.write("\n# Columns:");
for (auto &c : charts) {
file.write(" ");
file.write(c->get_title());
}
file.write("\n");
int lines = charts[0]->get_count();
for (int i = 0; i < lines; ++i) {
// timestep
file.write(QString::number(charts[0]->get_step(i)).toLocal8Bit());
for (auto &c : charts) {
file.write(" ");
file.write(QString::number(c->get_data(i)).toLocal8Bit());
}
file.write("\n");
}
file.close();
}
}
}
void ChartWindow::exportCsv()
{
if (charts.empty() || (active_chart < 0)) return;
QString defaultname = filename + ".csv";
if (filename.isEmpty()) defaultname = "lammpsdata.csv";
QString fileName = QFileDialog::getSaveFileName(this, "Save Chart as CSV data", defaultname,
"Image Files (*.csv)");
if (!fileName.isEmpty()) {
QFile file(fileName);
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
file.write("Step");
for (auto &c : charts) {
file.write(",");
file.write(c->get_title());
}
file.write("\n");
int lines = charts[0]->get_count();
for (int i = 0; i < lines; ++i) {
// timestep
file.write(QString::number(charts[0]->get_step(i)).toLocal8Bit());
for (auto &c : charts) {
file.write(",");
file.write(QString::number(c->get_data(i)).toLocal8Bit());
}
file.write("\n");
}
file.close();
}
}
}
void ChartWindow::change_chart(int index)
{
int choice = columns->currentData().toInt();
for (auto &c : charts) {
if (choice == c->get_index())
c->show();
else
c->hide();
}
}
void ChartWindow::closeEvent(QCloseEvent *event)
{
QSettings settings;
if (!isMaximized()) {
settings.setValue("chartx", width());
settings.setValue("charty", height());
}
QWidget::closeEvent(event);
}
/* -------------------------------------------------------------------- */
ChartViewer::ChartViewer(const QString &title, int _index, QWidget *parent) :
QChartView(parent), last_step(-1), index(_index), chart(new QChart), series(new QLineSeries),
xaxis(new QValueAxis), yaxis(new QValueAxis)
{
chart->legend()->hide();
chart->addAxis(xaxis, Qt::AlignBottom);
chart->addAxis(yaxis, Qt::AlignLeft);
chart->addSeries(series);
series->attachAxis(xaxis);
series->attachAxis(yaxis);
xaxis->setTitleText("Time step");
xaxis->setTickCount(5);
xaxis->setLabelFormat("%d");
yaxis->setTickCount(5);
xaxis->setMinorTickCount(5);
yaxis->setMinorTickCount(5);
yaxis->setTitleText(title);
series->setName(title);
setRenderHint(QPainter::Antialiasing);
setChart(chart);
setRubberBand(QChartView::RectangleRubberBand);
}
/* -------------------------------------------------------------------- */
void ChartViewer::add_data(int step, double data)
{
if (last_step < step) {
last_step = step;
series->append(step, data);
auto points = series->pointsVector();
qreal xmin = 1.0e100;
qreal xmax = -1.0e100;
qreal ymin = 1.0e100;
qreal ymax = -1.0e100;
for (auto &p : points) {
xmin = qMin(xmin, p.x());
xmax = qMax(xmax, p.x());
ymin = qMin(ymin, p.y());
ymax = qMax(ymax, p.y());
}
xaxis->setRange(xmin, xmax);
yaxis->setRange(ymin, ymax);
}
}
// Local Variables:
// c-basic-offset: 4
// End:

View File

@ -0,0 +1,94 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifndef CHARTVIEWER_H
#define CHARTVIEWER_H
#include <QList>
#include <QString>
#include <QWidget>
#include <QtCharts>
class QAction;
class QMenuBar;
class QMenu;
class QComboBox;
class ChartViewer;
class ChartWindow : public QWidget {
Q_OBJECT
public:
ChartWindow(const QString &filename, QWidget *parent = nullptr);
int num_charts() const { return charts.size(); }
bool has_title(const QString &title, int index) const
{
return (columns->itemText(index) == title);
}
int get_step() const;
void reset_charts();
void add_chart(const QString &title, int index);
void add_data(int step, double data, int index);
private slots:
void saveAs();
void exportDat();
void exportCsv();
void change_chart(int index);
protected:
void closeEvent(QCloseEvent *event) override;
private:
QMenuBar *menu;
QMenu *file;
QComboBox *columns;
QAction *saveAsAct;
QAction *exportCsvAct;
QAction *exportDatAct;
QAction *closeAct;
QString filename;
int active_chart;
QList<ChartViewer *> charts;
};
/* -------------------------------------------------------------------- */
class ChartViewer : public QtCharts::QChartView {
Q_OBJECT
public:
explicit ChartViewer(const QString &title, int index, QWidget *parent = nullptr);
void add_data(int step, double data);
int get_index() const { return index; };
int get_count() const { return series->count(); }
const char *get_title() const { return series->name().toLocal8Bit(); }
double get_step(int index) const { return series->at(index).x(); }
double get_data(int index) const { return series->at(index).y(); }
private:
int last_step, index;
QtCharts::QChart *chart;
QtCharts::QLineSeries *series;
QtCharts::QValueAxis *xaxis;
QtCharts::QValueAxis *yaxis;
};
#endif
// Local Variables:
// c-basic-offset: 4
// End:

View File

@ -15,20 +15,63 @@
#include "lammpsgui.h"
#include "linenumberarea.h"
#include <QAction>
#include <QDesktopServices>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QIcon>
#include <QKeySequence>
#include <QMenu>
#include <QMimeData>
#include <QPainter>
#include <QRegularExpression>
#include <QTextBlock>
#include <QUrl>
CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent)
{
lineNumberArea = new LineNumberArea(this);
help_action = new QShortcut(QKeySequence::fromString("Ctrl+?"), parent);
connect(help_action, &QShortcut::activated, this, &CodeEditor::get_help);
// initialize help system
QFile help_index(":/help_index.table");
if (help_index.open(QIODevice::ReadOnly | QIODevice::Text)) {
while (!help_index.atEnd()) {
auto line = QString(help_index.readLine());
auto words = line.trimmed().split(' ');
if (words.size() > 2) {
if (words.at(1) == "pair_style") {
pair_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "bond_style") {
bond_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "angle_style") {
angle_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "dihedral_style") {
dihedral_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "improper_style") {
improper_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "fix") {
fix_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "compute") {
compute_map[words.at(2)] = words.at(0);
} else if (words.at(1) == "kspace_style") {
cmd_map["kspace_style"] = "kspace_style.html";
}
// ignoring: dump, fix_modify ATC
} else if (words.size() == 2) {
cmd_map[words.at(1)] = words.at(0);
} else {
fprintf(stderr, "unhandled: %s", line.toStdString().c_str());
}
}
help_index.close();
}
lineNumberArea = new LineNumberArea(this);
connect(this, &CodeEditor::blockCountChanged, this, &CodeEditor::updateLineNumberAreaWidth);
connect(this, &CodeEditor::updateRequest, this, &CodeEditor::updateLineNumberArea);
updateLineNumberAreaWidth(0);
setCursorWidth(2);
}
int CodeEditor::lineNumberAreaWidth()
@ -74,7 +117,7 @@ void CodeEditor::dropEvent(QDropEvent *event)
{
if (event->mimeData()->hasUrls()) {
event->accept();
auto file = event->mimeData()->urls()[0].url().remove("file://");
auto file = event->mimeData()->urls()[0].toLocalFile();
auto gui = dynamic_cast<LammpsGui *>(parent());
if (gui) {
moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
@ -138,6 +181,102 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
}
}
void CodeEditor::contextMenuEvent(QContextMenuEvent *event)
{
// reposition the cursor here?
QString page, help;
find_help(page, help);
// print augmented context menu if an entry was found
auto *menu = createStandardContextMenu();
if (!page.isEmpty()) {
menu->addSeparator();
auto action = menu->addAction(QString("View Documentation for '%1'").arg(help));
action->setIcon(QIcon(":/system-help.png"));
action->setData(page);
connect(action, &QAction::triggered, this, &CodeEditor::open_help);
// if we link to help with specific styles (fix, compute, pair, bond, ...)
// also link to the docs for the primary command
auto words = help.split(' ');
if (words.size() > 1) {
help = words.at(0);
page = words.at(0);
page += ".html";
auto action2 = menu->addAction(QString("View Documentation for '%1'").arg(help));
action2->setIcon(QIcon(":/system-help.png"));
action2->setData(page);
connect(action2, &QAction::triggered, this, &CodeEditor::open_help);
}
}
auto action3 = menu->addAction(QString("LAMMPS Manual"));
action3->setIcon(QIcon(":/help-browser.png"));
action3->setData(QString());
connect(action3, &QAction::triggered, this, &CodeEditor::open_help);
menu->exec(event->globalPos());
delete menu;
}
void CodeEditor::get_help()
{
QString page, help;
find_help(page, help);
if (!page.isEmpty())
QDesktopServices::openUrl(QUrl(QString("https://docs.lammps.org/%1").arg(page)));
}
void CodeEditor::find_help(QString &page, QString &help)
{
// process line of text where the cursor is
auto text = textCursor().block().text().replace('\t', ' ').trimmed();
auto style =
QRegularExpression("^(pair|bond|angle|dihedral|improper)_style\\s+(\\S+)").match(text);
help.clear();
page.clear();
if (style.hasMatch()) {
if (style.captured(1) == "pair") {
page = pair_map.value(style.captured(2), QString());
help = QString("pair_style %1").arg(style.captured(2));
} else if (style.captured(1) == "bond") {
page = bond_map.value(style.captured(2), QString());
help = QString("bond_style %1").arg(style.captured(2));
} else if (style.captured(1) == "angle") {
page = angle_map.value(style.captured(2), QString());
help = QString("angle_style %1").arg(style.captured(2));
} else if (style.captured(1) == "dihedral") {
page = dihedral_map.value(style.captured(2), QString());
help = QString("dihedral_style %1").arg(style.captured(2));
} else if (style.captured(1) == "improper") {
page = improper_map.value(style.captured(2), QString());
help = QString("improper_style %1").arg(style.captured(2));
}
}
style = QRegularExpression("^(fix|compute)\\s+\\w+\\s+\\w+\\s+(\\S+)").match(text);
if (style.hasMatch()) {
help = QString("%1 %2").arg(style.captured(1), style.captured(2));
if (style.captured(1) == "fix") {
page = fix_map.value(style.captured(2), QString());
} else if (style.captured(1) == "compute") {
page = compute_map.value(style.captured(2), QString());
}
}
// could not find a matching "style", now try the plain command
if (page.isEmpty() && !text.isEmpty()) {
auto cmd = text.split(' ').at(0);
help = cmd;
page = cmd_map.value(cmd, QString());
}
}
void CodeEditor::open_help()
{
QAction *act = qobject_cast<QAction *>(sender());
QDesktopServices::openUrl(
QUrl(QString("https://docs.lammps.org/%1").arg(act->data().toString())));
}
// Local Variables:
// c-basic-offset: 4
// End:

View File

@ -14,7 +14,10 @@
#ifndef CODEEDITOR_H
#define CODEEDITOR_H
#include <QMap>
#include <QPlainTextEdit>
#include <QShortcut>
#include <QString>
class CodeEditor : public QPlainTextEdit {
Q_OBJECT
@ -30,14 +33,29 @@ protected:
void dragEnterEvent(QDragEnterEvent *event) override;
bool canInsertFromMimeData(const QMimeData *source) const override;
void dropEvent(QDropEvent *event) override;
void contextMenuEvent(QContextMenuEvent *event) override;
private slots:
void updateLineNumberAreaWidth(int newBlockCount);
void highlightCurrentLine();
void updateLineNumberArea(const QRect &rect, int dy);
void get_help();
void find_help(QString &page, QString &help);
void open_help();
private:
QWidget *lineNumberArea;
QShortcut *help_action;
QMap<QString, QString> cmd_map;
QMap<QString, QString> fix_map;
QMap<QString, QString> compute_map;
QMap<QString, QString> pair_map;
QMap<QString, QString> bond_map;
QMap<QString, QString> angle_map;
QMap<QString, QString> dihedral_map;
QMap<QString, QString> improper_map;
QMap<QString, QString> dump_map;
};
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
tools/lammps-gui/hd-img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because it is too large Load Diff

View File

@ -18,18 +18,23 @@ Highlighter::Highlighter(QTextDocument *parent) : QSyntaxHighlighter(parent)
HighlightingRule rule;
outputFormat.setForeground(Qt::darkYellow);
outputFormat.setFontWeight(QFont::Bold);
readFormat.setForeground(Qt::magenta);
readFormat.setFontWeight(QFont::Bold);
latticeFormat.setForeground(Qt::darkGreen);
latticeFormat.setFontWeight(QFont::Bold);
particleFormat.setForeground(Qt::darkRed);
particleFormat.setFontWeight(QFont::Bold);
setupFormat.setForeground(Qt::darkCyan);
runFormat.setForeground(Qt::green);
setupFormat.setFontWeight(QFont::Bold);
runFormat.setForeground(Qt::darkBlue);
runFormat.setFontWeight(QFont::Bold);
defineFormat.setForeground(Qt::darkMagenta);
defineFormat.setFontWeight(QFont::Bold);
numberFormat.setForeground(Qt::blue);
commentFormat.setForeground(Qt::red);
stringFormat.setForeground(Qt::cyan);
stringFormat.setForeground(Qt::darkGreen);
stringFormat.setFontWeight(QFont::Normal);
const QString output_keywords[] = {
@ -178,7 +183,7 @@ Highlighter::Highlighter(QTextDocument *parent) : QSyntaxHighlighter(parent)
}
const QString number_keywords[] = {
QStringLiteral("(^|\\s+)[0-9]+"), // integer
QStringLiteral("(^|\\s+)[0-9:*]+"), // integer and integer ranges
QStringLiteral("(^|\\s+)[0-9]+\\.[0-9]*[edED]?[-+]?[0-9]*"), // floating point 1
QStringLiteral("(^|\\s+)[0-9]*\\.[0-9]+[edED]?[-+]?[0-9]*"), // floating point 2
QStringLiteral("(^|\\s+)[0-9]+([edED][-+]?[0-9]+)?") // floating point 3
@ -202,11 +207,46 @@ Highlighter::Highlighter(QTextDocument *parent) : QSyntaxHighlighter(parent)
void Highlighter::highlightBlock(const QString &text)
{
// clang-format off
auto style = QRegularExpression("^(fix|compute|dump|set)\\s+(\\w+)\\s+(\\S+)\\s+(\\S+)").match(text);
auto force = QRegularExpression("^(atom_style|pair_style|bond_style|angle_style|dihedral_style|improper_style|kspace_style)\\s+(\\S+)").match(text);
auto defs = QRegularExpression("^(group|variable)\\s+(\\S+)\\s+(\\S+)").match(text);
auto undo = QRegularExpression("^(unfix|uncompute|undump)\\s+(\\w+)").match(text);
// clang-format on
bool do_style = true;
bool do_force = true;
bool do_defs = true;
bool do_undo = true;
for (const HighlightingRule &rule : qAsConst(highlightingRules)) {
QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text);
while (matchIterator.hasNext()) {
QRegularExpressionMatch match = matchIterator.next();
setFormat(match.capturedStart(), match.capturedLength(), rule.format);
// special treatment for fix/compute/dump styles etc.
if (style.hasMatch() && do_style) {
setFormat(style.capturedStart(1), style.capturedLength(1), defineFormat);
setFormat(style.capturedStart(2), style.capturedLength(2), numberFormat);
setFormat(style.capturedStart(3), style.capturedLength(3), stringFormat);
setFormat(style.capturedStart(4), style.capturedLength(4), runFormat);
do_style = false;
// special treatment for force styles styles
} else if (force.hasMatch() && do_force) {
setFormat(force.capturedStart(1), force.capturedLength(1), particleFormat);
setFormat(force.capturedStart(2), force.capturedLength(2), runFormat);
do_force = false;
// special treatment for undo commands
} else if (undo.hasMatch() && do_undo) {
setFormat(undo.capturedStart(1), undo.capturedLength(1), defineFormat);
setFormat(undo.capturedStart(2), undo.capturedLength(2), stringFormat);
do_undo = false;
// special treatment for some definitions
} else if (defs.hasMatch() && do_defs) {
setFormat(defs.capturedStart(1), defs.capturedLength(1), particleFormat);
setFormat(defs.capturedStart(2), defs.capturedLength(2), stringFormat);
setFormat(defs.capturedStart(3), defs.capturedLength(3), runFormat);
do_defs = false;
} else {
setFormat(match.capturedStart(), match.capturedLength(), rule.format);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

View File

@ -12,6 +12,7 @@
------------------------------------------------------------------------- */
#include "imageviewer.h"
#include "lammpswrapper.h"
#include <QAction>
#include <QDialogButtonBox>
@ -21,19 +22,43 @@
#include <QImage>
#include <QImageReader>
#include <QLabel>
#include <QLineEdit>
#include <QMenuBar>
#include <QMessageBox>
#include <QPalette>
#include <QPoint>
#include <QPushButton>
#include <QScreen>
#include <QScrollArea>
#include <QScrollBar>
#include <QSettings>
#include <QSpinBox>
#include <QStatusBar>
#include <QVBoxLayout>
#include <QWheelEvent>
#include <QWidgetAction>
ImageViewer::ImageViewer(const QString &fileName, QWidget *parent) :
QDialog(parent), imageLabel(new QLabel), scrollArea(new QScrollArea), menuBar(new QMenuBar)
#include <cmath>
extern "C" {
#include "periodic_table.h"
static int get_pte_from_mass(double mass)
{
int idx = 0;
for (int i = 0; i < nr_pte_entries; ++i)
if (fabs(mass - pte_mass[i]) < 0.65) idx = i;
if ((mass > 0.0) && (mass < 2.2)) idx = 1;
// discriminate between Cobalt and Nickel. The loop will detect Nickel
if ((mass < 61.24) && (mass > 58.8133)) idx = 27;
return idx;
}
}
static const QString blank(" ");
ImageViewer::ImageViewer(const QString &fileName, LammpsWrapper *_lammps, QWidget *parent) :
QDialog(parent), imageLabel(new QLabel), scrollArea(new QScrollArea), menuBar(new QMenuBar),
lammps(_lammps), group("all"), filename(fileName), useelements(false)
{
imageLabel->setBackgroundRole(QPalette::Base);
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
@ -42,8 +67,6 @@ ImageViewer::ImageViewer(const QString &fileName, QWidget *parent) :
scrollArea->setBackgroundRole(QPalette::Dark);
scrollArea->setWidget(imageLabel);
scrollArea->setMouseTracking(true);
scrollArea->installEventFilter(this);
scrollArea->setVisible(false);
buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
@ -52,23 +75,134 @@ ImageViewer::ImageViewer(const QString &fileName, QWidget *parent) :
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(menuBar);
QSettings settings;
vdwfactor = 0.5;
auto pix = QPixmap(":/emblem-photos.png");
auto *renderstatus = new QLabel(QString());
renderstatus->setPixmap(pix.scaled(22, 22, Qt::KeepAspectRatio));
renderstatus->setEnabled(false);
renderstatus->setToolTip("Render status");
renderstatus->setObjectName("renderstatus");
settings.beginGroup("snapshot");
auto *xval = new QSpinBox;
xval->setRange(100, 10000);
xval->setStepType(QAbstractSpinBox::AdaptiveDecimalStepType);
xval->setValue(settings.value("xsize", "800").toInt());
xval->setObjectName("xsize");
xval->setToolTip("Set rendered image width");
auto *yval = new QSpinBox;
yval->setRange(100, 10000);
yval->setStepType(QAbstractSpinBox::AdaptiveDecimalStepType);
yval->setValue(settings.value("ysize", "600").toInt());
yval->setObjectName("ysize");
yval->setToolTip("Set rendered image height");
settings.endGroup();
connect(xval, &QAbstractSpinBox::editingFinished, this, &ImageViewer::edit_size);
connect(yval, &QAbstractSpinBox::editingFinished, this, &ImageViewer::edit_size);
auto *dummy = new QPushButton(QIcon(), "");
dummy->hide();
auto *dossao = new QPushButton(QIcon(":/hd-img.png"), "");
dossao->setCheckable(true);
dossao->setToolTip("Toggle SSAO rendering");
dossao->setObjectName("ssao");
auto *doanti = new QPushButton(QIcon(":/antialias.png"), "");
doanti->setCheckable(true);
doanti->setToolTip("Toggle anti-aliasing");
doanti->setObjectName("antialias");
auto *dovdw = new QPushButton(QIcon(":/vdw-style.png"), "");
dovdw->setCheckable(true);
dovdw->setToolTip("Toggle VDW style representation");
dovdw->setObjectName("vdw");
auto *dobox = new QPushButton(QIcon(":/system-box.png"), "");
dobox->setCheckable(true);
dobox->setToolTip("Toggle displaying box");
dobox->setObjectName("box");
auto *doaxes = new QPushButton(QIcon(":/axes-img.png"), "");
doaxes->setCheckable(true);
doaxes->setToolTip("Toggle displaying axes");
doaxes->setObjectName("axes");
auto *zoomin = new QPushButton(QIcon(":/gtk-zoom-in.png"), "");
zoomin->setToolTip("Zoom in by 10 percent");
auto *zoomout = new QPushButton(QIcon(":/gtk-zoom-out.png"), "");
zoomout->setToolTip("Zoom out by 10 percent");
auto *rotleft = new QPushButton(QIcon(":/object-rotate-left.png"), "");
rotleft->setToolTip("Rotate left by 15 degrees");
auto *rotright = new QPushButton(QIcon(":/object-rotate-right.png"), "");
rotright->setToolTip("Rotate right by 15 degrees");
auto *rotup = new QPushButton(QIcon(":/gtk-go-up.png"), "");
rotup->setToolTip("Rotate up by 15 degrees");
auto *rotdown = new QPushButton(QIcon(":/gtk-go-down.png"), "");
rotdown->setToolTip("Rotate down by 15 degrees");
auto *reset = new QPushButton(QIcon(":/gtk-zoom-fit.png"), "");
reset->setToolTip("Reset view to defaults");
auto *combo = new QComboBox;
combo->setObjectName("group");
combo->setToolTip("Select group to display");
combo->setObjectName("group");
int ngroup = lammps->id_count("group");
char gname[64];
for (int i = 0; i < ngroup; ++i) {
lammps->id_name("group", i, gname, 64);
combo->addItem(gname);
}
QHBoxLayout *menuLayout = new QHBoxLayout;
menuLayout->addWidget(menuBar);
menuLayout->addWidget(renderstatus);
menuLayout->addWidget(new QLabel(" Width: "));
menuLayout->addWidget(xval);
menuLayout->addWidget(new QLabel(" Height: "));
menuLayout->addWidget(yval);
menuLayout->addWidget(dummy);
menuLayout->addWidget(dossao);
menuLayout->addWidget(doanti);
menuLayout->addWidget(dovdw);
menuLayout->addWidget(dobox);
menuLayout->addWidget(doaxes);
menuLayout->addWidget(zoomin);
menuLayout->addWidget(zoomout);
menuLayout->addWidget(rotleft);
menuLayout->addWidget(rotright);
menuLayout->addWidget(rotup);
menuLayout->addWidget(rotdown);
menuLayout->addWidget(reset);
menuLayout->addWidget(new QLabel(" Group: "));
menuLayout->addWidget(combo);
connect(dossao, &QPushButton::released, this, &ImageViewer::toggle_ssao);
connect(doanti, &QPushButton::released, this, &ImageViewer::toggle_anti);
connect(dovdw, &QPushButton::released, this, &ImageViewer::toggle_vdw);
connect(dobox, &QPushButton::released, this, &ImageViewer::toggle_box);
connect(doaxes, &QPushButton::released, this, &ImageViewer::toggle_axes);
connect(zoomin, &QPushButton::released, this, &ImageViewer::do_zoom_in);
connect(zoomout, &QPushButton::released, this, &ImageViewer::do_zoom_out);
connect(rotleft, &QPushButton::released, this, &ImageViewer::do_rot_left);
connect(rotright, &QPushButton::released, this, &ImageViewer::do_rot_right);
connect(rotup, &QPushButton::released, this, &ImageViewer::do_rot_up);
connect(rotdown, &QPushButton::released, this, &ImageViewer::do_rot_down);
connect(reset, &QPushButton::released, this, &ImageViewer::reset_view);
connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(change_group(int)));
mainLayout->addLayout(menuLayout);
mainLayout->addWidget(scrollArea);
mainLayout->addWidget(buttonBox);
setWindowTitle(QString("Image Viewer: ") + QFileInfo(fileName).completeBaseName());
setWindowTitle(QString("Image Viewer: ") + QFileInfo(fileName).fileName());
createActions();
QImageReader reader(fileName);
reader.setAutoTransform(true);
const QImage newImage = reader.read();
if (newImage.isNull()) {
QMessageBox::warning(this, QGuiApplication::applicationDisplayName(),
tr("Cannot load %1: %2").arg(fileName, reader.errorString()));
return;
}
image = newImage;
imageLabel->setPixmap(QPixmap::fromImage(image));
reset_view();
// layout has not yet be established, so we need to fix up some pushbutton
// properties directly since lookup in reset_view() will have failed
dobox->setChecked(showbox);
dovdw->setChecked(vdwfactor > 1.0);
dovdw->setEnabled(useelements);
doaxes->setChecked(showaxes);
dossao->setChecked(usessao);
doanti->setChecked(antialias);
scaleFactor = 1.0;
resize(image.width() + 20, image.height() + 50);
@ -79,6 +213,248 @@ ImageViewer::ImageViewer(const QString &fileName, QWidget *parent) :
setLayout(mainLayout);
}
void ImageViewer::reset_view()
{
QSettings settings;
settings.beginGroup("snapshot");
xsize = settings.value("xsize", "800").toInt();
ysize = settings.value("ysize", "600").toInt();
zoom = settings.value("zoom", 1.0).toDouble();
hrot = settings.value("hrot", 60).toInt();
vrot = settings.value("vrot", 30).toInt();
vdwfactor = settings.value("vdwstyle", false).toBool() ? 1.6 : 0.5;
showbox = settings.value("box", true).toBool();
showaxes = settings.value("axes", false).toBool();
usessao = settings.value("ssao", false).toBool();
antialias = settings.value("antialias", false).toBool();
settings.endGroup();
// reset state of checkable push buttons and combo box (if accessible)
auto *field = findChild<QSpinBox *>("xsize");
if (field) field->setValue(xsize);
field = findChild<QSpinBox *>("ysize");
if (field) field->setValue(ysize);
auto *button = findChild<QPushButton *>("ssao");
if (button) button->setChecked(usessao);
button = findChild<QPushButton *>("antialias");
if (button) button->setChecked(antialias);
button = findChild<QPushButton *>("vdw");
if (button) button->setChecked(vdwfactor > 1.0);
button = findChild<QPushButton *>("box");
if (button) button->setChecked(showbox);
button = findChild<QPushButton *>("axes");
if (button) button->setChecked(showaxes);
auto *cb = findChild<QComboBox *>("combo");
if (cb) cb->setCurrentText("all");
createImage();
}
void ImageViewer::edit_size()
{
QSpinBox *field = qobject_cast<QSpinBox *>(sender());
if (field->objectName() == "xsize") {
xsize = field->value();
} else if (field->objectName() == "ysize") {
ysize = field->value();
}
createImage();
}
void ImageViewer::toggle_ssao()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
usessao = !usessao;
button->setChecked(usessao);
createImage();
}
void ImageViewer::toggle_anti()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
antialias = !antialias;
button->setChecked(antialias);
createImage();
}
void ImageViewer::toggle_vdw()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
if (vdwfactor > 1.0)
vdwfactor = 0.5;
else
vdwfactor = 1.6;
button->setChecked(vdwfactor > 1.0);
createImage();
}
void ImageViewer::toggle_box()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
showbox = !showbox;
button->setChecked(showbox);
createImage();
}
void ImageViewer::toggle_axes()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
showaxes = !showaxes;
button->setChecked(showaxes);
createImage();
}
void ImageViewer::do_zoom_in()
{
zoom = zoom * 1.1;
if (zoom > 5.0) zoom = 5.0;
createImage();
}
void ImageViewer::do_zoom_out()
{
zoom = zoom / 1.1;
if (zoom < 0.5) zoom = 0.5;
createImage();
}
void ImageViewer::do_rot_left()
{
vrot -= 10;
if (vrot < -180) vrot += 360;
createImage();
}
void ImageViewer::do_rot_right()
{
vrot += 10;
if (vrot > 180) vrot -= 360;
createImage();
}
void ImageViewer::do_rot_down()
{
hrot -= 10;
if (hrot < 0) hrot += 360;
createImage();
}
void ImageViewer::do_rot_up()
{
hrot += 10;
if (hrot > 360) hrot -= 360;
createImage();
}
void ImageViewer::change_group(int idx)
{
QComboBox *box = findChild<QComboBox *>("group");
if (box) group = box->currentText();
createImage();
}
void ImageViewer::createImage()
{
QLabel *renderstatus = findChild<QLabel *>("renderstatus");
if (renderstatus) renderstatus->setEnabled(true);
repaint();
QSettings settings;
QString dumpcmd = QString("write_dump ") + group + " image ";
QDir dumpdir(QDir::tempPath());
QFile dumpfile(dumpdir.absoluteFilePath(filename + ".ppm"));
dumpcmd += "'" + dumpfile.fileName() + "'";
settings.beginGroup("snapshot");
int aa = antialias ? 2 : 1;
int tmpxsize = xsize * aa;
int tmpysize = ysize * aa;
int hhrot = (hrot > 180) ? 360 - hrot : hrot;
// determine elements from masses and set their covalent radii
int ntypes = lammps->extract_setting("ntypes");
int nbondtypes = lammps->extract_setting("nbondtypes");
double *masses = (double *)lammps->extract_atom("mass");
QString units = (const char *)lammps->extract_global("units");
QString elements = "element ";
QString adiams;
useelements = false;
if ((units == "real") || (units == "metal")) {
useelements = true;
for (int i = 1; i <= ntypes; ++i) {
int idx = get_pte_from_mass(masses[i]);
if (idx == 0) useelements = false;
elements += QString(pte_label[idx]) + blank;
adiams += QString("adiam %1 %2 ").arg(i).arg(vdwfactor * pte_vdw_radius[idx]);
}
}
// adjust pushbutton state and clear adiams string to disable VDW display, if needed
if (useelements) {
auto *button = findChild<QPushButton *>("vdw");
if (button) button->setEnabled(true);
} else {
adiams.clear();
auto *button = findChild<QPushButton *>("vdw");
if (button) button->setEnabled(false);
}
if (!adiams.isEmpty())
dumpcmd += blank + "element";
else
dumpcmd += blank + settings.value("color", "type").toString();
dumpcmd += blank + settings.value("diameter", "type").toString();
dumpcmd += QString(" size ") + QString::number(tmpxsize) + blank + QString::number(tmpysize);
dumpcmd += QString(" zoom ") + QString::number(zoom);
dumpcmd += " shiny 0.5 ";
if (nbondtypes > 0) {
if (vdwfactor > 1.0)
dumpcmd += " bond none none ";
else
dumpcmd += " bond atom 0.5 ";
}
if (lammps->extract_setting("dimension") == 3) {
dumpcmd += QString(" view ") + QString::number(hhrot) + blank + QString::number(vrot);
}
if (usessao) dumpcmd += QString(" ssao yes 453983 0.75");
if (showbox)
dumpcmd += QString(" box yes 0.025");
else
dumpcmd += QString(" box no 0.0");
if (showaxes)
dumpcmd += QString(" axes yes 0.5 0.025");
else
dumpcmd += QString(" axes no 0.0 0.0");
dumpcmd += " modify boxcolor " + settings.value("boxcolor", "yellow").toString();
dumpcmd += " backcolor " + settings.value("background", "black").toString();
if (!adiams.isEmpty()) dumpcmd += blank + elements + blank + adiams + blank;
settings.endGroup();
lammps->command(dumpcmd.toLocal8Bit());
QImageReader reader(dumpfile.fileName());
reader.setAutoTransform(true);
const QImage newImage = reader.read();
if (newImage.isNull()) {
QMessageBox::warning(
this, QGuiApplication::applicationDisplayName(),
QString("Cannot load %1: %2").arg(dumpfile.fileName(), reader.errorString()));
return;
}
dumpfile.remove();
// scale back to achieve antialiasing
image = newImage.scaled(xsize, ysize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
imageLabel->setPixmap(QPixmap::fromImage(image));
imageLabel->adjustSize();
if (renderstatus) renderstatus->setEnabled(false);
repaint();
}
void ImageViewer::saveAs()
{
QString fileName = QFileDialog::getSaveFileName(this, "Save Image File As", QString(),
@ -90,12 +466,12 @@ void ImageViewer::copy() {}
void ImageViewer::zoomIn()
{
scaleImage(1.1);
scaleImage(1.25);
}
void ImageViewer::zoomOut()
{
scaleImage(0.9);
scaleImage(0.8);
}
void ImageViewer::normalSize()
@ -119,38 +495,44 @@ void ImageViewer::saveFile(const QString &fileName)
void ImageViewer::createActions()
{
QMenu *fileMenu = menuBar->addMenu(tr("&File"));
QMenu *fileMenu = menuBar->addMenu("&File");
saveAsAct = fileMenu->addAction(tr("&Save As..."), this, &ImageViewer::saveAs);
saveAsAct = fileMenu->addAction("&Save As...", this, &ImageViewer::saveAs);
saveAsAct->setIcon(QIcon(":/document-save-as.png"));
saveAsAct->setEnabled(false);
fileMenu->addSeparator();
copyAct = fileMenu->addAction(tr("&Copy"), this, &ImageViewer::copy);
copyAct = fileMenu->addAction("&Copy", this, &ImageViewer::copy);
copyAct->setIcon(QIcon(":/edit-copy.png"));
copyAct->setShortcut(QKeySequence::Copy);
copyAct->setEnabled(false);
fileMenu->addSeparator();
QAction *exitAct = fileMenu->addAction(tr("&Close"), this, &QWidget::close);
exitAct->setShortcut(tr("Ctrl+W"));
QAction *exitAct = fileMenu->addAction("&Close", this, &QWidget::close);
exitAct->setIcon(QIcon(":/window-close.png"));
exitAct->setShortcut(QKeySequence::fromString("Ctrl+W"));
QMenu *viewMenu = menuBar->addMenu(tr("&View"));
QMenu *viewMenu = menuBar->addMenu("&View");
zoomInAct = viewMenu->addAction(tr("Zoom &In (10%)"), this, &ImageViewer::zoomIn);
zoomInAct = viewMenu->addAction("Image Zoom &In (25%)", this, &ImageViewer::zoomIn);
zoomInAct->setShortcut(QKeySequence::ZoomIn);
zoomInAct->setIcon(QIcon(":/gtk-zoom-in.png"));
zoomInAct->setEnabled(false);
zoomOutAct = viewMenu->addAction(tr("Zoom &Out (10%)"), this, &ImageViewer::zoomOut);
zoomOutAct = viewMenu->addAction("Image Zoom &Out (25%)", this, &ImageViewer::zoomOut);
zoomOutAct->setShortcut(QKeySequence::ZoomOut);
zoomOutAct->setIcon(QIcon(":/gtk-zoom-out.png"));
zoomOutAct->setEnabled(false);
normalSizeAct = viewMenu->addAction(tr("&Normal Size"), this, &ImageViewer::normalSize);
normalSizeAct->setShortcut(tr("Ctrl+S"));
normalSizeAct = viewMenu->addAction("&Reset Image Size", this, &ImageViewer::normalSize);
normalSizeAct->setShortcut(QKeySequence::fromString("Ctrl+0"));
normalSizeAct->setIcon(QIcon(":/gtk-zoom-fit.png"));
normalSizeAct->setEnabled(false);
viewMenu->addSeparator();
fitToWindowAct = viewMenu->addAction(tr("&Fit to Window"), this, &ImageViewer::fitToWindow);
fitToWindowAct = viewMenu->addAction("&Fit to Window", this, &ImageViewer::fitToWindow);
fitToWindowAct->setEnabled(false);
fitToWindowAct->setCheckable(true);
fitToWindowAct->setShortcut(tr("Ctrl+F"));
fitToWindowAct->setShortcut(QKeySequence::fromString("Ctrl+="));
}
void ImageViewer::updateActions()
@ -183,27 +565,6 @@ void ImageViewer::adjustScrollBar(QScrollBar *scrollBar, double factor)
int(factor * scrollBar->value() + ((factor - 1) * scrollBar->pageStep() / 2)));
}
bool ImageViewer::eventFilter(QObject *, QEvent *event)
{
if (event->type() == QEvent::Wheel) {
wheelEvent((QWheelEvent *)event);
return true;
}
return false;
}
void ImageViewer::wheelEvent(QWheelEvent *event)
{
QPoint num = event->angleDelta();
if (!num.isNull()) {
if (num.y() > 0)
zoomIn();
else
zoomOut();
}
event->accept();
}
// Local Variables:
// c-basic-offset: 4
// End:

View File

@ -14,8 +14,10 @@
#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H
#include <QComboBox>
#include <QDialog>
#include <QImage>
#include <QString>
class QAction;
class QMenuBar;
@ -25,13 +27,15 @@ class QObject;
class QScrollArea;
class QScrollBar;
class QStatusBar;
class QWheelEvent;
class LammpsWrapper;
class QComboBox;
class ImageViewer : public QDialog {
Q_OBJECT
public:
explicit ImageViewer(const QString &fileName, QWidget *parent = nullptr);
explicit ImageViewer(const QString &fileName, LammpsWrapper *_lammps,
QWidget *parent = nullptr);
private slots:
void saveAs();
@ -41,14 +45,30 @@ private slots:
void normalSize();
void fitToWindow();
void edit_size();
void reset_view();
void toggle_ssao();
void toggle_anti();
void toggle_vdw();
void toggle_box();
void toggle_axes();
void do_zoom_in();
void do_zoom_out();
void do_rot_left();
void do_rot_right();
void do_rot_up();
void do_rot_down();
void change_group(int);
public:
void createImage();
private:
void createActions();
void updateActions();
void saveFile(const QString &fileName);
void scaleImage(double factor);
void adjustScrollBar(QScrollBar *scrollBar, double factor);
bool eventFilter(QObject *object, QEvent *event);
void wheelEvent(QWheelEvent *event);
private:
QImage image;
@ -64,6 +84,14 @@ private:
QAction *zoomOutAct;
QAction *normalSizeAct;
QAction *fitToWindowAct;
LammpsWrapper *lammps;
QString group;
QString filename;
int xsize, ysize;
int hrot, vrot;
double zoom, vdwfactor;
bool showbox, showaxes, antialias, usessao, useelements;
};
#endif

Some files were not shown because too many files have changed in this diff Show More