Merge branch 'develop' of github.com:lammps/lammps into compute-fix-variable-outputs

This commit is contained in:
Stan Gerald Moore
2023-10-16 12:01:59 -06:00
325 changed files with 13788 additions and 2800 deletions

View File

@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -145,6 +145,7 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc)
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
@ -386,6 +387,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)

View File

@ -28,6 +28,7 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc)
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)

View File

@ -1,6 +1,6 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.10.04.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
set(PACELIB_MD5 "70ff79f4e59af175e55d24f3243ad1ff" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -17,7 +17,7 @@
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>LAMMPS</string>
<string>LAMMPS_GUI</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@ -9,7 +9,7 @@ of the available packages.
The following individual commands are included:
binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt
After copying the lammps-gui folder into your Applications folder, please follow
After copying the LAMMPS_GUI folder into your Applications folder, please follow
these steps:
1. Open the Terminal app
@ -23,7 +23,7 @@ these steps:
3. Add the following lines to the end of the file, save it, and close the editor
LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents
LAMMPS_INSTALL_DIR=/Applications/LAMMPS_GUI.app/Contents
LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials
LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench
MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files
@ -38,9 +38,9 @@ these steps:
the changes from .zprofile automatically.
Note: the above assumes you use the default shell (zsh) that comes with
MacOS. If you customized MacOS to use a different shell, you'll need to modify
that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands
to modify the same environment variables.
MacOS. If you customized MacOS to use a different shell, you'll need to
modify that shell's init file (.cshrc, .bashrc, etc.) instead with
appropiate commands to modify the same environment variables.
5. Try running LAMMPS (which might fail, see step 7)
@ -50,10 +50,10 @@ these steps:
lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo
Depending on the size and resolution of your screen, the fonts may
be too small to read. This can be adjusted by setting the environment
variable QT_FONT_DPI. The default value would be 72, so to increase
the fonts by a third one can add to the .zprofile file the line
Depending on the size and resolution of your screen, the fonts may be too
small to read. This can be adjusted by setting the environment variable
QT_FONT_DPI. The default value would be 72, so to increase the fonts by a
third, one can add to the .zprofile file the line
export QT_FONT_DPI=96
@ -61,9 +61,9 @@ these steps:
7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt)
MacOS will likely block the initial run of the executables, since they
were downloaded from the internet and are missing a known signature from an
identified developer. Go to "Settings" and search for "Security settings". It
should display a message that an executable like "lmp" was blocked. Press
MacOS will likely block the initial run of the executables, since they were
downloaded from the internet and are missing a known signature from an
identified developer. Go to "Settings" and search for "Security settings".
It should display a message that an executable like "lmp" was blocked. Press
"Open anyway", which might prompt you for your admin credentials. Afterwards
"lmp" and the other executables should work as expected.

View File

@ -4,7 +4,7 @@ APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI
echo "Delete old files, if they exist"
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64.tar.gz
echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
@ -69,7 +69,7 @@ do \
done
pushd ..
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
tar -czvvf LAMMPS_GUI-Linux-amd64.tar.gz LAMMPS_GUI
popd
echo "Cleanup dir"

View File

@ -3,7 +3,7 @@
APP_NAME=lammps-gui
echo "Delete old files, if they exist"
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch.dmg
echo "Create initial dmg file with macdeployqt"
macdeployqt lammps-gui.app -dmg
@ -22,8 +22,8 @@ ln -s /Applications .
mv ${APP_NAME}.app/Contents/Resources/README.txt .
mkdir .background
mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png
mv ${APP_NAME}.app LAMMPS.app
cd LAMMPS.app/Contents
mv ${APP_NAME}.app LAMMPS_GUI.app
cd LAMMPS_GUI.app/Contents
echo "Attach icons to LAMMPS console and GUI executables"
echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc
@ -75,7 +75,7 @@ echo '
set statusbar visible to false
set toolbar visible to false
set the bounds to { 100, 40, 868, 640 }
set position of item "'LAMMPS'.app" to { 190, 216 }
set position of item "'LAMMPS_GUI'.app" to { 190, 216 }
set position of item "Applications" to { 576, 216 }
set position of item "README.txt" to { 190, 400 }
end tell
@ -96,12 +96,12 @@ sync
echo "Unmount modified disk image and convert to compressed read-only image"
hdiutil detach "${DEVICE}"
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg"
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS_GUI-macOS-multiarch.dmg"
echo "Attach icon to .dmg file"
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
SetFile -a C LAMMPS-macOS-multiarch.dmg
Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch.dmg
SetFile -a C LAMMPS_GUI-macOS-multiarch.dmg
rm icon.rsrc
echo "Delete temporary disk images"

View File

@ -1,7 +1,7 @@
# CMake script to be run post installation to build zipped package
# clean up old zipfile and deployment tree
file(REMOVE LAMMPS-Win10-amd64.zip)
file(REMOVE LAMMPS_GUI-Win10-amd64.zip)
file(REMOVE_RECURSE LAMMPS_GUI)
file(RENAME ${INSTNAME} LAMMPS_GUI)
@ -21,8 +21,15 @@ file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
file(REMOVE qtdeploy.bat)
# download and uncompress static FFMpeg and gzip binaries
file(DOWNLOAD "https://download.lammps.org/thirdparty/ffmpeg-gzip.zip" ffmpeg-gzip.zip)
file(WRITE unpackzip.ps1 "Expand-Archive -Path ffmpeg-gzip.zip -DestinationPath LAMMPS_GUI")
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File unpackzip.ps1)
file(REMOVE unpackzip.ps1)
file(REMOVE ffmpeg-gzip.zip)
# create zip archive
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip")
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS_GUI-Win10-amd64.zip")
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
file(REMOVE makearchive.ps1)
file(REMOVE_RECURSE LAMMPS_GUI)

View File

@ -10,5 +10,3 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(BUILD_MPI FALSE CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE)
set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE)

View File

@ -488,8 +488,9 @@ using CMake or Make.
.. code-block:: bash
-D BUILD_TOOLS=value # yes or no (default)
-D BUILD_LAMMPS_SHELL=value # yes or no (default)
-D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt
-D BUILD_LAMMPS_SHELL=value # yes or no (default). Build lammps-shell
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build lammps-gui
The generated binaries will also become part of the LAMMPS installation
(see below).
@ -503,7 +504,6 @@ using CMake or Make.
make binary2txt # build only binary2txt tool
make chain # build only chain tool
make micelle2d # build only micelle2d tool
make thermo_extract # build only thermo_extract tool
cd lammps/tools/lammps-shell
make # build LAMMPS shell

View File

@ -177,13 +177,13 @@ configuration is selected with the *-C* flag:
ctest -C Debug
The CMake scripts in LAMMPS have basic support for being compiled using a
multi-config build system, but not all of it has been ported. This is in
particular applicable to compiling packages that require additional libraries
that would be downloaded and compiled by CMake. The "windows" preset file
tries to keep track of which packages can be compiled natively with the
MSVC compilers out-of-the box. Not all of those external libraries are
portable to Windows, either.
The CMake scripts in LAMMPS have basic support for being compiled using
a multi-config build system, but not all of it has been ported. This is
in particular applicable to compiling packages that require additional
libraries that would be downloaded and compiled by CMake. The
``windows.cmake`` preset file tries to keep track of which packages can
be compiled natively with the MSVC compilers out-of-the box. Not all of
the external libraries are portable to Windows, either.
Installing CMake

View File

@ -722,9 +722,10 @@ This list was last updated for version 4.0.1 of the Kokkos library.
``cmake/presets`` folder, ``kokkos-serial.cmake``,
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``,
``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable
the KOKKOS package and enable some hardware choice. So to compile
with CUDA device parallelization (for GPUs with CC 5.0 and up)
with some common packages enabled, you can do the following:
the KOKKOS package and enable some hardware choices. For GPU
support those preset files must be customized to match the
hardware used. So to compile with CUDA device parallelization with
some common packages enabled, you can do the following:
.. code-block:: bash
@ -886,6 +887,50 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/machdyn/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/machdyn/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-machdyn # print help message
make lib-machdyn args="-b" # download to lib/machdyn/eigen3
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/machdyn/Makefile.lammps`` file.
----------
.. _mliap:
ML-IAP package
@ -1431,6 +1476,55 @@ ML-POD package
----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _plumed:
PLUMED package
@ -1952,55 +2046,6 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _scafacos:
SCAFACOS package
@ -2048,50 +2093,6 @@ To build with this package, you must download and build the
----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/smd/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/smd/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-smd # print help message
make lib-smd args="-b" # download to lib/smd/eigen3
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/smd/Makefile.lammps`` file.
----------
.. _vtk:
VTK package

View File

@ -182,6 +182,7 @@ make a copy of one of them and modify it to suit your needs.
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake # compile serial multi-arch binaries on macOS
Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and

View File

@ -91,7 +91,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`ke/atom/eff <compute_ke_atom_eff>`
* :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`local/comp/atom (k) <compute_local_comp_atom>`
* :doc:`composition/atom (k) <compute_composition_atom>`
* :doc:`mliap <compute_mliap>`
* :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>`

View File

@ -69,7 +69,7 @@ OPT.
* :doc:`drude/transform/inverse <fix_drude_transform>`
* :doc:`dt/reset (k) <fix_dt_reset>`
* :doc:`edpd/source <fix_dpd_source>`
* :doc:`efield <fix_efield>`
* :doc:`efield (k) <fix_efield>`
* :doc:`efield/tip4p <fix_efield>`
* :doc:`ehex <fix_ehex>`
* :doc:`electrode/conp (i) <fix_electrode>`
@ -181,6 +181,7 @@ OPT.
* :doc:`pour <fix_pour>`
* :doc:`precession/spin <fix_precession_spin>`
* :doc:`press/berendsen <fix_press_berendsen>`
* :doc:`press/langevin <fix_press_langevin>`
* :doc:`print <fix_print>`
* :doc:`propel/self <fix_propel_self>`
* :doc:`property/atom (k) <fix_property_atom>`
@ -232,7 +233,7 @@ OPT.
* :doc:`spring <fix_spring>`
* :doc:`spring/chunk <fix_spring_chunk>`
* :doc:`spring/rg <fix_spring_rg>`
* :doc:`spring/self <fix_spring_self>`
* :doc:`spring/self (k) <fix_spring_self>`
* :doc:`srd <fix_srd>`
* :doc:`store/force <fix_store_force>`
* :doc:`store/state <fix_store_state>`

View File

@ -265,7 +265,7 @@ OPT.
* :doc:`smd/tri_surface <pair_smd_triangulated_surface>`
* :doc:`smd/ulsph <pair_smd_ulsph>`
* :doc:`smtbq <pair_smtbq>`
* :doc:`snap (k) <pair_snap>`
* :doc:`snap (ik) <pair_snap>`
* :doc:`soft (go) <pair_soft>`
* :doc:`sph/heatconduction <pair_sph_heatconduction>`
* :doc:`sph/idealgas <pair_sph_idealgas>`
@ -305,5 +305,5 @@ OPT.
* :doc:`wf/cut <pair_wf_cut>`
* :doc:`ylz <pair_ylz>`
* :doc:`yukawa (gko) <pair_yukawa>`
* :doc:`yukawa/colloid (go) <pair_yukawa_colloid>`
* :doc:`yukawa/colloid (gko) <pair_yukawa_colloid>`
* :doc:`zbl (gko) <pair_zbl>`

View File

@ -1,111 +1,310 @@
Using the LAMMPS GUI
====================
LAMMPS GUI is a simple graphical text editor that is linked to the
:ref:`LAMMPS C-library interface <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.
This document describes **LAMMPS GUI version 1.5**.
-----
LAMMPS GUI is a graphical text editor customized for editing LAMMPS
input files that is linked to the :ref:`LAMMPS library <lammps_c_api>`
and thus can run LAMMPS directly using the contents of the editor's text
buffer as input. It can retrieve and display information from LAMMPS
while it is running, display visualizations created with the :doc:`dump
image command <dump_image>`, and is adapted specifically for editing
LAMMPS input files through text completion and reformatting, and linking
to the online LAMMPS documentation for known LAMMPS commands and styles.
.. note::
Pre-compiled, ready-to-use LAMMPS GUI executables for Linux (Ubuntu
20.04LTS or later and compatible), macOS (version 11 aka Big Sur or
later), and Windows (version 10 or later) :ref:`are available
<lammps_gui_install>` for download. They may be linked to a
development version of LAMMPS in case they need features not yet
available in a released version. Serial LAMMPS executables of the
same LAMMPS version are included as well. The source code for the
LAMMPS GUI is included in the LAMMPS source code and can be found in
the ``tools/lammps-gui`` folder. It can be compiled alongside LAMMPS
when :doc:`compiling with CMake <Build_cmake>`.
LAMMPS GUI tries to provide an experience similar to what people
traditionally would do to run LAMMPS using a command line window:
- editing inputs with a text editor
- run LAMMPS on the input with selected command line flags
- and then use or extract data from the created files and visualize it
That procedure is quite effective for people proficient in using the
command line, as that allows them to use tools for the individual steps
which they are most comfortable with. It is often required when running
LAMMPS on high-performance computing facilities.
The main benefit of using the LAMMPS GUI application instead is that
many basic tasks can be done directly from the GUI without switching to
a text console window or using external programs, let alone writing
scripts to extract data from the generated output. It also integrates
well with graphical desktop environments.
LAMMPS GUI thus makes it easier for beginners to get started running
simple LAMMPS simulations. It is very suitable for tutorials on LAMMPS
since you only need to learn how to use a single program for most tasks
and thus time can be saved and people can focus on learning LAMMPS. It
is also designed to keep the barrier low when you decide to switch to a
full featured, standalone programming editor and more sophisticated
visualization and analysis tools and run LAMMPS from a command line.
The following text provides a detailed tour of the features and
functionality of the LAMMPS GUI. This document describes LAMMPS GUI
version 1.2.
functionality of the LAMMPS GUI.
Suggestions for new features and reports of bugs are always welcome.
You can use the :doc:`the same channels as for LAMMPS itself
<Errors_bugs>` for that purpose.
-----
Main window
-----------
When LAMMPS GUI starts, it will show the main window with either an
empty buffer, or have a file loaded. In the latter case it may look like
the following:
When LAMMPS GUI starts, it will show a main window with either an
empty buffer or the contents of a loaded file. In the latter case it
may look like the following:
.. image:: JPG/lammps-gui-main.png
:align: center
:scale: 50%
There is the menu bar at the top, then the main editor buffer with the
input file contents in the center with line numbers on the left and the
input colored according to the LAMMPS input file syntax. At the bottom
is the status bar, which shows the status of LAMMPS execution on the
left ("Ready." when idle) and the current working directory on the
right. The size of the main window will be stored when exiting and
restored when starting again. The name of the current file in the
buffer is shown in the window title and the text `*modified*` is added
in case the buffer has modifications that are not yet saved to a file.
There is the typical menu bar at the top, then the main editor buffer,
and a status bar at the bottom. The input file contents are shown
with line numbers on the left and the input is colored according to
the LAMMPS input file syntax. The status bar shows the status of
LAMMPS execution on the left (e.g. "Ready." when idle) and the current
working directory on the right. The name of the current file in the
buffer is shown in the window title; the word `*modified*` is added if
the buffer edits have not yet saved to a file. The size of the main
window will be stored when exiting and restored when starting again.
Opening Files
^^^^^^^^^^^^^
The LAMMPS GUI application will try to open the first command line
argument as input file, further arguments are ignored. When no
argument is given LAMMPS GUI will start with an empty buffer.
Files can also be opened via the ``File`` menu or by drag-and-drop
of a file from a file manager to the editor window. Only one
file can be open at a time, so opening a new file with a filled
buffer will close this buffer and in case the buffer has unsaved
modifications will ask to either cancel the load, discard the
changes or save them.
argument as a LAMMPS input script, further arguments are ignored.
When no argument is given, LAMMPS GUI will start with an empty buffer.
Files can also be opened via the ``File`` menu or by drag-and-drop of
a file from a graphical file manager into the editor window. Only one
file can be open at a time, so opening a new file with a filled buffer
will close the buffer. If the buffer has unsaved modifications, you
will be asked to either cancel the operation, discard the changes, or
save them.
Running LAMMPS
^^^^^^^^^^^^^^
From within the LAMMPS GUI main window LAMMPS can be started either from
the ``Run`` menu, by the hotkey `Ctrl-Enter` (`Command-Enter` on macOS),
or by clicking on the green button in the status bar. LAMMPS runs in a
separate thread, so the GUI stays responsive and thus it is able to
interact with the calculation and access its data. It is important to
note, that LAMMPS is using the contents of the input buffer for the run,
**not** the file it was read from. If there are unsaved changes in the
buffer, they *will* be used.
the ``Run`` menu using the ``Run LAMMPS from Editor Buffer`` entry, by
the keyboard shortcut `Ctrl-Enter` (`Command-Enter` on macOS), or by
clicking on the green "Run" button in the status bar. All of these
operations will cause LAMMPS to process the entire input script, which
may contain multiple :doc:`run <run>` or :doc:`minimize <minimize>`
commands.
LAMMPS runs in a separate thread, so the GUI stays responsive and is
able to interact with the running calculation and access data it
produces. It is important to note that running LAMMPS this way is
using the contents of the input buffer for the run (via the
:cpp:func:`lammps_commands_string()` function of the LAMMPS C-library
interface), and **not** the original file it was read from. Thus, if
there are unsaved changes in the buffer, they *will* be used. As an
alternative, it is also possible to run LAMMPS by reading the contents
of a file from the ``Run LAMMPS from File`` menu entry or with
`Ctrl-Shift-Enter`. This option may be required in some rare cases
where the input uses some functionality that is not compatible with
running LAMMPS from a string buffer. For consistency, any unsaved
changes in the buffer must be either saved to the file or undone
before LAMMPS can be run from a file.
.. image:: JPG/lammps-gui-running.png
:align: center
:scale: 75%
While LAMMPS is running, the contents of the status bar change: on the
left side there is a text indicating that LAMMPS is running, which will
contain the selected number of threads, if thread-parallel acceleration
was selected in the ``Preferences`` dialog. On the right side, a
progress bar is shown that displays the estimated progress on the
current :doc:`run command <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.
While LAMMPS is running, the contents of the status bar change. On
the left side there is a text indicating that LAMMPS is running, which
will also show the number of active threads, if thread-parallel
acceleration was selected in the ``Preferences`` dialog. On the right
side, a progress bar is shown that displays the estimated progress for
the current :doc:`run command <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.
Also, the line number of the currently executed command will be
highlighted in green.
.. image:: JPG/lammps-gui-run-highlight.png
:align: center
:scale: 75%
If an error occurs (in the example below the command :doc:`label
<label>` was incorrectly capitalized as "Label"), an error message
dialog will be shown and the line of the input which triggered the
error will be highlighted. The state of LAMMPS in the status bar will
be set to "Failed." instead of "Ready."
.. image:: JPG/lammps-gui-run-error.png
:align: center
:scale: 75%
Up to three additional windows will open during a run:
- a log window with the captured screen output
- a chart window with a line graph created from the thermodynamic output of the run
- a slide show window with images created by a :doc:`dump image command <dump_image>`
More information on those windows and how to adjust their behavior and
contents is given below.
An active LAMMPS run can be stopped cleanly by using either the ``Stop
LAMMPS`` entry in the ``Run`` menu, the keyboard shortcut `Ctrl-/`
(`Command-/` on macOS), or by clicking on the red button in the status
bar. This will cause the running LAMMPS process to complete the current
timestep (or iteration for energy minimization) and then complete the
processing of the buffer while skipping all run or minimize commands.
This is equivalent to the input script command :doc:`timer timeout 0
<timer>` and is implemented by calling the
:cpp:func:`lammps_force_timeout()` function of the LAMMPS C-library
interface. Please see the corresponding documentation pages to
understand the implications of this operation.
Log Window
----------
By default, when starting a run, a "Log Window" will open that displays
the current screen output of the LAMMPS calculation, that would normally
be seen in the command line window, as shown below.
.. image:: JPG/lammps-gui-log.png
:align: center
:scale: 50%
LAMMPS GUI captures the screen output as it is generated and updates
the log window regularly during a run.
By default, the log window will be replaced each time a run is started.
The runs are counted and the run number for the current run is displayed
in the window title. It is possible to change the behavior of LAMMPS
GUI in the preferences dialog to create a *new* log window for every run
or to not show the current log window. It is also possible to show or
hide the *current* log window from the ``View`` menu.
The text in the log window is read-only and cannot be modified, but
keyboard shortcuts to select and copy all or parts of the text can be
used to transfer text to another program. Also, the keyboard shortcut
`Ctrl-S` (`Command-S` on macOS) is available to save the log buffer to a
file. The "Select All" and "Copy" functions, as well as a "Save Log to
File" option are also available from a context menu by clicking with the
right mouse button into the log window text area.
Chart Window
------------
By default, when starting a run, a "Chart Window" will open that
displays a plot of thermodynamic output of the LAMMPS calculation as
shown below.
.. image:: JPG/lammps-gui-chart.png
:align: center
:scale: 50%
The drop down menu on the top right allows selection of different
properties that are computed and written to thermo output. Only one
property can be shown at a time. The plots will be updated with new
data as the run progresses, so they can be used to visually monitor the
evolution of available properties. The window title will show the
current run number that this chart window corresponds to. Same as
explained for the log window above, by default, the chart window will
be replaced on each new run, but the behavior can be changed in the
preferences dialog.
From the ``File`` menu on the top left, it is possible to save an image
of the currently displayed plot or export the data in either plain text
columns (for use by plotting tools like `gnuplot
<http://www.gnuplot.info/>`_ or `grace
<https://plasma-gate.weizmann.ac.il/Grace/>`_), or as CSV data which can
be imported for further processing with Microsoft Excel or `pandas
<https://pandas.pydata.org/>`_
Thermo output data from successive run commands in the input script will
be combined into a single data set unless the format, number, or names
of output columns are changed with a :doc:`thermo_style <thermo_style>`
or a :doc:`thermo_modify <thermo_modify>` command, or the current time
step is reset with :doc:`reset_timestep <reset_timestep>`, or if a
:doc:`clear <clear>` command is issued.
Image Slide Show
----------------
By default, if the LAMMPS input contains a :doc:`dump image
<dump_image>` command, a "Slide Show" window will open which loads and
displays the images created by LAMMPS as they are written.
.. image:: JPG/lammps-gui-slideshow.png
:align: center
:scale: 50%
The various buttons at the bottom right of the window allow single
stepping through the sequence of images or playing an animation (as a
continuous loop or once from first to last). It is also possible to
zoom in or zoom out of the displayed images, and to export the slide
show animation to a movie file, if `ffmpeg <https://ffmpeg.org/>`_ is
installed.
Variable Info
-------------
During a run, it may be of interest to monitor the value of input script
variables, for example to monitor the progress of loops. This can be
done by enabling the "Variables Window" in the ``View`` menu or by using
the `Ctrl-Shift-W` keyboard shortcut. This will show info similar to
the :doc:`info variables <info>` command in a separate window as shown
below.
.. image:: JPG/lammps-gui-variable-info.png
:align: center
:scale: 75%
Like the log and chart windows, its content is continuously updated
during a run. It will show "(none)" if there are no variables
defined. Note that it is also possible to *set* :doc:`index style
variables <variable>`, that would normally be set via command line
flags, via the "Set Variables..." dialog from the ``Run`` menu.
LAMMPS GUI will automatically set the variable "gui_run" to the
current value of the run counter. That way it would be possible
to automatically record a log for each run attempt by using the
command
.. code-block:: LAMMPS
log logfile-${gui_run}.txt
at the beginning of an input file. That would record logs to files
``logfile-1.txt``, ``logfile-2.txt``, and so on for successive runs.
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.
By selecting the ``Create Image`` entry in the ``Run`` menu, or by
hitting the `Ctrl-I` (`Command-I` on macOS) keyboard shortcut, or by
clicking on the "palette" button in the status bar, LAMMPS GUI will send
a custom :doc:`write_dump image <dump_image>` command to LAMMPS and read
the resulting snapshot image with the current state of the system into
an image viewer window. This functionality is not available *during* an
ongoing run. When LAMMPS is not yet initialized, LAMMPS GUI will try to
identify the line with the first run or minimize command and execute all
command up to that line from the input buffer and then add a "run 0"
command. This will initialize the system so an image of the initial
state of the system can be rendered. If there was an error, the
snapshot image viewer will not appear.
When possible, LAMMPS GUI will try to detect which elements the atoms
correspond to (via their mass) and then colorize them in the image
accordingly. Otherwise the default predefined sequence of colors is
assigned to the different atom types.
.. image:: JPG/lammps-gui-image.png
:align: center
@ -114,28 +313,68 @@ predefined sequence of colors are assigned to different atom types.
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.
actual image size, high-quality (SSAO) rendering, anti-aliasing, view
style, display of box or axes, zoom factor. The view of the system
can be rotated horizontally and vertically. It is also possible to
only display the atoms within a group defined in the input script
(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 new image; it will be
grayed out when it is finished. When there are many atoms to render
and high quality images with anti-aliasing are requested, re-rendering
may take several seconds. From the ``File`` menu of the image window,
the current image can be saved to a file 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.
The editor has most of the usual functionality that similar programs
have: text selection via mouse or with cursor moves while holding the
Shift key, Cut (`Ctrl-X`), Copy (`Ctrl-C`), Paste (`Ctrl-V`), Undo
(`Ctrl-Z`), Redo (`Ctrl-Shift-Z`), Select All (`Ctrl-A`). When trying
to exit the editor with a modified buffer, a dialog will pop up asking
whether to cancel the exit operation, or to save or not save the buffer
contents to a file.
Context Specific Word Completion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default, LAMMPS GUI will display a small pop-up frame with possible
choices for LAMMPS input script commands or styles after 2 characters of
a word have been typed.
.. image:: JPG/lammps-gui-complete.png
:align: center
:scale: 75%
The word can then be completed through selecting an entry by scrolling
up and down with the cursor keys and selecting with the 'Enter' key or
by clicking on the entry with the mouse. The automatic completion
pop-up can be disabled in the ``Preferences`` dialog, but the completion
can still be requested manually by either hitting the 'Shift-TAB' key or
by right-clicking with the mouse and selecting the option from the
context menu. Most of the completion information is taken from the
LAMMPS instance and thus it will be adjusted to only show available
options that have been enabled while compiling LAMMPS. That, however,
excludes accelerated styles and commands; for improved clarity, only the
non-suffix version of styles are shown.
Line Reformatting
^^^^^^^^^^^^^^^^^
The editor supports reformatting lines according to the syntax in order
to have consistently aligned lines. This primarily means adding
whitespace padding to commands, type specifiers, IDs and names. This
reformatting is performed by default when hitting the 'Enter' key to
start a new line. This feature can be turned on or off in the
``Preferences`` dialog, but it can still be manually performed by
hitting the 'TAB' key. The amount of padding can also be changed in the
``Preferences`` dialog.
Internally this functionality is achieved by splitting the line into
"words" and then putting it back together with padding added where the
context can be detected; otherwise a single space is used between words.
Context Specific Help
^^^^^^^^^^^^^^^^^^^^^
@ -145,22 +384,23 @@ Context Specific Help
: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
documentation for the command in the current line. This can be done by
either clicking the right mouse button or by using the `Ctrl-?` keyboard
shortcut. 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.
online LAMMPS documentation. When using the keyboard, 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.
The menu bar has 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, the key
corresponding the underlined letters can again be used to select entries
instead of using the mouse.
File
^^^^
@ -174,104 +414,121 @@ The ``File`` menu offers the usual options:
- ``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.
will appear to either cancel the operation, or to save or not save the
edited 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.
In addition, up to 5 recent file names will be listed after the
``Open`` entry that allows re-opening 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.
``Redo``, ``Cut``, ``Copy``, ``Paste``. It can also open a
``Preferences`` dialog (keyboard shortcut `Ctrl-P`) and allows deletion
of all stored preferences so they will be reset to default values.
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>`.
The ``Run`` menu has options 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
:cpp:func:`lammps_open_no_mpi`. The buffer contents then executed 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.
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. As an alternative, it is also
possible to run LAMMPS using the contents of the edited file by
reading the file. This is mainly provided as a fallback option in
case the input uses some feature that is not available when running
from a string buffer.
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
GUI can stay responsive and 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.
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 ``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, if the built-in parser can detect them. New
rows for additional variables can be added through the ``Add Row``
button and existing rows can be 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 ``Create 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.
with a :doc:`data file <write_data>` containing 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.
The ``View in VMD`` entry will launch VMD with a :doc:`data file
<write_data>` containing 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``.
The ``View`` menu offers to show or hide additional windows with log
output, charts, slide show, variables, or snapshot images. The
default settings for their visibility 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
option to launch the LAMMPS online documentation in a web browser.
The ``About LAMMPS`` 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/.
number of LAMMPS GUI itself. The ``Quick Help`` displays a dialog
with a minimal description of LAMMPS GUI. The ``LAMMPS GUI Howto``
entry will open this documentation page from the online documentation
in a web browser window. The ``LAMMPS Manual`` entry will open the
main page of the LAMMPS documentation in the web browser.
-----
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.
The ``Preferences`` dialog allows customization of the behavior and
look 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%
:width: 24%
.. |guiprefs2| image:: JPG/lammps-gui-prefs-accel.png
:width: 25%
:width: 24%
.. |guiprefs3| image:: JPG/lammps-gui-prefs-image.png
:width: 25%
:width: 24%
|guiprefs1| |guiprefs2| |guiprefs3|
.. |guiprefs4| image:: JPG/lammps-gui-prefs-editor.png
:width: 24%
|guiprefs1| |guiprefs2| |guiprefs3| |guiprefs4|
General Settings:
^^^^^^^^^^^^^^^^^
@ -279,7 +536,7 @@ 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`.
log *file* produced by default, since LAMMPS GUI 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.
@ -288,6 +545,9 @@ General Settings:
- *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.
- *Show slide show window by default:* when checked, a slide show
window will be shown with images from a dump image command, if
present, in the LAMMPS input.
- *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.
@ -297,7 +557,7 @@ General Settings:
- *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
- *Path to LAMMPS Shared Library File:* this option is only visible
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
@ -309,94 +569,132 @@ General Settings:
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.
- *GUI update interval:* Allows to set the time interval between GUI
and data updates during a LAMMPS run in milliseconds. The default is
to update the GUI every 100 milliseconds. This is good for most cases.
For LAMMPS runs that run very fast, however, data may be missed and
through lowering this interval, this can be corrected. However, this
will make the GUI use more resources, which may be a problem on some
computers with slower CPUs. The default value is 100 milliseconds.
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.
This tab enables selection of an accelerator package for LAMMPS to use
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 setting
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
This tab allows setting defaults for the snapshot images displayed in
the ``Image Viewer`` window, such as its dimensions and the zoom
factor applied. The *Antialias* switch will render images with twice
the number of pixels for width and height and then smoothly scale 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.
with smoother edges at the expense of requiring more CPU time to
render the image. The *HQ Image mode* option turns on screen space
ambient occlusion (SSAO) mode when rendering images. This is also
more time consuming, but produces a more 'spatial' representation of
the system shading of atoms by their depth. The *VDW Style* checkbox
selects whether atoms are represented by space filling spheres when
checked or by smaller spheres and sticks. Finally there are a couple
of drop down lists to select the background and box colors.
Editor Settings:
^^^^^^^^^^^^^^^^
Hotkeys
-------
This tab allows tweaking settings of the editor window. Specifically
the amount of padding to be added to LAMMPS commands, types or type
ranges, IDs (e.g. for fixes), and names (e.g. for groups). The value
set is the minimum width for the text element and it can be chosen in
the range between 1 and 32.
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).
The two settings which follow enable or disable the automatic
reformatting when hitting the 'Enter' key and the automatic display of
the completion pop-up window.
-----------
Keyboard Shortcuts
------------------
Almost all functionality is accessible from the menu of the editor
window or through keyboard shortcuts. The following shortcuts are
available (On macOS use the Command key instead of Ctrl/Control).
.. list-table::
:header-rows: 1
:widths: auto
* - Hotkey
* - Shortcut
- Function
- Hotkey
- Shortcut
- Function
- Hotkey
- Function
- Hotkey
- Shortcut
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+Enter
- Run LAMMPS
- Ctrl+Shift+A
- About LAMMPS GUI
- Run Input
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+/
- Stop Active Run
- Ctrl+Shift+H
- Quick Help
* - CTRL+S
* - 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
- Snapshot Image
* - Ctrl+Q
- Quit
- Quit Application
- Ctrl+V
- Paste text
- Ctrl+L
- Slide Show
* - Ctrl+W
- Close Window
- Ctrl+A
- Select All
- Ctrl+P
- Preferences
* - Ctrl+Shift+A
- About LAMMPS
- Ctrl+Shift+H
- Quick Help
- Ctrl+Shift+G
- LAMMPS GUI Howto
* - Ctrl+Shift+M
- LAMMPS Manual
- Ctrl+?
- Context Help
- Ctrl+Shift+W
- Show Variables
* - Ctrl+Shift+Enter
- Run File
- TAB
- Reformat line
- Shift+TAB
- Show Completions
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.
All other windows only support a subset of keyboard shortcuts listed
above. Typically, the shortcuts `Ctrl-/` (Stop Run), `Ctrl-W` (Close
Window), and `Ctrl-Q` (Quit Application) are supported.

