Merge branch 'develop' into group-bitmap-accessor
3
.github/CODEOWNERS
vendored
@ -59,7 +59,8 @@ src/VTK/* @rbberger
|
||||
|
||||
# individual files in packages
|
||||
src/GPU/pair_vashishta_gpu.* @andeplane
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane @stanmoore1
|
||||
src/KOSSOS/pair_pod_kokkos.* @exapde @stanmoore1
|
||||
src/MANYBODY/pair_vashishta_table.* @andeplane
|
||||
src/MANYBODY/pair_atm.* @sergeylishchuk
|
||||
src/MANYBODY/pair_nb3b_screened.* @flodesani
|
||||
|
||||
11
.gitignore
vendored
@ -43,12 +43,12 @@ Thumbs.db
|
||||
|
||||
#cmake
|
||||
/build*
|
||||
/CMakeCache.txt
|
||||
/CMakeFiles/
|
||||
/Testing
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
/Makefile
|
||||
/Testing
|
||||
/cmake_install.cmake
|
||||
Testing
|
||||
Temporary
|
||||
cmake_install.cmake
|
||||
/lmp
|
||||
out/Debug
|
||||
out/RelWithDebInfo
|
||||
@ -60,3 +60,4 @@ src/Makefile.package.settings-e
|
||||
/cmake/build/x64-Debug-Clang
|
||||
/install/x64-GUI-MSVC
|
||||
/install
|
||||
.Rhistory
|
||||
|
||||
@ -23,6 +23,7 @@ project(lammps CXX)
|
||||
set(SOVERSION 0)
|
||||
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
|
||||
# collect all executables and shared libs in the top level build folder
|
||||
@ -163,6 +164,22 @@ if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# warn about potentially problematic GCC compiler versions
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
|
||||
"with C++17 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 9.x or later")
|
||||
endif()
|
||||
endif()
|
||||
if (CMAKE_CXX_STANDARD GREATER_EQUAL 11)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
|
||||
"with C++11 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 5.x or later")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# export all symbols when building a .dll file on windows
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
@ -197,18 +214,17 @@ set(LAMMPS_BINARY lmp${LAMMPS_MACHINE})
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
||||
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
||||
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
||||
option(BUILD_LAMMPS_GUI "Build and install the LAMMPS GUI" OFF)
|
||||
|
||||
# Support using clang-tidy for C++ files with selected options
|
||||
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-qualified-auto,misc-unused-parameters,modernize-deprecated-ios-base-aliases,modernize-loop-convert,modernize-shrink-to-fit,modernize-use-auto,modernize-use-using,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
|
||||
else()
|
||||
unset(CMAKE_CXX_CLANG_TIDY CACHE)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
file(GLOB ALL_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
|
||||
file(GLOB MAIN_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
|
||||
@ -282,10 +298,10 @@ set(STANDARD_PACKAGES
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-PACE
|
||||
ML-POD
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-POD
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
@ -305,6 +321,7 @@ set(STANDARD_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
@ -409,6 +426,7 @@ pkg_depends(CG-DNA ASPHERE)
|
||||
pkg_depends(ELECTRODE KSPACE)
|
||||
pkg_depends(EXTRA-MOLECULE MOLECULE)
|
||||
pkg_depends(MESONT MOLECULE)
|
||||
pkg_depends(RHEO BPM)
|
||||
|
||||
# detect if we may enable OpenMP support by default
|
||||
set(BUILD_OMP_DEFAULT OFF)
|
||||
@ -549,7 +567,7 @@ else()
|
||||
endif()
|
||||
|
||||
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON)
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON RHEO)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
@ -939,6 +957,7 @@ message(STATUS "<<< Compilers and Flags: >>>
|
||||
-- C++ Compiler: ${CMAKE_CXX_COMPILER}
|
||||
Type: ${CMAKE_CXX_COMPILER_ID}
|
||||
Version: ${CMAKE_CXX_COMPILER_VERSION}
|
||||
C++ Standard: ${CMAKE_CXX_STANDARD}
|
||||
C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
|
||||
Defines: ${DEFINES}")
|
||||
get_target_property(OPTIONS lammps COMPILE_OPTIONS)
|
||||
@ -1045,9 +1064,6 @@ endif()
|
||||
if(BUILD_TOOLS)
|
||||
message(STATUS "<<< Building Tools >>>")
|
||||
endif()
|
||||
if(BUILD_LAMMPS_SHELL)
|
||||
message(STATUS "<<< Building LAMMPS Shell >>>")
|
||||
endif()
|
||||
if(BUILD_LAMMPS_GUI)
|
||||
message(STATUS "<<< Building LAMMPS GUI >>>")
|
||||
if(LAMMPS_GUI_USE_PLUGIN)
|
||||
|
||||
@ -27,7 +27,7 @@ if(DOWNLOAD_QUIP)
|
||||
else()
|
||||
message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP")
|
||||
endif()
|
||||
set(temp "${temp}CFLAGS += -fPIC \nCPLUSPLUSFLAGS += -fPIC\nAR_ADD=src\n")
|
||||
set(temp "${temp}CFLAGS += -fPIC -Wno-return-mismatch \nCPLUSPLUSFLAGS += -fPIC -Wno-return-mismatch\nAR_ADD=src\n")
|
||||
set(temp "${temp}MATH_LINKOPTS=")
|
||||
foreach(flag ${BLAS_LIBRARIES})
|
||||
set(temp "${temp} ${flag}")
|
||||
|
||||
2
cmake/Modules/Packages/RHEO.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
find_package(GSL 2.7 REQUIRED)
|
||||
target_link_libraries(lammps PRIVATE GSL::gsl)
|
||||
@ -102,9 +102,9 @@ endif()
|
||||
#######################################
|
||||
# select code sanitizer options
|
||||
#######################################
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, hwaddress, leak, thread, undefined)")
|
||||
mark_as_advanced(ENABLE_SANITIZER)
|
||||
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
|
||||
set(ENABLE_SANITIZER_VALUES none address hwaddress leak thread undefined)
|
||||
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
|
||||
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
|
||||
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
||||
|
||||
@ -37,37 +37,6 @@ if(BUILD_TOOLS)
|
||||
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(BUILD_LAMMPS_SHELL)
|
||||
if(NOT PkgConfig_FOUND)
|
||||
message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell")
|
||||
endif()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
||||
|
||||
# include resource compiler to embed icons into the executable on Windows
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
enable_language(RC)
|
||||
set(ICON_RC_FILE ${LAMMPS_TOOLS_DIR}/lammps-shell/lmpicons.rc)
|
||||
endif()
|
||||
|
||||
add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp ${ICON_RC_FILE})
|
||||
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
|
||||
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE)
|
||||
|
||||
# workaround for broken readline pkg-config file on FreeBSD
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
target_include_directories(lammps-shell PRIVATE /usr/local/include)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL")
|
||||
pkg_check_modules(TERMCAP IMPORTED_TARGET REQUIRED termcap)
|
||||
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::TERMCAP)
|
||||
endif()
|
||||
install(TARGETS lammps-shell EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/lammps-shell/icons DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/)
|
||||
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
||||
endif()
|
||||
|
||||
if(BUILD_LAMMPS_GUI)
|
||||
get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
|
||||
get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
|
||||
|
||||
@ -26,8 +26,8 @@ set(ALL_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
ELECTRODE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
@ -82,6 +82,7 @@ set(ALL_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
|
||||
@ -28,8 +28,8 @@ set(ALL_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
ELECTRODE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
@ -84,6 +84,7 @@ set(ALL_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
|
||||
@ -22,8 +22,8 @@ set(WIN_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
ELECTRODE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
@ -33,7 +33,6 @@ set(WIN_PACKAGES
|
||||
FEP
|
||||
GPU
|
||||
GRANULAR
|
||||
INTEL
|
||||
INTERLAYER
|
||||
KSPACE
|
||||
LEPTON
|
||||
|
||||
@ -52,8 +52,8 @@ set(WIN_PACKAGES
|
||||
ORIENT
|
||||
PERI
|
||||
PHONON
|
||||
POEMS
|
||||
PLUGIN
|
||||
POEMS
|
||||
PTM
|
||||
QEQ
|
||||
QTB
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.TH LAMMPS "1" "17 April 2024" "2024-04-17"
|
||||
.TH LAMMPS "1" "27 June 2024" "2024-06-27"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator. Version 17 April 2024
|
||||
\- Molecular Dynamics Simulator. Version 27 June 2024
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B lmp
|
||||
|
||||
@ -489,8 +489,7 @@ using CMake or Make.
|
||||
.. code-block:: bash
|
||||
|
||||
-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
|
||||
-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).
|
||||
@ -505,8 +504,9 @@ using CMake or Make.
|
||||
make chain # build only chain tool
|
||||
make micelle2d # build only micelle2d tool
|
||||
|
||||
cd lammps/tools/lammps-shell
|
||||
make # build LAMMPS shell
|
||||
.. note::
|
||||
|
||||
Building the LAMMPS-GUI *requires* building LAMMPS with CMake.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -88,8 +88,8 @@ on recording all commands required to do the compilation.
|
||||
|
||||
.. _sanitizer:
|
||||
|
||||
Address, Undefined Behavior, and Thread Sanitizer Support (CMake only)
|
||||
----------------------------------------------------------------------
|
||||
Address, Leak, Undefined Behavior, and Thread Sanitizer Support (CMake only)
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Compilers such as GCC and Clang support generating instrumented binaries
|
||||
which use different sanitizer libraries to detect problems in the code
|
||||
@ -110,6 +110,7 @@ compilation and linking stages. This is done through setting the
|
||||
|
||||
-D ENABLE_SANITIZER=none # no sanitizer active (default)
|
||||
-D ENABLE_SANITIZER=address # enable address sanitizer / memory leak checker
|
||||
-D ENABLE_SANITIZER=hwaddress # enable hardware assisted address sanitizer / memory leak checker
|
||||
-D ENABLE_SANITIZER=leak # enable memory leak checker (only)
|
||||
-D ENABLE_SANITIZER=undefined # enable undefined behavior sanitizer
|
||||
-D ENABLE_SANITIZER=thread # enable thread sanitizer
|
||||
|
||||
@ -59,6 +59,7 @@ This is the list of packages that may require additional steps.
|
||||
* :ref:`POEMS <poems>`
|
||||
* :ref:`PYTHON <python>`
|
||||
* :ref:`QMMM <qmmm>`
|
||||
* :ref:`RHEO <rheo>`
|
||||
* :ref:`SCAFACOS <scafacos>`
|
||||
* :ref:`VORONOI <voronoi>`
|
||||
* :ref:`VTK <vtk>`
|
||||
@ -1566,10 +1567,11 @@ LAMMPS build.
|
||||
.. tab:: CMake build
|
||||
|
||||
When the ``-D PKG_PLUMED=yes`` flag is included in the cmake
|
||||
command you must ensure that GSL is installed in locations that
|
||||
are specified in your environment. There are then two additional
|
||||
variables that control the manner in which PLUMED is obtained and
|
||||
linked into LAMMPS.
|
||||
command you must ensure that `the GNU Scientific Library (GSL)
|
||||
<https://www.gnu.org/software/gsl/>` is installed in locations
|
||||
that are accessible in your environment. There are then two
|
||||
additional variables that control the manner in which PLUMED is
|
||||
obtained and linked into LAMMPS.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -2040,6 +2042,36 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
|
||||
|
||||
----------
|
||||
|
||||
.. _rheo:
|
||||
|
||||
RHEO package
|
||||
------------
|
||||
|
||||
To build with this package you must have the `GNU Scientific Library
|
||||
(GSL) <https://www.gnu.org/software/gsl/>` installed in locations that
|
||||
are accessible in your environment. The GSL library should be at least
|
||||
version 2.7.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
If CMake cannot find the GSL library or include files, you can set:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D GSL_ROOT_DIR=path # path to root of GSL installation
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
LAMMPS will try to auto-detect the GSL compiler and linker flags
|
||||
from the corresponding ``pkg-config`` file (``gsl.pc``), otherwise
|
||||
you can edit the file ``lib/rheo/Makefile.lammps``
|
||||
to specify the paths and library names where indicated by comments.
|
||||
This must be done **before** the package is installed.
|
||||
|
||||
----------
|
||||
|
||||
.. _scafacos:
|
||||
|
||||
SCAFACOS package
|
||||
|
||||
@ -45,8 +45,8 @@ executable code from the library is copied into the calling executable.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mpicc -c -O $(pkgconf liblammps --cflags) caller.c
|
||||
mpicxx -o caller caller.o -$(pkgconf liblammps --libs)
|
||||
mpicc -c -O $(pkg-config --cflags liblammps) caller.c
|
||||
mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -155,8 +155,8 @@ POEMS package installed becomes:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mpicc -c -O $(pkgconf liblammps --cflags) caller.c
|
||||
mpicxx -o caller caller.o -$(pkgconf --libs)
|
||||
mpicc -c -O $(pkg-config --cflags liblammps) caller.c
|
||||
mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
|
||||
@ -62,6 +62,7 @@ packages:
|
||||
* :ref:`POEMS <poems>`
|
||||
* :ref:`PYTHON <python>`
|
||||
* :ref:`QMMM <qmmm>`
|
||||
* :ref:`RHEO <rheo>`
|
||||
* :ref:`SCAFACOS <scafacos>`
|
||||
* :ref:`VORONOI <voronoi>`
|
||||
* :ref:`VTK <vtk>`
|
||||
|
||||
@ -54,6 +54,7 @@ OPT.
|
||||
* :doc:`oxdna2/fene <bond_oxdna>`
|
||||
* :doc:`oxrna2/fene <bond_oxdna>`
|
||||
* :doc:`quartic (o) <bond_quartic>`
|
||||
* :doc:`rheo/shell <bond_rheo_shell>`
|
||||
* :doc:`special <bond_special>`
|
||||
* :doc:`table (o) <bond_table>`
|
||||
|
||||
|
||||
@ -108,6 +108,10 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`pe/mol/tally <compute_tally>`
|
||||
* :doc:`pe/tally <compute_tally>`
|
||||
* :doc:`plasticity/atom <compute_plasticity_atom>`
|
||||
* :doc:`pod/atom <compute_pod_atom>`
|
||||
* :doc:`podd/atom <compute_pod_atom>`
|
||||
* :doc:`pod/local <compute_pod_atom>`
|
||||
* :doc:`pod/global <compute_pod_atom>`
|
||||
* :doc:`pressure <compute_pressure>`
|
||||
* :doc:`pressure/alchemy <compute_pressure_alchemy>`
|
||||
* :doc:`pressure/uef <compute_pressure_uef>`
|
||||
@ -122,6 +126,7 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`reduce <compute_reduce>`
|
||||
* :doc:`reduce/chunk <compute_reduce_chunk>`
|
||||
* :doc:`reduce/region <compute_reduce>`
|
||||
* :doc:`rheo/property/atom <compute_rheo_property_atom>`
|
||||
* :doc:`rigid/local <compute_rigid_local>`
|
||||
* :doc:`saed <compute_saed>`
|
||||
* :doc:`slcsa/atom <compute_slcsa_atom>`
|
||||
|
||||
@ -28,6 +28,7 @@ OPT.
|
||||
* :doc:`adapt <fix_adapt>`
|
||||
* :doc:`adapt/fep <fix_adapt_fep>`
|
||||
* :doc:`addforce <fix_addforce>`
|
||||
* :doc:`add/heat <fix_add_heat>`
|
||||
* :doc:`addtorque <fix_addtorque>`
|
||||
* :doc:`alchemy <fix_alchemy>`
|
||||
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
|
||||
@ -204,6 +205,11 @@ OPT.
|
||||
* :doc:`reaxff/species (k) <fix_reaxff_species>`
|
||||
* :doc:`recenter <fix_recenter>`
|
||||
* :doc:`restrain <fix_restrain>`
|
||||
* :doc:`rheo <fix_rheo>`
|
||||
* :doc:`rheo/oxidation <fix_rheo_oxidation>`
|
||||
* :doc:`rheo/pressure <fix_rheo_pressure>`
|
||||
* :doc:`rheo/thermal <fix_rheo_thermal>`
|
||||
* :doc:`rheo/viscosity <fix_rheo_viscosity>`
|
||||
* :doc:`rhok <fix_rhok>`
|
||||
* :doc:`rigid (o) <fix_rigid>`
|
||||
* :doc:`rigid/meso <fix_rigid_meso>`
|
||||
|
||||
@ -35,6 +35,10 @@ OPT.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* :doc:`adp (ko) <pair_adp>`
|
||||
* :doc:`agni (o) <pair_agni>`
|
||||
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
||||
@ -247,7 +251,7 @@ OPT.
|
||||
* :doc:`pace (k) <pair_pace>`
|
||||
* :doc:`pace/extrapolation (k) <pair_pace>`
|
||||
* :doc:`pedone (o) <pair_pedone>`
|
||||
* :doc:`pod <pair_pod>`
|
||||
* :doc:`pod (k) <pair_pod>`
|
||||
* :doc:`peri/eps <pair_peri>`
|
||||
* :doc:`peri/lps (o) <pair_peri>`
|
||||
* :doc:`peri/pmb (o) <pair_peri>`
|
||||
@ -260,6 +264,8 @@ OPT.
|
||||
* :doc:`rebo (io) <pair_airebo>`
|
||||
* :doc:`rebomos (o) <pair_rebomos>`
|
||||
* :doc:`resquared (go) <pair_resquared>`
|
||||
* :doc:`rheo <pair_rheo>`
|
||||
* :doc:`rheo/solid <pair_rheo_solid>`
|
||||
* :doc:`saip/metal (t) <pair_saip_metal>`
|
||||
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>`
|
||||
* :doc:`smatb <pair_smatb>`
|
||||
|
||||
@ -8,6 +8,18 @@ stop LAMMPS and print a suitable error message in most cases, when a
|
||||
style/command is used that has been removed or will replace the command
|
||||
with the direct alternative (if available) and print a warning.
|
||||
|
||||
restart2data tool
|
||||
-----------------
|
||||
|
||||
.. versionchanged:: 23Nov2013
|
||||
|
||||
The functionality of the restart2data tool has been folded into the
|
||||
LAMMPS executable directly instead of having a separate tool. A
|
||||
combination of the commands :doc:`read_restart <read_restart>` and
|
||||
:doc:`write_data <write_data>` can be used to the same effect. For
|
||||
added convenience this conversion can also be triggered by
|
||||
:doc:`command line flags <Run_options>`
|
||||
|
||||
Fix ave/spatial and fix ave/spatial/sphere
|
||||
------------------------------------------
|
||||
|
||||
@ -151,17 +163,16 @@ and allow running LAMMPS with GPU acceleration.
|
||||
i-PI tool
|
||||
---------
|
||||
|
||||
.. versionchanged:: TBD
|
||||
.. versionchanged:: 27Jun2024
|
||||
|
||||
The i-PI tool has been removed from the LAMMPS distribution. Instead,
|
||||
instructions to install i-PI from PyPi via pip are provided.
|
||||
instructions to install i-PI from PyPI via pip are provided.
|
||||
|
||||
restart2data tool
|
||||
-----------------
|
||||
LAMMPS shell
|
||||
------------
|
||||
|
||||
.. versionchanged:: TBD
|
||||
|
||||
The LAMMPS shell has been removed from the LAMMPS distribution. Users
|
||||
are encouraged to use the :ref:`LAMMPS-GUI <lammps_gui>` tool instead.
|
||||
|
||||
The functionality of the restart2data tool has been folded into the
|
||||
LAMMPS executable directly instead of having a separate tool. A
|
||||
combination of the commands :doc:`read_restart <read_restart>` and
|
||||
:doc:`write_data <write_data>` can be used to the same effect. For
|
||||
added convenience this conversion can also be triggered by
|
||||
:doc:`command line flags <Run_options>`
|
||||
|
||||
@ -211,6 +211,9 @@ Argument processing
|
||||
.. doxygenfunction:: bounds
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: bounds_typelabel
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: expand_args
|
||||
:project: progguide
|
||||
|
||||
|
||||
@ -50,6 +50,30 @@ We are looking at the following cases:
|
||||
- `Case 3: a potential requiring communication`_
|
||||
- `Case 4: potentials without a compute() function`_
|
||||
|
||||
Package and build system considerations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
In general, new pair styles should be added to the :ref:`EXTRA-PAIR
|
||||
package <PKG-EXTRA-PAIR>` unless they are an accelerated pair style and
|
||||
then they should be added to the corresponding accelerator package
|
||||
(:ref:`GPU <PKG-GPU>`, :ref:`INTEL <PKG-INTEL>`, :ref:`KOKKOS
|
||||
<PKG-KOKKOS>`, :ref:`OPENMP <PKG-OPENMP>`, :ref:`OPT <PKG-OPT>`). If
|
||||
you feel that your contribution should be added to a different package,
|
||||
please consult with the LAMMPS developers first.
|
||||
|
||||
The contributed code needs to support the :doc:`traditional GNU make
|
||||
build process <Build_make>` **and** the :doc:`CMake build process
|
||||
<Build_cmake>`. For the GNU make process and if the package has an
|
||||
``Install.sh`` file, most likely that file needs to be updated to
|
||||
correctly copy the sources when installing the package and properly
|
||||
delete them when uninstalling. This is particularly important when
|
||||
added a new pair style that is a derived class from an existing pair
|
||||
style in a package, so that its installation depends on the the
|
||||
installation status of the package of the derived class. For the CMake
|
||||
process, it is sometimes necessary to make changes to the package
|
||||
specific CMake scripting in ``cmake/Modules/Packages``.
|
||||
|
||||
|
||||
----
|
||||
|
||||
Case 1: a pairwise additive model
|
||||
|
||||
@ -134,6 +134,8 @@ Lowercase directories
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| rerun | use of rerun and read_dump commands |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| rheo | RHEO simulations of fluid flows and phase transitions |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| rigid | rigid bodies modeled as independent or coupled |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| shear | sideways shear applied to 2d solid, with and without a void |
|
||||
|
||||
@ -2327,7 +2327,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
retrieved via :f:func:`get_last_error_message`. This allows to
|
||||
restart a calculation or delete and recreate the LAMMPS instance when
|
||||
a C++ exception occurs. One application of using exceptions this way
|
||||
is the :ref:`lammps_shell`.
|
||||
is the :ref:`lammps_gui`.
|
||||
|
||||
:to: :cpp:func:`lammps_config_has_exceptions`
|
||||
:r has_exceptions:
|
||||
|
||||
@ -89,6 +89,7 @@ Packages howto
|
||||
Howto_drude2
|
||||
Howto_peri
|
||||
Howto_manifold
|
||||
Howto_rheo
|
||||
Howto_spins
|
||||
|
||||
Tutorials howto
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
CHARMM, AMBER, COMPASS, and DREIDING force fields
|
||||
=================================================
|
||||
|
||||
A compact summary of the concepts, definitions, and properties of
|
||||
force fields with explicit bonded interactions (like the ones discussed
|
||||
in this HowTo) is given in :ref:`(Gissinger) <Typelabel2>`.
|
||||
|
||||
A force field has 2 parts: the formulas that define it and the
|
||||
coefficients used for a particular system. Here we only discuss
|
||||
formulas implemented in LAMMPS that correspond to formulas commonly used
|
||||
@ -11,12 +15,42 @@ commands like :doc:`pair_coeff <pair_coeff>` or :doc:`bond_coeff
|
||||
<bond_coeff>` and so on. See the :doc:`Tools <Tools>` doc page for
|
||||
additional tools that can use CHARMM, AMBER, or Materials Studio
|
||||
generated files to assign force field coefficients and convert their
|
||||
output into LAMMPS input.
|
||||
output into LAMMPS input. LAMMPS input scripts can also be generated by
|
||||
`charmm-gui.org <https://charmm-gui.org/>`_.
|
||||
|
||||
See :ref:`(MacKerell) <howto-MacKerell>` for a description of the CHARMM
|
||||
force field. See :ref:`(Cornell) <howto-Cornell>` for a description of
|
||||
the AMBER force field. See :ref:`(Sun) <howto-Sun>` for a description
|
||||
of the COMPASS force field.
|
||||
CHARMM and AMBER
|
||||
----------------
|
||||
|
||||
The `CHARMM force field
|
||||
<https://mackerell.umaryland.edu/charmm_ff.shtml>`_ :ref:`(MacKerell)
|
||||
<howto-MacKerell>` and `AMBER force field
|
||||
<https://ambermd.org/AmberModels.php>`_ :ref:`(Cornell) <howto-Cornell>`
|
||||
have potential energy function of the form
|
||||
|
||||
.. math::
|
||||
|
||||
V & = \sum_{bonds} E_b + \sum_{angles} \!E_a + \!\overbrace{\sum_{dihedral} \!\!E_d}^{\substack{
|
||||
\text{charmm} \\
|
||||
\text{charmmfsw}
|
||||
}} +\!\!\! \sum_{impropers} \!\!\!E_i \\[.6em]
|
||||
& \quad + \!\!\!\!\!\!\!\!\!\!\underbrace{~\sum_{pairs} \left(E_{LJ}+E_{coul}\right)}_{\substack{
|
||||
\text{lj/charmm/coul/charmm} \\
|
||||
\text{lj/charmm/coul/charmm/implicit} \\
|
||||
\text{lj/charmm/coul/long} \\
|
||||
\text{lj/charmm/coul/msm} \\
|
||||
\text{lj/charmmfsw/coul/charmmfsh} \\
|
||||
\text{lj/charmmfsw/coul/long}
|
||||
}} \!\!\!\!\!\!\!\!+ \!\!\sum_{special}\! E_s + \!\!\!\!\sum_{residues} \!\!\!{\scriptstyle\mathrm{CMAP}(\phi,\psi)}
|
||||
|
||||
|
||||
The terms are computed by bond styles (relationship between 2 atoms),
|
||||
angle styles (between 3 atoms) , dihedral/improper styles (between 4
|
||||
atoms), pair styles (non-covalently bonded pair interactions) and
|
||||
special bonds. The CMAP term (see :doc:`fix cmap <fix_cmap>` command for
|
||||
details) corrects for pairs of dihedral angles ("Correction MAP") to
|
||||
significantly improve the structural and dynamic properties of proteins
|
||||
in crystalline and solution environments :ref:`(Brooks)
|
||||
<howto-Brooks>`. The AMBER force field does not include the CMAP term.
|
||||
|
||||
The interaction styles listed below compute force field formulas that
|
||||
are consistent with common options in CHARMM or AMBER. See each
|
||||
@ -31,10 +65,81 @@ command's documentation for the formula it computes.
|
||||
* :doc:`pair_style <pair_charmm>` lj/charmm/coul/charmm
|
||||
* :doc:`pair_style <pair_charmm>` lj/charmm/coul/charmm/implicit
|
||||
* :doc:`pair_style <pair_charmm>` lj/charmm/coul/long
|
||||
|
||||
* :doc:`special_bonds <special_bonds>` charmm
|
||||
* :doc:`special_bonds <special_bonds>` amber
|
||||
|
||||
The pair styles compute Lennard Jones (LJ) and Coulombic interactions
|
||||
with additional switching or shifting functions that ramp the energy
|
||||
and/or force smoothly to zero between an inner :math:`(a)` and outer
|
||||
:math:`(b)` cutoff. The older styles with *charmm* (not *charmmfsw* or
|
||||
*charmmfsh*\ ) in their name compute the LJ and Coulombic interactions
|
||||
with an energy switching function (esw) S(r) which ramps the energy
|
||||
smoothly to zero between the inner and outer cutoff. This can cause
|
||||
irregularities in pairwise forces (due to the discontinuous second
|
||||
derivative of energy at the boundaries of the switching region), which
|
||||
in some cases can result in complications in energy minimization and
|
||||
detectable artifacts in MD simulations.
|
||||
|
||||
.. grid:: 1 1 2 2
|
||||
|
||||
.. grid-item::
|
||||
|
||||
.. math::
|
||||
|
||||
LJ(r) &= 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
||||
\left(\frac{\sigma}{r}\right)^6 \right]\\[.6em]
|
||||
C(r) &= \frac{C q_i q_j}{ \epsilon r}\\[.6em]
|
||||
S(r) &= \frac{ \left(b^2 - r^2\right)^2 \left(b^2 + 2r^2 - 3{a^2}\right)}
|
||||
{ \left(b^2 - a^2\right)^3 }\\[.6em]
|
||||
E_{LJ}(r) &= \begin{cases}
|
||||
LJ(r), & r \leq a \\
|
||||
LJ(r) S(r), & a < r \leq b \\
|
||||
0, &r > b
|
||||
\end{cases} \\[.6em]
|
||||
E_{coul}(r) &= \begin{cases}
|
||||
C(r), & r \leq a \\
|
||||
C(r) S(r), & a < r \leq b \\
|
||||
0, & r > b
|
||||
\end{cases}
|
||||
|
||||
.. grid-item::
|
||||
|
||||
.. image:: img/howto_charmm_ELJ.png
|
||||
:align: center
|
||||
|
||||
The newer styles with *charmmfsw* or *charmmfsh* in their name replace
|
||||
energy switching with force switching (fsw) for LJ interactions and
|
||||
force shifting (fsh) functions for Coulombic interactions
|
||||
:ref:`(Steinbach) <howto-Steinbach>`
|
||||
|
||||
.. grid:: 1 1 2 2
|
||||
|
||||
.. grid-item::
|
||||
|
||||
.. math::
|
||||
|
||||
E_{LJ}(r) = & \begin{cases}
|
||||
4 \epsilon \sigma^6 \left(\frac{\displaystyle\sigma
|
||||
^6-r^6}{\displaystyle r^{12}}-\frac{\displaystyle\sigma ^6}{\displaystyle a^6
|
||||
b^6}+\frac{\displaystyle 1}{\displaystyle a^3 b^3}\right) & r\leq a \\
|
||||
\frac{\displaystyle 4 \epsilon \sigma^6 \left(\sigma ^6
|
||||
\left(b^6-r^6\right)^2-b^3 r^6 \left(a^3+b^3\right)
|
||||
\left(b^3-r^3\right)^2\right)}{\displaystyle b^6 r^{12}
|
||||
\left(b^6-a^6\right)} & a<r \leq b\\
|
||||
0, & r>b
|
||||
\end{cases}\\[.6em]
|
||||
E_{coul}(r) & = \begin{cases}
|
||||
C(r) \frac{\displaystyle (b-r)^2}{\displaystyle r b^2}, & r \leq b \\
|
||||
0, & r > b
|
||||
\end{cases}
|
||||
|
||||
.. grid-item::
|
||||
.. image:: img/howto_charmmfsw_ELJ.png
|
||||
:align: center
|
||||
|
||||
These styles are used by LAMMPS input scripts generated by
|
||||
https://charmm-gui.org/ :ref:`(Brooks) <howto-Brooks>`.
|
||||
|
||||
.. note::
|
||||
|
||||
For CHARMM, newer *charmmfsw* or *charmmfsh* styles were released in
|
||||
@ -43,17 +148,33 @@ command's documentation for the formula it computes.
|
||||
<pair_charmm>` and :doc:`dihedral charmm <dihedral_charmm>` doc
|
||||
pages.
|
||||
|
||||
.. note::
|
||||
|
||||
The TIP3P water model is strongly recommended for use with the CHARMM
|
||||
force field. In fact, `"using the SPC model with CHARMM parameters is
|
||||
a bad idea"
|
||||
<https://matsci.org/t/using-spc-water-with-charmm-ff/24715>`_ and `"to
|
||||
enable TIP4P style water in CHARMM, you would have to write a new pair
|
||||
style"
|
||||
<https://matsci.org/t/hybrid-pair-styles-for-charmm-and-tip4p-ew/32609>`_
|
||||
. LAMMPS input scripts generated by Solution Builder on https://charmm-gui.org
|
||||
use TIP3P molecules for solvation. Any other water model can and
|
||||
probably will lead to false conclusions.
|
||||
|
||||
COMPASS
|
||||
-------
|
||||
|
||||
COMPASS is a general force field for atomistic simulation of common
|
||||
organic molecules, inorganic small molecules, and polymers which was
|
||||
developed using ab initio and empirical parameterization techniques.
|
||||
See the :doc:`Tools <Tools>` page for the msi2lmp tool for creating
|
||||
LAMMPS template input and data files from BIOVIA's Materials Studio
|
||||
files. Please note that the msi2lmp tool is very old and largely
|
||||
unmaintained, so it does not support all features of Materials Studio
|
||||
provided force field files, especially additions during the last decade.
|
||||
You should watch the output carefully and compare results, where
|
||||
possible. See :ref:`(Sun) <howto-Sun>` for a description of the COMPASS force
|
||||
field.
|
||||
developed using ab initio and empirical parameterization techniques
|
||||
:ref:`(Sun) <howto-Sun>`. See the :doc:`Tools <Tools>` page for the
|
||||
msi2lmp tool for creating LAMMPS template input and data files from
|
||||
BIOVIA's Materials Studio files. Please note that the msi2lmp tool is
|
||||
very old and largely unmaintained, so it does not support all features
|
||||
of Materials Studio provided force field files, especially additions
|
||||
during the last decade. You should watch the output carefully and
|
||||
compare results, where possible. See :ref:`(Sun) <howto-Sun>` for a
|
||||
description of the COMPASS force field.
|
||||
|
||||
These interaction styles listed below compute force field formulas that
|
||||
are consistent with the COMPASS force field. See each command's
|
||||
@ -70,14 +191,21 @@ documentation for the formula it computes.
|
||||
|
||||
* :doc:`special_bonds <special_bonds>` lj/coul 0 0 1
|
||||
|
||||
DREIDING is a generic force field developed by the `Goddard group <http://www.wag.caltech.edu>`_ at Caltech and is useful for
|
||||
predicting structures and dynamics of organic, biological and main-group
|
||||
inorganic molecules. The philosophy in DREIDING is to use general force
|
||||
constants and geometry parameters based on simple hybridization
|
||||
considerations, rather than individual force constants and geometric
|
||||
parameters that depend on the particular combinations of atoms involved
|
||||
in the bond, angle, or torsion terms. DREIDING has an :doc:`explicit hydrogen bond term <pair_hbond_dreiding>` to describe interactions involving a
|
||||
hydrogen atom on very electronegative atoms (N, O, F).
|
||||
DREIDING
|
||||
--------
|
||||
|
||||
DREIDING is a generic force field developed by the `Goddard group
|
||||
<http://www.wag.caltech.edu>`_ at Caltech and is useful for predicting
|
||||
structures and dynamics of organic, biological and main-group inorganic
|
||||
molecules. The philosophy in DREIDING is to use general force constants
|
||||
and geometry parameters based on simple hybridization considerations,
|
||||
rather than individual force constants and geometric parameters that
|
||||
depend on the particular combinations of atoms involved in the bond,
|
||||
angle, or torsion terms. DREIDING has an :doc:`explicit hydrogen bond
|
||||
term <pair_hbond_dreiding>` to describe interactions involving a
|
||||
hydrogen atom on very electronegative atoms (N, O, F). Unlike CHARMM
|
||||
or AMBER, the DREIDING force field has not been parameterized for
|
||||
considering solvents (like water).
|
||||
|
||||
See :ref:`(Mayo) <howto-Mayo>` for a description of the DREIDING force field
|
||||
|
||||
@ -110,21 +238,31 @@ documentation for the formula it computes.
|
||||
|
||||
----------
|
||||
|
||||
.. _Typelabel2:
|
||||
|
||||
**(Gissinger)** J. R. Gissinger, I. Nikiforov, Y. Afshar, B. Waters, M. Choi, D. S. Karls, A. Stukowski, W. Im, H. Heinz, A. Kohlmeyer, and E. B. Tadmor, J Phys Chem B, 128, 3282-3297 (2024).
|
||||
|
||||
.. _howto-MacKerell:
|
||||
|
||||
**(MacKerell)** MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field,
|
||||
Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
|
||||
**(MacKerell)** MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, Fischer, Gao, Guo, Ha, et al (1998). J Phys Chem, 102, 3586 . https://doi.org/10.1021/jp973084f
|
||||
|
||||
.. _howto-Cornell:
|
||||
|
||||
**(Cornell)** Cornell, Cieplak, Bayly, Gould, Merz, Ferguson,
|
||||
Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995).
|
||||
**(Cornell)** Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman (1995). JACS 117, 5179-5197. https://doi.org/10.1021/ja00124a002
|
||||
|
||||
.. _howto-Steinbach:
|
||||
|
||||
**(Steinbach)** Steinbach, Brooks (1994). J Comput Chem, 15, 667. https://doi.org/10.1002/jcc.540150702
|
||||
|
||||
.. _howto-Brooks:
|
||||
|
||||
**(Brooks)** Brooks, et al (2009). J Comput Chem, 30, 1545. https://onlinelibrary.wiley.com/doi/10.1002/jcc.21287
|
||||
|
||||
.. _howto-Sun:
|
||||
|
||||
**(Sun)** Sun, J. Phys. Chem. B, 102, 7338-7364 (1998).
|
||||
**(Sun)** Sun (1998). J. Phys. Chem. B, 102, 7338-7364. https://doi.org/10.1021/jp980939v
|
||||
|
||||
.. _howto-Mayo:
|
||||
|
||||
**(Mayo)** Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
|
||||
(1990).
|
||||
**(Mayo)** Mayo, Olfason, Goddard III (1990). J Phys Chem, 94, 8897-8909. https://doi.org/10.1021/j100389a010
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Use chunks to calculate system properties
|
||||
=========================================
|
||||
|
||||
In LAMMS, "chunks" are collections of atoms, as defined by the
|
||||
In LAMMPS, "chunks" are collections of atoms, as defined by the
|
||||
:doc:`compute chunk/atom <compute_chunk_atom>` command, which assigns
|
||||
each atom to a chunk ID (or to no chunk at all). The number of chunks
|
||||
and the assignment of chunk IDs to atoms can be static or change over
|
||||
@ -148,14 +148,14 @@ Example calculations with chunks
|
||||
Here are examples using chunk commands to calculate various
|
||||
properties:
|
||||
|
||||
(1) Average velocity in each of 1000 2d spatial bins:
|
||||
1. Average velocity in each of 1000 2d spatial bins:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute cc1 all chunk/atom bin/2d x 0.0 0.1 y lower 0.01 units reduced
|
||||
fix 1 all ave/chunk 100 10 1000 cc1 vx vy file tmp.out
|
||||
|
||||
(2) Temperature in each spatial bin, after subtracting a flow
|
||||
2. Temperature in each spatial bin, after subtracting a flow
|
||||
velocity:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
@ -164,7 +164,7 @@ velocity:
|
||||
compute vbias all temp/profile 1 0 0 y 10
|
||||
fix 1 all ave/chunk 100 10 1000 cc1 temp bias vbias file tmp.out
|
||||
|
||||
(3) Center of mass of each molecule:
|
||||
3. Center of mass of each molecule:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -172,7 +172,7 @@ velocity:
|
||||
compute myChunk all com/chunk cc1
|
||||
fix 1 all ave/time 100 1 100 c_myChunk[*] file tmp.out mode vector
|
||||
|
||||
(4) Total force on each molecule and ave/max across all molecules:
|
||||
4. Total force on each molecule and ave/max across all molecules:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -183,7 +183,7 @@ velocity:
|
||||
thermo 1000
|
||||
thermo_style custom step temp v_xave v_xmax
|
||||
|
||||
(5) Histogram of cluster sizes:
|
||||
5. Histogram of cluster sizes:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -192,16 +192,16 @@ velocity:
|
||||
compute size all property/chunk cc1 count
|
||||
fix 1 all ave/histo 100 1 100 0 20 20 c_size mode vector ave running beyond ignore file tmp.histo
|
||||
|
||||
(6) An example for using a per-chunk value to apply per-atom forces to
|
||||
6. An example for using a per-chunk value to apply per-atom forces to
|
||||
compress individual polymer chains (molecules) in a mixture, is
|
||||
explained on the :doc:`compute chunk/spread/atom <compute_chunk_spread_atom>` command doc page.
|
||||
|
||||
(7) An example for using one set of per-chunk values for molecule
|
||||
7. An example for using one set of per-chunk values for molecule
|
||||
chunks, to create a second set of micelle-scale chunks (clustered
|
||||
molecules, due to hydrophobicity), is explained on the
|
||||
:doc:`compute reduce/chunk <compute_reduce_chunk>` command doc page.
|
||||
|
||||
(8) An example for using one set of per-chunk values (dipole moment
|
||||
8. An example for using one set of per-chunk values (dipole moment
|
||||
vectors) for molecule chunks, spreading the values to each atom in
|
||||
each chunk, then defining a second set of chunks as spatial bins, and
|
||||
using the :doc:`fix ave/chunk <fix_ave_chunk>` command to calculate an
|
||||
|
||||
@ -339,8 +339,6 @@ Some common LAMMPS specific variables
|
||||
- build LAMMPS with OpenMP support (default: ``on`` if compiler supports OpenMP fully, else ``off``)
|
||||
* - ``BUILD_TOOLS``
|
||||
- compile some additional executables from the ``tools`` folder (default: ``off``)
|
||||
* - ``BUILD_LAMMPS_SHELL``
|
||||
- compile the LAMMPS shell from the ``tools/lammps-shell`` folder (default: ``off``)
|
||||
* - ``BUILD_DOC``
|
||||
- include building the HTML format documentation for packaging/installing (default: ``off``)
|
||||
* - ``CMAKE_TUNE_FLAGS``
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
Using the LAMMPS GUI
|
||||
Using the LAMMPS-GUI
|
||||
====================
|
||||
|
||||
This document describes **LAMMPS GUI version 1.5**.
|
||||
This document describes **LAMMPS-GUI version 1.6**.
|
||||
|
||||
-----
|
||||
|
||||
LAMMPS GUI is a graphical text editor customized for editing LAMMPS
|
||||
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
|
||||
@ -16,58 +16,60 @@ to the online LAMMPS documentation for known LAMMPS commands and styles.
|
||||
|
||||
.. note::
|
||||
|
||||
Pre-compiled, ready-to-use LAMMPS GUI executables for Linux (Ubuntu
|
||||
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_install>` for download. None-MPI LAMMPS executables of
|
||||
the same LAMMPS version are included in these packages as well. The
|
||||
source code for the LAMMPS-GUI is included in the LAMMPS source code
|
||||
distribution 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:
|
||||
LAMMPS-GUI tries to provide an experience similar to what people
|
||||
traditionally would do to run LAMMPS using a command line window
|
||||
but just rolled into a single executable:
|
||||
|
||||
- editing LAMMPS input files with a text editor
|
||||
- run LAMMPS on those input file with selected command line flags
|
||||
- use or extract data from the created files and visualize it with
|
||||
either a molecular visualization program or a plotting program
|
||||
|
||||
- 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.
|
||||
that they are most comfortable with. It is often *required* to adopt
|
||||
this workflow when running LAMMPS simulations on high-performance
|
||||
computing facilities.
|
||||
|
||||
The main benefit of using the LAMMPS GUI application instead is that
|
||||
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
|
||||
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.
|
||||
visualization and analysis tools, and run LAMMPS from the command line
|
||||
or a batch script.
|
||||
|
||||
The following text provides a detailed tour of the features and
|
||||
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.
|
||||
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
|
||||
-----------
|
||||
Starting LAMMPS-GUI
|
||||
-------------------
|
||||
|
||||
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:
|
||||
When LAMMPS-GUI starts, it shows the main window, labeled *Editor*, with
|
||||
either an empty buffer or the contents of the file used as argument. In
|
||||
the latter case it may look like the following:
|
||||
|
||||
.. image:: JPG/lammps-gui-main.png
|
||||
:align: center
|
||||
@ -80,32 +82,34 @@ 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.
|
||||
the buffer edits have not yet saved to a file. The geometry of the main
|
||||
window is stored when exiting and restored when starting again.
|
||||
|
||||
Opening Files
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
The LAMMPS GUI application will try to open the first command line
|
||||
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.
|
||||
The LAMMPS-GUI application tries to open the first command line argument
|
||||
as a LAMMPS input script, further arguments are ignored. When no
|
||||
argument is given, LAMMPS-GUI starts 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
|
||||
edited at a time, so opening a new file with a filled buffer closes that
|
||||
buffer. If the buffer has unsaved modifications, you are asked to
|
||||
either cancel the operation, discard the changes, or save them. A
|
||||
buffer with modifications can be saved any time from the "File" menu, by
|
||||
the keyboard shortcut `Ctrl-S` (`Command-S` on macOS), or by clicking on
|
||||
the "Save" button at the very left in the status bar.
|
||||
|
||||
Running LAMMPS
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
From within the LAMMPS GUI main window LAMMPS can be started either from
|
||||
From within the LAMMPS-GUI main window LAMMPS can be started either from
|
||||
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.
|
||||
operations causes LAMMPS to process the entire input script in the
|
||||
editor buffer, 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
|
||||
@ -128,33 +132,30 @@ before LAMMPS can be run from a file.
|
||||
|
||||
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
|
||||
also indicates the number of active threads, when 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 current :doc:`run <run>` or :doc:`minimize <minimize>` command.
|
||||
|
||||
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%
|
||||
Also, the line number of the currently executed command is highlighted
|
||||
in green.
|
||||
|
||||
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."
|
||||
dialog is shown and the line of the input which triggered the error is
|
||||
highlighted. The state of LAMMPS in the status bar is 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:
|
||||
Up to three additional windows may 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>`
|
||||
- an *Output* window with the captured screen output from LAMMPS
|
||||
- a *Charts* window with a line graph created from thermodynamic output of the run
|
||||
- a *Slide Show* window with images created by a :doc:`dump image command <dump_image>`
|
||||
in the input
|
||||
|
||||
More information on those windows and how to adjust their behavior and
|
||||
contents is given below.
|
||||
@ -171,55 +172,68 @@ This is equivalent to the input script command :doc:`timer timeout 0
|
||||
interface. Please see the corresponding documentation pages to
|
||||
understand the implications of this operation.
|
||||
|
||||
Log Window
|
||||
----------
|
||||
Output 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.
|
||||
By default, when starting a run, an *Output* window opens that displays
|
||||
the screen output of the running LAMMPS calculation, as shown below.
|
||||
This text would normally be seen in the command line window.
|
||||
|
||||
.. 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.
|
||||
LAMMPS-GUI captures the screen output from LAMMPS as it is generated and
|
||||
updates the *Output* window regularly during a run.
|
||||
|
||||
By default, the log window will be replaced each time a run is started.
|
||||
By default, the *Output* window is 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.
|
||||
in the window title. It is possible to change the behavior of
|
||||
LAMMPS-GUI in the preferences dialog to create a *new* *Output* window
|
||||
for every run or to not show the current *Output* window. It is also
|
||||
possible to show or hide the *current* *Output* window from the ``View``
|
||||
menu.
|
||||
|
||||
The text in the log window is read-only and cannot be modified, but
|
||||
The text in the *Output* 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
|
||||
`Ctrl-S` (`Command-S` on macOS) is available to save the *Output* 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.
|
||||
right mouse button into the *Output* 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
|
||||
.. image:: JPG/lammps-gui-yaml.png
|
||||
:align: center
|
||||
:scale: 50%
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
Should the *Output* window contain embedded YAML format text (see above for a
|
||||
demonstration), for example from using :doc:`thermo_style yaml
|
||||
<thermo_style>` or :doc:`thermo_modify line yaml <thermo_modify>`, the
|
||||
keyboard shortcut `Ctrl-Y` (`Command-Y` on macOS) is available to save
|
||||
only the YAML parts to a file. This option is also available from a
|
||||
context menu by clicking with the right mouse button into the *Output* window
|
||||
text area.
|
||||
|
||||
Charts Window
|
||||
-------------
|
||||
|
||||
By default, when starting a run, a *Charts* window opens that displays a
|
||||
plot of thermodynamic output of the LAMMPS calculation as shown below.
|
||||
|
||||
.. image:: JPG/lammps-gui-chart.png
|
||||
:align: center
|
||||
:scale: 33%
|
||||
|
||||
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.
|
||||
property can be shown at a time. The plots are updated with new data as
|
||||
the run progresses, so they can be used to visually monitor the
|
||||
evolution of available properties. The window title shows the current
|
||||
run number that this chart window corresponds to. Same as for the
|
||||
*Output* window, the chart window is 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
|
||||
@ -229,19 +243,20 @@ columns (for use by plotting tools like `gnuplot
|
||||
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
|
||||
Thermo output data from successive run commands in the input script is
|
||||
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.
|
||||
<dump_image>` command, a "Slide Show" window opens which loads and
|
||||
displays the images created by LAMMPS as they are written. This is a
|
||||
convenient way to visually monitor the progress of the simulation.
|
||||
|
||||
.. image:: JPG/lammps-gui-slideshow.png
|
||||
:align: center
|
||||
@ -250,9 +265,17 @@ displays the images created by LAMMPS as they are written.
|
||||
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.
|
||||
zoom in or zoom out of the displayed images. The button on the very
|
||||
left triggers an export of the slide show animation to a movie file,
|
||||
provided the `FFmpeg program <https://ffmpeg.org/>`_ is installed.
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
When clicking on the "garbage can" icon, all image files of the slide
|
||||
show will be deleted. Since their number can be large for long
|
||||
simulations, this option enables to safely and quickly clean up the
|
||||
clutter caused in the working directory by those image files without
|
||||
risk of deleting other files by accident when using wildcards.
|
||||
|
||||
Variable Info
|
||||
-------------
|
||||
@ -260,23 +283,22 @@ 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
|
||||
the `Ctrl-Shift-W` keyboard shortcut. This shows 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
|
||||
Like for the *Output* and *Charts* 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
|
||||
LAMMPS-GUI automatically defines the variable "gui_run" to the current
|
||||
value of the run counter. That way it is possible to automatically
|
||||
record a separate log for each run attempt by using the command
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -285,26 +307,34 @@ command
|
||||
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
|
||||
-----------------------
|
||||
Snapshot Image Viewer
|
||||
---------------------
|
||||
|
||||
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.
|
||||
clicking on the "palette" button in the status bar of the *Editor*
|
||||
window, LAMMPS-GUI sends a custom :doc:`write_dump image <dump_image>`
|
||||
command to LAMMPS and reads back the resulting snapshot image with the
|
||||
current state of the system into an image viewer. This functionality is
|
||||
*not* available *during* an ongoing run. In case LAMMPS is not yet
|
||||
initialized, LAMMPS-GUI tries to identify the line with the first run or
|
||||
minimize command and execute all commands from the input buffer up to
|
||||
that line, and then executes a "run 0" command. This initializes the
|
||||
system so an image of the initial state of the system can be rendered.
|
||||
If there was an error in that process, the snapshot image viewer does
|
||||
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.
|
||||
When possible, LAMMPS-GUI tries to detect which elements the atoms
|
||||
correspond to (via their mass) and then colorize them in the image and
|
||||
set their atom diameters accordingly. If this is not possible, for
|
||||
instance when using reduced (= 'lj') :doc:`units <units>`, then
|
||||
LAMMPS-GUI will check the current pair style and if it is a
|
||||
Lennard-Jones type potential, it will extract the *sigma* parameter
|
||||
for each atom type and assign atom diameters from those numbers.
|
||||
|
||||
Otherwise the default sequence of colors of the :doc:`dump image
|
||||
<dump_image>` command is assigned to the different atom types and the
|
||||
diameters are all the same.
|
||||
|
||||
.. image:: JPG/lammps-gui-image.png
|
||||
:align: center
|
||||
@ -314,33 +344,43 @@ 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 (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.
|
||||
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 is colored while LAMMPS
|
||||
is running to render the new image; it is grayed out when LAMMPS 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 (keyboard shortcut `Ctrl-S`) or copied to the clipboard
|
||||
(keyboard shortcut `Ctrl-C`) for pasting the image into another
|
||||
application.
|
||||
|
||||
Editor Functions
|
||||
----------------
|
||||
.. versionadded:: 1.6
|
||||
|
||||
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.
|
||||
From the ``File`` menu it is also possible to copy the current
|
||||
:doc:`dump image <dump_image>` and :doc:`dump_modify <dump_image>`
|
||||
commands to the clipboard so they can be pasted into a LAMMPS input file
|
||||
so that the visualization settings of the snapshot image can be repeated
|
||||
for the entire simulation (and thus be repeated in the slide show
|
||||
viewer). This feature has the keyboard shortcut `Ctrl-D`.
|
||||
|
||||
Editor Window
|
||||
-------------
|
||||
|
||||
The *Editor* window of LAMMPS-GUI 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
|
||||
By default, LAMMPS-GUI displays a small pop-up frame with possible
|
||||
choices for LAMMPS input script commands or styles after 2 characters of
|
||||
a word have been typed.
|
||||
|
||||
@ -354,10 +394,10 @@ 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
|
||||
context menu. Most of the completion information is retrieved from the
|
||||
active LAMMPS instance and thus it shows only available options that
|
||||
have been enabled when compiling LAMMPS. That list, however, excludes
|
||||
accelerated styles and commands; for improved clarity, only the
|
||||
non-suffix version of styles are shown.
|
||||
|
||||
Line Reformatting
|
||||
@ -369,8 +409,8 @@ 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.
|
||||
hitting the 'TAB' key. The amount of padding can be adjusted in the
|
||||
``Preferences`` dialog for the *Editor*.
|
||||
|
||||
Internally this functionality is achieved by splitting the line into
|
||||
"words" and then putting it back together with padding added where the
|
||||
@ -379,17 +419,26 @@ context can be detected; otherwise a single space is used between words.
|
||||
Context Specific Help
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. image:: JPG/lammps-gui-popup-help.png
|
||||
:align: center
|
||||
:scale: 50%
|
||||
.. |gui-popup1| image:: JPG/lammps-gui-popup-help.png
|
||||
:width: 48%
|
||||
|
||||
A unique feature of the LAMMPS GUI is the option to look up the
|
||||
.. |gui-popup2| image:: JPG/lammps-gui-popup-view.png
|
||||
:width: 48%
|
||||
|
||||
|gui-popup1| |gui-popup2|
|
||||
|
||||
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 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 keyboard, the first of
|
||||
those entries will be chosen directly.
|
||||
shortcut. When using the mouse, there are additional entries in the
|
||||
context menu that open the corresponding documentation page in the
|
||||
online LAMMPS documentation in a web browser window. When using the
|
||||
keyboard, the first of those entries is chosen.
|
||||
|
||||
If the word under the cursor is a file, then additionally the context
|
||||
menu has an entry to open the file in a read-only text viewer window.
|
||||
This is a convenient way to view the contents of files that are
|
||||
referenced in the input.
|
||||
|
||||
Menu
|
||||
----
|
||||
@ -397,9 +446,9 @@ Menu
|
||||
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
|
||||
corresponding underlined letter, that is `Alt-F` activates the
|
||||
``File`` menu. For the corresponding activated sub-menus, the key
|
||||
corresponding the underlined letters can again be used to select entries
|
||||
corresponding the underlined letters can be used to select entries
|
||||
instead of using the mouse.
|
||||
|
||||
File
|
||||
@ -407,19 +456,22 @@ File
|
||||
|
||||
The ``File`` menu offers the usual options:
|
||||
|
||||
- ``New`` will clear the current buffer and reset the file name to ``*unknown*``
|
||||
- ``Open`` will open a dialog to select a new file
|
||||
- ``Save`` will save the current file; if the file name is ``*unknown*``
|
||||
- ``New`` clears the current buffer and resets the file name to ``*unknown*``
|
||||
- ``Open`` opens a dialog to select a new file for editing in the *Editor*
|
||||
- ``View`` opens a dialog to select a file for viewing in a *separate* window (read-only)
|
||||
- ``Save`` saves the current file; if the file name is ``*unknown*``
|
||||
a dialog will open to select a new file name
|
||||
- ``Save As`` will open a dialog to select and new file name and save
|
||||
the buffer to it
|
||||
- ``Quit`` will exit LAMMPS GUI. If there are unsaved changes, a dialog
|
||||
will appear to either cancel the operation, or to save or not save the
|
||||
edited file.
|
||||
- ``Save As`` opens a dialog to select and new file name (and folder, if
|
||||
desired) and saves the buffer to it. Writing the buffer to a
|
||||
different folder will also switch the current working directory to
|
||||
that folder.
|
||||
- ``Quit`` exits LAMMPS-GUI. If there are unsaved changes, a dialog will
|
||||
appear to either cancel the operation, or to save, or to not save the
|
||||
modified buffer.
|
||||
|
||||
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.
|
||||
In addition, up to 5 recent file names will be listed after the ``Open``
|
||||
entry that allows re-opening recently opened files. This list is stored
|
||||
when quitting and recovered when starting again.
|
||||
|
||||
Edit
|
||||
^^^^
|
||||
@ -427,19 +479,20 @@ Edit
|
||||
The ``Edit`` menu offers the usual editor functions like ``Undo``,
|
||||
``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.
|
||||
of all stored preferences and settings, so they are reset to their
|
||||
default values.
|
||||
|
||||
Run
|
||||
^^^
|
||||
|
||||
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>`.
|
||||
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>`
|
||||
in a separate thread.
|
||||
|
||||
Specifically, a LAMMPS instance will be created by calling
|
||||
:cpp:func:`lammps_open_no_mpi`. The buffer contents then executed by
|
||||
:cpp:func:`lammps_open_no_mpi`. The buffer contents are 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
|
||||
@ -449,16 +502,16 @@ 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 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 LAMMPS calculations are run in a concurrent thread so that the GUI
|
||||
can stay responsive and be updated during the run. The GUI can retrieve
|
||||
data from the running LAMMPS instance and tell it to stop at the next
|
||||
timestep. The ``Stop LAMMPS`` entry will do this by calling the
|
||||
:cpp:func:`lammps_force_timeout` library function, which is equivalent
|
||||
to a :doc:`timer timeout 0 <timer>` command.
|
||||
|
||||
The ``Set Variables...`` entry will open a dialog box where
|
||||
The ``Set Variables...`` entry opens 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
|
||||
are passed to the LAMMPS instance when it is created and are thus
|
||||
set *before* a run is started.
|
||||
|
||||
.. image:: JPG/lammps-gui-variables.png
|
||||
@ -478,12 +531,12 @@ in an ``Image Viewer`` window.
|
||||
|
||||
The ``View in OVITO`` entry will launch `OVITO <https://ovito.org>`_
|
||||
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 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 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
|
||||
is only available if the LAMMPS-GUI can find the VMD executable in the
|
||||
system path.
|
||||
|
||||
View
|
||||
@ -498,14 +551,14 @@ 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`` entry displays a dialog with a summary of the
|
||||
option to launch the LAMMPS online documentation in a web browser. The
|
||||
``About LAMMPS-GUI`` entry displays a dialog with a summary of the
|
||||
configuration settings of the LAMMPS library in use and the version
|
||||
number of LAMMPS GUI itself. The ``Quick Help`` displays a dialog
|
||||
with a minimal description of LAMMPS GUI. 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.
|
||||
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 online documentation in a web browser window.
|
||||
|
||||
-----
|
||||
|
||||
@ -513,7 +566,7 @@ Preferences
|
||||
-----------
|
||||
|
||||
The ``Preferences`` dialog allows customization of the behavior and
|
||||
look of the LAMMPS GUI application. The settings are grouped and each
|
||||
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
|
||||
@ -534,9 +587,9 @@ General Settings:
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
- *Echo input to log:* when checked, all input commands, including
|
||||
variable expansions, will be echoed to the log window. This is
|
||||
variable expansions, are echoed to the *Output* window. This is
|
||||
equivalent to using `-echo screen` at the command line. There is no
|
||||
log *file* produced by default, since LAMMPS GUI 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.
|
||||
@ -558,12 +611,12 @@ General Settings:
|
||||
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 option is only visible
|
||||
when LAMMPS GUI was compiled to load the LAMMPS library at run time
|
||||
when LAMMPS-GUI was compiled to load the LAMMPS library at run time
|
||||
instead of being linked to it directly. With the ``Browse..`` button
|
||||
or by changing the text, a different shared library file with a
|
||||
different compilation of LAMMPS with different settings or from a
|
||||
different version can be loaded. After this setting was changed,
|
||||
LAMMPS GUI needs to be re-launched.
|
||||
LAMMPS-GUI needs to be re-launched.
|
||||
- *Select Default Font:* Opens a font selection dialog where the type
|
||||
and size for the default font (used for everything but the editor and
|
||||
log) of the application can be set.
|
||||
@ -571,11 +624,12 @@ General Settings:
|
||||
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
|
||||
to update the GUI every 10 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.
|
||||
computers with slower CPUs and a small number of CPU cores. This
|
||||
setting may be changed to a value between 1 and 1000 milliseconds.
|
||||
|
||||
Accelerators:
|
||||
^^^^^^^^^^^^^
|
||||
@ -648,48 +702,54 @@ available (On macOS use the Command key instead of Ctrl/Control).
|
||||
- Redo edit
|
||||
- Ctrl+/
|
||||
- Stop Active Run
|
||||
* - Ctrl+S
|
||||
- Save File
|
||||
* - Ctrl+Shift+F
|
||||
- View File
|
||||
- Ctrl+C
|
||||
- Copy text
|
||||
- Ctrl+Shift+V
|
||||
- Set Variables
|
||||
* - Ctrl+Shift+S
|
||||
- Save File As
|
||||
* - Ctrl+S
|
||||
- Save File
|
||||
- Ctrl+X
|
||||
- Cut text
|
||||
- Ctrl+I
|
||||
- Snapshot Image
|
||||
* - Ctrl+Q
|
||||
- Quit Application
|
||||
* - Ctrl+Shift+S
|
||||
- Save File As
|
||||
- Ctrl+V
|
||||
- Paste text
|
||||
- Ctrl+L
|
||||
- Slide Show
|
||||
* - Ctrl+W
|
||||
- Close Window
|
||||
* - Ctrl+Q
|
||||
- Quit Application
|
||||
- Ctrl+A
|
||||
- Select All
|
||||
- Ctrl+P
|
||||
- Preferences
|
||||
* - Ctrl+Shift+A
|
||||
- About LAMMPS
|
||||
* - Ctrl+W
|
||||
- Close Window
|
||||
- Ctrl+Shift+H
|
||||
- Quick Help
|
||||
- Ctrl+Shift+G
|
||||
- LAMMPS GUI Howto
|
||||
* - Ctrl+Shift+M
|
||||
- LAMMPS Manual
|
||||
- LAMMPS-GUI Howto
|
||||
* - Ctrl+Shift+A
|
||||
- About LAMMPS
|
||||
- Ctrl+?
|
||||
- Context Help
|
||||
- Ctrl+Shift+W
|
||||
- Show Variables
|
||||
* - Ctrl+Shift+Enter
|
||||
- Run File
|
||||
* - Ctrl+Shift+M
|
||||
- LAMMPS Manual
|
||||
- TAB
|
||||
- Reformat line
|
||||
- Shift+TAB
|
||||
- Show Completions
|
||||
* - Ctrl+Shift+Enter
|
||||
- Run File
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
Further editing keybindings `are documented with the Qt documentation
|
||||
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
|
||||
|
||||
116
doc/src/Howto_rheo.rst
Normal file
@ -0,0 +1,116 @@
|
||||
Reproducing hydrodynamics and elastic objects (RHEO)
|
||||
====================================================
|
||||
|
||||
The RHEO package is a hybrid implementation of smoothed particle
|
||||
hydrodynamics (SPH) for fluid flow, which can couple to the :doc:`BPM package
|
||||
<Howto_bpm>` to model solid elements. RHEO combines these methods to enable
|
||||
mesh-free modeling of multi-phase material systems. Its SPH solver supports
|
||||
many advanced options including reproducing kernels, particle shifting, free
|
||||
surface identification, and solid surface reconstruction. To model fluid-solid
|
||||
systems, the status of particles can dynamically change between a fluid and
|
||||
solid state, e.g. during melting/solidification, which determines how they
|
||||
interact and their physical behavior. The package is designed with modularity
|
||||
in mind, so one can easily turn various features on/off, adjust physical
|
||||
details of the system, or develop new capabilities. For instance, the numerics
|
||||
associated with calculating gradients, reproducing kernels, etc. are separated
|
||||
into distinct classes to simplify the development of new integration schemes
|
||||
which can call these calculations. Additional numerical details can be found in
|
||||
:ref:`(Palermo) <howto_rheo_palermo>` and
|
||||
:ref:`(Clemmer) <howto_rheo_clemmer>`.
|
||||
|
||||
Note, if you simply want to run a traditional SPH simulation, the :ref:`SPH package
|
||||
<PKG-SPH>` package is likely better suited for your application. It has fewer advanced
|
||||
features and therefore benefits from improved performance. The :ref:`MACHDYN
|
||||
<PKG-MACHDYN>` package for solids may also be relevant for fluid-solid problems.
|
||||
|
||||
----------
|
||||
|
||||
At the core of the package is :doc:`fix rheo <fix_rheo>` which integrates
|
||||
particle trajectories and controls many optional features (e.g. the use
|
||||
of reproducing kernels). In conjunction to fix rheo, one must specify an
|
||||
instance of :doc:`fix rheo/pressure <fix_rheo_pressure>` and
|
||||
:doc:`fix rheo/viscosity <fix_rheo_viscosity>` to define a pressure equation
|
||||
of state and viscosity model, respectively. Optionally, one can model
|
||||
a heat equation with :doc:`fix rheo/thermal <fix_rheo_thermal>`, which also
|
||||
allows the user to specify equations for a particle's thermal conductivity,
|
||||
specific heat, latent heat, and melting temperature. The ordering of these
|
||||
fixes in an an input script matters. Fix rheo must be defined prior to all
|
||||
other RHEO fixes.
|
||||
|
||||
Typically, RHEO requires atom style rheo. In addition to typical atom
|
||||
properties like positions and forces, particles store a local density,
|
||||
viscosity, pressure, and status. If thermal evolution is modeled, one must
|
||||
use atom style rheo/thermal which also includes a local energy, temperature, and
|
||||
conductivity. Note that the temperature is always derived from the energy.
|
||||
This implies the *temperature* attribute of :doc:`the set command <set>` does not
|
||||
affect particles. Instead, one should use the *sph/e* attribute.
|
||||
|
||||
The status variable uses bit-masking to track various properties of a particle
|
||||
such as its current state of matter (fluid or solid) and its location relative
|
||||
to a surface. Some of these properties (and others) can be accessed using
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`. The *status*
|
||||
attribute in :doc:`the set command <set>` only allows control over the first bit
|
||||
which sets the state of matter, 0 is fluid and 1 is solid.
|
||||
|
||||
Fluid interactions, including pressure forces, viscous forces, and heat exchange,
|
||||
are calculated using :doc:`pair rheo <pair_rheo>`. Unlike typical pair styles,
|
||||
pair rheo ignores the :doc:`special bond <special_bonds>` settings. Instead,
|
||||
it determines whether to calculate forces based on the status of particles: e.g.,
|
||||
hydrodynamic forces are only calculated if a fluid particle is involved.
|
||||
|
||||
----------
|
||||
|
||||
To model elastic objects, there are currently two mechanisms in RHEO, one designed
|
||||
for bulk solid bodies and the other for thin shells. Both mechanisms rely on
|
||||
introducing bonded forces between particles and therefore require a hybrid of atom
|
||||
style bond and rheo (or rheo/thermal).
|
||||
|
||||
To create an elastic solid body, one has to (a) change the status of constituent
|
||||
particles to solid (e.g. with the :doc:`set <set>` command), (b) create bpm
|
||||
bonds between the particles (see the :doc:`bpm howto <Howto_bpm>` page for
|
||||
more details), and (c) use :doc:`pair rheo/solid <pair_rheo_solid>` to
|
||||
apply repulsive contact forces between distinct solid bodies. Akin to pair rheo,
|
||||
pair rheo/solid considers a particles fluid/solid phase to determine whether to
|
||||
apply forces. However, unlike pair rheo, pair rheo/solid does obey special bond
|
||||
settings such that contact forces do not have to be calculated between two bonded
|
||||
solid particles in the same elastic body.
|
||||
|
||||
In systems with thermal evolution, fix rheo/thermal can optionally set a
|
||||
melting/solidification temperature allowing particles to dynamically swap their
|
||||
state between fluid and solid when the temperature exceeds or drops below the
|
||||
critical temperature, respectively. Using the *react* option, one can specify a maximum
|
||||
bond length and a bond type. Then, when solidifying, particles will search their
|
||||
local neighbors and automatically create bonds with any neighboring solid particles
|
||||
in range. For BPM bond styles, bonds will then use the immediate position of the two
|
||||
particles to calculate a reference state. When melting, particles will delete any
|
||||
bonds of the specified type when reverting to a fluid state. Special bonds are updated
|
||||
as bonds are created/broken.
|
||||
|
||||
The other option for elastic objects is an elastic shell that is nominally much
|
||||
thinner than a particle diameter, e.g. a oxide skin which gradually forms over time
|
||||
on the surface of a fluid. Currently, this is implemented using
|
||||
:doc:`fix rheo/oxidation <fix_rheo_oxidation>` and bond style
|
||||
:doc:`rheo/shell <bond_rheo_shell>`. Essentially, fix rheo/oxidation creates candidate
|
||||
bonds of a specified type between surface fluid particles within a specified distance.
|
||||
a newly created rheo/shell bond will then start a timer. While the timer is counting
|
||||
down, the bond will delete itself if particles move too far apart or move away from the
|
||||
surface. However, if the timer reaches a user-defined threshold, then the bond will
|
||||
activate and apply additional forces to the fluid particles. Bond style rheo/shell
|
||||
then operates very similarly to a BPM bond style, storing a reference length and
|
||||
breaking if stretched too far. Unlike the above method, this option does not remove
|
||||
the underlying fluid interactions (although particle shifting is turned off) and does
|
||||
not modify special bond settings of particles.
|
||||
|
||||
While these two options are not expected to be appropriate for every system,
|
||||
either framework can be modified to create more suitable models (e.g. by changing the
|
||||
criteria for creating/deleting a bond or altering force calculations).
|
||||
|
||||
----------
|
||||
|
||||
.. _howto_rheo_palermo:
|
||||
|
||||
**(Palermo)** Palermo, Wolf, Clemmer, O'Connor, in preparation.
|
||||
|
||||
.. _howto_rheo_clemmer:
|
||||
|
||||
**(Clemmer)** Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
|
||||
@ -35,11 +35,11 @@ packages listed below), they do not depend on any installed software and
|
||||
thus should run on *any* 64-bit x86 machine with *any* Linux version.
|
||||
|
||||
These executable include most of the available packages and multi-thread
|
||||
parallelization (via INTEL, KOKKOS, or OPENMP package). They are **not**
|
||||
compatible with MPI. Several of the LAMMPS tools executables (e.g. ``msi2lmp``)
|
||||
and the ``lammps-shell`` program are included as well. Because of the
|
||||
static linkage, there is no ``liblammps.so`` library file and thus also the
|
||||
LAMMPS python module, which depends on it, is not included.
|
||||
parallelization (via INTEL, KOKKOS, or OPENMP package). They are
|
||||
**not** compatible with MPI. Several of the LAMMPS tools executables
|
||||
(e.g. ``msi2lmp``) are included as well. Because of the static linkage,
|
||||
there is no ``liblammps.so`` library file and thus also the LAMMPS
|
||||
python module, which depends on it, is not included.
|
||||
|
||||
The compressed tar archives available for download have names following
|
||||
the pattern ``lammps-linux-x86_64-<version>.tar.gz`` and will all unpack
|
||||
|
||||
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 103 KiB |
BIN
doc/src/JPG/lammps-gui-popup-view.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 51 KiB |
BIN
doc/src/JPG/lammps-gui-yaml.png
Normal file
|
After Width: | Height: | Size: 171 KiB |
@ -13,6 +13,8 @@ This section documents the following functions:
|
||||
- :cpp:func:`lammps_extract_setting`
|
||||
- :cpp:func:`lammps_extract_global_datatype`
|
||||
- :cpp:func:`lammps_extract_global`
|
||||
- :cpp:func:`lammps_extract_pair_dimension`
|
||||
- :cpp:func:`lammps_extract_pair`
|
||||
- :cpp:func:`lammps_map_atom`
|
||||
|
||||
--------------------
|
||||
@ -123,6 +125,16 @@ subdomains and processors.
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_extract_pair_dimension
|
||||
:project: progguide
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_extract_pair
|
||||
:project: progguide
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_map_atom
|
||||
:project: progguide
|
||||
|
||||
|
||||
@ -8,12 +8,12 @@ info on how to download or build any extra library it requires. It also
|
||||
gives links to documentation, example scripts, and pictures/movies (if
|
||||
available) that illustrate use of the package.
|
||||
|
||||
The majority of packages can be included in a LAMMPS build with a
|
||||
single setting (``-D PKG_<NAME>=on`` for CMake) or command
|
||||
(``make yes-<name>`` for make). See the :doc:`Build package <Build_package>`
|
||||
page for more info. A few packages may require additional steps;
|
||||
this is indicated in the descriptions below. The :doc:`Build extras <Build_extras>`
|
||||
page gives those details.
|
||||
The majority of packages can be included in a LAMMPS build with a single
|
||||
setting (``-D PKG_<NAME>=on`` for CMake) or command (``make yes-<name>``
|
||||
for make). See the :doc:`Build package <Build_package>` page for more
|
||||
info. A few packages may require additional steps; this is indicated in
|
||||
the descriptions below. The :doc:`Build extras <Build_extras>` page
|
||||
gives those details.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -103,6 +103,7 @@ page gives those details.
|
||||
* :ref:`QEQ <PKG-QEQ>`
|
||||
* :ref:`QMMM <PKG-QMMM>`
|
||||
* :ref:`QTB <PKG-QTB>`
|
||||
* :ref:`RHEO <PKG-RHEO>`
|
||||
* :ref:`REACTION <PKG-REACTION>`
|
||||
* :ref:`REAXFF <PKG-REAXFF>`
|
||||
* :ref:`REPLICA <PKG-REPLICA>`
|
||||
@ -1323,18 +1324,19 @@ KSPACE package
|
||||
|
||||
**Contents:**
|
||||
|
||||
A variety of long-range Coulombic solvers, as well as pair styles
|
||||
which compute the corresponding short-range pairwise Coulombic
|
||||
interactions. These include Ewald, particle-particle particle-mesh
|
||||
(PPPM), and multilevel summation method (MSM) solvers.
|
||||
A variety of long-range Coulombic solvers, as well as pair styles which
|
||||
compute the corresponding short-range pairwise Coulombic interactions.
|
||||
These include Ewald, particle-particle particle-mesh (PPPM), and
|
||||
multilevel summation method (MSM) solvers.
|
||||
|
||||
**Install:**
|
||||
|
||||
Building with this package requires a 1d FFT library be present on
|
||||
your system for use by the PPPM solvers. This can be the KISS FFT
|
||||
library provided with LAMMPS, third party libraries like FFTW, or a
|
||||
vendor-supplied FFT library. See the :doc:`Build settings <Build_settings>` page for details on how to select
|
||||
different FFT options for your LAMPMS build.
|
||||
Building with this package requires a 1d FFT library be present on your
|
||||
system for use by the PPPM solvers. This can be the KISS FFT library
|
||||
provided with LAMMPS, third party libraries like FFTW, or a
|
||||
vendor-supplied FFT library. See the :doc:`Build settings
|
||||
<Build_settings>` page for details on how to select different FFT
|
||||
options for your LAMMPS build.
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
@ -2621,6 +2623,45 @@ another set.
|
||||
|
||||
----------
|
||||
|
||||
.. _PKG-RHEO:
|
||||
|
||||
RHEO package
|
||||
------------
|
||||
|
||||
**Contents:**
|
||||
|
||||
Pair styles, bond styles, fixes, and computes for reproducing
|
||||
hydrodynamics and elastic objects. See the :doc:`Howto rheo
|
||||
<Howto_rheo>` page for an overview.
|
||||
|
||||
**Install:**
|
||||
|
||||
This package has :ref:`specific installation instructions <rheo>` on the :doc:`Build extras <Build_extras>` page.
|
||||
|
||||
**Authors:** Joel T. Clemmer (Sandia National Labs),
|
||||
Thomas C. O'Connor (Carnegie Mellon University)
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
**Supporting info:**
|
||||
|
||||
* src/RHEO filenames -> commands
|
||||
* :doc:`Howto_rheo <Howto_rheo>`
|
||||
* :doc:`atom_style rheo <atom_style>`
|
||||
* :doc:`atom_style rheo/thermal <atom_style>`
|
||||
* :doc:`bond_style rheo/shell <bond_rheo_shell>`
|
||||
* :doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
* :doc:`fix rheo <fix_rheo>`
|
||||
* :doc:`fix rheo/oxidation <fix_rheo_oxidation>`
|
||||
* :doc:`fix rheo/pressure <fix_rheo_pressure>`
|
||||
* :doc:`fix rheo/thermal <fix_rheo_thermal>`
|
||||
* :doc:`fix rheo/viscosity <fix_rheo_viscosity>`
|
||||
* :doc:`pair_style rheo <pair_rheo>`
|
||||
* :doc:`pair_style rheo/solid <pair_rheo_solid>`
|
||||
* examples/rheo
|
||||
|
||||
----------
|
||||
|
||||
.. _PKG-RIGID:
|
||||
|
||||
RIGID package
|
||||
|
||||
@ -413,6 +413,11 @@ whether an extra library is needed to build and use the package:
|
||||
- :doc:`fix qtb <fix_qtb>` :doc:`fix qbmsst <fix_qbmsst>`
|
||||
- qtb
|
||||
- no
|
||||
* - :ref:`RHEO <PKG-RHEO>`
|
||||
- reproducing hydrodynamics and elastic objects
|
||||
- :doc:`Howto rheo <Howto_rheo>`
|
||||
- rheo
|
||||
- no
|
||||
* - :ref:`REACTION <PKG-REACTION>`
|
||||
- chemical reactions in classical MD
|
||||
- :doc:`fix bond/react <fix_bond_react>`
|
||||
|
||||
@ -92,7 +92,6 @@ Miscellaneous tools
|
||||
* :ref:`emacs <emacs>`
|
||||
* :ref:`i-PI <ipi>`
|
||||
* :ref:`kate <kate>`
|
||||
* :ref:`LAMMPS shell <lammps_shell>`
|
||||
* :ref:`LAMMPS GUI <lammps_gui>`
|
||||
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
||||
* :ref:`Offline build tool <offline>`
|
||||
@ -379,7 +378,7 @@ See README file in the tools/fep directory.
|
||||
i-PI tool
|
||||
-------------------
|
||||
|
||||
.. versionchanged:: TBD
|
||||
.. versionchanged:: 27June2024
|
||||
|
||||
The tools/i-pi directory used to contain a bundled version of the i-PI
|
||||
software package for use with LAMMPS. This version, however, was
|
||||
@ -389,7 +388,7 @@ The i-PI package was created and is maintained by Michele Ceriotti,
|
||||
michele.ceriotti at gmail.com, to interface to a variety of molecular
|
||||
dynamics codes.
|
||||
|
||||
i-PI is now available via PyPi using the pip package manager at:
|
||||
i-PI is now available via PyPI using the pip package manager at:
|
||||
https://pypi.org/project/ipi/
|
||||
|
||||
Here are the commands to set up a virtual environment and install
|
||||
@ -444,219 +443,9 @@ The file was provided by Alessandro Luigi Sellerio
|
||||
|
||||
----------
|
||||
|
||||
.. _lammps_shell:
|
||||
|
||||
LAMMPS shell
|
||||
------------
|
||||
|
||||
.. versionadded:: 9Oct2020
|
||||
|
||||
Overview
|
||||
^^^^^^^^
|
||||
|
||||
The LAMMPS Shell, ``lammps-shell`` is a program that functions very
|
||||
similar to the regular LAMMPS executable but has several modifications
|
||||
and additions that make it more powerful for interactive sessions,
|
||||
i.e. where you type LAMMPS commands from the prompt instead of reading
|
||||
them from a file.
|
||||
|
||||
- It uses the readline and history libraries to provide command line
|
||||
editing and context aware TAB-expansion (details on that below).
|
||||
|
||||
- When processing an input file with the '-in' or '-i' flag from the
|
||||
command line, it does not exit at the end of that input file but
|
||||
stops at a prompt, so that additional commands can be issued
|
||||
|
||||
- Errors will not abort the shell but return to the prompt.
|
||||
|
||||
- It has additional commands aimed at interactive use (details below).
|
||||
|
||||
- Interrupting a calculation with CTRL-C will not terminate the
|
||||
session but rather enforce a timeout to cleanly stop an ongoing
|
||||
run (more info on timeouts is in the :doc:`timer command <timer>`
|
||||
documentation).
|
||||
|
||||
These enhancements make the LAMMPS shell an attractive choice for
|
||||
interactive LAMMPS sessions in graphical desktop environments
|
||||
(e.g. Gnome, KDE, Cinnamon, XFCE, Windows).
|
||||
|
||||
TAB-expansion
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
When writing commands interactively at the shell prompt, you can hit
|
||||
the TAB key at any time to try and complete the text. This completion
|
||||
is context aware and will expand any first word only to commands
|
||||
available in that executable.
|
||||
|
||||
- For style commands it will expand to available styles of the
|
||||
corresponding category (e.g. pair styles after a
|
||||
:doc:`pair_style <pair_style>` command).
|
||||
|
||||
- For :doc:`compute <compute>`, :doc:`fix <fix>`, or :doc:`dump <dump>`
|
||||
it will also expand only to already defined groups for the group-ID
|
||||
keyword.
|
||||
|
||||
- For commands like :doc:`compute_modify <compute_modify>`,
|
||||
:doc:`fix_modify <fix_modify>`, or :doc:`dump_modify <dump_modify>`
|
||||
it will expand to known compute/fix/dump IDs only.
|
||||
|
||||
- When typing references to computes, fixes, or variables with a
|
||||
"c\_", "f\_", or "v\_" prefix, respectively, then the expansion will
|
||||
be to known compute/fix IDs and variable names. Variable name
|
||||
expansion is also available for the ${name} variable syntax.
|
||||
|
||||
- In all other cases TAB expansion will complete to names of files
|
||||
and directories.
|
||||
|
||||
Command line editing and history
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
When typing commands, command line editing similar to what BASH
|
||||
provides is available. Thus it is possible to move around the
|
||||
currently line and perform various cut and insert and edit operations.
|
||||
Previous commands can be retrieved by scrolling up (and down)
|
||||
or searching (e.g. with CTRL-r).
|
||||
|
||||
Also history expansion through using the exclamation mark '!'
|
||||
can be performed. Examples: '!!' will be replaced with the previous
|
||||
command, '!-2' will repeat the command before that, '!30' will be
|
||||
replaced with event number 30 in the command history list, and
|
||||
'!run' with the last command line that started with "run". Adding
|
||||
a ":p" to such a history expansion will result that the expansion is
|
||||
printed and added to the history list, but NOT executed.
|
||||
On exit the LAMMPS shell will write the history list to a file
|
||||
".lammps_history" in the current working directory. If such a
|
||||
file exists when the LAMMPS shell is launched it will be read to
|
||||
populate the history list.
|
||||
|
||||
This is realized via the readline library and can thus be customized
|
||||
with an ``.inputrc`` file in the home directory. For application
|
||||
specific customization, the LAMMPS shell uses the name "lammps-shell".
|
||||
For more information about using and customizing an application using
|
||||
readline, please see the available documentation at:
|
||||
https://www.gnu.org/software/readline/
|
||||
|
||||
|
||||
Additional commands
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following commands are added to the LAMMPS shell on top of the
|
||||
regular LAMMPS commands:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
help (or ?) print a brief help message
|
||||
history display the current command history list
|
||||
clear_history wipe out the current command history list
|
||||
save_history <range> <file>
|
||||
write commands from the history to file.
|
||||
The range is given as <from>-<to>, where <from> and <to>
|
||||
may be empty. Example: save_history 100- in.recent
|
||||
source <file> read commands from file (same as "include")
|
||||
pwd print current working directory
|
||||
cd <directory> change current working directory (same as pwd if no directory)
|
||||
mem print current and maximum memory usage
|
||||
\|<command> execute <command> as a shell command and return to the command prompt
|
||||
exit exit the LAMMPS shell cleanly (unlike the "quit" command)
|
||||
|
||||
Please note that some known shell operations are implemented in the
|
||||
LAMMPS :doc:`shell command <shell>` in a platform neutral fashion,
|
||||
while using the '\|' character will always pass the following text
|
||||
to the operating system's shell command.
|
||||
|
||||
Compilation
|
||||
^^^^^^^^^^^
|
||||
|
||||
Compilation of the LAMMPS shell can be enabled by setting the CMake
|
||||
variable ``BUILD_LAMMPS_SHELL`` to "on" or using the makefile in the
|
||||
``tools/lammps-shell`` folder to compile after building LAMMPS using
|
||||
the conventional make procedure. The makefile will likely need
|
||||
customization depending on the features and settings used for
|
||||
compiling LAMMPS.
|
||||
|
||||
Limitations
|
||||
^^^^^^^^^^^
|
||||
|
||||
The LAMMPS shell was not designed for use with MPI parallelization
|
||||
via ``mpirun`` or ``mpiexec`` or ``srun``.
|
||||
|
||||
Readline customization
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The behavior of the readline functionality can be customized in the
|
||||
``${HOME}/.inputrc`` file. This can be used to alter the default
|
||||
settings or change the key-bindings. The LAMMPS Shell sets the
|
||||
application name ``lammps-shell``, so settings can be either applied
|
||||
globally or only for the LAMMPS shell by bracketing them between
|
||||
``$if lammps-shell`` and ``$endif`` like in the following example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$if lammps-shell
|
||||
# disable "beep" or "screen flash"
|
||||
set bell-style none
|
||||
# bind the "Insert" key to toggle overwrite mode
|
||||
"\e[2~": overwrite-mode
|
||||
$endif
|
||||
|
||||
More details about this are in the `readline documentation <https://tiswww.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_.
|
||||
|
||||
|
||||
LAMMPS Shell tips and tricks
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Below are some suggestions for how to use and customize the LAMMPS shell.
|
||||
|
||||
Enable tilde expansion
|
||||
""""""""""""""""""""""
|
||||
|
||||
Adding ``set expand-tilde on`` to ``${HOME}/.inputrc`` is recommended as
|
||||
this will change the filename expansion behavior to replace any text
|
||||
starting with "~" by the full path to the corresponding user's home
|
||||
directory. While the expansion of filenames **will** happen on all
|
||||
arguments where the context is not known (e.g. ``~/compile/lamm<TAB>``
|
||||
will expand to ``~/compile/lammps/``), it will not replace the tilde by
|
||||
default. But since LAMMPS does not do tilde expansion itself (unlike a
|
||||
shell), this will result in errors. Instead the tilde-expression should
|
||||
be expanded into a valid path, where the plain "~/" stands for the
|
||||
current user's home directory and "~someuser/" stands for
|
||||
"/home/someuser" or whatever the full path to that user's home directory
|
||||
is.
|
||||
|
||||
File extension association
|
||||
""""""""""""""""""""""""""
|
||||
|
||||
Since the LAMMPS shell (unlike the regular LAMMPS executable) does not
|
||||
exit when an input file is passed on the command line with the "-in" or
|
||||
"-i" flag (the behavior is like for ``python -i <filename>``), it makes
|
||||
the LAMMPS shell suitable for associating it with input files based on
|
||||
their filename extension (e.g. ".lmp"). Since ``lammps-shell`` is a
|
||||
console application, you have to run it inside a terminal program with a
|
||||
command line like this:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
xterm -title "LAMMPS Shell" -e /path/to/lammps-shell -i in.file.lmp
|
||||
|
||||
|
||||
Use history to create an input file
|
||||
"""""""""""""""""""""""""""""""""""
|
||||
|
||||
When experimenting with commands to interactively to figure out a
|
||||
suitable choice of settings or simply the correct syntax, you may want
|
||||
to record part of your commands to a file for later use. This can be
|
||||
done with the ``save_history`` commands, which allows to selectively
|
||||
write a section of the command history to a file (Example:
|
||||
``save_history 25-30 in.run``). This file can be further edited
|
||||
(Example: ``|vim in.run``) and then the file read back in and tried out
|
||||
(Example: ``source in.run``). If the input also creates a system box,
|
||||
you first need to use the :doc:`clear` command.
|
||||
|
||||
----------
|
||||
|
||||
.. _lammps_gui:
|
||||
|
||||
LAMMPS GUI
|
||||
LAMMPS-GUI
|
||||
----------
|
||||
|
||||
.. versionadded:: 2Aug2023
|
||||
@ -664,25 +453,28 @@ LAMMPS GUI
|
||||
Overview
|
||||
^^^^^^^^
|
||||
|
||||
LAMMPS GUI is a graphical text editor customized for editing LAMMPS
|
||||
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.
|
||||
LAMMPS input files through syntax highlighting, 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
|
||||
commands, possibly including the text editor, too, from a command line
|
||||
terminal window. This similarity is a design goal. While making it easy
|
||||
for beginners to start with LAMMPS, it is also the intention to simplify
|
||||
the transition to workflows like most experienced LAMMPS users do.
|
||||
This is similar to what people traditionally would do to run LAMMPS but
|
||||
all rolled into a single application: that is, using a text editor,
|
||||
plotting program, and a visualization program to edit the input, run
|
||||
LAMMPS, process the output into graphs and visualizations from a command
|
||||
line window. This similarity is a design goal. While making it easy for
|
||||
beginners to start with LAMMPS, it is also the expectation that
|
||||
LAMMPS-GUI users will eventually transition to workflows that most
|
||||
experienced LAMMPS users employ.
|
||||
|
||||
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.
|
||||
and testing simulation setups.
|
||||
|
||||
Features
|
||||
^^^^^^^^
|
||||
@ -690,9 +482,10 @@ Features
|
||||
A detailed discussion and explanation of all features and functionality
|
||||
are in the :doc:`Howto_lammps_gui` tutorial Howto page.
|
||||
|
||||
Here are a few highlights of LAMMPS GUI
|
||||
Here are a few highlights of LAMMPS-GUI
|
||||
|
||||
- Text editor with syntax highlighting customized for LAMMPS
|
||||
- Text editor features command completion for known commands and styles
|
||||
- Text editor will switch working directory to folder of file in buffer
|
||||
- Text editor will remember up to 5 recent files
|
||||
- Context specific LAMMPS command help via online documentation
|
||||
@ -704,32 +497,32 @@ Here are a few highlights of LAMMPS GUI
|
||||
- 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>`)
|
||||
- Visualization of current state in Image Viewer (via calling :doc:`write_dump image <dump_image>`)
|
||||
- Capture of images created via :doc:`dump image <dump_image>` in Slide show window
|
||||
- Many adjustable settings and preferences that are persistent
|
||||
- Dialog to set variables from the LAMMPS command line
|
||||
- Dialog to set variables, similar to the LAMMPS command line flag '-v' / '-var'
|
||||
|
||||
Parallelization
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Due to its nature as a graphical application, it is not possible to use
|
||||
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading and GPU
|
||||
the LAMMPS-GUI in parallel with MPI, but OpenMP multi-threading and GPU
|
||||
acceleration is available and enabled by default.
|
||||
|
||||
Prerequisites and portability
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
LAMMPS GUI is programmed in C++ based on the C++11 standard and using
|
||||
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; 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.
|
||||
recommended; support for Qt version 6.x is available. Building LAMMPS
|
||||
with CMake is required.
|
||||
|
||||
The LAMMPS GUI has been successfully compiled and tested on:
|
||||
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 40 x86\_64 using GCC 14 and Clang 17, Qt version 5.15LTS
|
||||
- Fedora Linux 40 x86\_64 using GCC 14, Qt version 6.5LTS
|
||||
- Fedora Linux 40 x86\_64 using GCC 14, Qt version 6.7
|
||||
- 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
|
||||
@ -745,20 +538,20 @@ available from https://download.lammps.org/static or
|
||||
https://github.com/lammps/lammps/releases. You can unpack the archives
|
||||
(or mount the macOS disk image) and run the GUI directly in place. The
|
||||
folder may also be moved around and added to the ``PATH`` environment
|
||||
variable so the executables will be found automatically. The LAMMPS GUI
|
||||
variable so the executables will be found automatically. The LAMMPS-GUI
|
||||
executable is called ``lammps-gui`` and either takes no arguments or
|
||||
attempts to load the first argument as LAMMPS input file.
|
||||
|
||||
Compilation
|
||||
^^^^^^^^^^^
|
||||
|
||||
The source for the LAMMPS GUI is included with the LAMMPS source code
|
||||
The source for the LAMMPS-GUI is included with the LAMMPS source code
|
||||
distribution in the folder ``tools/lammps-gui`` and thus it can be can
|
||||
be built as part of a regular LAMMPS compilation. :doc:`Using CMake
|
||||
<Howto_cmake>` is required. To enable its compilation, the CMake
|
||||
variable ``-D BUILD_LAMMPS_GUI=on`` must be set when creating the CMake
|
||||
configuration. All other settings (compiler, flags, compile type) for
|
||||
LAMMPS GUI are then inherited from the regular LAMMPS build. If the Qt
|
||||
LAMMPS-GUI are then inherited from the regular LAMMPS build. If the Qt
|
||||
library is packaged for Linux distributions, then its location is
|
||||
typically auto-detected since the required CMake configuration files are
|
||||
stored in a location where CMake can find them without additional help.
|
||||
@ -766,17 +559,17 @@ 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``. 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.
|
||||
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).
|
||||
Then the CMake configuration needs to be told where to find the LAMMPS
|
||||
headers and the LAMMPS library, via ``-D
|
||||
LAMMPS_SOURCE_DIR=/path/to/lammps/src``. CMake will try to guess a
|
||||
build folder with the LAMMPS library from that path, but it can also be
|
||||
set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
|
||||
It is possible to build the LAMMPS-GUI as a standalone compilation
|
||||
(e.g. when LAMMPS has been compiled with traditional make). Then the
|
||||
CMake configuration needs to be told where to find the LAMMPS headers
|
||||
and the LAMMPS library, via ``-D LAMMPS_SOURCE_DIR=/path/to/lammps/src``.
|
||||
CMake will try to guess a build folder with the LAMMPS library from that
|
||||
path, but it can also be set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
|
||||
|
||||
Rather than linking to the LAMMPS library during compilation, it is also
|
||||
possible to compile the GUI with a plugin loader that will load
|
||||
@ -827,19 +620,19 @@ There is a custom `x64-GUI-MSVC` build configuration provided in the
|
||||
compilation settings for project. Choosing this configuration will
|
||||
activate building the `lammps-gui.exe` executable in addition to LAMMPS
|
||||
through importing package selection from the ``windows.cmake`` preset
|
||||
file and enabling building the LAMMPS GUI and disabling building with MPI.
|
||||
file and enabling building the LAMMPS-GUI and disabling building with MPI.
|
||||
When requesting an installation from the `Build` menu in Visual Studio,
|
||||
it will create a compressed ``LAMMPS-Win10-amd64.zip`` zip file with the
|
||||
executables and required dependent .dll files. This zip file can be
|
||||
uncompressed and ``lammps-gui.exe`` run directly from there. The
|
||||
uncompressed folder can be added to the ``PATH`` environment and LAMMPS
|
||||
and LAMMPS GUI can be launched from anywhere from the command line.
|
||||
and LAMMPS-GUI can be launched from anywhere from the command line.
|
||||
|
||||
**MinGW64 Cross-compiler**
|
||||
|
||||
The standard CMake build procedure can be applied and the
|
||||
``mingw-cross.cmake`` preset used. By using ``mingw64-cmake`` the CMake
|
||||
command will automatically include a suitable CMake toolset file (the
|
||||
command will automatically include a suitable CMake toolchain file (the
|
||||
regular cmake command can be used after that to modify the configuration
|
||||
settings, if needed). After building the libraries and executables,
|
||||
you can build the target 'zip' (i.e. ``cmake --build <build dir> --target zip``
|
||||
@ -1329,7 +1122,7 @@ for Tcl with:
|
||||
.. code-block:: bash
|
||||
|
||||
swig -tcl -module tcllammps lammps.i
|
||||
gcc -fPIC -shared $(pkgconf --cflags tcl) -o tcllammps.so \
|
||||
gcc -fPIC -shared $(pkg-config tcl --cflags) -o tcllammps.so \
|
||||
lammps_wrap.c -L ../src/ -llammps
|
||||
tclsh
|
||||
|
||||
@ -1340,8 +1133,8 @@ functions included with:
|
||||
|
||||
swig -tcl -module tcllmps lammps_shell.i
|
||||
gcc -o tcllmpsh lammps_wrap.c -Xlinker -export-dynamic \
|
||||
-DHAVE_CONFIG_H $(pkgconf --cflags tcl) \
|
||||
$(pkgconf --libs tcl) -L ../src -llammps
|
||||
-DHAVE_CONFIG_H $(pkg-config tcl --cflags) \
|
||||
$(pkg-config tcl --libs) -L ../src -llammps
|
||||
|
||||
In both cases it is assumed that the LAMMPS library was compiled
|
||||
as a shared library in the ``src`` folder. Otherwise the last
|
||||
|
||||
@ -71,11 +71,11 @@ all atoms, e.g. in a data or restart file.
|
||||
atom IDs are required, due to how neighbor lists are built.
|
||||
|
||||
The *map* keyword determines how atoms with specific IDs are found
|
||||
when required. An example are the bond (angle, etc) methods which
|
||||
need to find the local index of an atom with a specific global ID
|
||||
which is a bond (angle, etc) partner. LAMMPS performs this operation
|
||||
efficiently by creating a "map", which is either an *array* or *hash*
|
||||
table, as described below.
|
||||
when required. For example, the bond (angle, etc) methods need to
|
||||
find the local index of an atom with a specific global ID which is a
|
||||
bond (angle, etc) partner. LAMMPS performs this operation efficiently
|
||||
by creating a "map", which is either an *array* or *hash* table, as
|
||||
described below.
|
||||
|
||||
When the *map* keyword is not specified in your input script, LAMMPS
|
||||
only creates a map for :doc:`atom_styles <atom_style>` for molecular
|
||||
@ -83,34 +83,39 @@ systems which have permanent bonds (angles, etc). No map is created
|
||||
for atomic systems, since it is normally not needed. However some
|
||||
LAMMPS commands require a map, even for atomic systems, and will
|
||||
generate an error if one does not exist. The *map* keyword thus
|
||||
allows you to force the creation of a map. The *yes* value will
|
||||
create either an *array* or *hash* style map, as explained in the next
|
||||
paragraph. The *array* and *hash* values create an array-style or
|
||||
hash-style map respectively.
|
||||
allows you to force the creation of a map.
|
||||
|
||||
For an *array*\ -style map, each processor stores a lookup table of
|
||||
length N, where N is the largest atom ID in the system. This is a
|
||||
fast, simple method for many simulations, but requires too much memory
|
||||
for large simulations. For a *hash*\ -style map, a hash table is
|
||||
created on each processor, which finds an atom ID in constant time
|
||||
(independent of the global number of atom IDs). It can be slightly
|
||||
slower than the *array* map, but its memory cost is proportional to
|
||||
the number of atoms owned by a processor, i.e. N/P when N is the total
|
||||
number of atoms in the system and P is the number of processors.
|
||||
Specifying a value of *yes* will create either an array-style or
|
||||
hash-style map, depending on the size of the system. If no atom ID is
|
||||
larger than 1 million, then an array-style map is used, otherwise a
|
||||
hash-style map is used. Specifying a value of *array* or *hash*
|
||||
creates an array-style or hash-style map respectively, regardless of
|
||||
the size of the system.
|
||||
|
||||
The *first* keyword allows a :doc:`group <group>` to be specified whose
|
||||
atoms will be maintained as the first atoms in each processor's list
|
||||
of owned atoms. This in only useful when the specified group is a
|
||||
small fraction of all the atoms, and there are other operations LAMMPS
|
||||
is performing that will be sped-up significantly by being able to loop
|
||||
over the smaller set of atoms. Otherwise the reordering required by
|
||||
this option will be a net slow-down. The :doc:`neigh_modify include <neigh_modify>` and :doc:`comm_modify group <comm_modify>`
|
||||
commands are two examples of commands that require this setting to
|
||||
work efficiently. Several :doc:`fixes <fix>`, most notably time
|
||||
integration fixes like :doc:`fix nve <fix_nve>`, also take advantage of
|
||||
this setting if the group they operate on is the group specified by
|
||||
this command. Note that specifying "all" as the group-ID effectively
|
||||
turns off the *first* option.
|
||||
For an array-style map, each processor stores a lookup table of length
|
||||
N, where N is the largest atom ID in the system. This is a fast,
|
||||
simple method for many simulations, but requires too much memory for
|
||||
large simulations. For a hash-style map, a hash table is created on
|
||||
each processor, which finds an atom ID in constant time (independent
|
||||
of the global number of atom IDs). It can be slightly slower than the
|
||||
*array* map, but its memory cost is proportional to the number of
|
||||
atoms owned by a processor, i.e. N/P when N is the total number of
|
||||
atoms in the system and P is the number of processors.
|
||||
|
||||
The *first* keyword allows a :doc:`group <group>` to be specified
|
||||
whose atoms will be maintained as the first atoms in each processor's
|
||||
list of owned atoms. This in only useful when the specified group is
|
||||
a small fraction of all the atoms, and there are other operations
|
||||
LAMMPS is performing that will be sped-up significantly by being able
|
||||
to loop over the smaller set of atoms. Otherwise the reordering
|
||||
required by this option will be a net slow-down. The
|
||||
:doc:`neigh_modify include <neigh_modify>` and :doc:`comm_modify group
|
||||
<comm_modify>` commands are two examples of commands that require this
|
||||
setting to work efficiently. Several :doc:`fixes <fix>`, most notably
|
||||
time integration fixes like :doc:`fix nve <fix_nve>`, also take
|
||||
advantage of this setting if the group they operate on is the group
|
||||
specified by this command. Note that specifying "all" as the group-ID
|
||||
effectively turns off the *first* option.
|
||||
|
||||
It is OK to use the *first* keyword with a group that has not yet been
|
||||
defined, e.g. to use the atom_modify first command at the beginning of
|
||||
@ -148,15 +153,16 @@ cache locality will be undermined.
|
||||
|
||||
.. note::
|
||||
|
||||
Running a simulation with sorting on versus off should not
|
||||
change the simulation results in a statistical sense. However, a
|
||||
different ordering will induce round-off differences, which will lead
|
||||
to diverging trajectories over time when comparing two simulations.
|
||||
Various commands, particularly those which use random numbers
|
||||
(e.g. :doc:`velocity create <velocity>`, and :doc:`fix langevin <fix_langevin>`), may generate (statistically identical)
|
||||
results which depend on the order in which atoms are processed. The
|
||||
order of atoms in a :doc:`dump <dump>` file will also typically change
|
||||
if sorting is enabled.
|
||||
Running a simulation with sorting on versus off should not change
|
||||
the simulation results in a statistical sense. However, a
|
||||
different ordering will induce round-off differences, which will
|
||||
lead to diverging trajectories over time when comparing two
|
||||
simulations. Various commands, particularly those which use random
|
||||
numbers (e.g. :doc:`velocity create <velocity>`, and :doc:`fix
|
||||
langevin <fix_langevin>`), may generate (statistically identical)
|
||||
results which depend on the order in which atoms are processed.
|
||||
The order of atoms in a :doc:`dump <dump>` file will also typically
|
||||
change if sorting is enabled.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -183,12 +189,13 @@ Default
|
||||
|
||||
By default, *id* is yes. By default, atomic systems (no bond topology
|
||||
info) do not use a map. For molecular systems (with bond topology
|
||||
info), a map is used. The default map style is array if no atom ID is
|
||||
larger than 1 million, otherwise the default is hash. By default, a
|
||||
"first" group is not defined. By default, sorting is enabled with a
|
||||
frequency of 1000 and a binsize of 0.0, which means the neighbor
|
||||
cutoff will be used to set the bin size. If no neighbor cutoff is
|
||||
defined, sorting will be turned off.
|
||||
info), the default is to use a map of either *array* or *hash* style
|
||||
depending on the size of the system, as explained above for the *map
|
||||
yes* keyword/value option. By default, a *first* group is not
|
||||
defined. By default, sorting is enabled with a frequency of 1000 and
|
||||
a binsize of 0.0, which means the neighbor cutoff will be used to set
|
||||
the bin size. If no neighbor cutoff is defined, sorting will be turned
|
||||
off.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -189,6 +189,14 @@ the Additional Information section below.
|
||||
- *atomic* + molecule, radius, rmass + "smd data"
|
||||
- :ref:`MACHDYN <PKG-MACHDYN>`
|
||||
- Smooth Mach Dynamics models
|
||||
* - *rheo*
|
||||
- *atomic* + rho, status
|
||||
- :ref:`RHEO <PKG-RHEO>`
|
||||
- solid and fluid RHEO particles
|
||||
* - *rheo/thermal*
|
||||
- *atomic* + rho, status, energy, temperature
|
||||
- :ref:`RHEO <PKG-RHEO>`
|
||||
- RHEO particles with temperature
|
||||
* - *sph*
|
||||
- *atomic* + "sph data"
|
||||
- :ref:`SPH <PKG-SPH>`
|
||||
|
||||
188
doc/src/bond_rheo_shell.rst
Normal file
@ -0,0 +1,188 @@
|
||||
.. index:: bond_style rheo/shell
|
||||
|
||||
bond_style rheo/shell command
|
||||
=============================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
bond_style rheo/shell keyword value attribute1 attribute2 ...
|
||||
|
||||
* required keyword = *t/form*
|
||||
* optional keyword = *store/local*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*t/form* value = formation time for a bond (time units)
|
||||
|
||||
*store/local* values = fix_ID N attributes ...
|
||||
* fix_ID = ID of associated internal fix to store data
|
||||
* N = prepare data for output every this many timesteps
|
||||
* attributes = zero or more of the below attributes may be appended
|
||||
|
||||
*id1, id2* = IDs of 2 atoms in the bond
|
||||
*time* = the timestep the bond broke
|
||||
*x, y, z* = the center of mass position of the 2 atoms when the bond broke (distance units)
|
||||
*x/ref, y/ref, z/ref* = the initial center of mass position of the 2 atoms (distance units)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
bond_style rheo/shell t/form 10.0
|
||||
bond_coeff 1 1.0 0.05 0.1
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
The *rheo/shell* bond style is designed to work with
|
||||
:doc:`fix rheo/oxidation <fix_rheo_oxidation>` which creates candidate
|
||||
bonds between eligible surface or near-surface particles. When a bond
|
||||
is first created, it computes no forces and starts a timer. Forces are
|
||||
not computed until the timer reaches the specified bond formation time,
|
||||
*t/form*, and the bond is enabled and applies forces. If the two particles
|
||||
move outside of the maximum bond distance or move into the bulk before
|
||||
the timer reaches *t/form*, the bond automatically deletes itself. This
|
||||
deletion is not recorded as a broken bond in the optional *store/local* fix.
|
||||
|
||||
Before bonds are enabled, they are still treated as regular bonds by
|
||||
all other parts of LAMMPS. This means they are written to data files
|
||||
and counted in computes such as :doc:`nbond/atom <compute_nbond_atom>`.
|
||||
To only count enabled bonds, use the *nbond/shell* attribute in
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`.
|
||||
|
||||
When enabled, the bond then computes forces based on deviations from
|
||||
the initial reference state of the two atoms much like a BPM style
|
||||
bond (as further discussed in the :doc:`BPM howto page <Howto_bpm>`).
|
||||
The reference state is stored by each bond when it is first enabled.
|
||||
Data is then preserved across run commands and is written to
|
||||
:doc:`binary restart files <restart>` such that restarting the system
|
||||
will not reset the reference state of a bond or the timer.
|
||||
|
||||
This bond style is based on a model described in
|
||||
:ref:`(Clemmer) <rheo_clemmer>`. The force has a magnitude of
|
||||
|
||||
.. math::
|
||||
|
||||
F = 2 k (r - r_0) + \frac{2 k}{r_0^2 \epsilon_c^2} (r - r_0)^3
|
||||
|
||||
where :math:`k` is a stiffness, :math:`r` is the current distance
|
||||
and :math:`r_0` is the initial distance between the two particles, and
|
||||
:math:`\epsilon_c` is maximum strain beyond which a bond breaks. This
|
||||
is done by setting the bond type to 0 such that forces are no longer
|
||||
computed.
|
||||
|
||||
A damping force proportional to the difference in the normal velocity
|
||||
of particles is also applied to bonded particles:
|
||||
|
||||
.. math::
|
||||
|
||||
F_D = - \gamma w (\hat{r} \bullet \vec{v})
|
||||
|
||||
where :math:`\gamma` is the damping strength, :math:`\hat{r}` is the
|
||||
displacement normal vector, and :math:`\vec{v}` is the velocity difference
|
||||
between the two particles.
|
||||
|
||||
The following coefficients must be defined for each bond type via the
|
||||
:doc:`bond_coeff <bond_coeff>` command as in the example above, or in
|
||||
the data file or restart files read by the :doc:`read_data
|
||||
<read_data>` or :doc:`read_restart <read_restart>` commands:
|
||||
|
||||
* :math:`k` (force/distance units)
|
||||
* :math:`\epsilon_c` (unit less)
|
||||
* :math:`\gamma` (force/velocity units)
|
||||
|
||||
Unlike other BPM-style bonds, this bond style does not update special
|
||||
bond settings when bonds are created or deleted. This bond style also
|
||||
does not enforce specific :doc:`special_bonds <special_bonds>` settings.
|
||||
This behavior is purposeful such :doc:`RHEO pair <pair_rheo>` forces
|
||||
and heat flows are still calculated.
|
||||
|
||||
If the *store/local* keyword is used, an internal fix will track bonds that
|
||||
break during the simulation. Whenever a bond breaks, data is processed
|
||||
and transferred to an internal fix labeled *fix_ID*. This allows the
|
||||
local data to be accessed by other LAMMPS commands. Following this optional
|
||||
keyword, a list of one or more attributes is specified. These include the
|
||||
IDs of the two atoms in the bond. The other attributes for the two atoms
|
||||
include the timestep during which the bond broke and the current/initial
|
||||
center of mass position of the two atoms.
|
||||
|
||||
Data is continuously accumulated over intervals of *N*
|
||||
timesteps. At the end of each interval, all of the saved accumulated
|
||||
data is deleted to make room for new data. Individual datum may
|
||||
therefore persist anywhere between *1* to *N* timesteps depending on
|
||||
when they are saved. This data can be accessed using the *fix_ID* and a
|
||||
:doc:`dump local <dump>` command. To ensure all data is output,
|
||||
the dump frequency should correspond to the same interval of *N*
|
||||
timesteps. A dump frequency of an integer multiple of *N* can be used
|
||||
to regularly output a sample of the accumulated data.
|
||||
|
||||
Note that when unbroken bonds are dumped to a file via the
|
||||
:doc:`dump local <dump>` command, bonds with type 0 (broken bonds)
|
||||
are not included.
|
||||
The :doc:`delete_bonds <delete_bonds>` command can also be used to
|
||||
query the status of broken bonds or permanently delete them, e.g.:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
delete_bonds all stats
|
||||
delete_bonds all bond 0 remove
|
||||
|
||||
----------
|
||||
|
||||
Restart and other info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
This bond style writes the reference state of each bond to
|
||||
:doc:`binary restart files <restart>`. Loading a restart
|
||||
file will properly restore bonds. However, the reference state is NOT
|
||||
written to data files. Therefore reading a data file will not
|
||||
restore bonds and will cause their reference states to be redefined.
|
||||
|
||||
If the *store/local* option is used, an internal fix will calculate
|
||||
a local vector or local array depending on the number of input values.
|
||||
The length of the vector or number of rows in the array is the number
|
||||
of recorded, broken bonds. If a single input is specified, a local
|
||||
vector is produced. If two or more inputs are specified, a local array
|
||||
is produced where the number of columns = the number of inputs. The
|
||||
vector or array can be accessed by any command that uses local values
|
||||
from a compute as input. See the :doc:`Howto output <Howto_output>` page
|
||||
for an overview of LAMMPS output options.
|
||||
|
||||
The vector or array will be floating point values that correspond to
|
||||
the specified attribute.
|
||||
|
||||
The single() function of this bond style returns 0.0 for the energy
|
||||
of a bonded interaction, since energy is not conserved in these
|
||||
dissipative potentials. The single() function also calculates two
|
||||
extra bond quantities, the initial distance :math:`r_0` and a time.
|
||||
These extra quantities can be accessed by the
|
||||
:doc:`compute bond/local <compute_bond_local>` command as *b1* and *b2*\ .
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This bond style is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`bond_coeff <bond_coeff>`, :doc:`fix rheo/oxidation <fix_rheo_oxidation>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
NA
|
||||
|
||||
----------
|
||||
|
||||
.. _rheo_clemmer:
|
||||
|
||||
**(Clemmer)** Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
|
||||
@ -105,6 +105,7 @@ accelerated styles exist.
|
||||
* :doc:`oxdna2/fene <bond_oxdna>` - same as oxdna but used with different pair styles
|
||||
* :doc:`oxrna2/fene <bond_oxdna>` - modified FENE bond suitable for RNA modeling
|
||||
* :doc:`quartic <bond_quartic>` - breakable quartic bond
|
||||
* :doc:`rheo/shell <bond_rheo_shell>` - shell bond for oxidation modeling in RHEO
|
||||
* :doc:`special <bond_special>` - enable special bond exclusions for 1-5 pairs and beyond
|
||||
* :doc:`table <bond_table>` - tabulated by bond length
|
||||
|
||||
|
||||
@ -272,6 +272,10 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`pe/mol/tally <compute_tally>` - potential energy between two groups of atoms separated into intermolecular and intramolecular components via the tally callback mechanism
|
||||
* :doc:`pe/tally <compute_tally>` - potential energy between two groups of atoms via the tally callback mechanism
|
||||
* :doc:`plasticity/atom <compute_plasticity_atom>` - Peridynamic plasticity for each atom
|
||||
* :doc:`pod/atom <compute_pod_atom>` - POD descriptors for each atom
|
||||
* :doc:`podd/atom <compute_pod_atom>` - derivative of POD descriptors for each atom
|
||||
* :doc:`pod/local <compute_pod_atom>` - local POD descriptors and their derivatives
|
||||
* :doc:`pod/global <compute_pod_atom>` - global POD descriptors and their derivatives
|
||||
* :doc:`pressure <compute_pressure>` - total pressure and pressure tensor
|
||||
* :doc:`pressure/alchemy <compute_pressure_alchemy>` - mixed system total pressure and pressure tensor for :doc:`fix alchemy <fix_alchemy>` runs
|
||||
* :doc:`pressure/uef <compute_pressure_uef>` - pressure tensor in the reference frame of an applied flow field
|
||||
@ -286,6 +290,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` pag
|
||||
* :doc:`reduce <compute_reduce>` - combine per-atom quantities into a single global value
|
||||
* :doc:`reduce/chunk <compute_reduce_chunk>` - reduce per-atom quantities within each chunk
|
||||
* :doc:`reduce/region <compute_reduce>` - same as compute reduce, within a region
|
||||
* :doc:`rheo/property/atom <compute_rheo_property_atom>` - convert atom attributes in RHEO package to per-atom vectors/arrays
|
||||
* :doc:`rigid/local <compute_rigid_local>` - extract rigid body attributes
|
||||
* :doc:`saed <compute_saed>` - electron diffraction intensity on a mesh of reciprocal lattice nodes
|
||||
* :doc:`slcsa/atom <compute_slcsa_atom>` - perform Supervised Learning Crystal Structure Analysis (SL-CSA)
|
||||
|
||||
@ -8,10 +8,17 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID nbond/atom
|
||||
compute ID group-ID nbond/atom keyword value
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* nbond/atom = style name of this compute command
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *bond/type*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*bond/type* value = *btype*
|
||||
*btype* = bond type included in count
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -19,6 +26,7 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all nbond/atom
|
||||
compute 1 all nbond/atom bond/type 2
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -31,6 +39,9 @@ the :doc:`Howto broken bonds <Howto_bpm>` page for more information.
|
||||
The number of bonds will be zero for atoms not in the specified
|
||||
compute group. This compute does not depend on Newton bond settings.
|
||||
|
||||
If the keyword *bond/type* is specified, only bonds of *btype* are
|
||||
counted.
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
|
||||
145
doc/src/compute_pod_atom.rst
Normal file
@ -0,0 +1,145 @@
|
||||
.. index:: compute pod/atom
|
||||
.. index:: compute podd/atom
|
||||
.. index:: compute pod/local
|
||||
.. index:: compute pod/global
|
||||
|
||||
compute pod/atom command
|
||||
========================
|
||||
|
||||
compute podd/atom command
|
||||
=========================
|
||||
|
||||
compute pod/local command
|
||||
=========================
|
||||
|
||||
compute pod/global command
|
||||
==========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID pod/atom param.pod coefficients.pod
|
||||
compute ID group-ID podd/atom param.pod coefficients.pod
|
||||
compute ID group-ID pod/local param.pod coefficients.pod
|
||||
compute ID group-ID pod/global param.pod coefficients.pod
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* pod/atom = style name of this compute command
|
||||
* param.pod = the parameter file specifies parameters of the POD descriptors
|
||||
* coefficients.pod = the coefficient file specifies coefficients of the POD potential
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute d all pod/atom Ta_param.pod
|
||||
compute dd all podd/atom Ta_param.pod
|
||||
compute ldd all pod/local Ta_param.pod
|
||||
compute gdd all podd/global Ta_param.pod
|
||||
compute d all pod/atom Ta_param.pod Ta_coefficients.pod
|
||||
compute dd all podd/atom Ta_param.pod Ta_coefficients.pod
|
||||
compute ldd all pod/local Ta_param.pod Ta_coefficients.pod
|
||||
compute gdd all podd/global Ta_param.pod Ta_coefficients.pod
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: 27June2024
|
||||
|
||||
Define a computation that calculates a set of quantities related to the
|
||||
POD descriptors of the atoms in a group. These computes are used
|
||||
primarily for calculating the dependence of energy and force components
|
||||
on the linear coefficients in the :doc:`pod pair_style <pair_pod>`,
|
||||
which is useful when training a POD potential to match target data. POD
|
||||
descriptors of an atom are characterized by the radial and angular
|
||||
distribution of neighbor atoms. The detailed mathematical definition is
|
||||
given in the papers by :ref:`(Nguyen and Rohskopf) <Nguyen20222c>`,
|
||||
:ref:`(Nguyen2023) <Nguyen20232c>`, :ref:`(Nguyen2024) <Nguyen20242c>`,
|
||||
and :ref:`(Nguyen and Sema) <Nguyen20243c>`.
|
||||
|
||||
Compute *pod/atom* calculates the per-atom POD descriptors.
|
||||
|
||||
Compute *podd/atom* calculates derivatives of the per-atom POD
|
||||
descriptors with respect to atom positions.
|
||||
|
||||
Compute *pod/local* calculates the per-atom POD descriptors and their
|
||||
derivatives with respect to atom positions.
|
||||
|
||||
Compute *pod/global* calculates the global POD descriptors and their
|
||||
derivatives with respect to atom positions.
|
||||
|
||||
Examples how to use Compute POD commands are found in the directory
|
||||
``examples/PACKAGES/pod``.
|
||||
|
||||
|
||||
.. warning::
|
||||
|
||||
All of these compute styles produce *very* large per-atom output
|
||||
arrays that scale with the total number of atoms in the system.
|
||||
This will result in *very* large memory consumption for systems
|
||||
with a large number of atoms.
|
||||
|
||||
----------
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
Compute *pod/atom* produces an 2D array of size :math:`N \times M`,
|
||||
where :math:`N` is the number of atoms and :math:`M` is the number of
|
||||
descriptors. Each column corresponds to a particular POD descriptor.
|
||||
|
||||
Compute *podd/atom* produces an 2D array of size :math:`N \times (M * 3
|
||||
N)`. Each column corresponds to a particular derivative of a POD
|
||||
descriptor.
|
||||
|
||||
Compute *pod/local* produces an 2D array of size :math:`(1 + 3N) \times
|
||||
(M * N)`. The first row contains the per-atom descriptors, and the last
|
||||
3N rows contain the derivatives of the per-atom descriptors with respect
|
||||
to atom positions.
|
||||
|
||||
Compute *pod/global* produces an 2D array of size :math:`(1 + 3N) \times
|
||||
(M)`. The first row contains the global descriptors, and the last 3N
|
||||
rows contain the derivatives of the global descriptors with respect to
|
||||
atom positions.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
These computes are part of the ML-POD package. They are only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fitpod <fitpod_command>`,
|
||||
:doc:`pair_style pod <pair_pod>`
|
||||
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _Nguyen20222c:
|
||||
|
||||
**(Nguyen and Rohskopf)** Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
|
||||
|
||||
.. _Nguyen20232c:
|
||||
|
||||
**(Nguyen2023)** Nguyen, Physical Review B, 107(14), 144103, (2023).
|
||||
|
||||
.. _Nguyen20242c:
|
||||
|
||||
**(Nguyen2024)** Nguyen, Journal of Computational Physics, 113102, (2024).
|
||||
|
||||
.. _Nguyen20243c:
|
||||
|
||||
**(Nguyen and Sema)** Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
|
||||
|
||||
|
||||
143
doc/src/compute_rheo_property_atom.rst
Normal file
@ -0,0 +1,143 @@
|
||||
.. index:: compute rheo/property/atom
|
||||
|
||||
compute rheo/property/atom command
|
||||
==================================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute ID group-ID rheo/property/atom input1 input2 ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||
* rheo/property/atom = style name of this compute command
|
||||
* input = one or more atom attributes
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
possible attributes = phase, surface, surface/r,
|
||||
surface/divr, surface/n/a, coordination,
|
||||
shift/v/a, energy, temperature, heatflow,
|
||||
conductivity, cv, viscosity, pressure, rho,
|
||||
grad/v/ab, stress/v/ab, stress/t/ab, nbond/shell
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*phase* = atom phase state
|
||||
*surface* = atom surface status
|
||||
*surface/r* = atom distance from the surface
|
||||
*surface/divr* = divergence of position at atom position
|
||||
*surface/n/a* = a-component of surface normal vector
|
||||
*coordination* = coordination number
|
||||
*shift/v/a* = a-component of atom shifting velocity
|
||||
*energy* = atom energy
|
||||
*temperature* = atom temperature
|
||||
*heatflow* = atom heat flow
|
||||
*conductivity* = atom conductivity
|
||||
*cv* = atom specific heat
|
||||
*viscosity* = atom viscosity
|
||||
*pressure* = atom pressure
|
||||
*rho* = atom density
|
||||
*grad/v/ab* = ab-component of atom velocity gradient tensor
|
||||
*stress/v/ab* = ab-component of atom viscous stress tensor
|
||||
*stress/t/ab* = ab-component of atom total stress tensor (pressure and viscous)
|
||||
*nbond/shell* = number of oxide bonds
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute 1 all rheo/property/atom phase surface/r surface/n/* pressure
|
||||
compute 2 all rheo/property/atom shift/v/x grad/v/xx stress/v/*
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
Define a computation that stores atom attributes specific to the RHEO
|
||||
package for each atom in the group. This is useful so that the values
|
||||
can be used by other :doc:`output commands <Howto_output>` that take
|
||||
computes as inputs. See for example, the
|
||||
:doc:`compute reduce <compute_reduce>`,
|
||||
:doc:`fix ave/atom <fix_ave_atom>`,
|
||||
:doc:`fix ave/histo <fix_ave_histo>`,
|
||||
:doc:`fix ave/chunk <fix_ave_chunk>`, and
|
||||
:doc:`atom-style variable <variable>` commands.
|
||||
|
||||
For vector attributes, e.g. *shift/v/*:math:`\alpha`, one must specify
|
||||
:math:`\alpha` as the *x*, *y*, or *z* component, e.g. *shift/v/x*.
|
||||
Alternatively, a wild card \* will include all components, *x* and *y* in
|
||||
2D or *x*, *y*, and *z* in 3D.
|
||||
|
||||
For tensor attributes, e.g. *grad/v/*:math:`\alpha \beta`, one must specify
|
||||
both :math:`\alpha` and :math:`\beta` as *x*, *y*, or *z*, e.g. *grad/v/xy*.
|
||||
Alternatively, a wild card \* will include all components. In 2D, this
|
||||
includes *xx*, *xy*, *yx*, and *yy*. In 3D, this includes *xx*, *xy*, *xz*,
|
||||
*yx*, *yy*, *yz*, *zx*, *zy*, and *zz*.
|
||||
|
||||
Many properties require their respective fixes, listed below in related
|
||||
commands, be defined. For instance, the *viscosity* attribute is the
|
||||
viscosity of a particle calculated by
|
||||
:doc:`fix rheo/viscous <fix_rheo_viscosity>`. The meaning of less obvious
|
||||
properties is described below.
|
||||
|
||||
The *phase* property indicates whether the particle is in a fluid state,
|
||||
a value of 0, or a solid state, a value of 1.
|
||||
|
||||
The *surface* property indicates the surface designation produced by
|
||||
the *interface/reconstruct* option of :doc:`fix rheo <fix_rheo>`. Bulk
|
||||
particles have a value of 0, surface particles have a value of 1, and
|
||||
splash particles have a value of 2. The *surface/r* property is the
|
||||
distance from the surface, up to the kernel cutoff length. Surface particles
|
||||
have a value of 0. The *surface/n/*:math:`\alpha` properties are the
|
||||
components of the surface normal vector.
|
||||
|
||||
The *shift/v/*:math:`\alpha` properties are the components of the shifting
|
||||
velocity produced by the *shift* option of :doc:`fix rheo <fix_rheo>`.
|
||||
|
||||
The *nbond/shell* property is the number of shell bonds that have been
|
||||
activated from :doc:`bond style rheo/shell <bond_rheo_shell>`.
|
||||
|
||||
The values are stored in a per-atom vector or array as discussed
|
||||
below. Zeroes are stored for atoms not in the specified group or for
|
||||
quantities that are not defined for a particular particle in the group
|
||||
|
||||
Output info
|
||||
"""""""""""
|
||||
|
||||
This compute calculates a per-atom vector or per-atom array depending
|
||||
on the number of input values. Generally, if a single input is specified,
|
||||
a per-atom vector is produced. If two or more inputs are specified, a
|
||||
per-atom array is produced where the number of columns = the number of
|
||||
inputs. However, if a wild card \* is used for a vector or tensor, then
|
||||
the number of inputs is considered to be incremented by the dimension or
|
||||
the dimension squared, respectively. The vector or array can be accessed
|
||||
by any command that uses per-atom values from a compute as input. See the
|
||||
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The vector or array values will be in whatever :doc:`units <units>` the
|
||||
corresponding attribute is in (e.g., density units for *rho*).
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
none
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`dump custom <dump>`, :doc:`compute reduce <compute_reduce>`,
|
||||
:doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/chunk <fix_ave_chunk>`,
|
||||
:doc:`fix rheo/viscosity <fix_rheo_viscosity>`,
|
||||
:doc:`fix rheo/pressure <fix_rheo_pressure>`,
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
:doc:`fix rheo/oxdiation <fix_rheo_oxidation>`,
|
||||
:doc:`fix rheo <fix_rheo>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
@ -107,6 +107,13 @@ Syntax
|
||||
|
||||
*checksum* args = *yes* or *no* (add checksum at end of zst file)
|
||||
|
||||
* these keywords apply only to the vtk* dump style
|
||||
* keyword = *binary*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*binary* args = *yes* or *no* (select between binary and text mode VTK files)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
@ -907,11 +914,11 @@ box size stored with the snapshot.
|
||||
|
||||
----------
|
||||
|
||||
The COMPRESS package offers both GZ and Zstd compression variants of
|
||||
styles atom, custom, local, cfg, and xyz. When using these styles the
|
||||
compression level can be controlled by the :code:`compression_level`
|
||||
keyword. File names with these styles have to end in either
|
||||
:code:`.gz` or :code:`.zst`.
|
||||
The :ref:`COMPRESS package <PKG-COMPRESS>` offers both GZ and Zstd
|
||||
compression variants of styles atom, custom, local, cfg, and xyz. When
|
||||
using these styles the compression level can be controlled by the
|
||||
:code:`compression_level` keyword. File names with these styles have to
|
||||
end in either :code:`.gz` or :code:`.zst`.
|
||||
|
||||
GZ supports compression levels from :math:`-1` (default), 0 (no compression),
|
||||
and 1 to 9, 9 being the best compression. The COMPRESS :code:`/gz` styles use 9
|
||||
@ -930,6 +937,17 @@ default and it can be disabled with the :code:`checksum` keyword.
|
||||
|
||||
----------
|
||||
|
||||
The :ref:`VTK package <PKG-VTK>` offers writing dump files in `VTK file
|
||||
formats <https://www.vtk.org/>`_ that can be read by a variety of
|
||||
visualization tools based on the VTK library. These VTK files follow
|
||||
naming conventions that collide with the LAMMPS convention to append
|
||||
".bin" to a file name in order to switch to a binary output. Thus for
|
||||
:doc:`vtk style dumps <dump_vtk>` the dump_modify command supports the
|
||||
keyword *binary* which selects between generating text mode and binary
|
||||
style VTK files.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
.. index:: fitpod
|
||||
|
||||
fitpod command
|
||||
======================
|
||||
==============
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fitpod Ta_param.pod Ta_data.pod
|
||||
fitpod Ta_param.pod Ta_data.pod Ta_coefficients.pod
|
||||
|
||||
* fitpod = style name of this command
|
||||
* Ta_param.pod = an input file that describes proper orthogonal descriptors (PODs)
|
||||
* Ta_data.pod = an input file that specifies DFT data used to fit a POD potential
|
||||
* Ta_coefficients.pod (optional) = an input file that specifies trainable coefficients of a POD potential
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -20,20 +21,26 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fitpod Ta_param.pod Ta_data.pod
|
||||
fitpod Ta_param.pod Ta_data.pod Ta_coefficients.pod
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
.. versionadded:: 22Dec2022
|
||||
|
||||
Fit a machine-learning interatomic potential (ML-IAP) based on proper
|
||||
orthogonal descriptors (POD). Two input files are required for this
|
||||
command. The first input file describes a POD potential parameter
|
||||
settings, while the second input file specifies the DFT data used for
|
||||
the fitting procedure.
|
||||
orthogonal descriptors (POD); please see :ref:`(Nguyen and Rohskopf)
|
||||
<Nguyen20222a>`, :ref:`(Nguyen2023) <Nguyen20232a>`, :ref:`(Nguyen2024)
|
||||
<Nguyen20242a>`, and :ref:`(Nguyen and Sema) <Nguyen20243a>` for details.
|
||||
The fitted POD potential can be used to run MD simulations via
|
||||
:doc:`pair_style pod <pair_pod>`.
|
||||
|
||||
The table below has one-line descriptions of all the keywords that can
|
||||
be used in the first input file (i.e. ``Ta_param.pod`` in the example
|
||||
above):
|
||||
Two input files are required for this command. The first input file
|
||||
describes a POD potential parameter settings, while the second input
|
||||
file specifies the DFT data used for the fitting procedure. All keywords
|
||||
except *species* have default values. If a keyword is not set in the
|
||||
input file, its default value is used. The table below has one-line
|
||||
descriptions of all the keywords that can be used in the first input
|
||||
file (i.e. ``Ta_param.pod``)
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
@ -52,7 +59,7 @@ above):
|
||||
- INT
|
||||
- three integer constants specify boundary conditions
|
||||
* - rin
|
||||
- 1.0
|
||||
- 0.5
|
||||
- REAL
|
||||
- a real number specifies the inner cut-off radius
|
||||
* - rcut
|
||||
@ -60,46 +67,75 @@ above):
|
||||
- REAL
|
||||
- a real number specifies the outer cut-off radius
|
||||
* - bessel_polynomial_degree
|
||||
- 3
|
||||
- 4
|
||||
- INT
|
||||
- the maximum degree of Bessel polynomials
|
||||
* - inverse_polynomial_degree
|
||||
- 6
|
||||
- 8
|
||||
- INT
|
||||
- the maximum degree of inverse radial basis functions
|
||||
* - number_of_environment_clusters
|
||||
- 1
|
||||
- INT
|
||||
- the number of clusters for environment-adaptive potentials
|
||||
* - number_of_principal_components
|
||||
- 2
|
||||
- INT
|
||||
- the number of principal components for dimensionality reduction
|
||||
* - onebody
|
||||
- 1
|
||||
- BOOL
|
||||
- turns on/off one-body potential
|
||||
* - twobody_number_radial_basis_functions
|
||||
- 6
|
||||
- 8
|
||||
- INT
|
||||
- number of radial basis functions for two-body potential
|
||||
* - threebody_number_radial_basis_functions
|
||||
- 5
|
||||
- 6
|
||||
- INT
|
||||
- number of radial basis functions for three-body potential
|
||||
* - threebody_number_angular_basis_functions
|
||||
* - threebody_angular_degree
|
||||
- 5
|
||||
- INT
|
||||
- number of angular basis functions for three-body potential
|
||||
* - fourbody_snap_twojmax
|
||||
- angular degree for three-body potential
|
||||
* - fourbody_number_radial_basis_functions
|
||||
- 4
|
||||
- INT
|
||||
- number of radial basis functions for four-body potential
|
||||
* - fourbody_angular_degree
|
||||
- 3
|
||||
- INT
|
||||
- angular degree for four-body potential
|
||||
* - fivebody_number_radial_basis_functions
|
||||
- 0
|
||||
- INT
|
||||
- band limit for SNAP bispectrum components (0,2,4,6,8... allowed)
|
||||
* - fourbody_snap_chemflag
|
||||
- number of radial basis functions for five-body potential
|
||||
* - fivebody_angular_degree
|
||||
- 0
|
||||
- BOOL
|
||||
- turns on/off the explicit multi-element variant of the SNAP bispectrum components
|
||||
* - quadratic_pod_potential
|
||||
- INT
|
||||
- angular degree for five-body potential
|
||||
* - sixbody_number_radial_basis_functions
|
||||
- 0
|
||||
- BOOL
|
||||
- turns on/off quadratic POD potential
|
||||
- INT
|
||||
- number of radial basis functions for six-body potential
|
||||
* - sixbody_angular_degree
|
||||
- 0
|
||||
- INT
|
||||
- angular degree for six-body potential
|
||||
* - sevenbody_number_radial_basis_functions
|
||||
- 0
|
||||
- INT
|
||||
- number of radial basis functions for seven-body potential
|
||||
* - sevenbody_angular_degree
|
||||
- 0
|
||||
- INT
|
||||
- angular degree for seven-body potential
|
||||
|
||||
Note that both the number of radial basis functions and angular degree
|
||||
must decrease as the body order increases. The next table describes all
|
||||
keywords that can be used in the second input file (i.e. ``Ta_data.pod``
|
||||
in the example above):
|
||||
|
||||
All keywords except *species* have default values. If a keyword is not
|
||||
set in the input file, its default value is used. The next table
|
||||
describes all keywords that can be used in the second input file
|
||||
(i.e. ``Ta_data.pod`` in the example above):
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
@ -125,6 +161,10 @@ describes all keywords that can be used in the second input file
|
||||
- ""
|
||||
- STRING
|
||||
- specifies the path to test data files in double quotes
|
||||
* - path_to_environment_configuration_set
|
||||
- ""
|
||||
- STRING
|
||||
- specifies the path to environment configuration files in double quotes
|
||||
* - fraction_training_data_set
|
||||
- 1.0
|
||||
- REAL
|
||||
@ -133,6 +173,14 @@ describes all keywords that can be used in the second input file
|
||||
- 0
|
||||
- BOOL
|
||||
- turns on/off randomization of the training set
|
||||
* - fraction_test_data_set
|
||||
- 1.0
|
||||
- REAL
|
||||
- a real number (<= 1.0) specifies the fraction of the test set used to validate POD
|
||||
* - randomize_test_data_set
|
||||
- 0
|
||||
- BOOL
|
||||
- turns on/off randomization of the test set
|
||||
* - fitting_weight_energy
|
||||
- 100.0
|
||||
- REAL
|
||||
@ -161,6 +209,10 @@ describes all keywords that can be used in the second input file
|
||||
- 8
|
||||
- INT
|
||||
- number of digits after the decimal points for numbers in the coefficient file
|
||||
* - group_weights
|
||||
- global
|
||||
- STRING
|
||||
- ``table`` uses group weights defined for each group named by filename
|
||||
|
||||
All keywords except *path_to_training_data_set* have default values. If
|
||||
a keyword is not set in the input file, its default value is used. After
|
||||
@ -172,14 +224,44 @@ successful training, a number of output files are produced, if enabled:
|
||||
* ``<basename>_test_analysis.pod`` reports detailed errors for all test configurations
|
||||
* ``<basename>_coefficients.pod`` contains the coefficients of the POD potential
|
||||
|
||||
After training the POD potential, ``Ta_param.pod`` and ``<basename>_coefficients.pod``
|
||||
are the two files needed to use the POD potential in LAMMPS. See
|
||||
:doc:`pair_style pod <pair_pod>` for using the POD potential. Examples
|
||||
about training and using POD potentials are found in the directory
|
||||
lammps/examples/PACKAGES/pod.
|
||||
After training the POD potential, ``Ta_param.pod`` and
|
||||
``<basename>_coefficients.pod`` are the two files needed to use the POD
|
||||
potential in LAMMPS. See :doc:`pair_style pod <pair_pod>` for using the
|
||||
POD potential. Examples about training and using POD potentials are
|
||||
found in the directory lammps/examples/PACKAGES/pod and the Github repo
|
||||
https://github.com/cesmix-mit/pod-examples.
|
||||
|
||||
Parameterized Potential Energy Surface
|
||||
""""""""""""""""""""""""""""""""""""""
|
||||
Loss Function Group Weights
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The *group_weights* keyword in the ``data.pod`` file is responsible for
|
||||
weighting certain groups of configurations in the loss function. For
|
||||
example:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
group_weights table
|
||||
Displaced_A15 100.0 1.0
|
||||
Displaced_BCC 100.0 1.0
|
||||
Displaced_FCC 100.0 1.0
|
||||
Elastic_BCC 100.0 1.0
|
||||
Elastic_FCC 100.0 1.0
|
||||
GSF_110 100.0 1.0
|
||||
GSF_112 100.0 1.0
|
||||
Liquid 100.0 1.0
|
||||
Surface 100.0 1.0
|
||||
Volume_A15 100.0 1.0
|
||||
Volume_BCC 100.0 1.0
|
||||
Volume_FCC 100.0 1.0
|
||||
|
||||
This will apply an energy weight of ``100.0`` and a force weight of
|
||||
``1.0`` for all groups in the ``Ta`` example. The groups are named by
|
||||
their respective filename. If certain groups are left out of this table,
|
||||
then the globally defined weights from the ``fitting_weight_energy`` and
|
||||
``fitting_weight_force`` keywords will be used.
|
||||
|
||||
POD Potential
|
||||
"""""""""""""
|
||||
|
||||
We consider a multi-element system of *N* atoms with :math:`N_{\rm e}`
|
||||
unique elements. We denote by :math:`\boldsymbol r_n` and :math:`Z_n`
|
||||
@ -187,535 +269,82 @@ position vector and type of an atom *n* in the system,
|
||||
respectively. Note that we have :math:`Z_n \in \{1, \ldots, N_{\rm e}
|
||||
\}`, :math:`\boldsymbol R = (\boldsymbol r_1, \boldsymbol r_2, \ldots,
|
||||
\boldsymbol r_N) \in \mathbb{R}^{3N}`, and :math:`\boldsymbol Z = (Z_1,
|
||||
Z_2, \ldots, Z_N) \in \mathbb{N}^{N}`. The potential energy surface
|
||||
(PES) of the system can be expressed as a many-body expansion of the
|
||||
form
|
||||
Z_2, \ldots, Z_N) \in \mathbb{N}^{N}`. The total energy of the
|
||||
POD potential is expressed as :math:`E(\boldsymbol R, \boldsymbol Z) =
|
||||
\sum_{i=1}^N E_i(\boldsymbol R_i, \boldsymbol Z_i)`, where
|
||||
|
||||
.. math::
|
||||
|
||||
E(\boldsymbol R, \boldsymbol Z, \boldsymbol{\eta}, \boldsymbol{\mu}) \ = \ & \sum_{i} V^{(1)}(\boldsymbol r_i, Z_i, \boldsymbol \mu^{(1)} ) + \frac12 \sum_{i,j} V^{(2)}(\boldsymbol r_i, \boldsymbol r_j, Z_i, Z_j, \boldsymbol \eta, \boldsymbol \mu^{(2)}) \\
|
||||
& + \frac16 \sum_{i,j,k} V^{(3)}(\boldsymbol r_i, \boldsymbol r_j, \boldsymbol r_k, Z_i, Z_j, Z_k, \boldsymbol \eta, \boldsymbol \mu^{(3)}) + \ldots
|
||||
|
||||
where :math:`V^{(1)}` is the one-body potential often used for
|
||||
representing external field or energy of isolated elements, and the
|
||||
higher-body potentials :math:`V^{(2)}, V^{(3)}, \ldots` are symmetric,
|
||||
uniquely defined, and zero if two or more indices take identical values.
|
||||
The superscript on each potential denotes its body order. Each *q*-body
|
||||
potential :math:`V^{(q)}` depends on :math:`\boldsymbol \mu^{(q)}` which
|
||||
are sets of parameters to fit the PES. Note that :math:`\boldsymbol \mu`
|
||||
is a collection of all potential parameters :math:`\boldsymbol
|
||||
\mu^{(1)}`, :math:`\boldsymbol \mu^{(2)}`, :math:`\boldsymbol
|
||||
\mu^{(3)}`, etc, and that :math:`\boldsymbol \eta` is a set of
|
||||
hyper-parameters such as inner cut-off radius :math:`r_{\rm in}` and
|
||||
outer cut-off radius :math:`r_{\rm cut}`.
|
||||
|
||||
Interatomic potentials rely on parameters to learn relationship between
|
||||
atomic environments and interactions. Since interatomic potentials are
|
||||
approximations by nature, their parameters need to be set to some
|
||||
reference values or fitted against data by necessity. Typically,
|
||||
potential fitting finds optimal parameters, :math:`\boldsymbol \mu^*`,
|
||||
to minimize a certain loss function of the predicted quantities and
|
||||
data. Since the fitted potential depends on the data set used to fit it,
|
||||
different data sets will yield different optimal parameters and thus
|
||||
different fitted potentials. When fitting the same functional form on
|
||||
*Q* different data sets, we would obtain *Q* different optimized
|
||||
potentials, :math:`E(\boldsymbol R,\boldsymbol Z, \boldsymbol \eta,
|
||||
\boldsymbol \mu_q^*), 1 \le q \le Q`. Consequently, there exist many
|
||||
different sets of optimized parameters for empirical interatomic
|
||||
potentials.
|
||||
|
||||
Instead of optimizing the potential parameters, inspired by the reduced
|
||||
basis method :ref:`(Grepl) <Grepl20072>` for parameterized partial
|
||||
differential equations, we view the parameterized PES as a parametric
|
||||
manifold of potential energies
|
||||
|
||||
.. math::
|
||||
|
||||
\mathcal{M} = \{E(\boldsymbol R, \boldsymbol Z, \boldsymbol \eta, \boldsymbol \mu) \ | \ \boldsymbol \mu \in \Omega^{\boldsymbol \mu} \}
|
||||
|
||||
where :math:`\Omega^{\boldsymbol \mu}` is a parameter domain in which
|
||||
:math:`\boldsymbol \mu` resides. The parametric manifold
|
||||
:math:`\mathcal{M}` contains potential energy surfaces for all values of
|
||||
:math:`\boldsymbol \mu \in \Omega^{\boldsymbol \mu}`. Therefore, the
|
||||
parametric manifold yields a much richer and more transferable atomic
|
||||
representation than any particular individual PES :math:`E(\boldsymbol
|
||||
R, \boldsymbol Z, \boldsymbol \eta, \boldsymbol \mu^*)`.
|
||||
|
||||
We propose specific forms of the parameterized potentials for one-body,
|
||||
two-body, and three-body interactions. We apply the Karhunen-Loeve
|
||||
expansion to snapshots of the parameterized potentials to obtain sets of
|
||||
orthogonal basis functions. These basis functions are aggregated
|
||||
according to the chemical elements of atoms, thus leading to
|
||||
multi-element proper orthogonal descriptors.
|
||||
|
||||
Proper Orthogonal Descriptors
|
||||
"""""""""""""""""""""""""""""
|
||||
|
||||
Proper orthogonal descriptors are finger prints characterizing the
|
||||
radial and angular distribution of a system of atoms. The detailed
|
||||
mathematical definition is given in the paper by Nguyen and Rohskopf
|
||||
:ref:`(Nguyen) <Nguyen20222>`.
|
||||
|
||||
The descriptors for the one-body interaction are used to capture energy
|
||||
of isolated elements and defined as follows
|
||||
|
||||
.. math::
|
||||
|
||||
D_{ip}^{(1)} = \left\{
|
||||
\begin{array}{ll}
|
||||
1, & \mbox{if } Z_i = p \\
|
||||
0, & \mbox{if } Z_i \neq p
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
for :math:`1 \le i \le N, 1 \le p \le N_{\rm e}`. The number of one-body
|
||||
descriptors per atom is equal to the number of elements. The one-body
|
||||
descriptors are independent of atom positions, but dependent on atom
|
||||
types. The one-body descriptors are active only when the keyword
|
||||
*onebody* is set to 1.
|
||||
|
||||
We adopt the usual assumption that the direct interaction between two
|
||||
atoms vanishes smoothly when their distance is greater than the outer
|
||||
cutoff distance :math:`r_{\rm cut}`. Furthermore, we assume that two
|
||||
atoms can not get closer than the inner cutoff distance :math:`r_{\rm
|
||||
in}` due to the Pauli repulsion principle. Let :math:`r \in (r_{\rm in},
|
||||
r_{\rm cut})`, we introduce the following parameterized radial functions
|
||||
|
||||
.. math::
|
||||
|
||||
\phi(r, r_{\rm in}, r_{\rm cut}, \alpha, \beta) = \frac{\sin (\alpha \pi x) }{r - r_{\rm in}}, \qquad \varphi(r, \gamma) = \frac{1}{r^\gamma} ,
|
||||
|
||||
where the scaled distance function :math:`x` is defined below to enrich the two-body manifold
|
||||
|
||||
.. math::
|
||||
|
||||
x(r, r_{\rm in}, r_{\rm cut}, \beta) = \frac{e^{-\beta(r - r_{\rm in})/(r_{\rm cut} - r_{\rm in})} - 1}{e^{-\beta} - 1} .
|
||||
|
||||
We introduce the following function as a convex combination of the two functions
|
||||
|
||||
.. math::
|
||||
|
||||
\psi(r, r_{\rm in}, r_{\rm cut}, \alpha, \beta, \gamma, \kappa) = \kappa \phi(r, r_{\rm in}, r_{\rm cut}, \alpha, \beta) + (1- \kappa) \varphi(r, \gamma) .
|
||||
|
||||
We see that :math:`\psi` is a function of distance :math:`r`, cut-off
|
||||
distances :math:`r_{\rm in}` and :math:`r_{\rm cut}`, and parameters
|
||||
:math:`\alpha, \beta, \gamma, \kappa`. Together these parameters allow
|
||||
the function :math:`\psi` to characterize a diverse spectrum of two-body
|
||||
interactions within the cut-off interval :math:`(r_{\rm in}, r_{\rm
|
||||
cut})`.
|
||||
|
||||
Next, we introduce the following parameterized potential
|
||||
|
||||
.. math::
|
||||
|
||||
W^{(2)}(r_{ij}, \boldsymbol \eta, \boldsymbol \mu^{(2)}) = f_{\rm c}(r_{ij}, \boldsymbol \eta) \psi(r_{ij}, \boldsymbol \eta, \boldsymbol \mu^{(2)})
|
||||
|
||||
where :math:`\eta_1 = r_{\rm in}, \eta_2 = r_{\rm cut}, \mu_1^{(2)} =
|
||||
\alpha, \mu_2^{(2)} = \beta, \mu_3^{(2)} = \gamma`, and
|
||||
:math:`\mu_4^{(2)} = \kappa`. Here the cut-off function :math:`f_{\rm
|
||||
c}(r_{ij}, \boldsymbol \eta)` proposed in [refs] is used to ensure the
|
||||
smooth vanishing of the potential and its derivative for :math:`r_{ij}
|
||||
\ge r_{\rm cut}`:
|
||||
|
||||
.. math::
|
||||
|
||||
f_{\rm c}(r_{ij}, r_{\rm in}, r_{\rm cut}) = \exp \left(1 -\frac{1}{\sqrt{\left(1 - \frac{(r-r_{\rm in})^3}{(r_{\rm cut} - r_{\rm in})^3} \right)^2 + 10^{-6}}} \right)
|
||||
|
||||
Based on the parameterized potential, we form a set of snapshots as
|
||||
follows. We assume that we are given :math:`N_{\rm s}` parameter tuples
|
||||
:math:`\boldsymbol \mu^{(2)}_\ell, 1 \le \ell \le N_{\rm s}`. We
|
||||
introduce the following set of snapshots on :math:`(r_{\rm in}, r_{\rm
|
||||
cut})`:
|
||||
|
||||
.. math::
|
||||
|
||||
\xi_\ell(r_{ij}, \boldsymbol \eta) = W^{(2)}(r_{ij}, \boldsymbol \eta, \boldsymbol \mu^{(2)}_\ell), \quad \ell = 1, \ldots, N_{\rm s} .
|
||||
|
||||
To ensure adequate sampling of the PES for different parameters, we
|
||||
choose :math:`N_{\rm s}` parameter points :math:`\boldsymbol
|
||||
\mu^{(2)}_\ell = (\alpha_\ell, \beta_\ell, \gamma_\ell, \kappa_\ell), 1
|
||||
\le \ell \le N_{\rm s}` as follows. The parameters :math:`\alpha \in [1,
|
||||
N_\alpha]` and :math:`\gamma \in [1, N_\gamma]` are integers, where
|
||||
:math:`N_\alpha` and :math:`N_\gamma` are the highest degrees for
|
||||
:math:`\alpha` and :math:`\gamma`, respectively. We next choose
|
||||
:math:`N_\beta` different values of :math:`\beta` in the interval
|
||||
:math:`[\beta_{\min}, \beta_{\max}]`, where :math:`\beta_{\min} = 0` and
|
||||
:math:`\beta_{\max} = 4`. The parameter :math:`\kappa` can be set either
|
||||
0 or 1. Hence, the total number of parameter points is :math:`N_{\rm s}
|
||||
= N_\alpha N_\beta + N_\gamma`. Although :math:`N_\alpha, N_\beta,
|
||||
N_\gamma` can be chosen conservatively large, we find that
|
||||
:math:`N_\alpha = 6, N_\beta = 3, N_\gamma = 8` are adequate for most
|
||||
problems. Note that :math:`N_\alpha` and :math:`N_\gamma` correspond to
|
||||
*bessel_polynomial_degree* and *inverse_polynomial_degree*,
|
||||
respectively.
|
||||
|
||||
We employ the Karhunen-Loeve (KL) expansion to generate an orthogonal
|
||||
basis set which is known to be optimal for representation of the
|
||||
snapshot family :math:`\{\xi_\ell\}_{\ell=1}^{N_{\rm s}}`. The two-body
|
||||
orthogonal basis functions are computed as follows
|
||||
|
||||
.. math::
|
||||
|
||||
U^{(2)}_m(r_{ij}, \boldsymbol \eta) = \sum_{\ell = 1}^{N_{\rm s}} A_{\ell m}(\boldsymbol \eta) \, \xi_\ell(r_{ij}, \boldsymbol \eta), \qquad m = 1, \ldots, N_{\rm 2b} ,
|
||||
|
||||
where the matrix :math:`\boldsymbol A \in \mathbb{R}^{N_{\rm s} \times
|
||||
N_{\rm s}}` consists of eigenvectors of the eigenvalue problem
|
||||
|
||||
.. math::
|
||||
|
||||
\boldsymbol C \boldsymbol a = \lambda \boldsymbol a
|
||||
|
||||
with the entries of :math:`\boldsymbol C \in \mathbb{R}^{N_{\rm s} \times N_{\rm s}}` being given by
|
||||
|
||||
.. math::
|
||||
|
||||
C_{ij} = \frac{1}{N_{\rm s}} \int_{r_{\rm in}}^{r_{\rm cut}} \xi_i(x, \boldsymbol \eta) \xi_j(x, \boldsymbol \eta) dx, \quad 1 \le i, j \le N_{\rm s}
|
||||
|
||||
Note that the eigenvalues :math:`\lambda_\ell, 1 \le \ell \le N_{\rm
|
||||
s}`, are ordered such that :math:`\lambda_1 \ge \lambda_2 \ge \ldots \ge
|
||||
\lambda_{N_{\rm s}}`, and that the matrix :math:`\boldsymbol A` is
|
||||
pe-computed and stored for any given :math:`\boldsymbol \eta`. Owing to
|
||||
the rapid convergence of the KL expansion, only a small number of
|
||||
orthogonal basis functions is needed to obtain accurate
|
||||
approximation. The value of :math:`N_{\rm 2b}` corresponds to
|
||||
*twobody_number_radial_basis_functions*.
|
||||
|
||||
The two-body proper orthogonal descriptors at each atom *i* are computed
|
||||
by summing the orthogonal basis functions over the neighbors of atom *i*
|
||||
and numerating on the atom types as follows
|
||||
|
||||
.. math::
|
||||
|
||||
D^{(2)}_{im l(p, q) }(\boldsymbol \eta) = \left\{
|
||||
\begin{array}{ll}
|
||||
\displaystyle \sum_{\{j | Z_j = q\}} U^{(2)}_m(r_{ij}, \boldsymbol \eta), & \mbox{if } Z_i = p \\
|
||||
0, & \mbox{if } Z_i \neq p
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
for :math:`1 \le i \le N, 1 \le m \le N_{\rm 2b}, 1 \le q, p \le N_{\rm
|
||||
e}`. Here :math:`l(p,q)` is a symmetric index mapping such that
|
||||
|
||||
.. math::
|
||||
|
||||
l(p,q) = \left\{
|
||||
\begin{array}{ll}
|
||||
q + (p-1) N_{\rm e} - p(p-1)/2, & \mbox{if } q \ge p \\
|
||||
p + (q-1) N_{\rm e} - q(q-1)/2, & \mbox{if } q < p .
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
The number of two-body descriptors per atom is thus :math:`N_{\rm 2b}
|
||||
N_{\rm e}(N_{\rm e}+1)/2`.
|
||||
|
||||
It is important to note that the orthogonal basis functions do not
|
||||
depend on the atomic numbers :math:`Z_i` and :math:`Z_j`. Therefore, the
|
||||
cost of evaluating the basis functions and their derivatives with
|
||||
respect to :math:`r_{ij}` is independent of the number of elements
|
||||
:math:`N_{\rm e}`. Consequently, even though the two-body proper
|
||||
orthogonal descriptors depend on :math:`\boldsymbol Z`, their
|
||||
computational complexity is independent of :math:`N_{\rm e}`.
|
||||
|
||||
In order to provide proper orthogonal descriptors for three-body
|
||||
interactions, we need to introduce a three-body parameterized
|
||||
potential. In particular, the three-body potential is defined as a
|
||||
product of radial and angular functions as follows
|
||||
|
||||
.. math::
|
||||
|
||||
W^{(3)}(r_{ij}, r_{ik}, \theta_{ijk}, \boldsymbol \eta, \boldsymbol \mu^{(3)}) = \psi(r_{ij}, r_{\rm min}, r_{\rm max}, \alpha, \beta, \gamma, \kappa) f_{\rm c}(r_{ij}, r_{\rm min}, r_{\rm max}) \\
|
||||
\psi(r_{ik}, r_{\rm min}, r_{\rm max}, \alpha, \beta, \gamma, \kappa) f_{\rm c}(r_{ik}, r_{\rm min}, r_{\rm max}) \\
|
||||
\cos (\sigma \theta_{ijk} + \zeta)
|
||||
|
||||
where :math:`\sigma` is the periodic multiplicity, :math:`\zeta` is the
|
||||
equilibrium angle, :math:`\boldsymbol \mu^{(3)} = (\alpha, \beta,
|
||||
\gamma, \kappa, \sigma, \zeta)`. The three-body potential provides an
|
||||
angular fingerprint of the atomic environment through the bond angles
|
||||
:math:`\theta_{ijk}` formed with each pair of neighbors :math:`j` and
|
||||
:math:`k`. Compared to the two-body potential, the three-body potential
|
||||
has two extra parameters :math:`(\sigma, \zeta)` associated with the
|
||||
angular component.
|
||||
|
||||
Let :math:`\boldsymbol \varrho = (\alpha, \beta, \gamma, \kappa)`. We
|
||||
assume that we are given :math:`L_{\rm r}` parameter tuples
|
||||
:math:`\boldsymbol \varrho_\ell, 1 \le \ell \le L_{\rm r}`. We
|
||||
introduce the following set of snapshots on :math:`(r_{\min},
|
||||
r_{\max})`:
|
||||
|
||||
.. math::
|
||||
|
||||
\zeta_\ell(r_{ij}, r_{\rm min}, r_{\rm max} ) = \psi(r_{ij}, r_{\rm min}, r_{\rm max}, \boldsymbol \varrho_\ell) f_{\rm c}(r_{ij}, r_{\rm min}, r_{\rm max}), \quad 1 \le \ell \le L_{\rm r} .
|
||||
|
||||
We apply the Karhunen-Loeve (KL) expansion to this set of snapshots to
|
||||
obtain orthogonal basis functions as follows
|
||||
|
||||
.. math::
|
||||
|
||||
U^{r}_m(r_{ij}, r_{\rm min}, r_{\rm max} ) = \sum_{\ell = 1}^{L_{\rm r}} A_{\ell m} \, \zeta_\ell(r_{ij}, r_{\rm min}, r_{\rm max} ), \qquad m = 1, \ldots, N_{\rm r} ,
|
||||
|
||||
where the matrix :math:`\boldsymbol A \in \mathbb{R}^{L_{\rm r} \times L_{\rm r}}` consists
|
||||
of eigenvectors of the eigenvalue problem. For the parameterized angular function,
|
||||
we consider angular basis functions
|
||||
|
||||
.. math::
|
||||
|
||||
U^{a}_n(\theta_{ijk}) = \cos ((n-1) \theta_{ijk}), \qquad n = 1,\ldots, N_{\rm a},
|
||||
|
||||
where :math:`N_{\rm a}` is the number of angular basis functions. The orthogonal
|
||||
basis functions for the parameterized potential are computed as follows
|
||||
|
||||
.. math::
|
||||
|
||||
U^{(3)}_{mn}(r_{ij}, r_{ik}, \theta_{ijk}, \boldsymbol \eta) = U^{r}_m(r_{ij}, \boldsymbol \eta) U^{r}_m(r_{ik}, \boldsymbol \eta) U^{a}_n(\theta_{ijk}),
|
||||
|
||||
for :math:`1 \le m \le N_{\rm r}, 1 \le n \le N_{\rm a}`. The number of three-body
|
||||
orthogonal basis functions is equal to :math:`N_{\rm 3b} = N_{\rm r} N_{\rm a}` and
|
||||
independent of the number of elements. The value of :math:`N_{\rm r}` corresponds to
|
||||
*threebody_number_radial_basis_functions*, while that of :math:`N_{\rm a}` to
|
||||
*threebody_number_angular_basis_functions*.
|
||||
|
||||
The three-body proper orthogonal descriptors at each atom *i*
|
||||
are obtained by summing over the neighbors *j* and *k* of atom *i* as
|
||||
|
||||
.. math::
|
||||
|
||||
D^{(3)}_{imn \ell(p, q, s)}(\boldsymbol \eta) = \left\{
|
||||
\begin{array}{ll}
|
||||
\displaystyle \sum_{\{j | Z_j = q\}} \sum_{\{k | Z_k = s\}} U^{(3)}_{mn}(r_{ij}, r_{ik}, \theta_{ijk}, \boldsymbol \eta), & \mbox{if } Z_i = p \\
|
||||
0, & \mbox{if } Z_i \neq p
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
for :math:`1 \le i \le N, 1 \le m \le N_{\rm r}, 1 \le n \le N_{\rm a}, 1 \le q, p, s \le N_{\rm e}`,
|
||||
where
|
||||
|
||||
.. math::
|
||||
|
||||
\ell(p,q,s) = \left\{
|
||||
\begin{array}{ll}
|
||||
s + (q-1) N_{\rm e} - q(q-1)/2 + (p-1)N_{\rm e}(1+N_{\rm e})/2 , & \mbox{if } s \ge q \\
|
||||
q + (s-1) N_{\rm e} - s(s-1)/2 + (p-1)N_{\rm e}(1+N_{\rm e})/2, & \mbox{if } s < q .
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
The number of three-body descriptors per atom is thus :math:`N_{\rm 3b} N_{\rm e}^2(N_{\rm e}+1)/2`.
|
||||
While the number of three-body PODs is cubic function of the number of elements,
|
||||
the computational complexity of the three-body PODs is independent of the number of elements.
|
||||
|
||||
Four-Body SNAP Descriptors
|
||||
""""""""""""""""""""""""""
|
||||
|
||||
In addition to the proper orthogonal descriptors described above, we also employ
|
||||
the spectral neighbor analysis potential (SNAP) descriptors. SNAP uses bispectrum components
|
||||
to characterize the local neighborhood of each atom in a very general way. The mathematical definition
|
||||
of the bispectrum calculation and its derivatives w.r.t. atom positions is described in
|
||||
:doc:`compute snap <compute_sna_atom>`. In SNAP, the
|
||||
total energy is decomposed into a sum over atom energies. The energy of
|
||||
atom *i* is expressed as a weighted sum over bispectrum components.
|
||||
|
||||
.. math::
|
||||
|
||||
E_i^{\rm SNAP} = \sum_{k=1}^{N_{\rm 4b}} \sum_{p=1}^{N_{\rm e}} c_{kp}^{(4)} D_{ikp}^{(4)}
|
||||
|
||||
|
||||
where the SNAP descriptors are related to the bispectrum components by
|
||||
|
||||
.. math::
|
||||
|
||||
D^{(4)}_{ikp} = \left\{
|
||||
\begin{array}{ll}
|
||||
\displaystyle B_{ik}, & \mbox{if } Z_i = p \\
|
||||
0, & \mbox{if } Z_i \neq p
|
||||
\end{array}
|
||||
\right.
|
||||
|
||||
Here :math:`B_{ik}` is the *k*\ -th bispectrum component of atom *i*. The number of
|
||||
bispectrum components :math:`N_{\rm 4b}` depends on the value of *fourbody_snap_twojmax* :math:`= 2 J_{\rm max}`
|
||||
and *fourbody_snap_chemflag*. If *fourbody_snap_chemflag* = 0
|
||||
then :math:`N_{\rm 4b} = (J_{\rm max}+1)(J_{\rm max}+2)(J_{\rm max}+1.5)/3`.
|
||||
If *fourbody_snap_chemflag* = 1 then :math:`N_{\rm 4b} = N_{\rm e}^3 (J_{\rm max}+1)(J_{\rm max}+2)(J_{\rm max}+1.5)/3`.
|
||||
The bispectrum calculation is described in more detail in :doc:`compute sna/atom <compute_sna_atom>`.
|
||||
|
||||
Linear Proper Orthogonal Descriptor Potentials
|
||||
""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
The proper orthogonal descriptors and SNAP descriptors are used to define the atomic energies
|
||||
in the following expansion
|
||||
|
||||
.. math::
|
||||
|
||||
E_{i}(\boldsymbol \eta) = \sum_{p=1}^{N_{\rm e}} c^{(1)}_p D^{(1)}_{ip} + \sum_{m=1}^{N_{\rm 2b}} \sum_{l=1}^{N_{\rm e}(N_{\rm e}+1)/2} c^{(2)}_{ml} D^{(2)}_{iml}(\boldsymbol \eta) + \sum_{m=1}^{N_{\rm r}} \sum_{n=1}^{N_{\rm a}} \sum_{\ell=1}^{N_{\rm e}^2(N_{\rm e}+1)/2} c^{(3)}_{mn\ell} D^{(3)}_{imn\ell}(\boldsymbol \eta) + \sum_{k=1}^{N_{\rm 4b}} \sum_{p=1}^{N_{\rm e}} c_{kp}^{(4)} D_{ikp}^{(4)}(\boldsymbol \eta),
|
||||
|
||||
where :math:`D^{(1)}_{ip}, D^{(2)}_{iml}, D^{(3)}_{imn\ell}, D^{(4)}_{ikp}` are the one-body, two-body, three-body, four-body descriptors,
|
||||
respectively, and :math:`c^{(1)}_p, c^{(2)}_{ml}, c^{(3)}_{mn\ell}, c^{(4)}_{kp}` are their respective expansion
|
||||
coefficients. In a more compact notation that implies summation over descriptor indices
|
||||
the atomic energies can be written as
|
||||
|
||||
.. math::
|
||||
|
||||
E_i(\boldsymbol \eta) = \sum_{m=1}^{N_{\rm e}} c^{(1)}_m D^{(1)}_{im} + \sum_{m=1}^{N_{\rm d}^{(2)}} c^{(2)}_k D^{(2)}_{im} + \sum_{m=1}^{N_{\rm d}^{(3)}} c^{(3)}_m D^{(3)}_{im} + \sum_{m=1}^{N_{\rm d}^{(4)}} c^{(4)}_m D^{(4)}_{im}
|
||||
|
||||
where :math:`N_{\rm d}^{(2)} = N_{\rm 2b} N_{\rm e} (N_{\rm e}+1)/2`,
|
||||
:math:`N_{\rm d}^{(3)} = N_{\rm 3b} N_{\rm e}^2 (N_{\rm e}+1)/2`, and
|
||||
:math:`N_{\rm d}^{(4)} = N_{\rm 4b} N_{\rm e}` are
|
||||
the number of two-body, three-body, and four-body descriptors, respectively.
|
||||
|
||||
The potential energy is then obtained by summing local atomic energies :math:`E_i`
|
||||
for all atoms :math:`i` in the system
|
||||
|
||||
.. math::
|
||||
|
||||
E(\boldsymbol \eta) = \sum_{i}^N E_{i}(\boldsymbol \eta)
|
||||
|
||||
Because the descriptors are one-body, two-body, and three-body terms,
|
||||
the resulting POD potential is a three-body PES. We can express the potential
|
||||
energy as a linear combination of the global descriptors as follows
|
||||
|
||||
.. math::
|
||||
|
||||
E(\boldsymbol \eta) = \sum_{m=1}^{N_{\rm e}} c^{(1)}_m d^{(1)}_{m} + \sum_{m=1}^{N_{\rm d}^{(2)}} c^{(2)}_m d^{(2)}_{m} + \sum_{m=1}^{N_{\rm d}^{(3)}} c^{(3)}_m d^{(3)}_{m} + \sum_{m=1}^{N_{\rm d}^{(4)}} c^{(4)}_m d^{(4)}_{m}
|
||||
|
||||
where the global descriptors are given by
|
||||
|
||||
.. math::
|
||||
|
||||
d_{m}^{(1)}(\boldsymbol \eta) = \sum_{i=1}^N D_{im}^{(1)}(\boldsymbol \eta), \quad d_{m}^{(2)}(\boldsymbol \eta) = \sum_{i=1}^N D_{im}^{(2)}(\boldsymbol \eta), \quad d_{m}^{(3)}(\boldsymbol \eta) = \sum_{i=1}^N D_{im}^{(3)}(\boldsymbol \eta), \quad d_{m}^{(4)}(\boldsymbol \eta) = \sum_{i=1}^N D_{im}^{(4)}(\boldsymbol \eta)
|
||||
|
||||
Hence, we obtain the atomic forces as
|
||||
|
||||
.. math::
|
||||
|
||||
\boldsymbol F = -\nabla E(\boldsymbol \eta) = - \sum_{m=1}^{N_{\rm d}^{(2)}} c^{(2)}_m \nabla d_m^{(2)} - \sum_{m=1}^{N_{\rm d}^{(3)}} c^{(3)}_m \nabla d_m^{(3)} - \sum_{m=1}^{N_{\rm d}^{(4)}} c^{(4)}_m \nabla d_m^{(4)}
|
||||
|
||||
where :math:`\nabla d_m^{(2)}`, :math:`\nabla d_m^{(3)}` and :math:`\nabla d_m^{(4)}` are derivatives of the two-body
|
||||
three-body, and four-body global descriptors with respect to atom positions, respectively.
|
||||
Note that since the first-body global descriptors are constant, their derivatives are zero.
|
||||
|
||||
Quadratic Proper Orthogonal Descriptor Potentials
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
We recall two-body PODs :math:`D^{(2)}_{ik}, 1 \le k \le N_{\rm d}^{(2)}`,
|
||||
and three-body PODs :math:`D^{(3)}_{im}, 1 \le m \le N_{\rm d}^{(3)}`,
|
||||
with :math:`N_{\rm d}^{(2)} = N_{\rm 2b} N_{\rm e} (N_{\rm e}+1)/2` and
|
||||
:math:`N_{\rm d}^{(3)} = N_{\rm 3b} N_{\rm e}^2 (N_{\rm e}+1)/2` being
|
||||
the number of descriptors per atom for the two-body PODs and three-body PODs,
|
||||
respectively. We employ them to define a new set of atomic descriptors as follows
|
||||
|
||||
.. math::
|
||||
|
||||
D^{(2*3)}_{ikm} = \frac{1}{2N}\left( D^{(2)}_{ik} \sum_{j=1}^N D^{(3)}_{jm} + D^{(3)}_{im} \sum_{j=1}^N D^{(2)}_{jk} \right)
|
||||
|
||||
for :math:`1 \le i \le N, 1 \le k \le N_{\rm d}^{(2)}, 1 \le m \le N_{\rm d}^{(3)}`.
|
||||
The new descriptors are four-body because they involve central atom :math:`i` together
|
||||
with three neighbors :math:`j, k` and :math:`l`. The total number of new descriptors per atom is equal to
|
||||
|
||||
.. math::
|
||||
|
||||
N_{\rm d}^{(2*3)} = N_{\rm d}^{(2)} * N_{\rm d}^{(3)} = N_{\rm 2b} N_{\rm 3b} N_{\rm e}^3 (N_{\rm e}+1)^2/4 .
|
||||
|
||||
The new global descriptors are calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
d^{(2*3)}_{km} = \sum_{i=1}^N D^{(2*3)}_{ikm} = \left( \sum_{i=1}^N D^{(2)}_{ik} \right) \left( \sum_{i=1}^N D^{(3)}_{im} \right) = d^{(2)}_{k} d^{(3)}_m,
|
||||
|
||||
for :math:`1 \le k \le N_{\rm d}^{(2)}, 1 \le m \le N_{\rm d}^{(3)}`. Hence, the gradient
|
||||
of the new global descriptors with respect to atom positions is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
\nabla d^{(2*3)}_{km} = d^{(3)}_m \nabla d^{(2)}_{k} + d^{(2)}_{k} \nabla d^{(3)}_m, \quad 1 \le k \le N_{\rm d}^{(2)}, 1 \le m \le N_{\rm d}^{(3)} .
|
||||
|
||||
The quadratic POD potential is defined as a linear combination of the
|
||||
original and new global descriptors as follows
|
||||
|
||||
.. math::
|
||||
|
||||
E^{(2*3)} = \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} c^{(2*3)}_{km} d^{(2*3)}_{km} .
|
||||
|
||||
It thus follows that
|
||||
|
||||
.. math::
|
||||
|
||||
E^{(2*3)} = 0.5 \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} \left( \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} c^{(2*3)}_{km} d_m^{(3)} \right) d_k^{(2)} + 0.5 \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} \left( \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} c^{(2*3)}_{km} d_k^{(2)} \right) d_m^{(3)} ,
|
||||
|
||||
which is simplified to
|
||||
|
||||
.. math::
|
||||
|
||||
E^{(2*3)} = 0.5 \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} b_k^{(2)} d_k^{(2)} + 0.5 \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} b_m^{(3)} d_m^{(3)}
|
||||
|
||||
where
|
||||
|
||||
.. math::
|
||||
|
||||
b_k^{(2)} & = \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} c^{(2*3)}_{km} d_m^{(3)}, \quad k = 1,\ldots, N_{\rm 2d}^{(2*3)}, \\
|
||||
b_m^{(3)} & = \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} c^{(2*3)}_{km} d_k^{(2)}, \quad m = 1,\ldots, N_{\rm 3d}^{(2*3)} .
|
||||
|
||||
The quadratic POD potential results in the following atomic forces
|
||||
|
||||
.. math::
|
||||
|
||||
\boldsymbol F^{(2*3)} = - \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} c^{(2*3)}_{km} \nabla d^{(2*3)}_{km} .
|
||||
|
||||
It can be shown that
|
||||
|
||||
.. math::
|
||||
|
||||
\boldsymbol F^{(2*3)} = - \sum_{k=1}^{N_{\rm 2d}^{(2*3)}} b^{(2)}_k \nabla d_k^{(2)} - \sum_{m=1}^{N_{\rm 3d}^{(2*3)}} b^{(3)}_m \nabla d_m^{(3)} .
|
||||
|
||||
The calculation of the atomic forces for the quadratic POD potential
|
||||
only requires the extra calculation of :math:`b_k^{(2)}` and :math:`b_m^{(3)}` which can be negligible.
|
||||
As a result, the quadratic POD potential does not increase the computational complexity.
|
||||
|
||||
E_i(\boldsymbol R_i, \boldsymbol Z_i) \ = \ \sum_{m=1}^M c_m \mathcal{D}_{im}(\boldsymbol R_i, \boldsymbol Z_i)
|
||||
|
||||
|
||||
Here :math:`c_m` are trainable coefficients and
|
||||
:math:`\mathcal{D}_{im}(\boldsymbol R_i, \boldsymbol Z_i)` are per-atom
|
||||
POD descriptors. Summing the per-atom descriptors over :math:`i` yields
|
||||
the global descriptors :math:`d_m(\boldsymbol R, \boldsymbol Z) =
|
||||
\sum_{i=1}^N \mathcal{D}_{im}(\boldsymbol R_i, \boldsymbol Z_i)`. It
|
||||
thus follows that :math:`E(\boldsymbol R, \boldsymbol Z) = \sum_{m=1}^M
|
||||
c_m d_m(\boldsymbol R, \boldsymbol Z)`.
|
||||
|
||||
The per-atom POD descriptors include one, two, three, four, five, six,
|
||||
and seven-body descriptors, which can be specified in the first input
|
||||
file. Furthermore, the per-atom POD descriptors also depend on the
|
||||
number of environment clusters specified in the first input file.
|
||||
Please see :ref:`(Nguyen2024) <Nguyen20242a>` and :ref:`(Nguyen and Sema)
|
||||
<Nguyen20243a>` for the detailed description of the per-atom POD
|
||||
descriptors.
|
||||
|
||||
Training
|
||||
""""""""
|
||||
|
||||
POD potentials are trained using the least-squares regression against
|
||||
A POD potential is trained using the least-squares regression against
|
||||
density functional theory (DFT) data. Let :math:`J` be the number of
|
||||
training configurations, with :math:`N_j` being the number of atoms in
|
||||
the j-th configuration. Let :math:`\{E^{\star}_j\}_{j=1}^{J}` and
|
||||
:math:`\{\boldsymbol F^{\star}_j\}_{j=1}^{J}` be the DFT energies and
|
||||
forces for :math:`J` configurations. Next, we calculate the global
|
||||
descriptors and their derivatives for all training configurations. Let
|
||||
:math:`d_{jm}, 1 \le m \le M`, be the global descriptors associated with
|
||||
the j-th configuration, where :math:`M` is the number of global
|
||||
descriptors. We then form a matrix :math:`\boldsymbol A \in
|
||||
\mathbb{R}^{J \times M}` with entries :math:`A_{jm} = d_{jm}/ N_j` for
|
||||
:math:`j=1,\ldots,J` and :math:`m=1,\ldots,M`. Moreover, we form a
|
||||
matrix :math:`\boldsymbol B \in \mathbb{R}^{\mathcal{N} \times M}` by
|
||||
stacking the derivatives of the global descriptors for all training
|
||||
configurations from top to bottom, where :math:`\mathcal{N} =
|
||||
3\sum_{j=1}^{J} N_j`.
|
||||
the j-th configuration. The training configurations are extracted from
|
||||
the extended XYZ files located in a directory (i.e.,
|
||||
path_to_training_data_set in the second input file). Let
|
||||
:math:`\{E^{\star}_j\}_{j=1}^{J}` and :math:`\{\boldsymbol
|
||||
F^{\star}_j\}_{j=1}^{J}` be the DFT energies and forces for :math:`J`
|
||||
configurations. Next, we calculate the global descriptors and their
|
||||
derivatives for all training configurations. Let :math:`d_{jm}, 1 \le m
|
||||
\le M`, be the global descriptors associated with the j-th
|
||||
configuration, where :math:`M` is the number of global descriptors. We
|
||||
then form a matrix :math:`\boldsymbol A \in \mathbb{R}^{J \times M}`
|
||||
with entries :math:`A_{jm} = d_{jm}/ N_j` for :math:`j=1,\ldots,J` and
|
||||
:math:`m=1,\ldots,M`. Moreover, we form a matrix :math:`\boldsymbol B
|
||||
\in \mathbb{R}^{\mathcal{N} \times M}` by stacking the derivatives of
|
||||
the global descriptors for all training configurations from top to
|
||||
bottom, where :math:`\mathcal{N} = 3\sum_{j=1}^{J} N_j`.
|
||||
|
||||
The coefficient vector :math:`\boldsymbol c` of the POD potential is
|
||||
found by solving the following least-squares problem
|
||||
|
||||
.. math::
|
||||
|
||||
{\min}_{\boldsymbol c \in \mathbb{R}^{M}} \ w_E \|\boldsymbol A(\boldsymbol \eta) \boldsymbol c - \bar{\boldsymbol E}^{\star} \|^2 + w_F \|\boldsymbol B(\boldsymbol \eta) \boldsymbol c + \boldsymbol F^{\star} \|^2 + w_R \|\boldsymbol c \|^2,
|
||||
{\min}_{\boldsymbol c \in \mathbb{R}^{M}} \ w_E \|\boldsymbol A \boldsymbol c - \bar{\boldsymbol E}^{\star} \|^2 + w_F \|\boldsymbol B \boldsymbol c + \boldsymbol F^{\star} \|^2 + w_R \|\boldsymbol c \|^2,
|
||||
|
||||
where :math:`w_E` and :math:`w_F` are weights for the energy
|
||||
(*fitting_weight_energy*) and force (*fitting_weight_force*),
|
||||
respectively; and :math:`w_R` is the regularization parameter (*fitting_regularization_parameter*). Here :math:`\bar{\boldsymbol E}^{\star} \in
|
||||
\mathbb{R}^{J}` is a vector of with entries :math:`\bar{E}^{\star}_j =
|
||||
E^{\star}_j/N_j` and :math:`\boldsymbol F^{\star}` is a vector of
|
||||
:math:`\mathcal{N}` entries obtained by stacking :math:`\{\boldsymbol
|
||||
F^{\star}_j\}_{j=1}^{J}` from top to bottom.
|
||||
respectively; and :math:`w_R` is the regularization parameter
|
||||
(*fitting_regularization_parameter*). Here :math:`\bar{\boldsymbol
|
||||
E}^{\star} \in \mathbb{R}^{J}` is a vector of with entries
|
||||
:math:`\bar{E}^{\star}_j = E^{\star}_j/N_j` and :math:`\boldsymbol
|
||||
F^{\star}` is a vector of :math:`\mathcal{N}` entries obtained by
|
||||
stacking :math:`\{\boldsymbol F^{\star}_j\}_{j=1}^{J}` from top to
|
||||
bottom.
|
||||
|
||||
The training procedure is the same for both the linear and quadratic POD
|
||||
potentials. However, since the quadratic POD potential has a
|
||||
significantly larger number of the global descriptors, it is more
|
||||
expensive to train the linear POD potential. This is because the
|
||||
training of the quadratic POD potential still requires us to calculate
|
||||
and store the quadratic global descriptors and their
|
||||
gradient. Furthermore, the quadratic POD potential may require more
|
||||
training data in order to prevent over-fitting. In order to reduce the
|
||||
computational cost of fitting the quadratic POD potential and avoid
|
||||
over-fitting, we can use subsets of two-body and three-body PODs for
|
||||
constructing the new descriptors.
|
||||
Validation
|
||||
""""""""""
|
||||
|
||||
POD potential can be validated on a test dataset in a directory
|
||||
specified by setting path_to_test_data_set in the second input file. It
|
||||
is possible to validate the POD potential after the training is
|
||||
complete. This is done by providing the coefficient file as an input to
|
||||
:doc:`fitpod <fitpod_command>`, for example,
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fitpod Ta_param.pod Ta_data.pod Ta_coefficients.pod
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
@ -727,7 +356,11 @@ LAMMPS was built with that package. See the :doc:`Build package
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_style pod <pair_pod>`
|
||||
:doc:`pair_style pod <pair_pod>`,
|
||||
:doc:`compute pod/atom <compute_pod_atom>`,
|
||||
:doc:`compute podd/atom <compute_pod_atom>`,
|
||||
:doc:`compute pod/local <compute_pod_atom>`,
|
||||
:doc:`compute pod/global <compute_pod_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
@ -736,10 +369,20 @@ The keyword defaults are also given in the description of the input files.
|
||||
|
||||
----------
|
||||
|
||||
.. _Grepl20072:
|
||||
.. _Nguyen20222a:
|
||||
|
||||
**(Grepl)** Grepl, Maday, Nguyen, and Patera, ESAIM: Mathematical Modelling and Numerical Analysis 41(3), 575-605, (2007).
|
||||
**(Nguyen and Rohskopf)** Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
|
||||
|
||||
.. _Nguyen20232a:
|
||||
|
||||
**(Nguyen2023)** Nguyen, Physical Review B, 107(14), 144103, (2023).
|
||||
|
||||
.. _Nguyen20242a:
|
||||
|
||||
**(Nguyen2024)** Nguyen, Journal of Computational Physics, 113102, (2024).
|
||||
|
||||
.. _Nguyen20243a:
|
||||
|
||||
**(Nguyen and Sema)** Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
|
||||
|
||||
.. _Nguyen20222:
|
||||
|
||||
**(Nguyen)** Nguyen and Rohskopf, arXiv preprint arXiv:2209.02362 (2022).
|
||||
|
||||
@ -193,6 +193,7 @@ accelerated styles exist.
|
||||
* :doc:`adapt <fix_adapt>` - change a simulation parameter over time
|
||||
* :doc:`adapt/fep <fix_adapt_fep>` - enhanced version of fix adapt
|
||||
* :doc:`addforce <fix_addforce>` - add a force to each atom
|
||||
* :doc:`add/heat <fix_add_heat>` - add a heat flux to each atom
|
||||
* :doc:`addtorque <fix_addtorque>` - add a torque to a group of atoms
|
||||
* :doc:`alchemy <fix_alchemy>` - perform an "alchemical transformation" between two partitions
|
||||
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>` - torsion/torsion terms in AMOEBA force field
|
||||
@ -369,6 +370,11 @@ accelerated styles exist.
|
||||
* :doc:`reaxff/species <fix_reaxff_species>` - write out ReaxFF molecule information
|
||||
* :doc:`recenter <fix_recenter>` - constrain the center-of-mass position of a group of atoms
|
||||
* :doc:`restrain <fix_restrain>` - constrain a bond, angle, dihedral
|
||||
* :doc:`rheo <fix_rheo>` - integrator for the RHEO package
|
||||
* :doc:`rheo/thermal <fix_rheo_thermal>` - thermal integrator for the RHEO package
|
||||
* :doc:`rheo/oxidation <fix_rheo_oxidation>` - create oxidation bonds for the RHEO package
|
||||
* :doc:`rheo/pressure <fix_rheo_pressure>` - pressure calculation for the RHEO package
|
||||
* :doc:`rheo/viscosity <fix_rheo_pressure>` - viscosity calculation for the RHEO package
|
||||
* :doc:`rhok <fix_rhok>` - add bias potential for long-range ordered systems
|
||||
* :doc:`rigid <fix_rigid>` - constrain one or more clusters of atoms to move as a rigid body with NVE integration
|
||||
* :doc:`rigid/meso <fix_rigid_meso>` - constrain clusters of mesoscopic SPH/SDPD particles to move as a rigid body
|
||||
|
||||
111
doc/src/fix_add_heat.rst
Normal file
@ -0,0 +1,111 @@
|
||||
.. index:: fix add/heat
|
||||
|
||||
fix add/heat command
|
||||
====================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix ID group-ID add/heat style args keyword values ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* add/heat = style name of this fix command
|
||||
* style = *constant* or *linear* or *quartic*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*constant* args = *rate*
|
||||
*rate* = rate of heat flow (energy/time units)
|
||||
*linear* args = :math:`T_{target}` *k*
|
||||
:math:`T_{target}` = target temperature (temperature units)
|
||||
*k* = prefactor (energy/(time*temperature) units)
|
||||
*quartic* args = :math:`T_{target}` *k*
|
||||
:math:`T_{target}` = target temperature (temperature units)
|
||||
*k* = prefactor (energy/(time*temperature^4) units)
|
||||
|
||||
* zero or more keyword/value pairs may be appended to args
|
||||
* keyword = *overwrite*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*overwrite* value = *yes* or *no*
|
||||
*yes* = sets current heat flow of particle
|
||||
*no* = adds to current heat flow of particle
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all add/heat constant v_heat
|
||||
fix 1 all add/heat linear 10.0 1.0 overwrite yes
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
This fix adds heat to particles with the temperature attribute every timestep.
|
||||
Note that this is an internal temperature of a particle intended for use with
|
||||
non-atomistic models like the discrete element method.
|
||||
|
||||
For the *constant* style, heat is added at the specified rate. For the *linear* style,
|
||||
heat is added at a rate of :math:`k (T_{target} - T)` where :math:`k` is the
|
||||
specified prefactor, :math:`T_{target}` is the specified target temperature, and
|
||||
:math:`T` is the temperature of the atom. This may be more representative of a
|
||||
conductive process. For the *quartic* style, heat is added at a rate of
|
||||
:math:`k (T_{target}^4 - T^4)`, akin to radiative heat transfer.
|
||||
|
||||
The rate or temperature can be can be specified as an equal-style or atom-style
|
||||
:doc:`variable <variable>`. If the value is a variable, it should be
|
||||
specified as v_name, where name is the variable name. In this case, the
|
||||
variable will be evaluated each time step, and its value will be used to
|
||||
determine the rate of heat added.
|
||||
|
||||
Equal-style variables can specify formulas with various mathematical
|
||||
functions and include :doc:`thermo_style <thermo_style>` command
|
||||
keywords for the simulation box parameters, time step, and elapsed time
|
||||
to specify time-dependent heating.
|
||||
|
||||
Atom-style variables can specify the same formulas as equal-style
|
||||
variables but can also include per-atom values, such as atom
|
||||
coordinates to specify spatially-dependent heating.
|
||||
|
||||
If the *overwrite* keyword is set to *yes*, this fix will set the total
|
||||
heat flow on a particle every timestep, overwriting contributions from pair
|
||||
styles or other fixes. If *overwrite* is *no*, this fix will add heat on
|
||||
top of other contributions.
|
||||
|
||||
----------
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options are relevant to this fix.
|
||||
No global or per-atom quantities are stored by this fix for access by various
|
||||
:doc:`output commands <Howto_output>`. 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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style is part of the GRANULAR package. It is
|
||||
only enabled if LAMMPS was built with that package.
|
||||
See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
This fix requires that atoms store temperature and heat flow
|
||||
as defined by the :doc:`fix property/atom <fix_property_atom>` command.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix heat/flow <fix_heat_flow>`,
|
||||
:doc:`fix property/atom <fix_property_atom>`,
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The default for the *overwrite* keyword is *no*
|
||||
@ -4,9 +4,6 @@
|
||||
fix deform command
|
||||
==================
|
||||
|
||||
:doc:`fix deform/pressure <fix_deform_pressure>` command
|
||||
========================================================
|
||||
|
||||
Accelerator Variants: *deform/kk*
|
||||
|
||||
Syntax
|
||||
@ -14,12 +11,11 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix ID group-ID fix_style N parameter style args ... keyword value ...
|
||||
fix ID group-ID deform N parameter style args ... keyword value ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* fix_style = *deform* or *deform/pressure*
|
||||
* N = perform box deformation every this many timesteps
|
||||
* one or more parameter/style/args sequences of arguments may be appended
|
||||
* one or more parameter/args sequences may be appended
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -46,12 +42,6 @@ Syntax
|
||||
*variable* values = v_name1 v_name2
|
||||
v_name1 = variable with name1 for box length change as function of time
|
||||
v_name2 = variable with name2 for change rate as function of time
|
||||
*pressure* values = target gain (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
*pressure/mean* values = target gain (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
|
||||
*xy*, *xz*, *yz* args = style value
|
||||
style = *final* or *delta* or *vel* or *erate* or *trate* or *wiggle* or *variable*
|
||||
@ -64,8 +54,6 @@ Syntax
|
||||
effectively an engineering shear strain rate
|
||||
*erate* value = R
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*erate/rescale* value = R (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*trate* value = R
|
||||
R = true shear strain rate (1/time units)
|
||||
*wiggle* values = A Tp
|
||||
@ -74,9 +62,6 @@ Syntax
|
||||
*variable* values = v_name1 v_name2
|
||||
v_name1 = variable with name1 for tilt change as function of time
|
||||
v_name2 = variable with name2 for change rate as function of time
|
||||
*pressure* values = target gain (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *remap* or *flip* or *units* or *couple* or *vol/balance/p* or *max/rate* or *normalize/pressure*
|
||||
@ -92,15 +77,6 @@ Syntax
|
||||
*units* value = *lattice* or *box*
|
||||
lattice = distances are defined in lattice units
|
||||
box = distances are defined in simulation box units
|
||||
*couple* value = *none* or *xyz* or *xy* or *yz* or *xz* (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
couple pressure values of various dimensions
|
||||
*vol/balance/p* value = *yes* or *no* (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
Modifies the behavior of the *volume* option to try and balance pressures
|
||||
*max/rate* value = *rate* (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
rate = maximum strain rate for pressure control
|
||||
*normalize/pressure* value = *yes* or *no* (ONLY available in :doc:`fix deform/pressure <fix_deform_pressure>` command)
|
||||
Modifies pressure controls such that the deviation in pressure is normalized by the target pressure
|
||||
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -112,8 +88,6 @@ Examples
|
||||
fix 1 all deform 1 xy erate 0.001 remap v
|
||||
fix 1 all deform 10 y delta -0.5 0.5 xz vel 1.0
|
||||
|
||||
See examples for :doc:`fix deform/pressure <fix_deform_pressure>` on its doc page
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
@ -123,17 +97,13 @@ run. Orthogonal simulation boxes have 3 adjustable parameters
|
||||
adjustable parameters (x,y,z,xy,xz,yz). Any or all of them can be
|
||||
adjusted independently and simultaneously.
|
||||
|
||||
The fix deform command allows use of all the arguments listed above,
|
||||
except those flagged as available ONLY for the :doc:`fix
|
||||
deform/pressure <fix_deform_pressure>` command, which are
|
||||
pressure-based controls. The fix deform/pressure command allows use
|
||||
of all the arguments listed above.
|
||||
|
||||
The rest of this doc page explains the options common to both
|
||||
commands. The :doc:`fix deform/pressure <fix_deform_pressure>` doc
|
||||
page explains the options available ONLY with the fix deform/pressure
|
||||
command. Note that a simulation can define only a single deformation
|
||||
command: fix deform or fix deform/pressure.
|
||||
The :doc:`fix deform/pressure <fix_deform_pressure>` command extends
|
||||
this command with additional keywords and arguments. The rest of this
|
||||
page explains the options common to both commands. The :doc:`fix
|
||||
deform/pressure <fix_deform_pressure>` page explains the options
|
||||
available ONLY with the fix deform/pressure command. Note that a
|
||||
simulation can define only a single deformation command: fix deform or
|
||||
fix deform/pressure.
|
||||
|
||||
Both these fixes can be used to perform non-equilibrium MD (NEMD)
|
||||
simulations of a continuously strained system. See the :doc:`fix
|
||||
@ -143,6 +113,24 @@ simulation of a continuously extended system (extensional flow) can be
|
||||
modeled using the :ref:`UEF package <PKG-UEF>` and its :doc:`fix
|
||||
commands <fix_nh_uef>`.
|
||||
|
||||
.. admonition:: Inconsistent trajectories due to image flags
|
||||
:class: warning
|
||||
|
||||
When running long simulations while shearing the box or using a high
|
||||
shearing rate, it is possible that the image flags used for storing
|
||||
unwrapped atom positions will "wrap around". When LAMMPS is compiled
|
||||
with the default settings, case image flags are limited to a range of
|
||||
:math:`-512 \le i \le 511`, which will overflow when atoms starting
|
||||
at zero image flag value have passed through a periodic box dimension
|
||||
more than 512 times.
|
||||
|
||||
Changing the :ref:`size of LAMMPS integer types <size>` to the
|
||||
"bigbig" setting can make this overflow much less likely, since it
|
||||
increases the image flag value range to :math:`- 1,048,576 \le i \le
|
||||
1\,048\,575`
|
||||
|
||||
----------
|
||||
|
||||
For the *x*, *y*, *z* parameters, the associated dimension cannot be
|
||||
shrink-wrapped. For the *xy*, *yz*, *xz* parameters, the associated
|
||||
second dimension cannot be shrink-wrapped. Dimensions not varied by
|
||||
|
||||
@ -13,29 +13,66 @@ Syntax
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* deform/pressure = style name of this fix command
|
||||
* N = perform box deformation every this many timesteps
|
||||
* one or more parameter/arg sequences may be appended
|
||||
* one or more parameter/args sequences may be appended
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
parameter = *x* or *y* or *z* or *xy* or *xz* or *yz* or *box*
|
||||
*x*, *y*, *z* args = style value(s)
|
||||
style = *final* or *delta* or *scale* or *vel* or *erate* or *trate* or *volume* or *wiggle* or *variable* or *pressure* or *pressure/mean*
|
||||
*final* values = lo hi
|
||||
lo hi = box boundaries at end of run (distance units)
|
||||
*delta* values = dlo dhi
|
||||
dlo dhi = change in box boundaries at end of run (distance units)
|
||||
*scale* values = factor
|
||||
factor = multiplicative factor for change in box length at end of run
|
||||
*vel* value = V
|
||||
V = change box length at this velocity (distance/time units),
|
||||
effectively an engineering strain rate
|
||||
*erate* value = R
|
||||
R = engineering strain rate (1/time units)
|
||||
*trate* value = R
|
||||
R = true strain rate (1/time units)
|
||||
*volume* value = none = adjust this dim to preserve volume of system
|
||||
*wiggle* values = A Tp
|
||||
A = amplitude of oscillation (distance units)
|
||||
Tp = period of oscillation (time units)
|
||||
*variable* values = v_name1 v_name2
|
||||
v_name1 = variable with name1 for box length change as function of time
|
||||
v_name2 = variable with name2 for change rate as function of time
|
||||
*pressure* values = target gain
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
*pressure/mean* values = target gain
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
||||
|
||||
*xy*, *xz*, *yz* args = style value
|
||||
style = *final* or *delta* or *vel* or *erate* or *trate* or *wiggle* or *variable* or *pressure* or *erate/rescale*
|
||||
*final* value = tilt
|
||||
tilt = tilt factor at end of run (distance units)
|
||||
*delta* value = dtilt
|
||||
dtilt = change in tilt factor at end of run (distance units)
|
||||
*vel* value = V
|
||||
V = change tilt factor at this velocity (distance/time units),
|
||||
effectively an engineering shear strain rate
|
||||
*erate* value = R
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*erate/rescale* value = R
|
||||
R = engineering shear strain rate (1/time units)
|
||||
*trate* value = R
|
||||
R = true shear strain rate (1/time units)
|
||||
*wiggle* values = A Tp
|
||||
A = amplitude of oscillation (distance units)
|
||||
Tp = period of oscillation (time units)
|
||||
*variable* values = v_name1 v_name2
|
||||
v_name1 = variable with name1 for tilt change as function of time
|
||||
v_name2 = variable with name2 for change rate as function of time
|
||||
*pressure* values = target gain
|
||||
target = target pressure (pressure units)
|
||||
gain = proportional gain constant (1/(time * pressure) or 1/time units)
|
||||
*erate/rescale* value = R
|
||||
R = engineering shear strain rate (1/time units)
|
||||
NOTE: All other styles are documented by the :doc:`fix deform <fix_deform>` command
|
||||
|
||||
*box* = style value
|
||||
style = *volume* or *pressure*
|
||||
@ -49,6 +86,15 @@ Syntax
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*remap* value = *x* or *v* or *none*
|
||||
x = remap coords of atoms in group into deforming box
|
||||
v = remap velocities of atoms in group when they cross periodic boundaries
|
||||
none = no remapping of x or v
|
||||
*flip* value = *yes* or *no*
|
||||
allow or disallow box flips when it becomes highly skewed
|
||||
*units* value = *lattice* or *box*
|
||||
lattice = distances are defined in lattice units
|
||||
box = distances are defined in simulation box units
|
||||
*couple* value = *none* or *xyz* or *xy* or *yz* or *xz*
|
||||
couple pressure values of various dimensions
|
||||
*vol/balance/p* value = *yes* or *no*
|
||||
@ -57,7 +103,6 @@ Syntax
|
||||
rate = maximum strain rate for pressure control
|
||||
*normalize/pressure* value = *yes* or *no*
|
||||
Modifies pressure controls such that the deviation in pressure is normalized by the target pressure
|
||||
NOTE: All other keywords are documented by the :doc:`fix deform <fix_deform>` command
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -79,10 +124,26 @@ pressure-based controls implemented by this command.
|
||||
|
||||
All arguments described on the :doc:`fix deform <fix_deform>` doc page
|
||||
also apply to this fix unless otherwise noted below. The rest of this
|
||||
doc page explains the arguments specific to this fix. Note that a
|
||||
page explains the arguments specific to this fix only. Note that a
|
||||
simulation can define only a single deformation command: fix deform or
|
||||
fix deform/pressure.
|
||||
|
||||
.. admonition:: Inconsistent trajectories due to image flags
|
||||
:class: warning
|
||||
|
||||
When running long simulations while shearing the box or using a high
|
||||
shearing rate, it is possible that the image flags used for storing
|
||||
unwrapped atom positions will "wrap around". When LAMMPS is compiled
|
||||
with the default settings, case image flags are limited to a range of
|
||||
:math:`-512 \le i \le 511`, which will overflow when atoms starting
|
||||
at zero image flag value have passed through a periodic box dimension
|
||||
more than 512 times.
|
||||
|
||||
Changing the :ref:`size of LAMMPS integer types <size>` to the
|
||||
"bigbig" setting can make this overflow much less likely, since it
|
||||
increases the image flag value range to :math:`- 1,048,576 \le i \le
|
||||
1\,048\,575`
|
||||
|
||||
----------
|
||||
|
||||
For the *x*, *y*, and *z* parameters, this is the meaning of the
|
||||
|
||||
@ -38,7 +38,7 @@ Syntax
|
||||
*electrode/thermo* args = potential eta *temp* values
|
||||
potential = electrode potential
|
||||
charge = electrode charge
|
||||
eta = reciprocal width of electrode charge smearing
|
||||
eta = reciprocal width of electrode charge smearing (can be NULL if eta keyword is used)
|
||||
*temp* values = T_v tau_v rng_v
|
||||
T_v = temperature of thermo-potentiostat
|
||||
tau_v = time constant of thermo-potentiostat
|
||||
@ -110,7 +110,7 @@ electrostatic configurations:
|
||||
:ref:`(Deissenbeck)<Deissenbeck>` between two electrodes
|
||||
|
||||
* (resulting in changing charges and potentials with appropriate
|
||||
average potential difference and thermal variance)
|
||||
average potential difference and thermal variance)
|
||||
|
||||
The first group-ID provided to each fix specifies the first electrode
|
||||
group, and more group(s) are added using the *couple* keyword for each
|
||||
@ -287,8 +287,18 @@ The *fix_modify tf* option enables the Thomas-Fermi metallicity model
|
||||
fix_modify ID tf type length voronoi
|
||||
|
||||
|
||||
If this option is used parameters must be set for all atom types of the
|
||||
electrode.
|
||||
If this option is used, these two parameters must be set for
|
||||
all atom types of the electrode:
|
||||
|
||||
* `tf` is the Thomas-Fermi length :math:`l_{TF}`
|
||||
* `voronoi` is the Voronoi volume per atom in units of length cubed
|
||||
|
||||
Different types may have different `tf` and `voronoi` values.
|
||||
The following self-energy term is then added for all electrode atoms:
|
||||
|
||||
.. math::
|
||||
|
||||
A_{ii} += \frac{1}{4 \pi \epsilon_0} \times \frac{4 \pi l_{TF}^2}{\mathrm{Voronoi volume}}
|
||||
|
||||
The *fix_modify timer* option turns on (off) additional timer outputs in the log
|
||||
file, for code developers to track optimization.
|
||||
@ -321,9 +331,11 @@ The global array has *N* rows and *2N+1* columns, where the fix manages
|
||||
array, the elements are:
|
||||
|
||||
* array[I][1] = total charge that group *I* would have had *if it were
|
||||
at 0 V applied potential* * array[I][2 to *N* + 1] = the *N* entries
|
||||
at 0 V applied potential*
|
||||
* array[I][2 to *N* + 1] = the *N* entries
|
||||
of the *I*-th row of the electrode capacitance matrix (definition
|
||||
follows) * array[I][*N* + 2 to *2N* + 1] = the *N* entries of the
|
||||
follows)
|
||||
* array[I][*N* + 2 to *2N* + 1] = the *N* entries of the
|
||||
*I*-th row of the electrode elastance matrix (the inverse of the
|
||||
electrode capacitance matrix)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.. index:: fix heat/flow
|
||||
|
||||
fix heat/flow command
|
||||
==========================
|
||||
=====================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
@ -56,13 +56,19 @@ not invoked during :doc:`energy minimization <minimize>`.
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style is part of the GRANULAR package. It is
|
||||
only enabled if LAMMPS was built with that package.
|
||||
See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
This fix requires that atoms store temperature and heat flow
|
||||
as defined by the :doc:`fix property/atom <fix_property_atom>` command.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair granular <pair_granular>`, :doc:`fix property/atom <fix_property_atom>`
|
||||
:doc:`pair granular <pair_granular>`,
|
||||
:doc:`fix add/heat <fix_add_heat>`,
|
||||
:doc:`fix property/atom <fix_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
@ -68,10 +68,10 @@ material or as an obstacle in a flow. Alternatively, it can be used as a
|
||||
constraining wall around a simulation; see the discussion of the
|
||||
*side* keyword below.
|
||||
|
||||
The *gstyle* geometry of the indenter can either be a sphere, a
|
||||
cylinder, a cone, or a plane.
|
||||
The *gstyle* keyword selects the geometry of the indenter and it can
|
||||
either have the value of *sphere*, *cylinder*, *cone*, or *plane*\ .
|
||||
|
||||
A spherical indenter exerts a force of magnitude
|
||||
A spherical indenter (*gstyle* = *sphere*) exerts a force of magnitude
|
||||
|
||||
.. math::
|
||||
|
||||
@ -82,13 +82,16 @@ distance from the atom to the center of the indenter, and *R* is the
|
||||
radius of the indenter. The force is repulsive and F(r) = 0 for *r* >
|
||||
*R*\ .
|
||||
|
||||
A cylindrical indenter exerts the same force, except that *r* is the
|
||||
distance from the atom to the center axis of the cylinder. The
|
||||
cylinder extends infinitely along its axis.
|
||||
A cylindrical indenter (*gstyle* = *cylinder*) follows the same formula
|
||||
for the force as a sphere, except that *r* is defined the distance
|
||||
from the atom to the center axis of the cylinder. The cylinder extends
|
||||
infinitely along its axis.
|
||||
|
||||
A conical indenter is similar to a cylindrical indenter except that it
|
||||
has a finite length (between *lo* and *hi*), and that two different
|
||||
radii (one at each end, *radlo* and *radhi*) can be defined.
|
||||
.. versionadded:: 17April2024
|
||||
|
||||
A conical indenter (*gstyle* = *cone*) is similar to a cylindrical indenter
|
||||
except that it has a finite length (between *lo* and *hi*), and that two
|
||||
different radii (one at each end, *radlo* and *radhi*) can be defined.
|
||||
|
||||
Spherical, cylindrical, and conical indenters account for periodic
|
||||
boundaries in two ways. First, the center point of a spherical
|
||||
@ -101,15 +104,15 @@ or axis accounts for periodic boundaries. Both of these mean that an
|
||||
indenter can effectively move through and straddle one or more
|
||||
periodic boundaries.
|
||||
|
||||
A planar indenter is really an axis-aligned infinite-extent wall
|
||||
exerting the same force on atoms in the system, where *R* is the
|
||||
position of the plane and *r-R* is the distance from the plane. If
|
||||
the *side* parameter of the plane is specified as *lo* then it will
|
||||
indent from the lo end of the simulation box, meaning that atoms with
|
||||
a coordinate less than the plane's current position will be pushed
|
||||
towards the hi end of the box and atoms with a coordinate higher than
|
||||
the plane's current position will feel no force. Vice versa if *side*
|
||||
is specified as *hi*\ .
|
||||
A planar indenter (*gstyle* = *plane*) behaves like an axis-aligned
|
||||
infinite-extent wall with the same force expression on atoms in the
|
||||
system as before, but where *R* is the position of the plane and *r-R*
|
||||
is the distance of an from the plane. If the *side* parameter of the
|
||||
plane is specified as *lo* then it will indent from the lo end of the
|
||||
simulation box, meaning that atoms with a coordinate less than the
|
||||
plane's current position will be pushed towards the hi end of the box
|
||||
and atoms with a coordinate higher than the plane's current position
|
||||
will feel no force. Vice versa if *side* is specified as *hi*\ .
|
||||
|
||||
Any of the 4 quantities defining a spherical indenter's geometry can
|
||||
be specified as an equal-style :doc:`variable <variable>`, namely *x*,
|
||||
|
||||
@ -80,7 +80,7 @@ Obtaining i-PI
|
||||
""""""""""""""
|
||||
|
||||
Here are the commands to set up a virtual environment and install
|
||||
i-PI into it with all its dependencies via the PyPi repository and
|
||||
i-PI into it with all its dependencies via the PyPI repository and
|
||||
the pip package manager.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
180
doc/src/fix_rheo.rst
Normal file
@ -0,0 +1,180 @@
|
||||
.. index:: fix rheo
|
||||
|
||||
fix rheo command
|
||||
================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID rheo cut kstyle zmin keyword values...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* rheo = style name of this fix command
|
||||
* cut = cutoff for the kernel (distance)
|
||||
* kstyle = *quintic* or *RK0* or *RK1* or *RK2*
|
||||
* zmin = minimal number of neighbors for reproducing kernels
|
||||
* zero or more keyword/value pairs may be appended to args
|
||||
* keyword = *thermal* or *interface/reconstruct* or *surface/detection* or
|
||||
*shift* or *rho/sum* or *density* or *self/mass* or *speed/sound*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*thermal* values = none, turns on thermal evolution
|
||||
*interface/reconstruct* values = none, reconstructs interfaces with solid particles
|
||||
*surface/detection* values = *sdstyle* *limit* *limit/splash*
|
||||
*sdstyle* = *coordination* or *divergence*
|
||||
*limit* = threshold for surface particles
|
||||
*limit/splash* = threshold for splash particles
|
||||
*shift* values = none, turns on velocity shifting
|
||||
*rho/sum* values = none, uses the kernel to compute the density of particles
|
||||
*self/mass* values = none, a particle uses its own mass in a rho summation
|
||||
*density* values = *rho01*, ... *rho0N* (density)
|
||||
*speed/sound* values = *cs0*, ... *csN* (velocity)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all rheo 3.0 quintic 0 thermal density 0.1 0.1 speed/sound 10.0 1.0
|
||||
fix 1 all rheo 3.0 RK1 10 shift surface/detection coordination 40
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
Perform time integration for RHEO particles, updating positions, velocities,
|
||||
and densities. For a detailed breakdown of the integration timestep and
|
||||
numerical details, see :ref:`(Palermo) <rheo_palermo>`. For an
|
||||
overview of other features available in the RHEO package, see
|
||||
:doc:`the RHEO howto <Howto_rheo>`.
|
||||
|
||||
The type of kernel is specified using *kstyle* and the cutoff is *cut*. Four
|
||||
kernels are currently available. The *quintic* kernel is a standard quintic
|
||||
spline function commonly used in SPH. The other options, *RK0*, *RK1*, and
|
||||
*RK2*, are zeroth, first, and second order reproducing. To generate a
|
||||
reproducing kernel, a particle must have sufficient neighbors inside the
|
||||
kernel cutoff distance (a coordination number) to accurately calculate
|
||||
moments. This threshold is set by *zmin*. If reproducing kernels are
|
||||
requested but a particle has fewer neighbors, then it will revert to a
|
||||
non-reproducing quintic kernel until it gains more neighbors.
|
||||
|
||||
To model temperature evolution, one must specify the *thermal* keyword,
|
||||
define a separate instance of :doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
and use atom style rheo/thermal.
|
||||
|
||||
By default, the density of solid RHEO particles does not evolve and forces
|
||||
with fluid particles are calculated using the current velocity of the solid
|
||||
particle. If the *interface/reconstruct* keyword is used, then the density
|
||||
and velocity of solid particles are alternatively reconstructed for every
|
||||
fluid-solid interaction to ensure no-slip and pressure-balanced boundaries.
|
||||
This is done by estimating the location of the fluid-solid interface and
|
||||
extrapolating fluid particle properties across the interface to calculate a
|
||||
temporary apparent density and velocity for a solid particle. The numerical
|
||||
details are the same as those described in
|
||||
:ref:`(Palermo) <howto_rheo_palermo>` except there is an additional
|
||||
restriction that the reconstructed solid density cannot be less than the
|
||||
equilibrium density. This prevents fluid particles from sticking to solid
|
||||
surfaces.
|
||||
|
||||
A modified form of Fickian particle shifting can be enabled with the
|
||||
*shift* keyword. This effectively shifts particle positions to generate a
|
||||
more uniform spatial distribution. Shifting currently does not consider the
|
||||
type of a particle and therefore may be inappropriate in systems consisting
|
||||
of multiple fluid phases.
|
||||
|
||||
In systems with free surfaces, the *surface/detection* keyword can be used
|
||||
to classify the location of particles as being within the bulk fluid, on a
|
||||
free surface, or isolated from other particles in a splash or droplet.
|
||||
Shifting is then disabled in the normal direction away from the free surface
|
||||
to prevent particles from diffusing away. Surface detection can also be used
|
||||
to control surface-nucleated effects like oxidation when used in combination
|
||||
with :doc:`fix rheo/oxidation <fix_rheo_oxidation>`. Surface detection is not
|
||||
performed on solid bodies.
|
||||
|
||||
The *surface/detection* keyword takes three arguments: *sdstyle*, *limit*,
|
||||
and *limit/splash*. The first, *sdstyle*, specifies whether surface particles
|
||||
are identified using a coordination number (*coordination*) or the divergence
|
||||
of the local particle positions (*divergence*). The threshold value for a
|
||||
surface particle for either of these criteria is set by the numerical value
|
||||
of *limit*. Additionally, if a particle's coordination number is too low,
|
||||
i.e. if it has separated off from the bulk in a droplet, it is not possible
|
||||
to define surfaces and the particle is classified as a splash. The coordination
|
||||
threshold for this classification is set by the numerical value of
|
||||
*limit/splash*.
|
||||
|
||||
By default, RHEO integrates particles' densities using a mass diffusion
|
||||
equation. Alternatively, one can update densities every timestep by performing
|
||||
a kernel summation of the masses of neighboring particles by specifying the *rho/sum*
|
||||
keyword.
|
||||
|
||||
The *self/mass* keyword modifies the behavior of the density summation in *rho/sum*.
|
||||
Typically, the density :math:`\rho` of a particle is calculated as the sum over neighbors
|
||||
|
||||
.. math::
|
||||
\rho_i = \sum_{j} W_{ij} M_j
|
||||
|
||||
where :math:`W_{ij}` is the kernel, and :math:`M_j` is the mass of particle :math:`j`.
|
||||
The *self/mass* keyword augments this expression by replacing :math:`M_j` with
|
||||
:math:`M_i`. This may be useful in simulations of multiple fluid phases with large
|
||||
differences in density, :ref:`(Hu) <fix_rheo_hu>`.
|
||||
|
||||
The *density* keyword is used to specify the equilibrium density of each of the N
|
||||
particle types. It must be followed by N numerical values specifying each type's
|
||||
equilibrium density *rho0*.
|
||||
|
||||
The *speed/sound* keyword is used to specify the speed of sound of each of the
|
||||
N particle types. It must be followed by N numerical values specifying each type's
|
||||
speed of sound *cs*.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various :doc:`output commands <Howto_output>`.
|
||||
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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix must be used with atom style rheo or rheo/thermal. This fix must
|
||||
be used in conjunction with :doc:`fix rheo/pressure <fix_rheo_pressure>`.
|
||||
and :doc:`fix rheo/viscosity <fix_rheo_viscosity>`. If the *thermal* setting
|
||||
is used, there must also be an instance of
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`. The fix group must be set to all.
|
||||
Only one instance of fix rheo may be defined and it must be defined prior
|
||||
to all other RHEO fixes in the input script.
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if LAMMPS was built
|
||||
with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo/viscosity <fix_rheo_viscosity>`,
|
||||
:doc:`fix rheo/pressure <fix_rheo_pressure>`,
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
:doc:`pair rheo <pair_rheo>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
*rho0* and *cs* are set to 1.0 for all atom types.
|
||||
|
||||
----------
|
||||
|
||||
.. _rheo_palermo:
|
||||
|
||||
**(Palermo)** Palermo, Wolf, Clemmer, O'Connor, in preparation.
|
||||
|
||||
.. _fix_rheo_hu:
|
||||
|
||||
**(Hu)** Hu, and Adams J. Comp. Physics, 213, 844-861 (2006).
|
||||
85
doc/src/fix_rheo_oxidation.rst
Normal file
@ -0,0 +1,85 @@
|
||||
.. index:: fix rheo/oxidation
|
||||
|
||||
fix rheo/oxidation command
|
||||
==========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID rheo/oxidation cut btype rsurf
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* rheo/oxidation = style name of this fix command
|
||||
* cut = maximum bond length (distance units)
|
||||
* btype = type of bonds created
|
||||
* rsurf = distance from surface to create bonds (distance units)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all rheo/oxidation 1.5 2 0.0
|
||||
fix 1 all rheo/oxidation 1.0 1 2.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
This fix dynamically creates bonds on the surface of fluids to
|
||||
represent physical processes such as oxidation. It is intended
|
||||
for use with bond style :doc:`bond rheo/shell <bond_rheo_shell>`.
|
||||
|
||||
Every timestep, particles check neighbors within a distance of *cut*.
|
||||
This distance must be smaller than the kernel length defined in
|
||||
:doc:`fix rheo <fix_rheo>`. Bonds of type *btype* are created between
|
||||
a fluid particle and either a fluid or solid neighbor. The fluid particles
|
||||
must also be on the fluid surface, or within a distance of *rsurf* from
|
||||
the surface. This process is further described in
|
||||
:ref:`(Clemmer) <howto_rheo_clemmer2>`.
|
||||
|
||||
If used in conjunction with solid bodies, such as those generated
|
||||
by the *react* option of :doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
it is recommended to use a :doc:`hybrid bond style <bond_hybrid>`
|
||||
with different bond types for solid and oxide bonds.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various :doc:`output commands <Howto_output>`.
|
||||
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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix must be used with the bond style :doc:`rheo/shell <bond_rheo_shell>`
|
||||
and :doc:`fix rheo <fix_rheo>` with surface detection enabled.
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>`
|
||||
page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`bond rheo/shell <bond_rheo_shell>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _howto_rheo_clemmer2:
|
||||
|
||||
**(Clemmer)** Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
|
||||
106
doc/src/fix_rheo_pressure.rst
Normal file
@ -0,0 +1,106 @@
|
||||
.. index:: fix rheo/pressure
|
||||
|
||||
fix rheo/pressure command
|
||||
=========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID rheo/pressure type1 pstyle1 args1 ... typeN pstyleN argsN
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* rheo/pressure = style name of this fix command
|
||||
* one or more types and pressure styles must be appended
|
||||
* types = lists of types (see below)
|
||||
* pstyle = *linear* or *taitwater* or *cubic*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*linear* args = none
|
||||
*taitwater* args = none
|
||||
*cubic* args = cubic prefactor :math:`A_3` (pressure/density\^2)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all rheo/pressure * linear
|
||||
fix 1 all rheo/pressure 1 linear 2 cubic 10.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
This fix defines a pressure equation of state for RHEO particles. One can
|
||||
define different equations of state for different atom types. An equation
|
||||
must be specified for every atom type.
|
||||
|
||||
One first defines the atom *types*. A wild-card asterisk can be used in place
|
||||
of or in conjunction with the *types* argument to set the coefficients for
|
||||
multiple pairs of atom types. This takes the form "\*" or "\*n" or "m\*"
|
||||
or "m\*n". If :math:`N` is the number of atom types, then an asterisk with
|
||||
no numeric values means all types from 1 to :math:`N`. A leading asterisk
|
||||
means all types from 1 to n (inclusive). A trailing asterisk means all types
|
||||
from m to :math:`N` (inclusive). A middle asterisk means all types from m to n
|
||||
(inclusive).
|
||||
|
||||
The *types* definition is followed by the pressure style, *pstyle*. Current
|
||||
options *linear*, *taitwater*, and *cubic*. Style *linear* is a linear
|
||||
equation of state with a particle pressure :math:`P` calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
P = c (\rho - \rho_0)
|
||||
|
||||
where :math:`c` is the speed of sound, :math:`\rho_0` is the equilibrium density,
|
||||
and :math:`\rho` is the current density of a particle. The numerical values of
|
||||
:math:`c` and :math:`\rho_0` are set in :doc:`fix rheo <fix_rheo>`. Style *cubic*
|
||||
is a cubic equation of state which has an extra argument :math:`A_3`,
|
||||
|
||||
.. math::
|
||||
|
||||
P = c ((\rho - \rho_0) + A_3 (\rho - \rho_0)^3) .
|
||||
|
||||
Style *taitwater* is Tait's equation of state:
|
||||
|
||||
.. math::
|
||||
|
||||
P = \frac{c^2 \rho_0}{7} \biggl[\left(\frac{\rho}{\rho_0}\right)^{7} - 1\biggr].
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various :doc:`output commands <Howto_output>`.
|
||||
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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix must be used with an atom style that includes density
|
||||
such as atom_style rheo or rheo/thermal. This fix must be used in
|
||||
conjunction with :doc:`fix rheo <fix_rheo>`. The fix group must be
|
||||
set to all. Only one instance of fix rheo/pressure can be defined.
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>`
|
||||
page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`pair rheo <pair_rheo>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
128
doc/src/fix_rheo_thermal.rst
Normal file
@ -0,0 +1,128 @@
|
||||
.. index:: fix rheo/thermal
|
||||
|
||||
fix rheo/thermal command
|
||||
========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID rheo/thermal attribute values ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* rheo/thermal = style name of this fix command
|
||||
* one or more attributes may be appended
|
||||
* attribute = *conductivity* or *specific/heat* or *latent/heat* or *Tfreeze* or *react*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*conductivity* args = types style args
|
||||
types = lists of types (see below)
|
||||
style = *constant*
|
||||
*constant* arg = conductivity (power/temperature)
|
||||
*specific/heat* args = types style args
|
||||
types = lists of types (see below)
|
||||
style = *constant*
|
||||
*constant* arg = specific heat (energy/(mass*temperature))
|
||||
*latent/heat* args = types style args
|
||||
types = lists of types (see below)
|
||||
style = *constant*
|
||||
*constant* arg = latent heat (energy/mass)
|
||||
*Tfreeze* args = types style args
|
||||
types = lists of types (see below)
|
||||
style = *constant*
|
||||
*constant* arg = freezing temperature (temperature)
|
||||
*react* args = cut type
|
||||
cut = maximum bond distance
|
||||
type = bond type
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all rheo/thermal conductivity * constant 1.0 specific/heat * constant 1.0 Tfreeze * constant 1.0
|
||||
fix 1 all rheo/pressure conductivity 1*2 constant 1.0 conductivity 3*4 constant 2.0 specific/heat * constant 1.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
This fix performs time integration of temperature for atom style rheo/thermal.
|
||||
In addition, it defines multiple thermal properties of particles and handles
|
||||
melting/solidification, if applicable. For more details on phase transitions
|
||||
in RHEO, see :doc:`the RHEO howto <Howto_rheo>`.
|
||||
|
||||
Note that the temperature of a particle is always derived from the energy.
|
||||
This implies the *temperature* attribute of :doc:`the set command <set>` does
|
||||
not affect particles. Instead, one should use the *sph/e* attribute.
|
||||
|
||||
For each atom type, one can define expressions for the *conductivity*,
|
||||
*specific/heat*, *latent/heat*, and critical temperature (*Tfreeze*).
|
||||
The conductivity and specific heat must be defined for all atom types.
|
||||
The latent heat and critical temperature are optional. However, a
|
||||
critical temperature must be defined to specify a latent heat.
|
||||
|
||||
Note, if shifting is turned on in :doc:`fix rheo <fix_rheo>`, the gradient
|
||||
of the energy is used to shift energies. This may be inappropriate in systems
|
||||
with multiple atom types with different specific heats.
|
||||
|
||||
For each property, one must first define a list of atom types. A wild-card
|
||||
asterisk can be used in place of or in conjunction with the *types* argument
|
||||
to set the coefficients for multiple pairs of atom types. This takes the
|
||||
form "\*" or "\*n" or "m\*" or "m\*n". If :math:`N` is the number of atom
|
||||
types, then an asterisk with no numeric values means all types from 1 to
|
||||
:math:`N`. A leading asterisk means all types from 1 to n (inclusive).
|
||||
A trailing asterisk means all types from m to :math:`N` (inclusive). A
|
||||
middle asterisk means all types from m to n (inclusive).
|
||||
|
||||
The *types* definition for each property is followed by the style. Currently,
|
||||
the only option is *constant*. Style *constant* simply applies a constant value
|
||||
of respective property to each particle of the assigned type.
|
||||
|
||||
The *react* keyword controls whether bonds are created/deleted when particles
|
||||
transition between a fluid and solid state. This option only applies to atom
|
||||
types that have a defined value of *Tfreeze*. When a fluid particle's
|
||||
temperature drops below *Tfreeze*, bonds of type *btype* are created between
|
||||
nearby solid particles within a distance of *cut*. The particle's status also
|
||||
swaps to a solid state. When a solid particle's temperature rises above
|
||||
*Tfreeze*, all bonds of type *btype* are broken and the particle's status swaps
|
||||
to a fluid state.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various :doc:`output commands <Howto_output>`.
|
||||
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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix must be used with an atom style that includes temperature,
|
||||
heatflow, and conductivity such as atom_style rheo/thermal This fix
|
||||
must be used in conjunction with :doc:`fix rheo <fix_rheo>` with the
|
||||
*thermal* setting. The fix group must be set to all. Only one
|
||||
instance of fix rheo/pressure can be defined.
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>`
|
||||
page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`pair rheo <pair_rheo>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`,
|
||||
:doc:`fix add/heat <fix_add_heat>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
117
doc/src/fix_rheo_viscosity.rst
Normal file
@ -0,0 +1,117 @@
|
||||
.. index:: fix rheo/viscosity
|
||||
|
||||
fix rheo/viscosity command
|
||||
==========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID rheo/viscosity type1 pstyle1 args1 ... typeN pstyleN argsN
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* rheo/viscosity = style name of this fix command
|
||||
* one or more types and viscosity styles must be appended
|
||||
* types = lists of types (see below)
|
||||
* vstyle = *constant* or *power*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*constant* args = *eta*
|
||||
*eta* = viscosity
|
||||
|
||||
*power* args = *eta*, *gd0*, *K*, *n*
|
||||
*eta* = viscosity
|
||||
*gd0* = critical strain rate
|
||||
*K* = consistency index
|
||||
*n* = power-law exponent
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all rheo/viscosity * constant 1.0
|
||||
fix 1 all rheo/viscosity 1 constant 1.0 2 power 0.1 5e-4 0.001 0.5
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
This fix defines a viscosity for RHEO particles. One can define different
|
||||
viscosities for different atom types, but a viscosity must be specified for
|
||||
every atom type.
|
||||
|
||||
One first defines the atom *types*. A wild-card asterisk can be used in place
|
||||
of or in conjunction with the *types* argument to set the coefficients for
|
||||
multiple pairs of atom types. This takes the form "\*" or "\*n" or "m\*"
|
||||
or "m\*n". If :math:`N` is the number of atom types, then an asterisk with
|
||||
no numeric values means all types from 1 to :math:`N`. A leading asterisk
|
||||
means all types from 1 to n (inclusive). A trailing asterisk means all types
|
||||
from m to :math:`N` (inclusive). A middle asterisk means all types from m to n
|
||||
(inclusive).
|
||||
|
||||
The *types* definition is followed by the viscosity style, *vstyle*. Two
|
||||
options are available, *constant* and *power*. Style *constant* simply
|
||||
applies a constant value of the viscosity *eta* to each particle of the
|
||||
assigned type. Style *power* is a Hershchel-Bulkley constitutive equation
|
||||
for the stress :math:`\tau`
|
||||
|
||||
.. math::
|
||||
|
||||
\tau = \left(\frac{\tau_0}{\dot{\gamma}} + K \dot{\gamma}^{n - 1}\right) \dot{\gamma}, \tau \ge \tau_0
|
||||
|
||||
where :math:`\dot{\gamma}` is the strain rate and :math:`\tau_0` is the critical
|
||||
yield stress, below which :math:`\dot{\gamma} = 0.0`. To avoid divergences, this
|
||||
expression is regularized by defining a critical strain rate *gd0*. If the local
|
||||
strain rate on a particle falls below this limit, a constant viscosity of *eta*
|
||||
is assigned. This implies a value of
|
||||
|
||||
.. math::
|
||||
\tau_0 = \eta \dot{\gamma}_0 - K \dot{\gamma}_0^N
|
||||
|
||||
as further discussed in :ref:`(Palermo) <rheo_palermo2>`.
|
||||
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`.
|
||||
None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various :doc:`output commands <Howto_output>`.
|
||||
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>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix must be used with an atom style that includes viscosity
|
||||
such as atom_style rheo or rheo/thermal. This fix must be used in
|
||||
conjunction with :doc:`fix rheo <fix_rheo>`. The fix group must be
|
||||
set to all. Only one instance of fix rheo/viscosity can be defined.
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the
|
||||
:doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`pair rheo <pair_rheo>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _rheo_palermo2:
|
||||
|
||||
**(Palermo)** Palermo, Wolf, Clemmer, O'Connor, in preparation.
|
||||
@ -23,11 +23,12 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Store the forces on atoms in the group at the point during each
|
||||
timestep when the fix is invoked, as described below. This is useful
|
||||
for storing forces before constraints or other boundary conditions are
|
||||
computed which modify the forces, so that unmodified forces can be
|
||||
:doc:`written to a dump file <dump>` or accessed by other :doc:`output commands <Howto_output>` that use per-atom quantities.
|
||||
Store the forces on atoms in the group at the point during each timestep
|
||||
when the fix is invoked, as described below. This is useful for storing
|
||||
forces before constraints or other boundary conditions are computed
|
||||
which modify the forces, so that unmodified forces can be :doc:`written
|
||||
to a dump file <dump>` or accessed by other :doc:`output commands
|
||||
<Howto_output>` that use per-atom quantities.
|
||||
|
||||
This fix is invoked at the point in the velocity-Verlet timestepping
|
||||
immediately after :doc:`pair <pair_style>`, :doc:`bond <bond_style>`,
|
||||
@ -36,12 +37,13 @@ immediately after :doc:`pair <pair_style>`, :doc:`bond <bond_style>`,
|
||||
forces have been calculated. It is the point in the timestep when
|
||||
various fixes that compute constraint forces are calculated and
|
||||
potentially modify the force on each atom. Examples of such fixes are
|
||||
:doc:`fix shake <fix_shake>`, :doc:`fix wall <fix_wall>`, and :doc:`fix indent <fix_indent>`.
|
||||
:doc:`fix shake <fix_shake>`, :doc:`fix wall <fix_wall>`, and :doc:`fix
|
||||
indent <fix_indent>`.
|
||||
|
||||
.. note::
|
||||
|
||||
The order in which various fixes are applied which operate at
|
||||
the same point during the timestep, is the same as the order they are
|
||||
The order in which various fixes are applied which operate at the
|
||||
same point during the timestep, is the same as the order they are
|
||||
specified in the input script. Thus normally, if you want to store
|
||||
per-atom forces due to force field interactions, before constraints
|
||||
are applied, you should list this fix first within that set of fixes,
|
||||
@ -52,8 +54,9 @@ potentially modify the force on each atom. Examples of such fixes are
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
|
||||
are relevant to this fix.
|
||||
No information about this fix is written to :doc:`binary restart files
|
||||
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
|
||||
relevant to this fix.
|
||||
|
||||
This fix produces a per-atom array which can be accessed by various
|
||||
:doc:`output commands <Howto_output>`. The number of columns for each
|
||||
@ -61,7 +64,8 @@ atom is 3, and the columns store the x,y,z forces on each atom. The
|
||||
per-atom values be accessed on any timestep.
|
||||
|
||||
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
|
||||
""""""""""""
|
||||
|
||||
BIN
doc/src/img/howto_charmm_ELJ.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
doc/src/img/howto_charmmfsw_ELJ.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
@ -44,8 +44,8 @@ The label map can also be defined by the :doc:`read_data <read_data>`
|
||||
command when it reads these sections in a data file: Atom Type Labels,
|
||||
Bond Type Labels, etc. See the :doc:`Howto type labels
|
||||
<Howto_type_labels>` doc page for a general discussion of how type
|
||||
labels can be used. See :ref:`(Gissinger) <Typelabel>` for a discussion
|
||||
of the type label implementation in LAMMPS and its uses.
|
||||
labels can be used. See :ref:`(Gissinger) <Typelabel1>` for a
|
||||
discussion of the type label implementation in LAMMPS and its uses.
|
||||
|
||||
Valid type labels can contain any alphanumeric character, but must not
|
||||
start with a number, a '#', or a '*' character. They can contain other
|
||||
@ -103,6 +103,6 @@ none
|
||||
|
||||
-----------
|
||||
|
||||
.. _Typelabel:
|
||||
.. _Typelabel1:
|
||||
|
||||
**(Gissinger)** J. R. Gissinger, I. Nikiforov, Y. Afshar, B. Waters, M. Choi, D. S. Karls, A. Stukowski, W. Im, H. Heinz, A. Kohlmeyer, and E. B. Tadmor, J Phys Chem B, 128, 3282-3297 (2024).
|
||||
|
||||
@ -112,26 +112,22 @@ Description
|
||||
These pair styles compute Lennard Jones (LJ) and Coulombic
|
||||
interactions with additional switching or shifting functions that ramp
|
||||
the energy and/or force smoothly to zero between an inner and outer
|
||||
cutoff. They are implementations of the widely used CHARMM force
|
||||
field used in the `CHARMM <https://www.charmm.org>`_ MD code (and
|
||||
others). See :ref:`(MacKerell) <pair-MacKerell>` for a description of the
|
||||
CHARMM force field.
|
||||
cutoff. They implement the widely used CHARMM force field, see
|
||||
:doc:`Howto discussion on biomolecular force fields <Howto_bioFF>` for
|
||||
details.
|
||||
|
||||
The styles with *charmm* (not *charmmfsw* or *charmmfsh*\ ) in their
|
||||
name are the older, original LAMMPS implementations. They compute the
|
||||
LJ and Coulombic interactions with an energy switching function (esw,
|
||||
shown in the formula below as S(r)), which ramps the energy smoothly
|
||||
to zero between the inner and outer cutoff. This can cause
|
||||
irregularities in pairwise forces (due to the discontinuous second
|
||||
derivative of energy at the boundaries of the switching region), which
|
||||
in some cases can result in detectable artifacts in an MD simulation.
|
||||
LJ and Coulombic interactions with an energy switching function which
|
||||
ramps the energy smoothly to zero between the inner and outer cutoff.
|
||||
This can cause irregularities in pairwise forces (due to the discontinuous
|
||||
second derivative of energy at the boundaries of the switching region),
|
||||
which in some cases can result in detectable artifacts in an MD simulation.
|
||||
|
||||
The newer styles with *charmmfsw* or *charmmfsh* in their name replace
|
||||
the energy switching with force switching (fsw) and force shifting
|
||||
(fsh) functions, for LJ and Coulombic interactions respectively.
|
||||
These follow the formulas and description given in
|
||||
:ref:`(Steinbach) <Steinbach>` and :ref:`(Brooks) <Brooks1>` to minimize these
|
||||
artifacts.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
@ -152,26 +148,6 @@ artifacts.
|
||||
the CHARMM force field energies and forces, when using one of these
|
||||
two CHARMM pair styles.
|
||||
|
||||
.. math::
|
||||
|
||||
E = & LJ(r) \qquad \qquad \qquad r < r_{\rm in} \\
|
||||
= & S(r) * LJ(r) \qquad \qquad r_{\rm in} < r < r_{\rm out} \\
|
||||
= & 0 \qquad \qquad \qquad \qquad r > r_{\rm out} \\
|
||||
E = & C(r) \qquad \qquad \qquad r < r_{\rm in} \\
|
||||
= & S(r) * C(r) \qquad \qquad r_{\rm in} < r < r_{\rm out} \\
|
||||
= & 0 \qquad \qquad \qquad \qquad r > r_{\rm out} \\
|
||||
LJ(r) = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
||||
\left(\frac{\sigma}{r}\right)^6 \right] \\
|
||||
C(r) = & \frac{C q_i q_j}{ \epsilon r} \\
|
||||
S(r) = & \frac{ \left[r_{\rm out}^2 - r^2\right]^2
|
||||
\left[r_{\rm out}^2 + 2r^2 - 3{r_{\rm in}^2}\right]}
|
||||
{ \left[r_{\rm out}^2 - {r_{\rm in}}^2\right]^3 }
|
||||
|
||||
where S(r) is the energy switching function mentioned above for the
|
||||
*charmm* styles. See the :ref:`(Steinbach) <Steinbach>` paper for the
|
||||
functional forms of the force switching and force shifting functions
|
||||
used in the *charmmfsw* and *charmmfsh* styles.
|
||||
|
||||
When using the *lj/charmm/coul/charmm styles*, both the LJ and
|
||||
Coulombic terms require an inner and outer cutoff. They can be the
|
||||
same for both formulas or different depending on whether 2 or 4
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
.. index:: pair_style coul/cut/gpu
|
||||
.. index:: pair_style coul/cut/kk
|
||||
.. index:: pair_style coul/cut/omp
|
||||
.. index:: pair_style coul/cut/global
|
||||
.. index:: pair_style coul/cut/global/omp
|
||||
.. index:: pair_style coul/debye
|
||||
.. index:: pair_style coul/debye/gpu
|
||||
.. index:: pair_style coul/debye/kk
|
||||
@ -11,8 +13,6 @@
|
||||
.. index:: pair_style coul/dsf/kk
|
||||
.. index:: pair_style coul/dsf/omp
|
||||
.. index:: pair_style coul/exclude
|
||||
.. index:: pair_style coul/cut/global
|
||||
.. index:: pair_style coul/cut/global/omp
|
||||
.. index:: pair_style coul/long
|
||||
.. index:: pair_style coul/long/omp
|
||||
.. index:: pair_style coul/long/kk
|
||||
@ -33,6 +33,11 @@ pair_style coul/cut command
|
||||
|
||||
Accelerator Variants: *coul/cut/gpu*, *coul/cut/kk*, *coul/cut/omp*
|
||||
|
||||
pair_style coul/cut/global command
|
||||
==================================
|
||||
|
||||
Accelerator Variants: *coul/cut/omp*
|
||||
|
||||
pair_style coul/debye command
|
||||
=============================
|
||||
|
||||
@ -46,11 +51,6 @@ Accelerator Variants: *coul/dsf/gpu*, *coul/dsf/kk*, *coul/dsf/omp*
|
||||
pair_style coul/exclude command
|
||||
===============================
|
||||
|
||||
pair_style coul/cut/global command
|
||||
==================================
|
||||
|
||||
Accelerator Variants: *coul/cut/omp*
|
||||
|
||||
pair_style coul/long command
|
||||
============================
|
||||
|
||||
@ -79,16 +79,17 @@ pair_style tip4p/long command
|
||||
|
||||
Accelerator Variants: *tip4p/long/omp*
|
||||
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style coul/cut cutoff
|
||||
pair_style coul/cut/global cutoff
|
||||
pair_style coul/debye kappa cutoff
|
||||
pair_style coul/dsf alpha cutoff
|
||||
pair_style coul/exclude cutoff
|
||||
pair_style coul/cut/global cutoff
|
||||
pair_style coul/long cutoff
|
||||
pair_style coul/wolf alpha cutoff
|
||||
pair_style coul/streitz cutoff keyword alpha
|
||||
@ -152,6 +153,11 @@ the 2 atoms, and :math:`\epsilon` is the dielectric constant which can be set
|
||||
by the :doc:`dielectric <dielectric>` command. The cutoff :math:`r_c` truncates
|
||||
the interaction distance.
|
||||
|
||||
Pair style *coul/cut/global* computes the same Coulombic interactions
|
||||
as style *coul/cut* except that it allows only a single global cutoff
|
||||
and thus makes it compatible for use in combination with long-range
|
||||
coulomb styles in :doc:`hybrid pair styles <pair_hybrid>`.
|
||||
|
||||
----------
|
||||
|
||||
Style *coul/debye* adds an additional exp() damping factor to the
|
||||
@ -262,11 +268,6 @@ Streitz-Mintmire parameterization for the material being modeled.
|
||||
|
||||
----------
|
||||
|
||||
Pair style *coul/cut/global* computes the same Coulombic interactions
|
||||
as style *coul/cut* except that it allows only a single global cutoff
|
||||
and thus makes it compatible for use in combination with long-range
|
||||
coulomb styles in :doc:`hybrid pair styles <pair_hybrid>`.
|
||||
|
||||
Pair style *coul/exclude* computes Coulombic interactions like *coul/cut*
|
||||
but **only** applies them to excluded pairs using a scaling factor
|
||||
of :math:`\gamma - 1.0` with :math:`\gamma` being the factor assigned
|
||||
|
||||
@ -13,16 +13,11 @@ Syntax
|
||||
|
||||
pair_style dpd/coul/slater/long T cutoff_DPD seed lambda cutoff_coul
|
||||
|
||||
pair_coeff I J a_IJ Gamma is_charged
|
||||
|
||||
* T = temperature (temperature units) (dpd only)
|
||||
* T = temperature (temperature units)
|
||||
* cutoff_DPD = global cutoff for DPD interactions (distance units)
|
||||
* seed = random # seed (positive integer)
|
||||
* lambda = decay length of the charge (distance units)
|
||||
* cutoff_coul = real part cutoff for Coulombic interactions (distance units)
|
||||
* I,J = numeric atom types, or type labels
|
||||
* Gamma = DPD Gamma coefficient
|
||||
* is_charged (boolean) set to yes if I and J are charged beads
|
||||
* cutoff_coul = global cutoff for Coulombic interactions (distance units)
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -30,66 +25,90 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style dpd/coul/slater/long 1.0 2.5 34387 0.25 3.0
|
||||
pair_coeff 1 1 78.0 4.5 # not charged by default
|
||||
|
||||
pair_coeff 1 1 78.0 4.5 # not charged by default
|
||||
pair_coeff 2 2 78.0 4.5 yes
|
||||
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 27June2024
|
||||
|
||||
Style *dpd/coul/slater/long* computes a force field for dissipative particle dynamics
|
||||
(DPD) following the exposition in :ref:`(Groot) <Groot5>` with the addition of
|
||||
electrostatic interactions. The coulombic forces in mesoscopic models
|
||||
employ potentials without explicit excluded-volume interactions.
|
||||
The goal is to prevent artificial ionic pair formation by including a charge
|
||||
distribution in the Coulomb potential, following the formulation of
|
||||
:ref:`(Melchor) <Melchor1>`:
|
||||
Style *dpd/coul/slater/long* computes a force field for dissipative
|
||||
particle dynamics (DPD) following the exposition in :ref:`(Groot)
|
||||
<Groot5>`. It also allows for the use of charged particles in the
|
||||
model by adding a long-range Coulombic term to the DPD interactions.
|
||||
The short-range portion of the Coulombics is calculated by this pair
|
||||
style. The long-range Coulombics are computed by use of the
|
||||
:doc:`kspace_style <kspace_style>` command, e.g. using the Ewald or
|
||||
PPPM styles.
|
||||
|
||||
The force on bead I due to bead J is given as a sum
|
||||
of 4 terms
|
||||
Coulombic forces in mesoscopic models such as DPD employ potentials
|
||||
without explicit excluded-volume interactions. The goal is to prevent
|
||||
artificial ionic pair formation by including a charge distribution in
|
||||
the Coulomb potential, following the formulation in :ref:`(Melchor1)
|
||||
<Melchor1>`.
|
||||
|
||||
.. note::
|
||||
|
||||
This pair style is effectively the combination of the
|
||||
:doc:`pair_style dpd <pair_dpd>` and :doc:`pair_style
|
||||
coul/slater/long <pair_coul_slater>` commands, but should be more
|
||||
efficient (especially on GPUs) than using :doc:`pair_style
|
||||
hybrid/overlay dpd coul/slater/long <pair_hybrid>`. That is
|
||||
particularly true for the GPU package version of the pair style since
|
||||
this version is compatible with computing neighbor lists on the GPU
|
||||
instead of the CPU as is required for hybrid styles.
|
||||
|
||||
In the charged DPD model, the force on bead I due to bead J is given
|
||||
as a sum of 4 terms:
|
||||
|
||||
.. math::
|
||||
|
||||
\vec{f} = & (F^C + F^D + F^R + F^E) \hat{r_{ij}} \\
|
||||
F^C = & A w(r) \qquad \qquad \qquad \qquad \qquad r < r_c \\
|
||||
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v}_{ij}) \qquad \qquad r < r_c \\
|
||||
F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \qquad \qquad \qquad r < r_c \\
|
||||
w(r) = & 1 - \frac{r}{r_c} \\
|
||||
F^E = & \frac{Cq_iq_j}{\epsilon r^2} \left( 1- exp\left( \frac{2r_{ij}}{\lambda} \right) \left( 1 + \frac{2r_{ij}}{\lambda} \left( 1 + \frac{r_{ij}}{\lambda} \right)\right) \right)
|
||||
F^C = & A w(r) \qquad \qquad \qquad \qquad \qquad r < r_{DPD} \\
|
||||
F^D = & - \gamma w^2(r) (\hat{r_{ij}} \bullet \vec{v}_{ij}) \qquad \qquad r < r_{DPD} \\
|
||||
F^R = & \sigma w(r) \alpha (\Delta t)^{-1/2} \qquad \qquad \qquad r < r_{DPD} \\
|
||||
w(r) = & 1 - \frac{r}{r_{DPD}} \\
|
||||
F^E = & \frac{C q_iq_j}{\epsilon r^2} \left( 1- exp\left( \frac{2r_{ij}}{\lambda} \right) \left( 1 + \frac{2r_{ij}}{\lambda} \left( 1 + \frac{r_{ij}}{\lambda} \right)\right) \right)
|
||||
|
||||
where :math:`F^C` is a conservative force, :math:`F^D` is a dissipative
|
||||
force, :math:`F^R` is a random force, and :math:`F^E` is an electrostatic force.
|
||||
:math:`\hat{r_{ij}}` is a unit vector in the direction
|
||||
:math:`r_i - r_j`, :math:`\vec{v}_{ij}` is
|
||||
the vector difference in velocities of the two atoms :math:`\vec{v}_i -
|
||||
where :math:`F^C` is a conservative force, :math:`F^D` is a
|
||||
dissipative force, :math:`F^R` is a random force, and :math:`F^E` is
|
||||
an electrostatic force. :math:`\hat{r_{ij}}` is a unit vector in the
|
||||
direction :math:`r_i - r_j`, :math:`\vec{v}_{ij}` is the vector
|
||||
difference in velocities of the two atoms :math:`\vec{v}_i -
|
||||
\vec{v}_j`, :math:`\alpha` is a Gaussian random number with zero mean
|
||||
and unit variance, *dt* is the timestep size, and :math:`w(r)` is a
|
||||
weighting factor that varies between 0 and 1. :math:`r_c` is the
|
||||
pairwise cutoff. :math:`\sigma` is set equal to :math:`\sqrt{2 k_B T
|
||||
\gamma}`, where :math:`k_B` is the Boltzmann constant and *T* is the
|
||||
temperature parameter in the pair_style command.
|
||||
C is the same Coulomb conversion factor as in the pair_styles
|
||||
coul/cut and coul/long. In this way the Coulomb
|
||||
interaction between ions is corrected at small distances r, and
|
||||
the long-range interactions are computed either by the Ewald or the PPPM technique.
|
||||
weighting factor that varies between 0 and 1.
|
||||
|
||||
:math:`\sigma` is set equal to :math:`\sqrt{2 k_B T \gamma}`, where
|
||||
:math:`k_B` is the Boltzmann constant and *T* is the temperature
|
||||
parameter in the pair_style command.
|
||||
|
||||
The following parameters must be defined for each
|
||||
pair of atoms types via the :doc:`pair_coeff <pair_coeff>` command as in
|
||||
the examples above, or in the data file or restart files read by the
|
||||
:math:`r_{DPD}` is the pairwise cutoff for the first 3 DPD terms in
|
||||
the formula as specified by *cutoff_DPD*. For the :math:`F^E` term,
|
||||
pairwise interactions within the specified *cutoff_coul* distance are
|
||||
computed directly; interactions beyond that distance are computed in
|
||||
reciprocal space. *C* is the same Coulomb conversion factor used in
|
||||
the Coulombic formulas described on the :doc:`pair_coul <pair_coul>`
|
||||
doc page.
|
||||
|
||||
The following parameters must be defined for each pair of atoms types
|
||||
via the :doc:`pair_coeff <pair_coeff>` command as in the examples
|
||||
above, or in the data file or restart files read by the
|
||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
||||
commands:
|
||||
|
||||
* A (force units)
|
||||
* :math:`\gamma` (force/velocity units)
|
||||
* is_charged (boolean)
|
||||
* is_charged (optional boolean, default = no)
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
This style is the combination of :doc:`pair_style dpd <pair_dpd>` and :doc:`pair_style coul/slater/long <pair_coul_slater>`.
|
||||
The *is_charged* parameter is optional and can be specified as *yes* or
|
||||
*no*. *Yes* should be used for interactions between two types of
|
||||
charged particles. *No* is the default and should be used for
|
||||
interactions between two types of particles when one or both are
|
||||
uncharged.
|
||||
|
||||
----------
|
||||
|
||||
@ -116,17 +135,17 @@ pressure.
|
||||
This pair style writes its information to :doc:`binary restart files
|
||||
<restart>`, so pair_style and pair_coeff commands do not need to be
|
||||
specified in an input script that reads a restart file. Note that the
|
||||
user-specified random number seed is stored in the restart file, so when
|
||||
a simulation is restarted, each processor will re-initialize its random
|
||||
number generator the same way it did initially. This means the random
|
||||
forces will be random, but will not be the same as they would have been
|
||||
if the original simulation had continued past the restart time.
|
||||
user-specified random number seed is stored in the restart file, so
|
||||
when a simulation is restarted, each processor will re-initialize its
|
||||
random number generator the same way it did initially. This means the
|
||||
random forces will be random, but will not be the same as they would
|
||||
have been if the original simulation had continued past the restart
|
||||
time.
|
||||
|
||||
This pair style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. They do not support the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the
|
||||
*inner*, *middle*, *outer* keywords.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
@ -138,17 +157,17 @@ LAMMPS was built with that package. See the :doc:`Build package
|
||||
|
||||
The default frequency for rebuilding neighbor lists is every 10 steps
|
||||
(see the :doc:`neigh_modify <neigh_modify>` command). This may be too
|
||||
infrequent since particles move rapidly and
|
||||
can overlap by large amounts. If this setting yields a non-zero number
|
||||
of "dangerous" reneighborings (printed at the end of a simulation), you
|
||||
should experiment with forcing reneighboring more often and see if
|
||||
system energies/trajectories change.
|
||||
infrequent since particles move rapidly and can overlap by large
|
||||
amounts. If this setting yields a non-zero number of "dangerous"
|
||||
reneighborings (printed at the end of a simulation), you should
|
||||
experiment with forcing reneighboring more often and see if system
|
||||
energies/trajectories change.
|
||||
|
||||
This pair style requires you to use the :doc:`comm_modify vel yes
|
||||
This pair style requires use of the :doc:`comm_modify vel yes
|
||||
<comm_modify>` command so that velocities are stored by ghost atoms.
|
||||
|
||||
This pair style also requires the long-range solvers included in the KSPACE package.
|
||||
|
||||
This pair style also requires use of a long-range solvers from the
|
||||
KSPACE package.
|
||||
|
||||
This pair style will not restart exactly when using the
|
||||
:doc:`read_restart <read_restart>` command, though they should provide
|
||||
@ -160,13 +179,11 @@ Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`pair_style dpd <pair_dpd>`, :doc:`pair_style coul/slater/long <pair_coul_slater>`,
|
||||
:doc:`pair_coeff <pair_coeff>`, :doc:`fix nvt <fix_nh>`, :doc:`fix langevin <fix_langevin>`,
|
||||
:doc:`pair_style srp <pair_srp>`, :doc:`fix mvv/dpd <fix_mvv_dpd>`.
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
is_charged = no
|
||||
For the pair_coeff command, the default is is_charged = no.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
.. index:: pair_style pod
|
||||
.. index:: pair_style pod/kk
|
||||
|
||||
pair_style pod command
|
||||
========================
|
||||
|
||||
Accelerator Variants: *pod/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -24,29 +27,33 @@ Description
|
||||
.. versionadded:: 22Dec2022
|
||||
|
||||
Pair style *pod* defines the proper orthogonal descriptor (POD)
|
||||
potential :ref:`(Nguyen) <Nguyen20221>`. The mathematical definition of
|
||||
the POD potential is described from :doc:`fitpod <fitpod_command>`, which is
|
||||
used to fit the POD potential to *ab initio* energy and force data.
|
||||
potential :ref:`(Nguyen and Rohskopf) <Nguyen20222b>`,
|
||||
:ref:`(Nguyen2023) <Nguyen20232b>`, :ref:`(Nguyen2024) <Nguyen20242b>`,
|
||||
and :ref:`(Nguyen and Sema) <Nguyen20243b>`. The :doc:`fitpod
|
||||
<fitpod_command>` is used to fit the POD potential.
|
||||
|
||||
Only a single pair_coeff command is used with the *pod* style which
|
||||
specifies a POD parameter file followed by a coefficient file.
|
||||
specifies a POD parameter file followed by a coefficient file, a
|
||||
projection matrix file, and a centroid file.
|
||||
|
||||
The coefficient file (``Ta_coefficients.pod``) contains coefficients for the
|
||||
POD potential. The top of the coefficient file can contain any number of
|
||||
blank and comment lines (start with #), but follows a strict format
|
||||
after that. The first non-blank non-comment line must contain:
|
||||
The POD parameter file (``Ta_param.pod``) can contain blank and comment
|
||||
lines (start with #) anywhere. Each non-blank non-comment line must
|
||||
contain one keyword/value pair. See :doc:`fitpod <fitpod_command>` for
|
||||
the description of all the keywords that can be assigned in the
|
||||
parameter file.
|
||||
|
||||
* POD_coefficients: *ncoeff*
|
||||
The coefficient file (``Ta_coefficients.pod``) contains coefficients for
|
||||
the POD potential. The top of the coefficient file can contain any
|
||||
number of blank and comment lines (start with #), but follows a strict
|
||||
format after that. The first non-blank non-comment line must contain:
|
||||
|
||||
This is followed by *ncoeff* coefficients, one per line. The coefficient
|
||||
* model_coefficients: *ncoeff* *nproj* *ncentroid*
|
||||
|
||||
This is followed by *ncoeff* coefficients, *nproj* projection matrix entries,
|
||||
and *ncentroid* centroid coordinates, one per line. The coefficient
|
||||
file is generated after training the POD potential using :doc:`fitpod
|
||||
<fitpod_command>`.
|
||||
|
||||
The POD parameter file (``Ta_param.pod``) can contain blank and comment lines
|
||||
(start with #) anywhere. Each non-blank non-comment line must contain
|
||||
one keyword/value pair. See :doc:`fitpod <fitpod_command>` for the description
|
||||
of all the keywords that can be assigned in the parameter file.
|
||||
|
||||
As an example, if a LAMMPS indium phosphide simulation has 4 atoms
|
||||
types, with the first two being indium and the third and fourth being
|
||||
phophorous, the pair_coeff command would look like this:
|
||||
@ -67,7 +74,33 @@ the *hybrid* pair style. The NULL values are placeholders for atom
|
||||
types that will be used with other potentials.
|
||||
|
||||
Examples about training and using POD potentials are found in the
|
||||
directory lammps/examples/PACKAGES/pod.
|
||||
directory lammps/examples/PACKAGES/pod and the Github repo https://github.com/cesmix-mit/pod-examples.
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For atom type pairs I,J and I != J, where types I and J correspond to
|
||||
two different element types, mixing is performed by LAMMPS with
|
||||
user-specifiable parameters as described above. You never need to
|
||||
specify a pair_coeff command with I != J arguments for this style.
|
||||
|
||||
This pair style does not support the :doc:`pair_modify <pair_modify>`
|
||||
shift, table, and tail options.
|
||||
|
||||
This pair style does not write its information to :doc:`binary restart
|
||||
files <restart>`, since it is stored in potential files. Thus, you need
|
||||
to re-specify the pair_style and pair_coeff commands in an input script
|
||||
that reads a restart file.
|
||||
|
||||
This pair style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the
|
||||
*inner*, *middle*, *outer* keywords.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
@ -78,12 +111,14 @@ This style is part of the ML-POD package. It is only enabled if LAMMPS
|
||||
was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
This pair style does not compute per-atom energies and per-atom stresses.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fitpod <fitpod_command>`,
|
||||
:doc:`compute pod/atom <compute_pod_atom>`,
|
||||
:doc:`compute podd/atom <compute_pod_atom>`,
|
||||
:doc:`compute pod/local <compute_pod_atom>`,
|
||||
:doc:`compute pod/global <compute_pod_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
@ -92,6 +127,20 @@ none
|
||||
|
||||
----------
|
||||
|
||||
.. _Nguyen20221:
|
||||
.. _Nguyen20222b:
|
||||
|
||||
**(Nguyen and Rohskopf)** Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
|
||||
|
||||
.. _Nguyen20232b:
|
||||
|
||||
**(Nguyen2023)** Nguyen, Physical Review B, 107(14), 144103, (2023).
|
||||
|
||||
.. _Nguyen20242b:
|
||||
|
||||
**(Nguyen2024)** Nguyen, Journal of Computational Physics, 113102, (2024).
|
||||
|
||||
.. _Nguyen20243b:
|
||||
|
||||
**(Nguyen and Sema)** Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
|
||||
|
||||
|
||||
**(Nguyen)** Nguyen and Rohskopf, arXiv preprint arXiv:2209.02362 (2022).
|
||||
|
||||
102
doc/src/pair_rheo.rst
Normal file
@ -0,0 +1,102 @@
|
||||
.. index:: pair_style rheo
|
||||
|
||||
pair_style rheo command
|
||||
=======================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style rheo cutoff keyword values
|
||||
|
||||
* cutoff = global cutoff for kernel (distance units)
|
||||
* zero or more keyword/value pairs may be appended to args
|
||||
* keyword = *rho/damp* or *artificial/visc* or *harmonic/means*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*rho/damp* args = density damping prefactor :math:`\xi`
|
||||
*artificial/visc* args = artificial viscosity prefactor :math:`\zeta`
|
||||
*harmonic/means* args = none
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style rheo 3.0 rho/damp 1.0 artificial/visc 2.0
|
||||
pair_coeff * *
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
Pair style *rheo* computes pressure and viscous forces between particles
|
||||
in the :doc:`rheo package <Howto_rheo>`. If thermal evolution is turned
|
||||
on in :doc:`fix rheo <fix_rheo>`, then the pair style also calculates
|
||||
heat exchanged between particles.
|
||||
|
||||
The *artificial/viscosity* keyword is used to specify the magnitude
|
||||
:math:`\zeta` of an optional artificial viscosity contribution to forces.
|
||||
This factor can help stabilize simulations by smoothing out small length
|
||||
scale variations in velocity fields. Artificial viscous forces typically
|
||||
are only exchanged by fluid particles. However, if interfaces are not
|
||||
reconstructed in fix rheo, fluid particles will also exchange artificial
|
||||
viscous forces with solid particles to improve stability.
|
||||
|
||||
The *rho/damp* keyword is used to specify the magnitude :math:`\xi` of
|
||||
an optional pairwise damping term between the density of particles. This
|
||||
factor can help stabilize simulations by smoothing out small length
|
||||
scale variations in density fields. However, in systems that develop
|
||||
a density gradient in equilibrium (e.g. in a hydrostatic column underlying
|
||||
gravity), this option may be inappropriate.
|
||||
|
||||
If particles have different viscosities or conductivities, the
|
||||
*harmonic/means* keyword changes how they are averaged before calculating
|
||||
pairwise forces or heat exchanges. By default, an arithmetic averaged is
|
||||
used, however, a harmonic mean may improve stability in systems with multiple
|
||||
fluid phases with large disparities in viscosities.
|
||||
|
||||
No coefficients are defined for each pair of atoms types via the
|
||||
:doc:`pair_coeff <pair_coeff>` command as in the examples
|
||||
above.
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
This style does not support the :doc:`pair_modify <pair_modify>`
|
||||
shift, table, and tail options.
|
||||
|
||||
This style does not write information to :doc:`binary restart files <restart>`.
|
||||
Thus, you need to re-specify the pair_style and pair_coeff commands in an input
|
||||
script that reads a restart file.
|
||||
|
||||
This style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the *inner*,
|
||||
*middle*, *outer* keywords.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the
|
||||
:doc:`Build package <Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`fix rheo/pressure <fix_rheo_pressure>`,
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
:doc:`fix rheo/viscosity <fix_rheo_viscosity>`,
|
||||
:doc:`compute rheo/property/atom <compute_rheo_property_atom>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
Density damping and artificial viscous forces are not calculated.
|
||||
Arithmetic means are used for mixing particle properties.
|
||||
112
doc/src/pair_rheo_solid.rst
Normal file
@ -0,0 +1,112 @@
|
||||
.. index:: pair_style rheo/solid
|
||||
|
||||
pair_style rheo/solid command
|
||||
=============================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style rheo/solid
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
pair_style rheo/solid
|
||||
pair_coeff * * 1.0 1.5 1.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
Style *rheo/solid* is effectively a copy of pair style
|
||||
:doc:`bpm/spring <pair_bpm_spring>` except it only applies forces
|
||||
between solid RHEO particles, determined by checking the status of
|
||||
each pair of neighboring particles before calculating forces.
|
||||
|
||||
The style computes pairwise forces with the formula
|
||||
|
||||
.. math::
|
||||
|
||||
F = k (r - r_c)
|
||||
|
||||
where :math:`k` is a stiffness and :math:`r_c` is the cutoff length.
|
||||
An additional damping force is also applied to interacting
|
||||
particles. The force is proportional to the difference in the
|
||||
normal velocity of particles
|
||||
|
||||
.. math::
|
||||
|
||||
F_D = - \gamma w (\hat{r} \bullet \vec{v})
|
||||
|
||||
where :math:`\gamma` is the damping strength, :math:`\hat{r}` is the
|
||||
displacement normal vector, :math:`\vec{v}` is the velocity difference
|
||||
between the two particles, and :math:`w` is a smoothing factor.
|
||||
This smoothing factor is constructed such that damping forces go to zero
|
||||
as particles come out of contact to avoid discontinuities. It is
|
||||
given by
|
||||
|
||||
.. math::
|
||||
|
||||
w = 1.0 - \left( \frac{r}{r_c} \right)^8 .
|
||||
|
||||
The following coefficients must be defined for each pair of atom types
|
||||
via the :doc:`pair_coeff <pair_coeff>` command as in the examples
|
||||
above, or in the data file or restart files read by the
|
||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
||||
commands, or by mixing as described below:
|
||||
|
||||
* :math:`k` (force/distance units)
|
||||
* :math:`r_c` (distance units)
|
||||
* :math:`\gamma` (force/velocity units)
|
||||
|
||||
|
||||
----------
|
||||
|
||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For atom type pairs I,J and I != J, the A coefficient and cutoff
|
||||
distance for this pair style can be mixed. A is always mixed via a
|
||||
*geometric* rule. The cutoff is mixed according to the pair_modify
|
||||
mix value. The default mix value is *geometric*\ . See the
|
||||
"pair_modify" command for details.
|
||||
|
||||
This pair style does not support the :doc:`pair_modify <pair_modify>`
|
||||
shift option, since the pair interaction goes to 0.0 at the cutoff.
|
||||
|
||||
The :doc:`pair_modify <pair_modify>` table and tail options are not
|
||||
relevant for this pair style.
|
||||
|
||||
This pair style writes its information to :doc:`binary restart files
|
||||
<restart>`, so pair_style and pair_coeff commands do not need to be
|
||||
specified in an input script that reads a restart file.
|
||||
|
||||
This pair style can only be used via the *pair* keyword of the
|
||||
:doc:`run_style respa <run_style>` command. It does not support the
|
||||
*inner*, *middle*, *outer* keywords.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This pair style is part of the RHEO package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix rheo <fix_rheo>`,
|
||||
:doc:`fix rheo/thermal <fix_rheo_thermal>`,
|
||||
:doc:`pair bpm/spring <pair_bpm_spring>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
@ -292,6 +292,7 @@ accelerated styles exist.
|
||||
* :doc:`mesocnt/viscous <pair_mesocnt>` - Mesoscopic vdW potential for (carbon) nanotubes with friction
|
||||
* :doc:`mgpt <pair_mgpt>` - Simplified model generalized pseudopotential theory (MGPT) potential
|
||||
* :doc:`mie/cut <pair_mie>` - Mie potential
|
||||
* :doc:`mliap <pair_mliap>` - Multiple styles of machine-learning potential
|
||||
* :doc:`mm3/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>` - Smoothed MM3 vdW potential with Gaussian electrostatics
|
||||
* :doc:`momb <pair_momb>` - Many-Body Metal-Organic (MOMB) force field
|
||||
* :doc:`morse <pair_morse>` - Morse potential
|
||||
@ -337,6 +338,8 @@ accelerated styles exist.
|
||||
* :doc:`reaxff <pair_reaxff>` - ReaxFF potential
|
||||
* :doc:`rebo <pair_airebo>` - Second generation REBO potential of Brenner
|
||||
* :doc:`rebomos <pair_rebomos>` - REBOMoS potential for MoS2
|
||||
* :doc:`rheo <pair_rheo>` - fluid interactions in RHEO package
|
||||
* :doc:`rheo/solid <pair_rheo_solid>` - solid interactions in RHEO package
|
||||
* :doc:`resquared <pair_resquared>` - Everaers RE-Squared ellipsoidal potential
|
||||
* :doc:`saip/metal <pair_saip_metal>` - Interlayer potential for hetero-junctions formed with hexagonal 2D materials and metal surfaces
|
||||
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>` - Smoothed dissipative particle dynamics for water at isothermal conditions
|
||||
@ -347,7 +350,6 @@ accelerated styles exist.
|
||||
* :doc:`smd/tri_surface <pair_smd_triangulated_surface>` -
|
||||
* :doc:`smd/ulsph <pair_smd_ulsph>` -
|
||||
* :doc:`smtbq <pair_smtbq>` -
|
||||
* :doc:`mliap <pair_mliap>` - Multiple styles of machine-learning potential
|
||||
* :doc:`snap <pair_snap>` - SNAP machine-learning potential
|
||||
* :doc:`soft <pair_soft>` - Soft (cosine) potential
|
||||
* :doc:`sph/heatconduction <pair_sph_heatconduction>` -
|
||||
|
||||
@ -36,7 +36,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 27June2024
|
||||
|
||||
The *uf3* style computes the :ref:`Ultra-Fast Force Fields (UF3)
|
||||
<Xie23>` potential, a machine-learning interatomic potential. In UF3,
|
||||
|
||||
@ -12,7 +12,7 @@ Syntax
|
||||
|
||||
* file = name of data file to read in
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *add* or *offset* or *shift* or *extra/atom/types* or *extra/bond/types* or *extra/angle/types* or *extra/dihedral/types* or *extra/improper/types* or *extra/bond/per/atom* or *extra/angle/per/atom* or *extra/dihedral/per/atom* or *extra/improper/per/atom* or *group* or *nocoeff* or *fix*
|
||||
* keyword = *add* or *offset* or *shift* or *extra/atom/types* or *extra/bond/types* or *extra/angle/types* or *extra/dihedral/types* or *extra/improper/types* or *extra/bond/per/atom* or *extra/angle/per/atom* or *extra/dihedral/per/atom* or *extra/improper/per/atom* or *extra/special/per/atom* or *group* or *nocoeff* or *fix*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -859,6 +859,10 @@ of analysis.
|
||||
- atom-ID molecule-ID atom-type x y z
|
||||
* - peri
|
||||
- atom-ID atom-type volume density x y z
|
||||
* - rheo
|
||||
- atom-ID atom-type status rho x y z
|
||||
* - rheo/thermal
|
||||
- atom-ID atom-type status rho energy x y z
|
||||
* - smd
|
||||
- atom-ID atom-type molecule volume mass kradius cradius x0 y0 z0 x y z
|
||||
* - sph
|
||||
|
||||
@ -32,7 +32,7 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
reset atoms mol group-ID keyword value ...
|
||||
reset_atoms mol group-ID keyword value ...
|
||||
|
||||
* group-ID = ID of group of atoms whose molecule IDs will be reset
|
||||
* zero or more keyword/value pairs can be appended
|
||||
@ -66,16 +66,16 @@ Description
|
||||
.. versionadded:: 22Dec2022
|
||||
|
||||
The *reset_atoms* command resets the values of a specified atom
|
||||
property. In contrast to the set command, it does this in a
|
||||
property. In contrast to the *set* command, it does this in a
|
||||
collective manner which resets the values for many atoms in a
|
||||
self-consistent way. This is often useful when the simulated system
|
||||
has undergone significant modifications like adding or removing atoms
|
||||
or molecules, joining data files, changing bonds, or large-scale
|
||||
self-consistent way. This command is often useful when the simulated
|
||||
system has undergone significant modifications like adding or removing
|
||||
atoms or molecules, joining data files, changing bonds, or large-scale
|
||||
diffusion.
|
||||
|
||||
The new values can be thought of as a *reset*, similar to values atoms
|
||||
would have if a new data file were being read or a new simulation
|
||||
performed. Note that the set command also resets atom properties to
|
||||
performed. Note that the *set* command also resets atom properties to
|
||||
new values, but it treats each atom independently.
|
||||
|
||||
The *property* setting can be *id* or *image* or *mol*. For *id*, the
|
||||
@ -90,7 +90,7 @@ keyword/value settings are given below.
|
||||
|
||||
----------
|
||||
|
||||
*Property id*
|
||||
Property: *id*
|
||||
|
||||
Reset atom IDs for the entire system, including all the global IDs
|
||||
stored for bond, angle, dihedral, improper topology data. This will
|
||||
@ -146,7 +146,7 @@ processor have consecutive IDs, as the :doc:`create_atoms
|
||||
|
||||
----------
|
||||
|
||||
*Property image*
|
||||
Property: *image*
|
||||
|
||||
Reset the image flags of atoms so that at least one atom in each
|
||||
molecule has an image flag of 0. Molecular topology is respected so
|
||||
@ -191,7 +191,7 @@ flags.
|
||||
|
||||
----------
|
||||
|
||||
*Property mol*
|
||||
Property: *mol*
|
||||
|
||||
Reset molecule IDs for a specified group of atoms based on current
|
||||
bond connectivity. This will typically create a new set of molecule
|
||||
@ -203,7 +203,7 @@ For purposes of this operation, molecules are identified by the current
|
||||
bond connectivity in the system, which may or may not be consistent with
|
||||
the current molecule IDs. A molecule in this context is a set of atoms
|
||||
connected to each other with explicit bonds. The specific algorithm
|
||||
used is the one of :doc:`compute fragment/atom <compute_cluster_atom>`
|
||||
used is the one of :doc:`compute fragment/atom <compute_cluster_atom>`.
|
||||
Once the molecules are identified and a new molecule ID computed for
|
||||
each, this command will update the current molecule ID for all atoms in
|
||||
the group with the new molecule ID. Note that if the group excludes
|
||||
@ -266,7 +266,7 @@ The *image* property can only be used when the atom style supports bonds.
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`compute fragment/atom <compute_cluster_atom>`
|
||||
:doc:`compute fragment/atom <compute_cluster_atom>`,
|
||||
:doc:`fix bond/react <fix_bond_react>`,
|
||||
:doc:`fix bond/create <fix_bond_create>`,
|
||||
:doc:`fix bond/break <fix_bond_break>`,
|
||||
|
||||
@ -120,6 +120,8 @@ Syntax
|
||||
*angle* value = numeric angle type or angle type label, for all angles between selected atoms
|
||||
*dihedral* value = numeric dihedral type or dihedral type label, for all dihedrals between selected atoms
|
||||
*improper* value = numeric improper type or improper type label, for all impropers between selected atoms
|
||||
*rheo/rho* value = density of RHEO particles (mass/distance\^3)
|
||||
*rheo/status* value = status or phase of RHEO particles (unitless)
|
||||
*sph/e* value = energy of SPH particles (need units)
|
||||
value can be an atom-style variable (see below)
|
||||
*sph/cv* value = heat capacity of SPH particles (need units)
|
||||
@ -506,6 +508,10 @@ by the *bond types* (\ *angle types*, etc) field in the header of the
|
||||
data file read by the :doc:`read_data <read_data>` command. These
|
||||
keywords do not allow use of an atom-style variable.
|
||||
|
||||
Keywords *rheo/rho* and *rheo/status* set the density and the status of
|
||||
rheo particles. In particular, one can only set the phase in the status
|
||||
as described by the :doc:`RHEO howto page <Howto_rheo>`.
|
||||
|
||||
Keywords *sph/e*, *sph/cv*, and *sph/rho* set the energy, heat capacity,
|
||||
and density of smoothed particle hydrodynamics (SPH) particles. See
|
||||
`this PDF guide <PDF/SPH_LAMMPS_userguide.pdf>`_ to using SPH in LAMMPS.
|
||||
|
||||
@ -67,7 +67,7 @@ Syntax
|
||||
bound(group,dir,region), gyration(group,region), ke(group,reigon),
|
||||
angmom(group,dim,region), torque(group,dim,region),
|
||||
inertia(group,dimdim,region), omega(group,dim,region)
|
||||
special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label)
|
||||
special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label), is_timeout()
|
||||
feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id)
|
||||
atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i]
|
||||
atom vector = id, mass, type, mol, radius, q, x, y, z, vx, vy, vz, fx, fy, fz
|
||||
@ -547,7 +547,7 @@ variables.
|
||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Region functions | count(ID,IDR), mass(ID,IDR), charge(ID,IDR), xcm(ID,dim,IDR), vcm(ID,dim,IDR), fcm(ID,dim,IDR), bound(ID,dir,IDR), gyration(ID,IDR), ke(ID,IDR), angmom(ID,dim,IDR), torque(ID,dim,IDR), inertia(ID,dimdim,IDR), omega(ID,dim,IDR) |
|
||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Special functions | sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label) |
|
||||
| Special functions | sum(x), min(x), max(x), ave(x), trap(x), slope(x), sort(x), rsort(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), is_os(name), extract_setting(name), label2type(kind,label), is_typelabel(kind,label), is_timeout() |
|
||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Feature functions | is_available(category,feature), is_active(category,feature), is_defined(category,id) |
|
||||
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@ -957,7 +957,7 @@ of points, equally spaced by 1 in their x coordinate: (1,V1), (2,V2),
|
||||
length N. The returned value is the slope of the line. If the line
|
||||
has a single point or is vertical, it returns 1.0e20.
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 27June2024
|
||||
|
||||
The sort(x) and rsort(x) functions sort the data of the input vector by
|
||||
their numeric value: sort(x) sorts in ascending order, rsort(x) sorts
|
||||
@ -1042,6 +1042,20 @@ label2type(), but returns 1 if the type label has been assigned,
|
||||
otherwise it returns 0. This function can be used to check if a
|
||||
particular type label already exists in the simulation.
|
||||
|
||||
.. versionadded:: TBD
|
||||
|
||||
The is_timeout() function returns 1 when the :doc:`timer timeout
|
||||
<timer>` has expired otherwise it returns 0. This function can be used
|
||||
to check inputs in combination with the :doc:`if command <if>` to
|
||||
execute commands after the timer has expired. Example:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
variable timeout equal is_timeout()
|
||||
timer timeout 0:10:00 every 10
|
||||
run 10000
|
||||
if ${timeout} then "print 'Timer has expired'"
|
||||
|
||||
----------
|
||||
|
||||
Feature Functions
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
Sphinx >= 5.3.0, <8.0
|
||||
sphinxcontrib-spelling
|
||||
sphinxcontrib-jquery
|
||||
sphinx-design
|
||||
git+https://github.com/akohlmey/sphinx-fortran@parallel-read
|
||||
sphinx-tabs>=3.4.1
|
||||
breathe
|
||||
|
||||
@ -41,7 +41,7 @@ sys.path.append(os.path.join(LAMMPS_DOC_DIR, 'utils', 'sphinx-config', '_themes'
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
needs_sphinx = '5.2.0'
|
||||
needs_sphinx = '5.3.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
@ -57,6 +57,7 @@ extensions = [
|
||||
'table_from_list',
|
||||
'tab_or_note',
|
||||
'breathe',
|
||||
'sphinx_design'
|
||||
]
|
||||
|
||||
images_config = {
|
||||
@ -68,7 +69,7 @@ images_config = {
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = {'.rst': 'restructuredtext'}
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
@ -393,6 +393,7 @@ buf
|
||||
builtin
|
||||
Bulacu
|
||||
Bulatov
|
||||
Bulkley
|
||||
Bureekaew
|
||||
burlywood
|
||||
Bussi
|
||||
@ -564,6 +565,7 @@ cond
|
||||
conda
|
||||
Conda
|
||||
Condens
|
||||
conductivities
|
||||
conf
|
||||
config
|
||||
configfile
|
||||
@ -1099,6 +1101,7 @@ excv
|
||||
exe
|
||||
executables
|
||||
extep
|
||||
extractable
|
||||
extrema
|
||||
extxyz
|
||||
exy
|
||||
@ -1173,6 +1176,7 @@ finitecutflag
|
||||
Finnis
|
||||
Fiorin
|
||||
fitpod
|
||||
fivebody
|
||||
fixID
|
||||
fj
|
||||
Fji
|
||||
@ -1439,6 +1443,7 @@ henrich
|
||||
Henrich
|
||||
Hermitian
|
||||
Herrmann
|
||||
Hershchel
|
||||
Hertizian
|
||||
hertzian
|
||||
Hertzsch
|
||||
@ -1830,6 +1835,7 @@ Kspace
|
||||
KSpace
|
||||
KSpaceStyle
|
||||
Kspring
|
||||
kstyle
|
||||
kT
|
||||
kTequil
|
||||
kth
|
||||
@ -2270,6 +2276,7 @@ modelled
|
||||
modelling
|
||||
Modelling
|
||||
Modine
|
||||
modularity
|
||||
moduli
|
||||
mofff
|
||||
MOFFF
|
||||
@ -2487,6 +2494,7 @@ Neumann
|
||||
Nevent
|
||||
nevery
|
||||
Nevery
|
||||
Nevins
|
||||
newfile
|
||||
Newns
|
||||
newtype
|
||||
@ -2897,6 +2905,7 @@ Pmolrotate
|
||||
Pmoltrans
|
||||
pN
|
||||
png
|
||||
podd
|
||||
Podhorszki
|
||||
Poiseuille
|
||||
poisson
|
||||
@ -3065,6 +3074,7 @@ quatw
|
||||
queryargs
|
||||
Queteschiner
|
||||
quickmin
|
||||
quintic
|
||||
qw
|
||||
qx
|
||||
qy
|
||||
@ -3076,6 +3086,7 @@ radialscreenedspin
|
||||
radialspin
|
||||
radian
|
||||
radians
|
||||
radiative
|
||||
radj
|
||||
Rafferty
|
||||
rahman
|
||||
@ -3179,6 +3190,7 @@ rg
|
||||
Rg
|
||||
Rhaphson
|
||||
Rhe
|
||||
rheo
|
||||
rheological
|
||||
rheology
|
||||
rhodo
|
||||
@ -3266,6 +3278,7 @@ rsort
|
||||
rsq
|
||||
rst
|
||||
rstyle
|
||||
rsurf
|
||||
Rubensson
|
||||
Rubia
|
||||
Rud
|
||||
@ -3370,6 +3383,7 @@ setmask
|
||||
Setmask
|
||||
setpoint
|
||||
setvel
|
||||
sevenbody
|
||||
sfftw
|
||||
sfree
|
||||
Sg
|
||||
@ -3420,6 +3434,7 @@ SiO
|
||||
Siochi
|
||||
Sirk
|
||||
Sival
|
||||
sixbody
|
||||
sizeI
|
||||
sizeJ
|
||||
sizex
|
||||
@ -3647,6 +3662,7 @@ Telsa
|
||||
tempCorrCoeff
|
||||
templated
|
||||
Templeton
|
||||
Tencer
|
||||
Tequil
|
||||
ters
|
||||
tersoff
|
||||
@ -3735,7 +3751,6 @@ tokyo
|
||||
tol
|
||||
tomic
|
||||
toolchain
|
||||
toolset
|
||||
topologies
|
||||
Toporov
|
||||
Torder
|
||||
@ -3813,6 +3828,7 @@ typeJ
|
||||
typelabel
|
||||
typeN
|
||||
typesafe
|
||||
typestr
|
||||
Tz
|
||||
Tzou
|
||||
ub
|
||||
@ -3993,6 +4009,7 @@ Vries
|
||||
Vsevolod
|
||||
Vsmall
|
||||
Vstream
|
||||
vstyle
|
||||
vtarget
|
||||
vtk
|
||||
VTK
|
||||
|
||||
@ -101,6 +101,8 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
ADDSYM(extract_setting);
|
||||
ADDSYM(extract_global_datatype);
|
||||
ADDSYM(extract_global);
|
||||
ADDSYM(extract_pair_dimension);
|
||||
ADDSYM(extract_pair);
|
||||
ADDSYM(map_atom);
|
||||
|
||||
ADDSYM(extract_atom_datatype);
|
||||
|
||||
@ -144,11 +144,13 @@ struct _liblammpsplugin {
|
||||
int (*get_mpi_comm)(void *);
|
||||
|
||||
int (*extract_setting)(void *, const char *);
|
||||
int *(*extract_global_datatype)(void *, const char *);
|
||||
int (*extract_global_datatype)(void *, const char *);
|
||||
void *(*extract_global)(void *, const char *);
|
||||
void *(*map_atom)(void *, const void *);
|
||||
int (*extract_pair_dimension)(void *, const char *);
|
||||
void *(*extract_pair)(void *, const char *);
|
||||
int (*map_atom)(void *, const void *);
|
||||
|
||||
int *(*extract_atom_datatype)(void *, const char *);
|
||||
int (*extract_atom_datatype)(void *, const char *);
|
||||
void *(*extract_atom)(void *, const char *);
|
||||
|
||||
void *(*extract_compute)(void *, const char *, int, int);
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
*.csv
|
||||
*.txt
|
||||
*.lammpstrj
|
||||
|
||||
@ -17,14 +17,22 @@ q_ref = float(ref_line[3])
|
||||
inv11_ref = float(ref_line[4])
|
||||
inv12_ref = float(ref_line[5])
|
||||
b1_ref = float(ref_line[6])
|
||||
felec1_ref = float(ref_line[8])
|
||||
felyt1_ref = float(ref_line[10])
|
||||
press_ref = float(ref_line[12])
|
||||
|
||||
# out.csv
|
||||
with open(sys.argv[2]) as f:
|
||||
out_line = f.readlines()[-1].split(", ")
|
||||
e_out = float(out_line[0])
|
||||
q_out = float(out_line[1])
|
||||
press_out = float(out_line[2])
|
||||
|
||||
out_lines = [("energy", e_ref, e_out), ("charge", q_ref, q_out)]
|
||||
out_lines = [
|
||||
("energy", e_ref, e_out),
|
||||
("charge", q_ref, q_out),
|
||||
("pressure", press_ref, press_out),
|
||||
]
|
||||
|
||||
# vec.csv
|
||||
vec_file = "vec.csv"
|
||||
@ -44,6 +52,14 @@ if op.isfile(inv_file):
|
||||
inv12_out = float(inv_line[1])
|
||||
out_lines.append(("inv11", inv11_ref, inv11_out))
|
||||
|
||||
# forces.lammpstrj
|
||||
force_file = "forces.lammpstrj"
|
||||
with open(force_file) as f:
|
||||
lines = f.readlines()[9:]
|
||||
for name, i, f_ref in [("felec1", "1", felec1_ref), ("felyt1", "3", felyt1_ref)]:
|
||||
f_out = next(float(y[3]) for x in lines if (y := x.split()) and y[0] == i)
|
||||
out_lines.append((name, f_ref, f_out))
|
||||
|
||||
lines = []
|
||||
for label, ref, out in out_lines:
|
||||
error = rel_error(out, ref)
|
||||
|
||||
@ -8,7 +8,7 @@ thermo_style custom step pe c_qbot c_qtop
|
||||
fix feta all property/atom d_eta ghost on
|
||||
set group bot d_eta 0.5
|
||||
set group top d_eta 3.0
|
||||
fix conp bot electrode/conp 0 2 couple top 1 symm on eta d_eta algo cg 1e-6
|
||||
fix conp bot electrode/conp 0 NULL couple top 1 symm on eta d_eta algo cg 1e-6
|
||||
|
||||
run 0
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ thermo_style custom step pe c_qbot c_qtop
|
||||
fix feta all property/atom d_eta ghost on
|
||||
set group bot d_eta 0.5
|
||||
set group top d_eta 3.0
|
||||
fix conp bot electrode/conp 0 2 couple top 1 symm on eta d_eta write_inv inv.csv write_vec vec.csv
|
||||
fix conp bot electrode/conp 0 NULL couple top 1 symm on eta d_eta write_inv inv.csv write_vec vec.csv
|
||||
|
||||
run 0
|
||||
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
from scipy.special import erf
|
||||
|
||||
SQRT2 = np.sqrt(2)
|
||||
SQRTPI_INV = 1 / np.sqrt(np.pi)
|
||||
COULOMB = 332.06371 # Coulomb constant in Lammps 'real' units
|
||||
QE2F = 23.060549
|
||||
NKTV2P = 68568.415 # pressure in 'real' units
|
||||
LENGTH = 10000 # convergence parameter
|
||||
LZ = 20
|
||||
|
||||
|
||||
def lattice(length):
|
||||
@ -26,6 +31,25 @@ def b_element(r, q, eta):
|
||||
return q * erf(eta * r) / r
|
||||
|
||||
|
||||
def force_gauss(r, qq, eta):
|
||||
etar = eta * r
|
||||
return (qq / np.square(r)) * (
|
||||
erf(etar) - 2 * etar * SQRTPI_INV * np.exp(-np.square(etar))
|
||||
)
|
||||
|
||||
|
||||
def force_point(r, qq):
|
||||
return qq / np.square(r)
|
||||
|
||||
|
||||
def force_component(dx, d, qq, eta=None):
|
||||
if eta:
|
||||
return np.sum(dx / d * force_gauss(d, qq, eta))
|
||||
else:
|
||||
return np.sum(dx / d * force_point(d, qq))
|
||||
|
||||
|
||||
time_start = time.perf_counter()
|
||||
a = 1 # nearest neighbor distance i.e. lattice constant / sqrt(2)
|
||||
x_elec = [-2, 2]
|
||||
x_elyt = [-1, 1]
|
||||
@ -36,8 +60,20 @@ v = np.array([-0.5, 0.5]) * (QE2F / COULOMB)
|
||||
# distances to images within electrode and to opposite electrode
|
||||
distances = a * np.linalg.norm(lattice(LENGTH), axis=1)
|
||||
opposite_distances = np.sqrt(np.square(distances) + distance_plates**2)
|
||||
image_distances = []
|
||||
for x in x_elec:
|
||||
image_distances.append([])
|
||||
for y in x_elyt:
|
||||
image_distances[-1].append(np.sqrt(np.square(distances) + np.abs(y - x) ** 2))
|
||||
image_elyt_distances = [[None for _ in range(len(x_elyt))] for _ in range(len(x_elyt))]
|
||||
for i, (xi, qi) in enumerate(zip(x_elyt, q_elyt)):
|
||||
for j, (xj, qj) in list(enumerate(zip(x_elyt, q_elyt)))[i + 1 :]:
|
||||
image_elyt_distances[i][j] = np.sqrt(
|
||||
np.square(distances) + np.abs(xj - xi) ** 2
|
||||
)
|
||||
|
||||
for name, eta_elec in [("", [2.0, 2.0]), ("_eta_mix", [0.5, 3.0])]:
|
||||
# for name, eta_elec in [("", [2.0, 2.0])]:
|
||||
eta_mix = np.prod(eta_elec) / np.sqrt(np.sum(np.square(eta_elec)))
|
||||
# self interaction and within original box
|
||||
A_11 = np.sqrt(2 / np.pi) * eta_elec[0]
|
||||
@ -55,22 +91,18 @@ for name, eta_elec in [("", [2.0, 2.0]), ("_eta_mix", [0.5, 3.0])]:
|
||||
|
||||
# electrode-electrolyte interaction
|
||||
b = []
|
||||
for x, eta in zip(x_elec, eta_elec):
|
||||
for i, (x, eta) in enumerate(zip(x_elec, eta_elec)):
|
||||
bi = 0
|
||||
for y, q in zip(x_elyt, q_elyt):
|
||||
d = abs(y - x)
|
||||
bi += b_element(d, q, eta)
|
||||
image_distances = np.sqrt(np.square(distances) + d**2)
|
||||
bi += 4 * np.sum(b_element(image_distances, q, eta))
|
||||
for j, (y, q) in enumerate(zip(x_elyt, q_elyt)):
|
||||
bi += b_element(np.abs(y - x), q, eta)
|
||||
bi += 4 * np.sum(b_element(image_distances[i][j], q, eta))
|
||||
b.append(bi)
|
||||
b = np.array(b)
|
||||
|
||||
# electrolyte-electrolyte energy
|
||||
elyt_11 = 4 * np.sum(1 / distances)
|
||||
distance_elyt = x_elyt[1] - x_elyt[0]
|
||||
elyt_12 = 1 / distance_elyt + 4 * np.sum(
|
||||
1 / np.sqrt(np.square(distances) + distance_elyt**2)
|
||||
)
|
||||
elyt_12 = 1 / distance_elyt + 4 * np.sum(1 / image_elyt_distances[0][1])
|
||||
elyt = np.array([[elyt_11, elyt_12], [elyt_12, elyt_11]])
|
||||
energy_elyt = 0.5 * np.dot(q_elyt, np.dot(elyt, q_elyt))
|
||||
|
||||
@ -78,9 +110,48 @@ for name, eta_elec in [("", [2.0, 2.0]), ("_eta_mix", [0.5, 3.0])]:
|
||||
q = np.dot(inv, v - b)
|
||||
energy = COULOMB * (0.5 * np.dot(q, np.dot(A, q)) + np.dot(b, q) + energy_elyt)
|
||||
|
||||
# forces in out-of-plane direction
|
||||
f_elec = np.zeros(len(x_elec))
|
||||
f_elyt = np.zeros(len(x_elyt))
|
||||
# electrode-electrode
|
||||
dx = x_elec[1] - x_elec[0]
|
||||
fij_box = force_component(dx, np.abs(dx), q[0] * q[1], eta_mix)
|
||||
fij_img = 4 * force_component(dx, opposite_distances, q[0] * q[1], eta_mix)
|
||||
f_elec[0] -= fij_box + fij_img
|
||||
f_elec[1] += fij_box + fij_img
|
||||
# electrode-electrolyte
|
||||
for i, (xi, qi, etai) in enumerate(zip(x_elec, q, eta_elec)):
|
||||
for j, (xj, qj) in enumerate(zip(x_elyt, q_elyt)):
|
||||
dx = xj - xi
|
||||
fij_box = force_component(dx, np.abs(dx), qi * qj, etai)
|
||||
fij_img = 4 * force_component(dx, image_distances[i][j], qi * qj, etai)
|
||||
f_elec[i] -= fij_box + fij_img
|
||||
f_elyt[j] += fij_box + fij_img
|
||||
# electrolyte-electrolyte
|
||||
for i, (xi, qi) in enumerate(zip(x_elyt, q_elyt)):
|
||||
for j, (xj, qj) in list(enumerate(zip(x_elyt, q_elyt)))[i + 1 :]:
|
||||
dx = xj - xi
|
||||
fij_box = force_component(dx, np.abs(dx), qi * qj)
|
||||
fij_img = 4 * force_component(dx, image_elyt_distances[i][j], qi * qj)
|
||||
f_elyt[i] -= fij_img + fij_box
|
||||
f_elyt[j] += fij_img + fij_box
|
||||
# force units
|
||||
assert np.abs(np.sum(f_elec) + np.sum(f_elyt)) < 1e-8
|
||||
f_elec *= COULOMB
|
||||
f_elyt *= COULOMB
|
||||
|
||||
# Virial
|
||||
volume = a**2 * LZ
|
||||
virial = 0.0
|
||||
for x, f in [(x_elec, f_elec), (x_elyt, f_elyt)]:
|
||||
virial += np.dot(x, f)
|
||||
pressure = NKTV2P * virial / volume
|
||||
|
||||
with open(f"plate_cap{name}.csv", "w") as f:
|
||||
f.write(
|
||||
"length, energy / kcal/mol, q1 / e, q2 / e, inv11 / A, inv12 / A, b1 / e/A, b2 / e/A\n"
|
||||
"length, energy / kcal/mol, q1 / e, q2 / e, inv11 / A, inv12 / A"
|
||||
+ ", b1 / e/A, b2 / e/A, felec1 / kcal/mol/A, felec2 / kcal/mol/A"
|
||||
+ ", felyt1 / kcal/mol/A, felyt2 / kcal/mol/A, press\n"
|
||||
)
|
||||
f.write(
|
||||
", ".join(
|
||||
@ -93,7 +164,14 @@ for name, eta_elec in [("", [2.0, 2.0]), ("_eta_mix", [0.5, 3.0])]:
|
||||
f"{inv[0, 1]:.10f}",
|
||||
f"{b[0]:.8f}",
|
||||
f"{b[1]:.8f}",
|
||||
f"{f_elec[0]:.5f}",
|
||||
f"{f_elec[1]:.5f}",
|
||||
f"{f_elyt[0]:.5f}",
|
||||
f"{f_elyt[1]:.5f}",
|
||||
f"{pressure:.2f}",
|
||||
]
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
time_end = time.perf_counter()
|
||||
print(f"{time_end - time_start:0.4f} seconds")
|
||||
|
||||
@ -19,4 +19,8 @@ compute qtop top reduce sum v_q
|
||||
compute compute_pe all pe
|
||||
variable vpe equal c_compute_pe
|
||||
variable charge equal c_qtop
|
||||
fix fxprint all print 1 "${vpe}, ${charge}" file "out.csv"
|
||||
compute press all pressure NULL virial
|
||||
variable p3 equal c_press[3]
|
||||
fix fxprint all print 1 "${vpe}, ${charge}, ${p3}" file "out.csv"
|
||||
|
||||
dump dump_forces all custom 1 forces.lammpstrj id fx fy fz
|
||||
|
||||
@ -42,7 +42,11 @@ fix fxforce_au gold setforce 0.0 0.0 0.0
|
||||
|
||||
# equilibrate z-coordinate of upper electrode while keeping the electrode rigid
|
||||
fix fxforce_wa wall setforce 0.0 0.0 NULL
|
||||
fix fxpressure wall aveforce 0 0 -0.005246 # atomspheric pressure: area/force->nktv2p
|
||||
variable atm equal 1/68568.415 # 1/force->nktv2p
|
||||
variable area equal (xhi-xlo)*(yhi-ylo)
|
||||
variable wall_force equal -v_atm*v_area/count(wall)
|
||||
print "Wall force per atom: ${wall_force}"
|
||||
fix fxpressure wall aveforce 0 0 ${wall_force} # atomspheric pressure: area/force->nktv2p
|
||||
fix fxdrag wall viscous 100
|
||||
fix fxrigid wall rigid/nve single
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
LAMMPS (3 Nov 2022)
|
||||
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-217-g1909233c69-modified)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# The intention is to find the average position of one wall at atmospheric
|
||||
# pressure. The output is the wall position over time which can be used to
|
||||
# find the average position for a run with fixed wall position.
|
||||
@ -40,8 +41,8 @@ Finding 1-2 1-3 1-4 neighbors ...
|
||||
1 = max # of 1-3 neighbors
|
||||
1 = max # of 1-4 neighbors
|
||||
2 = max # of special neighbors
|
||||
special bonds CPU = 0.001 seconds
|
||||
read_data CPU = 0.011 seconds
|
||||
special bonds CPU = 0.000 seconds
|
||||
read_data CPU = 0.012 seconds
|
||||
|
||||
# ----------------- Settings Section -----------------
|
||||
|
||||
@ -77,7 +78,13 @@ fix fxforce_au gold setforce 0.0 0.0 0.0
|
||||
|
||||
# equilibrate z-coordinate of upper electrode while keeping the electrode rigid
|
||||
fix fxforce_wa wall setforce 0.0 0.0 NULL
|
||||
fix fxpressure wall aveforce 0 0 -0.005246 # atomspheric pressure: area/force->nktv2p
|
||||
variable atm equal 1/68568.415 # 1/force->nktv2p
|
||||
variable area equal (xhi-xlo)*(yhi-ylo)
|
||||
variable wall_force equal -v_atm*v_area/count(wall)
|
||||
print "Wall force per atom: ${wall_force}"
|
||||
Wall force per atom: -0.000109285996244287
|
||||
fix fxpressure wall aveforce 0 0 ${wall_force} # atomspheric pressure: area/force->nktv2p
|
||||
fix fxpressure wall aveforce 0 0 -0.000109285996244287
|
||||
fix fxdrag wall viscous 100
|
||||
fix fxrigid wall rigid/nve single
|
||||
1 rigid bodies with 48 atoms
|
||||
@ -134,7 +141,7 @@ PPPM/electrode initialization ...
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.02930901
|
||||
estimated relative force accuracy = 8.8263214e-05
|
||||
using double precision MKL FFT
|
||||
using double precision FFTW3
|
||||
3d grid and FFT values/proc = 15884 6480
|
||||
Generated 6 of 6 mixed pair_coeff terms from arithmetic mixing rule
|
||||
Neighbor list info ...
|
||||
@ -157,54 +164,54 @@ Neighbor list info ...
|
||||
Per MPI rank memory allocation (min/avg/max) = 11.7 | 11.7 | 11.7 Mbytes
|
||||
Step c_temp_mobile c_qwa c_qau v_top_wall
|
||||
0 303.38967 -0.042963484 0.042963484 21.4018
|
||||
5000 285.08828 -0.26105255 0.26105255 25.155629
|
||||
10000 323.19176 -0.26264003 0.26264003 24.541676
|
||||
15000 310.479 -0.27318148 0.27318148 23.141522
|
||||
20000 295.18544 -0.11313444 0.11313444 23.828735
|
||||
25000 295.38607 -0.25433086 0.25433086 23.673314
|
||||
30000 288.0613 -0.30099901 0.30099901 23.438086
|
||||
35000 278.5591 -0.15823576 0.15823576 24.311915
|
||||
40000 303.95751 -0.19941381 0.19941381 23.69594
|
||||
45000 279.026 -0.1659962 0.1659962 23.588604
|
||||
50000 298.79278 -0.28866703 0.28866703 23.372508
|
||||
55000 301.03353 -0.078370381 0.078370381 23.192985
|
||||
60000 306.77965 -0.12807205 0.12807205 23.968574
|
||||
65000 309.86008 -0.27162663 0.27162663 23.616704
|
||||
70000 287.31116 -0.029751882 0.029751882 23.667495
|
||||
75000 312.48654 -0.10759866 0.10759866 23.504105
|
||||
80000 309.94267 -0.2558548 0.2558548 23.810576
|
||||
85000 328.04389 -0.1575471 0.1575471 24.013437
|
||||
90000 302.9806 -0.032002164 0.032002164 24.264432
|
||||
95000 294.20804 -0.27797238 0.27797238 23.291758
|
||||
100000 307.63019 -0.19047448 0.19047448 23.632147
|
||||
Loop time of 530.844 on 1 procs for 100000 steps with 726 atoms
|
||||
5000 311.85363 0.03543775 -0.03543775 24.79665
|
||||
10000 285.91321 -0.16873703 0.16873703 23.103088
|
||||
15000 295.39476 -0.44424612 0.44424612 23.767107
|
||||
20000 296.12969 -0.14120993 0.14120993 23.96361
|
||||
25000 306.59629 -0.29333182 0.29333182 23.884488
|
||||
30000 297.98559 -0.10749684 0.10749684 23.73316
|
||||
35000 297.98503 -0.11809975 0.11809975 23.984669
|
||||
40000 300.26292 -0.32784184 0.32784184 23.462748
|
||||
45000 295.68441 -0.25940165 0.25940165 23.516403
|
||||
50000 315.12883 -0.36037614 0.36037614 23.627879
|
||||
55000 290.55151 -0.0032838106 0.0032838106 23.684931
|
||||
60000 316.4625 -0.17245368 0.17245368 24.126883
|
||||
65000 296.79343 -0.054061851 0.054061851 23.695094
|
||||
70000 305.99923 -0.11363801 0.11363801 23.55476
|
||||
75000 297.40131 -0.27054153 0.27054153 23.928994
|
||||
80000 306.54811 -0.25409719 0.25409719 23.869448
|
||||
85000 303.95231 -0.17895561 0.17895561 23.658833
|
||||
90000 313.43739 -0.059036514 0.059036514 23.36056
|
||||
95000 290.3077 -0.31394478 0.31394478 23.885538
|
||||
100000 297.5156 -0.30730083 0.30730083 23.511674
|
||||
Loop time of 1586.06 on 1 procs for 100000 steps with 726 atoms
|
||||
|
||||
Performance: 32.552 ns/day, 0.737 hours/ns, 188.379 timesteps/s, 136.763 katom-step/s
|
||||
100.0% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
Performance: 10.895 ns/day, 2.203 hours/ns, 63.049 timesteps/s, 45.774 katom-step/s
|
||||
99.6% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 190.47 | 190.47 | 190.47 | 0.0 | 35.88
|
||||
Bond | 0.10754 | 0.10754 | 0.10754 | 0.0 | 0.02
|
||||
Kspace | 73.179 | 73.179 | 73.179 | 0.0 | 13.79
|
||||
Neigh | 24.209 | 24.209 | 24.209 | 0.0 | 4.56
|
||||
Comm | 1.6857 | 1.6857 | 1.6857 | 0.0 | 0.32
|
||||
Output | 0.0016861 | 0.0016861 | 0.0016861 | 0.0 | 0.00
|
||||
Modify | 240.23 | 240.23 | 240.23 | 0.0 | 45.26
|
||||
Other | | 0.9595 | | | 0.18
|
||||
Pair | 460.91 | 460.91 | 460.91 | 0.0 | 29.06
|
||||
Bond | 0.047873 | 0.047873 | 0.047873 | 0.0 | 0.00
|
||||
Kspace | 341.4 | 341.4 | 341.4 | 0.0 | 21.53
|
||||
Neigh | 52.868 | 52.868 | 52.868 | 0.0 | 3.33
|
||||
Comm | 5.2321 | 5.2321 | 5.2321 | 0.0 | 0.33
|
||||
Output | 0.00099102 | 0.00099102 | 0.00099102 | 0.0 | 0.00
|
||||
Modify | 724.63 | 724.63 | 724.63 | 0.0 | 45.69
|
||||
Other | | 0.9741 | | | 0.06
|
||||
|
||||
Nlocal: 726 ave 726 max 726 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 2335 ave 2335 max 2335 min
|
||||
Nghost: 2336 ave 2336 max 2336 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 120271 ave 120271 max 120271 min
|
||||
Neighs: 120321 ave 120321 max 120321 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 120271
|
||||
Ave neighs/atom = 165.66253
|
||||
Total # of neighbors = 120321
|
||||
Ave neighs/atom = 165.7314
|
||||
Ave special neighs/atom = 1.7355372
|
||||
Neighbor list builds = 7722
|
||||
Neighbor list builds = 7670
|
||||
Dangerous builds = 0
|
||||
write_data "data.piston.final"
|
||||
System init for write_data ...
|
||||
@ -213,11 +220,11 @@ PPPM/electrode initialization ...
|
||||
G vector (1/distance) = 0.32814871
|
||||
grid = 12 15 36
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.029311365
|
||||
estimated relative force accuracy = 8.8270304e-05
|
||||
using double precision MKL FFT
|
||||
estimated absolute RMS force accuracy = 0.029311329
|
||||
estimated relative force accuracy = 8.8270197e-05
|
||||
using double precision FFTW3
|
||||
3d grid and FFT values/proc = 15884 6480
|
||||
Generated 6 of 6 mixed pair_coeff terms from arithmetic mixing rule
|
||||
|
||||
Average conjugate gradient steps: 1.981
|
||||
Total wall time: 0:08:50
|
||||
Total wall time: 0:26:26
|
||||
@ -1,4 +1,5 @@
|
||||
LAMMPS (3 Nov 2022)
|
||||
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-217-g1909233c69-modified)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# The intention is to find the average position of one wall at atmospheric
|
||||
# pressure. The output is the wall position over time which can be used to
|
||||
# find the average position for a run with fixed wall position.
|
||||
@ -41,8 +42,8 @@ Finding 1-2 1-3 1-4 neighbors ...
|
||||
1 = max # of 1-3 neighbors
|
||||
1 = max # of 1-4 neighbors
|
||||
2 = max # of special neighbors
|
||||
special bonds CPU = 0.001 seconds
|
||||
read_data CPU = 0.017 seconds
|
||||
special bonds CPU = 0.000 seconds
|
||||
read_data CPU = 0.012 seconds
|
||||
|
||||
# ----------------- Settings Section -----------------
|
||||
|
||||
@ -66,7 +67,7 @@ Finding SHAKE clusters ...
|
||||
0 = # of size 3 clusters
|
||||
0 = # of size 4 clusters
|
||||
210 = # of frozen angles
|
||||
find clusters CPU = 0.002 seconds
|
||||
find clusters CPU = 0.000 seconds
|
||||
pair_modify mix arithmetic
|
||||
|
||||
# ----------------- Run Section -----------------
|
||||
@ -78,7 +79,13 @@ fix fxforce_au gold setforce 0.0 0.0 0.0
|
||||
|
||||
# equilibrate z-coordinate of upper electrode while keeping the electrode rigid
|
||||
fix fxforce_wa wall setforce 0.0 0.0 NULL
|
||||
fix fxpressure wall aveforce 0 0 -0.005246 # atomspheric pressure: area/force->nktv2p
|
||||
variable atm equal 1/68568.415 # 1/force->nktv2p
|
||||
variable area equal (xhi-xlo)*(yhi-ylo)
|
||||
variable wall_force equal -v_atm*v_area/count(wall)
|
||||
print "Wall force per atom: ${wall_force}"
|
||||
Wall force per atom: -0.000109285996244287
|
||||
fix fxpressure wall aveforce 0 0 ${wall_force} # atomspheric pressure: area/force->nktv2p
|
||||
fix fxpressure wall aveforce 0 0 -0.000109285996244287
|
||||
fix fxdrag wall viscous 100
|
||||
fix fxrigid wall rigid/nve single
|
||||
1 rigid bodies with 48 atoms
|
||||
@ -135,7 +142,7 @@ PPPM/electrode initialization ...
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.02930901
|
||||
estimated relative force accuracy = 8.8263214e-05
|
||||
using double precision MKL FFT
|
||||
using double precision FFTW3
|
||||
3d grid and FFT values/proc = 8512 2880
|
||||
Generated 6 of 6 mixed pair_coeff terms from arithmetic mixing rule
|
||||
Neighbor list info ...
|
||||
@ -158,54 +165,54 @@ Neighbor list info ...
|
||||
Per MPI rank memory allocation (min/avg/max) = 10.06 | 10.22 | 10.41 Mbytes
|
||||
Step c_temp_mobile c_qwa c_qau v_top_wall
|
||||
0 303.38967 -0.042963484 0.042963484 21.4018
|
||||
5000 292.03027 -0.19040435 0.19040435 24.581338
|
||||
10000 309.52764 -0.48308301 0.48308301 23.776985
|
||||
15000 295.00243 -0.16591109 0.16591109 23.672038
|
||||
20000 293.5536 -0.086669084 0.086669084 23.426455
|
||||
25000 303.0079 -0.16488112 0.16488112 23.862966
|
||||
30000 306.31463 -0.23192653 0.23192653 23.819882
|
||||
35000 303.66268 -0.2317907 0.2317907 23.495344
|
||||
40000 301.39435 -0.34661329 0.34661329 23.657835
|
||||
45000 291.61205 -0.30539427 0.30539427 23.437303
|
||||
50000 298.65319 -0.096107034 0.096107034 23.57809
|
||||
55000 282.65069 -0.14943539 0.14943539 23.823728
|
||||
60000 310.64182 -0.17418813 0.17418813 23.286959
|
||||
65000 308.47141 -0.02075662 0.02075662 23.91313
|
||||
70000 292.5186 -0.080163162 0.080163162 23.96283
|
||||
75000 270.13928 -0.029528648 0.029528648 23.488972
|
||||
80000 322.10914 0.030761045 -0.030761045 23.47592
|
||||
85000 310.60347 -0.24069996 0.24069996 23.987091
|
||||
90000 294.35695 -0.070458235 0.070458235 23.397929
|
||||
95000 308.69043 -0.2652581 0.2652581 23.473813
|
||||
100000 318.71883 0.024035956 -0.024035956 23.449863
|
||||
Loop time of 590.232 on 4 procs for 100000 steps with 726 atoms
|
||||
5000 291.6303 -0.1820085 0.1820085 24.641399
|
||||
10000 299.42886 -0.19823095 0.19823095 23.820522
|
||||
15000 288.23071 -0.065261869 0.065261869 23.360845
|
||||
20000 299.4644 -0.042993777 0.042993777 23.987554
|
||||
25000 304.26497 -0.15665293 0.15665293 23.729006
|
||||
30000 292.29674 -0.25142779 0.25142779 23.960725
|
||||
35000 295.57492 -0.01269228 0.01269228 23.445383
|
||||
40000 303.38438 -0.13941727 0.13941727 23.517483
|
||||
45000 302.211 -0.19589892 0.19589892 23.704043
|
||||
50000 281.64939 -0.18057298 0.18057298 23.542137
|
||||
55000 274.90565 -0.15453379 0.15453379 23.734347
|
||||
60000 290.70459 -0.27977436 0.27977436 23.835365
|
||||
65000 293.42241 -0.2454241 0.2454241 23.59269
|
||||
70000 295.20229 -0.041314995 0.041314995 23.73856
|
||||
75000 297.79519 -0.11231755 0.11231755 23.57262
|
||||
80000 285.17858 -0.070796508 0.070796508 23.817135
|
||||
85000 311.71609 -0.068920177 0.068920177 23.861127
|
||||
90000 287.80446 -0.19183387 0.19183387 23.369393
|
||||
95000 309.43345 -0.15238671 0.15238671 23.597792
|
||||
100000 294.12422 -0.14284353 0.14284353 23.526286
|
||||
Loop time of 876.546 on 4 procs for 100000 steps with 726 atoms
|
||||
|
||||
Performance: 29.277 ns/day, 0.820 hours/ns, 169.425 timesteps/s, 123.003 katom-step/s
|
||||
72.5% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
Performance: 19.714 ns/day, 1.217 hours/ns, 114.084 timesteps/s, 82.825 katom-step/s
|
||||
98.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 | 57.391 | 75.867 | 96.292 | 212.1 | 12.85
|
||||
Bond | 0.10177 | 0.11042 | 0.12415 | 2.7 | 0.02
|
||||
Kspace | 102.79 | 123.16 | 141.5 | 165.7 | 20.87
|
||||
Neigh | 12.808 | 12.895 | 12.982 | 2.3 | 2.18
|
||||
Comm | 18.885 | 19.973 | 21.064 | 24.0 | 3.38
|
||||
Output | 0.0022573 | 0.0022749 | 0.0023225 | 0.1 | 0.00
|
||||
Modify | 355.89 | 356.74 | 357.61 | 4.2 | 60.44
|
||||
Other | | 1.478 | | | 0.25
|
||||
Pair | 123.63 | 171.23 | 215.73 | 336.6 | 19.53
|
||||
Bond | 0.068261 | 0.075883 | 0.081822 | 1.9 | 0.01
|
||||
Kspace | 187.59 | 231.71 | 279.01 | 287.1 | 26.43
|
||||
Neigh | 29.28 | 29.462 | 29.637 | 2.5 | 3.36
|
||||
Comm | 12.544 | 13.731 | 14.929 | 29.1 | 1.57
|
||||
Output | 0.0010182 | 0.0014585 | 0.0016071 | 0.7 | 0.00
|
||||
Modify | 428.74 | 429.25 | 429.74 | 2.3 | 48.97
|
||||
Other | | 1.092 | | | 0.12
|
||||
|
||||
Nlocal: 181.5 ave 207 max 169 min
|
||||
Histogram: 2 0 1 0 0 0 0 0 0 1
|
||||
Nghost: 1961.5 ave 1984 max 1926 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 1 1
|
||||
Neighs: 30051 ave 41646 max 20775 min
|
||||
Histogram: 1 1 0 0 0 0 1 0 0 1
|
||||
Nlocal: 181.5 ave 195 max 166 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 0 2
|
||||
Nghost: 1955.5 ave 1978 max 1931 min
|
||||
Histogram: 1 0 0 0 1 0 1 0 0 1
|
||||
Neighs: 30343 ave 39847 max 20428 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 120204
|
||||
Ave neighs/atom = 165.57025
|
||||
Total # of neighbors = 121372
|
||||
Ave neighs/atom = 167.17906
|
||||
Ave special neighs/atom = 1.7355372
|
||||
Neighbor list builds = 7663
|
||||
Neighbor list builds = 7698
|
||||
Dangerous builds = 0
|
||||
write_data "data.piston.final"
|
||||
System init for write_data ...
|
||||
@ -214,11 +221,11 @@ PPPM/electrode initialization ...
|
||||
G vector (1/distance) = 0.32814871
|
||||
grid = 12 15 36
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.029311028
|
||||
estimated relative force accuracy = 8.8269289e-05
|
||||
using double precision MKL FFT
|
||||
estimated absolute RMS force accuracy = 0.029310954
|
||||
estimated relative force accuracy = 8.8269069e-05
|
||||
using double precision FFTW3
|
||||
3d grid and FFT values/proc = 8512 2880
|
||||
Generated 6 of 6 mixed pair_coeff terms from arithmetic mixing rule
|
||||
|
||||
Average conjugate gradient steps: 1.982
|
||||
Total wall time: 0:09:50
|
||||
Average conjugate gradient steps: 1.981
|
||||
Total wall time: 0:14:36
|
||||