View File

@ -5,7 +5,7 @@ LAMMPS is designed to be a fast, parallel engine for molecular
dynamics (MD) simulations. It provides only a modest amount of
functionality for setting up simulations and analyzing their output.
Specifically, LAMMPS was not conceived and designed for:
Originally, LAMMPS was not conceived and designed for:
* being run through a GUI
* building molecular systems, or building molecular topologies
@ -14,9 +14,10 @@ Specifically, LAMMPS was not conceived and designed for:
* visualize your MD simulation interactively
* plot your output data
Over the years some of these limitations have been reduced or
removed, through features added to LAMMPS or external tools
that either closely interface with LAMMPS or extend LAMMPS.
Over the years many of these limitations have been reduced or
removed. In part through features added to LAMMPS and in part
through external tools that either closely interface with LAMMPS
or extend LAMMPS.
Here are suggestions on how to perform these tasks:
@ -24,8 +25,9 @@ Here are suggestions on how to perform these tasks:
wraps the library interface is provided. Thus, GUI interfaces can be
written in Python or C/C++ that run LAMMPS and visualize or plot its
output. Examples of this are provided in the python directory and
described on the :doc:`Python <Python_head>` doc page. Also, there
are several external wrappers or GUI front ends.
described on the :doc:`Python <Python_head>` doc page. As of version
2 August 2023 :ref:`a GUI tool <lammps_gui>` is included in LAMMPS.
Also, there are several external wrappers or GUI front ends.
* **Builder:** Several pre-processing tools are packaged with LAMMPS.
Some of them convert input files in formats produced by other MD codes
such as CHARMM, AMBER, or Insight into LAMMPS input formats. Some of

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -9,6 +9,7 @@ fixes, or variables in LAMMPS using the following functions:
- :cpp:func:`lammps_extract_variable_datatype`
- :cpp:func:`lammps_extract_variable`
- :cpp:func:`lammps_set_variable`
- :cpp:func:`lammps_variable_info`
-----------------------
@ -37,6 +38,11 @@ fixes, or variables in LAMMPS using the following functions:
-----------------------
.. doxygenfunction:: lammps_variable_info
:project: progguide
-----------------------
.. doxygenenum:: _LMP_DATATYPE_CONST
.. doxygenenum:: _LMP_STYLE_CONST

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

@ -645,9 +645,14 @@ LAMMPS GUI
Overview
^^^^^^^^
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.
LAMMPS GUI is a graphical text editor customized for editing LAMMPS
input files that is linked to the :ref:`LAMMPS C-library <lammps_c_api>`
and thus can run LAMMPS directly using the contents of the editor's text
buffer as input. It can retrieve and display information from LAMMPS
while it is running, display visualizations created with the :doc:`dump
image command <dump_image>`, and is adapted specifically for editing
LAMMPS input files through text completion and reformatting, and linking
to the online LAMMPS documentation for known LAMMPS commands and styles.
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
@ -656,9 +661,9 @@ 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.
All features have been extensively exposed to keyboard shortcuts, so
that there is also appeal for experienced LAMMPS users for prototyping
and testing simulations setups.
Features
^^^^^^^^
@ -673,11 +678,13 @@ Here are a few highlights of LAMMPS GUI
- 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
- Support for most accelerator packages
- Progress bar indicates how far a run command is completed
- 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
- Indicator for currently executed command
- Indicator for line that caused an error
- 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
@ -695,19 +702,26 @@ 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. Building LAMMPS with CMake is
required. The LAMMPS GUI has been successfully compiled and tested on:
recommended; support for Qt version 6.x is under active development and
thus far only tested with Qt 6.5LTS on Linux. Building LAMMPS with
CMake 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
- Fedora Linux 38 x86\_64 using GCC 13, Qt version 6.5LTS
- 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
.. _lammps_gui_install:
Pre-compiled executables
^^^^^^^^^^^^^^^^^^^^^^^^
Pre-compiled LAMMPS executables including the GUI are currently
Pre-compiled LAMMPS executable packages that include the GUI are currently
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
@ -732,7 +746,10 @@ 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``.
``Qt5Config.cmake``. Similarly, for Qt6 the location of the Qt library
installation can be indicated by setting ``-D Qt6_DIR=/path/to/qt6/lib/cmake/Qt6``,
if necessary. When both, Qt5 and Qt6 are available, Qt6 will be preferred
unless ``-D LAMMPS_GUI_USE_QT5=yes`` is set.
It should be possible to build the LAMMPS GUI as a standalone
compilation (e.g. when LAMMPS has been compiled with traditional make),

View File

@ -255,7 +255,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
* :doc:`ke/atom/eff <compute_ke_atom_eff>` - per-atom translational and radial kinetic energy in the electron force field model
* :doc:`ke/eff <compute_ke_eff>` - kinetic energy of a group of nuclei and electrons in the electron force field model
* :doc:`ke/rigid <compute_ke_rigid>` - translational kinetic energy of rigid bodies
* :doc:`local/comp/atom <compute_local_comp_atom>` - local composition for each atom
* :doc:`composition/atom <compute_composition_atom>` - local composition for each atom
* :doc:`mliap <compute_mliap>` - gradients of energy and forces with respect to model parameters and related quantities for training machine learning interatomic potentials
* :doc:`momentum <compute_momentum>` - translational momentum
* :doc:`msd <compute_msd>` - mean-squared displacement of group of atoms

View File

@ -1,20 +1,20 @@
.. index:: compute local/comp/atom
.. index:: compute local/comp/atom/kk
.. index:: compute composition/atom
.. index:: compute composition/atom/kk
compute local/comp/atom command
===============================
compute composition/atom command
================================
Accelerator Variants: *local/comp/atom/kk*
Accelerator Variants: *composition/atom/kk*
Syntax
""""""
.. code-block:: LAMMPS
compute ID group-ID local/comp/atom keyword values ...
compute ID group-ID composition/atom keyword values ...
* ID, group-ID are documented in :doc:`compute <compute>` command
* local/comp/atom = style name of this compute command
* composition/atom = style name of this compute command
* one or more keyword/value pairs may be appended
.. parsed-literal::
@ -27,9 +27,9 @@ Examples
.. code-block:: LAMMPS
compute 1 all local/comp/atom
compute 1 all composition/atom
compute 1 all local/comp/atom cutoff 9.0
compute 1 all composition/atom cutoff 9.0
comm_modify cutoff 9.0

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

@ -346,6 +346,7 @@ accelerated styles exist.
* :doc:`pour <fix_pour>` - pour new atoms/molecules into a granular simulation domain
* :doc:`precession/spin <fix_precession_spin>` - apply a precession torque to each magnetic spin
* :doc:`press/berendsen <fix_press_berendsen>` - pressure control by Berendsen barostat
* :doc:`press/langevin <fix_press_langevin>` - pressure control by Langevin barostat
* :doc:`print <fix_print>` - print text and variables during a simulation
* :doc:`propel/self <fix_propel_self>` - model self-propelled particles
* :doc:`property/atom <fix_property_atom>` - add customized per-atom values

View File

@ -1,4 +1,5 @@
.. index:: fix efield
.. index:: fix efield/kk
.. index:: fix efield/tip4p
fix efield command
@ -210,6 +211,12 @@ the iteration count during the minimization.
system (the quantity being minimized), you MUST enable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
----------
.. include:: accel_styles.rst
----------
Restrictions
""""""""""""

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

@ -0,0 +1,301 @@
.. index:: fix press/langevin
fix press/langevin command
===========================
Syntax
""""""
.. parsed-literal::
fix ID group-ID press/langevin keyword value ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* press/langevin = style name of this fix command
.. parsed-literal::
one or more keyword value pairs may be appended
keyword = *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *xz* or *yz* or *couple* or *dilate* or *modulus* or *temp* or *flip*
*iso* or *aniso* or *tri* values = Pstart Pstop Pdamp
Pstart,Pstop = scalar external pressure at start/end of run (pressure units)
Pdamp = pressure damping parameter (time units)
*x* or *y* or *z* or *xy* or *xz* or *yz* values = Pstart Pstop Pdamp
Pstart,Pstop = external stress tensor component at start/end of run (pressure units)
Pdamp = pressure damping parameter
*flip* value = *yes* or *no* = allow or disallow box flips when it becomes highly skewed
*couple* = *none* or *xyz* or *xy* or *yz* or *xz*
*friction* value = Friction coefficient for the barostat (time units)
*temp* values = Tstart, Tstop, seed
Tstart, Tstop = target temperature used for the barostat at start/end of run
seed = seed of the random number generator
*dilate* value = *all* or *partial*
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all press/langevin iso 0.0 0.0 1000.0 temp 300 300 487374
fix 2 all press/langevin aniso 0.0 0.0 1000.0 temp 100 300 238 dilate partial
Description
"""""""""""
Adjust the pressure of the system by using a Langevin stochastic barostat
:ref:`(Gronbech) <Gronbech>`, which rescales the system volume and
(optionally) the atoms coordinates within the simulation box every
timestep.
The Langevin barostat couple each direction *L* with a pseudo-particle that obeys
the Langevin equation such as:
.. math::
f_P = & \frac{N k_B T_{target}}{V} + \frac{1}{V d}\sum_{i=1}^{N} \vec r_i \cdot \vec f_i - P_{target} \\
Q\ddot{L} + \alpha{}\dot{L} = & f_P + \beta(t)\\
L^{n+1} = & L^{n} + bdt\dot{L}^{n} \frac{bdt^{2}}{2Q} \\
\dot{L}^{n+1} = & \alpha\dot{L}^{n} + \frac{dt}{2Q}\left(a f^{n}_{P} + f^{n+1}_{P}\right) + \frac{b}{Q}\beta^{n+1} \\
a = & \frac{1-\frac{\alpha{}dt}{2Q}}{1+\frac{\alpha{}dt}{2Q}} \\
b = & \frac{1}{1+\frac{\alpha{}dt}{2Q}} \\
\left< \beta(t)\beta(t') \right> = & 2\alpha k_B Tdt
Where :math:`dt` is the timestep :math:`\dot{L}` and :math:`\ddot{L}` the first
and second derivatives of the coupled direction with regard to time,
:math:`\alpha` is a friction coefficient, :math:`\beta` is a random gaussian
variable and :math:`Q` the effective mass of the coupled pseudoparticle. The
two first terms on the right-hand side of the first equation are the virial
expression of the canonical pressure. It is to be noted that the temperature
used to compute the pressure is not based on the atom velocities but rather on
the canonical
target temperature directly. This temperature is specified using the *temp*
keyword parameter and should be close to the expected target temperature of the
system.
Regardless of what atoms are in the fix group, a global pressure is
computed for all atoms. Similarly, when the size of the simulation
box is changed, all atoms are re-scaled to new positions, unless the
keyword *dilate* is specified with a value of *partial*, in which case
only the atoms in the fix group are re-scaled. The latter can be
useful for leaving the coordinates of atoms in a solid substrate
unchanged and controlling the pressure of a surrounding fluid.
.. note::
Unlike the :doc:`fix npt <fix_nh>` or :doc:`fix nph <fix_nh>` commands which
perform Nose-Hoover barostatting AND time integration, this fix does NOT
perform time integration of the atoms but only of the barostat coupled
coordinate. It then only modifies the box size and atom coordinates to
effect barostatting. Thus you must use a separate time integration fix,
like :doc:`fix nve <fix_nve>` or :doc:`fix nvt <fix_nh>` to actually update
the positions and velocities of atoms. This fix can be used in conjunction
with thermostatting fixes to control the temperature, such as :doc:`fix nvt
<fix_nh>` or :doc:`fix langevin <fix_langevin>` or :doc:`fix temp/berendsen
<fix_temp_berendsen>`.
See the :doc:`Howto barostat <Howto_barostat>` page for a
discussion of different ways to perform barostatting.
----------
The barostat is specified using one or more of the *iso*, *aniso*, *tri* *x*,
*y*, *z*, *xy*, *xz*, *yz*, and *couple* keywords. These keywords give you the
ability to specify the 3 diagonal components of an external stress tensor, and
to couple various of these components together so that the dimensions they
represent are varied together during a constant-pressure simulation.
The target pressures for each of the 6 diagonal components of the stress tensor
can be specified independently via the *x*, *y*, *z*, keywords, which
correspond to the 3 simulation box dimensions, and the *xy*, *xz* and *yz*
keywords which corresponds to the 3 simulation box tilt factors. For each
component, the external pressure or tensor component at each timestep is a
ramped value during the run from *Pstart* to *Pstop*\ . If a target pressure is
specified for a component, then the corresponding box dimension will change
during a simulation. For example, if the *y* keyword is used, the y-box length
will change. A box dimension will not change if that component is not
specified, although you have the option to change that dimension via the
:doc:`fix deform <fix_deform>` command.
The *Pdamp* parameter can be seen in the same way as a Nose-Hoover parameter as
it is used to compute the mass of the fictitious particle. Without friction,
the barostat can be compared to a single particle Nose-Hoover barostat and
should follow a similar decay in time. The mass of the barostat is
linked to *Pdamp* by the relation
:math:`Q=(N_{at}+1)\cdot{}k_BT_{target}\cdot{}P_{damp}^2`. Note that *Pdamp*
should be expressed in time units.
.. note::
As for Berendsen barostat, a Langevin barostat will not work well for
arbitrary values of *Pdamp*\ . If *Pdamp* is too small, the pressure and
volume can fluctuate wildly; if it is too large, the pressure will take a
very long time to equilibrate. A good choice for many models is a *Pdamp*
of around 1000 timesteps. However, note that *Pdamp* is specified in time
units, and that timesteps are NOT the same as time units for most
:doc:`units <units>` settings.
----------
The *temp* keyword sets the temperature to use in the equation of motion of the
barostat. This value is used to compute the value of the force :math:`f_P` in
the equation of motion. It is important to note that this value is not the
instantaneous temperature but a target temperature that ramps from *Tstart* to
*Tstop*. Also the required argument *seed* sets the seed for the random
number generator used in the generation of the random forces.
----------
The *couple* keyword allows two or three of the diagonal components of
the pressure tensor to be "coupled" together. The value specified
with the keyword determines which are coupled. For example, *xz*
means the *Pxx* and *Pzz* components of the stress tensor are coupled.
*Xyz* means all 3 diagonal components are coupled. Coupling means two
things: the instantaneous stress will be computed as an average of the
corresponding diagonal components, and the coupled box dimensions will
be changed together in lockstep, meaning coupled dimensions will be
dilated or contracted by the same percentage every timestep. The
*Pstart*, *Pstop*, *Pdamp* parameters for any coupled dimensions must
be identical. *Couple xyz* can be used for a 2d simulation; the *z*
dimension is simply ignored.
----------
The *iso*, *aniso* and *tri* keywords are simply shortcuts that are
equivalent to specifying several other keywords together.
The keyword *iso* means couple all 3 diagonal components together when
pressure is computed (hydrostatic pressure), and dilate/contract the
dimensions together. Using "iso Pstart Pstop Pdamp" is the same as
specifying these 4 keywords:
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
couple xyz
The keyword *aniso* means *x*, *y*, and *z* dimensions are controlled
independently using the *Pxx*, *Pyy*, and *Pzz* components of the
stress tensor as the driving forces, and the specified scalar external
pressure. Using "aniso Pstart Pstop Pdamp" is the same as specifying
these 4 keywords:
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
couple none
The keyword *tri* is the same as *aniso* but also adds the control on the
shear pressure coupled with the tilt factors.
.. parsed-literal::
x Pstart Pstop Pdamp
y Pstart Pstop Pdamp
z Pstart Pstop Pdamp
xy Pstart Pstop Pdamp
xz Pstart Pstop Pdamp
yz Pstart Pstop Pdamp
couple none
----------
The *flip* keyword allows the tilt factors for a triclinic box to
exceed half the distance of the parallel box length, as discussed
below. If the *flip* value is set to *yes*, the bound is enforced by
flipping the box when it is exceeded. If the *flip* value is set to
*no*, the tilt will continue to change without flipping. Note that if
applied stress induces large deformations (e.g. in a liquid), this
means the box shape can tilt dramatically and LAMMPS will run less
efficiently, due to the large volume of communication needed to
acquire ghost atoms around a processor's irregular-shaped subdomain.
For extreme values of tilt, LAMMPS may also lose atoms and generate an
error.
----------
The *friction* keyword sets the friction parameter :math:`\alpha` in the
equations of motion of the barostat. For each barostat direction, the value of
:math:`\alpha` depends on both *Pdamp* and *friction*. The value given as a
parameter is the Langevin characteristic time
:math:`\tau_{L}=\frac{Q}{\alpha}` in time units. The langevin time can be understood as a
decorrelation time for the pressure. A long Langevin time value will make the
barostat act as an underdamped oscillator while a short value will make it
act as an overdamped oscillator. The ideal configuration would be to find
the critical parameter of the barostat. Empirically this is observed to
occur for :math:`\tau_{L}\approx{}P_{damp}`. For this reason, if the *friction*
keyword is not used, the default value *Pdamp* is used for each barostat direction.
----------
This fix computes pressure each timestep. To do
this, the fix creates its own computes of style "pressure",
as if this command had been issued:
.. code-block:: LAMMPS
compute fix-ID_press group-ID pressure NULL virial
The kinetic contribution to the pressure is taken as the ensemble value
:math:`\frac{Nk_bT}{V}` and computed by the fix itself.
See the :doc:`compute pressure <compute_pressure>` command for details. Note
that the IDs of the new compute is the fix-ID + underscore + "press" and the
group for the new computes is the same as the fix group.
Note that this is NOT the compute used by thermodynamic output (see the
:doc:`thermo_style <thermo_style>` command) with ID = *thermo_press*. This
means you can change the attributes of this fix's pressure via the
:doc:`compute_modify <compute_modify>` command or print this temperature or
pressure during thermodynamic output via the :doc:`thermo_style custom
<thermo_style>` command using the appropriate compute-ID. It also means that
changing attributes of *thermo_temp* or *thermo_press* will have no effect on
this fix.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
The :doc:`fix_modify <fix_modify>` *press* option is
supported by this fix. You can use it to assign a
:doc:`compute <compute>` you have defined to this fix which will be used
in its pressure calculations.
No global or per-atom quantities are stored by this fix for access by
various :doc:`output commands <Howto_output>`.
This fix can ramp its target pressure and temperature over multiple runs, using
the *start* and *stop* keywords of the :doc:`run <run>` command. See the
:doc:`run <run>` command for details of how to do this. It is recommended that
the ramped temperature is the same as the effective temperature of the
thermostatted system. That is, if the system's temperature is ramped by other
commands, it is recommended to do the same with this pressure control.
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
Any dimension being adjusted by this fix must be periodic.
Related commands
""""""""""""""""
:doc:`fix press/berendsen <fix_press_berendsen>`,
:doc:`fix nve <fix_nve>`, :doc:`fix nph <fix_nh>`, :doc:`fix npt <fix_nh>`, :doc:`fix langevin <fix_langevin>`,
:doc:`fix_modify <fix_modify>`
Default
"""""""
The keyword defaults are *dilate* = all, *flip* = yes, and *friction* = *Pdamp*.
----------
.. _Gronbech:
**(Gronbech)** Gronbech-Jensen, Farago, J Chem Phys, 141, 194108 (2014).

View File

@ -1,4 +1,5 @@
.. index:: fix spring/self
.. index:: fix spring/self/kk
fix spring/self command
=======================
@ -80,6 +81,12 @@ invoked by the :doc:`minimize <minimize>` command.
you MUST enable the :doc:`fix_modify <fix_modify>` *energy* option for
this fix.
----------
.. include:: accel_styles.rst
----------
Restrictions
""""""""""""
none

View File

@ -71,14 +71,15 @@ imbue the SRD particles with fluid-like properties, including an
effective viscosity. Thus simulations with large solute particles can
be run more quickly, to measure solute properties like diffusivity
and viscosity in a background fluid. The usual LAMMPS fixes for such
simulations, such as :doc:`fix deform <fix_deform>`, :doc:`fix viscosity <fix_viscosity>`, and :doc:`fix nvt/sllod <fix_nvt_sllod>`,
simulations, such as :doc:`fix deform <fix_deform>`,
:doc:`fix viscosity <fix_viscosity>`, and :doc:`fix nvt/sllod <fix_nvt_sllod>`,
can be used in conjunction with the SRD model.
For more details on how the SRD model is implemented in LAMMPS, :ref:`this paper <Petersen1>` describes the implementation and usage of pure SRD
fluids. :ref:`This paper <Lechman>`, which is nearly complete, describes
the implementation and usage of mixture systems (solute particles in
an SRD fluid). See the examples/srd directory for sample input
scripts using SRD particles in both settings.
For more details on how the SRD model is implemented in LAMMPS,
:ref:`(Petersen) <Petersen1>` describes the implementation and usage of
pure SRD fluids. See the ``examples/srd`` directory for sample input
scripts using SRD particles for that and for mixture systems (solute
particles in an SRD fluid).
This fix does two things:
@ -357,28 +358,28 @@ These are the 12 quantities. All are values for the current timestep,
except for quantity 5 and the last three, each of which are
cumulative quantities since the beginning of the run.
* (1) # of SRD/big collision checks performed
* (2) # of SRDs which had a collision
* (3) # of SRD/big collisions (including multiple bounces)
* (4) # of SRD particles inside a big particle
* (5) # of SRD particles whose velocity was rescaled to be < Vmax
* (6) # of bins for collision searching
* (7) # of bins for SRD velocity rotation
* (8) # of bins in which SRD temperature was computed
* (9) SRD temperature
* (10) # of SRD particles which have undergone max # of bounces
* (11) max # of bounces any SRD particle has had in a single step
* (12) # of reneighborings due to SRD particles moving too far
(1) # of SRD/big collision checks performed
(2) # of SRDs which had a collision
(3) # of SRD/big collisions (including multiple bounces)
(4) # of SRD particles inside a big particle
(5) # of SRD particles whose velocity was rescaled to be < Vmax
(6) # of bins for collision searching
(7) # of bins for SRD velocity rotation
(8) # of bins in which SRD temperature was computed
(9) SRD temperature
(10) # of SRD particles which have undergone max # of bounces
(11) max # of bounces any SRD particle has had in a single step
(12) # of reneighborings due to SRD particles moving too far
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This command can only be used if LAMMPS was built with the SRD
package. See the :doc:`Build package <Build_package>` doc
page for more info.
This command can only be used if LAMMPS was built with the SRD package.
See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
@ -403,7 +404,3 @@ no, and rescale = yes.
**(Petersen)** Petersen, Lechman, Plimpton, Grest, in' t Veld, Schunk, J
Chem Phys, 132, 174106 (2010).
.. _Lechman:
**(Lechman)** Lechman, et al, in preparation (2010).

View File

@ -22,12 +22,12 @@ Examples
.. code-block:: LAMMPS
pair_style hybrid/overlay ilp/tmd 16.0 1
pair_coeff * * ilp/tmd TMD.ILP Mo S S
pair_coeff * * ilp/tmd MoS2.ILP Mo S S
pair_style hybrid/overlay sw/mod sw/mod ilp/tmd 16.0
pair_coeff * * sw/mod 1 tmd.sw.mod Mo S S NULL NULL NULL
pair_coeff * * sw/mod 2 tmd.sw.mod NULL NULL NULL Mo S S
pair_coeff * * ilp/tmd TMD.ILP Mo S S Mo S S
pair_coeff * * ilp/tmd MoS2.ILP Mo S S Mo S S
Description
"""""""""""
@ -69,7 +69,7 @@ calculating the normals.
each atom `i`, its six nearest neighboring atoms belonging to the same
sub-layer are chosen to define the normal vector `{\bf n}_i`.
The parameter file (e.g. TMD.ILP), is intended for use with *metal*
The parameter file (e.g. MoS2.ILP), is intended for use with *metal*
:doc:`units <units>`, with energies in meV. Two additional parameters,
*S*, and *rcut* are included in the parameter file. *S* is designed to
facilitate scaling of energies. *rcut* is designed to build the neighbor
@ -77,7 +77,7 @@ list for calculating the normals for each atom pair.
.. note::
The parameters presented in the parameter file (e.g. TMD.ILP),
The parameters presented in the parameter file (e.g. MoS2.ILP),
are fitted with taper function by setting the cutoff equal to 16.0
Angstrom. Using different cutoff or taper function should be careful.
These parameters provide a good description in both short- and long-range
@ -133,10 +133,10 @@ if LAMMPS was built with that package. See the :doc:`Build package
This pair style requires the newton setting to be *on* for pair
interactions.
The TMD.ILP potential file provided with LAMMPS (see the potentials
The MoS2.ILP potential file provided with LAMMPS (see the potentials
directory) are parameterized for *metal* units. You can use this
potential with any LAMMPS units, but you would need to create your own
custom TMD.ILP potential file with coefficients listed in the appropriate
custom MoS2.ILP potential file with coefficients listed in the appropriate
units, if your simulation does not use *metal* units.
Related commands

View File

@ -43,22 +43,22 @@ Examples
Description
"""""""""""
Style *reaxff* computes the ReaxFF potential of van Duin, Goddard and
co-workers. ReaxFF uses distance-dependent bond-order functions to
Pair style *reaxff* computes the ReaxFF potential of van Duin, Goddard
and co-workers. ReaxFF uses distance-dependent bond-order functions to
represent the contributions of chemical bonding to the potential
energy. There is more than one version of ReaxFF. The version
energy. There is more than one version of ReaxFF. The version
implemented in LAMMPS uses the functional forms documented in the
supplemental information of the following paper:
:ref:`(Chenoweth et al., 2008) <Chenoweth_20082>`. The version integrated
into LAMMPS matches the version of ReaxFF From Summer 2010. For more
technical details about the pair reaxff implementation of ReaxFF, see
the :ref:`(Aktulga) <Aktulga>` paper. The *reaxff* style was initially
implemented as a stand-alone C code and is now converted to C++ and
integrated into LAMMPS as a package.
:ref:`(Chenoweth et al., 2008) <Chenoweth_20082>` and matches the
version of the reference ReaxFF implementation from Summer 2010. For
more technical details about the implementation of ReaxFF in pair style
*reaxff*, see the :ref:`(Aktulga) <Aktulga>` paper. The *reaxff* style
was initially implemented as a stand-alone C code and is now converted
to C++ and integrated into LAMMPS as a package.
The *reaxff/kk* style is a Kokkos version of the ReaxFF potential that
is derived from the *reaxff* style. The Kokkos version can run on GPUs
and can also use OpenMP multithreading. For more information about the
is derived from the *reaxff* style. The Kokkos version can run on GPUs
and can also use OpenMP multithreading. For more information about the
Kokkos package, see :doc:`Packages details <Packages_details>` and
:doc:`Speed kokkos <Speed_kokkos>` doc pages. One important
consideration when using the *reaxff/kk* style is the choice of either

View File

@ -1,10 +1,11 @@
.. index:: pair_style snap
.. index:: pair_style snap/intel
.. index:: pair_style snap/kk
pair_style snap command
=======================
Accelerator Variants: *snap/kk*
Accelerator Variants: *snap/intel*, *snap/kk*
Syntax
""""""
@ -260,6 +261,14 @@ This style is part of the ML-SNAP package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
The *snap/intel* accelerator variant will *only* be available if LAMMPS
is built with Intel *compilers* and for CPUs with AVX-512 support.
While the INTEL package in general allows multiple floating point
precision modes to be selected, *snap/intel* will currently always use
full double precision regardless of the precision mode selected.
Additionally, the *intel* variant of snap will **NOT** use multiple
threads with OpenMP.
Related commands
""""""""""""""""

View File

@ -1,11 +1,12 @@
.. index:: pair_style yukawa/colloid
.. index:: pair_style yukawa/colloid/gpu
.. index:: pair_style yukawa/colloid/kk
.. index:: pair_style yukawa/colloid/omp
pair_style yukawa/colloid command
=================================
Accelerator Variants: *yukawa/colloid/gpu*, *yukawa/colloid/omp*
Accelerator Variants: *yukawa/colloid/gpu*, *yukawa/colloid/kk*, *yukawa/colloid/omp*
Syntax
""""""
@ -131,6 +132,12 @@ per-type polydispersity is allowed. This means all particles of the
same type must have the same diameter. Each type can have a different
diameter.
----------
.. include:: accel_styles.rst
----------
Related commands
""""""""""""""""

View File

@ -1,4 +1,4 @@
Sphinx >= 5.3.0, <7.2.0
Sphinx >= 5.3.0, <8.0
sphinxcontrib-spelling
sphinxcontrib-jquery
git+https://github.com/akohlmey/sphinx-fortran@parallel-read

View File

@ -1506,6 +1506,7 @@ Im
imageint
Imageint
Imagemagick
imagename
imd
Impey
impl
@ -2587,6 +2588,7 @@ Nurdin
Nvalue
nvaluelast
Nvalues
nvar
nvc
nvcc
nve
@ -2890,6 +2892,7 @@ pscrozi
pseudocode
Pseudocode
pseudodynamics
pseudoparticle
pseudopotential
psllod
pSp
@ -3753,6 +3756,7 @@ uncomment
uncommented
uncompress
uncompute
underdamped
underprediction
undump
uniaxial

View File

@ -110,6 +110,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
ADDSYM(extract_variable);
ADDSYM(extract_variable_datatype);
ADDSYM(set_variable);
ADDSYM(variable_info);
ADDSYM(gather_atoms);
ADDSYM(gather_atoms_concat);

View File

@ -106,7 +106,7 @@ typedef void (*FixExternalFnPtr)(void *, int, int, int *, double **, double **);
typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **);
#endif
#define LAMMPSPLUGIN_ABI_VERSION 1
#define LAMMPSPLUGIN_ABI_VERSION 2
struct _liblammpsplugin {
int abiversion;
int has_exceptions;
@ -127,7 +127,7 @@ struct _liblammpsplugin {
void (*error)(void *, int, const char *);
void (*file)(void *, char *);
void (*file)(void *, const char *);
char *(*command)(void *, const char *);
void (*commands_list)(void *, int, const char **);
void (*commands_string)(void *, const char *);
@ -155,6 +155,7 @@ struct _liblammpsplugin {
void *(*extract_variable)(void *, const char *, char *);
int (*extract_variable_datatype)(void *, const char *);
int (*set_variable)(void *, char *, char *);
int (*variable_info)(void *, int, char *, int);
void (*gather_atoms)(void *, const char *, int, int, void *);
void (*gather_atoms_concat)(void *, const char *, int, int, void *);

View File

@ -39,7 +39,7 @@ fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
dump 1 all atom 1 dump.hdnnp
# dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION

View File

@ -0,0 +1,53 @@
###############################################################################
# MD simulation for HDNNP water
###############################################################################
###############################################################################
# VARIABLES
###############################################################################
clear
# Configuration files
variable cfgFile string "data.H2O-360mol"
# Timesteps
variable numSteps equal 10
variable dt equal 0.0005
# HDNNP
variable hdnnpCutoff equal 6.36
variable hdnnpDir string "hdnnp-data"
###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
region box block 0.0 2.2695686722465727E+01 0.0 2.3586033624598713E+01 0.0 2.2237130028217017E+01
create_box 3 box
mass 1 1.0
read_data ${cfgFile} add append offset 1 0 0 0 0
timestep ${dt}
thermo 1
###############################################################################
# HDNNP
###############################################################################
pair_style hybrid lj/cut 6.0 hdnnp ${hdnnpCutoff} dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_coeff * * hdnnp NULL H O
pair_coeff 1 * lj/cut 0.1 3.0
###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
#dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}

View File

@ -0,0 +1,667 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-264-g174825fe8c)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
###############################################################################
# MD simulation for HDNNP water
###############################################################################
###############################################################################
# VARIABLES
###############################################################################
clear
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# Configuration files
variable cfgFile string "data.H2O-360mol"
# Timesteps
variable numSteps equal 10
variable dt equal 0.0005
# HDNNP
variable hdnnpCutoff equal 6.36
variable hdnnpDir string "hdnnp-data"
###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
read_data ${cfgFile}
read_data data.H2O-360mol
Reading data file ...
orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
1 by 1 by 1 MPI processor grid
reading atoms ...
1080 atoms
read_data CPU = 0.004 seconds
timestep ${dt}
timestep 0.0005
thermo 1
###############################################################################
# HDNNP
###############################################################################
pair_style hdnnp ${hdnnpCutoff} dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hdnnp 6.36 dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hdnnp 6.36 dir hdnnp-data showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_coeff * * H O
###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
# dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}
run 10
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- ML-HDNNP package: doi:10.1021/acs.jctc.8b00770
@Article{Singraber19,
author = {Singraber, Andreas and Behler, J{"o}rg and Dellago, Christoph},
title = {Library-Based {LAMMPS} Implementation of High-Dimensional
Neural Network Potentials},
year = {2019},
month = mar,
volume = {15},
pages = {1827--1840},
doi = {10.1021/acs.jctc.8b00770},
journal = {J.~Chem.\ Theory Comput.},
number = {3}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
*******************************************************************************
WELCOME TO n²p², A SOFTWARE PACKAGE FOR NEURAL NETWORK POTENTIALS!
------------------------------------------------------------------
n²p² version (from git): patch_2Aug2023-264-g174825fe8c
(version.h): v2.2.0
------------------------------------------------------------
Git branch : collected-small-changes
Git revision : 174825fe8c9493cb252d7b9e8dafdcc5d74be96d
Compile date/time : Aug 23 2023 08:43:11
------------------------------------------------------------
Features/Flags:
------------------------------------------------------------
Symmetry function groups : enabled
Symmetry function cache : enabled
Timing function available : available
Asymmetric polynomial SFs : available
SF low neighbor number check : enabled
SF derivative memory layout : reduced
MPI explicitly disabled : no
------------------------------------------------------------
Please cite the following papers when publishing results obtained with n²p²:
-------------------------------------------------------------------------------
* General citation for n²p² and the LAMMPS interface:
Singraber, A.; Behler, J.; Dellago, C.
Library-Based LAMMPS Implementation of High-Dimensional
Neural Network Potentials.
J. Chem. Theory Comput. 2019 15 (3), 18271840.
https://doi.org/10.1021/acs.jctc.8b00770
-------------------------------------------------------------------------------
* Additionally, if you use the NNP training features of n²p²:
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C.
Parallel Multistream Training of High-Dimensional Neural
Network Potentials.
J. Chem. Theory Comput. 2019, 15 (5), 30753092.
https://doi.org/10.1021/acs.jctc.8b01092
-------------------------------------------------------------------------------
* Additionally, if polynomial symmetry functions are used:
Bircher, M. P.; Singraber, A.; Dellago, C.
Improved Description of Atomic Environments Using Low-Cost
Polynomial Functions with Compact Support.
arXiv:2010.14414 [cond-mat, physics:physics] 2020.
https://arxiv.org/abs/2010.14414
*******************************************************************************
*** SETUP: SETTINGS FILE ******************************************************
Settings file name: hdnnp-data/input.nn
Read 120 lines.
Found 70 lines with keywords.
This settings file defines a short-range only NNP.
*******************************************************************************
*** SETUP: NORMALIZATION ******************************************************
Data set normalization is used.
Mean energy per atom : -2.5521343547039809E+01
Conversion factor energy : 2.4265748255366972E+02
Conversion factor length : 5.8038448995319847E+00
*******************************************************************************
*** SETUP: ELEMENT MAP ********************************************************
Number of element strings found: 2
Element 0: H ( 1)
Element 1: O ( 8)
*******************************************************************************
*** SETUP: ELEMENTS ***********************************************************
Number of elements is consistent: 2
Atomic energy offsets per element:
Element 0: 0.00000000E+00
Element 1: 0.00000000E+00
Energy offsets are automatically subtracted from reference energies.
*******************************************************************************
*** SETUP: CUTOFF FUNCTIONS ***************************************************
Parameter alpha for inner cutoff: 0.000000
Inner cutoff = Symmetry function cutoff * alpha
Equal cutoff function type for all symmetry functions:
CutoffFunction::CT_TANHU (2)
f(r) = tanh^3(1 - r/rc)
*******************************************************************************
*** SETUP: SYMMETRY FUNCTIONS *************************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
Short range atomic symmetry functions element H :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 H 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 51
2 H 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 61
3 H 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 52
4 H 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 62
5 H 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 53
6 H 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 63
7 H 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 54
8 H 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 64
9 H 2 ct2 O 1.500E-01 9.000E-01 1.200E+01 0.00 65
10 H 2 ct2 H 1.500E-01 1.900E+00 1.200E+01 0.00 55
11 H 2 ct2 O 3.000E-01 9.000E-01 1.200E+01 0.00 66
12 H 2 ct2 H 3.000E-01 1.900E+00 1.200E+01 0.00 56
13 H 2 ct2 O 6.000E-01 9.000E-01 1.200E+01 0.00 67
14 H 2 ct2 H 6.000E-01 1.900E+00 1.200E+01 0.00 57
15 H 2 ct2 O 1.500E+00 9.000E-01 1.200E+01 0.00 68
16 H 2 ct2 H 1.500E+00 1.900E+00 1.200E+01 0.00 58
17 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 115
18 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 114
19 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 105
20 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 103
21 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 100
22 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 113
23 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 98
24 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 112
25 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 95
26 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 93
27 H 3 ct2 H O 2.000E-01 0.000E+00 1.200E+01 1 1.0 0.00 90
-------------------------------------------------------------------------------------------------
Short range atomic symmetry functions element O :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 O 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 70
2 O 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 80
3 O 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 71
4 O 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 81
5 O 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 72
6 O 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 82
7 O 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 73
8 O 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 83
9 O 2 ct2 H 1.500E-01 9.000E-01 1.200E+01 0.00 74
10 O 2 ct2 O 1.500E-01 4.000E+00 1.200E+01 0.00 84
11 O 2 ct2 H 3.000E-01 9.000E-01 1.200E+01 0.00 75
12 O 2 ct2 O 3.000E-01 4.000E+00 1.200E+01 0.00 85
13 O 2 ct2 H 6.000E-01 9.000E-01 1.200E+01 0.00 76
14 O 2 ct2 O 6.000E-01 4.000E+00 1.200E+01 0.00 86
15 O 2 ct2 H 1.500E+00 9.000E-01 1.200E+01 0.00 77
16 O 2 ct2 O 1.500E+00 4.000E+00 1.200E+01 0.00 87
17 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 110
18 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 120
19 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 109
20 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 119
21 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 104
22 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 102
23 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 99
24 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 108
25 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 118
26 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 97
27 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 107
28 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 117
29 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 94
30 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 92
-------------------------------------------------------------------------------------------------
Minimum cutoff radius for element H: 12.000000
Minimum cutoff radius for element O: 12.000000
Maximum cutoff radius (global) : 12.000000
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION MEMORY *******************************************
Symmetry function derivatives memory table for element H :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 15 of 27 ( 55.6 %)
- O: 19 of 27 ( 70.4 %)
-------------------------------------------------------------------------------
Symmetry function derivatives memory table for element O :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 18 of 30 ( 60.0 %)
- O: 16 of 30 ( 53.3 %)
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION CACHE ********************************************
Element H: in total 4 caches, used 17.00 times on average.
Element O: in total 4 caches, used 17.00 times on average.
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION GROUPS *******************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
mi ..... Member index.
sfi .... Symmetry function index.
e ...... Recalculate exponential term.
Short range atomic symmetry function groups element H :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 H 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 51 1 1
- - - - - 1.000E-02 0.000E+00 - - 52 2 3
- - - - - 3.000E-02 0.000E+00 - - 53 3 5
- - - - - 6.000E-02 0.000E+00 - - 54 4 7
- - - - - 1.500E-01 1.900E+00 - - 55 5 10
- - - - - 3.000E-01 1.900E+00 - - 56 6 12
- - - - - 6.000E-01 1.900E+00 - - 57 7 14
- - - - - 1.500E+00 1.900E+00 - - 58 8 16
2 H 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 61 1 2
- - - - - 1.000E-02 0.000E+00 - - 62 2 4
- - - - - 3.000E-02 0.000E+00 - - 63 3 6
- - - - - 6.000E-02 0.000E+00 - - 64 4 8
- - - - - 1.500E-01 9.000E-01 - - 65 5 9
- - - - - 3.000E-01 9.000E-01 - - 66 6 11
- - - - - 6.000E-01 9.000E-01 - - 67 7 13
- - - - - 1.500E+00 9.000E-01 - - 68 8 15
3 H 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 105 1 19 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 103 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 100 3 21 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 98 4 23 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 95 5 25 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 93 6 26 0
- - - - - - 2.000E-01 0.000E+00 - 1 1.0 - 90 7 27 1
4 H 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 115 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 114 2 18 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 113 3 22 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 112 4 24 0
----------------------------------------------------------------------------------------------------------
Short range atomic symmetry function groups element O :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 O 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 70 1 1
- - - - - 1.000E-02 0.000E+00 - - 71 2 3
- - - - - 3.000E-02 0.000E+00 - - 72 3 5
- - - - - 6.000E-02 0.000E+00 - - 73 4 7
- - - - - 1.500E-01 9.000E-01 - - 74 5 9
- - - - - 3.000E-01 9.000E-01 - - 75 6 11
- - - - - 6.000E-01 9.000E-01 - - 76 7 13
- - - - - 1.500E+00 9.000E-01 - - 77 8 15
2 O 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 80 1 2
- - - - - 1.000E-02 0.000E+00 - - 81 2 4
- - - - - 3.000E-02 0.000E+00 - - 82 3 6
- - - - - 6.000E-02 0.000E+00 - - 83 4 8
- - - - - 1.500E-01 4.000E+00 - - 84 5 10
- - - - - 3.000E-01 4.000E+00 - - 85 6 12
- - - - - 6.000E-01 4.000E+00 - - 86 7 14
- - - - - 1.500E+00 4.000E+00 - - 87 8 16
3 O 3 ct2 H H * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 104 1 21 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 102 2 22 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 99 3 23 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 97 4 26 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 94 5 29 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 92 6 30 0
4 O 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 110 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 109 2 19 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 108 3 24 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 107 4 27 0
5 O 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 120 1 18 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 119 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 118 3 25 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 117 4 28 0
----------------------------------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: NEURAL NETWORKS ****************************************************
Normalize neurons (all elements): 0
-------------------------------------------------------------------------------
Atomic short range NN for element H :
Number of weights : 1325
Number of biases : 51
Number of connections: 1376
Architecture 27 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
-------------------------------------------------------------------------------
Atomic short range NN for element O :
Number of weights : 1400
Number of biases : 51
Number of connections: 1451
Architecture 30 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
28 G
29 G
30 G
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION SCALING ******************************************
Equal scaling type for all symmetry functions:
Scaling type::ST_SCALECENTER (3)
Gs = Smin + (Smax - Smin) * (G - Gmean) / (Gmax - Gmin)
Smin = 0.000000
Smax = 1.000000
Symmetry function scaling statistics from file: hdnnp-data/scaling.data
-------------------------------------------------------------------------------
Abbreviations:
--------------
ind ..... Symmetry function index.
min ..... Minimum symmetry function value.
max ..... Maximum symmetry function value.
mean .... Mean symmetry function value.
sigma ... Standard deviation of symmetry function values.
sf ...... Scaling factor for derivatives.
Smin .... Desired minimum scaled symmetry function value.
Smax .... Desired maximum scaled symmetry function value.
t ....... Scaling type.
Scaling data for symmetry functions element H :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.09E+00 9.62E+00 2.27E+00 6.79E-01 1.17E-01 0.00 1.00 3
2 7.33E-01 5.00E+00 1.33E+00 3.39E-01 2.34E-01 0.00 1.00 3
3 7.60E-01 7.14E+00 1.65E+00 5.08E-01 1.57E-01 0.00 1.00 3
4 5.48E-01 3.77E+00 1.02E+00 2.54E-01 3.11E-01 0.00 1.00 3
5 4.01E-01 4.15E+00 9.09E-01 2.98E-01 2.67E-01 0.00 1.00 3
6 3.62E-01 2.27E+00 6.49E-01 1.48E-01 5.25E-01 0.00 1.00 3
7 1.89E-01 2.23E+00 4.57E-01 1.60E-01 4.90E-01 0.00 1.00 3
8 2.67E-01 1.32E+00 4.24E-01 8.05E-02 9.49E-01 0.00 1.00 3
9 2.45E-01 9.48E-01 3.62E-01 5.30E-02 1.42E+00 0.00 1.00 3
10 2.22E-01 2.76E+00 5.39E-01 2.01E-01 3.94E-01 0.00 1.00 3
11 1.47E-01 5.56E-01 2.68E-01 2.62E-02 2.45E+00 0.00 1.00 3
12 9.91E-02 1.73E+00 2.96E-01 1.16E-01 6.14E-01 0.00 1.00 3
13 6.51E-02 3.45E-01 1.85E-01 1.97E-02 3.57E+00 0.00 1.00 3
14 3.17E-02 9.13E-01 1.50E-01 5.35E-02 1.13E+00 0.00 1.00 3
15 2.92E-03 2.65E-01 7.65E-02 1.88E-02 3.82E+00 0.00 1.00 3
16 3.21E-04 2.87E-01 4.58E-02 2.33E-02 3.49E+00 0.00 1.00 3
17 2.47E-04 1.38E-01 1.77E-02 9.75E-03 7.23E+00 0.00 1.00 3
18 5.10E-03 5.83E-01 2.39E-02 3.78E-02 1.73E+00 0.00 1.00 3
19 3.23E-04 2.16E-01 1.71E-02 1.40E-02 4.63E+00 0.00 1.00 3
20 4.96E-02 1.69E+00 1.45E-01 1.10E-01 6.11E-01 0.00 1.00 3
21 3.41E-03 3.16E-01 1.84E-02 2.01E-02 3.20E+00 0.00 1.00 3
22 1.31E-04 1.03E-01 6.37E-03 6.61E-03 9.76E+00 0.00 1.00 3
23 3.38E-02 9.16E-01 8.13E-02 5.79E-02 1.13E+00 0.00 1.00 3
24 4.17E-04 1.58E-01 4.66E-03 9.86E-03 6.35E+00 0.00 1.00 3
25 7.35E-04 5.92E-02 3.70E-03 3.31E-03 1.71E+01 0.00 1.00 3
26 8.98E-03 1.94E-01 2.41E-02 1.10E-02 5.40E+00 0.00 1.00 3
27 2.12E-04 8.78E-03 2.06E-03 5.88E-04 1.17E+02 0.00 1.00 3
-------------------------------------------------------------------------------
Scaling data for symmetry functions element O :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.51E+00 1.00E+01 2.65E+00 6.78E-01 1.18E-01 0.00 1.00 3
2 4.44E-01 4.62E+00 9.66E-01 3.37E-01 2.39E-01 0.00 1.00 3
3 1.19E+00 7.53E+00 2.03E+00 5.06E-01 1.58E-01 0.00 1.00 3
4 2.76E-01 3.39E+00 6.59E-01 2.50E-01 3.21E-01 0.00 1.00 3
5 8.06E-01 4.54E+00 1.30E+00 2.94E-01 2.68E-01 0.00 1.00 3
6 1.05E-01 1.89E+00 3.07E-01 1.42E-01 5.60E-01 0.00 1.00 3
7 5.69E-01 2.62E+00 8.48E-01 1.57E-01 4.89E-01 0.00 1.00 3
8 2.33E-02 9.36E-01 1.11E-01 6.98E-02 1.10E+00 0.00 1.00 3
9 5.14E-01 1.85E+00 7.25E-01 9.80E-02 7.46E-01 0.00 1.00 3
10 1.11E-01 2.91E+00 4.75E-01 2.34E-01 3.57E-01 0.00 1.00 3
11 3.53E-01 1.07E+00 5.35E-01 4.52E-02 1.39E+00 0.00 1.00 3
12 3.04E-02 2.53E+00 3.17E-01 2.10E-01 4.00E-01 0.00 1.00 3
13 1.60E-01 6.63E-01 3.70E-01 3.08E-02 1.99E+00 0.00 1.00 3
14 2.78E-03 2.30E+00 1.77E-01 1.86E-01 4.35E-01 0.00 1.00 3
15 9.56E-03 3.91E-01 1.53E-01 2.79E-02 2.62E+00 0.00 1.00 3
16 3.75E-06 2.04E+00 5.41E-02 1.43E-01 4.91E-01 0.00 1.00 3
17 2.47E-03 3.43E-01 1.67E-02 2.19E-02 2.93E+00 0.00 1.00 3
18 1.74E-05 5.63E-02 9.55E-04 3.36E-03 1.78E+01 0.00 1.00 3
19 5.48E-02 3.02E+00 2.04E-01 2.01E-01 3.37E-01 0.00 1.00 3
20 1.38E-03 4.99E-01 1.28E-02 3.18E-02 2.01E+00 0.00 1.00 3
21 6.69E-03 2.67E-01 3.09E-02 1.71E-02 3.84E+00 0.00 1.00 3
22 1.70E-02 1.42E+00 7.63E-02 9.29E-02 7.14E-01 0.00 1.00 3
23 1.98E-02 4.08E-01 4.88E-02 2.55E-02 2.58E+00 0.00 1.00 3
24 5.28E-04 2.33E-01 7.21E-03 1.45E-02 4.30E+00 0.00 1.00 3
25 1.11E-05 3.53E-02 4.25E-04 2.05E-03 2.83E+01 0.00 1.00 3
26 1.60E-02 8.22E-01 5.08E-02 5.28E-02 1.24E+00 0.00 1.00 3
27 3.99E-03 7.86E-01 3.69E-02 5.05E-02 1.28E+00 0.00 1.00 3
28 4.05E-05 9.84E-02 1.21E-03 5.79E-03 1.02E+01 0.00 1.00 3
29 6.04E-03 9.93E-02 1.62E-02 5.52E-03 1.07E+01 0.00 1.00 3
30 2.96E-03 1.55E-01 1.16E-02 8.94E-03 6.59E+00 0.00 1.00 3
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION STATISTICS ***************************************
Equal symmetry function statistics for all elements.
Collect min/max/mean/sigma : 0
Collect extrapolation warnings : 1
Write extrapolation warnings immediately to stderr: 0
Halt on any extrapolation warning : 0
*******************************************************************************
*** SETUP: NEURAL NETWORK WEIGHTS *********************************************
Short NN weight file name format: hdnnp-data/weights.%03d.data
Setting short NN weights for element H from file: hdnnp-data/weights.001.data
Setting short NN weights for element O from file: hdnnp-data/weights.008.data
*******************************************************************************
*** SETUP: LAMMPS INTERFACE ***************************************************
Individual extrapolation warnings will not be shown.
Extrapolation warning summary will be shown every 5 timesteps.
The simulation will be stopped when 100 extrapolation warnings are exceeded.
Extrapolation warnings are accumulated over all time steps.
-------------------------------------------------------------------------------
CAUTION: If the LAMMPS unit system differs from the one used
during NN training, appropriate conversion factors
must be provided (see keywords cflength and cfenergy).
Length unit conversion factor: 1.8897261327999999E+00
Energy unit conversion factor: 3.6749325399999998E-02
Checking consistency of cutoff radii (in LAMMPS units):
LAMMPS Cutoff (via pair_coeff) : 6.360E+00
Maximum symmetry function cutoff: 6.350E+00
Cutoff radii are consistent.
-------------------------------------------------------------------------------
Element mapping string from LAMMPS to n2p2: "1:H,2:O"
CAUTION: Please ensure that this mapping between LAMMPS
atom types and NNP elements is consistent:
---------------------------
LAMMPS type | NNP element
---------------------------
1 <-> H ( 1)
2 <-> O ( 8)
---------------------------
NNP setup for LAMMPS completed.
*******************************************************************************
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8.36
ghost atom cutoff = 8.36
binsize = 4.18, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair hdnnp, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
### NNP EW SUMMARY ### TS: 0 EW 0 EWPERSTEP 0.000e+00
Per MPI rank memory allocation (min/avg/max) = 4.021 | 4.021 | 4.021 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -750069.48 0 -750069.48 -5297.5537
1 8.5815594 -750070.71 0 -750069.51 -5249.2914
2 30.988787 -750073.91 0 -750069.59 -5023.6945
3 58.859866 -750077.88 0 -750069.67 -4427.8346
4 82.576399 -750081.26 0 -750069.74 -3275.4378
### NNP EW SUMMARY ### TS: 5 EW 0 EWPERSTEP 0.000e+00
5 94.968097 -750083.01 0 -750069.76 -1511.6733
6 93.724286 -750082.8 0 -750069.73 709.20465
7 82.243957 -750081.13 0 -750069.66 3020.5084
8 68.611429 -750079.14 0 -750069.57 4922.5176
9 62.314385 -750078.21 0 -750069.51 5933.1543
### NNP EW SUMMARY ### TS: 10 EW 0 EWPERSTEP 0.000e+00
10 69.501045 -750079.21 0 -750069.52 5761.8646
Loop time of 3.2801 on 1 procs for 10 steps with 1080 atoms
Performance: 0.132 ns/day, 182.228 hours/ns, 3.049 timesteps/s, 3.293 katom-step/s
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 3.2794 | 3.2794 | 3.2794 | 0.0 | 99.98
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00030785 | 0.00030785 | 0.00030785 | 0.0 | 0.01
Output | 0.00018531 | 0.00018531 | 0.00018531 | 0.0 | 0.01
Modify | 0.00013118 | 0.00013118 | 0.00013118 | 0.0 | 0.00
Other | | 9.142e-05 | | | 0.00
Nlocal: 1080 ave 1080 max 1080 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 4536 ave 4536 max 4536 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 239270 ave 239270 max 239270 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 239270
Ave neighs/atom = 221.5463
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:03

View File

@ -0,0 +1,667 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-264-g174825fe8c)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
###############################################################################
# MD simulation for HDNNP water
###############################################################################
###############################################################################
# VARIABLES
###############################################################################
clear
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# Configuration files
variable cfgFile string "data.H2O-360mol"
# Timesteps
variable numSteps equal 10
variable dt equal 0.0005
# HDNNP
variable hdnnpCutoff equal 6.36
variable hdnnpDir string "hdnnp-data"
###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
read_data ${cfgFile}
read_data data.H2O-360mol
Reading data file ...
orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
2 by 2 by 1 MPI processor grid
reading atoms ...
1080 atoms
read_data CPU = 0.007 seconds
timestep ${dt}
timestep 0.0005
thermo 1
###############################################################################
# HDNNP
###############################################################################
pair_style hdnnp ${hdnnpCutoff} dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hdnnp 6.36 dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hdnnp 6.36 dir hdnnp-data showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_coeff * * H O
###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
# dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}
run 10
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- ML-HDNNP package: doi:10.1021/acs.jctc.8b00770
@Article{Singraber19,
author = {Singraber, Andreas and Behler, J{"o}rg and Dellago, Christoph},
title = {Library-Based {LAMMPS} Implementation of High-Dimensional
Neural Network Potentials},
year = {2019},
month = mar,
volume = {15},
pages = {1827--1840},
doi = {10.1021/acs.jctc.8b00770},
journal = {J.~Chem.\ Theory Comput.},
number = {3}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
*******************************************************************************
WELCOME TO n²p², A SOFTWARE PACKAGE FOR NEURAL NETWORK POTENTIALS!
------------------------------------------------------------------
n²p² version (from git): patch_2Aug2023-264-g174825fe8c
(version.h): v2.2.0
------------------------------------------------------------
Git branch : collected-small-changes
Git revision : 174825fe8c9493cb252d7b9e8dafdcc5d74be96d
Compile date/time : Aug 23 2023 08:43:11
------------------------------------------------------------
Features/Flags:
------------------------------------------------------------
Symmetry function groups : enabled
Symmetry function cache : enabled
Timing function available : available
Asymmetric polynomial SFs : available
SF low neighbor number check : enabled
SF derivative memory layout : reduced
MPI explicitly disabled : no
------------------------------------------------------------
Please cite the following papers when publishing results obtained with n²p²:
-------------------------------------------------------------------------------
* General citation for n²p² and the LAMMPS interface:
Singraber, A.; Behler, J.; Dellago, C.
Library-Based LAMMPS Implementation of High-Dimensional
Neural Network Potentials.
J. Chem. Theory Comput. 2019 15 (3), 18271840.
https://doi.org/10.1021/acs.jctc.8b00770
-------------------------------------------------------------------------------
* Additionally, if you use the NNP training features of n²p²:
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C.
Parallel Multistream Training of High-Dimensional Neural
Network Potentials.
J. Chem. Theory Comput. 2019, 15 (5), 30753092.
https://doi.org/10.1021/acs.jctc.8b01092
-------------------------------------------------------------------------------
* Additionally, if polynomial symmetry functions are used:
Bircher, M. P.; Singraber, A.; Dellago, C.
Improved Description of Atomic Environments Using Low-Cost
Polynomial Functions with Compact Support.
arXiv:2010.14414 [cond-mat, physics:physics] 2020.
https://arxiv.org/abs/2010.14414
*******************************************************************************
*** SETUP: SETTINGS FILE ******************************************************
Settings file name: hdnnp-data/input.nn
Read 120 lines.
Found 70 lines with keywords.
This settings file defines a short-range only NNP.
*******************************************************************************
*** SETUP: NORMALIZATION ******************************************************
Data set normalization is used.
Mean energy per atom : -2.5521343547039809E+01
Conversion factor energy : 2.4265748255366972E+02
Conversion factor length : 5.8038448995319847E+00
*******************************************************************************
*** SETUP: ELEMENT MAP ********************************************************
Number of element strings found: 2
Element 0: H ( 1)
Element 1: O ( 8)
*******************************************************************************
*** SETUP: ELEMENTS ***********************************************************
Number of elements is consistent: 2
Atomic energy offsets per element:
Element 0: 0.00000000E+00
Element 1: 0.00000000E+00
Energy offsets are automatically subtracted from reference energies.
*******************************************************************************
*** SETUP: CUTOFF FUNCTIONS ***************************************************
Parameter alpha for inner cutoff: 0.000000
Inner cutoff = Symmetry function cutoff * alpha
Equal cutoff function type for all symmetry functions:
CutoffFunction::CT_TANHU (2)
f(r) = tanh^3(1 - r/rc)
*******************************************************************************
*** SETUP: SYMMETRY FUNCTIONS *************************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
Short range atomic symmetry functions element H :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 H 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 51
2 H 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 61
3 H 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 52
4 H 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 62
5 H 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 53
6 H 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 63
7 H 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 54
8 H 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 64
9 H 2 ct2 O 1.500E-01 9.000E-01 1.200E+01 0.00 65
10 H 2 ct2 H 1.500E-01 1.900E+00 1.200E+01 0.00 55
11 H 2 ct2 O 3.000E-01 9.000E-01 1.200E+01 0.00 66
12 H 2 ct2 H 3.000E-01 1.900E+00 1.200E+01 0.00 56
13 H 2 ct2 O 6.000E-01 9.000E-01 1.200E+01 0.00 67
14 H 2 ct2 H 6.000E-01 1.900E+00 1.200E+01 0.00 57
15 H 2 ct2 O 1.500E+00 9.000E-01 1.200E+01 0.00 68
16 H 2 ct2 H 1.500E+00 1.900E+00 1.200E+01 0.00 58
17 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 115
18 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 114
19 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 105
20 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 103
21 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 100
22 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 113
23 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 98
24 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 112
25 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 95
26 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 93
27 H 3 ct2 H O 2.000E-01 0.000E+00 1.200E+01 1 1.0 0.00 90
-------------------------------------------------------------------------------------------------
Short range atomic symmetry functions element O :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 O 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 70
2 O 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 80
3 O 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 71
4 O 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 81
5 O 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 72
6 O 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 82
7 O 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 73
8 O 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 83
9 O 2 ct2 H 1.500E-01 9.000E-01 1.200E+01 0.00 74
10 O 2 ct2 O 1.500E-01 4.000E+00 1.200E+01 0.00 84
11 O 2 ct2 H 3.000E-01 9.000E-01 1.200E+01 0.00 75
12 O 2 ct2 O 3.000E-01 4.000E+00 1.200E+01 0.00 85
13 O 2 ct2 H 6.000E-01 9.000E-01 1.200E+01 0.00 76
14 O 2 ct2 O 6.000E-01 4.000E+00 1.200E+01 0.00 86
15 O 2 ct2 H 1.500E+00 9.000E-01 1.200E+01 0.00 77
16 O 2 ct2 O 1.500E+00 4.000E+00 1.200E+01 0.00 87
17 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 110
18 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 120
19 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 109
20 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 119
21 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 104
22 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 102
23 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 99
24 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 108
25 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 118
26 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 97
27 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 107
28 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 117
29 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 94
30 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 92
-------------------------------------------------------------------------------------------------
Minimum cutoff radius for element H: 12.000000
Minimum cutoff radius for element O: 12.000000
Maximum cutoff radius (global) : 12.000000
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION MEMORY *******************************************
Symmetry function derivatives memory table for element H :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 15 of 27 ( 55.6 %)
- O: 19 of 27 ( 70.4 %)
-------------------------------------------------------------------------------
Symmetry function derivatives memory table for element O :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 18 of 30 ( 60.0 %)
- O: 16 of 30 ( 53.3 %)
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION CACHE ********************************************
Element H: in total 4 caches, used 17.00 times on average.
Element O: in total 4 caches, used 17.00 times on average.
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION GROUPS *******************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
mi ..... Member index.
sfi .... Symmetry function index.
e ...... Recalculate exponential term.
Short range atomic symmetry function groups element H :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 H 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 51 1 1
- - - - - 1.000E-02 0.000E+00 - - 52 2 3
- - - - - 3.000E-02 0.000E+00 - - 53 3 5
- - - - - 6.000E-02 0.000E+00 - - 54 4 7
- - - - - 1.500E-01 1.900E+00 - - 55 5 10
- - - - - 3.000E-01 1.900E+00 - - 56 6 12
- - - - - 6.000E-01 1.900E+00 - - 57 7 14
- - - - - 1.500E+00 1.900E+00 - - 58 8 16
2 H 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 61 1 2
- - - - - 1.000E-02 0.000E+00 - - 62 2 4
- - - - - 3.000E-02 0.000E+00 - - 63 3 6
- - - - - 6.000E-02 0.000E+00 - - 64 4 8
- - - - - 1.500E-01 9.000E-01 - - 65 5 9
- - - - - 3.000E-01 9.000E-01 - - 66 6 11
- - - - - 6.000E-01 9.000E-01 - - 67 7 13
- - - - - 1.500E+00 9.000E-01 - - 68 8 15
3 H 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 105 1 19 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 103 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 100 3 21 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 98 4 23 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 95 5 25 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 93 6 26 0
- - - - - - 2.000E-01 0.000E+00 - 1 1.0 - 90 7 27 1
4 H 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 115 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 114 2 18 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 113 3 22 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 112 4 24 0
----------------------------------------------------------------------------------------------------------
Short range atomic symmetry function groups element O :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 O 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 70 1 1
- - - - - 1.000E-02 0.000E+00 - - 71 2 3
- - - - - 3.000E-02 0.000E+00 - - 72 3 5
- - - - - 6.000E-02 0.000E+00 - - 73 4 7
- - - - - 1.500E-01 9.000E-01 - - 74 5 9
- - - - - 3.000E-01 9.000E-01 - - 75 6 11
- - - - - 6.000E-01 9.000E-01 - - 76 7 13
- - - - - 1.500E+00 9.000E-01 - - 77 8 15
2 O 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 80 1 2
- - - - - 1.000E-02 0.000E+00 - - 81 2 4
- - - - - 3.000E-02 0.000E+00 - - 82 3 6
- - - - - 6.000E-02 0.000E+00 - - 83 4 8
- - - - - 1.500E-01 4.000E+00 - - 84 5 10
- - - - - 3.000E-01 4.000E+00 - - 85 6 12
- - - - - 6.000E-01 4.000E+00 - - 86 7 14
- - - - - 1.500E+00 4.000E+00 - - 87 8 16
3 O 3 ct2 H H * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 104 1 21 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 102 2 22 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 99 3 23 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 97 4 26 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 94 5 29 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 92 6 30 0
4 O 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 110 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 109 2 19 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 108 3 24 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 107 4 27 0
5 O 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 120 1 18 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 119 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 118 3 25 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 117 4 28 0
----------------------------------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: NEURAL NETWORKS ****************************************************
Normalize neurons (all elements): 0
-------------------------------------------------------------------------------
Atomic short range NN for element H :
Number of weights : 1325
Number of biases : 51
Number of connections: 1376
Architecture 27 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
-------------------------------------------------------------------------------
Atomic short range NN for element O :
Number of weights : 1400
Number of biases : 51
Number of connections: 1451
Architecture 30 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
28 G
29 G
30 G
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION SCALING ******************************************
Equal scaling type for all symmetry functions:
Scaling type::ST_SCALECENTER (3)
Gs = Smin + (Smax - Smin) * (G - Gmean) / (Gmax - Gmin)
Smin = 0.000000
Smax = 1.000000
Symmetry function scaling statistics from file: hdnnp-data/scaling.data
-------------------------------------------------------------------------------
Abbreviations:
--------------
ind ..... Symmetry function index.
min ..... Minimum symmetry function value.
max ..... Maximum symmetry function value.
mean .... Mean symmetry function value.
sigma ... Standard deviation of symmetry function values.
sf ...... Scaling factor for derivatives.
Smin .... Desired minimum scaled symmetry function value.
Smax .... Desired maximum scaled symmetry function value.
t ....... Scaling type.
Scaling data for symmetry functions element H :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.09E+00 9.62E+00 2.27E+00 6.79E-01 1.17E-01 0.00 1.00 3
2 7.33E-01 5.00E+00 1.33E+00 3.39E-01 2.34E-01 0.00 1.00 3
3 7.60E-01 7.14E+00 1.65E+00 5.08E-01 1.57E-01 0.00 1.00 3
4 5.48E-01 3.77E+00 1.02E+00 2.54E-01 3.11E-01 0.00 1.00 3
5 4.01E-01 4.15E+00 9.09E-01 2.98E-01 2.67E-01 0.00 1.00 3
6 3.62E-01 2.27E+00 6.49E-01 1.48E-01 5.25E-01 0.00 1.00 3
7 1.89E-01 2.23E+00 4.57E-01 1.60E-01 4.90E-01 0.00 1.00 3
8 2.67E-01 1.32E+00 4.24E-01 8.05E-02 9.49E-01 0.00 1.00 3
9 2.45E-01 9.48E-01 3.62E-01 5.30E-02 1.42E+00 0.00 1.00 3
10 2.22E-01 2.76E+00 5.39E-01 2.01E-01 3.94E-01 0.00 1.00 3
11 1.47E-01 5.56E-01 2.68E-01 2.62E-02 2.45E+00 0.00 1.00 3
12 9.91E-02 1.73E+00 2.96E-01 1.16E-01 6.14E-01 0.00 1.00 3
13 6.51E-02 3.45E-01 1.85E-01 1.97E-02 3.57E+00 0.00 1.00 3
14 3.17E-02 9.13E-01 1.50E-01 5.35E-02 1.13E+00 0.00 1.00 3
15 2.92E-03 2.65E-01 7.65E-02 1.88E-02 3.82E+00 0.00 1.00 3
16 3.21E-04 2.87E-01 4.58E-02 2.33E-02 3.49E+00 0.00 1.00 3
17 2.47E-04 1.38E-01 1.77E-02 9.75E-03 7.23E+00 0.00 1.00 3
18 5.10E-03 5.83E-01 2.39E-02 3.78E-02 1.73E+00 0.00 1.00 3
19 3.23E-04 2.16E-01 1.71E-02 1.40E-02 4.63E+00 0.00 1.00 3
20 4.96E-02 1.69E+00 1.45E-01 1.10E-01 6.11E-01 0.00 1.00 3
21 3.41E-03 3.16E-01 1.84E-02 2.01E-02 3.20E+00 0.00 1.00 3
22 1.31E-04 1.03E-01 6.37E-03 6.61E-03 9.76E+00 0.00 1.00 3
23 3.38E-02 9.16E-01 8.13E-02 5.79E-02 1.13E+00 0.00 1.00 3
24 4.17E-04 1.58E-01 4.66E-03 9.86E-03 6.35E+00 0.00 1.00 3
25 7.35E-04 5.92E-02 3.70E-03 3.31E-03 1.71E+01 0.00 1.00 3
26 8.98E-03 1.94E-01 2.41E-02 1.10E-02 5.40E+00 0.00 1.00 3
27 2.12E-04 8.78E-03 2.06E-03 5.88E-04 1.17E+02 0.00 1.00 3
-------------------------------------------------------------------------------
Scaling data for symmetry functions element O :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.51E+00 1.00E+01 2.65E+00 6.78E-01 1.18E-01 0.00 1.00 3
2 4.44E-01 4.62E+00 9.66E-01 3.37E-01 2.39E-01 0.00 1.00 3
3 1.19E+00 7.53E+00 2.03E+00 5.06E-01 1.58E-01 0.00 1.00 3
4 2.76E-01 3.39E+00 6.59E-01 2.50E-01 3.21E-01 0.00 1.00 3
5 8.06E-01 4.54E+00 1.30E+00 2.94E-01 2.68E-01 0.00 1.00 3
6 1.05E-01 1.89E+00 3.07E-01 1.42E-01 5.60E-01 0.00 1.00 3
7 5.69E-01 2.62E+00 8.48E-01 1.57E-01 4.89E-01 0.00 1.00 3
8 2.33E-02 9.36E-01 1.11E-01 6.98E-02 1.10E+00 0.00 1.00 3
9 5.14E-01 1.85E+00 7.25E-01 9.80E-02 7.46E-01 0.00 1.00 3
10 1.11E-01 2.91E+00 4.75E-01 2.34E-01 3.57E-01 0.00 1.00 3
11 3.53E-01 1.07E+00 5.35E-01 4.52E-02 1.39E+00 0.00 1.00 3
12 3.04E-02 2.53E+00 3.17E-01 2.10E-01 4.00E-01 0.00 1.00 3
13 1.60E-01 6.63E-01 3.70E-01 3.08E-02 1.99E+00 0.00 1.00 3
14 2.78E-03 2.30E+00 1.77E-01 1.86E-01 4.35E-01 0.00 1.00 3
15 9.56E-03 3.91E-01 1.53E-01 2.79E-02 2.62E+00 0.00 1.00 3
16 3.75E-06 2.04E+00 5.41E-02 1.43E-01 4.91E-01 0.00 1.00 3
17 2.47E-03 3.43E-01 1.67E-02 2.19E-02 2.93E+00 0.00 1.00 3
18 1.74E-05 5.63E-02 9.55E-04 3.36E-03 1.78E+01 0.00 1.00 3
19 5.48E-02 3.02E+00 2.04E-01 2.01E-01 3.37E-01 0.00 1.00 3
20 1.38E-03 4.99E-01 1.28E-02 3.18E-02 2.01E+00 0.00 1.00 3
21 6.69E-03 2.67E-01 3.09E-02 1.71E-02 3.84E+00 0.00 1.00 3
22 1.70E-02 1.42E+00 7.63E-02 9.29E-02 7.14E-01 0.00 1.00 3
23 1.98E-02 4.08E-01 4.88E-02 2.55E-02 2.58E+00 0.00 1.00 3
24 5.28E-04 2.33E-01 7.21E-03 1.45E-02 4.30E+00 0.00 1.00 3
25 1.11E-05 3.53E-02 4.25E-04 2.05E-03 2.83E+01 0.00 1.00 3
26 1.60E-02 8.22E-01 5.08E-02 5.28E-02 1.24E+00 0.00 1.00 3
27 3.99E-03 7.86E-01 3.69E-02 5.05E-02 1.28E+00 0.00 1.00 3
28 4.05E-05 9.84E-02 1.21E-03 5.79E-03 1.02E+01 0.00 1.00 3
29 6.04E-03 9.93E-02 1.62E-02 5.52E-03 1.07E+01 0.00 1.00 3
30 2.96E-03 1.55E-01 1.16E-02 8.94E-03 6.59E+00 0.00 1.00 3
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION STATISTICS ***************************************
Equal symmetry function statistics for all elements.
Collect min/max/mean/sigma : 0
Collect extrapolation warnings : 1
Write extrapolation warnings immediately to stderr: 0
Halt on any extrapolation warning : 0
*******************************************************************************
*** SETUP: NEURAL NETWORK WEIGHTS *********************************************
Short NN weight file name format: hdnnp-data/weights.%03d.data
Setting short NN weights for element H from file: hdnnp-data/weights.001.data
Setting short NN weights for element O from file: hdnnp-data/weights.008.data
*******************************************************************************
*** SETUP: LAMMPS INTERFACE ***************************************************
Individual extrapolation warnings will not be shown.
Extrapolation warning summary will be shown every 5 timesteps.
The simulation will be stopped when 100 extrapolation warnings are exceeded.
Extrapolation warnings are accumulated over all time steps.
-------------------------------------------------------------------------------
CAUTION: If the LAMMPS unit system differs from the one used
during NN training, appropriate conversion factors
must be provided (see keywords cflength and cfenergy).
Length unit conversion factor: 1.8897261327999999E+00
Energy unit conversion factor: 3.6749325399999998E-02
Checking consistency of cutoff radii (in LAMMPS units):
LAMMPS Cutoff (via pair_coeff) : 6.360E+00
Maximum symmetry function cutoff: 6.350E+00
Cutoff radii are consistent.
-------------------------------------------------------------------------------
Element mapping string from LAMMPS to n2p2: "1:H,2:O"
CAUTION: Please ensure that this mapping between LAMMPS
atom types and NNP elements is consistent:
---------------------------
LAMMPS type | NNP element
---------------------------
1 <-> H ( 1)
2 <-> O ( 8)
---------------------------
NNP setup for LAMMPS completed.
*******************************************************************************
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8.36
ghost atom cutoff = 8.36
binsize = 4.18, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair hdnnp, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
### NNP EW SUMMARY ### TS: 0 EW 0 EWPERSTEP 0.000e+00
Per MPI rank memory allocation (min/avg/max) = 3.13 | 3.13 | 3.13 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -750069.48 0 -750069.48 -5297.5537
1 8.5815594 -750070.71 0 -750069.51 -5249.2914
2 30.988787 -750073.91 0 -750069.59 -5023.6945
3 58.859866 -750077.88 0 -750069.67 -4427.8346
4 82.576399 -750081.26 0 -750069.74 -3275.4378
### NNP EW SUMMARY ### TS: 5 EW 0 EWPERSTEP 0.000e+00
5 94.968097 -750083.01 0 -750069.76 -1511.6733
6 93.724286 -750082.8 0 -750069.73 709.20465
7 82.243957 -750081.13 0 -750069.66 3020.5084
8 68.611429 -750079.14 0 -750069.57 4922.5176
9 62.314385 -750078.21 0 -750069.51 5933.1543
### NNP EW SUMMARY ### TS: 10 EW 0 EWPERSTEP 0.000e+00
10 69.501045 -750079.21 0 -750069.52 5761.8646
Loop time of 0.930358 on 4 procs for 10 steps with 1080 atoms
Performance: 0.464 ns/day, 51.687 hours/ns, 10.749 timesteps/s, 11.608 katom-step/s
99.6% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.85419 | 0.89495 | 0.92919 | 3.5 | 96.19
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00075831 | 0.035035 | 0.075822 | 17.5 | 3.77
Output | 0.00018471 | 0.00023973 | 0.00031043 | 0.0 | 0.03
Modify | 4.0258e-05 | 4.2308e-05 | 4.4218e-05 | 0.0 | 0.00
Other | | 9.199e-05 | | | 0.01
Nlocal: 270 ave 278 max 262 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Nghost: 2552 ave 2564 max 2541 min
Histogram: 1 0 1 0 0 0 1 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 59817.5 ave 61917 max 57577 min
Histogram: 1 1 0 0 0 0 0 0 0 2
Total # of neighbors = 239270
Ave neighs/atom = 221.5463
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -0,0 +1,689 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-264-g174825fe8c)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
###############################################################################
# MD simulation for HDNNP water
###############################################################################
###############################################################################
# VARIABLES
###############################################################################
clear
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# Configuration files
variable cfgFile string "data.H2O-360mol"
# Timesteps
variable numSteps equal 10
variable dt equal 0.0005
# HDNNP
variable hdnnpCutoff equal 6.36
variable hdnnpDir string "hdnnp-data"
###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
region box block 0.0 2.2695686722465727E+01 0.0 2.3586033624598713E+01 0.0 2.2237130028217017E+01
create_box 3 box
Created orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
1 by 1 by 1 MPI processor grid
mass 1 1.0
read_data ${cfgFile} add append offset 1 0 0 0 0
read_data data.H2O-360mol add append offset 1 0 0 0 0
Reading data file ...
orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
1 by 1 by 1 MPI processor grid
reading atoms ...
1080 atoms
read_data CPU = 0.004 seconds
timestep ${dt}
timestep 0.0005
thermo 1
###############################################################################
# HDNNP
###############################################################################
pair_style hybrid lj/cut 6.0 hdnnp ${hdnnpCutoff} dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hybrid lj/cut 6.0 hdnnp 6.36 dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hybrid lj/cut 6.0 hdnnp 6.36 dir hdnnp-data showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_coeff * * hdnnp NULL H O
pair_coeff 1 * lj/cut 0.1 3.0
###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
#dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}
run 10
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- ML-HDNNP package: doi:10.1021/acs.jctc.8b00770
@Article{Singraber19,
author = {Singraber, Andreas and Behler, J{"o}rg and Dellago, Christoph},
title = {Library-Based {LAMMPS} Implementation of High-Dimensional
Neural Network Potentials},
year = {2019},
month = mar,
volume = {15},
pages = {1827--1840},
doi = {10.1021/acs.jctc.8b00770},
journal = {J.~Chem.\ Theory Comput.},
number = {3}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
*******************************************************************************
WELCOME TO n²p², A SOFTWARE PACKAGE FOR NEURAL NETWORK POTENTIALS!
------------------------------------------------------------------
n²p² version (from git): patch_2Aug2023-264-g174825fe8c
(version.h): v2.2.0
------------------------------------------------------------
Git branch : collected-small-changes
Git revision : 174825fe8c9493cb252d7b9e8dafdcc5d74be96d
Compile date/time : Aug 23 2023 08:43:11
------------------------------------------------------------
Features/Flags:
------------------------------------------------------------
Symmetry function groups : enabled
Symmetry function cache : enabled
Timing function available : available
Asymmetric polynomial SFs : available
SF low neighbor number check : enabled
SF derivative memory layout : reduced
MPI explicitly disabled : no
------------------------------------------------------------
Please cite the following papers when publishing results obtained with n²p²:
-------------------------------------------------------------------------------
* General citation for n²p² and the LAMMPS interface:
Singraber, A.; Behler, J.; Dellago, C.
Library-Based LAMMPS Implementation of High-Dimensional
Neural Network Potentials.
J. Chem. Theory Comput. 2019 15 (3), 18271840.
https://doi.org/10.1021/acs.jctc.8b00770
-------------------------------------------------------------------------------
* Additionally, if you use the NNP training features of n²p²:
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C.
Parallel Multistream Training of High-Dimensional Neural
Network Potentials.
J. Chem. Theory Comput. 2019, 15 (5), 30753092.
https://doi.org/10.1021/acs.jctc.8b01092
-------------------------------------------------------------------------------
* Additionally, if polynomial symmetry functions are used:
Bircher, M. P.; Singraber, A.; Dellago, C.
Improved Description of Atomic Environments Using Low-Cost
Polynomial Functions with Compact Support.
arXiv:2010.14414 [cond-mat, physics:physics] 2020.
https://arxiv.org/abs/2010.14414
*******************************************************************************
*** SETUP: SETTINGS FILE ******************************************************
Settings file name: hdnnp-data/input.nn
Read 120 lines.
Found 70 lines with keywords.
This settings file defines a short-range only NNP.
*******************************************************************************
*** SETUP: NORMALIZATION ******************************************************
Data set normalization is used.
Mean energy per atom : -2.5521343547039809E+01
Conversion factor energy : 2.4265748255366972E+02
Conversion factor length : 5.8038448995319847E+00
*******************************************************************************
*** SETUP: ELEMENT MAP ********************************************************
Number of element strings found: 2
Element 0: H ( 1)
Element 1: O ( 8)
*******************************************************************************
*** SETUP: ELEMENTS ***********************************************************
Number of elements is consistent: 2
Atomic energy offsets per element:
Element 0: 0.00000000E+00
Element 1: 0.00000000E+00
Energy offsets are automatically subtracted from reference energies.
*******************************************************************************
*** SETUP: CUTOFF FUNCTIONS ***************************************************
Parameter alpha for inner cutoff: 0.000000
Inner cutoff = Symmetry function cutoff * alpha
Equal cutoff function type for all symmetry functions:
CutoffFunction::CT_TANHU (2)
f(r) = tanh^3(1 - r/rc)
*******************************************************************************
*** SETUP: SYMMETRY FUNCTIONS *************************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
Short range atomic symmetry functions element H :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 H 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 51
2 H 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 61
3 H 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 52
4 H 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 62
5 H 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 53
6 H 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 63
7 H 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 54
8 H 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 64
9 H 2 ct2 O 1.500E-01 9.000E-01 1.200E+01 0.00 65
10 H 2 ct2 H 1.500E-01 1.900E+00 1.200E+01 0.00 55
11 H 2 ct2 O 3.000E-01 9.000E-01 1.200E+01 0.00 66
12 H 2 ct2 H 3.000E-01 1.900E+00 1.200E+01 0.00 56
13 H 2 ct2 O 6.000E-01 9.000E-01 1.200E+01 0.00 67
14 H 2 ct2 H 6.000E-01 1.900E+00 1.200E+01 0.00 57
15 H 2 ct2 O 1.500E+00 9.000E-01 1.200E+01 0.00 68
16 H 2 ct2 H 1.500E+00 1.900E+00 1.200E+01 0.00 58
17 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 115
18 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 114
19 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 105
20 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 103
21 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 100
22 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 113
23 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 98
24 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 112
25 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 95
26 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 93
27 H 3 ct2 H O 2.000E-01 0.000E+00 1.200E+01 1 1.0 0.00 90
-------------------------------------------------------------------------------------------------
Short range atomic symmetry functions element O :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 O 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 70
2 O 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 80
3 O 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 71
4 O 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 81
5 O 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 72
6 O 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 82
7 O 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 73
8 O 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 83
9 O 2 ct2 H 1.500E-01 9.000E-01 1.200E+01 0.00 74
10 O 2 ct2 O 1.500E-01 4.000E+00 1.200E+01 0.00 84
11 O 2 ct2 H 3.000E-01 9.000E-01 1.200E+01 0.00 75
12 O 2 ct2 O 3.000E-01 4.000E+00 1.200E+01 0.00 85
13 O 2 ct2 H 6.000E-01 9.000E-01 1.200E+01 0.00 76
14 O 2 ct2 O 6.000E-01 4.000E+00 1.200E+01 0.00 86
15 O 2 ct2 H 1.500E+00 9.000E-01 1.200E+01 0.00 77
16 O 2 ct2 O 1.500E+00 4.000E+00 1.200E+01 0.00 87
17 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 110
18 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 120
19 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 109
20 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 119
21 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 104
22 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 102
23 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 99
24 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 108
25 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 118
26 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 97
27 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 107
28 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 117
29 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 94
30 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 92
-------------------------------------------------------------------------------------------------
Minimum cutoff radius for element H: 12.000000
Minimum cutoff radius for element O: 12.000000
Maximum cutoff radius (global) : 12.000000
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION MEMORY *******************************************
Symmetry function derivatives memory table for element H :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 15 of 27 ( 55.6 %)
- O: 19 of 27 ( 70.4 %)
-------------------------------------------------------------------------------
Symmetry function derivatives memory table for element O :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 18 of 30 ( 60.0 %)
- O: 16 of 30 ( 53.3 %)
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION CACHE ********************************************
Element H: in total 4 caches, used 17.00 times on average.
Element O: in total 4 caches, used 17.00 times on average.
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION GROUPS *******************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
mi ..... Member index.
sfi .... Symmetry function index.
e ...... Recalculate exponential term.
Short range atomic symmetry function groups element H :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 H 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 51 1 1
- - - - - 1.000E-02 0.000E+00 - - 52 2 3
- - - - - 3.000E-02 0.000E+00 - - 53 3 5
- - - - - 6.000E-02 0.000E+00 - - 54 4 7
- - - - - 1.500E-01 1.900E+00 - - 55 5 10
- - - - - 3.000E-01 1.900E+00 - - 56 6 12
- - - - - 6.000E-01 1.900E+00 - - 57 7 14
- - - - - 1.500E+00 1.900E+00 - - 58 8 16
2 H 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 61 1 2
- - - - - 1.000E-02 0.000E+00 - - 62 2 4
- - - - - 3.000E-02 0.000E+00 - - 63 3 6
- - - - - 6.000E-02 0.000E+00 - - 64 4 8
- - - - - 1.500E-01 9.000E-01 - - 65 5 9
- - - - - 3.000E-01 9.000E-01 - - 66 6 11
- - - - - 6.000E-01 9.000E-01 - - 67 7 13
- - - - - 1.500E+00 9.000E-01 - - 68 8 15
3 H 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 105 1 19 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 103 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 100 3 21 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 98 4 23 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 95 5 25 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 93 6 26 0
- - - - - - 2.000E-01 0.000E+00 - 1 1.0 - 90 7 27 1
4 H 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 115 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 114 2 18 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 113 3 22 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 112 4 24 0
----------------------------------------------------------------------------------------------------------
Short range atomic symmetry function groups element O :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 O 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 70 1 1
- - - - - 1.000E-02 0.000E+00 - - 71 2 3
- - - - - 3.000E-02 0.000E+00 - - 72 3 5
- - - - - 6.000E-02 0.000E+00 - - 73 4 7
- - - - - 1.500E-01 9.000E-01 - - 74 5 9
- - - - - 3.000E-01 9.000E-01 - - 75 6 11
- - - - - 6.000E-01 9.000E-01 - - 76 7 13
- - - - - 1.500E+00 9.000E-01 - - 77 8 15
2 O 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 80 1 2
- - - - - 1.000E-02 0.000E+00 - - 81 2 4
- - - - - 3.000E-02 0.000E+00 - - 82 3 6
- - - - - 6.000E-02 0.000E+00 - - 83 4 8
- - - - - 1.500E-01 4.000E+00 - - 84 5 10
- - - - - 3.000E-01 4.000E+00 - - 85 6 12
- - - - - 6.000E-01 4.000E+00 - - 86 7 14
- - - - - 1.500E+00 4.000E+00 - - 87 8 16
3 O 3 ct2 H H * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 104 1 21 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 102 2 22 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 99 3 23 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 97 4 26 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 94 5 29 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 92 6 30 0
4 O 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 110 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 109 2 19 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 108 3 24 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 107 4 27 0
5 O 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 120 1 18 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 119 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 118 3 25 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 117 4 28 0
----------------------------------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: NEURAL NETWORKS ****************************************************
Normalize neurons (all elements): 0
-------------------------------------------------------------------------------
Atomic short range NN for element H :
Number of weights : 1325
Number of biases : 51
Number of connections: 1376
Architecture 27 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
-------------------------------------------------------------------------------
Atomic short range NN for element O :
Number of weights : 1400
Number of biases : 51
Number of connections: 1451
Architecture 30 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
28 G
29 G
30 G
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION SCALING ******************************************
Equal scaling type for all symmetry functions:
Scaling type::ST_SCALECENTER (3)
Gs = Smin + (Smax - Smin) * (G - Gmean) / (Gmax - Gmin)
Smin = 0.000000
Smax = 1.000000
Symmetry function scaling statistics from file: hdnnp-data/scaling.data
-------------------------------------------------------------------------------
Abbreviations:
--------------
ind ..... Symmetry function index.
min ..... Minimum symmetry function value.
max ..... Maximum symmetry function value.
mean .... Mean symmetry function value.
sigma ... Standard deviation of symmetry function values.
sf ...... Scaling factor for derivatives.
Smin .... Desired minimum scaled symmetry function value.
Smax .... Desired maximum scaled symmetry function value.
t ....... Scaling type.
Scaling data for symmetry functions element H :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.09E+00 9.62E+00 2.27E+00 6.79E-01 1.17E-01 0.00 1.00 3
2 7.33E-01 5.00E+00 1.33E+00 3.39E-01 2.34E-01 0.00 1.00 3
3 7.60E-01 7.14E+00 1.65E+00 5.08E-01 1.57E-01 0.00 1.00 3
4 5.48E-01 3.77E+00 1.02E+00 2.54E-01 3.11E-01 0.00 1.00 3
5 4.01E-01 4.15E+00 9.09E-01 2.98E-01 2.67E-01 0.00 1.00 3
6 3.62E-01 2.27E+00 6.49E-01 1.48E-01 5.25E-01 0.00 1.00 3
7 1.89E-01 2.23E+00 4.57E-01 1.60E-01 4.90E-01 0.00 1.00 3
8 2.67E-01 1.32E+00 4.24E-01 8.05E-02 9.49E-01 0.00 1.00 3
9 2.45E-01 9.48E-01 3.62E-01 5.30E-02 1.42E+00 0.00 1.00 3
10 2.22E-01 2.76E+00 5.39E-01 2.01E-01 3.94E-01 0.00 1.00 3
11 1.47E-01 5.56E-01 2.68E-01 2.62E-02 2.45E+00 0.00 1.00 3
12 9.91E-02 1.73E+00 2.96E-01 1.16E-01 6.14E-01 0.00 1.00 3
13 6.51E-02 3.45E-01 1.85E-01 1.97E-02 3.57E+00 0.00 1.00 3
14 3.17E-02 9.13E-01 1.50E-01 5.35E-02 1.13E+00 0.00 1.00 3
15 2.92E-03 2.65E-01 7.65E-02 1.88E-02 3.82E+00 0.00 1.00 3
16 3.21E-04 2.87E-01 4.58E-02 2.33E-02 3.49E+00 0.00 1.00 3
17 2.47E-04 1.38E-01 1.77E-02 9.75E-03 7.23E+00 0.00 1.00 3
18 5.10E-03 5.83E-01 2.39E-02 3.78E-02 1.73E+00 0.00 1.00 3
19 3.23E-04 2.16E-01 1.71E-02 1.40E-02 4.63E+00 0.00 1.00 3
20 4.96E-02 1.69E+00 1.45E-01 1.10E-01 6.11E-01 0.00 1.00 3
21 3.41E-03 3.16E-01 1.84E-02 2.01E-02 3.20E+00 0.00 1.00 3
22 1.31E-04 1.03E-01 6.37E-03 6.61E-03 9.76E+00 0.00 1.00 3
23 3.38E-02 9.16E-01 8.13E-02 5.79E-02 1.13E+00 0.00 1.00 3
24 4.17E-04 1.58E-01 4.66E-03 9.86E-03 6.35E+00 0.00 1.00 3
25 7.35E-04 5.92E-02 3.70E-03 3.31E-03 1.71E+01 0.00 1.00 3
26 8.98E-03 1.94E-01 2.41E-02 1.10E-02 5.40E+00 0.00 1.00 3
27 2.12E-04 8.78E-03 2.06E-03 5.88E-04 1.17E+02 0.00 1.00 3
-------------------------------------------------------------------------------
Scaling data for symmetry functions element O :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.51E+00 1.00E+01 2.65E+00 6.78E-01 1.18E-01 0.00 1.00 3
2 4.44E-01 4.62E+00 9.66E-01 3.37E-01 2.39E-01 0.00 1.00 3
3 1.19E+00 7.53E+00 2.03E+00 5.06E-01 1.58E-01 0.00 1.00 3
4 2.76E-01 3.39E+00 6.59E-01 2.50E-01 3.21E-01 0.00 1.00 3
5 8.06E-01 4.54E+00 1.30E+00 2.94E-01 2.68E-01 0.00 1.00 3
6 1.05E-01 1.89E+00 3.07E-01 1.42E-01 5.60E-01 0.00 1.00 3
7 5.69E-01 2.62E+00 8.48E-01 1.57E-01 4.89E-01 0.00 1.00 3
8 2.33E-02 9.36E-01 1.11E-01 6.98E-02 1.10E+00 0.00 1.00 3
9 5.14E-01 1.85E+00 7.25E-01 9.80E-02 7.46E-01 0.00 1.00 3
10 1.11E-01 2.91E+00 4.75E-01 2.34E-01 3.57E-01 0.00 1.00 3
11 3.53E-01 1.07E+00 5.35E-01 4.52E-02 1.39E+00 0.00 1.00 3
12 3.04E-02 2.53E+00 3.17E-01 2.10E-01 4.00E-01 0.00 1.00 3
13 1.60E-01 6.63E-01 3.70E-01 3.08E-02 1.99E+00 0.00 1.00 3
14 2.78E-03 2.30E+00 1.77E-01 1.86E-01 4.35E-01 0.00 1.00 3
15 9.56E-03 3.91E-01 1.53E-01 2.79E-02 2.62E+00 0.00 1.00 3
16 3.75E-06 2.04E+00 5.41E-02 1.43E-01 4.91E-01 0.00 1.00 3
17 2.47E-03 3.43E-01 1.67E-02 2.19E-02 2.93E+00 0.00 1.00 3
18 1.74E-05 5.63E-02 9.55E-04 3.36E-03 1.78E+01 0.00 1.00 3
19 5.48E-02 3.02E+00 2.04E-01 2.01E-01 3.37E-01 0.00 1.00 3
20 1.38E-03 4.99E-01 1.28E-02 3.18E-02 2.01E+00 0.00 1.00 3
21 6.69E-03 2.67E-01 3.09E-02 1.71E-02 3.84E+00 0.00 1.00 3
22 1.70E-02 1.42E+00 7.63E-02 9.29E-02 7.14E-01 0.00 1.00 3
23 1.98E-02 4.08E-01 4.88E-02 2.55E-02 2.58E+00 0.00 1.00 3
24 5.28E-04 2.33E-01 7.21E-03 1.45E-02 4.30E+00 0.00 1.00 3
25 1.11E-05 3.53E-02 4.25E-04 2.05E-03 2.83E+01 0.00 1.00 3
26 1.60E-02 8.22E-01 5.08E-02 5.28E-02 1.24E+00 0.00 1.00 3
27 3.99E-03 7.86E-01 3.69E-02 5.05E-02 1.28E+00 0.00 1.00 3
28 4.05E-05 9.84E-02 1.21E-03 5.79E-03 1.02E+01 0.00 1.00 3
29 6.04E-03 9.93E-02 1.62E-02 5.52E-03 1.07E+01 0.00 1.00 3
30 2.96E-03 1.55E-01 1.16E-02 8.94E-03 6.59E+00 0.00 1.00 3
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION STATISTICS ***************************************
Equal symmetry function statistics for all elements.
Collect min/max/mean/sigma : 0
Collect extrapolation warnings : 1
Write extrapolation warnings immediately to stderr: 0
Halt on any extrapolation warning : 0
*******************************************************************************
*** SETUP: NEURAL NETWORK WEIGHTS *********************************************
Short NN weight file name format: hdnnp-data/weights.%03d.data
Setting short NN weights for element H from file: hdnnp-data/weights.001.data
Setting short NN weights for element O from file: hdnnp-data/weights.008.data
*******************************************************************************
*** SETUP: LAMMPS INTERFACE ***************************************************
Individual extrapolation warnings will not be shown.
Extrapolation warning summary will be shown every 5 timesteps.
The simulation will be stopped when 100 extrapolation warnings are exceeded.
Extrapolation warnings are accumulated over all time steps.
-------------------------------------------------------------------------------
CAUTION: If the LAMMPS unit system differs from the one used
during NN training, appropriate conversion factors
must be provided (see keywords cflength and cfenergy).
Length unit conversion factor: 1.8897261327999999E+00
Energy unit conversion factor: 3.6749325399999998E-02
Checking consistency of cutoff radii (in LAMMPS units):
LAMMPS Cutoff (via pair_coeff) : 6.360E+00
Maximum symmetry function cutoff: 6.350E+00
Cutoff radii are consistent.
-------------------------------------------------------------------------------
Element mapping string from LAMMPS to n2p2: "2:H,3:O"
CAUTION: Please ensure that this mapping between LAMMPS
atom types and NNP elements is consistent:
---------------------------
LAMMPS type | NNP element
---------------------------
1 <-> --
2 <-> H ( 1)
3 <-> O ( 8)
---------------------------
NNP setup for LAMMPS completed.
*******************************************************************************
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8.36
ghost atom cutoff = 8.36
binsize = 4.18, bins = 6 6 6
4 neighbor lists, perpetual/occasional/extra = 4 0 0
(1) pair lj/cut, perpetual, skip from (3)
attributes: half, newton on, cut 8
pair build: skip
stencil: none
bin: none
(2) pair hdnnp, perpetual, skip from (4)
attributes: full, newton on
pair build: skip
stencil: none
bin: none
(3) neighbor class addition, perpetual, half/full trim from (4)
attributes: half, newton on, cut 8
pair build: halffull/newton/trim
stencil: none
bin: none
(4) neighbor class addition, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
### NNP EW SUMMARY ### TS: 0 EW 0 EWPERSTEP 0.000e+00
Per MPI rank memory allocation (min/avg/max) = 7.06 | 7.06 | 7.06 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -750069.48 0 -750069.48 -5297.5537
1 8.5815594 -750070.71 0 -750069.51 -5249.2914
2 30.988787 -750073.91 0 -750069.59 -5023.6945
3 58.859866 -750077.88 0 -750069.67 -4427.8346
4 82.576399 -750081.26 0 -750069.74 -3275.4378
### NNP EW SUMMARY ### TS: 5 EW 0 EWPERSTEP 0.000e+00
5 94.968097 -750083.01 0 -750069.76 -1511.6733
6 93.724286 -750082.8 0 -750069.73 709.20465
7 82.243957 -750081.13 0 -750069.66 3020.5084
8 68.611429 -750079.14 0 -750069.57 4922.5176
9 62.314385 -750078.21 0 -750069.51 5933.1543
### NNP EW SUMMARY ### TS: 10 EW 0 EWPERSTEP 0.000e+00
10 69.501045 -750079.21 0 -750069.52 5761.8646
Loop time of 3.32416 on 1 procs for 10 steps with 1080 atoms
Performance: 0.130 ns/day, 184.675 hours/ns, 3.008 timesteps/s, 3.249 katom-step/s
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 3.3234 | 3.3234 | 3.3234 | 0.0 | 99.98
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00032742 | 0.00032742 | 0.00032742 | 0.0 | 0.01
Output | 0.00019506 | 0.00019506 | 0.00019506 | 0.0 | 0.01
Modify | 0.00011454 | 0.00011454 | 0.00011454 | 0.0 | 0.00
Other | | 0.0001165 | | | 0.00
Nlocal: 1080 ave 1080 max 1080 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 4536 ave 4536 max 4536 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:03

View File

@ -0,0 +1,689 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-264-g174825fe8c)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
###############################################################################
# MD simulation for HDNNP water
###############################################################################
###############################################################################
# VARIABLES
###############################################################################
clear
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# Configuration files
variable cfgFile string "data.H2O-360mol"
# Timesteps
variable numSteps equal 10
variable dt equal 0.0005
# HDNNP
variable hdnnpCutoff equal 6.36
variable hdnnpDir string "hdnnp-data"
###############################################################################
# GENERAL SETUP
###############################################################################
units metal
boundary p p p
atom_style atomic
region box block 0.0 2.2695686722465727E+01 0.0 2.3586033624598713E+01 0.0 2.2237130028217017E+01
create_box 3 box
Created orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
2 by 2 by 1 MPI processor grid
mass 1 1.0
read_data ${cfgFile} add append offset 1 0 0 0 0
read_data data.H2O-360mol add append offset 1 0 0 0 0
Reading data file ...
orthogonal box = (0 0 0) to (22.695687 23.586034 22.23713)
2 by 2 by 1 MPI processor grid
reading atoms ...
1080 atoms
read_data CPU = 0.007 seconds
timestep ${dt}
timestep 0.0005
thermo 1
###############################################################################
# HDNNP
###############################################################################
pair_style hybrid lj/cut 6.0 hdnnp ${hdnnpCutoff} dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hybrid lj/cut 6.0 hdnnp 6.36 dir ${hdnnpDir} showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_style hybrid lj/cut 6.0 hdnnp 6.36 dir hdnnp-data showew no showewsum 5 resetew no maxew 100 cflength 1.8897261328 cfenergy 0.0367493254
pair_coeff * * hdnnp NULL H O
pair_coeff 1 * lj/cut 0.1 3.0
###############################################################################
# INTEGRATOR
###############################################################################
fix INT all nve
###############################################################################
# OUTPUT
###############################################################################
#dump 1 all atom 1 dump.hdnnp
###############################################################################
# SIMULATION
###############################################################################
run ${numSteps}
run 10
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- ML-HDNNP package: doi:10.1021/acs.jctc.8b00770
@Article{Singraber19,
author = {Singraber, Andreas and Behler, J{"o}rg and Dellago, Christoph},
title = {Library-Based {LAMMPS} Implementation of High-Dimensional
Neural Network Potentials},
year = {2019},
month = mar,
volume = {15},
pages = {1827--1840},
doi = {10.1021/acs.jctc.8b00770},
journal = {J.~Chem.\ Theory Comput.},
number = {3}
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
*******************************************************************************
WELCOME TO n²p², A SOFTWARE PACKAGE FOR NEURAL NETWORK POTENTIALS!
------------------------------------------------------------------
n²p² version (from git): patch_2Aug2023-264-g174825fe8c
(version.h): v2.2.0
------------------------------------------------------------
Git branch : collected-small-changes
Git revision : 174825fe8c9493cb252d7b9e8dafdcc5d74be96d
Compile date/time : Aug 23 2023 08:43:11
------------------------------------------------------------
Features/Flags:
------------------------------------------------------------
Symmetry function groups : enabled
Symmetry function cache : enabled
Timing function available : available
Asymmetric polynomial SFs : available
SF low neighbor number check : enabled
SF derivative memory layout : reduced
MPI explicitly disabled : no
------------------------------------------------------------
Please cite the following papers when publishing results obtained with n²p²:
-------------------------------------------------------------------------------
* General citation for n²p² and the LAMMPS interface:
Singraber, A.; Behler, J.; Dellago, C.
Library-Based LAMMPS Implementation of High-Dimensional
Neural Network Potentials.
J. Chem. Theory Comput. 2019 15 (3), 18271840.
https://doi.org/10.1021/acs.jctc.8b00770
-------------------------------------------------------------------------------
* Additionally, if you use the NNP training features of n²p²:
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C.
Parallel Multistream Training of High-Dimensional Neural
Network Potentials.
J. Chem. Theory Comput. 2019, 15 (5), 30753092.
https://doi.org/10.1021/acs.jctc.8b01092
-------------------------------------------------------------------------------
* Additionally, if polynomial symmetry functions are used:
Bircher, M. P.; Singraber, A.; Dellago, C.
Improved Description of Atomic Environments Using Low-Cost
Polynomial Functions with Compact Support.
arXiv:2010.14414 [cond-mat, physics:physics] 2020.
https://arxiv.org/abs/2010.14414
*******************************************************************************
*** SETUP: SETTINGS FILE ******************************************************
Settings file name: hdnnp-data/input.nn
Read 120 lines.
Found 70 lines with keywords.
This settings file defines a short-range only NNP.
*******************************************************************************
*** SETUP: NORMALIZATION ******************************************************
Data set normalization is used.
Mean energy per atom : -2.5521343547039809E+01
Conversion factor energy : 2.4265748255366972E+02
Conversion factor length : 5.8038448995319847E+00
*******************************************************************************
*** SETUP: ELEMENT MAP ********************************************************
Number of element strings found: 2
Element 0: H ( 1)
Element 1: O ( 8)
*******************************************************************************
*** SETUP: ELEMENTS ***********************************************************
Number of elements is consistent: 2
Atomic energy offsets per element:
Element 0: 0.00000000E+00
Element 1: 0.00000000E+00
Energy offsets are automatically subtracted from reference energies.
*******************************************************************************
*** SETUP: CUTOFF FUNCTIONS ***************************************************
Parameter alpha for inner cutoff: 0.000000
Inner cutoff = Symmetry function cutoff * alpha
Equal cutoff function type for all symmetry functions:
CutoffFunction::CT_TANHU (2)
f(r) = tanh^3(1 - r/rc)
*******************************************************************************
*** SETUP: SYMMETRY FUNCTIONS *************************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
Short range atomic symmetry functions element H :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 H 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 51
2 H 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 61
3 H 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 52
4 H 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 62
5 H 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 53
6 H 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 63
7 H 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 54
8 H 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 64
9 H 2 ct2 O 1.500E-01 9.000E-01 1.200E+01 0.00 65
10 H 2 ct2 H 1.500E-01 1.900E+00 1.200E+01 0.00 55
11 H 2 ct2 O 3.000E-01 9.000E-01 1.200E+01 0.00 66
12 H 2 ct2 H 3.000E-01 1.900E+00 1.200E+01 0.00 56
13 H 2 ct2 O 6.000E-01 9.000E-01 1.200E+01 0.00 67
14 H 2 ct2 H 6.000E-01 1.900E+00 1.200E+01 0.00 57
15 H 2 ct2 O 1.500E+00 9.000E-01 1.200E+01 0.00 68
16 H 2 ct2 H 1.500E+00 1.900E+00 1.200E+01 0.00 58
17 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 115
18 H 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 114
19 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 105
20 H 3 ct2 H O 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 103
21 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 100
22 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 113
23 H 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 98
24 H 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 112
25 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 95
26 H 3 ct2 H O 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 93
27 H 3 ct2 H O 2.000E-01 0.000E+00 1.200E+01 1 1.0 0.00 90
-------------------------------------------------------------------------------------------------
Short range atomic symmetry functions element O :
-------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln
-------------------------------------------------------------------------------------------------
1 O 2 ct2 H 1.000E-03 0.000E+00 1.200E+01 0.00 70
2 O 2 ct2 O 1.000E-03 0.000E+00 1.200E+01 0.00 80
3 O 2 ct2 H 1.000E-02 0.000E+00 1.200E+01 0.00 71
4 O 2 ct2 O 1.000E-02 0.000E+00 1.200E+01 0.00 81
5 O 2 ct2 H 3.000E-02 0.000E+00 1.200E+01 0.00 72
6 O 2 ct2 O 3.000E-02 0.000E+00 1.200E+01 0.00 82
7 O 2 ct2 H 6.000E-02 0.000E+00 1.200E+01 0.00 73
8 O 2 ct2 O 6.000E-02 0.000E+00 1.200E+01 0.00 83
9 O 2 ct2 H 1.500E-01 9.000E-01 1.200E+01 0.00 74
10 O 2 ct2 O 1.500E-01 4.000E+00 1.200E+01 0.00 84
11 O 2 ct2 H 3.000E-01 9.000E-01 1.200E+01 0.00 75
12 O 2 ct2 O 3.000E-01 4.000E+00 1.200E+01 0.00 85
13 O 2 ct2 H 6.000E-01 9.000E-01 1.200E+01 0.00 76
14 O 2 ct2 O 6.000E-01 4.000E+00 1.200E+01 0.00 86
15 O 2 ct2 H 1.500E+00 9.000E-01 1.200E+01 0.00 77
16 O 2 ct2 O 1.500E+00 4.000E+00 1.200E+01 0.00 87
17 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 110
18 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 -1 4.0 0.00 120
19 O 3 ct2 H O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 109
20 O 3 ct2 O O 1.000E-03 0.000E+00 1.200E+01 1 4.0 0.00 119
21 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 -1 4.0 0.00 104
22 O 3 ct2 H H 1.000E-02 0.000E+00 1.200E+01 1 4.0 0.00 102
23 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 99
24 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 108
25 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 118
26 O 3 ct2 H H 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 97
27 O 3 ct2 H O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 107
28 O 3 ct2 O O 3.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 117
29 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 -1 1.0 0.00 94
30 O 3 ct2 H H 7.000E-02 0.000E+00 1.200E+01 1 1.0 0.00 92
-------------------------------------------------------------------------------------------------
Minimum cutoff radius for element H: 12.000000
Minimum cutoff radius for element O: 12.000000
Maximum cutoff radius (global) : 12.000000
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION MEMORY *******************************************
Symmetry function derivatives memory table for element H :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 15 of 27 ( 55.6 %)
- O: 19 of 27 ( 70.4 %)
-------------------------------------------------------------------------------
Symmetry function derivatives memory table for element O :
-------------------------------------------------------------------------------
Relevant symmetry functions for neighbors with element:
- H: 18 of 30 ( 60.0 %)
- O: 16 of 30 ( 53.3 %)
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION CACHE ********************************************
Element H: in total 4 caches, used 17.00 times on average.
Element O: in total 4 caches, used 17.00 times on average.
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION GROUPS *******************************************
Abbreviations:
--------------
ind .... Symmetry function index.
ec ..... Central atom element.
tp ..... Symmetry function type.
sbtp ... Symmetry function subtype (e.g. cutoff type).
e1 ..... Neighbor 1 element.
e2 ..... Neighbor 2 element.
eta .... Gaussian width eta.
rs/rl... Shift distance of Gaussian or left cutoff radius for polynomial.
angl.... Left cutoff angle for polynomial.
angr.... Right cutoff angle for polynomial.
la ..... Angle prefactor lambda.
zeta ... Angle term exponent zeta.
rc ..... Cutoff radius / right cutoff radius for polynomial.
a ...... Free parameter alpha (e.g. cutoff alpha).
ln ..... Line number in settings file.
mi ..... Member index.
sfi .... Symmetry function index.
e ...... Recalculate exponential term.
Short range atomic symmetry function groups element H :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 H 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 51 1 1
- - - - - 1.000E-02 0.000E+00 - - 52 2 3
- - - - - 3.000E-02 0.000E+00 - - 53 3 5
- - - - - 6.000E-02 0.000E+00 - - 54 4 7
- - - - - 1.500E-01 1.900E+00 - - 55 5 10
- - - - - 3.000E-01 1.900E+00 - - 56 6 12
- - - - - 6.000E-01 1.900E+00 - - 57 7 14
- - - - - 1.500E+00 1.900E+00 - - 58 8 16
2 H 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 61 1 2
- - - - - 1.000E-02 0.000E+00 - - 62 2 4
- - - - - 3.000E-02 0.000E+00 - - 63 3 6
- - - - - 6.000E-02 0.000E+00 - - 64 4 8
- - - - - 1.500E-01 9.000E-01 - - 65 5 9
- - - - - 3.000E-01 9.000E-01 - - 66 6 11
- - - - - 6.000E-01 9.000E-01 - - 67 7 13
- - - - - 1.500E+00 9.000E-01 - - 68 8 15
3 H 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 105 1 19 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 103 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 100 3 21 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 98 4 23 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 95 5 25 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 93 6 26 0
- - - - - - 2.000E-01 0.000E+00 - 1 1.0 - 90 7 27 1
4 H 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 115 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 114 2 18 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 113 3 22 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 112 4 24 0
----------------------------------------------------------------------------------------------------------
Short range atomic symmetry function groups element O :
----------------------------------------------------------------------------------------------------------
ind ec tp sbtp e1 e2 eta rs/rl rc angl angr la zeta a ln mi sfi e
----------------------------------------------------------------------------------------------------------
1 O 2 ct2 H * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 70 1 1
- - - - - 1.000E-02 0.000E+00 - - 71 2 3
- - - - - 3.000E-02 0.000E+00 - - 72 3 5
- - - - - 6.000E-02 0.000E+00 - - 73 4 7
- - - - - 1.500E-01 9.000E-01 - - 74 5 9
- - - - - 3.000E-01 9.000E-01 - - 75 6 11
- - - - - 6.000E-01 9.000E-01 - - 76 7 13
- - - - - 1.500E+00 9.000E-01 - - 77 8 15
2 O 2 ct2 O * * 1.200E+01 0.00 * * *
- - - - - 1.000E-03 0.000E+00 - - 80 1 2
- - - - - 1.000E-02 0.000E+00 - - 81 2 4
- - - - - 3.000E-02 0.000E+00 - - 82 3 6
- - - - - 6.000E-02 0.000E+00 - - 83 4 8
- - - - - 1.500E-01 4.000E+00 - - 84 5 10
- - - - - 3.000E-01 4.000E+00 - - 85 6 12
- - - - - 6.000E-01 4.000E+00 - - 86 7 14
- - - - - 1.500E+00 4.000E+00 - - 87 8 16
3 O 3 ct2 H H * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-02 0.000E+00 - -1 4.0 - 104 1 21 1
- - - - - - 1.000E-02 0.000E+00 - 1 4.0 - 102 2 22 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 99 3 23 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 97 4 26 0
- - - - - - 7.000E-02 0.000E+00 - -1 1.0 - 94 5 29 1
- - - - - - 7.000E-02 0.000E+00 - 1 1.0 - 92 6 30 0
4 O 3 ct2 H O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 110 1 17 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 109 2 19 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 108 3 24 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 107 4 27 0
5 O 3 ct2 O O * * 1.200E+01 * * 0.00 * * * *
- - - - - - 1.000E-03 0.000E+00 - -1 4.0 - 120 1 18 1
- - - - - - 1.000E-03 0.000E+00 - 1 4.0 - 119 2 20 0
- - - - - - 3.000E-02 0.000E+00 - -1 1.0 - 118 3 25 1
- - - - - - 3.000E-02 0.000E+00 - 1 1.0 - 117 4 28 0
----------------------------------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: NEURAL NETWORKS ****************************************************
Normalize neurons (all elements): 0
-------------------------------------------------------------------------------
Atomic short range NN for element H :
Number of weights : 1325
Number of biases : 51
Number of connections: 1376
Architecture 27 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
-------------------------------------------------------------------------------
Atomic short range NN for element O :
Number of weights : 1400
Number of biases : 51
Number of connections: 1451
Architecture 30 25 25 1
-------------------------------------------------------------------------------
1 G t t l
2 G t t
3 G t t
4 G t t
5 G t t
6 G t t
7 G t t
8 G t t
9 G t t
10 G t t
11 G t t
12 G t t
13 G t t
14 G t t
15 G t t
16 G t t
17 G t t
18 G t t
19 G t t
20 G t t
21 G t t
22 G t t
23 G t t
24 G t t
25 G t t
26 G
27 G
28 G
29 G
30 G
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION SCALING ******************************************
Equal scaling type for all symmetry functions:
Scaling type::ST_SCALECENTER (3)
Gs = Smin + (Smax - Smin) * (G - Gmean) / (Gmax - Gmin)
Smin = 0.000000
Smax = 1.000000
Symmetry function scaling statistics from file: hdnnp-data/scaling.data
-------------------------------------------------------------------------------
Abbreviations:
--------------
ind ..... Symmetry function index.
min ..... Minimum symmetry function value.
max ..... Maximum symmetry function value.
mean .... Mean symmetry function value.
sigma ... Standard deviation of symmetry function values.
sf ...... Scaling factor for derivatives.
Smin .... Desired minimum scaled symmetry function value.
Smax .... Desired maximum scaled symmetry function value.
t ....... Scaling type.
Scaling data for symmetry functions element H :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.09E+00 9.62E+00 2.27E+00 6.79E-01 1.17E-01 0.00 1.00 3
2 7.33E-01 5.00E+00 1.33E+00 3.39E-01 2.34E-01 0.00 1.00 3
3 7.60E-01 7.14E+00 1.65E+00 5.08E-01 1.57E-01 0.00 1.00 3
4 5.48E-01 3.77E+00 1.02E+00 2.54E-01 3.11E-01 0.00 1.00 3
5 4.01E-01 4.15E+00 9.09E-01 2.98E-01 2.67E-01 0.00 1.00 3
6 3.62E-01 2.27E+00 6.49E-01 1.48E-01 5.25E-01 0.00 1.00 3
7 1.89E-01 2.23E+00 4.57E-01 1.60E-01 4.90E-01 0.00 1.00 3
8 2.67E-01 1.32E+00 4.24E-01 8.05E-02 9.49E-01 0.00 1.00 3
9 2.45E-01 9.48E-01 3.62E-01 5.30E-02 1.42E+00 0.00 1.00 3
10 2.22E-01 2.76E+00 5.39E-01 2.01E-01 3.94E-01 0.00 1.00 3
11 1.47E-01 5.56E-01 2.68E-01 2.62E-02 2.45E+00 0.00 1.00 3
12 9.91E-02 1.73E+00 2.96E-01 1.16E-01 6.14E-01 0.00 1.00 3
13 6.51E-02 3.45E-01 1.85E-01 1.97E-02 3.57E+00 0.00 1.00 3
14 3.17E-02 9.13E-01 1.50E-01 5.35E-02 1.13E+00 0.00 1.00 3
15 2.92E-03 2.65E-01 7.65E-02 1.88E-02 3.82E+00 0.00 1.00 3
16 3.21E-04 2.87E-01 4.58E-02 2.33E-02 3.49E+00 0.00 1.00 3
17 2.47E-04 1.38E-01 1.77E-02 9.75E-03 7.23E+00 0.00 1.00 3
18 5.10E-03 5.83E-01 2.39E-02 3.78E-02 1.73E+00 0.00 1.00 3
19 3.23E-04 2.16E-01 1.71E-02 1.40E-02 4.63E+00 0.00 1.00 3
20 4.96E-02 1.69E+00 1.45E-01 1.10E-01 6.11E-01 0.00 1.00 3
21 3.41E-03 3.16E-01 1.84E-02 2.01E-02 3.20E+00 0.00 1.00 3
22 1.31E-04 1.03E-01 6.37E-03 6.61E-03 9.76E+00 0.00 1.00 3
23 3.38E-02 9.16E-01 8.13E-02 5.79E-02 1.13E+00 0.00 1.00 3
24 4.17E-04 1.58E-01 4.66E-03 9.86E-03 6.35E+00 0.00 1.00 3
25 7.35E-04 5.92E-02 3.70E-03 3.31E-03 1.71E+01 0.00 1.00 3
26 8.98E-03 1.94E-01 2.41E-02 1.10E-02 5.40E+00 0.00 1.00 3
27 2.12E-04 8.78E-03 2.06E-03 5.88E-04 1.17E+02 0.00 1.00 3
-------------------------------------------------------------------------------
Scaling data for symmetry functions element O :
-------------------------------------------------------------------------------
ind min max mean sigma sf Smin Smax t
-------------------------------------------------------------------------------
1 1.51E+00 1.00E+01 2.65E+00 6.78E-01 1.18E-01 0.00 1.00 3
2 4.44E-01 4.62E+00 9.66E-01 3.37E-01 2.39E-01 0.00 1.00 3
3 1.19E+00 7.53E+00 2.03E+00 5.06E-01 1.58E-01 0.00 1.00 3
4 2.76E-01 3.39E+00 6.59E-01 2.50E-01 3.21E-01 0.00 1.00 3
5 8.06E-01 4.54E+00 1.30E+00 2.94E-01 2.68E-01 0.00 1.00 3
6 1.05E-01 1.89E+00 3.07E-01 1.42E-01 5.60E-01 0.00 1.00 3
7 5.69E-01 2.62E+00 8.48E-01 1.57E-01 4.89E-01 0.00 1.00 3
8 2.33E-02 9.36E-01 1.11E-01 6.98E-02 1.10E+00 0.00 1.00 3
9 5.14E-01 1.85E+00 7.25E-01 9.80E-02 7.46E-01 0.00 1.00 3
10 1.11E-01 2.91E+00 4.75E-01 2.34E-01 3.57E-01 0.00 1.00 3
11 3.53E-01 1.07E+00 5.35E-01 4.52E-02 1.39E+00 0.00 1.00 3
12 3.04E-02 2.53E+00 3.17E-01 2.10E-01 4.00E-01 0.00 1.00 3
13 1.60E-01 6.63E-01 3.70E-01 3.08E-02 1.99E+00 0.00 1.00 3
14 2.78E-03 2.30E+00 1.77E-01 1.86E-01 4.35E-01 0.00 1.00 3
15 9.56E-03 3.91E-01 1.53E-01 2.79E-02 2.62E+00 0.00 1.00 3
16 3.75E-06 2.04E+00 5.41E-02 1.43E-01 4.91E-01 0.00 1.00 3
17 2.47E-03 3.43E-01 1.67E-02 2.19E-02 2.93E+00 0.00 1.00 3
18 1.74E-05 5.63E-02 9.55E-04 3.36E-03 1.78E+01 0.00 1.00 3
19 5.48E-02 3.02E+00 2.04E-01 2.01E-01 3.37E-01 0.00 1.00 3
20 1.38E-03 4.99E-01 1.28E-02 3.18E-02 2.01E+00 0.00 1.00 3
21 6.69E-03 2.67E-01 3.09E-02 1.71E-02 3.84E+00 0.00 1.00 3
22 1.70E-02 1.42E+00 7.63E-02 9.29E-02 7.14E-01 0.00 1.00 3
23 1.98E-02 4.08E-01 4.88E-02 2.55E-02 2.58E+00 0.00 1.00 3
24 5.28E-04 2.33E-01 7.21E-03 1.45E-02 4.30E+00 0.00 1.00 3
25 1.11E-05 3.53E-02 4.25E-04 2.05E-03 2.83E+01 0.00 1.00 3
26 1.60E-02 8.22E-01 5.08E-02 5.28E-02 1.24E+00 0.00 1.00 3
27 3.99E-03 7.86E-01 3.69E-02 5.05E-02 1.28E+00 0.00 1.00 3
28 4.05E-05 9.84E-02 1.21E-03 5.79E-03 1.02E+01 0.00 1.00 3
29 6.04E-03 9.93E-02 1.62E-02 5.52E-03 1.07E+01 0.00 1.00 3
30 2.96E-03 1.55E-01 1.16E-02 8.94E-03 6.59E+00 0.00 1.00 3
-------------------------------------------------------------------------------
*******************************************************************************
*** SETUP: SYMMETRY FUNCTION STATISTICS ***************************************
Equal symmetry function statistics for all elements.
Collect min/max/mean/sigma : 0
Collect extrapolation warnings : 1
Write extrapolation warnings immediately to stderr: 0
Halt on any extrapolation warning : 0
*******************************************************************************
*** SETUP: NEURAL NETWORK WEIGHTS *********************************************
Short NN weight file name format: hdnnp-data/weights.%03d.data
Setting short NN weights for element H from file: hdnnp-data/weights.001.data
Setting short NN weights for element O from file: hdnnp-data/weights.008.data
*******************************************************************************
*** SETUP: LAMMPS INTERFACE ***************************************************
Individual extrapolation warnings will not be shown.
Extrapolation warning summary will be shown every 5 timesteps.
The simulation will be stopped when 100 extrapolation warnings are exceeded.
Extrapolation warnings are accumulated over all time steps.
-------------------------------------------------------------------------------
CAUTION: If the LAMMPS unit system differs from the one used
during NN training, appropriate conversion factors
must be provided (see keywords cflength and cfenergy).
Length unit conversion factor: 1.8897261327999999E+00
Energy unit conversion factor: 3.6749325399999998E-02
Checking consistency of cutoff radii (in LAMMPS units):
LAMMPS Cutoff (via pair_coeff) : 6.360E+00
Maximum symmetry function cutoff: 6.350E+00
Cutoff radii are consistent.
-------------------------------------------------------------------------------
Element mapping string from LAMMPS to n2p2: "2:H,3:O"
CAUTION: Please ensure that this mapping between LAMMPS
atom types and NNP elements is consistent:
---------------------------
LAMMPS type | NNP element
---------------------------
1 <-> --
2 <-> H ( 1)
3 <-> O ( 8)
---------------------------
NNP setup for LAMMPS completed.
*******************************************************************************
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 8.36
ghost atom cutoff = 8.36
binsize = 4.18, bins = 6 6 6
4 neighbor lists, perpetual/occasional/extra = 4 0 0
(1) pair lj/cut, perpetual, skip from (3)
attributes: half, newton on, cut 8
pair build: skip
stencil: none
bin: none
(2) pair hdnnp, perpetual, skip from (4)
attributes: full, newton on
pair build: skip
stencil: none
bin: none
(3) neighbor class addition, perpetual, half/full trim from (4)
attributes: half, newton on, cut 8
pair build: halffull/newton/trim
stencil: none
bin: none
(4) neighbor class addition, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
### NNP EW SUMMARY ### TS: 0 EW 0 EWPERSTEP 0.000e+00
Per MPI rank memory allocation (min/avg/max) = 5.024 | 5.024 | 5.024 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -750069.48 0 -750069.48 -5297.5537
1 8.5815594 -750070.71 0 -750069.51 -5249.2914
2 30.988787 -750073.91 0 -750069.59 -5023.6945
3 58.859866 -750077.88 0 -750069.67 -4427.8346
4 82.576399 -750081.26 0 -750069.74 -3275.4378
### NNP EW SUMMARY ### TS: 5 EW 0 EWPERSTEP 0.000e+00
5 94.968097 -750083.01 0 -750069.76 -1511.6733
6 93.724286 -750082.8 0 -750069.73 709.20465
7 82.243957 -750081.13 0 -750069.66 3020.5084
8 68.611429 -750079.14 0 -750069.57 4922.5176
9 62.314385 -750078.21 0 -750069.51 5933.1543
### NNP EW SUMMARY ### TS: 10 EW 0 EWPERSTEP 0.000e+00
10 69.501045 -750079.21 0 -750069.52 5761.8646
Loop time of 0.936871 on 4 procs for 10 steps with 1080 atoms
Performance: 0.461 ns/day, 52.048 hours/ns, 10.674 timesteps/s, 11.528 katom-step/s
99.6% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.86567 | 0.89891 | 0.93611 | 3.1 | 95.95
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00035446 | 0.037585 | 0.070835 | 15.3 | 4.01
Output | 0.00018528 | 0.00023648 | 0.00030553 | 0.0 | 0.03
Modify | 4.2224e-05 | 4.4078e-05 | 4.6256e-05 | 0.0 | 0.00
Other | | 9.307e-05 | | | 0.01
Nlocal: 270 ave 278 max 262 min
Histogram: 2 0 0 0 0 0 0 0 0 2
Nghost: 2552 ave 2564 max 2541 min
Histogram: 1 0 1 0 0 0 1 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -35,6 +35,7 @@ else()
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc)
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)

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

@ -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

@ -18,11 +18,11 @@ from install_helpers import fullpath, geturl, checkmd5sum, getfallback
# settings
thisdir = fullpath('.')
version ='v.2023.01.3.fix'
version ='v.2023.10.04'
# known checksums for different PACE versions. used to validate the download.
checksums = { \
'v.2023.01.3.fix': '4f0b3b5b14456fe9a73b447de3765caa'
'v.2023.10.04': '70ff79f4e59af175e55d24f3243ad1ff'
}
parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script")

View File

@ -133,7 +133,7 @@ class TorchWrapper(torch.nn.Module):
elems = torch.as_tensor(elems,dtype=torch.int32, device=self.device)
elems=elems-1
device = self.device
if (use_gpu_data and device == None and str(beta.device).find('CUDA') == 1):
if (use_gpu_data and (device is None) and (str(beta.device).find('CUDA') == 1)):
device = 'cuda' #Override device as it wasn't defined in the model
with torch.autograd.enable_grad():

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

4
src/.gitignore vendored
View File

@ -580,8 +580,8 @@
/compute_ke_eff.h
/compute_ke_rigid.cpp
/compute_ke_rigid.h
/compute_local_comp_atom.cpp
/compute_local_comp_atom.h
/compute_composition_atom.cpp
/compute_composition_atom.h
/compute_meso_e_atom.cpp
/compute_meso_e_atom.h
/compute_meso_rho_atom.cpp

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

@ -17,18 +17,20 @@
------------------------------------------------------------------------- */
#include "fix_wall_body_polyhedron.h"
#include <cmath>
#include <cstring>
#include "atom.h"
#include "atom_vec_body.h"
#include "body_rounded_polyhedron.h"
#include "domain.h"
#include "update.h"
#include "error.h"
#include "force.h"
#include "math_const.h"
#include "math_extra.h"
#include "memory.h"
#include "error.h"
#include "update.h"
#include <cmath>
#include <cstring>
using namespace LAMMPS_NS;
using namespace FixConst;

View File

@ -64,6 +64,7 @@ fi
if (test $1 = "COLLOID") then
depend GPU
depend KOKKOS
depend OPENMP
fi
@ -150,6 +151,7 @@ if (test $1 = "MOLECULE") then
depend GPU
depend KOKKOS
depend FEP
depend MESONT
depend OPENMP
depend INTEL
fi
@ -184,6 +186,7 @@ fi
if (test $1 = "ML-SNAP") then
depend ML-IAP
depend KOKKOS
depend INTEL
fi
if (test $1 = "CG-SPICA") then

View File

@ -27,140 +27,140 @@ namespace LAMMPS_NS {
// error arrays
double E1[] = {1.483110564084803581889448079057,
-3.01071073386594942470731046311E-1,
6.8994830689831566246603180718E-2,
-1.3916271264722187682546525687E-2,
2.420799522433463662891678239E-3,
-3.65863968584808644649382577E-4,
4.8620984432319048282887568E-5,
-5.749256558035684835054215E-6,
6.11324357843476469706758E-7,
-5.8991015312958434390846E-8,
5.207009092068648240455E-9,
-4.23297587996554326810E-10,
3.1881135066491749748E-11,
-2.236155018832684273E-12,
1.46732984799108492E-13,
-9.044001985381747E-15,
5.25481371547092E-16,
-2.8874261222849E-17,
1.504785187558E-18,
-7.4572892821E-20,
3.522563810E-21,
-1.58944644E-22,
6.864365E-24,
-2.84257E-25,
1.1306E-26,
-4.33E-28,
1.6E-29,
-1.0E-30};
static constexpr double E1[] = {1.483110564084803581889448079057,
-3.01071073386594942470731046311E-1,
6.8994830689831566246603180718E-2,
-1.3916271264722187682546525687E-2,
2.420799522433463662891678239E-3,
-3.65863968584808644649382577E-4,
4.8620984432319048282887568E-5,
-5.749256558035684835054215E-6,
6.11324357843476469706758E-7,
-5.8991015312958434390846E-8,
5.207009092068648240455E-9,
-4.23297587996554326810E-10,
3.1881135066491749748E-11,
-2.236155018832684273E-12,
1.46732984799108492E-13,
-9.044001985381747E-15,
5.25481371547092E-16,
-2.8874261222849E-17,
1.504785187558E-18,
-7.4572892821E-20,
3.522563810E-21,
-1.58944644E-22,
6.864365E-24,
-2.84257E-25,
1.1306E-26,
-4.33E-28,
1.6E-29,
-1.0E-30};
double E2[] = {1.077977852072383151168335910348,
-2.6559890409148673372146500904E-2,
-1.487073146698099509605046333E-3,
-1.38040145414143859607708920E-4,
-1.1280303332287491498507366E-5,
-1.172869842743725224053739E-6,
-1.03476150393304615537382E-7,
-1.1899114085892438254447E-8,
-1.016222544989498640476E-9,
-1.37895716146965692169E-10,
-9.369613033737303335E-12,
-1.918809583959525349E-12,
-3.7573017201993707E-14,
-3.7053726026983357E-14,
2.627565423490371E-15,
-1.121322876437933E-15,
1.84136028922538E-16,
-4.9130256574886E-17,
1.0704455167373E-17,
-2.671893662405E-18,
6.49326867976E-19,
-1.65399353183E-19,
4.2605626604E-20,
-1.1255840765E-20,
3.025617448E-21,
-8.29042146E-22,
2.31049558E-22,
-6.5469511E-23,
1.8842314E-23,
-5.504341E-24,
1.630950E-24,
-4.89860E-25,
1.49054E-25,
-4.5922E-26,
1.4318E-26,
-4.516E-27,
1.440E-27,
-4.64E-28,
1.51E-28,
-5.0E-29,
1.7E-29,
-6.0E-30,
2.0E-30,
-1.0E-30};
static constexpr double E2[] = {1.077977852072383151168335910348,
-2.6559890409148673372146500904E-2,
-1.487073146698099509605046333E-3,
-1.38040145414143859607708920E-4,
-1.1280303332287491498507366E-5,
-1.172869842743725224053739E-6,
-1.03476150393304615537382E-7,
-1.1899114085892438254447E-8,
-1.016222544989498640476E-9,
-1.37895716146965692169E-10,
-9.369613033737303335E-12,
-1.918809583959525349E-12,
-3.7573017201993707E-14,
-3.7053726026983357E-14,
2.627565423490371E-15,
-1.121322876437933E-15,
1.84136028922538E-16,
-4.9130256574886E-17,
1.0704455167373E-17,
-2.671893662405E-18,
6.49326867976E-19,
-1.65399353183E-19,
4.2605626604E-20,
-1.1255840765E-20,
3.025617448E-21,
-8.29042146E-22,
2.31049558E-22,
-6.5469511E-23,
1.8842314E-23,
-5.504341E-24,
1.630950E-24,
-4.89860E-25,
1.49054E-25,
-4.5922E-26,
1.4318E-26,
-4.516E-27,
1.440E-27,
-4.64E-28,
1.51E-28,
-5.0E-29,
1.7E-29,
-6.0E-30,
2.0E-30,
-1.0E-30};
double DE1[] = {-0.689379974848418501361491576718,
0.295939056851161774752959335568,
-0.087237828075228616420029484096,
0.019959734091835509766546612696,
-0.003740200486895490324750329974,
0.000593337912367800463413186784,
-0.000081560801047403878256504204,
9.886099179971884018535968E-6,
-1.071209234904290565745194E-6,
1.0490945447626050322784E-7,
-9.370959271038746709966E-9,
7.6927263488753841874E-10,
-5.8412335114551520146E-11,
4.125393291736424788E-12,
-2.72304624901729048E-13,
1.6869717361387012E-14,
-9.84565340276638E-16,
5.4313471880068E-17,
-2.840458699772E-18,
1.4120512798E-19,
-6.688772574E-21,
3.0257558E-22,
-1.3097526E-23,
5.4352E-25,
-2.1704E-26,
8.32E-28,
-5.4E-29};
static constexpr double DE1[] = {-0.689379974848418501361491576718,
0.295939056851161774752959335568,
-0.087237828075228616420029484096,
0.019959734091835509766546612696,
-0.003740200486895490324750329974,
0.000593337912367800463413186784,
-0.000081560801047403878256504204,
9.886099179971884018535968E-6,
-1.071209234904290565745194E-6,
1.0490945447626050322784E-7,
-9.370959271038746709966E-9,
7.6927263488753841874E-10,
-5.8412335114551520146E-11,
4.125393291736424788E-12,
-2.72304624901729048E-13,
1.6869717361387012E-14,
-9.84565340276638E-16,
5.4313471880068E-17,
-2.840458699772E-18,
1.4120512798E-19,
-6.688772574E-21,
3.0257558E-22,
-1.3097526E-23,
5.4352E-25,
-2.1704E-26,
8.32E-28,
-5.4E-29};
double DE2[] = {0.717710208167480928473053690384,
-0.379868973985143305103199928808,
0.125832094465157378967135019248,
-0.030917661684228839423081992424,
0.006073689914144320367855343072,
-0.000996057789064916825079352632,
0.000140310790466315733723475232,
-0.000017328176496070286001302184,
1.90540194670935746397168e-6,
-1.8882873760163694937908e-7,
1.703176613666840587056e-8,
-1.40955218086201517976e-9,
1.0776816914256065828e-10,
-7.656138112778696256e-12,
5.07943557413613792e-13,
-3.1608615530282912e-14,
1.852036572003432e-15,
-1.02524641430496e-16,
5.37852808112e-18,
-2.68128238704e-19,
1.273321788e-20,
-5.77335744e-22,
2.504352e-23,
-1.0446e-24,
4.16e-26,
-2.808e-27};
static constexpr double DE2[] = {0.717710208167480928473053690384,
-0.379868973985143305103199928808,
0.125832094465157378967135019248,
-0.030917661684228839423081992424,
0.006073689914144320367855343072,
-0.000996057789064916825079352632,
0.000140310790466315733723475232,
-0.000017328176496070286001302184,
1.90540194670935746397168e-6,
-1.8882873760163694937908e-7,
1.703176613666840587056e-8,
-1.40955218086201517976e-9,
1.0776816914256065828e-10,
-7.656138112778696256e-12,
5.07943557413613792e-13,
-3.1608615530282912e-14,
1.852036572003432e-15,
-1.02524641430496e-16,
5.37852808112e-18,
-2.68128238704e-19,
1.273321788e-20,
-5.77335744e-22,
2.504352e-23,
-1.0446e-24,
4.16e-26,
-2.808e-27};
// inline functions for performance
/* ---------------------------------------------------------------------- */
inline double ipoly02(double x)
static inline double ipoly02(double x)
{
/* P(x) in the range x > 2 */
int i;
@ -178,7 +178,7 @@ inline double ipoly02(double x)
/* ---------------------------------------------------------------------- */
inline double ipoly1(double x)
static inline double ipoly1(double x)
{
/* First derivative P'(x) in the range x < 2 */
int i;
@ -197,7 +197,7 @@ inline double ipoly1(double x)
/* ---------------------------------------------------------------------- */
inline double ipoly01(double x)
static inline double ipoly01(double x)
{
// P(x) in the range x < 2
@ -216,7 +216,7 @@ inline double ipoly01(double x)
/* ---------------------------------------------------------------------- */
inline double ierfoverx1(double x, double *df)
static inline double ierfoverx1(double x, double *df)
{
// Computes Erf(x)/x and its first derivative
@ -245,7 +245,7 @@ inline double ierfoverx1(double x, double *df)
/* ---------------------------------------------------------------------- */
inline void KinElec(double radius, double *eke, double *frc)
static inline void KinElec(double radius, double *eke, double *frc)
{
*eke += 1.5 / (radius * radius);
*frc += 3.0 / (radius * radius * radius);
@ -253,7 +253,7 @@ inline void KinElec(double radius, double *eke, double *frc)
/* ---------------------------------------------------------------------- */
inline void ElecNucNuc(double q, double rc, double *ecoul, double *frc)
static inline void ElecNucNuc(double q, double rc, double *ecoul, double *frc)
{
*ecoul += q / rc;
*frc += q / (rc * rc);
@ -261,7 +261,8 @@ inline void ElecNucNuc(double q, double rc, double *ecoul, double *frc)
/* ---------------------------------------------------------------------- */
inline void ElecNucElec(double q, double rc, double re1, double *ecoul, double *frc, double *fre1)
static inline void ElecNucElec(double q, double rc, double re1, double *ecoul, double *frc,
double *fre1)
{
double a, arc;
double coeff_a;
@ -289,8 +290,8 @@ inline void ElecNucElec(double q, double rc, double re1, double *ecoul, double *
/* ---------------------------------------------------------------------- */
inline void ElecElecElec(double rc, double re1, double re2, double *ecoul, double *frc,
double *fre1, double *fre2)
static inline void ElecElecElec(double rc, double re1, double re2, double *ecoul, double *frc,
double *fre1, double *fre2)
{
double a, arc, re, fre;
double coeff_a;
@ -327,7 +328,7 @@ inline void ElecElecElec(double rc, double re1, double re2, double *ecoul, doubl
/* ---------------------------------------------------------------------- */
inline void ElecCoreNuc(double q, double rc, double re1, double *ecoul, double *frc)
static inline void ElecCoreNuc(double q, double rc, double re1, double *ecoul, double *frc)
{
double a, arc;
double coeff_a;
@ -347,7 +348,8 @@ inline void ElecCoreNuc(double q, double rc, double re1, double *ecoul, double *
/* ---------------------------------------------------------------------- */
inline void ElecCoreCore(double q, double rc, double re1, double re2, double *ecoul, double *frc)
static inline void ElecCoreCore(double q, double rc, double re1, double re2, double *ecoul,
double *frc)
{
double a, arc, re;
double coeff_a;
@ -369,8 +371,8 @@ inline void ElecCoreCore(double q, double rc, double re1, double re2, double *ec
/* ---------------------------------------------------------------------- */
inline void ElecCoreElec(double q, double rc, double re1, double re2, double *ecoul, double *frc,
double *fre2)
static inline void ElecCoreElec(double q, double rc, double re1, double re2, double *ecoul,
double *frc, double *fre2)
{
double a, arc, re;
double coeff_a;
@ -404,8 +406,8 @@ inline void ElecCoreElec(double q, double rc, double re1, double re2, double *ec
/* ---------------------------------------------------------------------- */
inline void PauliElecElec(int samespin, double rc, double re1, double re2, double *epauli,
double *frc, double *fre1, double *fre2)
static inline void PauliElecElec(int samespin, double rc, double re1, double re2, double *epauli,
double *frc, double *fre1, double *fre2)
{
double ree, rem;
double S, t1, t2, tt;
@ -452,8 +454,8 @@ inline void PauliElecElec(int samespin, double rc, double re1, double re2, doubl
/* ---------------------------------------------------------------------- */
inline void PauliCoreElec(double rc, double re2, double *epauli, double *frc, double *fre2,
double PAULI_CORE_A, double PAULI_CORE_B, double PAULI_CORE_C)
static inline void PauliCoreElec(double rc, double re2, double *epauli, double *frc, double *fre2,
double PAULI_CORE_A, double PAULI_CORE_B, double PAULI_CORE_C)
{
double E, dEdrc, dEdre2, rcsq, ssq;
@ -476,9 +478,10 @@ inline void PauliCoreElec(double rc, double re2, double *epauli, double *frc, do
/* ---------------------------------------------------------------------- */
inline void PauliCorePElec(double rc, double re2, double *epauli, double *frc, double *fre2,
double PAULI_CORE_P_A, double PAULI_CORE_P_B, double PAULI_CORE_P_C,
double PAULI_CORE_P_D, double PAULI_CORE_P_E)
static inline void PauliCorePElec(double rc, double re2, double *epauli, double *frc, double *fre2,
double PAULI_CORE_P_A, double PAULI_CORE_P_B,
double PAULI_CORE_P_C, double PAULI_CORE_P_D,
double PAULI_CORE_P_E)
{
double E, dEdrc, dEdre2;
@ -510,8 +513,8 @@ inline void PauliCorePElec(double rc, double re2, double *epauli, double *frc, d
/* ---------------------------------------------------------------------- */
inline void RForce(double dx, double dy, double dz, double rc, double force, double *fx, double *fy,
double *fz)
static inline void RForce(double dx, double dy, double dz, double rc, double force, double *fx,
double *fy, double *fz)
{
force /= rc;
*fx = force * dx;
@ -521,8 +524,8 @@ inline void RForce(double dx, double dy, double dz, double rc, double force, dou
/* ---------------------------------------------------------------------- */
inline void SmallRForce(double dx, double dy, double dz, double rc, double force, double *fx,
double *fy, double *fz)
static inline void SmallRForce(double dx, double dy, double dz, double rc, double force, double *fx,
double *fy, double *fz)
{
/* Handles case where rc is small to avoid division by zero */
@ -552,7 +555,7 @@ inline void SmallRForce(double dx, double dy, double dz, double rc, double force
/* ---------------------------------------------------------------------- */
inline double cutoff(double x)
static inline double cutoff(double x)
{
/* cubic: return x * x * (2.0 * x - 3.0) + 1.0; */
/* quintic: return -6 * pow(x, 5) + 15 * pow(x, 4) - 10 * pow(x, 3) + 1; */
@ -564,7 +567,7 @@ inline double cutoff(double x)
/* ---------------------------------------------------------------------- */
inline double dcutoff(double x)
static inline double dcutoff(double x)
{
/* cubic: return (6.0 * x * x - 6.0 * x); */
/* quintic: return -30 * pow(x, 4) + 60 * pow(x, 3) - 30 * pow(x, 2); */

View File

@ -84,7 +84,7 @@ void ElectrodeMatrix::compute_array(double **array, bool timer_flag)
electrode_kspace->compute_matrix(&mpos[0], array, timer_flag);
MPI_Barrier(world);
if (timer_flag && (comm->me == 0))
utils::logmesg(lmp, fmt::format("KSpace time: {:.4g} s\n", MPI_Wtime() - kspace_time));
utils::logmesg(lmp, "KSpace time: {:.4g} s\n", MPI_Wtime() - kspace_time);
//cout << array[0][0] << ", " << array[0][1] << endl;
pair_contribution(array);
//cout << array[0][0] << ", " << array[0][1] << endl;

View File

@ -60,10 +60,10 @@ ElectrodeVector::~ElectrodeVector()
{
if (timer_flag && (comm->me == 0)) {
try {
utils::logmesg(lmp, fmt::format("B time: {:.4g} s\n", b_time_total));
utils::logmesg(lmp, fmt::format("B kspace time: {:.4g} s\n", kspace_time_total));
utils::logmesg(lmp, fmt::format("B pair time: {:.4g} s\n", pair_time_total));
utils::logmesg(lmp, fmt::format("B boundary time: {:.4g} s\n", boundary_time_total));
utils::logmesg(lmp, "B time: {:.4g} s\n", b_time_total);
utils::logmesg(lmp, "B kspace time: {:.4g} s\n", kspace_time_total);
utils::logmesg(lmp, "B pair time: {:.4g} s\n", pair_time_total);
utils::logmesg(lmp, "B boundary time: {:.4g} s\n", boundary_time_total);
} catch (std::exception &) {
}
}

View File

@ -136,7 +136,7 @@ void PPPMElectrode::init()
}
if (order < 2 || order > MAXORDER)
error->all(FLERR, fmt::format("PPPM/electrode order cannot be < 2 or > {}", MAXORDER));
error->all(FLERR, "PPPM/electrode order cannot be < 2 or > {}", MAXORDER);
// compute two charge force
@ -816,7 +816,7 @@ void PPPMElectrode::one_step_multiplication(bigint *imat, double *greens_real, d
memory->destroy(rho1d_j);
MPI_Barrier(world);
if (timer_flag && (comm->me == 0))
utils::logmesg(lmp, fmt::format("Single step time: {:.4g} s\n", MPI_Wtime() - step1_time));
utils::logmesg(lmp, "Single step time: {:.4g} s\n", MPI_Wtime() - step1_time);
}
/* ----------------------------------------------------------------------*/
@ -917,7 +917,7 @@ void PPPMElectrode::two_step_multiplication(bigint *imat, double *greens_real, d
}
MPI_Barrier(world);
if (timer_flag && (comm->me == 0))
utils::logmesg(lmp, fmt::format("step 1 time: {:.4g} s\n", MPI_Wtime() - step1_time));
utils::logmesg(lmp, "step 1 time: {:.4g} s\n", MPI_Wtime() - step1_time);
// nested loop over electrode atoms i and j and stencil of i
// in theory could reuse make_rho1d_j here -- but this step is already
@ -958,7 +958,7 @@ void PPPMElectrode::two_step_multiplication(bigint *imat, double *greens_real, d
MPI_Barrier(world);
memory->destroy(gw);
if (timer_flag && (comm->me == 0))
utils::logmesg(lmp, fmt::format("step 2 time: {:.4g} s\n", MPI_Wtime() - step2_time));
utils::logmesg(lmp, "step 2 time: {:.4g} s\n", MPI_Wtime() - step2_time);
}
/* ----------------------------------------------------------------------

View File

@ -33,6 +33,7 @@
#include <cmath>
#include <cstring>
#include <utility>
using namespace LAMMPS_NS;
@ -346,35 +347,24 @@ void ComputeAcklandAtom::compute_peratom()
2nd routine sorts auxiliary array at same time
------------------------------------------------------------------------- */
#define SWAP(a,b) tmp = a; (a) = b; (b) = tmp;
#define ISWAP(a,b) itmp = a; (a) = b; (b) = itmp;
void ComputeAcklandAtom::select(int k, int n, double *arr)
{
int i,ir,j,l,mid;
double a,tmp;
double a;
arr--;
l = 1;
ir = n;
while (true) {
if (ir <= l+1) {
if (ir == l+1 && arr[ir] < arr[l]) {
SWAP(arr[l],arr[ir])
}
if (ir == l+1 && arr[ir] < arr[l]) std::swap(arr[l],arr[ir]);
return;
} else {
mid=(l+ir) >> 1;
SWAP(arr[mid],arr[l+1])
if (arr[l] > arr[ir]) {
SWAP(arr[l],arr[ir])
}
if (arr[l+1] > arr[ir]) {
SWAP(arr[l+1],arr[ir])
}
if (arr[l] > arr[l+1]) {
SWAP(arr[l],arr[l+1])
}
std::swap(arr[mid],arr[l+1]);
if (arr[l] > arr[ir]) std::swap(arr[l],arr[ir]);
if (arr[l+1] > arr[ir]) std::swap(arr[l+1],arr[ir]);
if (arr[l] > arr[l+1]) std::swap(arr[l],arr[l+1]);
i = l+1;
j = ir;
a = arr[l+1];
@ -382,7 +372,7 @@ void ComputeAcklandAtom::select(int k, int n, double *arr)
do i++; while (arr[i] < a);
do j--; while (arr[j] > a);
if (j < i) break;
SWAP(arr[i],arr[j])
std::swap(arr[i],arr[j]);
}
arr[l+1] = arr[j];
arr[j] = a;
@ -396,8 +386,8 @@ void ComputeAcklandAtom::select(int k, int n, double *arr)
void ComputeAcklandAtom::select2(int k, int n, double *arr, int *iarr)
{
int i,ir,j,l,mid,ia,itmp;
double a,tmp;
int i,ir,j,l,mid,ia;
double a;
arr--;
iarr--;
@ -406,25 +396,25 @@ void ComputeAcklandAtom::select2(int k, int n, double *arr, int *iarr)
while (true) {
if (ir <= l+1) {
if (ir == l+1 && arr[ir] < arr[l]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
return;
} else {
mid=(l+ir) >> 1;
SWAP(arr[mid],arr[l+1])
ISWAP(iarr[mid],iarr[l+1])
std::swap(arr[mid],arr[l+1]);
std::swap(iarr[mid],iarr[l+1]);
if (arr[l] > arr[ir]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
if (arr[l+1] > arr[ir]) {
SWAP(arr[l+1],arr[ir])
ISWAP(iarr[l+1],iarr[ir])
std::swap(arr[l+1],arr[ir]);
std::swap(iarr[l+1],iarr[ir]);
}
if (arr[l] > arr[l+1]) {
SWAP(arr[l],arr[l+1])
ISWAP(iarr[l],iarr[l+1])
std::swap(arr[l],arr[l+1]);
std::swap(iarr[l],iarr[l+1]);
}
i = l+1;
j = ir;
@ -434,8 +424,8 @@ void ComputeAcklandAtom::select2(int k, int n, double *arr, int *iarr)
do i++; while (arr[i] < a);
do j--; while (arr[j] > a);
if (j < i) break;
SWAP(arr[i],arr[j])
ISWAP(iarr[i],iarr[j])
std::swap(arr[i],arr[j]);
std::swap(iarr[i],iarr[j]);
}
arr[l+1] = arr[j];
arr[j] = a;

View File

@ -31,6 +31,7 @@
#include "update.h"
#include <cmath>
#include <utility>
using namespace LAMMPS_NS;
@ -431,35 +432,24 @@ void ComputeBasalAtom::compute_peratom()
2nd routine sorts auxiliary array at same time
------------------------------------------------------------------------- */
#define SWAP(a,b) tmp = a; (a) = b; (b) = tmp;
#define ISWAP(a,b) itmp = a; (a) = b; (b) = itmp;
void ComputeBasalAtom::select(int k, int n, double *arr)
{
int i,ir,j,l,mid;
double a,tmp;
double a;
arr--;
l = 1;
ir = n;
while (true) {
if (ir <= l+1) {
if (ir == l+1 && arr[ir] < arr[l]) {
SWAP(arr[l],arr[ir])
}
if (ir == l+1 && arr[ir] < arr[l]) std::swap(arr[l],arr[ir]);
return;
} else {
mid=(l+ir) >> 1;
SWAP(arr[mid],arr[l+1])
if (arr[l] > arr[ir]) {
SWAP(arr[l],arr[ir])
}
if (arr[l+1] > arr[ir]) {
SWAP(arr[l+1],arr[ir])
}
if (arr[l] > arr[l+1]) {
SWAP(arr[l],arr[l+1])
}
std::swap(arr[mid],arr[l+1]);
if (arr[l] > arr[ir]) std::swap(arr[l],arr[ir]);
if (arr[l+1] > arr[ir]) std::swap(arr[l+1],arr[ir]);
if (arr[l] > arr[l+1]) std::swap(arr[l],arr[l+1]);
i = l+1;
j = ir;
a = arr[l+1];
@ -467,7 +457,7 @@ void ComputeBasalAtom::select(int k, int n, double *arr)
do i++; while (arr[i] < a);
do j--; while (arr[j] > a);
if (j < i) break;
SWAP(arr[i],arr[j])
std::swap(arr[i],arr[j]);
}
arr[l+1] = arr[j];
arr[j] = a;
@ -481,8 +471,8 @@ void ComputeBasalAtom::select(int k, int n, double *arr)
void ComputeBasalAtom::select2(int k, int n, double *arr, int *iarr)
{
int i,ir,j,l,mid,ia,itmp;
double a,tmp;
int i,ir,j,l,mid,ia;
double a;
arr--;
iarr--;
@ -491,25 +481,25 @@ void ComputeBasalAtom::select2(int k, int n, double *arr, int *iarr)
while (true) {
if (ir <= l+1) {
if (ir == l+1 && arr[ir] < arr[l]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
return;
} else {
mid=(l+ir) >> 1;
SWAP(arr[mid],arr[l+1])
ISWAP(iarr[mid],iarr[l+1])
std::swap(arr[mid],arr[l+1]);
std::swap(iarr[mid],iarr[l+1]);
if (arr[l] > arr[ir]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
if (arr[l+1] > arr[ir]) {
SWAP(arr[l+1],arr[ir])
ISWAP(iarr[l+1],iarr[ir])
std::swap(arr[l+1],arr[ir]);
std::swap(iarr[l+1],iarr[ir]);
}
if (arr[l] > arr[l+1]) {
SWAP(arr[l],arr[l+1])
ISWAP(iarr[l],iarr[l+1])
std::swap(arr[l],arr[l+1]);
std::swap(iarr[l],iarr[l+1]);
}
i = l+1;
j = ir;
@ -519,8 +509,8 @@ void ComputeBasalAtom::select2(int k, int n, double *arr, int *iarr)
do i++; while (arr[i] < a);
do j--; while (arr[j] > a);
if (j < i) break;
SWAP(arr[i],arr[j])
ISWAP(iarr[i],iarr[j])
std::swap(arr[i],arr[j]);
std::swap(iarr[i],iarr[j]);
}
arr[l+1] = arr[j];
arr[j] = a;

View File

@ -15,7 +15,7 @@
Contributing author: Megan McCarthy (SNL)
------------------------------------------------------------------------- */
#include "compute_local_comp_atom.h"
#include "compute_composition_atom.h"
#include "atom.h"
#include "comm.h"
@ -37,22 +37,22 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
ComputeLocalCompAtom::ComputeLocalCompAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), result(nullptr)
ComputeCompositionAtom::ComputeCompositionAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), list(nullptr), result(nullptr)
{
if (narg < 3 || narg > 5) error->all(FLERR, "Illegal compute local/comp/atom command");
if (narg < 3 || narg > 5) error->all(FLERR, "Illegal compute composition/atom command");
cutoff = 0.0;
cutsq = cutoff = 0.0;
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg], "cutoff") == 0) {
if (iarg + 2 > narg) error->all(FLERR, "Illegal compute local/comp/atom command");
if (iarg + 2 > narg) error->all(FLERR, "Illegal compute composition/atom command");
cutoff = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
if (cutoff <= 0.0) error->all(FLERR, "Illegal compute local/comp/atom command");
if (cutoff <= 0.0) error->all(FLERR, "Illegal compute composition/atom command");
iarg += 2;
} else
error->all(FLERR, "Illegal compute local/comp/atom command");
error->all(FLERR, "Illegal compute composition/atom command");
}
peratom_flag = 1;
@ -65,7 +65,7 @@ ComputeLocalCompAtom::ComputeLocalCompAtom(LAMMPS *lmp, int narg, char **arg) :
/* ---------------------------------------------------------------------- */
ComputeLocalCompAtom::~ComputeLocalCompAtom()
ComputeCompositionAtom::~ComputeCompositionAtom()
{
if (copymode) return;
@ -74,11 +74,11 @@ ComputeLocalCompAtom::~ComputeLocalCompAtom()
/* ---------------------------------------------------------------------- */
void ComputeLocalCompAtom::init()
void ComputeCompositionAtom::init()
{
if (!force->pair && cutoff == 0.0)
error->all(FLERR,
"Compute local/comp/atom requires a cutoff be specified "
"Compute composition/atom requires a cutoff be specified "
"or a pair style be defined");
double skin = neighbor->skin;
@ -91,7 +91,7 @@ void ComputeLocalCompAtom::init()
if (cutoff > cutghost)
error->all(FLERR,
"Compute local/comp/atom cutoff exceeds ghost atom range - "
"Compute composition/atom cutoff exceeds ghost atom range - "
"use comm_modify cutoff command");
}
@ -111,14 +111,14 @@ void ComputeLocalCompAtom::init()
/* ---------------------------------------------------------------------- */
void ComputeLocalCompAtom::init_list(int /*id*/, NeighList *ptr)
void ComputeCompositionAtom::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}
/* ---------------------------------------------------------------------- */
void ComputeLocalCompAtom::compute_peratom()
void ComputeCompositionAtom::compute_peratom()
{
int i, j, ii, jj, inum, jnum;
double xtmp, ytmp, ztmp, delx, dely, delz, rsq;
@ -132,7 +132,7 @@ void ComputeLocalCompAtom::compute_peratom()
if (atom->nmax > nmax) {
memory->destroy(result);
nmax = atom->nmax;
memory->create(result, nmax, size_peratom_cols, "local/comp/atom:result");
memory->create(result, nmax, size_peratom_cols, "composition/atom:result");
array_atom = result;
}
@ -196,9 +196,7 @@ void ComputeLocalCompAtom::compute_peratom()
// local comp fractions per element
double lfac = 1.0 / count;
for (int n = 1; n < size_peratom_cols; n++)
result[i][n+1] *= lfac;
for (int n = 1; n < size_peratom_cols; n++) result[i][n + 1] *= lfac;
}
}
}
@ -207,7 +205,7 @@ void ComputeLocalCompAtom::compute_peratom()
memory usage of local atom-based array
------------------------------------------------------------------------- */
double ComputeLocalCompAtom::memory_usage()
double ComputeCompositionAtom::memory_usage()
{
double bytes = (double) 2 * nmax * sizeof(double);
return bytes;

View File

@ -13,21 +13,21 @@
#ifdef COMPUTE_CLASS
// clang-format off
ComputeStyle(local/comp/atom,ComputeLocalCompAtom);
ComputeStyle(composition/atom,ComputeCompositionAtom);
// clang-format on
#else
#ifndef LMP_COMPUTE_LOCAL_COMP_ATOM_H
#define LMP_COMPUTE_LOCAL_COMP_ATOM_H
#ifndef LMP_COMPUTE_COMPOSITION_ATOM_H
#define LMP_COMPUTE_COMPOSITION_ATOM_H
#include "compute.h"
namespace LAMMPS_NS {
class ComputeLocalCompAtom : public Compute {
class ComputeCompositionAtom : public Compute {
public:
ComputeLocalCompAtom(class LAMMPS *, int, char **);
~ComputeLocalCompAtom() override;
ComputeCompositionAtom(class LAMMPS *, int, char **);
~ComputeCompositionAtom() override;
void init() override;
void init_list(int, class NeighList *) override;
void compute_peratom() override;

View File

@ -33,6 +33,7 @@
#include <cmath>
#include <complex>
#include <cstring>
#include <utility>
#ifdef DBL_EPSILON
#define MY_EPSILON (10.0*DBL_EPSILON)
@ -267,15 +268,12 @@ inline void ComputeHexOrderAtom::calc_qn_trig(double delx, double dely, double &
sort auxiliary array at same time
------------------------------------------------------------------------- */
#define SWAP(a,b) tmp = a; (a) = b; (b) = tmp;
#define ISWAP(a,b) itmp = a; (a) = b; (b) = itmp;
/* ---------------------------------------------------------------------- */
void ComputeHexOrderAtom::select2(int k, int n, double *arr, int *iarr)
{
int i,ir,j,l,mid,ia,itmp;
double a,tmp;
int i,ir,j,l,mid,ia;
double a;
arr--;
iarr--;
@ -284,25 +282,25 @@ void ComputeHexOrderAtom::select2(int k, int n, double *arr, int *iarr)
while (true) {
if (ir <= l+1) {
if (ir == l+1 && arr[ir] < arr[l]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
return;
} else {
mid=(l+ir) >> 1;
SWAP(arr[mid],arr[l+1])
ISWAP(iarr[mid],iarr[l+1])
std::swap(arr[mid],arr[l+1]);
std::swap(iarr[mid],iarr[l+1]);
if (arr[l] > arr[ir]) {
SWAP(arr[l],arr[ir])
ISWAP(iarr[l],iarr[ir])
std::swap(arr[l],arr[ir]);
std::swap(iarr[l],iarr[ir]);
}
if (arr[l+1] > arr[ir]) {
SWAP(arr[l+1],arr[ir])
ISWAP(iarr[l+1],iarr[ir])
std::swap(arr[l+1],arr[ir]);
std::swap(iarr[l+1],iarr[ir]);
}
if (arr[l] > arr[l+1]) {
SWAP(arr[l],arr[l+1])
ISWAP(iarr[l],iarr[l+1])
std::swap(arr[l],arr[l+1]);
std::swap(iarr[l],iarr[l+1]);
}
i = l+1;
j = ir;
@ -312,8 +310,8 @@ void ComputeHexOrderAtom::select2(int k, int n, double *arr, int *iarr)
do i++; while (arr[i] < a);
do j--; while (arr[j] > a);
if (j < i) break;
SWAP(arr[i],arr[j])
ISWAP(iarr[i],iarr[j])
std::swap(arr[i],arr[j]);
std::swap(iarr[i],iarr[j]);
}
arr[l+1] = arr[j];
arr[j] = a;

View File

@ -0,0 +1,70 @@
# Toy demonstration of SNAP "scale" parameter, using fix/adapt and hybrid/overlay
# Mixing linear and quadratic SNAP Ni potentials by Zuo et al. JCPA 2020
variable w index 10 # Warmup Timesteps
variable t index 100 # Main Run Timesteps
variable m index 1 # Main Run Timestep Multiplier
variable n index 0 # Use NUMA Mapping for Multi-Node
variable x index 4
variable y index 2
variable z index 2
variable rr equal floor($t*$m)
variable root getenv LMP_ROOT
if "$n > 0" then "processors * * * grid numa"
# mixing parameter
variable lambda equal 0.2
# Initialize simulation
variable a equal 3.52
units metal
# generate the box and atom positions using a FCC lattice
variable nx equal 20*$x
variable ny equal 20*$y
variable nz equal 20*$z
boundary p p p
lattice fcc $a
region box block 0 ${nx} 0 ${ny} 0 ${nz}
create_box 1 box
create_atoms 1 box
mass 1 34.
# choose bundled SNAP Ni potential from Zuo et al. JCPA 2020
pair_style hybrid/overlay snap snap
pair_coeff * * snap 1 &
${root}/examples/snap/Ni_Zuo_JPCA2020.snapcoeff &
${root}/examples/snap/Ni_Zuo_JPCA2020.snapparam Ni
pair_coeff * * snap 2 &
${root}/examples/snap/Ni_Zuo_JPCA2020.quadratic.snapcoeff &
${root}/examples/snap/Ni_Zuo_JPCA2020.quadratic.snapparam Ni
# scale according to mixing parameter
variable l1 equal ${lambda}
variable l2 equal 1.0-${lambda}
fix scale1 all adapt 1 pair snap:1 scale * * v_l1
fix scale2 all adapt 1 pair snap:2 scale * * v_l2
# Setup output
thermo 1
thermo_modify norm yes
# Set up NVE run
timestep 0.5e-3
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
# Run MD
velocity all create 300.0 4928459 loop geom
fix 1 all nve
if "$w > 0" then "run $w"
run ${rr}

View File

@ -35,7 +35,7 @@ export I_MPI_PIN_DOMAIN=core
# End settings for your system
#########################################################################
export WORKLOADS="lj rhodo lc sw water eam airebo dpd tersoff"
export WORKLOADS="lj rhodo lc sw water eam airebo dpd tersoff snap"
export LMP_ARGS="-pk intel 0 -sf intel -screen none -v d 1"
export RLMP_ARGS="-pk intel 0 lrt yes -sf intel -screen none -v d 1"

View File

@ -59,7 +59,7 @@ class AngleCharmmIntel : public AngleCharmm {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nangletypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nangletypes, Memory *memory);

View File

@ -60,7 +60,7 @@ class AngleHarmonicIntel : public AngleHarmonic {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nangletypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nangletypes, Memory *memory);

View File

@ -59,7 +59,7 @@ class BondFENEIntel : public BondFENE {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nbondtypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nbondtypes, Memory *memory);

View File

@ -59,7 +59,7 @@ class BondHarmonicIntel : public BondHarmonic {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nbondtypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nbondtypes, Memory *memory);

View File

@ -68,7 +68,7 @@ class DihedralCharmmIntel : public DihedralCharmm {
flt_t *weight;
ForceConst() : ljp(nullptr), fc(nullptr), weight(nullptr), _npairtypes(0), _ndihderaltypes(0) {}
~ForceConst() { set_ntypes(0, 0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr); }
void set_ntypes(const int npairtypes, const int ndihderaltypes, Memory *memory);

View File

@ -63,7 +63,7 @@ class DihedralFourierIntel : public DihedralFourier {
fc_packed1 **fc;
ForceConst() : fc(nullptr), _ndihedraltypes(0) {}
~ForceConst() { set_ntypes(0, nullptr, nullptr, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, nullptr, nullptr); }
void set_ntypes(const int ndihedraltypes, int *setflag, int *nterms, Memory *memory);

View File

@ -63,7 +63,7 @@ class DihedralHarmonicIntel : public DihedralHarmonic {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _ndihderaltypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int ndihderaltypes, Memory *memory);

View File

@ -62,7 +62,7 @@ class DihedralOPLSIntel : public DihedralOPLS {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _ndihderaltypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int ndihderaltypes, Memory *memory);

View File

@ -61,7 +61,7 @@ class ImproperCvffIntel : public ImproperCvff {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nimpropertypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nimpropertypes, Memory *memory);

View File

@ -60,7 +60,7 @@ class ImproperHarmonicIntel : public ImproperHarmonic {
fc_packed1 *fc;
ForceConst() : fc(nullptr), _nimpropertypes(0) {}
~ForceConst() { set_ntypes(0, nullptr); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr); }
void set_ntypes(const int nimpropertypes, Memory *memory);

View File

@ -46,13 +46,38 @@ namespace ip_simd {
typedef __mmask16 SIMD_mask;
inline bool any(const SIMD_mask &m) { return m != 0; }
struct SIMD_int {
__m512i v;
SIMD_int() {}
SIMD_int(const __m512i in) : v(in) {}
inline int & operator[](const int i) { return ((int *)&(v))[i]; }
inline const int & operator[](const int i) const
{ return ((int *)&(v))[i]; }
operator __m512i() const { return v;}
};
struct SIMD256_int {
__m256i v;
SIMD256_int() {}
SIMD256_int(const __m256i in) : v(in) {}
SIMD256_int(const int in) : v(_mm256_set1_epi32(in)) {}
inline int & operator[](const int i) { return ((int *)&(v))[i]; }
inline const int & operator[](const int i) const
{ return ((int *)&(v))[i]; }
#ifdef __INTEL_LLVM_COMPILER
inline SIMD256_int operator&=(const int i)
{ v=_mm256_and_epi32(v, _mm256_set1_epi32(i)); return *this; };
#else
inline SIMD256_int operator&=(const int i)
{ v=_mm256_and_si256(v, _mm256_set1_epi32(i)); return *this; };
#endif
inline SIMD256_int operator+=(const int i)
{ v=_mm256_add_epi32(v, _mm256_set1_epi32(i)); return *this; };
operator __m256i() const { return v;}
};
struct SIMD_float {
__m512 v;
SIMD_float() {}
@ -64,7 +89,24 @@ namespace ip_simd {
__m512d v;
SIMD_double() {}
SIMD_double(const __m512d in) : v(in) {}
SIMD_double(const double in) { v=_mm512_set1_pd(in); }
inline double & operator[](const int i) { return ((double *)&(v))[i]; }
inline const double & operator[](const int i) const
{ return ((double *)&(v))[i]; }
operator __m512d() const { return v;}
SIMD_double & operator=(const double i)
{ _mm512_set1_pd(i); return *this; }
SIMD_double &operator=(const SIMD_double &i)
{ v = i.v; return *this; }
SIMD_double operator-() { return _mm512_xor_pd(v, _mm512_set1_pd(-0.0)); }
SIMD_double & operator+=(const SIMD_double & two)
{ v = _mm512_add_pd(v, two.v); return *this; }
SIMD_double & operator-=(const SIMD_double & two)
{ v = _mm512_sub_pd(v, two.v); return *this; }
SIMD_double & operator*=(const SIMD_double & two)
{ v = _mm512_mul_pd(v, two.v); return *this; }
};
template<class flt_t>
@ -99,6 +141,12 @@ namespace ip_simd {
// ------- Set Operations
inline SIMD256_int SIMD256_set(const int l0, const int l1, const int l2,
const int l3, const int l4, const int l5,
const int l6, const int l7) {
return _mm256_setr_epi32(l0,l1,l2,l3,l4,l5,l6,l7);
}
inline SIMD_int SIMD_set(const int l0, const int l1, const int l2,
const int l3, const int l4, const int l5,
const int l6, const int l7, const int l8,
@ -109,6 +157,10 @@ namespace ip_simd {
l8,l9,l10,l11,l12,l13,l14,l15);
}
inline SIMD256_int SIMD256_set(const int l) {
return _mm256_set1_epi32(l);
}
inline SIMD_int SIMD_set(const int l) {
return _mm512_set1_epi32(l);
}
@ -121,6 +173,10 @@ namespace ip_simd {
return _mm512_set1_pd(l);
}
inline SIMD256_int SIMD256_count() {
return SIMD256_set(0,1,2,3,4,5,6,7);
}
inline SIMD_int SIMD_zero_masked(const SIMD_mask &m, const SIMD_int &one) {
return _mm512_maskz_mov_epi32(m, one);
}
@ -147,6 +203,10 @@ namespace ip_simd {
// -------- Load Operations
inline SIMD256_int SIMD_load(const SIMD256_int *p) {
return _mm256_load_epi32((int *)p);
}
inline SIMD_int SIMD_load(const int *p) {
return _mm512_load_epi32(p);
}
@ -159,6 +219,10 @@ namespace ip_simd {
return _mm512_load_pd(p);
}
inline SIMD_double SIMD_load(const SIMD_double *p) {
return _mm512_load_pd((double *)p);
}
inline SIMD_int SIMD_loadz(const SIMD_mask &m, const int *p) {
return _mm512_maskz_load_epi32(m, p);
}
@ -171,6 +235,10 @@ namespace ip_simd {
return _mm512_maskz_load_pd(m, p);
}
inline SIMD256_int SIMD_gather(const int *p, const SIMD256_int &i) {
return _mm256_i32gather_epi32(p, i, _MM_SCALE_4);
}
inline SIMD_int SIMD_gather(const int *p, const SIMD_int &i) {
return _mm512_i32gather_epi32(i, p, _MM_SCALE_4);
}
@ -179,6 +247,10 @@ namespace ip_simd {
return _mm512_i32gather_ps(i, p, _MM_SCALE_4);
}
inline SIMD_double SIMD_gather(const double *p, const SIMD256_int &i) {
return _mm512_i32gather_pd(i, p, _MM_SCALE_8);
}
inline SIMD_double SIMD_gather(const double *p, const SIMD_int &i) {
return _mm512_i32gather_pd(_mm512_castsi512_si256(i), p, _MM_SCALE_8);
}
@ -201,6 +273,12 @@ namespace ip_simd {
_mm512_castsi512_si256(i), p, _MM_SCALE_8);
}
inline SIMD_double SIMD_gather(const SIMD_mask &m, const double *p,
const SIMD256_int &i) {
return _mm512_mask_i32gather_pd(_mm512_undefined_pd(), m,
i, p, _MM_SCALE_8);
}
template <typename T>
inline SIMD_int SIMD_gatherz_offset(const SIMD_mask &m, const int *p,
const SIMD_int &i) {
@ -252,6 +330,15 @@ namespace ip_simd {
return _mm512_store_pd(p,one);
}
inline void SIMD_store(SIMD_double *p, const SIMD_double &one) {
return _mm512_store_pd((double *)p,one);
}
inline void SIMD_scatter(const SIMD_mask &m, int *p,
const SIMD256_int &i, const SIMD256_int &vec) {
_mm256_mask_i32scatter_epi32(p, m, i, vec, _MM_SCALE_4);
}
inline void SIMD_scatter(const SIMD_mask &m, int *p,
const SIMD_int &i, const SIMD_int &vec) {
_mm512_mask_i32scatter_epi32(p, m, i, vec, _MM_SCALE_4);
@ -268,8 +355,22 @@ namespace ip_simd {
_MM_SCALE_8);
}
inline void SIMD_scatter(const SIMD_mask &m, double *p,
const SIMD256_int &i, const SIMD_double &vec) {
_mm512_mask_i32scatter_pd(p, m, i, vec, _MM_SCALE_8);
}
inline void SIMD_scatter(double *p,
const SIMD256_int &i, const SIMD_double &vec) {
_mm512_i32scatter_pd(p, i, vec, _MM_SCALE_8);
}
// ------- Arithmetic Operations
inline SIMD256_int operator+(const SIMD256_int &one, const SIMD256_int &two) {
return _mm256_add_epi32(one,two);
}
inline SIMD_int operator+(const SIMD_int &one, const SIMD_int &two) {
return _mm512_add_epi32(one,two);
}
@ -286,6 +387,10 @@ namespace ip_simd {
return _mm512_add_epi32(one,SIMD_set(two));
}
inline SIMD256_int operator+(const SIMD256_int &one, const int two) {
return _mm256_add_epi32(one,SIMD256_set(two));
}
inline SIMD_float operator+(const SIMD_float &one, const float two) {
return _mm512_add_ps(one,SIMD_set(two));
}
@ -299,6 +404,11 @@ namespace ip_simd {
return _mm512_mask_add_epi32(one,m,one,SIMD_set(two));
}
inline SIMD256_int SIMD_add(const SIMD_mask &m,
const SIMD256_int &one, const int two) {
return _mm256_mask_add_epi32(one,m,one,SIMD256_set(two));
}
inline SIMD_float SIMD_add(const SIMD_mask &m,
const SIMD_float &one, const float two) {
return _mm512_mask_add_ps(one,m,one,SIMD_set(two));
@ -309,6 +419,11 @@ namespace ip_simd {
return _mm512_mask_add_pd(one,m,one,SIMD_set(two));
}
inline SIMD_double SIMD_add(const SIMD_mask &m,
const SIMD_double &one, const SIMD_double &two) {
return _mm512_mask_add_pd(one,m,one,two);
}
inline SIMD_int SIMD_add(const SIMD_int &s, const SIMD_mask &m,
const SIMD_int &one, const SIMD_int &two) {
return _mm512_mask_add_epi32(s,m,one,two);
@ -387,6 +502,10 @@ namespace ip_simd {
return _mm512_mul_pd(one,two);
}
inline SIMD256_int operator*(const SIMD256_int &one, const int two) {
return _mm256_mullo_epi32(one,SIMD256_set(two));
}
inline SIMD_int operator*(const SIMD_int &one, const int two) {
return _mm512_mullo_epi32(one,SIMD_set(two));
}
@ -417,6 +536,12 @@ namespace ip_simd {
return _mm512_fmadd_pd(one,two,three);
}
inline SIMD_double SIMD_fma(const SIMD_mask m, const SIMD_double &one,
const SIMD_double &two,
const SIMD_double &three) {
return _mm512_mask3_fmadd_pd(one,two,three,m);
}
inline SIMD_float SIMD_fms(const SIMD_float &one, const SIMD_float &two,
const SIMD_float &three) {
return _mm512_fmsub_ps(one,two,three);
@ -493,6 +618,10 @@ namespace ip_simd {
return _mm512_pow_pd(one, two);
}
inline SIMD_double SIMD_pow(const SIMD_double &one, const double two) {
return _mm512_pow_pd(one, SIMD_set(two));
}
inline SIMD_float SIMD_exp(const SIMD_float &one) {
return _mm512_exp_ps(one);
}
@ -501,6 +630,18 @@ namespace ip_simd {
return _mm512_exp_pd(one);
}
inline SIMD_double SIMD_cos(const SIMD_double &one) {
return _mm512_cos_pd(one);
}
inline SIMD_double SIMD_sin(const SIMD_double &one) {
return _mm512_sin_pd(one);
}
inline SIMD_double SIMD_tan(const SIMD_double &one) {
return _mm512_tan_pd(one);
}
// ------- Comparison operations
inline SIMD_mask SIMD_lt(SIMD_mask m, const SIMD_int &one,
@ -533,6 +674,14 @@ namespace ip_simd {
return _mm512_mask_cmplt_pd_mask(m, SIMD_set(one), two);
}
inline SIMD_mask operator<(const SIMD256_int &one, const SIMD256_int &two) {
return _mm256_cmplt_epi32_mask(one,two);
}
inline SIMD_mask operator<(const int one, const SIMD256_int &two) {
return _mm256_cmplt_epi32_mask(SIMD256_set(one),two);
}
inline SIMD_mask operator<(const SIMD_int &one, const SIMD_int &two) {
return _mm512_cmplt_epi32_mask(one,two);
}
@ -577,6 +726,10 @@ namespace ip_simd {
return _mm512_cmple_ps_mask(SIMD_set(one), two);
}
inline SIMD_mask operator<=(const SIMD_double &one, const SIMD_double &two) {
return _mm512_cmple_pd_mask(one, two);
}
inline SIMD_mask operator<=(const double one, const SIMD_double &two) {
return _mm512_cmple_pd_mask(SIMD_set(one), two);
}
@ -593,6 +746,14 @@ namespace ip_simd {
return _mm512_cmplt_pd_mask(two,one);
}
inline SIMD_mask operator>(const SIMD_double &one, const double two) {
return _mm512_cmplt_pd_mask(SIMD_set(two),one);
}
inline SIMD_mask operator==(const SIMD256_int &one, const int two) {
return _mm256_cmpeq_epi32_mask(one,_mm256_set1_epi32(two));
}
inline SIMD_mask operator==(const SIMD_int &one, const SIMD_int &two) {
return _mm512_cmpeq_epi32_mask(one,two);
}

View File

@ -77,7 +77,7 @@ class PairBuckCoulCutIntel : public PairBuckCoulCut {
c_cut_t **c_cut;
ForceConst() : _ntypes(0), _ntable(0) {}
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);

View File

@ -79,7 +79,7 @@ class PairBuckCoulLongIntel : public PairBuckCoulLong {
flt_t *etable, *detable, *ctable, *dctable;
ForceConst() : _ntypes(0), _ntable(0) {}
~ForceConst() { set_ntypes(0, 0, nullptr, _cop); }
~ForceConst() noexcept(false) { set_ntypes(0, 0, nullptr, _cop); }
void set_ntypes(const int ntypes, const int ntable, Memory *memory, const int cop);

View File

@ -73,7 +73,7 @@ class PairBuckIntel : public PairBuck {
c_energy_t **c_energy;
ForceConst() : _ntypes(0) {}
~ForceConst() { set_ntypes(0, nullptr, _cop); }
~ForceConst() noexcept(false) { set_ntypes(0, nullptr, _cop); }
void set_ntypes(const int ntypes, Memory *memory, const int cop);

View File

@ -83,7 +83,7 @@ class PairDPDIntel : public PairDPD {
int *rngi;
ForceConst() : _ntypes(0) {}
~ForceConst() { set_ntypes(0, 0, 0, nullptr, _cop); }
~ForceConst() noexcept(false) { set_ntypes(0, 0, 0, nullptr, _cop); }
void set_ntypes(const int ntypes, const int nthreads, const int max_nbors, Memory *memory,
const int cop);

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