Merge branch 'develop' of github.com:lammps/lammps into ave_histo_vector_bug
This commit is contained in:
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@ -37,7 +37,7 @@ src/MESONT/* @iafoss
|
||||
src/ML-HDNNP/* @singraber
|
||||
src/ML-IAP/* @athomps
|
||||
src/ML-PACE/* @yury-lysogorskiy
|
||||
src/ML-POD/* @exapde @rohskopf
|
||||
src/ML-POD/* @exapde
|
||||
src/MOFFF/* @hheenen
|
||||
src/MOLFILE/* @akohlmey
|
||||
src/NETCDF/* @pastewka
|
||||
@ -65,9 +65,12 @@ src/MANYBODY/pair_nb3b_screened.* @flodesani
|
||||
src/REPLICA/*_grem.* @dstelter92
|
||||
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
|
||||
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
|
||||
src/EXTRA-FIX/fix_deform_pressure.* @jtclemm
|
||||
src/MISC/*_tracker.* @jtclemm
|
||||
src/MC/fix_gcmc.* @athomps
|
||||
src/MC/fix_sgcmc.* @athomps
|
||||
src/REAXFF/compute_reaxff_atom.* @rbberger
|
||||
src/KOKKOS/compute_reaxff_atom_kokkos.* @rbberger
|
||||
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
|
||||
|
||||
# core LAMMPS classes
|
||||
@ -80,7 +83,7 @@ src/bond.* @sjplimp
|
||||
src/comm*.* @sjplimp
|
||||
src/compute.* @sjplimp
|
||||
src/dihedral.* @sjplimp
|
||||
src/domain.* @sjplimp
|
||||
src/domain.* @sjplimp @stanmoore1
|
||||
src/dump*.* @sjplimp
|
||||
src/error.* @sjplimp
|
||||
src/finish.* @sjplimp
|
||||
|
||||
2
.github/workflows/coverity.yml
vendored
2
.github/workflows/coverity.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- name: Cache Coverity
|
||||
id: cache-coverity
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ./download/
|
||||
key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }}
|
||||
|
||||
2
.github/workflows/unittest-macos.yml
vendored
2
.github/workflows/unittest-macos.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
||||
run: mkdir build
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: macos-ccache-${{ github.sha }}
|
||||
|
||||
@ -120,6 +120,19 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
|
||||
set(CMAKE_TUNE_DEFAULT "-Minform=severe")
|
||||
endif()
|
||||
|
||||
# this hack is required to compile fmt lib with CrayClang version 15.0.2
|
||||
# CrayClang is only directly recognized by version 3.28 and later
|
||||
if(CMAKE_VERSION VERSION_LESS 3.28)
|
||||
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
|
||||
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
|
||||
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# silence nvcc warnings
|
||||
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||
@ -209,6 +222,10 @@ endif()
|
||||
add_executable(lmp ${MAIN_SOURCES})
|
||||
target_link_libraries(lmp PRIVATE lammps)
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
|
||||
# re-export all symbols for plugins
|
||||
if(PKG_PLUGIN AND (NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows"))))
|
||||
set_target_properties(lmp PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
endif()
|
||||
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
@ -415,6 +432,7 @@ if(BUILD_OMP)
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)))
|
||||
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
|
||||
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
|
||||
@ -425,6 +443,21 @@ if(BUILD_OMP)
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL})
|
||||
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
||||
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
||||
|
||||
# this hack is required to correctly link with OpenMP support when using CrayClang version 15.0.2
|
||||
# CrayClang is only directly recognized by version 3.28 and later
|
||||
if(CMAKE_VERSION VERSION_LESS 3.28)
|
||||
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# lower C++ standard for fmtlib sources when using Intel classic compiler
|
||||
@ -539,12 +572,12 @@ endforeach()
|
||||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
########################################################################
|
||||
foreach(HEADER cmath)
|
||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
||||
if(NOT FOUND_${HEADER})
|
||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
||||
endif(NOT FOUND_${HEADER})
|
||||
endforeach(HEADER)
|
||||
if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")))
|
||||
check_include_file_cxx(cmath FOUND_CMATH)
|
||||
if(NOT FOUND_CMATH)
|
||||
message(FATAL_ERROR "Could not find the required 'cmath' header")
|
||||
endif(NOT FOUND_CMATH)
|
||||
endif()
|
||||
|
||||
# make the standard math library overrideable and autodetected (for systems that don't have it)
|
||||
find_library(STANDARD_MATH_LIB m DOC "Standard Math library")
|
||||
@ -971,14 +1004,15 @@ if(PKG_KOKKOS)
|
||||
endif()
|
||||
endif()
|
||||
if(PKG_KSPACE)
|
||||
if (LMP_HEFFTE)
|
||||
if (FFT_USE_HEFFTE)
|
||||
message(STATUS "<<< FFT settings >>>
|
||||
-- Primary FFT lib: heFFTe")
|
||||
if (HEFFTE_BACKEND)
|
||||
message(STATUS "heFFTe backend: ${HEFFTE_BACKEND}")
|
||||
if (FFT_HEFFTE_BACKEND)
|
||||
message(STATUS "heFFTe backend: ${FFT_HEFFTE_BACKEND}")
|
||||
else()
|
||||
message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)")
|
||||
endif()
|
||||
message(STATUS "Using distributed FFT algorithms from heFTTe")
|
||||
if(FFT_SINGLE)
|
||||
message(STATUS "Using single precision FFTs")
|
||||
else()
|
||||
@ -997,28 +1031,10 @@ if(PKG_KSPACE)
|
||||
else()
|
||||
message(STATUS "Using non-threaded FFTs")
|
||||
endif()
|
||||
if (FFT_HEFFTE)
|
||||
message(STATUS "Using distributed algorithms from heFTTe")
|
||||
else()
|
||||
message(STATUS "Using builtin distributed algorithms")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(FFT STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: cuFFT")
|
||||
endif()
|
||||
elseif(Kokkos_ENABLE_HIP)
|
||||
if(FFT STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: hipFFT")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: ${FFT}")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "Using builtin distributed FFT algorithms")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
message(STATUS "Kokkos FFT: ${FFT_KOKKOS}")
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_DOC)
|
||||
|
||||
@ -1,11 +1,3 @@
|
||||
if(NOT DEFINED HIP_PATH)
|
||||
if(NOT DEFINED ENV{HIP_PATH})
|
||||
message(FATAL_ERROR "HIP support requires HIP_PATH to be defined.\n"
|
||||
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
|
||||
else()
|
||||
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
if(NOT DEFINED ENV{ROCM_PATH})
|
||||
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
|
||||
@ -13,4 +5,4 @@ if(NOT DEFINED ROCM_PATH)
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||
|
||||
@ -43,5 +43,5 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt")
|
||||
endif()
|
||||
add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}"
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-build")
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-build" EXCLUDE_FROM_ALL)
|
||||
endfunction(ExternalCMakeProject)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
message(STATUS "Downloading and building OpenCL loader library")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2022.01.04.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "8d3a801e87a2c6653bf0e27707063914" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.02.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "f3573cf9daa3558ba46fd5866517f38f" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
mark_as_advanced(OPENCL_LOADER_URL)
|
||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||
|
||||
@ -8,4 +8,3 @@ set(INSTALL_LIBOPENCL OFF CACHE BOOL "" FORCE)
|
||||
include(ExternalCMakeProject)
|
||||
ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "")
|
||||
|
||||
add_library(OpenCL::OpenCL ALIAS OpenCL)
|
||||
|
||||
@ -1,3 +1,10 @@
|
||||
|
||||
# Silence CMake warnings about FindCUDA being obsolete.
|
||||
# We may need to eventually rewrite this section to use enable_language(CUDA)
|
||||
if(POLICY CMP0146)
|
||||
cmake_policy(SET CMP0146 OLD)
|
||||
endif()
|
||||
|
||||
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||
${GPU_SOURCES_DIR}/fix_gpu.h
|
||||
|
||||
@ -111,6 +111,9 @@ if(PKG_KSPACE)
|
||||
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
|
||||
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
||||
endif()
|
||||
if(PKG_ML-SNAP)
|
||||
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/sna_intel.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(lammps PRIVATE ${INTEL_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})
|
||||
|
||||
@ -16,11 +16,6 @@ endif()
|
||||
if(Kokkos_ENABLE_OPENMP)
|
||||
if(NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
|
||||
else()
|
||||
# NVHPC/(AMD)Clang does not seem to provide a detectable OpenMP version, but is far beyond version 3.1
|
||||
if((OpenMP_CXX_VERSION VERSION_LESS 3.1) AND NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
message(FATAL_ERROR "Compiler must support OpenMP 3.1 or later with Kokkos_ENABLE_OPENMP")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
########################################################################
|
||||
@ -50,8 +45,8 @@ if(DOWNLOAD_KOKKOS)
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
include(ExternalProject)
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.2.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "731647b61a4233f568d583702e9cd6d1" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.3.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "889dcea2b5ced3debdc5b0820044bdc4" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
mark_as_advanced(KOKKOS_URL)
|
||||
mark_as_advanced(KOKKOS_MD5)
|
||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||
@ -76,7 +71,7 @@ if(DOWNLOAD_KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 4.2.00 REQUIRED CONFIG)
|
||||
find_package(Kokkos 4.3.00 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
@ -131,16 +126,33 @@ if(PKG_KSPACE)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
|
||||
set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package")
|
||||
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT)
|
||||
set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES})
|
||||
validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES)
|
||||
string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS)
|
||||
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE cufft)
|
||||
if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "CUFFT")))
|
||||
message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
|
||||
elseif(FFT_KOKKOS STREQUAL "KISS")
|
||||
message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.")
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
|
||||
elseif(FFT_KOKKOS STREQUAL "CUFFT")
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE CUDA::cufft)
|
||||
endif()
|
||||
elseif(Kokkos_ENABLE_HIP)
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "HIPFFT")))
|
||||
message(FATAL_ERROR "The HIP backend of Kokkos requires either KISS FFT or HIPFFT.")
|
||||
elseif(FFT_KOKKOS STREQUAL "KISS")
|
||||
message(WARNING "Using KISS FFT with the HIP backend of Kokkos may be sub-optimal.")
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
|
||||
elseif(FFT_KOKKOS STREQUAL "HIPFFT")
|
||||
include(DetectHIPInstallation)
|
||||
find_package(hipfft REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_HIPFFT)
|
||||
target_link_libraries(lammps PRIVATE hip::hipfft)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -48,10 +48,15 @@ endif()
|
||||
|
||||
option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF)
|
||||
if(FFT_USE_HEFFTE)
|
||||
# if FFT_HEFFTE is enabled, switch the builtin FFT engine with Heffte
|
||||
set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL)
|
||||
set(FFT_HEFFTE_BACKEND "" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL")
|
||||
# if FFT_HEFFTE is enabled, use the heFFTe parallel engine instead of the builtin fftMPI engine
|
||||
|
||||
# map standard FFT choices to available heFFTe backends: FFTW3 -> FFTW, KISS -> BUILTIN
|
||||
set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL BUILTIN)
|
||||
string(REPLACE FFTW3 FFTW FFT_HEFFTE_BACKEND_DEFAULT ${FFT})
|
||||
string(REPLACE KISS BUILTIN FFT_HEFFTE_BACKEND_DEFAULT ${FFT_HEFFTE_BACKEND_DEFAULT})
|
||||
set(FFT_HEFFTE_BACKEND "${FFT_HEFFTE_BACKEND_DEFAULT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL")
|
||||
set_property(CACHE FFT_HEFFTE_BACKEND PROPERTY STRINGS ${FFT_HEFFTE_BACKEND_VALUES})
|
||||
validate_option(FFT_HEFFTE_BACKEND FFT_HEFFTE_BACKEND_VALUES)
|
||||
|
||||
if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL
|
||||
set(HEFFTE_COMPONENTS "FFTW")
|
||||
@ -60,24 +65,38 @@ if(FFT_USE_HEFFTE)
|
||||
set(HEFFTE_COMPONENTS "MKL")
|
||||
set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe")
|
||||
else()
|
||||
set(HEFFTE_COMPONENTS "BUILTIN")
|
||||
message(WARNING "FFT_HEFFTE_BACKEND not selected, defaulting to the builtin 'stock' backend, which is intended for testing and is not optimized for production runs")
|
||||
endif()
|
||||
|
||||
find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS})
|
||||
if (NOT Heffte_FOUND) # download and build
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS_WAS_ON YES)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
if(CMAKE_REQUEST_PIC)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
set(Heffte_ENABLE_${FFT_HEFFTE_BACKEND} ON)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0
|
||||
URL "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz"
|
||||
URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d
|
||||
)
|
||||
FetchContent_Populate(HEFFTE_PROJECT)
|
||||
add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR})
|
||||
set_target_properties(lmp PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
set_target_properties(lammps PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
add_library(Heffte::Heffte INTERFACE IMPORTED GLOBAL)
|
||||
target_link_libraries(Heffte::Heffte INTERFACE Heffte)
|
||||
endif()
|
||||
|
||||
# fixup git hash to show "(unknown)" to avoid compilation failures.
|
||||
file(READ ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h HEFFTE_CFG_FILE_TEXT)
|
||||
string(REPLACE "@Heffte_GIT_HASH@" "(unknown)" HEFFTE_CFG_FILE_TEXT "${HEFFTE_CFG_FILE_TEXT}")
|
||||
file(WRITE ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h "${HEFFTE_CFG_FILE_TEXT}")
|
||||
|
||||
add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
add_library(Heffte::Heffte ALIAS Heffte)
|
||||
if(BUILD_SHARED_LIBS_WAS_ON)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_HEFFTE "-DFFT_HEFFTE_${FFT_HEFFTE_BACKEND}")
|
||||
target_link_libraries(lammps PRIVATE Heffte::Heffte)
|
||||
endif()
|
||||
|
||||
@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al
|
||||
|
||||
if(DOWNLOAD_MDI)
|
||||
message(STATUS "MDI download requested - we will build our own")
|
||||
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball")
|
||||
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.26.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "3124bb85259471e2a53a891f04bf697a" CACHE STRING "MD5 checksum for MDI tarball")
|
||||
mark_as_advanced(MDI_URL)
|
||||
mark_as_advanced(MDI_MD5)
|
||||
GetFallbackURL(MDI_URL MDI_FALLBACK)
|
||||
|
||||
@ -10,6 +10,14 @@ endif()
|
||||
|
||||
option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
|
||||
|
||||
# if ML-PACE package *and* MLIAP with Python is enabled is included we may also include ML-PACE support in ML-IAP
|
||||
set(MLIAP_ENABLE_ACE_DEFAULT OFF)
|
||||
if(PKG_ML-PACE)
|
||||
set(MLIAP_ENABLE_ACE_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
option(MLIAP_ENABLE_ACE "Build ML-IAP package with ACE support" ${MLIAP_ENABLE_ACE_DEFAULT})
|
||||
|
||||
if(MLIAP_ENABLE_PYTHON)
|
||||
find_package(Cythonize REQUIRED)
|
||||
find_package(Python COMPONENTS NumPy REQUIRED)
|
||||
@ -36,3 +44,10 @@ if(MLIAP_ENABLE_PYTHON)
|
||||
target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON)
|
||||
target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
if(MLIAP_ENABLE_ACE)
|
||||
if(NOT PKG_ML-PACE)
|
||||
message(FATAL_ERROR "Must enable ML-PACE package for including ACE support in ML-IAP")
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DMLIAP_ACE)
|
||||
endif()
|
||||
|
||||
@ -18,7 +18,9 @@ if(DOWNLOAD_QUIP)
|
||||
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
|
||||
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
||||
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n")
|
||||
# quip library uses GNU fortran extensions. If any more restrictive standards are set, reset them
|
||||
string(REGEX REPLACE -std=f[0-9]+ -std=gnu _fopt "${CMAKE_Fortran_FLAGS_${BTYPE}}")
|
||||
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${_fopt} -fmax-stack-var-size=6553600\n")
|
||||
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")
|
||||
set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n")
|
||||
set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n")
|
||||
@ -56,7 +58,7 @@ if(DOWNLOAD_QUIP)
|
||||
GIT_SUBMODULES "src/fox;src/GAP"
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
|
||||
CONFIGURE_COMMAND env QUIP_ARCH=lammps make config
|
||||
BUILD_COMMAND env QUIP_ARCH=lammps make libquip
|
||||
BUILD_COMMAND env QUIP_ARCH=lammps make -j1 libquip
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_IN_SOURCE YES
|
||||
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
|
||||
@ -21,9 +21,9 @@ else()
|
||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||
endif()
|
||||
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz"
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.3/plumed-src-2.8.3.tgz"
|
||||
CACHE STRING "URL for PLUMED tarball")
|
||||
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
set(PLUMED_MD5 "76d23cd394eba9e6530316ed1184e219" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
|
||||
mark_as_advanced(PLUMED_URL)
|
||||
mark_as_advanced(PLUMED_MD5)
|
||||
|
||||
@ -9,5 +9,8 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
||||
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
|
||||
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)
|
||||
|
||||
# If KSPACE is also enabled, use CUFFT for FFTs
|
||||
set(FFT_KOKKOS "CUFFT" CACHE STRING "" FORCE)
|
||||
|
||||
# hide deprecation warnings temporarily for stable release
|
||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@ -12,6 +12,9 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
||||
set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE)
|
||||
set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE)
|
||||
|
||||
# If KSPACE is also enabled, use CUFFT for FFTs
|
||||
set(FFT_KOKKOS "HIPFFT" CACHE STRING "" FORCE)
|
||||
|
||||
# hide deprecation warnings temporarily for stable release
|
||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
@ -100,6 +100,7 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
@ -182,6 +183,7 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
@ -231,6 +233,7 @@ role_check :
|
||||
@( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
@( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
@( env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
@( env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
|
||||
link_check : $(VENV) html
|
||||
@(\
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.TH LAMMPS "1" "21 November 2023" "2023-11-21"
|
||||
.TH LAMMPS "1" "17 April 2024" "2024-04-17"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator. Version 21 November 2023
|
||||
\- Molecular Dynamics Simulator. Version 17 April 2024
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B lmp
|
||||
@ -297,7 +297,7 @@ the chapter on errors in the
|
||||
manual gives some additional information about error messages, if possible.
|
||||
|
||||
.SH COPYRIGHT
|
||||
© 2003--2022 Sandia Corporation
|
||||
© 2003--2024 Sandia Corporation
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
|
||||
@ -877,6 +877,9 @@ Bibliography
|
||||
**(PLUMED)**
|
||||
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
|
||||
|
||||
**(Pavlov)**
|
||||
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024).
|
||||
|
||||
**(Paquay)**
|
||||
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.
|
||||
|
||||
|
||||
@ -122,32 +122,39 @@ Code Coverage and Unit Testing (CMake only)
|
||||
-------------------------------------------
|
||||
|
||||
The LAMMPS code is subject to multiple levels of automated testing
|
||||
during development: integration testing (i.e. whether the code compiles
|
||||
on various platforms and with a variety of settings), unit testing
|
||||
(i.e. whether certain individual parts of the code produce the expected
|
||||
results for given inputs), run testing (whether selected complete input
|
||||
decks run without crashing for multiple configurations), and regression
|
||||
testing (i.e. whether selected input examples reproduce the same
|
||||
results over a given number of steps and operations within a given
|
||||
error margin). The status of this automated testing can be viewed on
|
||||
`https://ci.lammps.org <https://ci.lammps.org>`_.
|
||||
during development:
|
||||
|
||||
- Integration testing (i.e. whether the code compiles
|
||||
on various platforms and with a variety of compilers and settings),
|
||||
- Unit testing (i.e. whether certain functions or classes of the code
|
||||
produce the expected results for given inputs),
|
||||
- Run testing (i.e. whether selected input decks can run to completion
|
||||
without crashing for multiple configurations),
|
||||
- Regression testing (i.e. whether selected input examples reproduce the
|
||||
same results over a given number of steps and operations within a
|
||||
given error margin).
|
||||
|
||||
The status of this automated testing can be viewed on `https://ci.lammps.org
|
||||
<https://ci.lammps.org>`_.
|
||||
|
||||
The scripts and inputs for integration, run, and regression testing
|
||||
are maintained in a
|
||||
`separate repository <https://github.com/lammps/lammps-testing>`_
|
||||
of the LAMMPS project on GitHub.
|
||||
of the LAMMPS project on GitHub. A few tests are also run as GitHub
|
||||
Actions and their configuration files are in the ``.github/workflows/``
|
||||
folder of the LAMMPS git tree.
|
||||
|
||||
The unit testing facility is integrated into the CMake build process
|
||||
of the LAMMPS source code distribution itself. It can be enabled by
|
||||
The unit testing facility is integrated into the CMake build process of
|
||||
the LAMMPS source code distribution itself. It can be enabled by
|
||||
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
|
||||
It requires the `YAML <https://pyyaml.org/>`_ library and development
|
||||
headers (if those are not found locally a recent version will be
|
||||
downloaded and compiled along with LAMMPS and the test program) to
|
||||
compile and will download and compile a specific recent version of the
|
||||
`Googletest <https://github.com/google/googletest/>`_ C++ test framework
|
||||
for implementing the tests.
|
||||
It requires the `YAML <https://pyyaml.org/>`_ library and matching
|
||||
development headers to compile (if those are not found locally a recent
|
||||
version of that library will be downloaded and compiled along with
|
||||
LAMMPS and the test programs) and will download and compile a specific
|
||||
version of the `GoogleTest <https://github.com/google/googletest/>`_ C++
|
||||
test framework that is used to implement the tests.
|
||||
|
||||
.. admonition:: Software version requirements for testing
|
||||
.. admonition:: Software version and LAMMPS configuration requirements
|
||||
:class: note
|
||||
|
||||
The compiler and library version requirements for the testing
|
||||
@ -155,7 +162,7 @@ for implementing the tests.
|
||||
example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x
|
||||
(version 4.8.x) are not sufficient. The CMake configuration will try
|
||||
to detect incompatible versions and either skip incompatible tests or
|
||||
stop with an error. Also the number of tests will depend on
|
||||
stop with an error. Also the number of available tests will depend on
|
||||
installed LAMMPS packages, development environment, operating system,
|
||||
and configuration settings.
|
||||
|
||||
@ -234,12 +241,31 @@ will be skipped if prerequisite features are not available in LAMMPS.
|
||||
time. Preference is given to parts of the code base that are easy to
|
||||
test or commonly used.
|
||||
|
||||
Tests for styles of the same kind of style (e.g. pair styles or bond
|
||||
styles) are performed with the same test executable using different
|
||||
input files in YAML format. So to add a test for another style of the
|
||||
same kind it may be sufficient to add a suitable YAML file.
|
||||
:doc:`Detailed instructions for adding tests <Developer_unittest>` are
|
||||
provided in the Programmer Guide part of the manual.
|
||||
Tests as shown by the ``ctest`` program are command lines defined in the
|
||||
``CMakeLists.txt`` files in the ``unittest`` directory tree. A few
|
||||
tests simply execute LAMMPS with specific command line flags and check
|
||||
the output to the screen for expected content. A large number of unit
|
||||
tests are special tests programs using the `GoogleTest framework
|
||||
<https://github.com/google/googletest/>`_ and linked to the LAMMPS
|
||||
library that test individual functions or create a LAMMPS class
|
||||
instance, execute one or more commands and check data inside the LAMMPS
|
||||
class hierarchy. There are also tests for the C-library, Fortran, and
|
||||
Python module interfaces to LAMMPS. The Python tests use the Python
|
||||
"unittest" module in a similar fashion than the others use `GoogleTest`.
|
||||
These special test programs are structured to perform multiple
|
||||
individual tests internally and each of those contains several checks
|
||||
(aka assertions) for internal data being changed as expected.
|
||||
|
||||
Tests for force computing or modifying styles (e.g. styles for non-bonded
|
||||
and bonded interactions and selected fixes) are run by using a more generic
|
||||
test program that reads its input from files in YAML format. The YAML file
|
||||
provides the information on how to customized the test program to test
|
||||
a specific style and - if needed - with specific settings.
|
||||
To add a test for another, similar style (e.g. a new pair style) it is
|
||||
usually sufficient to add a suitable YAML file. :doc:`Detailed
|
||||
instructions for adding tests <Developer_unittest>` are provided in the
|
||||
Programmer Guide part of the manual. A description of what happens
|
||||
during the tests is given below.
|
||||
|
||||
Unit tests for force styles
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -533,9 +533,6 @@ They must be specified in uppercase.
|
||||
* - A64FX
|
||||
- HOST
|
||||
- ARMv8.2 with SVE Support
|
||||
* - WSM
|
||||
- HOST
|
||||
- Intel Westmere CPU (SSE 4.2)
|
||||
* - SNB
|
||||
- HOST
|
||||
- Intel Sandy/Ivy Bridge CPU (AVX 1)
|
||||
@ -566,18 +563,15 @@ They must be specified in uppercase.
|
||||
* - KNL
|
||||
- HOST
|
||||
- Intel Knights Landing Xeon Phi
|
||||
* - BGQ
|
||||
- HOST
|
||||
- IBM Blue Gene/Q CPU
|
||||
* - POWER7
|
||||
- HOST
|
||||
- IBM POWER7 CPU
|
||||
* - POWER8
|
||||
- HOST
|
||||
- IBM POWER8 CPU
|
||||
* - POWER9
|
||||
- HOST
|
||||
- IBM POWER9 CPU
|
||||
* - RISCV_SG2042
|
||||
- HOST
|
||||
- SG2042 (RISC-V) CPU
|
||||
* - KEPLER30
|
||||
- GPU
|
||||
- NVIDIA Kepler generation CC 3.0 GPU
|
||||
@ -666,7 +660,7 @@ They must be specified in uppercase.
|
||||
- GPU
|
||||
- Intel GPU Ponte Vecchio
|
||||
|
||||
This list was last updated for version 4.2 of the Kokkos library.
|
||||
This list was last updated for version 4.3.0 of the Kokkos library.
|
||||
|
||||
.. tabs::
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ require use of an FFT library to compute 1d FFTs. The KISS FFT
|
||||
library is included with LAMMPS, but other libraries can be faster.
|
||||
LAMMPS can use them if they are available on your system.
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
Alternatively, LAMMPS can use the `heFFTe
|
||||
<https://icl-utk-edu.github.io/heffte/>`_ library for the MPI
|
||||
@ -59,15 +59,19 @@ libraries and better pipelining for packing and communication.
|
||||
.. code-block:: bash
|
||||
|
||||
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS
|
||||
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT, default is KISS
|
||||
-D FFT_SINGLE=value # yes or no (default), no = double precision
|
||||
-D FFT_PACK=value # array (default) or pointer or memcpy
|
||||
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
|
||||
|
||||
.. note::
|
||||
|
||||
The values for the FFT variable must be in upper-case. This is
|
||||
an exception to the rule that all CMake variables can be specified
|
||||
with lower-case values.
|
||||
When the Kokkos variant of a package is compiled and selected at run time,
|
||||
the FFT library selected by the FFT_KOKKOS variable applies. Otherwise,
|
||||
the FFT library selected by the FFT variable applies.
|
||||
The same FFT settings apply to both. FFT_KOKKOS must be compatible with the
|
||||
Kokkos back end - for example, when using the CUDA back end of Kokkos,
|
||||
you must use either CUFFT or KISS.
|
||||
|
||||
Usually these settings are all that is needed. If FFTW3 is
|
||||
selected, then CMake will try to detect, if threaded FFTW
|
||||
@ -106,6 +110,8 @@ libraries and better pipelining for packing and communication.
|
||||
|
||||
FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS
|
||||
# default is KISS if not specified
|
||||
FFT_INC = -DFFT_KOKKOS_CUFFT # -DFFT_KOKKOS_{FFTW,FFTW3,MKL,CUFFT,HIPFFT,KISS}
|
||||
# default is KISS if not specified
|
||||
FFT_INC = -DFFT_SINGLE # do not specify for double precision
|
||||
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
|
||||
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
|
||||
@ -116,6 +122,8 @@ libraries and better pipelining for packing and communication.
|
||||
|
||||
FFT_INC = -I/usr/local/include
|
||||
FFT_PATH = -L/usr/local/lib
|
||||
FFT_LIB = -lhipfft # hipFFT either precision
|
||||
FFT_LIB = -lcufft # cuFFT either precision
|
||||
FFT_LIB = -lfftw3 # FFTW3 double precision
|
||||
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
|
||||
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
|
||||
@ -178,6 +186,11 @@ The Intel MKL math library is part of the Intel compiler suite. It
|
||||
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
|
||||
above).
|
||||
|
||||
The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and
|
||||
AMD's HIP installations, respectively. These FFT libraries require the
|
||||
Kokkos acceleration package to be enabled and the Kokkos back end to be
|
||||
GPU-resident (i.e., HIP or CUDA).
|
||||
|
||||
Performing 3d FFTs in parallel can be time-consuming due to data access
|
||||
and required communication. This cost can be reduced by performing
|
||||
single-precision FFTs instead of double precision. Single precision
|
||||
@ -189,11 +202,11 @@ generally less than the difference in precision. Using the
|
||||
``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory
|
||||
use and parallel communication costs for transposing 3d FFT data.
|
||||
|
||||
When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW
|
||||
library a second time with support for single-precision.
|
||||
When using ``-DFFT_SINGLE`` with FFTW3, you may need to ensure that
|
||||
the FFTW3 installation includes support for single-precision.
|
||||
|
||||
For FFTW3, do the following, which should produce the additional
|
||||
library ``libfftw3f.a`` or ``libfftw3f.so``\ .
|
||||
When compiler FFTW3 from source, you can do the following, which should
|
||||
produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@ -89,6 +89,7 @@ OPT.
|
||||
* :doc:`cosine/shift (o) <angle_cosine_shift>`
|
||||
* :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>`
|
||||
* :doc:`cosine/squared (o) <angle_cosine_squared>`
|
||||
* :doc:`cosine/squared/restricted (o) <angle_cosine_squared_restricted>`
|
||||
* :doc:`cross <angle_cross>`
|
||||
* :doc:`dipole (o) <angle_dipole>`
|
||||
* :doc:`fourier (o) <angle_fourier>`
|
||||
@ -124,9 +125,10 @@ OPT.
|
||||
*
|
||||
*
|
||||
* :doc:`charmm (iko) <dihedral_charmm>`
|
||||
* :doc:`charmmfsw <dihedral_charmm>`
|
||||
* :doc:`charmmfsw (k) <dihedral_charmm>`
|
||||
* :doc:`class2 (ko) <dihedral_class2>`
|
||||
* :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>`
|
||||
* :doc:`cosine/squared/restricted <dihedral_cosine_squared_restricted>`
|
||||
* :doc:`fourier (io) <dihedral_fourier>`
|
||||
* :doc:`harmonic (iko) <dihedral_harmonic>`
|
||||
* :doc:`helix (o) <dihedral_helix>`
|
||||
|
||||
@ -61,6 +61,7 @@ OPT.
|
||||
* :doc:`controller <fix_controller>`
|
||||
* :doc:`damping/cundall <fix_damping_cundall>`
|
||||
* :doc:`deform (k) <fix_deform>`
|
||||
* :doc:`deform/pressure <fix_deform_pressure>`
|
||||
* :doc:`deposit <fix_deposit>`
|
||||
* :doc:`dpd/energy (k) <fix_dpd_energy>`
|
||||
* :doc:`drag <fix_drag>`
|
||||
@ -262,6 +263,7 @@ OPT.
|
||||
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
|
||||
* :doc:`wall/colloid <fix_wall>`
|
||||
* :doc:`wall/ees <fix_wall_ees>`
|
||||
* :doc:`wall/flow (k) <fix_wall_flow>`
|
||||
* :doc:`wall/gran (k) <fix_wall_gran>`
|
||||
* :doc:`wall/gran/region <fix_wall_gran_region>`
|
||||
* :doc:`wall/harmonic <fix_wall>`
|
||||
|
||||
@ -146,7 +146,7 @@ OPT.
|
||||
* :doc:`lj/charmm/coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/charmm/coul/msm (o) <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/charmmfsh <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/long <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/long (k) <pair_charmm>`
|
||||
* :doc:`lj/class2 (gko) <pair_class2>`
|
||||
* :doc:`lj/class2/coul/cut (ko) <pair_class2>`
|
||||
* :doc:`lj/class2/coul/cut/soft <pair_fep_soft>`
|
||||
@ -245,6 +245,7 @@ OPT.
|
||||
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
|
||||
* :doc:`pace (k) <pair_pace>`
|
||||
* :doc:`pace/extrapolation (k) <pair_pace>`
|
||||
* :doc:`pedone (o) <pair_pedone>`
|
||||
* :doc:`pod <pair_pod>`
|
||||
* :doc:`peri/eps <pair_peri>`
|
||||
* :doc:`peri/lps (o) <pair_peri>`
|
||||
@ -256,6 +257,7 @@ OPT.
|
||||
* :doc:`rann <pair_rann>`
|
||||
* :doc:`reaxff (ko) <pair_reaxff>`
|
||||
* :doc:`rebo (io) <pair_airebo>`
|
||||
* :doc:`rebomos (o) <pair_rebomos>`
|
||||
* :doc:`resquared (go) <pair_resquared>`
|
||||
* :doc:`saip/metal (t) <pair_saip_metal>`
|
||||
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>`
|
||||
|
||||
@ -129,7 +129,7 @@ USER-REAXC.
|
||||
USER-REAXC package
|
||||
------------------
|
||||
|
||||
.. deprecated:: TBD
|
||||
.. deprecated:: 7Feb2024
|
||||
|
||||
The USER-REAXC package has been renamed to :ref:`REAXFF <PKG-REAXFF>`.
|
||||
In the process also the pair style and related fixes were renamed to use
|
||||
|
||||
@ -18,8 +18,10 @@ Available topics in mostly chronological order are:
|
||||
- `Setting flags in the constructor`_
|
||||
- `Rename of pack/unpack_comm() to pack/unpack_forward_comm()`_
|
||||
- `Use ev_init() to initialize variables derived from eflag and vflag`_
|
||||
- `Use utils::count_words() functions instead of atom->count_words()`_
|
||||
- `Use utils::numeric() functions instead of force->numeric()`_
|
||||
- `Use utils::open_potential() function to open potential files`_
|
||||
- `Use symbolic Atom and AtomVec constants instead of numerical values`_
|
||||
- `Simplify customized error messages`_
|
||||
- `Use of "override" instead of "virtual"`_
|
||||
- `Simplified and more compact neighbor list requests`_
|
||||
@ -129,6 +131,41 @@ Not applying this change will not cause a compilation error, but
|
||||
can lead to inconsistent behavior and incorrect tallying of
|
||||
energy or virial.
|
||||
|
||||
Use utils::count_words() functions instead of atom->count_words()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionchanged:: 2Jun2020
|
||||
|
||||
The "count_words()" functions for parsing text have been moved from the
|
||||
Atom class to the :doc:`utils namespace <Developer_utils>`. The
|
||||
"count_words()" function in "utils" uses the Tokenizer class internally
|
||||
to split a line into words and count them, thus it will not modify the
|
||||
argument string as the function in the Atoms class did and thus had a
|
||||
variant using a copy buffer. Unlike the old version, the new version
|
||||
does not remove comments. For that you can use the
|
||||
:cpp:func:`utils::trim_comment() function
|
||||
<LAMMPS_NS::utils::trim_comment>` as shown in the example below.
|
||||
|
||||
Old:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
nwords = atom->count_words(line);
|
||||
int nwords = atom->count_words(buf);
|
||||
|
||||
New:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
nwords = utils::count_words(line);
|
||||
int nwords = utils::count_words(utils::trim_comment(buf));
|
||||
|
||||
.. seealso::
|
||||
|
||||
:cpp:func:`utils::count_words() <LAMMPS_NS::utils::count_words>`,
|
||||
:cpp:func:`utils::trim_comments() <LAMMPS_NS::utils::trim_comments>`
|
||||
|
||||
|
||||
Use utils::numeric() functions instead of force->numeric()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -136,11 +173,12 @@ Use utils::numeric() functions instead of force->numeric()
|
||||
|
||||
The "numeric()" conversion functions (including "inumeric()",
|
||||
"bnumeric()", and "tnumeric()") have been moved from the Force class to
|
||||
the utils namespace. Also they take an additional argument that selects
|
||||
whether the ``Error::all()`` or ``Error::one()`` function should be
|
||||
called in case of an error. The former should be used when *all* MPI
|
||||
processes call the conversion function and the latter *must* be used
|
||||
when they are called from only one or a subset of the MPI processes.
|
||||
the :doc:`utils namespace <Developer_utils>`. Also they take an
|
||||
additional argument that selects whether the ``Error::all()`` or
|
||||
``Error::one()`` function should be called in case of an error. The
|
||||
former should be used when *all* MPI processes call the conversion
|
||||
function and the latter *must* be used when they are called from only
|
||||
one or a subset of the MPI processes.
|
||||
|
||||
Old:
|
||||
|
||||
@ -196,6 +234,71 @@ New:
|
||||
|
||||
fp = utils::open_potential(filename, lmp);
|
||||
|
||||
Use symbolic Atom and AtomVec constants instead of numerical values
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionchanged:: 18Sep2020
|
||||
|
||||
Properties in LAMMPS that were represented by integer values (0, 1,
|
||||
2, 3) to indicate settings in the ``Atom`` and ``AtomVec`` classes (or
|
||||
classes derived from it) (and its derived classes) have been converted
|
||||
to use scoped enumerators instead.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Symbolic Constant
|
||||
- Value
|
||||
- Symbolic Constant
|
||||
- Value
|
||||
* - Atom::GROW
|
||||
- 0
|
||||
- Atom::MAP_NONE
|
||||
- 0
|
||||
* - Atom::RESTART
|
||||
- 1
|
||||
- Atom::MAP_ARRAY
|
||||
- 1
|
||||
* - Atom::BORDER
|
||||
- 2
|
||||
- Atom::MAP_HASH
|
||||
- 2
|
||||
* - Atom::ATOMIC
|
||||
- 0
|
||||
- Atom::MAP_YES
|
||||
- 3
|
||||
* - Atom::MOLECULAR
|
||||
- 1
|
||||
- AtomVec::PER_ATOM
|
||||
- 0
|
||||
* - Atom::TEMPLATE
|
||||
- 2
|
||||
- AtomVec::PER_TYPE
|
||||
- 1
|
||||
|
||||
Old:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
molecular = 0;
|
||||
mass_type = 1;
|
||||
if (atom->molecular == 2)
|
||||
if (atom->map_style == 2)
|
||||
atom->add_callback(0);
|
||||
atom->delete_callback(id,1);
|
||||
|
||||
New:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
molecular = Atom::ATOMIC;
|
||||
mass_type = AtomVec::PER_TYPE;
|
||||
if (atom->molecular == Atom::TEMPLATE)
|
||||
if (atom->map_style == Atom::MAP_HASH)
|
||||
atom->add_callback(Atom::GROW);
|
||||
atom->delete_callback(id,Atom::RESTART);
|
||||
|
||||
Simplify customized error messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -635,10 +635,10 @@ Tohoku University (under MIT license)
|
||||
|
||||
----------
|
||||
|
||||
.. doxygenfunction:: MathEigen::jacobi3(double const *const *mat, double *eval, double **evec)
|
||||
.. doxygenfunction:: MathEigen::jacobi3(double const *const *mat, double *eval, double **evec, int sort)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: MathEigen::jacobi3(double const mat[3][3], double *eval, double evec[3][3])
|
||||
.. doxygenfunction:: MathEigen::jacobi3(double const mat[3][3], double *eval, double evec[3][3], int sort)
|
||||
:project: progguide
|
||||
|
||||
---------------------------
|
||||
|
||||
@ -13,15 +13,44 @@ discussions of such cases.
|
||||
Unknown identifier in data file
|
||||
-------------------------------
|
||||
|
||||
This error happens when LAMMPS encounters a line of text in an unexpected format
|
||||
while reading a data file. This is most commonly cause by inconsistent header and
|
||||
section data. The header section informs LAMMPS how many entries or lines are expected in the
|
||||
various sections (like Atoms, Masses, Pair Coeffs, *etc.*\ ) of the data file.
|
||||
If there is a mismatch, LAMMPS will either keep reading beyond the end of a section
|
||||
or stop reading before the section has ended.
|
||||
This error happens when LAMMPS encounters a line of text with an
|
||||
unexpected keyword while :doc:`reading a data file <read_data>`. This
|
||||
would be either header keywords or section header keywords. This is
|
||||
most commonly due to a mistyped keyword or due to a keyword that is
|
||||
inconsistent with the :doc:`atom style <atom_style>` used.
|
||||
|
||||
Such a mismatch can happen unexpectedly when the first line of the data
|
||||
is *not* a comment as required by the format. That would result in
|
||||
LAMMPS expecting, for instance, 0 atoms because the "atoms" header line
|
||||
is treated as a comment.
|
||||
The header section informs LAMMPS how many entries or lines are expected
|
||||
in the various sections (like Atoms, Masses, Pair Coeffs, *etc.*\ ) of
|
||||
the data file. If there is a mismatch, LAMMPS will either keep reading
|
||||
beyond the end of a section or stop reading before the section has
|
||||
ended. In that case the next line will not contain a recognized keyword.
|
||||
|
||||
Such a mismatch can also happen when the first line of the data
|
||||
is *not* a comment as required by the format, but a line with a valid
|
||||
header keyword. That would result in LAMMPS expecting, for instance,
|
||||
0 atoms because the "atoms" header line is the first line and thus
|
||||
treated as a comment.
|
||||
|
||||
Another possibility to trigger this error is to have a keyword in the
|
||||
data file that corresponds to a fix (e.g. :doc:`fix cmap <fix_cmap>`)
|
||||
but the :doc:`read_data <read_data>` command is missing the (optional)
|
||||
arguments that identify the fix and the header keyword and section
|
||||
keyword or those arguments are inconsistent with the keywords in the
|
||||
data file.
|
||||
|
||||
.. _err0002:
|
||||
|
||||
Incorrect format in ... section of data file
|
||||
--------------------------------------------
|
||||
|
||||
This error happens when LAMMPS reads the contents of a section of a
|
||||
:doc:`data file <read_data>` and the number of parameters in the line
|
||||
differs from what is expected. This most commonly happens, when the
|
||||
atom style is different from what is expected for a specific data file
|
||||
since changing the atom style usually changes the format of the line.
|
||||
|
||||
This error can also happen when the number of entries indicated in the
|
||||
header of a data file (e.g. the number of atoms) is larger than the
|
||||
number of lines provided (e.g. in the corresponding Atoms section)
|
||||
and then LAMMPS will continue reading into the next section and that
|
||||
would have a completely different format.
|
||||
|
||||
@ -7883,12 +7883,6 @@ keyword to allow for additional bonds to be formed
|
||||
Fix poems cannot (yet) work with coupled bodies whose joints connect
|
||||
the bodies in a tree structure.
|
||||
|
||||
*Triclinic box skew is too large*
|
||||
The displacement in a skewed direction must be less than half the box
|
||||
length in that dimension. E.g. the xy tilt must be between -half and
|
||||
+half of the x box length. This constraint can be relaxed by using
|
||||
the box tilt command.
|
||||
|
||||
*Tried to convert a double to int, but input_double > INT_MAX*
|
||||
Self-explanatory.
|
||||
|
||||
|
||||
@ -752,13 +752,6 @@ This will most likely cause errors in kinetic fluctuations.
|
||||
More than the maximum # of neighbors was found multiple times. This
|
||||
was unexpected.
|
||||
|
||||
*Triclinic box skew is large*
|
||||
The displacement in a skewed direction is normally required to be less
|
||||
than half the box length in that dimension. E.g. the xy tilt must be
|
||||
between -half and +half of the x box length. You have relaxed the
|
||||
constraint using the box tilt command, but the warning means that a
|
||||
LAMMPS simulation may be inefficient as a result.
|
||||
|
||||
*Use special bonds = 0,1,1 with bond style fene*
|
||||
Most FENE models need this setting for the special_bonds command.
|
||||
|
||||
|
||||
@ -315,6 +315,10 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
||||
:ftype extract_variable: function
|
||||
:f set_variable: :f:subr:`set_variable`
|
||||
:ftype set_variable: subroutine
|
||||
:f set_string_variable: :f:subr:`set_set_string_variable`
|
||||
:ftype set_string_variable: subroutine
|
||||
:f set_internal_variable: :f:subr:`set_internal_variable`
|
||||
:ftype set_internal_variable: subroutine
|
||||
:f gather_atoms: :f:subr:`gather_atoms`
|
||||
:ftype gather_atoms: subroutine
|
||||
:f gather_atoms_concat: :f:subr:`gather_atoms_concat`
|
||||
@ -1251,8 +1255,8 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
three elements of the global vector calculated by fix recenter into the
|
||||
variables *dx*, *dy*, and *dz*, respectively.
|
||||
|
||||
If asked for per-atom or local data, :f:func:`extract_compute` returns a
|
||||
pointer to actual LAMMPS data. The pointer so returned will have the
|
||||
If asked for per-atom or local data, :f:func:`extract_fix` returns a
|
||||
pointer to actual LAMMPS data. The pointer returned will have the
|
||||
appropriate size to match the internal data, and will be
|
||||
type/kind/rank-checked at the time of the assignment. For example,
|
||||
|
||||
@ -1398,7 +1402,28 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
|
||||
Set the value of a string-style variable.
|
||||
|
||||
.. versionadded:: 3Nov2022
|
||||
.. deprecated:: 7Feb2024
|
||||
|
||||
This function assigns a new value from the string *str* to the string-style
|
||||
variable *name*\ . If *name* does not exist or is not a string-style
|
||||
variable, an error is generated.
|
||||
|
||||
.. warning::
|
||||
|
||||
This subroutine is deprecated and :f:subr:`set_string_variable`
|
||||
should be used instead.
|
||||
|
||||
:p character(len=*) name: name of the variable
|
||||
:p character(len=*) str: new value to assign to the variable
|
||||
:to: :cpp:func:`lammps_set_variable`
|
||||
|
||||
--------
|
||||
|
||||
.. f:subroutine:: set_string_variable(name, str)
|
||||
|
||||
Set the value of a string-style variable.
|
||||
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
This function assigns a new value from the string *str* to the string-style
|
||||
variable *name*\ . If *name* does not exist or is not a string-style
|
||||
@ -1406,7 +1431,23 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
|
||||
:p character(len=*) name: name of the variable
|
||||
:p character(len=*) str: new value to assign to the variable
|
||||
:to: :cpp:func:`lammps_set_variable`
|
||||
:to: :cpp:func:`lammps_set_string_variable`
|
||||
|
||||
--------
|
||||
|
||||
.. f:subroutine:: set_internal_variable(name, val)
|
||||
|
||||
Set the value of a internal-style variable.
|
||||
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
This function assigns a new value from the floating-point number *val* to
|
||||
the internal-style variable *name*\ . If *name* does not exist or is not
|
||||
an internal-style variable, an error is generated.
|
||||
|
||||
:p character(len=*) name: name of the variable
|
||||
:p read(c_double) val: new value to assign to the variable
|
||||
:to: :cpp:func:`lammps_set_internal_variable`
|
||||
|
||||
--------
|
||||
|
||||
|
||||
@ -1,42 +1,112 @@
|
||||
2d simulations
|
||||
==============
|
||||
================
|
||||
2d simulations
|
||||
================
|
||||
|
||||
Use the :doc:`dimension <dimension>` command to specify a 2d simulation.
|
||||
You must use the :doc:`dimension <dimension>` command to specify a 2d
|
||||
simulation. The default is 3d.
|
||||
|
||||
Make the simulation box periodic in z via the :doc:`boundary <boundary>`
|
||||
command. This is the default.
|
||||
A 2d simulation box must be periodic in z as set by the :doc:`boundary
|
||||
<boundary>` command. This is the default.
|
||||
|
||||
If using the :doc:`create_box <create_box>` command to define a
|
||||
simulation box, set the z dimensions narrow, but finite, so that the
|
||||
:doc:`create_atoms <create_atoms>` command will fill the 3d simulation
|
||||
box with a single z plane of atoms - e.g.
|
||||
Simulation boxes in LAMMPS can be either orthogonal or triclinic in
|
||||
shape. Orthogonal boxes in 2d are a rectangle with 4 edges that are
|
||||
each perpendicular to either the x or y coordinate axes. Triclinic
|
||||
boxes in 2d are a parallelogram with opposite pairs of faces parallel
|
||||
to each other. LAMMPS supports two forms of triclinic boxes,
|
||||
restricted and general, which for 2d differ in how the box is oriented
|
||||
with respect to the xy coordinate axes. See the :doc:`Howto triclinic
|
||||
<Howto_triclinic>` for a detailed description of all 3 kinds of
|
||||
simulation boxes.
|
||||
|
||||
Here are examples of using the :doc:`create_box <create_box>` command
|
||||
to define the simulation box for a 2d system.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
create_box 1 -10 10 -10 10 -0.25 0.25
|
||||
# 2d orthogonal box using a block-style region
|
||||
region mybox block -10 10 0 10 -0.5 0.5
|
||||
create_box 1 mybox
|
||||
|
||||
If using the :doc:`read_data <read_data>` command to read in a file of
|
||||
atom coordinates, set the "zlo zhi" values to be finite but narrow,
|
||||
similar to the create_box command settings just described. For each
|
||||
atom in the file, assign a z coordinate so it falls inside the
|
||||
z-boundaries of the box - e.g. 0.0.
|
||||
# 2d restricted triclinic box using a prism-style region with only xy tilt
|
||||
region mybox prism 0 10 0 10 -0.5 0.5 2.0 0.0 0.0
|
||||
create_box 1 mybox
|
||||
|
||||
Use the :doc:`fix enforce2d <fix_enforce2d>` command as the last
|
||||
defined fix to ensure that the z-components of velocities and forces
|
||||
are zeroed out every timestep. The reason to make it the last fix is
|
||||
so that any forces induced by other fixes will be zeroed out.
|
||||
# 2d general triclinic box using a primitive cell for a 2d hex lattice
|
||||
lattice custom 1.0 a1 1.0 0.0 0.0 a2 0.5 0.86602540378 0.0 &
|
||||
a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 triclinic/general
|
||||
create_box 1 NULL 0 5 0 5 -0.5 0.5
|
||||
|
||||
Many of the example input scripts included in the LAMMPS distribution
|
||||
Note that for 2d orthogonal or restricted triclinic boxes, the box has
|
||||
a 3rd dimension which must straddle z = 0.0 in the z dimension.
|
||||
Typically the width of box in the z dimension should be narrow,
|
||||
e.g. -0.5 to 0.5, but that is not required. For a 2d general
|
||||
triclinic box, the *a3* vector defined by the :doc:`lattice <lattice>`
|
||||
command must be (0.0,0.0,1.0), which is its default value. Also the
|
||||
*clo* and *chi* arguments of the :doc:`create_box <create_box>`
|
||||
command must be -0.5 and 0.5.
|
||||
|
||||
Here are examples of using the :doc:`read_data <read_data>` command
|
||||
to define the simulation box for a 2d system via keywords in the
|
||||
header section of the data file. These are the same boxes as the examples
|
||||
for the :doc:`create_box <create_box>` command
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
# 2d orthogonal box
|
||||
-10 10 xlo xhi
|
||||
0 10 ylo yhi
|
||||
-0.5 0.5 zlo zhi # this is the default, so no need to specify
|
||||
|
||||
# 2d restricted triclinic box with only xy tilt
|
||||
-10 10 xlo xhi
|
||||
0 10 ylo yhi
|
||||
-0.5 0.5 zlo zhi # this is the default, so no need to specify
|
||||
2.0 0.0 0.0 xy xz yz
|
||||
|
||||
# 3d general triclinic box using a primitive cell for a 2d hex lattice
|
||||
5 0 0 avec
|
||||
2.5 4.3301270189 0 bvec
|
||||
0 0 1 cvec # this is the default, so no need to specify
|
||||
0 0 -0.5 abc origin # this is the default for 2d, so no need to specify
|
||||
|
||||
Note that for 2d orthogonal or restricted triclinic boxes, the box has
|
||||
a 3rd dimension specified by the *zlo zhi* values, which must straddle
|
||||
z = 0.0. Typically the width of box in the z dimension should be
|
||||
narrow, e.g. -0.5 to 0.5, but that is not required. For a 2d general
|
||||
triclinic box, the z component of *avec* and *bvec* must be zero, and
|
||||
*cvec* must be (0,0,1), which is the default. The z component of *abc
|
||||
origin* must also be -0.5, which is the default.
|
||||
|
||||
If using the :doc:`create_atoms <create_atoms>` command to create
|
||||
atoms in the 2d simulation box, all the z coordinates of created atoms
|
||||
will be zero.
|
||||
|
||||
If using the :doc:`read_data <read_data>` command to read in a data
|
||||
file of atom coordinates for a 2d system, the z coordinates of all
|
||||
atoms should be zero. A value within epsilon of zero is also allowed
|
||||
in case the data file was generated by another program with finite
|
||||
numeric precision, in which case the z coord for the atom will be set
|
||||
to zero.
|
||||
|
||||
Use the :doc:`fix enforce2d <fix_enforce2d>` command as the last fix
|
||||
defined in the input script. It ensures that the z-components of
|
||||
velocities and forces are zeroed out every timestep. The reason to
|
||||
make it the last fix is so that any forces added by other fixes will
|
||||
also be zeroed out.
|
||||
|
||||
Many of the example input scripts included in the examples directory
|
||||
are for 2d models.
|
||||
|
||||
.. note::
|
||||
|
||||
Some models in LAMMPS treat particles as finite-size spheres, as
|
||||
opposed to point particles. See the :doc:`atom_style sphere <atom_style>` and :doc:`fix nve/sphere <fix_nve_sphere>`
|
||||
commands for details. By default, for 2d simulations, such particles
|
||||
will still be modeled as 3d spheres, not 2d discs (circles), meaning
|
||||
opposed to point particles. See the :doc:`atom_style sphere
|
||||
<atom_style>` and :doc:`fix nve/sphere <fix_nve_sphere>` commands
|
||||
for details. By default, for 2d simulations, such particles will
|
||||
still be modeled as 3d spheres, not 2d discs (circles), meaning
|
||||
their moment of inertia will be that of a sphere. If you wish to
|
||||
model them as 2d discs, see the :doc:`set density/disc <set>` command
|
||||
and the *disc* option for the :doc:`fix nve/sphere <fix_nve_sphere>`,
|
||||
:doc:`fix nvt/sphere <fix_nvt_sphere>`, :doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix npt/sphere <fix_npt_sphere>`
|
||||
commands.
|
||||
model them as 2d discs, see the :doc:`set density/disc <set>`
|
||||
command and the *disc* option for the :doc:`fix nve/sphere
|
||||
<fix_nve_sphere>`, :doc:`fix nvt/sphere <fix_nvt_sphere>`,
|
||||
:doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix npt/sphere
|
||||
<fix_npt_sphere>` commands.
|
||||
|
||||
@ -102,8 +102,19 @@ particles of different styles
|
||||
| :doc:`dump image <dump_image>` | output body particle attributes as an image |
|
||||
+------------------------------------------------+-----------------------------------------------------+
|
||||
|
||||
The pair styles defined for use with specific body styles are listed
|
||||
in the sections below.
|
||||
The pair styles currently defined for use with specific body styles
|
||||
are listed in the sections below.
|
||||
|
||||
Note that for all the body styles, if the data file defines a general
|
||||
triclinic box, then the orientation of the body particle and its
|
||||
corresponding 6 moments of inertia and other orientation-dependent
|
||||
values should reflect the fact the body is defined withing a general
|
||||
triclinic box with edge vectors **A**,**B**,**C**. LAMMPS will rotate
|
||||
the box to convert it to a restricted triclinic box. This operation
|
||||
will also rotate the orientation of the body particles. See the
|
||||
:doc:`Howto triclinic <Howto_triclinic>` doc page for more details.
|
||||
The sections below highlight the orientation-dependent values specific
|
||||
to each body style.
|
||||
|
||||
----------
|
||||
|
||||
@ -154,12 +165,18 @@ values consistent with the current orientation of the rigid body
|
||||
around its center of mass. The values are with respect to the
|
||||
simulation box XYZ axes, not with respect to the principal axes of the
|
||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||
|
||||
The coordinates of each sub-particle are specified as its x,y,z
|
||||
displacement from the center-of-mass of the body particle. The
|
||||
center-of-mass position of the particle is specified by the x,y,z
|
||||
values in the *Atoms* section of the data file, as is the total mass
|
||||
of the body particle.
|
||||
|
||||
Note that if the data file defines a general triclinic simulation box,
|
||||
these sub-particle displacements are orientation-dependent and, as
|
||||
mentioned above, should reflect the body particle's orientation within
|
||||
the general triclinic box.
|
||||
|
||||
The :doc:`pair_style body/nparticle <pair_body_nparticle>` command can be used
|
||||
with this body style to compute body/body and body/non-body interactions.
|
||||
|
||||
@ -226,6 +243,7 @@ values consistent with the current orientation of the rigid body
|
||||
around its center of mass. The values are with respect to the
|
||||
simulation box XYZ axes, not with respect to the principal axes of the
|
||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||
|
||||
The coordinates of each vertex are specified as its x,y,z displacement
|
||||
from the center-of-mass of the body particle. The center-of-mass
|
||||
position of the particle is specified by the x,y,z values in the
|
||||
@ -270,6 +288,11 @@ A disk, whose diameter is 3.0, mass 1.0, is specified as follows:
|
||||
0 0 0
|
||||
3.0
|
||||
|
||||
Note that if the data file defines a general triclinic simulation box,
|
||||
these polygon vertex displacements are orientation-dependent and, as
|
||||
mentioned above, should reflect the body particle's orientation within
|
||||
the general triclinic box.
|
||||
|
||||
The :doc:`pair_style body/rounded/polygon <pair_body_rounded_polygon>`
|
||||
command can be used with this body style to compute body/body
|
||||
interactions. The :doc:`fix wall/body/polygon <fix_wall_body_polygon>`
|
||||
@ -366,6 +389,7 @@ values consistent with the current orientation of the rigid body
|
||||
around its center of mass. The values are with respect to the
|
||||
simulation box XYZ axes, not with respect to the principal axes of the
|
||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||
|
||||
The coordinates of each vertex are specified as its x,y,z displacement
|
||||
from the center-of-mass of the body particle. The center-of-mass
|
||||
position of the particle is specified by the x,y,z values in the
|
||||
@ -435,6 +459,11 @@ A sphere whose diameter is 3.0 and mass 1.0, is specified as follows:
|
||||
The number of edges and faces for a rod or sphere must be listed,
|
||||
but is ignored.
|
||||
|
||||
Note that if the data file defines a general triclinic simulation box,
|
||||
these polyhedron vertex displacements are orientation-dependent and,
|
||||
as mentioned above, should reflect the body particle's orientation
|
||||
within the general triclinic box.
|
||||
|
||||
The :doc:`pair_style body/rounded/polhedron
|
||||
<pair_body_rounded_polyhedron>` command can be used with this body
|
||||
style to compute body/body interactions. The :doc:`fix
|
||||
|
||||
@ -349,6 +349,8 @@ Some common LAMMPS specific variables
|
||||
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
||||
* - ``FFT``
|
||||
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
||||
* - ``FFT_KOKKOS``
|
||||
- select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``KISS`` (default)
|
||||
* - ``FFT_SINGLE``
|
||||
- select whether to use single precision FFTs (default: ``off``)
|
||||
* - ``WITH_JPEG``
|
||||
|
||||
@ -45,10 +45,15 @@ atoms, and should be used for granular system instead of the fix style
|
||||
|
||||
To model heat conduction, one must add the temperature and heatflow
|
||||
atom variables with:
|
||||
|
||||
* :doc:`fix property/atom <fix_property_atom>`
|
||||
|
||||
a temperature integration fix
|
||||
|
||||
* :doc:`fix heat/flow <fix_heat_flow>`
|
||||
|
||||
and a heat conduction option defined in both
|
||||
|
||||
* :doc:`pair_style granular <pair_granular>`
|
||||
* :doc:`fix wall/gran <fix_wall_gran>`
|
||||
|
||||
|
||||
@ -52,8 +52,8 @@ JSON
|
||||
"ke": 2.4962152903997174569
|
||||
}
|
||||
|
||||
YAML format thermo_style output
|
||||
===============================
|
||||
YAML format thermo_style or dump_style output
|
||||
=============================================
|
||||
|
||||
Extracting data from log file
|
||||
-----------------------------
|
||||
@ -112,6 +112,9 @@ of that run:
|
||||
Number of runs: 2
|
||||
TotEng = -4.62140097780047
|
||||
|
||||
Extracting data from dump file
|
||||
------------------------------
|
||||
|
||||
.. versionadded:: 4May2022
|
||||
|
||||
YAML format output has been added to multiple commands in LAMMPS,
|
||||
|
||||
@ -2,43 +2,195 @@ Triclinic (non-orthogonal) simulation boxes
|
||||
===========================================
|
||||
|
||||
By default, LAMMPS uses an orthogonal simulation box to encompass the
|
||||
particles. The :doc:`boundary <boundary>` command sets the boundary
|
||||
conditions of the box (periodic, non-periodic, etc). The orthogonal
|
||||
box has its "origin" at (xlo,ylo,zlo) and is defined by 3 edge vectors
|
||||
starting from the origin given by **a** = (xhi-xlo,0,0); **b** =
|
||||
(0,yhi-ylo,0); **c** = (0,0,zhi-zlo). The 6 parameters
|
||||
particles. The orthogonal box has its "origin" at (xlo,ylo,zlo) and
|
||||
extends to (xhi,yhi,zhi). Conceptually it is defined by 3 edge
|
||||
vectors starting from the origin given by **A** = (xhi-xlo,0,0); **B**
|
||||
= (0,yhi-ylo,0); **C** = (0,0,zhi-zlo). The :doc:`boundary
|
||||
<boundary>` command sets the boundary conditions for the 6 faces of
|
||||
the box (periodic, non-periodic, etc). The 6 parameters
|
||||
(xlo,xhi,ylo,yhi,zlo,zhi) are defined at the time the simulation box
|
||||
is created, e.g. by the :doc:`create_box <create_box>` or
|
||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
||||
commands. Additionally, LAMMPS defines box size parameters lx,ly,lz
|
||||
where lx = xhi-xlo, and similarly in the y and z dimensions. The 6
|
||||
parameters, as well as lx,ly,lz, can be output via the
|
||||
:doc:`thermo_style custom <thermo_style>` command.
|
||||
is created by one of these commands:
|
||||
|
||||
LAMMPS also allows simulations to be performed in triclinic
|
||||
(non-orthogonal) simulation boxes shaped as a parallelepiped with
|
||||
triclinic symmetry. The parallelepiped has its "origin" at
|
||||
(xlo,ylo,zlo) and is defined by 3 edge vectors starting from the
|
||||
origin given by **a** = (xhi-xlo,0,0); **b** = (xy,yhi-ylo,0); **c** =
|
||||
(xz,yz,zhi-zlo). *xy,xz,yz* can be 0.0 or positive or negative values
|
||||
and are called "tilt factors" because they are the amount of
|
||||
displacement applied to faces of an originally orthogonal box to
|
||||
transform it into the parallelepiped. In LAMMPS the triclinic
|
||||
simulation box edge vectors **a**, **b**, and **c** cannot be arbitrary
|
||||
vectors. As indicated, **a** must lie on the positive x axis. **b** must
|
||||
lie in the xy plane, with strictly positive y component. **c** may have
|
||||
any orientation with strictly positive z component. The requirement
|
||||
that **a**, **b**, and **c** have strictly positive x, y, and z components,
|
||||
respectively, ensures that **a**, **b**, and **c** form a complete
|
||||
right-handed basis. These restrictions impose no loss of generality,
|
||||
since it is possible to rotate/invert any set of 3 crystal basis
|
||||
vectors so that they conform to the restrictions.
|
||||
* :doc:`create_box <create_box>`
|
||||
* :doc:`read_data <read_data>`
|
||||
* :doc:`read_restart <read_restart>`
|
||||
* :doc:`read_dump <read_dump>`
|
||||
|
||||
For example, assume that the 3 vectors **A**,\ **B**,\ **C** are the edge
|
||||
vectors of a general parallelepiped, where there is no restriction on
|
||||
**A**,\ **B**,\ **C** other than they form a complete right-handed basis i.e.
|
||||
**A** x **B** . **C** > 0. The equivalent LAMMPS **a**,\ **b**,\ **c** are a linear
|
||||
rotation of **A**, **B**, and **C** and can be computed as follows:
|
||||
Internally, LAMMPS defines box size parameters lx,ly,lz where lx =
|
||||
xhi-xlo, and similarly in the y and z dimensions. The 6 parameters, as
|
||||
well as lx,ly,lz, can be output via the :doc:`thermo_style custom
|
||||
<thermo_style>` command. See the :doc:`Howto 2d <Howto_2d>` doc page
|
||||
for info on how zlo and zhi are defined for 2d simulations.
|
||||
|
||||
----------
|
||||
|
||||
Triclinic simulation boxes
|
||||
""""""""""""""""""""""""""
|
||||
|
||||
LAMMPS also allows simulations to be performed using triclinic
|
||||
(non-orthogonal) simulation boxes shaped as a 3d parallelepiped with
|
||||
triclinic symmetry. For 2d simulations a triclinic simulation box is
|
||||
effectively a parallelogram; see the :doc:`Howto 2d <Howto_2d>` doc
|
||||
page for details.
|
||||
|
||||
One use of triclinic simulation boxes is to model solid-state crystals
|
||||
with triclinic symmetry. The :doc:`lattice <lattice>` command can be
|
||||
used with non-orthogonal basis vectors to define a lattice that will
|
||||
tile a triclinic simulation box via the :doc:`create_atoms
|
||||
<create_atoms>` command.
|
||||
|
||||
A second use is to run Parrinello-Rahman dynamics via the :doc:`fix
|
||||
npt <fix_nh>` command, which will adjust the xy, xz, yz tilt factors
|
||||
to compensate for off-diagonal components of the pressure tensor. The
|
||||
analog for an :doc:`energy minimization <minimize>` is the :doc:`fix
|
||||
box/relax <fix_box_relax>` command.
|
||||
|
||||
A third use is to shear a bulk solid to study the response of the
|
||||
material. The :doc:`fix deform <fix_deform>` command can be used for
|
||||
this purpose. It allows dynamic control of the xy, xz, yz tilt
|
||||
factors as a simulation runs. This is discussed in the :doc:`Howto
|
||||
NEMD <Howto_nemd>` doc page on non-equilibrium MD (NEMD) simulations.
|
||||
|
||||
Conceptually, a triclinic parallelepiped is defined with an "origin"
|
||||
at (xlo,ylo,zhi) and 3 edge vectors **A** = (ax,ay,az), **B** =
|
||||
(bx,by,bz), **C** = (cx,cy,cz) which can be arbitrary vectors, so long
|
||||
as they are non-zero, distinct, and not co-planar. In addition, they
|
||||
must define a right-handed system, such that (**A** cross **B**)
|
||||
points in the direction of **C**. Note that a left-handed system can
|
||||
be converted to a right-handed system by simply swapping the order of
|
||||
any pair of the **A**, **B**, **C** vectors.
|
||||
|
||||
The 4 commands listed above for defining orthogonal simulation boxes
|
||||
have triclinic options which allow for specification of the origin and
|
||||
edge vectors **A**, **B**, **C**. For each command, this can be done
|
||||
in one of two ways, for what LAMMPS calls a *general* triclinic box or
|
||||
a *restricted* triclinic box.
|
||||
|
||||
A *general* triclinic box is specified by an origin (xlo, ylo, zlo)
|
||||
and arbitrary edge vectors **A** = (ax,ay,az), **B** = (bx,by,bz), and
|
||||
**C** = (cx,cy,cz). So there are 12 parameters in total.
|
||||
|
||||
A *restricted* triclinic box also has an origin (xlo,ylo,zlo), but its
|
||||
edge vectors are of the following restricted form: **A** =
|
||||
(xhi-xlo,0,0), **B** = (xy,yhi-ylo,0), **C** = (xz,yz,zhi-zlo). So
|
||||
there are 9 parameters in total. Note that the restricted form
|
||||
requires **A** to be along the x-axis, **B** to be in the xy plane
|
||||
with a y-component in the +y direction, and **C** to have its
|
||||
z-component in the +z direction. Note that a restricted triclinic box
|
||||
is *right-handed* by construction since (**A** cross **B**) points in
|
||||
the direction of **C**.
|
||||
|
||||
The *xy,xz,yz* values can be zero or positive or negative. They are
|
||||
called "tilt factors" because they are the amount of displacement
|
||||
applied to edges of faces of an orthogonal box to change it into a
|
||||
restricted triclinic parallelepiped.
|
||||
|
||||
.. note::
|
||||
|
||||
Any right-handed general triclinic box (i.e. solid-state crystal
|
||||
basis vectors) can be rotated in 3d around its origin in order to
|
||||
conform to the LAMMPS definition of a restricted triclinic box.
|
||||
See the discussion in the next sub-section about general triclinic
|
||||
simulation boxes in LAMMPS.
|
||||
|
||||
Note that the :doc:`thermo_style custom <thermo_style>` command has
|
||||
keywords for outputting the various parameters that define the size
|
||||
and shape of orthogonal, restricted triclinic, and general triclinic
|
||||
simulation boxes.
|
||||
|
||||
For orthogonal boxes there 6 thermo keywords (xlo,ylo,zlo) and
|
||||
(xhi,yhi,zhi).
|
||||
|
||||
For restricted triclinic boxes there are 9 thermo keywords for
|
||||
(xlo,ylo,zlo), (xhi,yhi,zhi), and the (xy,xz,yz) tilt factors.
|
||||
|
||||
For general triclinic boxes there are 12 thermo keywords for
|
||||
(xlo,ylo,zhi) and the components of the **A**, **B**, **C** edge
|
||||
vectors, namely (avecx,avecy,avecz), (bvecx,bvecy,bvecz), and
|
||||
(cvecx,cvecy,cvecz),
|
||||
|
||||
The remainder of this doc page explains (a) how LAMMPS operates with
|
||||
general triclinic simulation boxes, (b) mathematical transformations
|
||||
between general and restricted triclinic boxes which may be useful
|
||||
when creating LAMMPS inputs or interpreting outputs for triclinic
|
||||
simulations, and (c) how LAMMPS uses tilt factors for restricted
|
||||
triclinic simulation boxes.
|
||||
|
||||
----------
|
||||
|
||||
General triclinic simulation boxes in LAMMPS
|
||||
""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
LAMMPS allows specification of general triclinic simulation boxes with
|
||||
their atoms as a convenience for users who may be converting data from
|
||||
solid-state crystallographic representations or from DFT codes for
|
||||
input to LAMMPS. Likewise it allows output of dump files, data files,
|
||||
and thermodynamic data (e.g. pressure tensor) in a general triclinic
|
||||
format.
|
||||
|
||||
However internally, LAMMPS only uses restricted triclinic simulation
|
||||
boxes. This is for parallel efficiency and to formulate partitioning
|
||||
of the simulation box across processors, neighbor list building, and
|
||||
inter-processor communication of per-atom data with methods similar to
|
||||
those used for orthogonal boxes.
|
||||
|
||||
This means 4 things which are important to understand:
|
||||
|
||||
* Input of a general triclinic system is immediately converted to a
|
||||
restricted triclinic system.
|
||||
* If output of per-atom data for a general triclinic system is
|
||||
requested (e.g. for atom coordinates in a dump file),
|
||||
conversion from a restricted to general triclinic system is done at
|
||||
the time of output.
|
||||
* The conversion of the simulation box and per-atom data from general
|
||||
triclinic to restricted triclinic (and vice versa) is a 3d rotation
|
||||
operation around an origin, which is the lower left corner of the
|
||||
simulation box. This means an input data file for a general
|
||||
triclinic system should specify all per-atom quantities consistent
|
||||
with the general triclinic box and its orientation relative to the
|
||||
standard x,y,z coordinate axes. For example, atom coordinates
|
||||
should be inside the general triclinic simulation box defined by the
|
||||
edge vectors **A**, **B**, **C** and its origin. Likewise per-atom
|
||||
velocities should be in directions consistent with the general
|
||||
triclinic box orientation. E.g. a velocity vector which will be in
|
||||
the +x direction once LAMMPS converts from a general to restricted
|
||||
triclinic box, should be specified in the data file in the direction
|
||||
of the **A** edge vector. See the :doc:`read_data <read_data>` doc
|
||||
page for info on all the per-atom vector quantities to which this
|
||||
rule applies when a data file for a general triclinic box is input.
|
||||
* If commands such as :doc:`write_data <write_data>` or :doc:`dump
|
||||
custom <dump>` are used to output general triclinic information, it
|
||||
is effectively the inverse of the operation described in the
|
||||
preceding bullet.
|
||||
* Other LAMMPS commands such as :doc:`region <region>` or
|
||||
:doc:`velocity <velocity>` or :doc:`set <set>`, operate on a
|
||||
restricted triclinic system even if a general triclinic system was
|
||||
defined initially.
|
||||
|
||||
This is the list of commands which have general triclinic options:
|
||||
|
||||
* :doc:`create_box <create_box>` - define a general triclinic box
|
||||
* :doc:`create_atoms <create_atoms>` - add atoms to a general triclinic box
|
||||
* :doc:`lattice <lattice>` - define a custom lattice consistent with the **A**, **B**, **C** edge vectors of a general triclinic box
|
||||
* :doc:`read_data <read_data>` - read a data file for a general triclinic system
|
||||
* :doc:`write_data <write_data>` - write a data file for a general triclinic system
|
||||
* :doc:`dump atom, dump custom <dump>` - output dump snapshots in general triclinic format
|
||||
* :doc:`dump_modify triclinic/general <dump_modify>` - select general triclinic format for dump output
|
||||
* :doc:`thermo_style <thermo_style>` - output the pressure tensor in
|
||||
general triclinic format
|
||||
* :doc:`thermo_modify triclinic/general <thermo_modify>` - select general triclinic format for thermo output
|
||||
* :doc:`read_restart <read_restart>` - read a restart file for a general triclinic system
|
||||
* :doc:`write_restart <read_restart>` - write a restart file for a general triclinic system
|
||||
|
||||
----------
|
||||
|
||||
Transformation from general to restricted triclinic boxes
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Let **A**,\ **B**,\ **C** be the right-handed edge vectors of a
|
||||
general triclinic simulation box. The equivalent LAMMPS **a**,\
|
||||
**b**,\ **c** for a restricted triclinic box are a 3d rotation of
|
||||
**A**, **B**, and **C** and can be computed as follows:
|
||||
|
||||
.. math::
|
||||
|
||||
@ -55,23 +207,17 @@ rotation of **A**, **B**, and **C** and can be computed as follows:
|
||||
c_y = & \mathbf{C} \cdot \widehat{(\mathbf{A} \times \mathbf{B})} \times \mathbf{\hat{A}} \quad = \quad \frac{\mathbf{B} \cdot \mathbf{C} - b_x c_x}{b_y} \\
|
||||
c_z = & |\mathbf{C} \cdot \widehat{(\mathbf{A} \times \mathbf{B})}|\quad = \quad \sqrt{C^2 - {c_x}^2 - {c_y}^2}
|
||||
|
||||
where A = \| **A** \| indicates the scalar length of **A**\ . The hat symbol (\^)
|
||||
indicates the corresponding unit vector. :math:`\beta` and :math:`\gamma` are angles
|
||||
between the vectors described below. Note that by construction,
|
||||
**a**, **b**, and **c** have strictly positive x, y, and z components, respectively.
|
||||
If it should happen that
|
||||
**A**, **B**, and **C** form a left-handed basis, then the above equations
|
||||
are not valid for **c**\ . In this case, it is necessary
|
||||
to first apply an inversion. This can be achieved
|
||||
by interchanging two basis vectors or by changing the sign of one of them.
|
||||
where A = \| **A** \| indicates the scalar length of **A**\ . The hat
|
||||
symbol (\^) indicates the corresponding unit vector. :math:`\beta` and
|
||||
:math:`\gamma` are angles between the **A**, **B**, **C** vectors
|
||||
as described below.
|
||||
|
||||
For consistency, the same rotation/inversion applied to the basis vectors
|
||||
must also be applied to atom positions, velocities,
|
||||
and any other vector quantities.
|
||||
This can be conveniently achieved by first converting to
|
||||
fractional coordinates in the
|
||||
old basis and then converting to distance coordinates in the new basis.
|
||||
The transformation is given by the following equation:
|
||||
For consistency, the same rotation applied to the triclinic box edge
|
||||
vectors can also be applied to atom positions, velocities, and other
|
||||
vector quantities. This can be conveniently achieved by first
|
||||
converting to fractional coordinates in the general triclinic
|
||||
coordinates and then converting to coordinates in the restricted
|
||||
triclinic basis. The transformation is given by the following equation:
|
||||
|
||||
.. math::
|
||||
|
||||
@ -82,87 +228,24 @@ The transformation is given by the following equation:
|
||||
\mathbf{A \times B}
|
||||
\end{pmatrix} \cdot \mathbf{X}
|
||||
|
||||
where *V* is the volume of the box, **X** is the original vector quantity and
|
||||
**x** is the vector in the LAMMPS basis.
|
||||
where *V* is the volume of the box (same in either basis), **X** is
|
||||
the fractional vector in the general triclinic basis and **x** is the
|
||||
resulting vector in the restricted triclinic basis.
|
||||
|
||||
There is no requirement that a triclinic box be periodic in any
|
||||
dimension, though it typically should be in at least the second dimension
|
||||
of the tilt (y in xy) if you want to enforce a shift in periodic
|
||||
boundary conditions across that boundary. Some commands that work
|
||||
with triclinic boxes, e.g. the :doc:`fix deform <fix_deform>` and :doc:`fix npt <fix_nh>` commands, require periodicity or non-shrink-wrap
|
||||
boundary conditions in specific dimensions. See the command doc pages
|
||||
for details.
|
||||
----------
|
||||
|
||||
The 9 parameters (xlo,xhi,ylo,yhi,zlo,zhi,xy,xz,yz) are defined at the
|
||||
time the simulation box is created. This happens in one of 3 ways.
|
||||
If the :doc:`create_box <create_box>` command is used with a region of
|
||||
style *prism*, then a triclinic box is setup. See the
|
||||
:doc:`region <region>` command for details. If the
|
||||
:doc:`read_data <read_data>` command is used to define the simulation
|
||||
box, and the header of the data file contains a line with the "xy xz
|
||||
yz" keyword, then a triclinic box is setup. See the
|
||||
:doc:`read_data <read_data>` command for details. Finally, if the
|
||||
:doc:`read_restart <read_restart>` command reads a restart file which
|
||||
was written from a simulation using a triclinic box, then a triclinic
|
||||
box will be setup for the restarted simulation.
|
||||
Crystallographic general triclinic representation of a simulation box
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Note that you can define a triclinic box with all 3 tilt factors =
|
||||
0.0, so that it is initially orthogonal. This is necessary if the box
|
||||
will become non-orthogonal, e.g. due to the :doc:`fix npt <fix_nh>` or
|
||||
:doc:`fix deform <fix_deform>` commands. Alternatively, you can use the
|
||||
:doc:`change_box <change_box>` command to convert a simulation box from
|
||||
orthogonal to triclinic and vice versa.
|
||||
|
||||
As with orthogonal boxes, LAMMPS defines triclinic box size parameters
|
||||
lx,ly,lz where lx = xhi-xlo, and similarly in the y and z dimensions.
|
||||
The 9 parameters, as well as lx,ly,lz, can be output via the
|
||||
:doc:`thermo_style custom <thermo_style>` command.
|
||||
|
||||
To avoid extremely tilted boxes (which would be computationally
|
||||
inefficient), LAMMPS normally requires that no tilt factor can skew
|
||||
the box more than half the distance of the parallel box length, which
|
||||
is the first dimension in the tilt factor (x for xz). This is required
|
||||
both when the simulation box is created, e.g. via the
|
||||
:doc:`create_box <create_box>` or :doc:`read_data <read_data>` commands,
|
||||
as well as when the box shape changes dynamically during a simulation,
|
||||
e.g. via the :doc:`fix deform <fix_deform>` or :doc:`fix npt <fix_nh>`
|
||||
commands.
|
||||
|
||||
For example, if xlo = 2 and xhi = 12, then the x box length is 10 and
|
||||
the xy tilt factor must be between -5 and 5. Similarly, both xz and
|
||||
yz must be between -(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is
|
||||
not a limitation, since if the maximum tilt factor is 5 (as in this
|
||||
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
|
||||
... are geometrically all equivalent. If the box tilt exceeds this
|
||||
limit during a dynamics run (e.g. via the :doc:`fix deform <fix_deform>`
|
||||
command), then the box is "flipped" to an equivalent shape with a tilt
|
||||
factor within the bounds, so the run can continue. See the :doc:`fix deform <fix_deform>` page for further details.
|
||||
|
||||
One exception to this rule is if the first dimension in the tilt
|
||||
factor (x for xy) is non-periodic. In that case, the limits on the
|
||||
tilt factor are not enforced, since flipping the box in that dimension
|
||||
does not change the atom positions due to non-periodicity. In this
|
||||
mode, if you tilt the system to extreme angles, the simulation will
|
||||
simply become inefficient, due to the highly skewed simulation box.
|
||||
|
||||
Box flips that may occur using the :doc:`fix deform <fix_deform>` or
|
||||
:doc:`fix npt <fix_nh>` commands can be turned off using the *flip no*
|
||||
option with either of the commands.
|
||||
|
||||
Note that if a simulation box has a large tilt factor, LAMMPS will run
|
||||
less efficiently, due to the large volume of communication needed to
|
||||
acquire ghost atoms around a processor's irregular-shaped subdomain.
|
||||
For extreme values of tilt, LAMMPS may also lose atoms and generate an
|
||||
error.
|
||||
|
||||
Triclinic crystal structures are often defined using three lattice
|
||||
constants *a*, *b*, and *c*, and three angles :math:`\alpha`,
|
||||
:math:`\beta`, and :math:`\gamma`. Note that in this nomenclature,
|
||||
the a, b, and c lattice constants are the scalar lengths of the edge
|
||||
General triclinic crystal structures are often defined using three
|
||||
lattice constants *a*, *b*, and *c*, and three angles :math:`\alpha`,
|
||||
:math:`\beta`, and :math:`\gamma`. Note that in this nomenclature, the
|
||||
a, b, and c lattice constants are the scalar lengths of the edge
|
||||
vectors **a**, **b**, and **c** defined above. The relationship
|
||||
between these 6 quantities (a, b, c, :math:`\alpha`, :math:`\beta`,
|
||||
:math:`\gamma`) and the LAMMPS box sizes (lx,ly,lz) =
|
||||
(xhi-xlo,yhi-ylo,zhi-zlo) and tilt factors (xy,xz,yz) is as follows:
|
||||
:math:`\gamma`) and the LAMMPS restricted triclinic box sizes
|
||||
(lx,ly,lz) = (xhi-xlo,yhi-ylo,zhi-zlo) and tilt factors (xy,xz,yz) is
|
||||
as follows:
|
||||
|
||||
.. math::
|
||||
|
||||
@ -186,15 +269,19 @@ The inverse relationship can be written as follows:
|
||||
|
||||
The values of *a*, *b*, *c*, :math:`\alpha` , :math:`\beta`, and
|
||||
:math:`\gamma` can be printed out or accessed by computes using the
|
||||
:doc:`thermo_style custom <thermo_style>` keywords
|
||||
*cella*, *cellb*, *cellc*, *cellalpha*, *cellbeta*, *cellgamma*,
|
||||
respectively.
|
||||
:doc:`thermo_style custom <thermo_style>` keywords *cella*, *cellb*,
|
||||
*cellc*, *cellalpha*, *cellbeta*, *cellgamma*, respectively.
|
||||
|
||||
----------
|
||||
|
||||
Output of restricted and general triclinic boxes in a dump file
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
As discussed on the :doc:`dump <dump>` command doc page, when the BOX
|
||||
BOUNDS for a snapshot is written to a dump file for a triclinic box,
|
||||
an orthogonal bounding box which encloses the triclinic simulation box
|
||||
is output, along with the 3 tilt factors (xy, xz, yz) of the triclinic
|
||||
box, formatted as follows:
|
||||
BOUNDS for a snapshot is written to a dump file for a restricted
|
||||
triclinic box, an orthogonal bounding box which encloses the triclinic
|
||||
simulation box is output, along with the 3 tilt factors (xy, xz, yz) of
|
||||
the restricted triclinic box, formatted as follows:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -204,7 +291,7 @@ box, formatted as follows:
|
||||
zlo_bound zhi_bound yz
|
||||
|
||||
This bounding box is convenient for many visualization programs and is
|
||||
calculated from the 9 triclinic box parameters
|
||||
calculated from the 9 restricted triclinic box parameters
|
||||
(xlo,xhi,ylo,yhi,zlo,zhi,xy,xz,yz) as follows:
|
||||
|
||||
.. parsed-literal::
|
||||
@ -217,22 +304,66 @@ calculated from the 9 triclinic box parameters
|
||||
zhi_bound = zhi
|
||||
|
||||
These formulas can be inverted if you need to convert the bounding box
|
||||
back into the triclinic box parameters, e.g. xlo = xlo_bound -
|
||||
MIN(0.0,xy,xz,xy+xz).
|
||||
back into the restricted triclinic box parameters, e.g. xlo =
|
||||
xlo_bound - MIN(0.0,xy,xz,xy+xz).
|
||||
|
||||
One use of triclinic simulation boxes is to model solid-state crystals
|
||||
with triclinic symmetry. The :doc:`lattice <lattice>` command can be
|
||||
used with non-orthogonal basis vectors to define a lattice that will
|
||||
tile a triclinic simulation box via the
|
||||
:doc:`create_atoms <create_atoms>` command.
|
||||
----------
|
||||
|
||||
A second use is to run Parrinello-Rahman dynamics via the :doc:`fix npt <fix_nh>` command, which will adjust the xy, xz, yz tilt
|
||||
factors to compensate for off-diagonal components of the pressure
|
||||
tensor. The analog for an :doc:`energy minimization <minimize>` is
|
||||
the :doc:`fix box/relax <fix_box_relax>` command.
|
||||
Periodicity and tilt factors for triclinic simulation boxes
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
A third use is to shear a bulk solid to study the response of the
|
||||
material. The :doc:`fix deform <fix_deform>` command can be used for
|
||||
this purpose. It allows dynamic control of the xy, xz, yz tilt
|
||||
factors as a simulation runs. This is discussed in the next section
|
||||
on non-equilibrium MD (NEMD) simulations.
|
||||
There is no requirement that a triclinic box be periodic in any
|
||||
dimension, though it typically should be in y or z if you wish to
|
||||
enforce a shift in coordinates due to periodic boundary conditions
|
||||
across the y or z boundaries. See the doc page for the :doc:`boundary
|
||||
<boundary>` command for an explanation of shifted coordinates for
|
||||
restricted triclinic boxes which are periodic.
|
||||
|
||||
Some commands that work with triclinic boxes, e.g. the :doc:`fix
|
||||
deform <fix_deform>` and :doc:`fix npt <fix_nh>` commands, require
|
||||
periodicity or non-shrink-wrap boundary conditions in specific
|
||||
dimensions. See the command doc pages for details.
|
||||
|
||||
A restricted triclinic box can be defined with all 3 tilt factors =
|
||||
0.0, so that it is initially orthogonal. This is necessary if the box
|
||||
will become non-orthogonal, e.g. due to use of the :doc:`fix npt
|
||||
<fix_nh>` or :doc:`fix deform <fix_deform>` commands. Alternatively,
|
||||
you can use the :doc:`change_box <change_box>` command to convert a
|
||||
simulation box from orthogonal to restricted triclinic and vice versa.
|
||||
|
||||
.. note::
|
||||
|
||||
Highly tilted restricted triclinic simulation boxes can be
|
||||
computationally inefficient. This is due to the large volume of
|
||||
communication needed to acquire ghost atoms around a processor's
|
||||
irregular-shaped subdomain. For extreme values of tilt, LAMMPS may
|
||||
also lose atoms and generate an error.
|
||||
|
||||
LAMMPS will issue a warning if you define a restricted triclinic box
|
||||
with a tilt factor which skews the box more than half the distance of
|
||||
the parallel box length, which is the first dimension in the tilt
|
||||
factor (e.g. x for xz).
|
||||
|
||||
For example, if xlo = 2 and xhi = 12, then the x box length is 10 and
|
||||
the xy tilt factor should be between -5 and 5 to avoid the warning.
|
||||
Similarly, both xz and yz should be between -(xhi-xlo)/2 and
|
||||
+(yhi-ylo)/2. Note that these are not limitations, since if the
|
||||
maximum tilt factor is 5 (as in this example), then simulations boxes
|
||||
and atom configurations with tilt = ..., -15, -5, 5, 15, 25, ... are
|
||||
all geometrically equivalent.
|
||||
|
||||
If the box tilt exceeds this limit during a dynamics run (e.g. due to
|
||||
the :doc:`fix deform <fix_deform>` command), then by default the box
|
||||
is "flipped" to an equivalent shape with a tilt factor within the
|
||||
warning bounds, and the run continues. See the :doc:`fix deform
|
||||
<fix_deform>` page for further details. Box flips that would normally
|
||||
occur using the :doc:`fix deform <fix_deform>` or :doc:`fix npt
|
||||
<fix_nh>` commands can be suppressed using the *flip no* option with
|
||||
either of the commands.
|
||||
|
||||
One exception to box flipping is if the first dimension in the tilt
|
||||
factor (e.g. x for xy) is non-periodic. In that case, the limits on
|
||||
the tilt factor are not enforced, since flipping the box in that
|
||||
dimension would not change the atom positions due to non-periodicity.
|
||||
In this mode, if the system tilts to large angles, the simulation will
|
||||
simply become inefficient, due to the highly skewed simulation box.
|
||||
|
||||
@ -14,16 +14,17 @@ wherever they appear in LAMMPS input or output files. The total number
|
||||
Ntypes for each interaction is "locked in" when the simulation box
|
||||
is created.
|
||||
|
||||
A recent addition to LAMMPS is the option to use strings - referred
|
||||
to as type labels - as an alternative. Using type labels instead of
|
||||
A recent addition to LAMMPS is the option to use strings - referred to
|
||||
as type labels - as an alternative. Using type labels instead of
|
||||
numeric types can be advantageous in various scenarios. For example,
|
||||
type labels can make inputs more readable and generic (i.e. usable through
|
||||
the :doc:`include command <include>` for different systems with different
|
||||
numerical values assigned to types. This generality also applies to
|
||||
other inputs like data files read by :doc:`read_data <read_data>` or
|
||||
molecule template files read by the :doc:`molecule <molecule>`
|
||||
command. See below for a list of other commands that can use
|
||||
type labels in different ways.
|
||||
type labels can make inputs more readable and generic (i.e. usable
|
||||
through the :doc:`include command <include>` for different systems with
|
||||
different numerical values assigned to types. This generality also
|
||||
applies to other inputs like data files read by :doc:`read_data
|
||||
<read_data>` or molecule template files read by the :doc:`molecule
|
||||
<molecule>` command. A discussion of the current type label support can
|
||||
be found in :ref:`(Gissinger) <Typelabel24>`. See below for a list of
|
||||
other commands that can use type labels in different ways.
|
||||
|
||||
LAMMPS will *internally* continue to use numeric types, which means
|
||||
that many previous restrictions still apply. For example, the total
|
||||
@ -124,3 +125,9 @@ between the files. The creation of simulation-ready reaction templates
|
||||
for :doc:`fix bond/react <fix_bond_react>` is much simpler when using
|
||||
type labels, and results in templates that can be used without
|
||||
modification in multiple simulations or different systems.
|
||||
|
||||
-----------
|
||||
|
||||
.. _Typelabel24:
|
||||
|
||||
**(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).
|
||||
|
||||
@ -47,6 +47,8 @@ In addition there are DOIs generated for individual stable releases:
|
||||
- 3 March 2020 version: `DOI:10.5281/zenodo.3726417 <https://dx.doi.org/10.5281/zenodo.3726417>`_
|
||||
- 29 October 2020 version: `DOI:10.5281/zenodo.4157471 <https://dx.doi.org/10.5281/zenodo.4157471>`_
|
||||
- 29 September 2021 version: `DOI:10.5281/zenodo.6386596 <https://dx.doi.org/10.5281/zenodo.6386596>`_
|
||||
- 23 June 2022 version: `DOI:10.5281/zenodo.10806836 <https://doi.org/10.5281/zenodo.10806836>`_
|
||||
- 2 August 2023 version: `DOI:10.5281/zenodo.10806852 <https://doi.org/10.5281/zenodo.10806852>`_
|
||||
|
||||
Home page
|
||||
^^^^^^^^^
|
||||
|
||||
@ -29,7 +29,7 @@ General features
|
||||
* spatial decomposition of simulation domain for MPI parallelism
|
||||
* particle decomposition inside spatial decomposition for OpenMP and GPU parallelism
|
||||
* GPLv2 licensed open-source distribution
|
||||
* highly portable C++-11
|
||||
* highly portable C++-11 (optional packages may require C++17)
|
||||
* modular code with most functionality in optional packages
|
||||
* only depends on MPI library for basic parallel functionality, MPI stub for serial compilation
|
||||
* other libraries are optional and only required for specific packages
|
||||
@ -81,7 +81,7 @@ commands)
|
||||
* pairwise potentials: Lennard-Jones, Buckingham, Morse, Born-Mayer-Huggins, Yukawa, soft, Class II (COMPASS), hydrogen bond, harmonic, gaussian, tabulated, scripted
|
||||
* charged pairwise potentials: Coulombic, point-dipole
|
||||
* many-body potentials: EAM, Finnis/Sinclair, MEAM, MEAM+SW, EIM, EDIP, ADP, Stillinger-Weber, Tersoff, REBO, AIREBO, ReaxFF, COMB, Streitz-Mintmire, 3-body polymorphic, BOP, Vashishta
|
||||
* machine learning potentials: ACE, AGNI, GAP, Behler-Parrinello (N2P2), POD, RANN
|
||||
* machine learning potentials: ACE, AGNI, GAP, Behler-Parrinello (N2P2), POD, RANN, SNAP
|
||||
* interfaces to ML potentials distributed by external groups: ANI, ChIMES, DeepPot, HIPNN, MTP
|
||||
* long-range interactions for charge, point-dipoles, and LJ dispersion: Ewald, Wolf, PPPM (similar to particle-mesh Ewald), MSM, ScaFaCoS
|
||||
* polarization models: :doc:`QEq <fix_qeq>`, :doc:`core/shell model <Howto_coreshell>`, :doc:`Drude dipole model <Howto_drude>`
|
||||
|
||||
@ -9,6 +9,8 @@ fixes, or variables in LAMMPS using the following functions:
|
||||
- :cpp:func:`lammps_extract_variable_datatype`
|
||||
- :cpp:func:`lammps_extract_variable`
|
||||
- :cpp:func:`lammps_set_variable`
|
||||
- :cpp:func:`lammps_set_string_variable`
|
||||
- :cpp:func:`lammps_set_internal_variable`
|
||||
- :cpp:func:`lammps_variable_info`
|
||||
|
||||
-----------------------
|
||||
@ -38,6 +40,16 @@ fixes, or variables in LAMMPS using the following functions:
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_set_string_variable
|
||||
:project: progguide
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_set_internal_variable
|
||||
:project: progguide
|
||||
|
||||
-----------------------
|
||||
|
||||
.. doxygenfunction:: lammps_variable_info
|
||||
:project: progguide
|
||||
|
||||
|
||||
@ -96,6 +96,39 @@ list all non-conforming lines. By adding the `-f` flag to the command
|
||||
line, they will modify the flagged files to try to remove the detected
|
||||
issues.
|
||||
|
||||
Constants (strongly preferred)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Global or per-file constants should be declared as `static constexpr`
|
||||
variables rather than via the pre-processor with `#define`. The name of
|
||||
constants should be all uppercase. This has multiple advantages:
|
||||
|
||||
- constants are easily identified as such by their all upper case name
|
||||
- rather than a pure text substitution during pre-processing, `constexpr
|
||||
variables` have a type associated with them and are processed later in
|
||||
the parsing process where the syntax checks and type specific
|
||||
processing (e.g. via overloads) can be applied to them.
|
||||
- compilers can emit a warning if the constant is not used and thus can
|
||||
be removed (we regularly check for and remove dead code like this)
|
||||
- there are no unexpected substitutions and thus confusing syntax errors
|
||||
when compiling leading to, for instance, conflicts so that LAMMPS
|
||||
cannot be compiled with certain combinations of packages (this *has*
|
||||
happened multiple times in the past).
|
||||
|
||||
Pre-processor defines should be limited to macros (but consider C++
|
||||
templates) and conditional compilation. If a per-processor define must
|
||||
be used, it should be defined at the top of the .cpp file after the
|
||||
include statements and at all cost it should be avoided to put them into
|
||||
header files.
|
||||
|
||||
Some sets of commonly used constants are provided in the ``MathConst``
|
||||
and ``EwaldConst`` namespaces and implemented in the files
|
||||
``math_const.h`` and ``ewald_const.h``, respectively.
|
||||
|
||||
There are always exceptions, special cases, and legacy code in LAMMPS,
|
||||
so please contact the LAMMPS developers if you are not sure.
|
||||
|
||||
|
||||
Placement of braces (strongly preferred)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -54,8 +54,21 @@ like this:
|
||||
x[3] = x coord of atom with ID 2
|
||||
...
|
||||
x[n3-1] = z coord of atom with ID natoms
|
||||
lmp.scatter_atoms("x",1,3,x)
|
||||
lmp.scatter_atoms("x", 1, 3, x)
|
||||
|
||||
The coordinates can also be provided as arguments to the initializer of x:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ctypes import c_double
|
||||
natoms = 2
|
||||
n3 = 3*natoms
|
||||
# init in constructor
|
||||
x = (n3*c_double)(0.0, 0.0, 0.0, 1.0, 1.0, 1.0)
|
||||
lmp.scatter_atoms("x", 1, 3, x)
|
||||
# or using a list
|
||||
coords = [1.0, 2.0, 3.0, -3.0, -2.0, -1.0]
|
||||
x = (c_double*len(coords))(*coords)
|
||||
|
||||
Alternatively, you can just change values in the vector returned by
|
||||
the gather methods, since they are also ctypes vectors.
|
||||
|
||||
|
||||
@ -20,11 +20,28 @@ including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez
|
||||
(Sandia). For more information on developing using Kokkos abstractions
|
||||
see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
|
||||
|
||||
Kokkos currently provides support for 4 modes of execution (per MPI
|
||||
.. note::
|
||||
|
||||
The Kokkos library is under active development and tracking the
|
||||
availability of accelerator hardware, so is the KOKKOS package in
|
||||
LAMMPS. This means that only a certain range of versions of the
|
||||
Kokkos library are compatible with the KOKKOS package of a certain
|
||||
range of LAMMPS versions. For that reason LAMMPS comes with a
|
||||
bundled version of the Kokkos library that has been validated on
|
||||
multiple platforms and may contain selected back-ported bug fixes
|
||||
from upstream Kokkos versions. While it is possible to build LAMMPS
|
||||
with an external version of Kokkos, it is untested and may result in
|
||||
incorrect execution or crashes.
|
||||
|
||||
Kokkos currently provides full support for 4 modes of execution (per MPI
|
||||
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
|
||||
(threading for many-core CPUs and Intel Phi), CUDA (for NVIDIA
|
||||
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
||||
produce an executable compatible with a specific hardware.
|
||||
(threading for many-core CPUs and Intel Phi), CUDA (for NVIDIA GPUs) and
|
||||
HIP (for AMD GPUs). Additional modes (e.g. OpenMP target, Intel data
|
||||
center GPUs) are under development. You choose the mode at build time
|
||||
to produce an executable compatible with a specific hardware.
|
||||
|
||||
The following compatibility notes have been last updated for LAMMPS
|
||||
version 23 November 2023 and Kokkos version 4.2.
|
||||
|
||||
.. admonition:: C++17 support
|
||||
:class: note
|
||||
@ -54,22 +71,22 @@ produce an executable compatible with a specific hardware.
|
||||
:class: note
|
||||
|
||||
Kokkos with CUDA currently implicitly assumes that the MPI library is
|
||||
GPU-aware. This is not always the case, especially when using
|
||||
GPU-aware. This is not always the case, especially when using
|
||||
pre-compiled MPI libraries provided by a Linux distribution. This is
|
||||
not a problem when using only a single GPU with a single MPI
|
||||
rank. When running with multiple MPI ranks, you may see segmentation
|
||||
rank. When running with multiple MPI ranks, you may see segmentation
|
||||
faults without GPU-aware MPI support. These can be avoided by adding
|
||||
the flags :doc:`-pk kokkos gpu/aware off <Run_options>` to the
|
||||
LAMMPS command line or by using the command :doc:`package kokkos
|
||||
gpu/aware off <package>` in the input file.
|
||||
|
||||
.. admonition:: AMD GPU support
|
||||
.. admonition:: Intel Data Center GPU support
|
||||
:class: note
|
||||
|
||||
To build with Kokkos the HIPCC compiler from the AMD ROCm software
|
||||
version 3.5 or later is required. Supporting this Kokkos mode in
|
||||
LAMMPS is still work in progress. Please contact the LAMMPS developers
|
||||
if you run into problems.
|
||||
Support for Kokkos with Intel Data Center GPU accelerators (formerly
|
||||
known under the code name "Ponte Vecchio") in LAMMPS is still a work
|
||||
in progress. Only a subset of the functionality works correctly.
|
||||
Please contact the LAMMPS developers if you run into problems.
|
||||
|
||||
Building LAMMPS with the KOKKOS package
|
||||
"""""""""""""""""""""""""""""""""""""""
|
||||
@ -292,6 +309,10 @@ one or more nodes, each with two GPUs:
|
||||
settings. Experimenting with its options can provide a speed-up for
|
||||
specific calculations. For example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos newton on neigh half binsize 2.8 -in in.lj # Newton on, half neighbor list, set binsize = neighbor ghost cutoff
|
||||
|
||||
.. note::
|
||||
|
||||
The default binsize for :doc:`atom sorting <atom_modify>` on GPUs
|
||||
@ -302,9 +323,15 @@ one or more nodes, each with two GPUs:
|
||||
frequent sorting than default (e.g. sorting every 100 time steps
|
||||
instead of 1000) may improve performance.
|
||||
|
||||
.. code-block:: bash
|
||||
.. note::
|
||||
|
||||
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos newton on neigh half binsize 2.8 -in in.lj # Newton on, half neighbor list, set binsize = neighbor ghost cutoff
|
||||
When running on GPUs with many MPI ranks (tens of thousands and
|
||||
more), the creation of the atom map (required for molecular systems)
|
||||
on the GPU can slow down significantly or run out of GPU memory and
|
||||
thus slow down the whole calculation or cause a crash. You can use
|
||||
the "-pk kokkos atom/map no" :doc:`command-line switch <Run_options>`
|
||||
of the :doc:`package kokkos atom/map no <package>` command to create
|
||||
the atom map on the CPU instead.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -416,15 +443,22 @@ Generally speaking, the following rules of thumb apply:
|
||||
performance of a KOKKOS style is a bit slower than the OPENMP
|
||||
package.
|
||||
* When running large number of atoms per GPU, KOKKOS is typically faster
|
||||
than the GPU package when compiled for double precision. The benefit
|
||||
than the GPU package when compiled for double precision. The benefit
|
||||
of using single or mixed precision with the GPU package depends
|
||||
significantly on the hardware in use and the simulated system and pair
|
||||
style.
|
||||
* When running on Intel hardware, KOKKOS is not as fast as
|
||||
* When running on Intel Phi hardware, KOKKOS is not as fast as
|
||||
the INTEL package, which is optimized for x86 hardware (not just
|
||||
from Intel) and compilation with the Intel compilers. The INTEL
|
||||
package also can increase the vector length of vector instructions
|
||||
by switching to single or mixed precision mode.
|
||||
* The KOKKOS package by default assumes that you are using exactly one
|
||||
MPI rank per GPU. When trying to use multiple MPI ranks per GPU it is
|
||||
mandatory to enable `CUDA Multi-Process Service (MPS)
|
||||
<https://docs.nvidia.com/deploy/mps/index.html>`_ to get good
|
||||
performance. In this case it is better to not use all available
|
||||
MPI ranks in order to avoid competing with the MPS daemon for
|
||||
CPU resources.
|
||||
|
||||
See the `Benchmark page <https://www.lammps.org/bench.html>`_ of the
|
||||
LAMMPS website for performance of the KOKKOS package on different
|
||||
|
||||
@ -70,7 +70,9 @@ for more info.
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`angle_coeff <angle_coeff>`
|
||||
:doc:`angle_coeff <angle_coeff>`, :doc:`pair_style lj/charmm variants <pair_charmm>`,
|
||||
:doc:`dihedral_style charmm <dihedral_charmm>`,
|
||||
:doc:`dihedral_style charmmfsw <dihedral_charmm>`, :doc:`fix cmap <fix_cmap>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
80
doc/src/angle_cosine_squared_restricted.rst
Normal file
80
doc/src/angle_cosine_squared_restricted.rst
Normal file
@ -0,0 +1,80 @@
|
||||
.. index:: angle_style cosine/squared/restricted
|
||||
.. index:: angle_style cosine/squared/restricted/omp
|
||||
|
||||
angle_style cosine/squared/restricted command
|
||||
=============================================
|
||||
|
||||
Accelerator Variants: *cosine/squared/restricted/omp*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
angle_style cosine/squared/restricted
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
angle_style cosine/squared/restricted
|
||||
angle_coeff 2*4 75.0 100.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
The *cosine/squared/restricted* angle style uses the potential
|
||||
|
||||
.. math::
|
||||
|
||||
E = K [\cos(\theta) - \cos(\theta_0)]^2 / \sin^2(\theta)
|
||||
|
||||
, which is commonly used in the MARTINI force field,
|
||||
where :math:`\theta_0` is the equilibrium value of the angle, and :math:`K`
|
||||
is a prefactor. Note that the usual 1/2 factor is included in :math:`K`.
|
||||
|
||||
See :ref:`(Bulacu) <restricted-Bulacu>` for a description of the restricted angle for the MARTINI force field.
|
||||
|
||||
The following coefficients must be defined for each angle type via the
|
||||
:doc:`angle_coeff <angle_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` (energy)
|
||||
* :math:`\theta_0` (degrees)
|
||||
|
||||
:math:`\theta_0` is specified in degrees, but LAMMPS converts it to radians
|
||||
internally.
|
||||
|
||||
----------
|
||||
|
||||
.. include:: accel_styles.rst
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This angle style can only be used if LAMMPS was built with the
|
||||
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>` doc page
|
||||
for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`angle_coeff <angle_coeff>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _restricted-Bulacu:
|
||||
|
||||
**(Bulacu)** Bulacu, Goga, Zhao, Rossi, Monticelli, Periole, Tieleman, Marrink, J Chem Theory Comput, 9, 3282-3292
|
||||
(2013).
|
||||
@ -11,7 +11,16 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
angle_style lepton
|
||||
angle_style style args
|
||||
|
||||
* style = *lepton*
|
||||
* args = optional arguments
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
args = *auto_offset* or *no_offset*
|
||||
*auto_offset* = offset the potential energy so that the value at theta0 is 0.0 (default)
|
||||
*no_offset* = do not offset the potential energy
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -19,6 +28,7 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
angle_style lepton
|
||||
angle_style lepton no_offset
|
||||
|
||||
angle_coeff 1 120.0 "k*theta^2; k=250.0"
|
||||
angle_coeff 2 90.0 "k2*theta^2 + k3*theta^3 + k4*theta^4; k2=300.0; k3=-100.0; k4=50.0"
|
||||
@ -41,6 +51,13 @@ angle coefficient. For example `"200.0*theta^2"` represents a
|
||||
|
||||
U_{angle,i} = K (\theta_i - \theta_0)^2 = K \theta^2 \qquad \theta = \theta_i - \theta_0
|
||||
|
||||
.. versionchanged:: 7Feb2024
|
||||
|
||||
By default the potential energy U is shifted so that the value U is 0.0
|
||||
for $theta = theta_0$. This is equivalent to using the optional keyword
|
||||
*auto_offset*. When using the keyword *no_offset* instead, the
|
||||
potential energy is not shifted.
|
||||
|
||||
The `Lepton library <https://simtk.org/projects/lepton>`_, that the
|
||||
*lepton* angle style interfaces with, evaluates this expression string
|
||||
at run time to compute the pairwise energy. It also creates an
|
||||
|
||||
@ -10,7 +10,7 @@ Syntax
|
||||
|
||||
angle_style style
|
||||
|
||||
* style = *none* or *zero* or *hybrid* or *amoeba* or *charmm* or *class2* or *class2/p6* or *cosine* or *cosine/buck6d* or *cosine/delta* or *cosine/periodic* or *cosine/shift* or *cosine/shift/exp* or *cosine/squared* or *cross* or *dipole* or *fourier* or *fourier/simple* or *gaussian* or *harmonic* or *lepton* or *mm3* or *quartic* or *spica* or *table*
|
||||
* style = *none* or *zero* or *hybrid* or *amoeba* or *charmm* or *class2* or *class2/p6* or *cosine* or *cosine/buck6d* or *cosine/delta* or *cosine/periodic* or *cosine/shift* or *cosine/shift/exp* or *cosine/squared* or *cosine/squared/restricted* or *cross* or *dipole* or *fourier* or *fourier/simple* or *gaussian* or *harmonic* or *lepton* or *mm3* or *quartic* or *spica* or *table*
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -84,6 +84,7 @@ of (g,i,k,o,t) to indicate which accelerated styles exist.
|
||||
* :doc:`cosine/shift <angle_cosine_shift>` - angle cosine with a shift
|
||||
* :doc:`cosine/shift/exp <angle_cosine_shift_exp>` - cosine with shift and exponential term in spring constant
|
||||
* :doc:`cosine/squared <angle_cosine_squared>` - angle with cosine squared term
|
||||
* :doc:`cosine/squared/restricted <angle_cosine_squared_restricted>` - angle with restricted cosine squared term
|
||||
* :doc:`cross <angle_cross>` - cross term coupling angle and bond lengths
|
||||
* :doc:`dipole <angle_dipole>` - angle that controls orientation of a point dipole
|
||||
* :doc:`fourier <angle_fourier>` - angle with multiple cosine terms
|
||||
|
||||
@ -49,248 +49,221 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
Define what style of atoms to use in a simulation. This determines
|
||||
what attributes are associated with the atoms. This command must be
|
||||
used before a simulation is setup via a :doc:`read_data <read_data>`,
|
||||
:doc:`read_restart <read_restart>`, or :doc:`create_box <create_box>`
|
||||
command.
|
||||
The *atom_style* command selects which per-atom attributes are
|
||||
associated with atoms in a LAMMPS simulation and thus stored and
|
||||
communicated with those atoms as well as read from and stored in data
|
||||
and restart files. Different models (e.g. :doc:`pair styles
|
||||
<pair_style>`) require access to specific per-atom attributes and thus
|
||||
require a specific atom style. For example, to compute Coulomb
|
||||
interactions, the atom must have a "charge" (aka "q") attribute.
|
||||
|
||||
A number of distinct atom styles exist that combine attributes. Some
|
||||
atom styles are a superset of other atom styles. Further attributes
|
||||
may be added to atoms either via using a hybrid style which provides a
|
||||
union of the attributes of the sub-styles, or via the :doc:`fix
|
||||
property/atom <fix_property_atom>` command. The *atom_style* command
|
||||
must be used before a simulation is setup via a :doc:`read_data
|
||||
<read_data>`, :doc:`read_restart <read_restart>`, or :doc:`create_box
|
||||
<create_box>` command.
|
||||
|
||||
.. note::
|
||||
|
||||
Many of the atom styles discussed here are only enabled if
|
||||
LAMMPS was built with a specific package, as listed below in the
|
||||
Restrictions section.
|
||||
Many of the atom styles discussed here are only enabled if LAMMPS was
|
||||
built with a specific package, as listed below in the Restrictions
|
||||
section.
|
||||
|
||||
Once a style is assigned, it cannot be changed, so use a style general
|
||||
enough to encompass all attributes. E.g. with style *bond*, angular
|
||||
terms cannot be used or added later to the model. It is OK to use a
|
||||
style more general than needed, though it may be slightly inefficient.
|
||||
Once a style is selected and the simulation box defined, it cannot be
|
||||
changed but only augmented with the :doc:`fix property/atom
|
||||
<fix_property_atom>` command. So one should select an atom style
|
||||
general enough to encompass all attributes required. E.g. with atom
|
||||
style *bond*, it is not possible to define angles and use angle styles.
|
||||
|
||||
The choice of style affects what quantities are stored by each atom,
|
||||
what quantities are communicated between processors to enable forces
|
||||
to be computed, and what quantities are listed in the data file read
|
||||
by the :doc:`read_data <read_data>` command.
|
||||
It is OK to use a style more general than needed, though it may be
|
||||
slightly inefficient because it will allocate and communicate
|
||||
additional unused data.
|
||||
|
||||
These are the additional attributes of each style and the typical
|
||||
kinds of physical systems they are used to model. All styles store
|
||||
coordinates, velocities, atom IDs and types. See the
|
||||
Atom style attributes
|
||||
"""""""""""""""""""""
|
||||
|
||||
The atom style *atomic* has the minimum subset of per-atom attributes
|
||||
and is also the default setting. It encompasses the following per-atom
|
||||
attributes (name of the vector or array in the :doc:`Atom class
|
||||
<Classes_atom>` is given in parenthesis): atom-ID (tag), type (type),
|
||||
position (x), velocities (v), forces (f), image flags (image), group
|
||||
membership (mask). Since all atom styles are a superset of atom style
|
||||
*atomic*\ , they all include these attributes.
|
||||
|
||||
This table lists all the available atom styles, which attributes they
|
||||
provide, which :doc:`package <Packages>` is required to use them, and
|
||||
what the typical applications are that use them. See the
|
||||
:doc:`read_data <read_data>`, :doc:`create_atoms <create_atoms>`, and
|
||||
:doc:`set <set>` commands for info on how to set these various
|
||||
quantities.
|
||||
:doc:`set <set>` commands for details on how to set these various
|
||||
quantities. More information about many of the styles is provided in
|
||||
the Additional Information section below.
|
||||
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *amoeba* | molecular + charge + 1/5 neighbors | AMOEBA/HIPPO polarized force fields |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *angle* | bonds and angles | bead-spring polymers with stiffness |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *atomic* | only the default values | coarse-grain liquids, solids, metals |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *body* | mass, inertia moments, quaternion, angular momentum | arbitrary bodies |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *bond* | bonds | bead-spring polymers |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *charge* | charge | atomic system with charges |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *dielectric* | normx normy normz area/patch ed em epsilon curv | system with surface polarization |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *dipole* | charge and dipole moment | system with dipolar particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *dpd* | internal temperature and internal energies | DPD particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *edpd* | temperature and heat capacity | eDPD particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *electron* | charge and spin and eradius | electronic force field |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *ellipsoid* | shape, quaternion, angular momentum | aspherical particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *full* | molecular + charge | bio-molecules |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *line* | end points, angular velocity | rigid bodies |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *mdpd* | density | mDPD particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *oxdna* | nucleotide polarity | coarse-grained DNA and RNA models |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *peri* | mass, volume | mesoscopic Peridynamic models |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *smd* | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *sph* | rho, esph, cv | SPH particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *sphere* | diameter, mass, angular velocity | granular models |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *bpm/sphere* | diameter, mass, angular velocity, quaternion | granular bonded particle models (BPM)|
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *spin* | magnetic moment | system with magnetic particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *tdpd* | chemical concentration | tDPD particles |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *template* | template index, template atom | small molecules with fixed topology |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *tri* | corner points, angular momentum | rigid bodies |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
| *wavepacket* | charge, spin, eradius, etag, cs_re, cs_im | AWPMD |
|
||||
+--------------+-----------------------------------------------------+--------------------------------------+
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Atom style
|
||||
- Attributes
|
||||
- Required package
|
||||
- Applications
|
||||
* - *amoeba*
|
||||
- *full* + "1-5 special neighbor data"
|
||||
- :ref:`AMOEBA <PKG-AMOEBA>`
|
||||
- AMOEBA/HIPPO force fields
|
||||
* - *angle*
|
||||
- *bond* + "angle data"
|
||||
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
- bead-spring polymers with stiffness
|
||||
* - *atomic*
|
||||
- tag, type, x, v, f, image, mask
|
||||
-
|
||||
- atomic liquids, solids, metals
|
||||
* - *body*
|
||||
- *atomic* + radius, rmass, angmom, torque, body
|
||||
- :ref:`BODY <PKG-BODY>`
|
||||
- arbitrary bodies, see :doc:`body howto <Howto_body>`
|
||||
* - *bond*
|
||||
- *atomic* + molecule, nspecial, special + "bond data"
|
||||
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
- bead-spring polymers
|
||||
* - *bpm/sphere*
|
||||
- *bond* + radius, rmass, omega, torque, quat
|
||||
- :ref:`BPM <PKG-BPM>`
|
||||
- granular bonded particle models, see :doc:`BPM howto <Howto_bpm>`
|
||||
* - *charge*
|
||||
- *atomic* + q
|
||||
-
|
||||
- atomic systems with charges
|
||||
* - *dielectric*
|
||||
- *full* + mu, area, ed, em, epsilon, curvature, q_scaled
|
||||
- :ref:`DIELECTRIC <PKG-DIELECTRIC>`
|
||||
- systems with surface polarization
|
||||
* - *dipole*
|
||||
- *charge* + mu
|
||||
- :ref:`DIPOLE <PKG-DIPOLE>`
|
||||
- atomic systems with charges and point dipoles
|
||||
* - *dpd*
|
||||
- *atomic* + rho + "reactive DPD data"
|
||||
- :ref:`DPD-REACT <PKG-DPD-REACT>`
|
||||
- reactive DPD
|
||||
* - *edpd*
|
||||
- *atomic* + "eDPD data"
|
||||
- :ref:`DPD-MESO <PKG-DPD-MESO>`
|
||||
- Energy conservative DPD (eDPD)
|
||||
* - *electron*
|
||||
- *charge* + espin, eradius, ervel, erforce
|
||||
- :ref:`EFF <PKG-EFF>`
|
||||
- Electron force field systems
|
||||
* - *ellipsoid*
|
||||
- *atomic* + rmass, angmom, torque, ellipsoid
|
||||
-
|
||||
- aspherical particles
|
||||
* - *full*
|
||||
- *molecular* + q
|
||||
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
- molecular force fields
|
||||
* - *line*
|
||||
- *atomic* + molecule, radius, rmass, omega, torque, line
|
||||
-
|
||||
- 2-d rigid body particles
|
||||
* - *mdpd*
|
||||
- *atomic* + rho, drho, vest
|
||||
- :ref:`DPD-MESO <PKG-DPD-MESO>`
|
||||
- Many-body DPD (mDPD)
|
||||
* - *molecular*
|
||||
- *angle* + "dihedral and improper data"
|
||||
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
- apolar and uncharged molecules
|
||||
* - *oxdna*
|
||||
- *atomic* + id5p
|
||||
- :ref:`CG-DNA <PKG-CG-DNA>`
|
||||
- coarse-grained DNA and RNA models
|
||||
* - *peri*
|
||||
- *atomic* + rmass, vfrac, s0, x0
|
||||
- :ref:`PERI <PKG-PERI>`
|
||||
- mesoscopic Peridynamics models
|
||||
* - *smd*
|
||||
- *atomic* + molecule, radius, rmass + "smd data"
|
||||
- :ref:`MACHDYN <PKG-MACHDYN>`
|
||||
- Smooth Mach Dynamics models
|
||||
* - *sph*
|
||||
- *atomic* + "sph data"
|
||||
- :ref:`SPH <PKG-SPH>`
|
||||
- Smoothed particle hydrodynamics models
|
||||
* - *sphere*
|
||||
- *atomic* + radius, rmass, omega, torque
|
||||
-
|
||||
- finite size spherical particles, e.g. granular models
|
||||
* - *spin*
|
||||
- *atomic* + "magnetic moment data"
|
||||
- :ref:`SPIN <PKG-SPIN>`
|
||||
- magnetic particles
|
||||
* - *tdpd*
|
||||
- *atomic* + cc, cc_flux, vest
|
||||
- :ref:`DPD-MESO <PKG-DPD-MESO>`
|
||||
- Transport DPD (tDPD)
|
||||
* - *template*
|
||||
- *atomic* + molecule, molindex, molatom
|
||||
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||
- molecular systems where attributes are taken from :doc:`molecule files <molecule>`
|
||||
* - *tri*
|
||||
- *sphere* + molecule, angmom, tri
|
||||
-
|
||||
- 3-d triangulated rigid body LJ particles
|
||||
* - *wavepacket*
|
||||
- *charge* + "wavepacket data"
|
||||
- :ref:`AWPMD <PKG-AWPMD>`
|
||||
- Antisymmetrized wave packet MD
|
||||
|
||||
.. note::
|
||||
|
||||
It is possible to add some attributes, such as a molecule ID, to
|
||||
atom styles that do not have them via the :doc:`fix property/atom
|
||||
<fix_property_atom>` command. This command also allows new custom
|
||||
attributes consisting of extra integer or floating-point values to
|
||||
be added to atoms. See the :doc:`fix property/atom
|
||||
<fix_property_atom>` page for examples of cases where this is
|
||||
useful and details on how to initialize, access, and output the
|
||||
custom values.
|
||||
It is possible to add some attributes, such as a molecule ID and
|
||||
charge, to atom styles that do not have them built in using the
|
||||
:doc:`fix property/atom <fix_property_atom>` command. This command
|
||||
also allows new custom-named attributes consisting of extra integer
|
||||
or floating-point values or vectors to be added to atoms. See the
|
||||
:doc:`fix property/atom <fix_property_atom>` page for examples of
|
||||
cases where this is useful and details on how to initialize,
|
||||
access, and output these custom values.
|
||||
|
||||
All of the above styles define point particles, except the *sphere*,
|
||||
*bpm/sphere*, *ellipsoid*, *electron*, *peri*, *wavepacket*, *line*,
|
||||
*tri*, and *body* styles, which define finite-size particles. See the
|
||||
:doc:`Howto spherical <Howto_spherical>` page for an overview of using
|
||||
finite-size particle models with LAMMPS.
|
||||
----------
|
||||
|
||||
All of the point-particle styles assign mass to particles on a
|
||||
per-type basis, using the :doc:`mass <mass>` command, The finite-size
|
||||
particle styles assign mass to individual particles on a per-particle
|
||||
basis.
|
||||
Particle size and mass
|
||||
""""""""""""""""""""""
|
||||
|
||||
For the *sphere* and *bpm/sphere* styles, the particles are spheres
|
||||
and each stores a per-particle diameter and mass. If the diameter >
|
||||
0.0, the particle is a finite-size sphere. If the diameter = 0.0, it
|
||||
is a point particle. Note that by use of the *disc* keyword with the
|
||||
:doc:`fix nve/sphere <fix_nve_sphere>`, :doc:`fix nvt/sphere
|
||||
<fix_nvt_sphere>`, :doc:`fix nph/sphere <fix_nph_sphere>`,
|
||||
:doc:`fix npt/sphere <fix_npt_sphere>` commands for the *sphere* style,
|
||||
spheres can be effectively treated as 2d discs for a 2d simulation if
|
||||
desired. See also the :doc:`set density/disc <set>` command. These
|
||||
styles take an optional 0 or 1 argument. A value of 0 means the
|
||||
radius of each sphere is constant for the duration of the simulation.
|
||||
A value of 1 means the radii may vary dynamically during the simulation,
|
||||
e.g. due to use of the :doc:`fix adapt <fix_adapt>` command.
|
||||
All of the atom styles define point particles unless they (1) define
|
||||
finite-size spherical particles via the *radius* attribute, or (2)
|
||||
define finite-size aspherical particles (e.g. the *body*, *ellipsoid*,
|
||||
*line*, and *tri* styles). Most of these styles can also be used with
|
||||
mixtures of point and finite-size particles.
|
||||
|
||||
For the *ellipsoid* style, the particles are ellipsoids and each
|
||||
stores a flag which indicates whether it is a finite-size ellipsoid or
|
||||
a point particle. If it is an ellipsoid, it also stores a shape
|
||||
vector with the 3 diameters of the ellipsoid and a quaternion 4-vector
|
||||
with its orientation.
|
||||
Note that the *radius* property may need to be provided as a
|
||||
*diameter* (e.g. in :doc:`molecule files <molecule>` or :doc:`data
|
||||
files <read_data>`). See the :doc:`Howto spherical <Howto_spherical>`
|
||||
page for an overview of using finite-size spherical and aspherical
|
||||
particle models with LAMMPS.
|
||||
|
||||
For the *dielectric* style, each particle can be either a physical
|
||||
particle (e.g. an ion), or an interface particle representing a boundary
|
||||
element between two regions of different dielectric constant. For
|
||||
interface particles, in addition to the properties associated with
|
||||
atom_style full, each particle also should be assigned a normal unit
|
||||
vector (defined by normx, normy, normz), an area (area/patch), the
|
||||
difference and mean of the dielectric constants of two sides of the
|
||||
interface along the direction of the normal vector (ed and em), the
|
||||
local dielectric constant at the boundary element (epsilon), and a mean
|
||||
local curvature (curv). Physical particles must be assigned these
|
||||
values, as well, but only their local dielectric constants will be used;
|
||||
see documentation for associated :doc:`pair styles <pair_dielectric>`
|
||||
and :doc:`fixes <fix_polarize>`. The distinction between the physical
|
||||
and interface particles is only meaningful when :doc:`fix polarize
|
||||
<fix_polarize>` commands are applied to the interface particles. This
|
||||
style is part of the DIELECTRIC package.
|
||||
Unless an atom style defines the per-atom *rmass* attribute, particle
|
||||
masses are defined on a per-type basis, using the :doc:`mass <mass>`
|
||||
command. This means each particle's mass is indexed by its atom
|
||||
*type*.
|
||||
|
||||
For the *dipole* style, a point dipole is defined for each point
|
||||
particle. Note that if you wish the particles to be finite-size
|
||||
spheres as in a Stockmayer potential for a dipolar fluid, so that the
|
||||
particles can rotate due to dipole-dipole interactions, then you need
|
||||
to use atom_style hybrid sphere dipole, which will assign both a
|
||||
diameter and dipole moment to each particle.
|
||||
A few styles define the per-atom *rmass* attribute which can also be
|
||||
added using the :doc:`fix property/atom <fix_property_atom>` command.
|
||||
In this case each particle stores its own mass. Atom styles that have
|
||||
a per-atom rmass may define it indirectly through setting particle
|
||||
diameter and density on a per-particle basis. If both per-type mass
|
||||
and per-atom *rmass* are defined (e.g. in a hybrid style), the
|
||||
per-atom mass will take precedence in any operation which which works
|
||||
with both flavors of mass.
|
||||
|
||||
For the *electron* style, the particles representing electrons are 3d
|
||||
Gaussians with a specified position and bandwidth or uncertainty in
|
||||
position, which is represented by the eradius = electron size.
|
||||
----------
|
||||
|
||||
For the *peri* style, the particles are spherical and each stores a
|
||||
per-particle mass and volume.
|
||||
|
||||
The *bpm/sphere* style is part of the BPM package.
|
||||
|
||||
The *oxdna* style is for coarse-grained nucleotides and stores the
|
||||
3'-to-5' polarity of the nucleotide strand, which is set through
|
||||
the bond topology in the data file. The first (second) atom in a
|
||||
bond definition is understood to point towards the 3'-end (5'-end)
|
||||
of the strand. Note that this style is part of the CG-DNA package.
|
||||
|
||||
The *dpd* style is for dissipative particle dynamics (DPD) particles.
|
||||
Note that it is part of the DPD-REACT package, and is not for use with
|
||||
the :doc:`pair_style dpd or dpd/stat <pair_dpd>` commands, which can
|
||||
simply use atom_style atomic. Atom_style dpd extends DPD particle
|
||||
properties with internal temperature (dpdTheta), internal conductive
|
||||
energy (uCond), internal mechanical energy (uMech), and internal
|
||||
chemical energy (uChem).
|
||||
|
||||
The *edpd* style is for energy-conserving dissipative particle
|
||||
dynamics (eDPD) particles which store a temperature (edpd_temp), and
|
||||
heat capacity(edpd_cv).
|
||||
|
||||
The *mdpd* style is for many-body dissipative particle dynamics (mDPD)
|
||||
particles which store a density (rho) for considering
|
||||
density-dependent many-body interactions.
|
||||
|
||||
The *tdpd* style is for transport dissipative particle dynamics (tDPD)
|
||||
particles which store a set of chemical concentration. An integer
|
||||
"cc_species" is required to specify the number of chemical species
|
||||
involved in a tDPD system.
|
||||
|
||||
The *sph* style is for smoothed particle hydrodynamics (SPH)
|
||||
particles which store a density (rho), energy (esph), and heat capacity
|
||||
(cv).
|
||||
|
||||
The *smd* style is for a general formulation of Smooth Particle
|
||||
Hydrodynamics. Both fluids and solids can be modeled. Particles
|
||||
store the mass and volume of an integration point, a kernel diameter
|
||||
used for calculating the field variables (e.g. stress and deformation)
|
||||
and a contact radius for calculating repulsive forces which prevent
|
||||
individual physical bodies from penetrating each other.
|
||||
|
||||
For the *spin* style, a magnetic spin is associated to each atom.
|
||||
Those spins have a norm (their magnetic moment) and a direction.
|
||||
|
||||
The *wavepacket* style is similar to *electron*, but the electrons may
|
||||
consist of several Gaussian wave packets, summed up with coefficients
|
||||
cs= (cs_re,cs_im). Each of the wave packets is treated as a separate
|
||||
particle in LAMMPS, wave packets belonging to the same electron must
|
||||
have identical *etag* values.
|
||||
|
||||
For the *line* style, the particles are idealized line segments and
|
||||
each stores a per-particle mass and length and orientation (i.e. the
|
||||
end points of the line segment).
|
||||
|
||||
For the *tri* style, the particles are planar triangles and each
|
||||
stores a per-particle mass and size and orientation (i.e. the corner
|
||||
points of the triangle).
|
||||
|
||||
The *template* style allows molecular topology (bonds,angles,etc) to be
|
||||
defined via a molecule template using the :doc:`molecule <molecule>`
|
||||
command. The template stores one or more molecules with a single copy
|
||||
of the topology info (bonds,angles,etc) of each. Individual atoms
|
||||
only store a template index and template atom to identify which
|
||||
molecule and which atom-within-the-molecule they represent. Using the
|
||||
*template* style instead of the *bond*, *angle*, *molecular* styles
|
||||
can save memory for systems comprised of a large number of small
|
||||
molecules, all of a single type (or small number of types). See the
|
||||
paper by Grime and Voth, in :ref:`(Grime) <Grime>`, for examples of how this
|
||||
can be advantageous for large-scale coarse-grained systems.
|
||||
The ``examples/template`` directory has a few demo inputs and examples
|
||||
showing the use of the *template* atom style versus *molecular*.
|
||||
|
||||
.. note::
|
||||
|
||||
When using the *template* style with a :doc:`molecule template
|
||||
<molecule>` that contains multiple molecules, you should ensure the
|
||||
atom types, bond types, angle_types, etc in all the molecules are
|
||||
consistent. E.g. if one molecule represents H2O and another CO2,
|
||||
then you probably do not want each molecule file to define 2 atom
|
||||
types and a single bond type, because they will conflict with each
|
||||
other when a mixture system of H2O and CO2 molecules is defined,
|
||||
e.g. by the :doc:`read_data <read_data>` command. Rather the H2O
|
||||
molecule should define atom types 1 and 2, and bond type 1. And
|
||||
the CO2 molecule should define atom types 3 and 4 (or atom types 3
|
||||
and 2 if a single oxygen type is desired), and bond type 2.
|
||||
Additional information about specific atom styles
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
For the *body* style, the particles are arbitrary bodies with internal
|
||||
attributes defined by the "style" of the bodies, which is specified by
|
||||
@ -309,6 +282,149 @@ Note that there may be additional arguments required along with the
|
||||
*bstyle* specification, in the atom_style body command. These
|
||||
arguments are described on the :doc:`Howto body <Howto_body>` doc page.
|
||||
|
||||
For the *dielectric* style, each particle can be either a physical
|
||||
particle (e.g. an ion), or an interface particle representing a
|
||||
boundary element between two regions of different dielectric
|
||||
constant. For interface particles, in addition to the properties
|
||||
associated with atom_style full, each particle also should be assigned
|
||||
a unit dipole vector (mu) representing the direction of the induced
|
||||
dipole moment at each interface particle, an area (area/patch), the
|
||||
difference and mean of the dielectric constants of two sides of the
|
||||
interface along the direction of the normal vector (ed and em), the
|
||||
local dielectric constant at the boundary element (epsilon), and a
|
||||
mean local curvature (curv). Physical particles must be assigned
|
||||
these values, as well, but only their local dielectric constants will
|
||||
be used; see documentation for associated :doc:`pair styles
|
||||
<pair_dielectric>` and :doc:`fixes <fix_polarize>`. The distinction
|
||||
between the physical and interface particles is only meaningful when
|
||||
:doc:`fix polarize <fix_polarize>` commands are applied to the
|
||||
interface particles. This style is part of the DIELECTRIC package.
|
||||
|
||||
For the *dipole* style, a point dipole vector mu is defined for each
|
||||
point particle. Note that if you wish the particles to be finite-size
|
||||
spheres as in a Stockmayer potential for a dipolar fluid, so that the
|
||||
particles can rotate due to dipole-dipole interactions, then you need
|
||||
to use the command `atom_style hybrid sphere dipole`, which will
|
||||
assign both a diameter and dipole moment to each particle. This also
|
||||
requires using an integrator with a "/sphere" suffix like :doc:`fix
|
||||
nve/sphere <fix_nve_sphere>` or :doc:`fix nvt/sphere <fix_nvt_sphere>`
|
||||
and the "update dipole" or "update dlm" parameters to the fix
|
||||
commands.
|
||||
|
||||
The *dpd* style is for reactive dissipative particle dynamics (DPD)
|
||||
particles. Note that it is part of the DPD-REACT package, and is not
|
||||
required for use with the :doc:`pair_style dpd or dpd/stat <pair_dpd>`
|
||||
commands, which only require the attributes from atom_style *atomic*.
|
||||
Atom_style *dpd* extends DPD particle properties with internal
|
||||
temperature (dpdTheta), internal conductive energy (uCond), internal
|
||||
mechanical energy (uMech), and internal chemical energy (uChem).
|
||||
|
||||
The *edpd* style is for energy-conserving dissipative particle
|
||||
dynamics (eDPD) particles which store a temperature (edpd_temp), and
|
||||
heat capacity (edpd_cv).
|
||||
|
||||
For the *electron* style, the particles representing electrons are 3d
|
||||
Gaussians with a specified position and bandwidth or uncertainty in
|
||||
position, which is represented by the eradius = electron size.
|
||||
|
||||
For the *ellipsoid* style, particles can be ellipsoids which each
|
||||
stores a shape vector with the 3 diameters of the ellipsoid and a
|
||||
quaternion 4-vector with its orientation. Each particle stores a flag
|
||||
in the ellipsoid vector which indicates whether it is an ellipsoid (1)
|
||||
or a point particle (0).
|
||||
|
||||
For the *line* style, particles can be are idealized line segments
|
||||
which store a per-particle mass and length and orientation (i.e. the
|
||||
end points of the line segment). Each particle stores a flag in the
|
||||
line vector which indicates whether it is a line segment (1) or a
|
||||
point particle (0).
|
||||
|
||||
The *mdpd* style is for many-body dissipative particle dynamics (mDPD)
|
||||
particles which store a density (rho) for considering density-dependent
|
||||
many-body interactions.
|
||||
|
||||
The *oxdna* style is for coarse-grained nucleotides and stores the
|
||||
3'-to-5' polarity of the nucleotide strand, which is set through
|
||||
the bond topology in the data file. The first (second) atom in a
|
||||
bond definition is understood to point towards the 3'-end (5'-end)
|
||||
of the strand.
|
||||
|
||||
For the *peri* style, the particles are spherical and each stores a
|
||||
per-particle mass and volume.
|
||||
|
||||
The *smd* style is for Smooth Particle Mach dynamics. Both fluids and
|
||||
solids can be modeled. Particles store the mass and volume of an
|
||||
integration point, a kernel diameter used for calculating the field
|
||||
variables (e.g. stress and deformation) and a contact radius for
|
||||
calculating repulsive forces which prevent individual physical bodies
|
||||
from penetrating each other.
|
||||
|
||||
The *sph* style is for smoothed particle hydrodynamics (SPH) particles
|
||||
which store a density (rho), energy (esph), and heat capacity (cv).
|
||||
|
||||
For the *spin* style, a magnetic spin is associated with each atom.
|
||||
Those spins have a norm (their magnetic moment) and a direction.
|
||||
|
||||
The *tdpd* style is for transport dissipative particle dynamics (tDPD)
|
||||
particles which store a set of chemical concentration. An integer
|
||||
"cc_species" is required to specify the number of chemical species
|
||||
involved in a tDPD system.
|
||||
|
||||
The *wavepacket* style is similar to the *electron* style, but the
|
||||
electrons may consist of several Gaussian wave packets, summed up with
|
||||
coefficients cs= (cs_re,cs_im). Each of the wave packets is treated
|
||||
as a separate particle in LAMMPS, wave packets belonging to the same
|
||||
electron must have identical *etag* values.
|
||||
|
||||
The *sphere* and *bpm/sphere* styles allow particles to be either point
|
||||
particles or finite-size particles. If the *radius* attribute is >
|
||||
0.0, the particle is a finite-size sphere. If the diameter = 0.0, it
|
||||
is a point particle. Note that by using the *disc* keyword with the
|
||||
:doc:`fix nve/sphere <fix_nve_sphere>`, :doc:`fix nvt/sphere
|
||||
<fix_nvt_sphere>`, :doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix
|
||||
npt/sphere <fix_npt_sphere>` commands for the *sphere* style, spheres
|
||||
can be effectively treated as 2d discs for a 2d simulation if desired.
|
||||
See also the :doc:`set density/disc <set>` command. These styles also
|
||||
take an optional 0 or 1 argument. A value of 0 means the radius of
|
||||
each sphere is constant for the duration of the simulation (this is
|
||||
the default). A value of 1 means the radii may vary dynamically
|
||||
during the simulation, e.g. due to use of the :doc:`fix adapt
|
||||
<fix_adapt>` command.
|
||||
|
||||
The *template* style allows molecular topology (bonds,angles,etc) to be
|
||||
defined via a molecule template using the :doc:`molecule <molecule>`
|
||||
command. The template stores one or more molecules with a single copy
|
||||
of the topology info (bonds,angles,etc) of each. Individual atoms only
|
||||
store a template index and template atom to identify which molecule and
|
||||
which atom-within-the-molecule they represent. Using the *template*
|
||||
style instead of the *bond*, *angle*, *molecular* styles can save memory
|
||||
for systems comprised of a large number of small molecules, all of a
|
||||
single type (or small number of types). See the paper by Grime and
|
||||
Voth, in :ref:`(Grime) <Grime>`, for examples of how this can be
|
||||
advantageous for large-scale coarse-grained systems. The
|
||||
``examples/template`` directory has a few demo inputs and examples
|
||||
showing the use of the *template* atom style versus *molecular*.
|
||||
|
||||
.. note::
|
||||
|
||||
When using the *template* style with a :doc:`molecule template
|
||||
<molecule>` that contains multiple molecules, you should ensure the
|
||||
atom types, bond types, angle_types, etc in all the molecules are
|
||||
consistent. E.g. if one molecule represents H2O and another CO2,
|
||||
then you probably do not want each molecule file to define 2 atom
|
||||
types and a single bond type, because they will conflict with each
|
||||
other when a mixture system of H2O and CO2 molecules is defined,
|
||||
e.g. by the :doc:`read_data <read_data>` command. Rather the H2O
|
||||
molecule should define atom types 1 and 2, and bond type 1. And
|
||||
the CO2 molecule should define atom types 3 and 4 (or atom types 3
|
||||
and 2 if a single oxygen type is desired), and bond type 2.
|
||||
|
||||
For the *tri* style, particles can be planar triangles which each
|
||||
stores a per-particle mass and size and orientation (i.e. the corner
|
||||
points of the triangle). Each particle stores a flag in the tri
|
||||
vector which indicates whether it is a triangle (1) or a point
|
||||
particle (0).
|
||||
|
||||
----------
|
||||
|
||||
Typically, simulations require only a single (non-hybrid) atom style.
|
||||
@ -326,11 +442,12 @@ dipole". When a hybrid style is used, atoms store and communicate the
|
||||
union of all quantities implied by the individual styles.
|
||||
|
||||
When using the *hybrid* style, you cannot combine the *template* style
|
||||
with another molecular style that stores bond,angle,etc info on a
|
||||
with another molecular style that stores bond, angle, etc info on a
|
||||
per-atom basis.
|
||||
|
||||
LAMMPS can be extended with new atom styles as well as new body
|
||||
styles; see the :doc:`Modify <Modify>` doc page.
|
||||
LAMMPS can be extended with new atom styles as well as new body styles;
|
||||
see the corresponding manual page on :doc:`modifying & extending LAMMPS
|
||||
<Modify_atom>`.
|
||||
|
||||
----------
|
||||
|
||||
@ -346,54 +463,20 @@ This command cannot be used after the simulation box is defined by a
|
||||
|
||||
Many of the styles listed above are only enabled if LAMMPS was built
|
||||
with a specific package, as listed below. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
The *amoeba* style is part of the AMOEBA package.
|
||||
|
||||
The *angle*, *bond*, *full*, *molecular*, and *template* styles are
|
||||
part of the MOLECULE package.
|
||||
|
||||
The *line* and *tri* styles are part of the ASPHERE package.
|
||||
|
||||
The *body* style is part of the BODY package.
|
||||
|
||||
The *dipole* style is part of the DIPOLE package.
|
||||
|
||||
The *peri* style is part of the PERI package for Peridynamics.
|
||||
|
||||
The *oxdna* style is part of the CG-DNA package for coarse-grained
|
||||
simulation of DNA and RNA.
|
||||
|
||||
The *electron* style is part of the EFF package for :doc:`electronic
|
||||
force fields <pair_eff>`.
|
||||
|
||||
The *dpd* style is part of the DPD-REACT package for dissipative
|
||||
particle dynamics (DPD).
|
||||
|
||||
The *edpd*, *mdpd*, and *tdpd* styles are part of the DPD-MESO package
|
||||
for energy-conserving dissipative particle dynamics (eDPD), many-body
|
||||
dissipative particle dynamics (mDPD), and transport dissipative particle
|
||||
dynamics (tDPD), respectively.
|
||||
|
||||
The *sph* style is part of the SPH package for smoothed particle
|
||||
hydrodynamics (SPH). See `this PDF guide
|
||||
<PDF/SPH_LAMMPS_userguide.pdf>`_ to using SPH in LAMMPS.
|
||||
|
||||
The *spin* style is part of the SPIN package.
|
||||
|
||||
The *wavepacket* style is part of the AWPMD package for the
|
||||
:doc:`antisymmetrized wave packet MD method <pair_awpmd>`.
|
||||
<Build_package>` page for more info. The table above lists which package
|
||||
is required for individual atom styles.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`read_data <read_data>`, :doc:`pair_style <pair_style>`
|
||||
:doc:`read_data <read_data>`, :doc:`pair_style <pair_style>`,
|
||||
:doc:`fix property/atom <fix_property_atom>`, :doc:`set <set>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The default atom style is atomic. If atom_style sphere is used its
|
||||
default argument is 0.
|
||||
The default atom style is *atomic*. If atom_style *sphere* or
|
||||
*bpm/sphere* is used, its default argument is 0.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -147,8 +147,8 @@ By default, pair forces are not calculated between bonded particles.
|
||||
Pair forces can alternatively be overlaid on top of bond forces by setting
|
||||
the *overlay/pair* keyword to *yes*. These settings require specific
|
||||
:doc:`special_bonds <special_bonds>` settings described in the
|
||||
restrictions. Further details can be found in the :doc:`how to
|
||||
<Howto_bpm>` page on BPMs.
|
||||
restrictions. Further details can be found in the :doc:`how to <Howto_bpm>`
|
||||
page on BPMs.
|
||||
|
||||
.. versionadded:: 28Mar2023
|
||||
|
||||
|
||||
@ -113,8 +113,8 @@ By default, pair forces are not calculated between bonded particles.
|
||||
Pair forces can alternatively be overlaid on top of bond forces by setting
|
||||
the *overlay/pair* keyword to *yes*. These settings require specific
|
||||
:doc:`special_bonds <special_bonds>` settings described in the
|
||||
restrictions. Further details can be found in the :doc:`how to
|
||||
<Howto_bpm>` page on BPMs.
|
||||
restrictions. Further details can be found in the :doc:`how to <Howto_bpm>`
|
||||
page on BPMs.
|
||||
|
||||
.. versionadded:: 28Mar2023
|
||||
|
||||
|
||||
@ -11,7 +11,16 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
bond_style lepton
|
||||
bond_style style args
|
||||
|
||||
* style = *lepton*
|
||||
* args = optional arguments
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
args = *auto_offset* or *no_offset*
|
||||
*auto_offset* = offset the potential energy so that the value at r0 is 0.0 (default)
|
||||
*no_offset* = do not offset the potential energy
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -19,6 +28,7 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
bond_style lepton
|
||||
bond_style lepton no_offset
|
||||
|
||||
bond_coeff 1 1.5 "k*r^2; k=250.0"
|
||||
bond_coeff 2 1.1 "k2*r^2 + k3*r^3 + k4*r^4; k2=300.0; k3=-100.0; k4=50.0"
|
||||
@ -40,6 +50,13 @@ constant *K* of 200.0 energy units:
|
||||
|
||||
U_{bond,i} = K (r_i - r_0)^2 = K r^2 \qquad r = r_i - r_0
|
||||
|
||||
.. versionchanged:: 7Feb2024
|
||||
|
||||
By default the potential energy U is shifted so that he value U is 0.0
|
||||
for $r = r_0$. This is equivalent to using the optional keyword
|
||||
*auto_offset*. When using the keyword *no_offset* instead, the
|
||||
potential energy is not shifted.
|
||||
|
||||
The `Lepton library <https://simtk.org/projects/lepton>`_, that the
|
||||
*lepton* bond style interfaces with, evaluates this expression string at
|
||||
run time to compute the pairwise energy. It also creates an analytical
|
||||
|
||||
@ -42,8 +42,10 @@ commands.
|
||||
The style *p* means the box is periodic, so that particles interact
|
||||
across the boundary, and they can exit one end of the box and re-enter
|
||||
the other end. A periodic dimension can change in size due to
|
||||
constant pressure boundary conditions or box deformation (see the :doc:`fix npt <fix_nh>` and :doc:`fix deform <fix_deform>` commands). The *p*
|
||||
style must be applied to both faces of a dimension.
|
||||
constant pressure boundary conditions or box deformation (see the
|
||||
:doc:`fix npt <fix_nh>` and :doc:`fix deform <fix_deform>` commands).
|
||||
The *p* style must be applied to both faces of a dimension. For 2d
|
||||
simulations the z dimension must be periodic (which is the default).
|
||||
|
||||
The styles *f*, *s*, and *m* mean the box is non-periodic, so that
|
||||
particles do not interact across the boundary and do not move from one
|
||||
@ -76,28 +78,44 @@ atoms becomes less than 50.0. This can be useful if you start a
|
||||
simulation with an empty box or if you wish to leave room on one side
|
||||
of the box, e.g. for atoms to evaporate from a surface.
|
||||
|
||||
For triclinic (non-orthogonal) simulation boxes, if the second dimension
|
||||
of a tilt factor (e.g. y for xy) is periodic, then the periodicity is
|
||||
enforced with the tilt factor offset. If the first dimension is
|
||||
shrink-wrapped, then the shrink wrapping is applied to the tilted box
|
||||
face, to encompass the atoms. E.g. for a positive xy tilt, the xlo
|
||||
and xhi faces of the box are planes tilting in the +y direction as y
|
||||
increases. These tilted planes are shrink-wrapped around the atoms to
|
||||
determine the x extent of the box.
|
||||
|
||||
LAMMPS also allows use of triclinic (non-orthogonal) simulation boxes.
|
||||
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
|
||||
geometric description of triclinic boxes, as defined by LAMMPS, and
|
||||
how to transform these parameters to and from other commonly used
|
||||
triclinic representations.
|
||||
description of both general and restricted triclinic boxes and how to
|
||||
define them. General triclinic boxes (arbitrary edge vectors **A**,
|
||||
**B**, and **C**) are converted internally to restricted triclinic
|
||||
boxes with tilt factors (xy,xz,yz) which skew an otherwise orthogonal
|
||||
box.
|
||||
|
||||
The boundary <boundary> command settings explained above for the 6
|
||||
faces of an orthogonal box also apply in similar manner to the 6 faces
|
||||
of a restricted triclinic box (and thus to the corresponding 6 faces
|
||||
of a general triclinic box), with the following context.
|
||||
|
||||
if the second dimension of a tilt factor (e.g. y for xy) is periodic,
|
||||
then the periodicity is enforced with the tilt factor offset. This
|
||||
means that for y periodicity a particle which exits the lower y
|
||||
boundary is displaced in the x-direction by xy before it re-enters the
|
||||
upper y boundary. And vice versa if a particle exits the upper y
|
||||
boundary. Likewise the ghost atoms surrounding a particle near the
|
||||
lower y boundary include images of particles near the upper y-boundary
|
||||
which are displaced in the x-direction by xy. Similar rules apply for
|
||||
z-periodicity and the xz and/or yz tilt factors.
|
||||
|
||||
If the first dimension of a tilt factor is shrink-wrapped, then the
|
||||
shrink wrapping is applied to the tilted box face, to encompass the
|
||||
atoms. E.g. for a positive xy tilt, the xlo and xhi faces of the box
|
||||
are planes tilting in the +y direction as y increases. The position
|
||||
of these tilted planes are adjusted dynamically to shrink-wrap around
|
||||
the atoms to determine the xlo and xhi extents of the box.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This command cannot be used after the simulation box is defined by a
|
||||
:doc:`read_data <read_data>` or :doc:`create_box <create_box>` command or
|
||||
:doc:`read_restart <read_restart>` command. See the
|
||||
:doc:`change_box <change_box>` command for how to change the simulation
|
||||
box boundaries after it has been defined.
|
||||
:doc:`read_data <read_data>` or :doc:`create_box <create_box>` command
|
||||
or :doc:`read_restart <read_restart>` command. See the
|
||||
:doc:`change_box <change_box>` command for how to change the
|
||||
simulation box boundaries after it has been defined.
|
||||
|
||||
For 2d simulations, the z dimension must be periodic.
|
||||
|
||||
|
||||
@ -204,8 +204,23 @@ angles per atom satisfying the ADF criteria.
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
By default, the ADF is not computed for distances longer than the
|
||||
largest force cutoff, since the neighbor list creation will only contain
|
||||
pairs up to that distance (plus neighbor list skin). If you use outer
|
||||
cutoffs larger than that, you must use :doc:`neighbor style 'bin' or
|
||||
'nsq' <neighbor>`.
|
||||
|
||||
If you want an ADF for a larger outer cutoff, you can also use the
|
||||
:doc:`rerun <rerun>` command to post-process a dump file, use :doc:`pair
|
||||
style zero <pair_zero>` and set the force cutoff to be larger in the
|
||||
rerun script. Note that in the rerun context, the force cutoff is
|
||||
arbitrary and with pair style zero you are not computing any forces, and
|
||||
since you are not running dynamics you are not changing the model that
|
||||
generated the trajectory.
|
||||
|
||||
The ADF is not computed for neighbors outside the force cutoff,
|
||||
since processors (in parallel) don't know about atom coordinates for
|
||||
|
||||
@ -102,6 +102,8 @@ This compute is part of the EXTRA-COMPUTE package. It is only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
|
||||
@ -107,6 +107,8 @@ This compute is part of the EXTRA-COMPUTE package. It is only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
|
||||
@ -106,6 +106,8 @@ Restrictions
|
||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||
LAMMPS was built with that package.
|
||||
|
||||
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ tangential force tensor. The contact tensor is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
C_{ab} = \frac{15}{2} (\phi_{ab} - \mathrm{Tr}(\phi) \delta_{ab})
|
||||
C_{ab} = \frac{15}{2} (\phi_{ab} - \frac{1}{3} \mathrm{Tr}(\phi) \delta_{ab})
|
||||
|
||||
where :math:`a` and :math:`b` are the :math:`x`, :math:`y`, :math:`z`
|
||||
directions, :math:`\delta_{ab}` is the Kronecker delta function, and
|
||||
@ -83,7 +83,7 @@ The branch tensor is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
B_{ab} = \frac{15}{6 \mathrm{Tr}(D)} (D_{ab} - \mathrm{Tr}(D) \delta_{ab})
|
||||
B_{ab} = \frac{15}{2\, \mathrm{Tr}(D)} (D_{ab} - \frac{1}{3} \mathrm{Tr}(D) \delta_{ab})
|
||||
|
||||
where the tensor :math:`D` is defined as
|
||||
|
||||
@ -101,7 +101,7 @@ The normal force fabric tensor is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
F^n_{ab} = \frac{15}{6\, \mathrm{Tr}(N)} (N_{ab} - \mathrm{Tr}(N) \delta_{ab})
|
||||
F^n_{ab} = \frac{15}{2\, \mathrm{Tr}(N)} (N_{ab} - \frac{1}{3} \mathrm{Tr}(N) \delta_{ab})
|
||||
|
||||
where the tensor :math:`N` is defined as
|
||||
|
||||
@ -119,7 +119,7 @@ as
|
||||
|
||||
.. math::
|
||||
|
||||
F^t_{ab} = \frac{15}{9\, \mathrm{Tr}(N)} (T_{ab} - \mathrm{Tr}(T) \delta_{ab})
|
||||
F^t_{ab} = \frac{5}{\mathrm{Tr}(N)} (T_{ab} - \frac{1}{3} \mathrm{Tr}(T) \delta_{ab})
|
||||
|
||||
where the tensor :math:`T` is defined as
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ Syntax
|
||||
*model* values = style
|
||||
style = *linear* or *quadratic* or *mliappy*
|
||||
*descriptor* values = style filename
|
||||
style = *sna*
|
||||
style = *sna* or *ace*
|
||||
filename = name of file containing descriptor definitions
|
||||
*gradgradflag* value = 0/1
|
||||
toggle gradgrad method for force gradient
|
||||
@ -31,6 +31,7 @@ Examples
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute mliap model linear descriptor sna Ta06A.mliap.descriptor
|
||||
compute mliap model linear descriptor ace H_N_O_ccs.yace gradgradflag 1
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -40,18 +41,15 @@ of machine-learning interatomic potentials with respect to model parameters.
|
||||
It is used primarily for calculating the gradient of energy, force, and
|
||||
stress components with respect to model parameters, which is useful when
|
||||
training :doc:`mliap pair_style <pair_mliap>` models to match target data.
|
||||
It provides separate
|
||||
definitions of the interatomic potential functional form (*model*)
|
||||
and the geometric quantities that characterize the atomic positions
|
||||
(*descriptor*). By defining *model* and *descriptor* separately,
|
||||
It provides separate definitions of the interatomic potential functional
|
||||
form (*model*) and the geometric quantities that characterize the atomic
|
||||
positions (*descriptor*). By defining *model* and *descriptor* separately,
|
||||
it is possible to use many different models with a given descriptor,
|
||||
or many different descriptors with a given model. Currently, the
|
||||
compute supports just two models, *linear* and *quadratic*,
|
||||
and one descriptor, *sna*, the SNAP descriptor used by
|
||||
:doc:`pair_style snap <pair_snap>`, including the linear, quadratic,
|
||||
and chem variants. Work is currently underway to extend
|
||||
the interface to handle neural network energy models,
|
||||
and it is also straightforward to add new descriptor styles.
|
||||
or many different descriptors with a given model. Currently, the compute
|
||||
supports *linear* and *quadratic* SNAP descriptor computes used in
|
||||
:doc:`pair_style snap <pair_snap>`, *linear* SO3 descriptor computes, and
|
||||
*linear* ACE descriptor computes used in :doc:`pair_style pace <pair_pace>`,
|
||||
and it is straightforward to add new descriptor styles.
|
||||
|
||||
The compute *mliap* command must be followed by two keywords
|
||||
*model* and *descriptor* in either order.
|
||||
@ -60,19 +58,31 @@ The *model* keyword is followed by the model style (*linear*,
|
||||
*quadratic* or *mliappy*). The *mliappy* model is only available if
|
||||
LAMMPS is built with the *mliappy* Python module. There are
|
||||
:ref:`specific installation instructions <mliap>` for that module.
|
||||
For the *mliap* compute, specifying a *linear* model will compute the
|
||||
specified descriptors and gradients with respect to linear model parameters
|
||||
whereas *quadratic* will do the same, but for the quadratic products of
|
||||
descriptors.
|
||||
|
||||
The *descriptor* keyword is followed by a descriptor style, and
|
||||
additional arguments. The compute currently supports two descriptor
|
||||
styles *sna* and *so3*, but it is is straightforward to add additional
|
||||
descriptor styles. The SNAP descriptor style *sna* is the same as that
|
||||
used by :doc:`pair_style snap <pair_snap>`, including the linear,
|
||||
quadratic, and chem variants. A single additional argument specifies
|
||||
the descriptor filename containing the parameters and setting used by
|
||||
the SNAP descriptor. The descriptor filename usually ends in the
|
||||
additional arguments. The compute currently supports three descriptor
|
||||
styles: *sna*, *so3*, and *ace*, but it is is straightforward to add
|
||||
additional descriptor styles. The SNAP descriptor style *sna* is the
|
||||
same as that used by :doc:`pair_style snap <pair_snap>`, including the
|
||||
linear, quadratic, and chem variants. A single additional argument
|
||||
specifies the descriptor filename containing the parameters and setting used
|
||||
by the SNAP descriptor. The descriptor filename usually ends in the
|
||||
*.mliap.descriptor* extension. The format of this file is identical to
|
||||
the descriptor file in the :doc:`pair_style mliap <pair_mliap>`, and is
|
||||
described in detail there.
|
||||
|
||||
The ACE descriptor style *ace* is the same as :doc:`pair_style pace <pair_pace>`.
|
||||
A single additional argument specifies the *ace* descriptor filename
|
||||
that contains parameters and settings for the ACE descriptors. This file
|
||||
format differs from the SNAP or SO3 descriptor files, and has a *.yace* or
|
||||
*.ace* extension. However, as with other mliap descriptor styles, this file
|
||||
is identical to the ace descriptor file in :doc:`pair_style mliap <pair_mliap>`,
|
||||
where it is described in further detail.
|
||||
|
||||
.. note::
|
||||
|
||||
The number of LAMMPS atom types (and the value of *nelems* in the model)
|
||||
@ -172,8 +182,10 @@ This compute is part of the ML-IAP package. It is only enabled if
|
||||
LAMMPS was built with that package. In addition, building LAMMPS with
|
||||
the ML-IAP package requires building LAMMPS with the ML-SNAP package.
|
||||
The *mliappy* model also requires building LAMMPS with the PYTHON
|
||||
package. See the :doc:`Build package <Build_package>` page for more
|
||||
info.
|
||||
package. The *ace* descriptor also requires building LAMMPS with the
|
||||
ML-PACE package. See the :doc:`Build package <Build_package>` page for
|
||||
more info. Note that `kk` (KOKKOS) accelerated variants of SNAP and
|
||||
ACE descriptors are not compatible with `mliap descriptor`.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
@ -36,7 +36,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
This compute calculates a set of quantities related to the atomic
|
||||
cluster expansion (ACE) descriptors of the atoms in a group. ACE
|
||||
|
||||
@ -153,7 +153,8 @@ Related commands
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
By default the compute includes contributions from the keywords:
|
||||
``ke pair bond angle dihedral improper kspace fix``
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -23,8 +23,9 @@ Syntax
|
||||
spx, spy, spz, sp, fmx, fmy, fmz,
|
||||
nbonds,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
temperature, heatflow,
|
||||
angmomx, angmomy, angmomz,
|
||||
shapex,shapey, shapez,
|
||||
shapex, shapey, shapez,
|
||||
quatw, quati, quatj, quatk, tqx, tqy, tqz,
|
||||
end1x, end1y, end1z, end2x, end2y, end2z,
|
||||
corner1x, corner1y, corner1z,
|
||||
@ -56,6 +57,8 @@ Syntax
|
||||
*nbonds* = number of bonds assigned to an atom
|
||||
*radius,diameter* = radius,diameter of spherical particle
|
||||
*omegax,omegay,omegaz* = angular velocity of spherical particle
|
||||
*temperature* = internal temperature of spherical particle
|
||||
*heatflow* = internal heat flow of spherical particle
|
||||
*angmomx,angmomy,angmomz* = angular momentum of aspherical particle
|
||||
*shapex,shapey,shapez* = 3 diameters of aspherical particle
|
||||
*quatw,quati,quatj,quatk* = quaternion components for aspherical or body particles
|
||||
|
||||
@ -32,7 +32,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
Define a compute that identifies rattlers in a system. Rattlers are often
|
||||
identified in granular or glassy packings as under-coordinated atoms that
|
||||
|
||||
@ -176,22 +176,29 @@ also numbers :math:`\ge 0.0`.
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
The RDF is not computed for distances longer than the force cutoff,
|
||||
since processors (in parallel) do not know about atom coordinates for
|
||||
atoms further away than that distance. If you want an RDF for larger
|
||||
distances, you can use the :doc:`rerun <rerun>` command to post-process
|
||||
a dump file and set the cutoff for the potential to be longer in the
|
||||
By default, the RDF is not computed for distances longer than the
|
||||
largest force cutoff, since the neighbor list creation will only contain
|
||||
pairs up to that distance (plus neighbor list skin). This distance can
|
||||
be increased using the *cutoff* keyword but this keyword is only valid
|
||||
with :doc:`neighbor styles 'bin' and 'nsq' <neighbor>`.
|
||||
|
||||
If you want an RDF for larger distances, you can also use the
|
||||
:doc:`rerun <rerun>` command to post-process a dump file, use :doc:`pair
|
||||
style zero <pair_zero>` and set the force cutoff to be longer in the
|
||||
rerun script. Note that in the rerun context, the force cutoff is
|
||||
arbitrary, since you are not running dynamics and thus are not changing
|
||||
your model. The definition of :math:`g(r)` used by LAMMPS is only appropriate
|
||||
for characterizing atoms that are uniformly distributed throughout the
|
||||
simulation cell. In such cases, the coordination number is still
|
||||
correct and meaningful. As an example, if a large simulation cell
|
||||
contains only one atom of type *itypeN* and one of *jtypeN*, then :math:`g(r)`
|
||||
will register an arbitrarily large spike at whatever distance they
|
||||
happen to be at, and zero everywhere else.
|
||||
The function :math:`\text{coord}(r)` will show a step
|
||||
change from zero to one at the location of the spike in :math:`g(r)`.
|
||||
arbitrary and with pair style zero you are not computing any forces, and
|
||||
you are not running dynamics you are not changing the model that
|
||||
generated the trajectory.
|
||||
|
||||
The definition of :math:`g(r)` used by LAMMPS is only appropriate for
|
||||
characterizing atoms that are uniformly distributed throughout the
|
||||
simulation cell. In such cases, the coordination number is still correct
|
||||
and meaningful. As an example, if a large simulation cell contains only
|
||||
one atom of type *itypeN* and one of *jtypeN*, then :math:`g(r)` will
|
||||
register an arbitrarily large spike at whatever distance they happen to
|
||||
be at, and zero everywhere else. The function :math:`\text{coord}(r)`
|
||||
will show a step change from zero to one at the location of the spike in
|
||||
:math:`g(r)`.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
Define a computation that extracts bond information computed by the ReaxFF
|
||||
potential specified by :doc:`pair_style reaxff <pair_reaxff>`.
|
||||
|
||||
@ -56,8 +56,9 @@ Examples
|
||||
compute 1 all reduce sum c_force
|
||||
compute 1 all reduce/region subbox sum c_force
|
||||
compute 2 all reduce min c_press[2] f_ave v_myKE
|
||||
compute 2 all reduce min c_press[*] f_ave v_myKE
|
||||
compute 2 all reduce min c_press[*] f_ave v_myKE inputs peratom
|
||||
compute 3 fluid reduce max c_index[1] c_index[2] c_dist replace 1 3 replace 2 3
|
||||
compute 4 all reduce max c_bond inputs local
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
@ -32,7 +32,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
Define a computation that performs the Supervised Learning Crystal
|
||||
Structure Analysis (SL-CSA) from :ref:`(Lafourcade) <Lafourcade2023_1>`
|
||||
|
||||
@ -289,7 +289,8 @@ Related commands
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
By default the compute includes contributions from the keywords:
|
||||
``ke pair bond angle dihedral improper kspace fix``
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -132,10 +132,13 @@ size does not change in time, and axis-aligned planes.
|
||||
The method only works with two-body pair interactions, because it
|
||||
requires the class method ``Pair::single()`` to be implemented, which is
|
||||
not possible for manybody potentials. In particular, compute
|
||||
*stress/mop/profile* and *stress/mop* do not work with more than two-body pair
|
||||
interactions, long range (kspace) interactions and
|
||||
*stress/mop/profile* and *stress/mop* do not work with more than two-body
|
||||
pair interactions, long range (kspace) interactions and
|
||||
improper intramolecular interactions.
|
||||
|
||||
The impact of fixes that affect the stress (e.g. fix langevin) is
|
||||
also not included in the stress computed here.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
|
||||
@ -86,25 +86,46 @@ Description
|
||||
"""""""""""
|
||||
|
||||
This command creates atoms (or molecules) within the simulation box,
|
||||
either on a lattice, or a single atom (or molecule), or on a surface
|
||||
defined by a triangulated mesh, or a random collection of atoms (or
|
||||
molecules). It is an alternative to reading in atom coordinates
|
||||
either on a lattice, or at random points, or on a surface defined by a
|
||||
triangulated mesh. Or it creates a single atom (or molecule) at a
|
||||
specified point. It is an alternative to reading in atom coordinates
|
||||
explicitly via a :doc:`read_data <read_data>` or :doc:`read_restart
|
||||
<read_restart>` command. A simulation box must already exist, which is
|
||||
<read_restart>` command.
|
||||
|
||||
To use this command a simulation box must already exist, which is
|
||||
typically created via the :doc:`create_box <create_box>` command.
|
||||
Before using this command, a lattice must also be defined using the
|
||||
:doc:`lattice <lattice>` command, unless you specify the *single* style
|
||||
with units = box or the *random* style. For the remainder of this doc
|
||||
page, a created atom or molecule is referred to as a "particle".
|
||||
Before using this command, a lattice must typically also be defined
|
||||
using the :doc:`lattice <lattice>` command, unless you specify the
|
||||
*single* or *mesh* style with units = box or the *random* style. To
|
||||
create atoms on a lattice for general triclinic boxes, see the
|
||||
discussion below.
|
||||
|
||||
For the remainder of this doc page, a created atom or molecule is
|
||||
referred to as a "particle".
|
||||
|
||||
If created particles are individual atoms, they are assigned the
|
||||
specified atom *type*, though this can be altered via the *basis*
|
||||
keyword as discussed below. If molecules are being created, the type
|
||||
of each atom in the created molecule is specified in the file read by
|
||||
the :doc:`molecule <molecule>` command, and those values are added to
|
||||
the specified atom *type* (e.g., if *type* = 2 and the file specifies
|
||||
atom types 1, 2, and 3, then each created molecule will have atom types
|
||||
3, 4, and 5).
|
||||
of each atom in the created molecule is specified in a specified file
|
||||
read by the :doc:`molecule <molecule>` command, and those values are
|
||||
added to the specified atom *type* (e.g., if *type* = 2 and the file
|
||||
specifies atom types 1, 2, and 3, then each created molecule will have
|
||||
atom types 3, 4, and 5).
|
||||
|
||||
.. note::
|
||||
|
||||
You cannot use this command to create atoms that are outside the
|
||||
simulation box; they will just be ignored by LAMMPS. This is true
|
||||
even if you are using shrink-wrapped box boundaries, as specified
|
||||
by the :doc:`boundary <boundary>` command. However, you can first
|
||||
use the :doc:`change_box <change_box>` command to temporarily
|
||||
expand the box, then add atoms via create_atoms, then finally use
|
||||
change_box command again if needed to re-shrink-wrap the new atoms.
|
||||
See the :doc:`change_box <change_box>` doc page for an example of
|
||||
how to do this, using the create_atoms *single* style to insert a
|
||||
new atom outside the current simulation box.
|
||||
|
||||
----------
|
||||
|
||||
For the *box* style, the create_atoms command fills the entire
|
||||
simulation box with particles on the lattice. If your simulation box
|
||||
@ -126,10 +147,117 @@ periodic boundaries. If this is desired, you should either use the
|
||||
*box* style, or tweak the region size to get precisely the particles
|
||||
you want.
|
||||
|
||||
----------
|
||||
|
||||
If the simulation box is formulated as a general triclinic box defined
|
||||
by arbitrary edge vectors **A**, **B**, **C**, then the *box* and
|
||||
*region* styles will create atoms on a lattice commensurate with those
|
||||
edge vectors. See the :doc:`Howto_triclinic <Howto_triclinic>` doc
|
||||
page for a detailed explanation of orthogonal, restricted triclinic,
|
||||
and general triclinic simulation boxes. As with the :doc:`create_box
|
||||
<create_box>` command, the :doc:`lattice <lattice>` command used by
|
||||
this command must be of style *custom* and use its *triclinic/general*
|
||||
option. The *a1, *a2*, *a3* settings of the :doc:`lattice <lattice>`
|
||||
command define the edge vectors of a unit cell of the general
|
||||
triclinic lattice. The :doc:`create_box <create_box>` command creates
|
||||
a simulation box which replicates that unit cell along each of the
|
||||
**A**, **B**, **C** edge vectors.
|
||||
|
||||
.. note::
|
||||
|
||||
LAMMPS allows specification of general triclinic simulation boxes
|
||||
as a convenience for users who may be converting data from
|
||||
solid-state crystallographic representations or from DFT codes for
|
||||
input to LAMMPS. However, as explained on the
|
||||
:doc:`Howto_triclinic <Howto_triclinic>` doc page, internally,
|
||||
LAMMPS only uses restricted triclinic simulation boxes. This means
|
||||
the box created by the :doc:`create_box <create_box>` command as
|
||||
well as the atoms created by this command with their per-atom
|
||||
information (e.g. coordinates, velocities) are converted (rotated)
|
||||
from general to restricted triclinic form when the two commands are
|
||||
invoked. The <Howto_triclinic>` doc page also discusses other
|
||||
LAMMPS commands which can input/output general triclinic
|
||||
representations of the simulation box and per-atom data.
|
||||
|
||||
The *box* style will fill the entire general triclinic box with
|
||||
particles on the lattice, as explained above.
|
||||
|
||||
.. note::
|
||||
|
||||
The *region* style also operates as explained above, but the check
|
||||
for particles inside the region is performed *after* the particle
|
||||
coordinates have been converted to the restricted triclinic box.
|
||||
This means the region must also be defined with respect to the
|
||||
restricted triclinic box, not the general triclinic box.
|
||||
|
||||
If the simulation box is general triclinic, the *single*, *random*,
|
||||
and *mesh* styles described next operate on the box *after* it has
|
||||
been converted to restricted triclinic. So all the settings for those
|
||||
styles should be made in that context.
|
||||
|
||||
----------
|
||||
|
||||
For the *single* style, a single particle is added to the system at
|
||||
the specified coordinates. This can be useful for debugging purposes
|
||||
or to create a tiny system with a handful of particles at specified
|
||||
positions.
|
||||
positions. For a 2d simulation the specified z coordinate must be
|
||||
0.0.
|
||||
|
||||
.. versionchanged:: 2Jun2022
|
||||
|
||||
The *porosity* style has been renamed to *random* with added functionality.
|
||||
|
||||
For the *random* style, *N* particles are added to the system at
|
||||
randomly generated coordinates, which can be useful for generating an
|
||||
amorphous system. For 2d simulations, the z coordinates of all added
|
||||
atoms will be 0.0.
|
||||
|
||||
The particles are created one by one using the specified random number
|
||||
*seed*, resulting in the same set of particle coordinates, independent
|
||||
of how many processors are being used in the simulation. Unless the
|
||||
*overlap* keyword is specified, particles created by the *random*
|
||||
style will typically be highly overlapped. Various additional
|
||||
criteria can be used to accept or reject a random particle insertion;
|
||||
see the keyword discussion below. Multiple attempts per particle are
|
||||
made (see the *maxtry* keyword) until the insertion is either
|
||||
successful or fails. If this command fails to add all requested *N*
|
||||
particles, a warning will be output.
|
||||
|
||||
If the *region-ID* argument is specified as NULL, then the randomly
|
||||
created particles will be anywhere in the simulation box. If a
|
||||
*region-ID* is specified, a geometric volume is filled that is both
|
||||
inside the simulation box and is also consistent with the region
|
||||
volume. See the :doc:`region <region>` command for details. Note
|
||||
that a region can be specified so that its "volume" is either inside
|
||||
or outside its geometric boundary.
|
||||
|
||||
Note that the create_atoms command adds particles to those that
|
||||
already exist. This means it can be used to add particles to a system
|
||||
previously read in from a data or restart file. Or the create_atoms
|
||||
command can be used multiple times, to add multiple sets of particles
|
||||
to the simulation. For example, grain boundaries can be created, by
|
||||
interleaving the create_atoms command with :doc:`lattice <lattice>`
|
||||
commands specifying different orientations.
|
||||
|
||||
When this command is used, care should be taken to ensure the
|
||||
resulting system does not contain particles that are highly
|
||||
overlapped. Such overlaps will cause many interatomic potentials to
|
||||
compute huge energies and forces, leading to bad dynamics. There are
|
||||
several strategies to avoid this problem:
|
||||
|
||||
* Use the :doc:`delete_atoms overlap <delete_atoms>` command after
|
||||
create_atoms. For example, this strategy can be used to overlay and
|
||||
surround a large protein molecule with a volume of water molecules,
|
||||
then delete water molecules that overlap with the protein atoms.
|
||||
|
||||
* For the *random* style, use the optional *overlap* keyword to avoid
|
||||
overlaps when each new particle is created.
|
||||
|
||||
* Before running dynamics on an overlapped system, perform an
|
||||
:doc:`energy minimization <minimize>`. Or run initial dynamics with
|
||||
:doc:`pair_style soft <pair_soft>` or with :doc:`fix nve/limit
|
||||
<fix_nve_limit>` to un-overlap the particles, before running normal
|
||||
dynamics.
|
||||
|
||||
.. figure:: img/marble_race.jpg
|
||||
:figwidth: 33%
|
||||
@ -189,73 +317,6 @@ to the area of that triangle.
|
||||
beneficial to exclude computing interactions between the created
|
||||
particles using :doc:`neigh_modify exclude <neigh_modify>`.
|
||||
|
||||
.. versionchanged:: 2Jun2022
|
||||
|
||||
The *porosity* style has been renamed to *random* with added functionality.
|
||||
|
||||
For the *random* style, *N* particles are added to the system at
|
||||
randomly generated coordinates, which can be useful for generating an
|
||||
amorphous system. The particles are created one by one using the
|
||||
specified random number *seed*, resulting in the same set of particle
|
||||
coordinates, independent of how many processors are being used in the
|
||||
simulation. Unless the *overlap* keyword is specified, particles
|
||||
created by the *random* style will typically be highly overlapped.
|
||||
Various additional criteria can be used to accept or reject a random
|
||||
particle insertion; see the keyword discussion below. Multiple
|
||||
attempts per particle are made (see the *maxtry* keyword) until the
|
||||
insertion is either successful or fails. If this command fails to add
|
||||
all requested *N* particles, a warning will be output.
|
||||
|
||||
If the *region-ID* argument is specified as NULL, then the randomly
|
||||
created particles will be anywhere in the simulation box. If a
|
||||
*region-ID* is specified, a geometric volume is filled that is both
|
||||
inside the simulation box and is also consistent with the region
|
||||
volume. See the :doc:`region <region>` command for details. Note
|
||||
that a region can be specified so that its "volume" is either inside
|
||||
or outside its geometric boundary.
|
||||
|
||||
Note that the create_atoms command adds particles to those that
|
||||
already exist. This means it can be used to add particles to a system
|
||||
previously read in from a data or restart file. Or the create_atoms
|
||||
command can be used multiple times, to add multiple sets of particles
|
||||
to the simulation. For example, grain boundaries can be created, by
|
||||
interleaving the create_atoms command with :doc:`lattice <lattice>`
|
||||
commands specifying different orientations.
|
||||
|
||||
When this command is used, care should be taken to ensure the
|
||||
resulting system does not contain particles that are highly
|
||||
overlapped. Such overlaps will cause many interatomic potentials to
|
||||
compute huge energies and forces, leading to bad dynamics. There are
|
||||
several strategies to avoid this problem:
|
||||
|
||||
* Use the :doc:`delete_atoms overlap <delete_atoms>` command after
|
||||
create_atoms. For example, this strategy can be used to overlay and
|
||||
surround a large protein molecule with a volume of water molecules,
|
||||
then delete water molecules that overlap with the protein atoms.
|
||||
|
||||
* For the *random* style, use the optional *overlap* keyword to avoid
|
||||
overlaps when each new particle is created.
|
||||
|
||||
* Before running dynamics on an overlapped system, perform an
|
||||
:doc:`energy minimization <minimize>`. Or run initial dynamics with
|
||||
:doc:`pair_style soft <pair_soft>` or with :doc:`fix nve/limit
|
||||
<fix_nve_limit>` to un-overlap the particles, before running normal
|
||||
dynamics.
|
||||
|
||||
.. note::
|
||||
|
||||
You cannot use any of the styles explained above to create atoms
|
||||
that are outside the simulation box; they will just be ignored by
|
||||
LAMMPS. This is true even if you are using shrink-wrapped box
|
||||
boundaries, as specified by the :doc:`boundary <boundary>` command.
|
||||
However, you can first use the :doc:`change_box <change_box>`
|
||||
command to temporarily expand the box, then add atoms via
|
||||
create_atoms, then finally use change_box command again if needed
|
||||
to re-shrink-wrap the new atoms. See the :doc:`change_box
|
||||
<change_box>` doc page for an example of how to do this, using the
|
||||
create_atoms *single* style to insert a new atom outside the
|
||||
current simulation box.
|
||||
|
||||
----------
|
||||
|
||||
Individual atoms are inserted by this command, unless the *mol*
|
||||
@ -268,6 +329,12 @@ molecule can be specified in the molecule file. See the
|
||||
required to be in this file are the coordinates and types of atoms in
|
||||
the molecule.
|
||||
|
||||
.. note::
|
||||
|
||||
If you are using the *mol* keyword in combination with the
|
||||
:doc:`atom style template <atom_style>` command, they must use
|
||||
the same molecule template-ID.
|
||||
|
||||
Using a lattice to add molecules, e.g. via the *box* or *region* or
|
||||
*single* styles, is exactly the same as adding atoms on lattice
|
||||
points, except that entire molecules are added at each point, i.e. on
|
||||
@ -463,12 +530,19 @@ on a single CPU core.
|
||||
-----
|
||||
|
||||
The *units* keyword determines the meaning of the distance units used
|
||||
to specify the coordinates of the one particle created by the *single*
|
||||
style, or the overlap distance *Doverlap* by the *overlap* keyword. A
|
||||
*box* value selects standard distance units as defined by the
|
||||
:doc:`units <units>` command (e.g., :math:`\AA` for
|
||||
units = *real* or *metal*\ . A *lattice* value means the distance units are in
|
||||
lattice spacings.
|
||||
by parameters for various styles. A *box* value selects standard
|
||||
distance units as defined by the :doc:`units <units>` command (e.g.,
|
||||
:math:`\AA` for units = *real* or *metal*\ . A *lattice* value means
|
||||
the distance units are in lattice spacings. These are affected settings:
|
||||
|
||||
* for *single* style: coordinates of the particle created
|
||||
* for *random* style: overlap distance *Doverlap* by the *overlap* keyword
|
||||
* for *mesh* style: *bisect* threshold value for *meshmode* = *bisect*
|
||||
* for *mesh* style: *radthresh* value for *meshmode* = *bisect*
|
||||
* for *mesh* style: *density* value for *meshmode* = *qrand*
|
||||
|
||||
Since *density* represents an area (distance ^2), the lattice spacing
|
||||
factor is also squared.
|
||||
|
||||
----------
|
||||
|
||||
@ -536,6 +610,11 @@ command.
|
||||
A rotation vector specified for a single molecule must be in
|
||||
the z-direction for a 2d model.
|
||||
|
||||
For :doc:`molecule templates <molecule>` that are created from multiple
|
||||
files, i.e. contain multiple molecule *sets*, only the first set is
|
||||
used. To create multiple molecules the files currently need to be
|
||||
merged and different molecule IDs assigned with a Molecules section.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
|
||||
@ -9,9 +9,11 @@ Syntax
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
create_box N region-ID keyword value ...
|
||||
create_box N NULL alo ahi blo bhi clo chi keyword value ...
|
||||
|
||||
* N = # of atom types to use in this simulation
|
||||
* region-ID = ID of region to use as simulation domain
|
||||
* region-ID = ID of region to use as simulation domain or NULL for general triclinic box
|
||||
* alo,ahi,blo,bhi,clo,chi = multipliers on a1,a2,a3 vectors defined by :doc"`lattice <lattice>` command (only when region-ID = NULL)
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *bond/types* or *angle/types* or *dihedral/types* or *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*
|
||||
|
||||
@ -32,121 +34,204 @@ Examples
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
# orthogonal or restricted triclinic box using regionID = mybox
|
||||
create_box 2 mybox
|
||||
create_box 2 mybox bond/types 2 extra/bond/per/atom 1
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
# 2d general triclinic box using primitive cell for 2d hex lattice
|
||||
lattice custom 1.0 a1 1.0 0.0 0.0 a2 0.5 0.86602540378 0.0 &
|
||||
a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 triclinic/general
|
||||
create_box 1 NULL 0 5 0 5 -0.5 0.5
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
# 3d general triclinic box using primitive cell for 3d fcc lattice
|
||||
lattice custom 1.0 a2 0.0 0.5 0.5 a1 0.5 0.0 0.5 a3 0.5 0.5 0.0 basis 0.0 0.0 0.0 triclinic/general
|
||||
create box 1 NULL -5 5 -10 10 0 20
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
This command creates a simulation box based on the specified region.
|
||||
Thus a :doc:`region <region>` command must first be used to define a
|
||||
geometric domain. It also partitions the simulation box into a
|
||||
regular 3d grid of rectangular bricks, one per processor, based on the
|
||||
number of processors being used and the settings of the
|
||||
:doc:`processors <processors>` command. The partitioning can later be
|
||||
changed by the :doc:`balance <balance>` or :doc:`fix balance <fix_balance>` commands.
|
||||
This command creates a simulation box. It also partitions the box into
|
||||
a regular 3d grid of smaller sub-boxes, one per processor (MPI task).
|
||||
The geometry of the partitioning is based on the size and shape of the
|
||||
simulation box, the number of processors being used and the settings
|
||||
of the :doc:`processors <processors>` command. The partitioning can
|
||||
later be changed by the :doc:`balance <balance>` or :doc:`fix balance
|
||||
<fix_balance>` commands.
|
||||
|
||||
The argument N is the number of atom types that will be used in the
|
||||
Simulation boxes in LAMMPS can be either orthogonal or triclinic in
|
||||
shape. Orthogonal boxes are a brick in 3d (rectangle in 2d) with 6
|
||||
faces that are each perpendicular to one of the standard xyz
|
||||
coordinate axes. Triclinic boxes are a parallelepiped in 3d
|
||||
(parallelogram in 2d) with opposite pairs of faces parallel to each
|
||||
other. LAMMPS supports two forms of triclinic boxes, restricted and
|
||||
general, which differ in how the box is oriented with respect to the
|
||||
xyz coordinate axes. See the :doc:`Howto triclinic <Howto_triclinic>`
|
||||
for a detailed description of all 3 kinds of simulation boxes.
|
||||
|
||||
The argument *N* is the number of atom types that will be used in the
|
||||
simulation.
|
||||
|
||||
Orthogonal and restricted triclinic boxes are created by specifying a
|
||||
region ID previously defined by the :doc:`region <region>` command.
|
||||
General triclinic boxes are discussed below.
|
||||
|
||||
If the region is not of style *prism*, then LAMMPS encloses the region
|
||||
(block, sphere, etc.) with an axis-aligned orthogonal bounding box
|
||||
which becomes the simulation domain.
|
||||
which becomes the simulation domain. For a 2d simulation, the zlo and
|
||||
zhi values of the simulation box must straddle zero.
|
||||
|
||||
If the region is of style *prism*, LAMMPS creates a non-orthogonal
|
||||
simulation domain shaped as a parallelepiped with triclinic symmetry.
|
||||
As defined by the :doc:`region prism <region>` command, the
|
||||
parallelepiped has its "origin" at (xlo,ylo,zlo) and is defined by three
|
||||
edge vectors starting from the origin given by
|
||||
:math:`\vec a = (x_\text{hi}-x_\text{lo},0,0)`;
|
||||
:math:`\vec b = (xy,y_\text{hi}-y_\text{lo},0)`; and
|
||||
:math:`\vec c = (xz,yz,z_\text{hi}-z_\text{lo})`.
|
||||
The parameters *xy*\ , *xz*\ , and *yz* can be 0.0 or
|
||||
positive or negative values and are called "tilt factors" because they
|
||||
are the amount of displacement applied to faces of an originally
|
||||
orthogonal box to transform it into the parallelepiped.
|
||||
parallelepiped has an "origin" at (xlo,ylo,zlo) and three edge vectors
|
||||
starting from the origin given by :math:`\vec a =
|
||||
(x_\text{hi}-x_\text{lo},0,0)`; :math:`\vec b =
|
||||
(xy,y_\text{hi}-y_\text{lo},0)`; and :math:`\vec c =
|
||||
(xz,yz,z_\text{hi}-z_\text{lo})`. In LAMMPS lingo, this is a
|
||||
restricted triclinic box because the three edge vectors cannot be
|
||||
defined in arbitrary (general) directions. The parameters *xy*\ ,
|
||||
*xz*\ , and *yz* can be 0.0 or positive or negative values and are
|
||||
called "tilt factors" because they are the amount of displacement
|
||||
applied to faces of an originally orthogonal box to transform it into
|
||||
the parallelepiped. For a 2d simulation, the zlo and zhi values of
|
||||
the simulation box must straddle zero.
|
||||
|
||||
By default, a *prism* region used with the create_box command must have
|
||||
tilt factors :math:`(xy,xz,yz)` that do not skew the box more than half
|
||||
the distance of the parallel box length. For example, if
|
||||
:math:`x_\text{lo} = 2` and :math:`x_\text{hi} = 12`, then the :math:`x`
|
||||
box length is 10 and the :math:`xy` tilt factor must be between
|
||||
:math:`-5` and :math:`5`. Similarly, both :math:`xz` and :math:`yz`
|
||||
must be between :math:`-(x_\text{hi}-x_\text{lo})/2` and
|
||||
Typically a *prism* region used with the create_box command should
|
||||
have tilt factors :math:`(xy,xz,yz)` that do not skew the box more
|
||||
than half the distance of the parallel box length. For example, if
|
||||
:math:`x_\text{lo} = 2` and :math:`x_\text{hi} = 12`, then the
|
||||
:math:`x` box length is 10 and the :math:`xy` tilt factor must be
|
||||
between :math:`-5` and :math:`5`. Similarly, both :math:`xz` and
|
||||
:math:`yz` must be between :math:`-(x_\text{hi}-x_\text{lo})/2` and
|
||||
:math:`+(y_\text{hi}-y_\text{lo})/2`. Note that this is not a
|
||||
limitation, since if the maximum tilt factor is 5 (as in this example),
|
||||
then configurations with tilt :math:`= \dots, -15`, :math:`-5`,
|
||||
:math:`5`, :math:`15`, :math:`25, \dots` are all geometrically
|
||||
equivalent. Simulations with large tilt factors will run inefficiently,
|
||||
since they require more ghost atoms and thus more communication. With
|
||||
very large tilt factors, LAMMPS will eventually produce incorrect
|
||||
trajectories and stop with errors due to lost atoms or similar.
|
||||
limitation, since if the maximum tilt factor is 5 (as in this
|
||||
example), then configurations with tilt :math:`= \dots, -15`,
|
||||
:math:`-5`, :math:`5`, :math:`15`, :math:`25, \dots` are all
|
||||
geometrically equivalent.
|
||||
|
||||
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
|
||||
geometric description of triclinic boxes, as defined by LAMMPS, and
|
||||
how to transform these parameters to and from other commonly used
|
||||
triclinic representations.
|
||||
LAMMPS will issue a warning if the tilt factors of the created box do
|
||||
not meet this criterion. This is because simulations with large tilt
|
||||
factors may run inefficiently, since they require more ghost atoms and
|
||||
thus more communication. With very large tilt factors, LAMMPS may
|
||||
eventually produce incorrect trajectories and stop with errors due to
|
||||
lost atoms or similar issues.
|
||||
|
||||
When a prism region is used, the simulation domain should normally be periodic
|
||||
in the dimension that the tilt is applied to, which is given by the second
|
||||
dimension of the tilt factor (e.g., :math:`y` for :math:`xy` tilt). This is so
|
||||
that pairs of atoms interacting across that boundary will have one of them
|
||||
shifted by the tilt factor. Periodicity is set by the
|
||||
:doc:`boundary <boundary>` command. For example, if the :math:`xy` tilt factor
|
||||
is non-zero, then the :math:`y` dimension should be periodic. Similarly, the
|
||||
:math:`z` dimension should be periodic if :math:`xz` or :math:`yz` is non-zero.
|
||||
LAMMPS does not require this periodicity, but you may lose atoms if this is not
|
||||
the case.
|
||||
See the :doc:`Howto triclinic <Howto_triclinic>` page for geometric
|
||||
descriptions of triclinic boxes and tilt factors, as well as how to
|
||||
transform the restricted triclinic parameters to and from other
|
||||
commonly used triclinic representations.
|
||||
|
||||
When a prism region is used, the simulation domain should normally be
|
||||
periodic in the dimension that the tilt is applied to, which is given
|
||||
by the second dimension of the tilt factor (e.g., :math:`y` for
|
||||
:math:`xy` tilt). This is so that pairs of atoms interacting across
|
||||
that boundary will have one of them shifted by the tilt factor.
|
||||
Periodicity is set by the :doc:`boundary <boundary>` command. For
|
||||
example, if the :math:`xy` tilt factor is non-zero, then the :math:`y`
|
||||
dimension should be periodic. Similarly, the :math:`z` dimension
|
||||
should be periodic if :math:`xz` or :math:`yz` is non-zero. LAMMPS
|
||||
does not require this periodicity, but you may lose atoms if this is
|
||||
not the case.
|
||||
|
||||
Note that if your simulation will tilt the box (e.g., via the
|
||||
:doc:`fix deform <fix_deform>` command), the simulation box must be set up to
|
||||
be triclinic, even if the tilt factors are initially 0.0. You can
|
||||
also change an orthogonal box to a triclinic box or vice versa by
|
||||
:doc:`fix deform <fix_deform>` command), the simulation box must be
|
||||
created as triclinic, even if the tilt factors are initially 0.0. You
|
||||
can also change an orthogonal box to a triclinic box or vice versa by
|
||||
using the :doc:`change box <change_box>` command with its *ortho* and
|
||||
*triclinic* options.
|
||||
|
||||
.. note::
|
||||
|
||||
If the system is non-periodic (in a dimension), then you should
|
||||
not make the lo/hi box dimensions (as defined in your
|
||||
:doc:`region <region>` command) radically smaller/larger than the extent
|
||||
of the atoms you eventually plan to create (e.g., via the
|
||||
:doc:`create_atoms <create_atoms>` command). For example, if your atoms
|
||||
extend from 0 to 50, you should not specify the box bounds as :math:`-10000`
|
||||
and :math:`10000`. This is because as described above, LAMMPS uses the
|
||||
specified box size to lay out the 3d grid of processors. A huge
|
||||
(mostly empty) box will be sub-optimal for performance when using
|
||||
"fixed" boundary conditions (see the :doc:`boundary <boundary>`
|
||||
command). When using "shrink-wrap" boundary conditions (see the
|
||||
:doc:`boundary <boundary>` command), a huge (mostly empty) box may cause
|
||||
a parallel simulation to lose atoms the first time that LAMMPS
|
||||
shrink-wraps the box around the atoms.
|
||||
If the system is non-periodic (in a dimension), then you should not
|
||||
make the lo/hi box dimensions (as defined in your :doc:`region
|
||||
<region>` command) radically smaller/larger than the extent of the
|
||||
atoms you eventually plan to create (e.g., via the
|
||||
:doc:`create_atoms <create_atoms>` command). For example, if your
|
||||
atoms extend from 0 to 50, you should not specify the box bounds as
|
||||
:math:`-10000` and :math:`10000`. This is because as described
|
||||
above, LAMMPS uses the specified box size to lay out the 3d grid of
|
||||
processors. A huge (mostly empty) box will be sub-optimal for
|
||||
performance when using "fixed" boundary conditions (see the
|
||||
:doc:`boundary <boundary>` command). When using "shrink-wrap"
|
||||
boundary conditions (see the :doc:`boundary <boundary>` command), a
|
||||
huge (mostly empty) box may cause a parallel simulation to lose
|
||||
atoms the first time that LAMMPS shrink-wraps the box around the
|
||||
atoms.
|
||||
|
||||
----------
|
||||
|
||||
As noted above, general triclinic boxes in LAMMPS allow the box to
|
||||
have arbitrary edge vectors **A**, **B**, **C**. The only
|
||||
restrictions are that the three vectors be distinct, non-zero, and not
|
||||
co-planar. They must also define a right-handed system such that
|
||||
(**A** x **B**) points in the direction of **C**. Note that a
|
||||
left-handed system can be converted to a right-handed system by simply
|
||||
swapping the order of any pair of the **A**, **B**, **C** vectors.
|
||||
|
||||
To create a general triclinic boxes, the region is specified as NULL
|
||||
and the next 6 parameters (alo,ahi,blo,bhi,clo,chi) define the three
|
||||
edge vectors **A**, **B**, **C** using additional information
|
||||
previously defined by the :doc:`lattice <lattice>` command.
|
||||
|
||||
The lattice must be of style *custom* and use its *triclinic/general*
|
||||
option. This insures the lattice satisfies the restrictions listed
|
||||
above. The *a1, *a2*, *a3* settings of the :doc:`lattice <lattice>`
|
||||
command define the edge vectors of a unit cell of the general
|
||||
triclinic lattice. This command uses them to define the three edge
|
||||
vectors and origin of the general triclinic box as:
|
||||
|
||||
* **A** = (ahi-alo) * *a1*
|
||||
* **B** = (bhi-blo) * *a2*
|
||||
* **C** = (chi-clo) * *a3*
|
||||
* origin = (alo*a1 + blo*a2 + clo*a3)
|
||||
|
||||
For 2d general triclinic boxes, clo = -0.5 and chi = 0.5 is required.
|
||||
|
||||
.. note::
|
||||
|
||||
LAMMPS allows specification of general triclinic simulation boxes
|
||||
as a convenience for users who may be converting data from
|
||||
solid-state crystallographic representations or from DFT codes for
|
||||
input to LAMMPS. However, as explained on the
|
||||
:doc:`Howto_triclinic <Howto_triclinic>` doc page, internally,
|
||||
LAMMPS only uses restricted triclinic simulation boxes. This means
|
||||
the box defined by this command and per-atom information
|
||||
(e.g. coordinates, velocities) defined by the :doc:`create_atoms
|
||||
<create_atoms>` command are converted (rotated) from general to
|
||||
restricted triclinic form when the two commands are invoked. The
|
||||
<Howto_triclinic>` doc page also discusses other LAMMPS commands
|
||||
which can input/output general triclinic representations of the
|
||||
simulation box and per-atom data.
|
||||
|
||||
----------
|
||||
|
||||
The optional keywords can be used to create a system that allows for
|
||||
bond (angle, dihedral, improper) interactions, or for molecules with
|
||||
special 1--2, 1--3, or 1--4 neighbors to be added later. These optional
|
||||
keywords serve the same purpose as the analogous keywords that can be
|
||||
used in a data file which are recognized by the
|
||||
special 1--2, 1--3, or 1--4 neighbors to be added later. These
|
||||
optional keywords serve the same purpose as the analogous keywords
|
||||
that can be used in a data file which are recognized by the
|
||||
:doc:`read_data <read_data>` command when it sets up a system.
|
||||
|
||||
Note that if these keywords are not used, then the create_box command
|
||||
creates an atomic (non-molecular) simulation that does not allow bonds
|
||||
between pairs of atoms to be defined, or a
|
||||
:doc:`bond potential <bond_style>` to be specified, or for molecules with
|
||||
special neighbors to be added to the system by commands such as
|
||||
:doc:`create_atoms mol <create_atoms>`, :doc:`fix deposit <fix_deposit>`
|
||||
or :doc:`fix pour <fix_pour>`.
|
||||
between pairs of atoms to be defined, or a :doc:`bond potential
|
||||
<bond_style>` to be specified, or for molecules with special neighbors
|
||||
to be added to the system by commands such as :doc:`create_atoms mol
|
||||
<create_atoms>`, :doc:`fix deposit <fix_deposit>` or :doc:`fix pour
|
||||
<fix_pour>`.
|
||||
|
||||
As an example, see the examples/deposit/in.deposit.molecule script,
|
||||
which deposits molecules onto a substrate. Initially there are no
|
||||
molecules in the system, but they are added later by the
|
||||
:doc:`fix deposit <fix_deposit>` command. The create_box command in the
|
||||
script uses the bond/types and extra/bond/per/atom keywords to allow
|
||||
this. If the added molecule contained more than one special bond
|
||||
(allowed by default), an extra/special/per/atom keyword would also
|
||||
need to be specified.
|
||||
molecules in the system, but they are added later by the :doc:`fix
|
||||
deposit <fix_deposit>` command. The create_box command in the script
|
||||
uses the bond/types and extra/bond/per/atom keywords to allow this.
|
||||
If the added molecule contained more than one special bond (allowed by
|
||||
default), an extra/special/per/atom keyword would also need to be
|
||||
specified.
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
.. index:: dihedral_style charmm/kk
|
||||
.. index:: dihedral_style charmm/omp
|
||||
.. index:: dihedral_style charmmfsw
|
||||
.. index:: dihedral_style charmmfsw/kk
|
||||
|
||||
dihedral_style charmm command
|
||||
=============================
|
||||
@ -12,6 +13,8 @@ Accelerator Variants: *charmm/intel*, *charmm/kk*, *charmm/omp*
|
||||
dihedral_style charmmfsw command
|
||||
================================
|
||||
|
||||
Accelerator Variants: *charmmfsw/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
@ -144,7 +147,9 @@ for more info.
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`dihedral_coeff <dihedral_coeff>`
|
||||
:doc:`dihedral_coeff <dihedral_coeff>`,
|
||||
:doc:`pair_style lj/charmm variants <pair_charmm>`,
|
||||
:doc:`angle_style charmm <angle_charmm>`, :doc:`fix cmap <fix_cmap>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
71
doc/src/dihedral_cosine_squared_restricted.rst
Normal file
71
doc/src/dihedral_cosine_squared_restricted.rst
Normal file
@ -0,0 +1,71 @@
|
||||
.. index:: dihedral_style cosine/squared/restricted
|
||||
|
||||
dihedral_style cosine/squared/restricted command
|
||||
================================================
|
||||
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
dihedral_style cosine/squared/restricted
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
dihedral_style cosine/squared/restricted
|
||||
dihedral_coeff 1 10.0 120
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
The *cosine/squared/restricted* dihedral style uses the potential
|
||||
|
||||
.. math::
|
||||
|
||||
E = K [\cos(\phi) - \cos(\phi_0)]^2 / \sin^2(\phi)
|
||||
|
||||
, which is commonly used in the MARTINI force field.
|
||||
|
||||
See :ref:`(Bulacu) <restricted-Bul>` for a description of the restricted dihedral for the MARTINI force field.
|
||||
|
||||
The following coefficients must be defined for each dihedral type via the
|
||||
:doc:`dihedral_coeff <dihedral_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` (energy)
|
||||
* :math:`\phi_0` (degrees)
|
||||
|
||||
:math:`\phi_0` is specified in degrees, but LAMMPS converts it to radians internally.
|
||||
|
||||
----------
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This dihedral style can only be used if LAMMPS was built with the
|
||||
EXTRA-MOLECULE package. See the :doc:`Build package <Build_package>` doc page
|
||||
for more info.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`dihedral_coeff <dihedral_coeff>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _restricted-Bul:
|
||||
|
||||
**(Bulacu)** Bulacu, Goga, Zhao, Rossi, Monticelli, Periole, Tieleman, Marrink, J Chem Theory Comput, 9, 3282-3292
|
||||
(2013).
|
||||
@ -10,7 +10,7 @@ Syntax
|
||||
|
||||
dihedral_style style
|
||||
|
||||
* style = *none* or *zero* or *hybrid* or *charmm* or *charmmfsw* or *class2* or *cosine/shift/exp* or *fourier* or *harmonic* or *helix* or *lepton* or *multi/harmonic* or *nharmonic* or *opls* or *spherical* or *table* or *table/cut*
|
||||
* style = *none* or *zero* or *hybrid* or *charmm* or *charmmfsw* or *class2* or *cosine/shift/exp* or *cosine/squared/restricted* or *fourier* or *harmonic* or *helix* or *lepton* or *multi/harmonic* or *nharmonic* or *opls* or *spherical* or *table* or *table/cut*
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -105,6 +105,7 @@ exist.
|
||||
* :doc:`charmmfsw <dihedral_charmm>` - CHARMM dihedral with force switching
|
||||
* :doc:`class2 <dihedral_class2>` - COMPASS (class 2) dihedral
|
||||
* :doc:`cosine/shift/exp <dihedral_cosine_shift_exp>` - dihedral with exponential in spring constant
|
||||
* :doc:`cosine/squared/restricted <dihedral_cosine_squared_restricted>` - squared cosine dihedral with restricted term
|
||||
* :doc:`fourier <dihedral_fourier>` - dihedral with multiple cosine terms
|
||||
* :doc:`harmonic <dihedral_harmonic>` - harmonic dihedral
|
||||
* :doc:`helix <dihedral_helix>` - helix dihedral
|
||||
|
||||
111
doc/src/dump.rst
111
doc/src/dump.rst
@ -104,7 +104,6 @@ Syntax
|
||||
q, mux, muy, muz, mu,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||
heatflow, temperature,
|
||||
c_ID, c_ID[I], f_ID, f_ID[I], v_name,
|
||||
i_name, d_name, i2_name[I], d2_name[I]
|
||||
|
||||
@ -131,8 +130,6 @@ Syntax
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
tqx,tqy,tqz = torque on finite-size particles
|
||||
heatflow = rate of heat flow into particle
|
||||
temperature = temperature of particle
|
||||
c_ID = per-atom vector calculated by a compute with ID
|
||||
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
|
||||
f_ID = per-atom vector calculated by a fix with ID
|
||||
@ -278,16 +275,20 @@ format <dump_modify>` command and its options.
|
||||
Format of native LAMMPS format dump files:
|
||||
|
||||
The *atom*, *custom*, *grid*, and *local* styles create files in a
|
||||
simple LAMMPS-specific text format that is self-explanatory when
|
||||
viewing a dump file. Many post-processing tools either included with
|
||||
LAMMPS or third-party tools can read this format, as does the
|
||||
simple LAMMPS-specific text format that is mostly self-explanatory
|
||||
when viewing a dump file. Many post-processing tools either included
|
||||
with LAMMPS or third-party tools can read this format, as does the
|
||||
:doc:`rerun <rerun>` command. See tools described on the :doc:`Tools
|
||||
<Tools>` doc page for examples, including `Pizza.py
|
||||
<https://lammps.github.io/pizza>`_.
|
||||
|
||||
For all these styles, the dimensions of the simulation box are
|
||||
included in each snapshot. For an orthogonal simulation box this
|
||||
information is formatted as:
|
||||
included in each snapshot. The simulation box in LAMMPS can be
|
||||
defined in one of 3 ways: orthogonal, restricted triclinic, and
|
||||
general triclinic. See the :doc:`Howto triclinic <Howto_triclinic>`
|
||||
doc page for a detailed description of all 3 options.
|
||||
|
||||
For an orthogonal simulation box the box information is formatted as:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -304,10 +305,10 @@ the six characters is one of *p* (periodic), *f* (fixed), *s* (shrink wrap),
|
||||
or *m* (shrink wrapped with a minimum value). See the
|
||||
:doc:`boundary <boundary>` command for details.
|
||||
|
||||
For triclinic simulation boxes (non-orthogonal), an orthogonal
|
||||
bounding box which encloses the triclinic simulation box is output,
|
||||
along with the three tilt factors (*xy*, *xz*, *yz*) of the triclinic box,
|
||||
formatted as follows:
|
||||
For a restricted triclinic simulation box, an orthogonal bounding box
|
||||
which encloses the restricted triclinic simulation box is output,
|
||||
along with the three tilt factors (*xy*, *xz*, *yz*) of the triclinic
|
||||
box, formatted as follows:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -329,6 +330,10 @@ bounding box extents (xlo_bound, xhi_bound, etc.) are calculated from the
|
||||
triclinic parameters, and how to transform those parameters to and
|
||||
from other commonly used triclinic representations.
|
||||
|
||||
For a general triclinic simulation box, see the "General triclinic"
|
||||
section below for a description of the ITEM: BOX BOUNDS format as well
|
||||
as how per-atom coordinates and per-atom vector quantities are output.
|
||||
|
||||
The *atom* and *custom* styles output a "ITEM: NUMBER OF ATOMS" line
|
||||
with the count of atoms in the snapshot. Likewise they output an
|
||||
"ITEM: ATOMS" line which includes column descriptors for the per-atom
|
||||
@ -400,7 +405,6 @@ command.
|
||||
|
||||
Dump files in other popular formats:
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
This section only discusses file formats relevant to this doc page.
|
||||
@ -656,6 +660,87 @@ how to control the compression level in both variants.
|
||||
|
||||
----------
|
||||
|
||||
General triclinic simulation box output for the *atom* and *custom* styles:
|
||||
|
||||
As mentioned above, the simulation box can be defined as a general
|
||||
triclinic box, which means that 3 arbitrary box edge vectors **A**,
|
||||
**B**, **C** can be specified. See the :doc:`Howto triclinic
|
||||
<Howto_triclinic>` doc page for a detailed description of general
|
||||
triclinic boxes.
|
||||
|
||||
This option is provided as a convenience for users who may be
|
||||
converting data from solid-state crystallographic representations or
|
||||
from DFT codes for input to LAMMPS. However, as explained on the
|
||||
:doc:`Howto_triclinic <Howto_triclinic>` doc page, internally, LAMMPS
|
||||
only uses restricted triclinic simulation boxes. This means the box
|
||||
and per-atom information (e.g. coordinates, velocities) LAMMPS stores
|
||||
are converted (rotated) from general to restricted triclinic form when
|
||||
the system is created.
|
||||
|
||||
For dump output, if the :doc:`dump_modify triclinic/general
|
||||
<dump_modify>` command is used, the box description and per-atom
|
||||
coordinates and other per-atom vectors will be converted (rotated)
|
||||
from restricted to general form when each dump file snapshots is
|
||||
output. This option can only be used if the simulation box was
|
||||
initially created as general triclinic. If the option is not used,
|
||||
and the simulation box is general triclinic, then the dump file
|
||||
snapshots will reflect the internal restricted triclinic geometry.
|
||||
|
||||
The dump_modify triclinic/general option affects 3 aspects of the dump
|
||||
file output.
|
||||
|
||||
First, the format for the BOX BOUNDS is as follows
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
ITEM: BOX BOUNDS abc origin
|
||||
ax ay az originx
|
||||
bx by bz originy
|
||||
cx cy cz originz
|
||||
|
||||
where the **A** edge vector of the box is (ax,ay,az) and similarly
|
||||
for **B** and **C**. The origin of all 3 edge vectors is (originx,
|
||||
originy, originz).
|
||||
|
||||
Second, the coordinates of each atom are converted (rotated) so that
|
||||
the atom is inside (or near) the general triclinic box defined by the
|
||||
**A**, **B**, **C** edge vectors. For style *atom*, this only alters
|
||||
output for unscaled atom coords, via the :doc:`dump_modify scaled no
|
||||
<dump_modify>` setting. For style *custom*, this alters output for
|
||||
either unscaled or unwrapped output of atom coords, via the *x,y,z* or
|
||||
*xu,yu,zu* attributes. For output of scaled atom coords by both
|
||||
styles, there is no difference between restricted and general
|
||||
triclinic values.
|
||||
|
||||
Third, the output for any attribute of the *custom* style which
|
||||
represents a per-atom vector quantity will be converted (rotated) to
|
||||
be oriented consistent with the general triclinic box and its
|
||||
orientation relative to the standard xyz coordinate axes.
|
||||
|
||||
This applies to the following *custom* style attributes:
|
||||
|
||||
* vx,vy,vz = atom velocities
|
||||
* fx,fy,fz = forces on atoms
|
||||
* mux,muy,muz = orientation of dipole moment of atom
|
||||
* omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
* angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
* tqx,tqy,tqz = torque on finite-size particles
|
||||
|
||||
For example, if the velocity of an atom in a restricted triclinic box
|
||||
is along the x-axis, then it will be output for a general triclinic
|
||||
box as a vector along the **A** edge vector of the box.
|
||||
|
||||
.. note::
|
||||
|
||||
For style *custom*, the :doc:`dump_modify thresh <dump_modify>`
|
||||
command may access per-atom attributes either directly or
|
||||
indirectly through a compute or variable. If the attribute is an
|
||||
atom coordinate or one of the vectors mentioned above, its value
|
||||
will *NOT* be a general triclinic (rotated) value. Rather it will
|
||||
be a restricted triclinic value.
|
||||
|
||||
----------
|
||||
|
||||
Arguments for different styles:
|
||||
|
||||
The sections below describe per-atom, local, and per grid cell
|
||||
|
||||
@ -17,7 +17,7 @@ Syntax
|
||||
* one or more keyword/value pairs may be appended
|
||||
|
||||
* these keywords apply to various dump styles
|
||||
* keyword = *append* or *at* or *balance* or *buffer* or *colname* or *delay* or *element* or *every* or *every/time* or *fileper* or *first* or *flush* or *format* or *header* or *image* or *label* or *maxfiles* or *nfile* or *pad* or *pbc* or *precision* or *region* or *refresh* or *scale* or *sfactor* or *skip* or *sort* or *tfactor* or *thermo* or *thresh* or *time* or *units* or *unwrap*
|
||||
* keyword = *append* or *at* or *balance* or *buffer* or *colname* or *delay* or *element* or *every* or *every/time* or *fileper* or *first* or *flush* or *format* or *header* or *image* or *label* or *maxfiles* or *nfile* or *pad* or *pbc* or *precision* or *region* or *refresh* or *scale* or *sfactor* or *skip* or *sort* or *tfactor* or *thermo* or *thresh* or *time* or *triclinic/general* or *units* or *unwrap*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -74,12 +74,13 @@ Syntax
|
||||
-N = sort per-atom lines in descending order by the Nth column
|
||||
*tfactor* arg = time scaling factor (> 0.0)
|
||||
*thermo* arg = *yes* or *no*
|
||||
*time* arg = *yes* or *no*
|
||||
*thresh* args = attribute operator value
|
||||
attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style
|
||||
operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "\|\^"
|
||||
value = numeric value to compare to, or LAST
|
||||
these 3 args can be replaced by the word "none" to turn off thresholding
|
||||
*time* arg = *yes* or *no*
|
||||
*triclinic/general* arg = *yes* or *no*
|
||||
*units* arg = *yes* or *no*
|
||||
*unwrap* arg = *yes* or *no*
|
||||
|
||||
@ -802,8 +803,9 @@ region since the last dump.
|
||||
dump_modify ... thresh v_charge |^ LAST
|
||||
|
||||
This will dump atoms whose charge has changed from an absolute value
|
||||
less than :math:`\frac12` to greater than :math:`\frac12` (or vice versa) since the last dump (e.g., due to reactions and subsequent charge equilibration in a
|
||||
reactive force field).
|
||||
less than :math:`\frac12` to greater than :math:`\frac12` (or vice
|
||||
versa) since the last dump (e.g., due to reactions and subsequent
|
||||
charge equilibration in a reactive force field).
|
||||
|
||||
The choice of operators listed above are the usual comparison
|
||||
operators. The XOR operation (exclusive or) is also included as "\|\^".
|
||||
@ -811,6 +813,18 @@ In this context, XOR means that if either the attribute or value is
|
||||
0.0 and the other is non-zero, then the result is "true" and the
|
||||
threshold criterion is met. Otherwise it is not met.
|
||||
|
||||
.. note::
|
||||
|
||||
For style *custom*, the *triclinic/general* keyword can alter dump
|
||||
output for general triclinic simulation boxes and their atoms. See
|
||||
the :doc:`dump <dump>` command for details of how this changes the
|
||||
format of dump file snapshots. The thresh keyword may access
|
||||
per-atom attributes either directly or indirectly through a compute
|
||||
or variable. If the attribute is an atom coordinate or a per-atom
|
||||
vector (such as velocity, force, or dipole moment), its value will
|
||||
*NOT* be a general triclinic (rotated) value. Rather it will be a
|
||||
restricted triclinic value.
|
||||
|
||||
----------
|
||||
|
||||
The *time* keyword only applies to the dump *atom*, *custom*, *local*,
|
||||
@ -835,6 +849,29 @@ The default setting is *no*\ .
|
||||
|
||||
----------
|
||||
|
||||
The *triclinic/general* keyword only applies to the dump *atom* and
|
||||
*custom* styles. It can only be used with a value of *yes* if the
|
||||
simulation box was created as a general triclinic box. See the
|
||||
:doc:`Howto_triclinic <Howto_triclinic>` doc page for a detailed
|
||||
explanation of orthogonal, restricted triclinic, and general triclinic
|
||||
simulation boxes.
|
||||
|
||||
If this keyword is used with a value of *yes*, the box information at
|
||||
the beginning of each snapshot will include information about the 3
|
||||
arbitrary edge vectors **A**, **B**, **C** that define the general
|
||||
triclinic box as well as their origin. The format is described on the
|
||||
:doc:`dump <dump>` doc page.
|
||||
|
||||
The coordinates of each atom will likewise be output as values in (or
|
||||
near) the general triclinic box. Likewise, per-atom vector quantities
|
||||
such as velocity, omega, dipole moment, etc will have orientations
|
||||
consistent with the general triclinic box, meaning they will be
|
||||
rotated relative to the standard xyz coordinate axes. See the
|
||||
:doc:`dump <dump>` doc page for a full list of which dump attributes
|
||||
this affects.
|
||||
|
||||
----------
|
||||
|
||||
The *units* keyword only applies to the dump *atom*, *custom*, and
|
||||
*local* styles (and their COMPRESS package versions *atom/gz*,
|
||||
*custom/gz* and *local/gz*\ ). If set to *yes*, each individual dump
|
||||
@ -922,6 +959,8 @@ The option defaults are
|
||||
* sort = off for dump styles *atom*, *custom*, *cfg*, and *local*
|
||||
* sort = id for dump styles *dcd*, *xtc*, and *xyz*
|
||||
* thresh = none
|
||||
* time = no
|
||||
* triclinic/general no
|
||||
* units = no
|
||||
* unwrap = no
|
||||
|
||||
|
||||
@ -226,6 +226,7 @@ accelerated styles exist.
|
||||
* :doc:`controller <fix_controller>` - apply control loop feedback mechanism
|
||||
* :doc:`damping/cundall <fix_damping_cundall>` - Cundall non-viscous damping for granular simulations
|
||||
* :doc:`deform <fix_deform>` - change the simulation box size/shape
|
||||
* :doc:`deform/pressure <fix_deform_pressure>` - change the simulation box size/shape with additional loading conditions
|
||||
* :doc:`deposit <fix_deposit>` - add new atoms above a surface
|
||||
* :doc:`dpd/energy <fix_dpd_energy>` - constant energy dissipative particle dynamics
|
||||
* :doc:`drag <fix_drag>` - drag atoms towards a defined coordinate
|
||||
@ -427,6 +428,7 @@ accelerated styles exist.
|
||||
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>` - time integration for body particles of style :doc:`rounded/polyhedron <Howto_body>`
|
||||
* :doc:`wall/colloid <fix_wall>` - Lennard-Jones wall interacting with finite-size particles
|
||||
* :doc:`wall/ees <fix_wall_ees>` - wall for ellipsoidal particles
|
||||
* :doc:`wall/flow <fix_wall_flow>` - flow boundary conditions
|
||||
* :doc:`wall/gran <fix_wall_gran>` - frictional wall(s) for granular simulations
|
||||
* :doc:`wall/gran/region <fix_wall_gran_region>` - :doc:`fix wall/region <fix_wall_region>` equivalent for use with granular particles
|
||||
* :doc:`wall/harmonic <fix_wall>` - harmonic spring wall
|
||||
|
||||
@ -31,7 +31,7 @@ Syntax
|
||||
v_name = per-atom vector calculated by an atom-style variable with name
|
||||
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *norm* or *ave* or *bias* or *adof* or *cdof* or *file* or *overwrite* or *format* or *title1* or *title2* or *title3*
|
||||
* keyword = *norm* or *ave* or *bias* or *adof* or *cdof* or *file* or *append* or *overwrite* or *format* or *title1* or *title2* or *title3*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -51,6 +51,8 @@ Syntax
|
||||
dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation
|
||||
*file* arg = filename
|
||||
filename = file to write results to
|
||||
*append* arg = filename
|
||||
filename = file to append results to
|
||||
*overwrite* arg = none = overwrite output file with only latest output
|
||||
*format* arg = string
|
||||
string = C-style format string
|
||||
@ -433,15 +435,21 @@ molecule.
|
||||
|
||||
----------
|
||||
|
||||
The *file* keyword allows a filename to be specified. Every
|
||||
:math:`N_\text{freq}` timesteps, a section of chunk info will be written to a
|
||||
text file in the following format. A line with the timestep and number of
|
||||
chunks is written. Then one line per chunk is written, containing the chunk
|
||||
ID :math:`(1-N_\text{chunk}),` an optional original ID value, optional
|
||||
coordinate values for chunks that represent spatial bins, the number of atoms
|
||||
in the chunk, and one or more calculated values. More explanation of the
|
||||
optional values is given below. The number of values in each line
|
||||
corresponds to the number of values specified in the fix ave/chunk
|
||||
.. versionadded:: 17Apr2024
|
||||
new keyword *append*
|
||||
|
||||
The *file* or *append* keywords allow a filename to be specified. If
|
||||
*file* is used, then the filename is overwritten if it already exists.
|
||||
If *append* is used, then the filename is appended to if it already
|
||||
exists, or created if it does not exist. Every :math:`N_\text{freq}`
|
||||
timesteps, a section of chunk info will be written to a text file in the
|
||||
following format. A line with the timestep and number of chunks is
|
||||
written. Then one line per chunk is written, containing the chunk ID
|
||||
:math:`(1-N_\text{chunk}),` an optional original ID value, optional
|
||||
coordinate values for chunks that represent spatial bins, the number of
|
||||
atoms in the chunk, and one or more calculated values. More explanation
|
||||
of the optional values is given below. The number of values in each
|
||||
line corresponds to the number of values specified in the fix ave/chunk
|
||||
command. The number of atoms and the value(s) are summed or average
|
||||
quantities, as explained above.
|
||||
|
||||
|
||||
@ -65,7 +65,6 @@ Examples
|
||||
fix 1 all ave/correlate 1 50 10000 &
|
||||
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
|
||||
type upper ave running title1 "My correlation data"
|
||||
|
||||
fix 1 all ave/correlate 1 50 10000 c_thermo_press[*]
|
||||
|
||||
Description
|
||||
|
||||
@ -20,11 +20,11 @@ Syntax
|
||||
.. parsed-literal::
|
||||
|
||||
c_ID = global scalar calculated by a compute with ID
|
||||
c_ID[I] = Ith component of global vector calculated by a compute with ID
|
||||
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
|
||||
f_ID = global scalar calculated by a fix with ID
|
||||
f_ID[I] = Ith component of global vector calculated by a fix with ID
|
||||
f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
|
||||
v_name = global value calculated by an equal-style variable with name
|
||||
v_name[I] = Ith component of global vector calculated by a vector-style variable with name
|
||||
v_name[I] = Ith component of a vector-style variable with name, I can include wildcard (see below)
|
||||
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *type* or *start* or *file* or *overwrite* or *title1* or *title2* or *ncorr* or *nlen* or *ncount*
|
||||
@ -63,6 +63,7 @@ Examples
|
||||
fix 1 all ave/correlate/long 1 10000 &
|
||||
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
|
||||
type upper title1 "My correlation data" nlen 15 ncount 3
|
||||
fix 1 all ave/correlate/long 1 10000 c_thermo_press[*]
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
@ -80,8 +81,10 @@ specified values may represent calculations performed by computes and
|
||||
fixes which store their own "group" definitions.
|
||||
|
||||
Each listed value can be the result of a compute or fix or the
|
||||
evaluation of an equal-style variable. See the
|
||||
:doc:`fix ave/correlate <fix_ave_correlate>` page for details.
|
||||
evaluation of an equal-style or vector-style variable. For
|
||||
vector-style variables, the specified indices can include a wildcard
|
||||
character. See the :doc:`fix ave/correlate <fix_ave_correlate>` page
|
||||
for details.
|
||||
|
||||
The *Nevery* and *Nfreq* arguments specify on what time steps the input
|
||||
values will be used to calculate correlation data and the frequency
|
||||
|
||||
@ -35,7 +35,7 @@ Syntax
|
||||
v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below)
|
||||
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *mode* or *kind* or *file* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3*
|
||||
* keyword = *mode* or *kind* or *file* or *append* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -45,6 +45,8 @@ Syntax
|
||||
*kind* arg = *global* or *peratom* or *local*
|
||||
*file* arg = filename
|
||||
filename = name of file to output histogram(s) to
|
||||
*append* arg = filename
|
||||
filename = name of file to append histogram(s) to
|
||||
*ave* args = *one* or *running* or *window*
|
||||
one = output a new average value every Nfreq steps
|
||||
running = output cumulative average of all previous Nfreq steps
|
||||
@ -317,19 +319,25 @@ on. The default is step 0. Often input values can be 0.0 at time 0,
|
||||
so setting *start* to a larger value can avoid including a 0.0 in
|
||||
a running or windowed histogram.
|
||||
|
||||
The *file* keyword allows a filename to be specified. Every *Nfreq*
|
||||
steps, one histogram is written to the file. This includes a leading
|
||||
line that contains the timestep, number of bins, the total count of
|
||||
values contributing to the histogram, the count of values that were
|
||||
not histogrammed (see the *beyond* keyword), the minimum value
|
||||
encountered, and the maximum value encountered. The min/max values
|
||||
include values that were not histogrammed. Following the leading
|
||||
line, one line per bin is written into the file. Each line contains
|
||||
the bin #, the coordinate for the center of the bin (between *lo* and
|
||||
*hi*\ ), the count of values in the bin, and the normalized count. The
|
||||
normalized count is the bin count divided by the total count (not
|
||||
including values not histogrammed), so that the normalized values sum
|
||||
to 1.0 across all bins.
|
||||
.. versionadded:: 17Apr2024
|
||||
new keyword *append*
|
||||
|
||||
The *file* or *append* keywords allow a filename to be specified. If
|
||||
*file* is used, then the filename is overwritten if it already exists.
|
||||
If *append* is used, then the filename is appended to if it already
|
||||
exists, or created if it does not exist. Every *Nfreq* steps, one
|
||||
histogram is written to the file. This includes a leading line that
|
||||
contains the timestep, number of bins, the total count of values
|
||||
contributing to the histogram, the count of values that were not
|
||||
histogrammed (see the *beyond* keyword), the minimum value encountered,
|
||||
and the maximum value encountered. The min/max values include values
|
||||
that were not histogrammed. Following the leading line, one line per
|
||||
bin is written into the file. Each line contains the bin #, the
|
||||
coordinate for the center of the bin (between *lo* and *hi*\ ), the
|
||||
count of values in the bin, and the normalized count. The normalized
|
||||
count is the bin count divided by the total count (not including values
|
||||
not histogrammed), so that the normalized values sum to 1.0 across all
|
||||
bins.
|
||||
|
||||
The *overwrite* keyword will continuously overwrite the output file
|
||||
with the latest output, so that it only contains one timestep worth of
|
||||
|
||||
@ -28,7 +28,7 @@ Syntax
|
||||
v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below)
|
||||
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *mode* or *file* or *ave* or *start* or *off* or *overwrite* or *format* or *title1* or *title2* or *title3*
|
||||
* keyword = *mode* or *file* or *append* or *ave* or *start* or *off* or *overwrite* or *format* or *title1* or *title2* or *title3*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -45,6 +45,8 @@ Syntax
|
||||
M = value # from 1 to Nvalues
|
||||
*file* arg = filename
|
||||
filename = name of file to output time averages to
|
||||
*append* arg = filename
|
||||
filename = name of file to append time averages to
|
||||
*overwrite* arg = none = overwrite output file with only latest output
|
||||
*format* arg = string
|
||||
string = C-style format string
|
||||
@ -270,16 +272,21 @@ are effectively constant or are simply current values (e.g., they are
|
||||
being written to a file with other time-averaged values for purposes
|
||||
of creating well-formatted output).
|
||||
|
||||
The *file* keyword allows a filename to be specified. Every *Nfreq*
|
||||
steps, one quantity or vector of quantities is written to the file for
|
||||
each input value specified in the fix ave/time command. For *mode* =
|
||||
scalar, this means a single line is written each time output is
|
||||
performed. Thus the file ends up to be a series of lines, i.e. one
|
||||
column of numbers for each input value. For *mode* = vector, an array
|
||||
of numbers is written each time output is performed. The number of rows
|
||||
is the length of the input vectors, and the number of columns is the
|
||||
number of values. Thus the file ends up to be a series of these array
|
||||
sections.
|
||||
.. versionadded:: 17Apr2024
|
||||
new keyword *append*
|
||||
|
||||
The *file* or *append* keywords allow a filename to be specified. If
|
||||
*file* is used, then the filename is overwritten if it already exists.
|
||||
If *append* is used, then the filename is appended to if it already
|
||||
exists, or created if it does not exist. Every *Nfreq* steps, one
|
||||
quantity or vector of quantities is written to the file for each input
|
||||
value specified in the fix ave/time command. For *mode* = scalar, this
|
||||
means a single line is written each time output is performed. Thus the
|
||||
file ends up to be a series of lines, i.e. one column of numbers for
|
||||
each input value. For *mode* = vector, an array of numbers is written
|
||||
each time output is performed. The number of rows is the length of the
|
||||
input vectors, and the number of columns is the number of values. Thus
|
||||
the file ends up to be a series of these array sections.
|
||||
|
||||
.. versionadded:: 4May2022
|
||||
|
||||
|
||||
@ -14,15 +14,15 @@ Syntax
|
||||
* balance = style name of this fix command
|
||||
* Nfreq = perform dynamic load balancing every this many steps
|
||||
* thresh = imbalance threshold that must be exceeded to perform a re-balance
|
||||
* style = *shift* or *rcb*
|
||||
|
||||
* style = *shift* or *rcb* or *report*
|
||||
.. parsed-literal::
|
||||
|
||||
shift args = dimstr Niter stopthresh
|
||||
*shift* args = dimstr Niter stopthresh
|
||||
dimstr = sequence of letters containing *x* or *y* or *z*, each not more than once
|
||||
Niter = # of times to iterate within each dimension of dimstr sequence
|
||||
stopthresh = stop balancing when this imbalance threshold is reached
|
||||
*rcb* args = none
|
||||
*report* args = none
|
||||
|
||||
* zero or more keyword/arg pairs may be appended
|
||||
* keyword = *weight* or *out*
|
||||
@ -70,6 +70,13 @@ re-balancing is performed periodically during the simulation. To
|
||||
perform "static" balancing, before or between runs, see the
|
||||
:doc:`balance <balance>` command.
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
The *report* balance style only computes the load imbalance but
|
||||
does not attempt any re-balancing. This way the load imbalance
|
||||
information can be used otherwise, for instance for stopping a
|
||||
run with :doc:`fix halt <fix_halt>`.
|
||||
|
||||
Load-balancing is typically most useful if the particles in the
|
||||
simulation box have a spatially-varying density distribution or
|
||||
where the computational cost varies significantly between different
|
||||
|
||||
@ -253,11 +253,11 @@ built with that package. See the :doc:`Build package <Build_package>`
|
||||
page for more info.
|
||||
|
||||
The :doc:`atom_style <atom_style>`, used must contain the charge
|
||||
property, for example, the style could be *charge* or *full*. Only
|
||||
usable for 3D simulations. Atoms specified as free ions cannot be part
|
||||
of rigid bodies or molecules and cannot have bonding interactions. The
|
||||
scheme is limited to integer charges, any atoms with non-integer charges
|
||||
will not be considered by the fix.
|
||||
property and have per atom type masses, for example, the style could be
|
||||
*charge* or *full*. Only usable for 3D simulations. Atoms specified as
|
||||
free ions cannot be part of rigid bodies or molecules and cannot have
|
||||
bonding interactions. The scheme is limited to integer charges, any
|
||||
atoms with non-integer charges will not be considered by the fix.
|
||||
|
||||
All interaction potentials used must be continuous, otherwise the MD
|
||||
integration and the particle exchange MC moves do not correspond to the
|
||||
|
||||
@ -4,6 +4,9 @@
|
||||
fix deform command
|
||||
==================
|
||||
|
||||
:doc:`fix deform/pressure <fix_deform_pressure>` command
|
||||
========================================================
|
||||
|
||||
Accelerator Variants: *deform/kk*
|
||||
|
||||
Syntax
|
||||
@ -11,18 +14,18 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix ID group-ID deform N parameter args ... keyword value ...
|
||||
fix ID group-ID fix_style N parameter style args ... keyword value ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* deform = style name of this fix command
|
||||
* fix_style = *deform* or *deform/pressure*
|
||||
* N = perform box deformation every this many timesteps
|
||||
* one or more parameter/arg pairs may be appended
|
||||
* one or more parameter/style/args sequences of arguments may be appended
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
parameter = *x* or *y* or *z* or *xy* or *xz* or *yz*
|
||||
*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*
|
||||
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
|
||||
@ -43,8 +46,15 @@ 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*
|
||||
style = *final* or *delta* or *vel* or *erate* or *trate* or *wiggle* or *variable*
|
||||
*final* value = tilt
|
||||
tilt = tilt factor at end of run (distance units)
|
||||
*delta* value = dtilt
|
||||
@ -62,9 +72,12 @@ 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*
|
||||
* keyword = *remap* or *flip* or *units* or *couple* or *vol/balance/p* or *max/rate* or *normalize/pressure*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -77,6 +90,15 @@ 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
|
||||
""""""""
|
||||
@ -88,6 +110,8 @@ 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
|
||||
"""""""""""
|
||||
|
||||
@ -95,29 +119,46 @@ Change the volume and/or shape of the simulation box during a dynamics
|
||||
run. Orthogonal simulation boxes have 3 adjustable parameters
|
||||
(x,y,z). Triclinic (non-orthogonal) simulation boxes have 6
|
||||
adjustable parameters (x,y,z,xy,xz,yz). Any or all of them can be
|
||||
adjusted independently and simultaneously by this command.
|
||||
adjusted independently and simultaneously.
|
||||
|
||||
This fix can be used to perform non-equilibrium MD (NEMD) simulations
|
||||
of a continuously strained system. See the :doc:`fix nvt/sllod <fix_nvt_sllod>` and :doc:`compute temp/deform <compute_temp_deform>` commands for more details. Note
|
||||
that 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>`.
|
||||
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.
|
||||
|
||||
Both these fixes can be used to perform non-equilibrium MD (NEMD)
|
||||
simulations of a continuously strained system. See the :doc:`fix
|
||||
nvt/sllod <fix_nvt_sllod>` and :doc:`compute temp/deform
|
||||
<compute_temp_deform>` commands for more details. Note that
|
||||
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>`.
|
||||
|
||||
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 this
|
||||
command can be periodic or non-periodic. Dimensions corresponding to
|
||||
unspecified parameters can also be controlled by a :doc:`fix npt <fix_nh>` or :doc:`fix nph <fix_nh>` command.
|
||||
second dimension cannot be shrink-wrapped. Dimensions not varied by
|
||||
this command can be periodic or non-periodic. Dimensions
|
||||
corresponding to unspecified parameters can also be controlled by a
|
||||
:doc:`fix npt <fix_nh>` or :doc:`fix nph <fix_nh>` command.
|
||||
|
||||
The size and shape of the simulation box at the beginning of the
|
||||
simulation run were either specified by the
|
||||
:doc:`create_box <create_box>` or :doc:`read_data <read_data>` or
|
||||
:doc:`read_restart <read_restart>` command used to setup the simulation
|
||||
initially if it is the first run, or they are the values from the end
|
||||
of the previous run. The :doc:`create_box <create_box>`, :doc:`read data <read_data>`, and :doc:`read_restart <read_restart>` commands
|
||||
specify whether the simulation box is orthogonal or non-orthogonal
|
||||
(triclinic) and explain the meaning of the xy,xz,yz tilt factors. If
|
||||
fix deform changes the xy,xz,yz tilt factors, then the simulation box
|
||||
must be triclinic, even if its initial tilt factors are 0.0.
|
||||
simulation run were either specified by the :doc:`create_box
|
||||
<create_box>` or :doc:`read_data <read_data>` or :doc:`read_restart
|
||||
<read_restart>` command used to setup the simulation initially if it
|
||||
is the first run, or they are the values from the end of the previous
|
||||
run. The :doc:`create_box <create_box>`, :doc:`read data
|
||||
<read_data>`, and :doc:`read_restart <read_restart>` commands specify
|
||||
whether the simulation box is orthogonal or non-orthogonal (triclinic)
|
||||
and explain the meaning of the xy,xz,yz tilt factors. If fix deform
|
||||
changes the xy,xz,yz tilt factors, then the simulation box must be
|
||||
triclinic, even if its initial tilt factors are 0.0.
|
||||
|
||||
As described below, the desired simulation box size and shape at the
|
||||
end of the run are determined by the parameters of the fix deform
|
||||
@ -258,21 +299,22 @@ of the units keyword below.
|
||||
|
||||
The *variable* style changes the specified box length dimension by
|
||||
evaluating a variable, which presumably is a function of time. The
|
||||
variable with *name1* must be an :doc:`equal-style variable <variable>`
|
||||
and should calculate a change in box length in units of distance.
|
||||
Note that this distance is in box units, not lattice units; see the
|
||||
discussion of the *units* keyword below. The formula associated with
|
||||
variable *name1* can reference the current timestep. Note that it
|
||||
should return the "change" in box length, not the absolute box length.
|
||||
This means it should evaluate to 0.0 when invoked on the initial
|
||||
timestep of the run following the definition of fix deform. It should
|
||||
evaluate to a value > 0.0 to dilate the box at future times, or a
|
||||
value < 0.0 to compress the box.
|
||||
variable with *name1* must be an :doc:`equal-style variable
|
||||
<variable>` and should calculate a change in box length in units of
|
||||
distance. Note that this distance is in box units, not lattice units;
|
||||
see the discussion of the *units* keyword below. The formula
|
||||
associated with variable *name1* can reference the current timestep.
|
||||
Note that it should return the "change" in box length, not the
|
||||
absolute box length. This means it should evaluate to 0.0 when
|
||||
invoked on the initial timestep of the run following the definition of
|
||||
fix deform. It should evaluate to a value > 0.0 to dilate the box at
|
||||
future times, or a value < 0.0 to compress the box.
|
||||
|
||||
The variable *name2* must also be an :doc:`equal-style variable <variable>` and should calculate the rate of box length
|
||||
change, in units of distance/time, i.e. the time-derivative of the
|
||||
*name1* variable. This quantity is used internally by LAMMPS to reset
|
||||
atom velocities when they cross periodic boundaries. It is computed
|
||||
The variable *name2* must also be an :doc:`equal-style variable
|
||||
<variable>` and should calculate the rate of box length change, in
|
||||
units of distance/time, i.e. the time-derivative of the *name1*
|
||||
variable. This quantity is used internally by LAMMPS to reset atom
|
||||
velocities when they cross periodic boundaries. It is computed
|
||||
internally for the other styles, but you must provide it when using an
|
||||
arbitrary variable.
|
||||
|
||||
@ -414,12 +456,13 @@ can reference the current timestep. Note that it should return the
|
||||
should evaluate to 0.0 when invoked on the initial timestep of the run
|
||||
following the definition of fix deform.
|
||||
|
||||
The variable *name2* must also be an :doc:`equal-style variable <variable>` and should calculate the rate of tilt change,
|
||||
in units of distance/time, i.e. the time-derivative of the *name1*
|
||||
variable. This quantity is used internally by LAMMPS to reset atom
|
||||
velocities when they cross periodic boundaries. It is computed
|
||||
internally for the other styles, but you must provide it when using an
|
||||
arbitrary variable.
|
||||
The variable *name2* must also be an :doc:`equal-style variable
|
||||
<variable>` and should calculate the rate of tilt change, in units of
|
||||
distance/time, i.e. the time-derivative of the *name1* variable. This
|
||||
quantity is used internally by LAMMPS to reset atom velocities when
|
||||
they cross periodic boundaries. It is computed internally for the
|
||||
other styles, but you must provide it when using an arbitrary
|
||||
variable.
|
||||
|
||||
Here is an example of using the *variable* style to perform the same
|
||||
box deformation as the *wiggle* style formula listed above, where we
|
||||
@ -510,33 +553,40 @@ box without explicit remapping of their coordinates.
|
||||
.. note::
|
||||
|
||||
For non-equilibrium MD (NEMD) simulations using "remap v" it is
|
||||
usually desirable that the fluid (or flowing material, e.g. granular
|
||||
particles) stream with a velocity profile consistent with the
|
||||
deforming box. As mentioned above, using a thermostat such as :doc:`fix nvt/sllod <fix_nvt_sllod>` or :doc:`fix lavgevin <fix_langevin>`
|
||||
(with a bias provided by :doc:`compute temp/deform <compute_temp_deform>`), will typically accomplish
|
||||
that. If you do not use a thermostat, then there is no driving force
|
||||
pushing the atoms to flow in a manner consistent with the deforming
|
||||
box. E.g. for a shearing system the box deformation velocity may vary
|
||||
usually desirable that the fluid (or flowing material,
|
||||
e.g. granular particles) stream with a velocity profile consistent
|
||||
with the deforming box. As mentioned above, using a thermostat
|
||||
such as :doc:`fix nvt/sllod <fix_nvt_sllod>` or :doc:`fix lavgevin
|
||||
<fix_langevin>` (with a bias provided by :doc:`compute temp/deform
|
||||
<compute_temp_deform>`), will typically accomplish that. If you do
|
||||
not use a thermostat, then there is no driving force pushing the
|
||||
atoms to flow in a manner consistent with the deforming box.
|
||||
E.g. for a shearing system the box deformation velocity may vary
|
||||
from 0 at the bottom to 10 at the top of the box. But the stream
|
||||
velocity profile of the atoms may vary from -5 at the bottom to +5 at
|
||||
the top. You can monitor these effects using the :doc:`fix ave/chunk <fix_ave_chunk>`, :doc:`compute temp/deform <compute_temp_deform>`, and :doc:`compute temp/profile <compute_temp_profile>` commands. One way to induce
|
||||
atoms to stream consistent with the box deformation is to give them an
|
||||
velocity profile of the atoms may vary from -5 at the bottom to +5
|
||||
at the top. You can monitor these effects using the :doc:`fix
|
||||
ave/chunk <fix_ave_chunk>`, :doc:`compute temp/deform
|
||||
<compute_temp_deform>`, and :doc:`compute temp/profile
|
||||
<compute_temp_profile>` commands. One way to induce atoms to
|
||||
stream consistent with the box deformation is to give them an
|
||||
initial velocity profile, via the :doc:`velocity ramp <velocity>`
|
||||
command, that matches the box deformation rate. This also typically
|
||||
helps the system come to equilibrium more quickly, even if a
|
||||
thermostat is used.
|
||||
command, that matches the box deformation rate. This also
|
||||
typically helps the system come to equilibrium more quickly, even
|
||||
if a thermostat is used.
|
||||
|
||||
.. note::
|
||||
|
||||
If a :doc:`fix rigid <fix_rigid>` is defined for rigid bodies, and
|
||||
*remap* is set to *x*, then the center-of-mass coordinates of rigid
|
||||
bodies will be remapped to the changing simulation box. This will be
|
||||
done regardless of whether atoms in the rigid bodies are in the fix
|
||||
deform group or not. The velocity of the centers of mass are not
|
||||
remapped even if *remap* is set to *v*, since :doc:`fix nvt/sllod <fix_nvt_sllod>` does not currently do anything special
|
||||
bodies will be remapped to the changing simulation box. This will
|
||||
be done regardless of whether atoms in the rigid bodies are in the
|
||||
fix deform group or not. The velocity of the centers of mass are
|
||||
not remapped even if *remap* is set to *v*, since :doc:`fix
|
||||
nvt/sllod <fix_nvt_sllod>` does not currently do anything special
|
||||
for rigid particles. If you wish to perform a NEMD simulation of
|
||||
rigid particles, you can either thermostat them independently or
|
||||
include a background fluid and thermostat the fluid via :doc:`fix nvt/sllod <fix_nvt_sllod>`.
|
||||
include a background fluid and thermostat the fluid via :doc:`fix
|
||||
nvt/sllod <fix_nvt_sllod>`.
|
||||
|
||||
The *flip* keyword allows the tilt factors for a triclinic box to
|
||||
exceed half the distance of the parallel box length, as discussed
|
||||
@ -568,7 +618,8 @@ command if you want to include lattice spacings in a variable formula.
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
This fix will restore the initial box settings from :doc:`binary restart files <restart>`, which allows the fix to be properly continue
|
||||
This fix will restore the initial box settings from :doc:`binary
|
||||
restart files <restart>`, which allows the fix to be properly continue
|
||||
deformation, when using the start/stop options of the :doc:`run <run>`
|
||||
command. None of the :doc:`fix_modify <fix_modify>` options are
|
||||
relevant to this fix. No global or per-atom quantities are stored by
|
||||
@ -586,12 +637,14 @@ Restrictions
|
||||
You cannot apply x, y, or z deformations to a dimension that is
|
||||
shrink-wrapped via the :doc:`boundary <boundary>` command.
|
||||
|
||||
You cannot apply xy, yz, or xz deformations to a second dimension (y in
|
||||
xy) that is shrink-wrapped via the :doc:`boundary <boundary>` command.
|
||||
You cannot apply xy, yz, or xz deformations to a second dimension (y
|
||||
in xy) that is shrink-wrapped via the :doc:`boundary <boundary>`
|
||||
command.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix deform/pressure <fix_deform_pressure>`,
|
||||
:doc:`change_box <change_box>`
|
||||
|
||||
Default
|
||||
|
||||
319
doc/src/fix_deform_pressure.rst
Normal file
319
doc/src/fix_deform_pressure.rst
Normal file
@ -0,0 +1,319 @@
|
||||
.. index:: fix deform/pressure
|
||||
|
||||
fix deform/pressure command
|
||||
===========================
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
fix ID group-ID deform/pressure N parameter style args ... keyword value ...
|
||||
|
||||
* 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
|
||||
|
||||
.. 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*
|
||||
*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*
|
||||
*pressure* 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
|
||||
|
||||
*box* = style value
|
||||
style = *volume* or *pressure*
|
||||
*volume* value = none = isotropically adjust system to preserve volume of system
|
||||
*pressure* values = target gain
|
||||
target = target mean 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*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*couple* value = *none* or *xyz* or *xy* or *yz* or *xz*
|
||||
couple pressure values of various dimensions
|
||||
*vol/balance/p* value = *yes* or *no*
|
||||
Modifies the behavior of the *volume* option to try and balance pressures
|
||||
*max/rate* value = *rate*
|
||||
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
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all deform/pressure 1 x pressure 2.0 0.1 normalize/pressure yes max/rate 0.001
|
||||
fix 1 all deform/pressure 1 x trate 0.1 y volume z volume vol/balance/p yes
|
||||
fix 1 all deform/pressure 1 x trate 0.1 y pressure/mean 0.0 1.0 z pressure/mean 0.0 1.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
This fix is an extension of the :doc:`fix deform <fix_deform>`
|
||||
command, which allows all of its options to be used as well as new
|
||||
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
|
||||
simulation can define only a single deformation command: fix deform or
|
||||
fix deform/pressure.
|
||||
|
||||
----------
|
||||
|
||||
For the *x*, *y*, and *z* parameters, this is the meaning of the
|
||||
styles and values provided by this fix.
|
||||
|
||||
The *pressure* style adjusts a dimension's box length to control the
|
||||
corresponding component of the pressure tensor. This option attempts to
|
||||
maintain a specified target pressure using a linear controller where the
|
||||
box length :math:`L` evolves according to the equation
|
||||
|
||||
.. math::
|
||||
|
||||
\frac{d L(t)}{dt} = L(t) k (P_t - P)
|
||||
|
||||
where :math:`k` is a proportional gain constant, :math:`P_t` is the target
|
||||
pressure, and :math:`P` is the current pressure along that dimension. This
|
||||
approach is similar to the method used to control the pressure by
|
||||
:doc:`fix press/berendsen <fix_press_berendsen>`. The target pressure
|
||||
accepts either a constant numeric value or a LAMMPS :ref:`variable <variable>`.
|
||||
Notably, this variable can be a function of time or other components of
|
||||
the pressure tensor. By default, :math:`k` has units of 1/(time * pressure)
|
||||
although this will change if the *normalize/pressure* option is set as
|
||||
:ref:`discussed below <deform_normalize>`. There is no proven method
|
||||
to choosing an appropriate value of :math:`k` as it will depend on the
|
||||
specific details of a simulation. Testing different values is recommended.
|
||||
|
||||
By default, there is no limit on the resulting strain rate in any dimension.
|
||||
A maximum limit can be applied using the :ref:`max/rate <deform_max_rate>`
|
||||
option. Akin to :doc:`fix nh <fix_nh>`, pressures in different dimensions
|
||||
can be coupled using the :ref:`couple <deform_couple>` option. This means
|
||||
the instantaneous pressure along coupled dimensions are averaged and the box
|
||||
strains identically along the coupled dimensions.
|
||||
|
||||
The *pressure/mean* style changes a dimension's box length to maintain
|
||||
a constant mean pressure defined as the trace of the pressure tensor.
|
||||
This option has identical arguments to the *pressure* style and a similar
|
||||
functional equation, except the current and target pressures refer to the
|
||||
mean trace of the pressure tensor. All options for the *pressure* style
|
||||
also apply to the *pressure/mean* style except for the
|
||||
:ref:`couple <deform_couple>` option.
|
||||
|
||||
Note that while this style can be identical to coupled *pressure* styles,
|
||||
it is generally not the same. For instance in 2D, a coupled *pressure*
|
||||
style in the *x* and *y* dimensions would be equivalent to using the
|
||||
*pressure/mean* style with identical settings in each dimension. However,
|
||||
it would not be the same if settings (e.g. gain constants) were used in
|
||||
the *x* and *y* dimensions or if the *pressure/mean* command was only applied
|
||||
along one dimension.
|
||||
|
||||
----------
|
||||
|
||||
For the *xy*, *xz*, and *yz* parameters, this is the meaning of the
|
||||
styles and values provided by this fix. Note that changing the
|
||||
tilt factors of a triclinic box does not change its volume.
|
||||
|
||||
The *pressure* style adjusts a tilt factor to control the corresponding
|
||||
off-diagonal component of the pressure tensor. This option attempts to
|
||||
maintain a specified target value using a linear controller where the
|
||||
tilt factor T evolves according to the equation
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
\frac{d T(t)}{dt} = L(t) k (P - P_t)
|
||||
|
||||
where :math:`k` is a proportional gain constant, :math:`P_t` is the
|
||||
target pressure, :math:`P` is the current pressure, and :math:`L` is
|
||||
the perpendicular box length. The target pressure accepts either a
|
||||
constant numeric value or a LAMMPS :ref:`variable
|
||||
<variable>`. Notably, this variable can be a function of time or other
|
||||
components of the pressure tensor. By default, :math:`k` has units of
|
||||
1/(time * pressure) although this will change if the
|
||||
*normalize/pessure* option is set as :ref:`discussed below
|
||||
<deform_normalize>`. There is no proven method to choosing an
|
||||
appropriate value of :math:`k` as it will depend on the specific
|
||||
details of a simulation and testing different values is
|
||||
recommended. One can also apply a maximum limit to the magnitude of
|
||||
the applied strain using the :ref:`max/rate <deform_max_rate>` option.
|
||||
|
||||
----------
|
||||
|
||||
The *box* parameter provides an additional control over the *x*, *y*,
|
||||
and *z* box lengths by isotropically dilating or contracting the box
|
||||
to either maintain a fixed mean pressure or volume. This isotropic
|
||||
scaling is applied after the box is deformed by the above *x*, *y*,
|
||||
*z*, *xy*, *xz*, and *yz* styles, acting as a second deformation
|
||||
step. This parameter will change the overall strain rate in the *x*,
|
||||
*y*, or *z* dimensions. This parameter can only be used in
|
||||
combination with the *x*, *y*, or *z* commands: *vel*, *erate*,
|
||||
*trate*, *pressure*, or *wiggle*. This is the meaning of its styles
|
||||
and values.
|
||||
|
||||
The *volume* style isotropically scales box lengths to maintain a constant
|
||||
box volume in response to deformation from other parameters. This style
|
||||
may be useful in scenarios where one wants to apply a constant deviatoric
|
||||
pressure using *pressure* styles in the *x*, *y*, and *z* dimensions (
|
||||
deforming the shape of the box), while maintaining a constant volume.
|
||||
|
||||
The *pressure* style isotropically scales box lengths in an attempt to
|
||||
maintain a target mean pressure (the trace of the pressure tensor) of the
|
||||
system. This is accomplished by isotropically scaling all box lengths
|
||||
:math:`L` by an additional factor of :math:`k (P_t - P_m)` where :math:`k`
|
||||
is the proportional gain constant, :math:`P_t` is the target pressure, and
|
||||
:math:`P_m` is the current mean pressure. This style may be useful in
|
||||
scenarios where one wants to apply a constant deviatoric strain rate
|
||||
using various strain-based styles (e.g. *trate*) along the *x*, *y*, and *z*
|
||||
dimensions (deforming the shape of the box), while maintaining a mean pressure.
|
||||
|
||||
----------
|
||||
|
||||
The optional keywords provided by this fix are described below.
|
||||
|
||||
.. _deform_normalize:
|
||||
|
||||
The *normalize/pressure* keyword changes how box dimensions evolve when
|
||||
using the *pressure* or *pressure/mean* deformation styles. If the
|
||||
*deform/normalize* value is set to *yes*, then the deviation from the
|
||||
target pressure is normalized by the absolute value of the target
|
||||
pressure such that the proportional gain constant scales a percentage
|
||||
error and has units of 1/time. If the target pressure is ever zero, this
|
||||
will produce an error unless the *max/rate* keyword is defined,
|
||||
described below, which will cap the divergence.
|
||||
|
||||
.. _deform_max_rate:
|
||||
|
||||
The *max/rate* keyword sets an upper threshold, *rate*, that limits the
|
||||
maximum magnitude of the instantaneous strain rate applied in any dimension.
|
||||
This keyword only applies to the *pressure* and *pressure/mean* options. If
|
||||
a pressure-controlled rate is used for both *box* and either *x*, *y*, or
|
||||
*z*, then this threshold will apply separately to each individual controller
|
||||
such that the cumulative strain rate on a box dimension may be up to twice
|
||||
the value of *rate*.
|
||||
|
||||
.. _deform_couple:
|
||||
|
||||
The *couple* keyword allows two or three of the diagonal components of
|
||||
the pressure tensor to be "coupled" together for the *pressure* option.
|
||||
The value specified with the keyword determines which are coupled. For
|
||||
example, *xz* means the *Pxx* and *Pzz* components of the stress tensor
|
||||
are coupled. *Xyz* means all 3 diagonal components are coupled. Coupling
|
||||
means two things: the instantaneous stress will be computed as an average
|
||||
of the corresponding diagonal components, and the coupled box dimensions
|
||||
will be changed together in lockstep, meaning coupled dimensions will be
|
||||
dilated or contracted by the same percentage every timestep. If a *pressure*
|
||||
style is defined for more than one coupled dimension, the target pressures
|
||||
and gain constants must be identical. Alternatively, if a *pressure*
|
||||
style is only defined for one of the coupled dimensions, its settings are
|
||||
copied to other dimensions with undefined styles. *Couple xyz* can be used
|
||||
for a 2d simulation; the *z* dimension is simply ignored.
|
||||
|
||||
.. _deform_balance:
|
||||
|
||||
The *vol/balance/p* keyword modifies the behavior of the *volume* style when
|
||||
applied to two of the *x*, *y*, and *z* dimensions. Instead of straining
|
||||
the two dimensions in lockstep, the two dimensions are allowed to
|
||||
separately dilate or contract in a manner to maintain a constant
|
||||
volume while simultaneously trying to keep the pressure along each
|
||||
dimension equal using a method described in :ref:`(Huang2014) <Huang2014>`.
|
||||
|
||||
----------
|
||||
|
||||
If any pressure controls are used, this fix computes a temperature and
|
||||
pressure each timestep. To do this, the fix creates its own computes
|
||||
of style "temp" and "pressure", as if these commands had been issued:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
compute fix-ID_temp group-ID temp
|
||||
compute fix-ID_press group-ID pressure fix-ID_temp
|
||||
|
||||
See the :doc:`compute temp <compute_temp>` and :doc:`compute pressure
|
||||
<compute_pressure>` commands for details. Note that the IDs of the
|
||||
new computes are the fix-ID + underscore + "temp" or fix_ID
|
||||
+ underscore + "press", and the group for the new computes is the same
|
||||
as the fix group.
|
||||
|
||||
Note that these are NOT the computes used by thermodynamic output (see
|
||||
the :doc:`thermo_style <thermo_style>` command) with ID =
|
||||
*thermo_temp* and *thermo_press*. This means you can change the
|
||||
attributes of this fix's temperature or pressure via the
|
||||
:doc:`compute_modify <compute_modify>` command or print this
|
||||
temperature or pressure during thermodynamic output via the
|
||||
:doc:`thermo_style custom <thermo_style>` command using the
|
||||
appropriate compute-ID. It also means that changing attributes of
|
||||
*thermo_temp* or *thermo_press* will have no effect on this fix.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
This fix will restore the initial box settings from :doc:`binary
|
||||
restart files <restart>`, which allows the fix to be properly continue
|
||||
deformation, when using the start/stop options of the :doc:`run <run>`
|
||||
command. No global or per-atom quantities are stored by this fix for
|
||||
access by various :doc:`output commands <Howto_output>`.
|
||||
|
||||
If any pressure controls are used, the :doc:`fix_modify <fix_modify>`
|
||||
*temp* and *press* options are supported by this fix, unlike in
|
||||
:doc:`fix deform <fix_deform>`. You can use them to assign a
|
||||
:doc:`compute <compute>` you have defined to this fix which will be
|
||||
used in its temperature and pressure calculations. If you do this,
|
||||
note that the kinetic energy derived from the compute temperature
|
||||
should be consistent with the virial term computed using all atoms for
|
||||
the pressure. LAMMPS will warn you if you choose to compute
|
||||
temperature on a subset of atoms.
|
||||
|
||||
This fix can perform deformation over multiple runs, using the *start*
|
||||
and *stop* keywords of the :doc:`run <run>` command. See the
|
||||
:doc:`run <run>` command for details of how to do this.
|
||||
|
||||
This fix is not invoked during :doc:`energy minimization <minimize>`.
|
||||
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
You cannot apply x, y, or z deformations to a dimension that is
|
||||
shrink-wrapped via the :doc:`boundary <boundary>` command.
|
||||
|
||||
You cannot apply xy, yz, or xz deformations to a second dimension (y
|
||||
in xy) that is shrink-wrapped via the :doc:`boundary <boundary>`
|
||||
command.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix deform <fix_deform>`, :doc:`change_box <change_box>`
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The option defaults are normalize/pressure = no.
|
||||
|
||||
----------
|
||||
|
||||
.. _Huang2014:
|
||||
|
||||
**(Huang2014)** X. Huang, "Exploring critical-state behavior using DEM",
|
||||
Doctoral dissertation, Imperial College. (2014). https://doi.org/10.25560/25316
|
||||
@ -45,7 +45,7 @@ Syntax
|
||||
rng_v = integer used to initialize random number generator
|
||||
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *algo* or *symm* or *couple* or *etypes* or *ffield* or *write_mat* or *write_inv* or *read_mat* or *read_inv*
|
||||
* keyword = *algo* or *symm* or *couple* or *etypes* or *ffield* or *write_mat* or *write_inv* or *read_mat* or *read_inv* or *qtotal* or *eta*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
@ -68,6 +68,10 @@ Syntax
|
||||
filename = file from which to read elastance matrix
|
||||
*read_inv* value = filename
|
||||
filename = file from which to read inverted matrix
|
||||
*qtotal* value = number or *v_* equal-style variable
|
||||
add overall potential so that all electrode charges add up to *qtotal*
|
||||
*eta* value = d_propname
|
||||
d_propname = a custom double vector defined via fix property/atom
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
@ -249,6 +253,27 @@ be enabled if any electrode particle has the same type as any
|
||||
electrolyte particle (which would be unusual in a typical simulation)
|
||||
and the fix will issue an error in that case.
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
The keyword *qtotal* causes *fix electrode/conp* and *fix
|
||||
electrode/thermo* to add an overall potential to all electrodes so that
|
||||
the total charge on the electrodes is a specified amount (which may be
|
||||
an equal-style variable). For example, if a user wanted to simulate a
|
||||
solution of excess cations such that the total electrolyte charge is +2,
|
||||
setting *qtotal -2* would cause the total electrode charge to be -2, so
|
||||
that the simulation box remains overall electroneutral. Since *fix
|
||||
electrode/conq* constrains the total charges of individual electrodes,
|
||||
and since *symm on* constrains the total charge of all electrodes to be
|
||||
zero, either option is incompatible with the *qtotal* keyword (even if
|
||||
*qtotal* is set to zero).
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
The keyword *eta* takes the name of a custom double vector defined via
|
||||
fix property/atom. The values will be used instead of the standard eta
|
||||
value. The property/atom fix must be for vector of double values and
|
||||
use the *ghost on* option.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
@ -440,8 +440,11 @@ This fix is part of the MC package. It is only enabled if LAMMPS was
|
||||
built with that package. See the :doc:`Build package <Build_package>`
|
||||
doc page for more info.
|
||||
|
||||
This fix style requires an :doc:`atom style <atom_style>` with per atom
|
||||
type masses.
|
||||
|
||||
Do not set "neigh_modify once yes" or else this fix will never be
|
||||
called. Reneighboring is required.
|
||||
called. Reneighboring is **required**.
|
||||
|
||||
Only usable for 3D simulations.
|
||||
|
||||
|
||||
@ -8,33 +8,44 @@ Syntax
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix ID group-ID indent K keyword values ...
|
||||
fix ID group-ID indent K gstyle args keyword value ...
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* indent = style name of this fix command
|
||||
* K = force constant for indenter surface (force/distance\^2 units)
|
||||
* one or more keyword/value pairs may be appended
|
||||
* keyword = *sphere* or *cylinder* or *plane* or *side* or *units*
|
||||
* gstyle = *sphere* or *cylinder* or *cone* or *plane*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*sphere* args = x y z R
|
||||
x,y,z = position of center of indenter (distance units)
|
||||
x, y, z = position of center of indenter (distance units)
|
||||
R = sphere radius of indenter (distance units)
|
||||
any of x,y,z,R can be a variable (see below)
|
||||
any of x, y, z, R can be a variable (see below)
|
||||
*cylinder* args = dim c1 c2 R
|
||||
dim = *x* or *y* or *z* = axis of cylinder
|
||||
c1,c2 = coords of cylinder axis in other 2 dimensions (distance units)
|
||||
c1, c2 = coords of cylinder axis in other 2 dimensions (distance units)
|
||||
R = cylinder radius of indenter (distance units)
|
||||
any of c1,c2,R can be a variable (see below)
|
||||
*cone* args = dim c1 c2 radlo radhi lo hi
|
||||
dim = *x* or *y* or *z* = axis of cone
|
||||
c1, c2 = coords of cone axis in other 2 dimensions (distance units)
|
||||
radlo,radhi = cone radii at lo and hi end (distance units)
|
||||
lo,hi = bounds of cone in dim (distance units)
|
||||
any of c1, c2, radlo, radhi, lo, hi can be a variable (see below)
|
||||
*plane* args = dim pos side
|
||||
dim = *x* or *y* or *z* = plane perpendicular to this dimension
|
||||
pos = position of plane in dimension x, y, or z (distance units)
|
||||
pos can be a variable (see below)
|
||||
side = *lo* or *hi*
|
||||
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *side* or *units*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*side* value = *in* or *out*
|
||||
*in* = the indenter acts on particles inside the sphere or cylinder
|
||||
*out* = the indenter acts on particles outside the sphere or cylinder
|
||||
*in* = the indenter acts on particles inside the sphere or cylinder or cone
|
||||
*out* = the indenter acts on particles outside the sphere or cylinder or cone
|
||||
*units* value = *lattice* or *box*
|
||||
lattice = the geometry is defined in lattice units
|
||||
box = the geometry is defined in simulation box units
|
||||
@ -53,12 +64,12 @@ Description
|
||||
|
||||
Insert an indenter within a simulation box. The indenter repels all
|
||||
atoms in the group that touch it, so it can be used to push into a
|
||||
material or as an obstacle in a flow. Or it can be used as a
|
||||
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 indenter can either be spherical or cylindrical or planar. You
|
||||
must set one of those 3 keywords.
|
||||
The *gstyle* geometry of the indenter can either be a sphere, a
|
||||
cylinder, a cone, or a plane.
|
||||
|
||||
A spherical indenter exerts a force of magnitude
|
||||
|
||||
@ -75,15 +86,20 @@ 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.
|
||||
|
||||
Spherical and cylindrical indenters account for periodic boundaries in
|
||||
two ways. First, the center point of a spherical indenter (x,y,z) or
|
||||
axis of a cylindrical indenter (c1,c2) is remapped back into the
|
||||
simulation box, if the box is periodic in a particular dimension.
|
||||
This occurs every timestep if the indenter geometry is specified with
|
||||
a variable (see below), e.g. it is moving over time. Second, the
|
||||
calculation of distance to the indenter center 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 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.
|
||||
|
||||
Spherical, cylindrical, and conical indenters account for periodic
|
||||
boundaries in two ways. First, the center point of a spherical
|
||||
indenter (x,y,z) or axis of a cylindrical/conical indenter (c1,c2) is
|
||||
remapped back into the simulation box, if the box is periodic in a
|
||||
particular dimension. This occurs every timestep if the indenter
|
||||
geometry is specified with a variable (see below), e.g. it is moving
|
||||
over time. Second, the calculation of distance to the indenter center
|
||||
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
|
||||
@ -97,9 +113,13 @@ 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*,
|
||||
*y*, *z*, or *R*\ . Similarly, for a cylindrical indenter, any of *c1*,
|
||||
*c2*, or *R*, can be a variable. For a planar indenter, *pos* can be
|
||||
a variable. If the value is a variable, it should be specified as
|
||||
*y*, *z*, or *R*\ . For a cylindrical indenter, any of the 3
|
||||
quantities *c1*, *c2*, or *R*, can be a variable. For a conical
|
||||
indenter, any of the 6 quantities *c1*, *c2*, *radlo*, *radhi*, *lo*,
|
||||
or *hi* can be a variable. For a planar indenter, the single value
|
||||
*pos* can be a variable.
|
||||
|
||||
If any of these values 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 timestep, and its value used to define the
|
||||
indenter geometry.
|
||||
@ -110,7 +130,8 @@ command keywords for the simulation box parameters and timestep and
|
||||
elapsed time. Thus it is easy to specify indenter properties that
|
||||
change as a function of time or span consecutive runs in a continuous
|
||||
fashion. For the latter, see the *start* and *stop* keywords of the
|
||||
:doc:`run <run>` command and the *elaplong* keyword of :doc:`thermo_style custom <thermo_style>` for details.
|
||||
:doc:`run <run>` command and the *elaplong* keyword of
|
||||
:doc:`thermo_style custom <thermo_style>` for details.
|
||||
|
||||
For example, if a spherical indenter's x-position is specified as v_x,
|
||||
then this variable definition will keep it's center at a relative
|
||||
@ -141,12 +162,13 @@ rate.
|
||||
|
||||
If the *side* keyword is specified as *out*, which is the default,
|
||||
then particles outside the indenter are pushed away from its outer
|
||||
surface, as described above. This only applies to spherical or
|
||||
cylindrical indenters. If the *side* keyword is specified as *in*,
|
||||
the action of the indenter is reversed. Particles inside the indenter
|
||||
are pushed away from its inner surface. In other words, the indenter
|
||||
is now a containing wall that traps the particles inside it. If the
|
||||
radius shrinks over time, it will squeeze the particles.
|
||||
surface, as described above. This only applies to spherical,
|
||||
cylindrical, and conical indenters. If the *side* keyword is
|
||||
specified as *in*, the action of the indenter is reversed. Particles
|
||||
inside the indenter are pushed away from its inner surface. In other
|
||||
words, the indenter is now a containing wall that traps the particles
|
||||
inside it. If the radius shrinks over time, it will squeeze the
|
||||
particles.
|
||||
|
||||
The *units* keyword determines the meaning of the distance units used
|
||||
to define the indenter geometry. A *box* value selects standard
|
||||
@ -166,10 +188,10 @@ lattice spacings in a variable formula.
|
||||
|
||||
The force constant *K* is not affected by the *units* keyword. It is
|
||||
always in force/distance\^2 units where force and distance are defined
|
||||
by the :doc:`units <units>` command. If you wish K to be scaled by the
|
||||
lattice spacing, you can define K with a variable whose formula
|
||||
contains *xlat*, *ylat*, *zlat* keywords of the
|
||||
:doc:`thermo_style <thermo_style>` command, e.g.
|
||||
by the :doc:`units <units>` command. If you wish K to be scaled by
|
||||
the lattice spacing, you can define K with a variable whose formula
|
||||
contains *xlat*, *ylat*, *zlat* keywords of the :doc:`thermo_style
|
||||
<thermo_style>` command, e.g.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ Note that in this case the specified *Kspring* is in
|
||||
force/distance units.
|
||||
|
||||
With a value of *ideal*, the spring force is computed as suggested in
|
||||
ref`(WeinanE) <WeinanE>`
|
||||
:ref:`(WeinanE) <WeinanE>`
|
||||
|
||||
.. math::
|
||||
|
||||
@ -120,18 +120,18 @@ and :math:`RD_{ideal}` is the ideal *RD* for which all the images are
|
||||
equally spaced. I.e. :math:`RD_{ideal} = (i-1) \cdot meanDist` when the
|
||||
climbing replica is off, where *i* is the replica number). The
|
||||
*meanDist* is the average distance between replicas. Note that in this
|
||||
case the specified *Kspring* is in force units. When the climbing replica
|
||||
is on, :math:`RD_{ideal}` and :math:`meanDist` are calculated separately
|
||||
each side of the climbing image. Note that the *ideal* form of nudging
|
||||
can often be more effective at keeping the replicas equally spaced before
|
||||
climbing, then equally spaced either side of the climbing image whilst
|
||||
climbing.
|
||||
case the specified *Kspring* is in force units. When the climbing
|
||||
replica is on, :math:`RD_{ideal}` and :math:`meanDist` are calculated
|
||||
separately each side of the climbing image. Note that the *ideal* form
|
||||
of nudging can often be more effective at keeping the replicas equally
|
||||
spaced before climbing, then equally spaced either side of the climbing
|
||||
image whilst climbing.
|
||||
|
||||
With a value of *equal* the spring force is computed as for *ideal*
|
||||
when the climbing replica is off, promoting equidistance. When the climbing
|
||||
With a value of *equal* the spring force is computed as for *ideal* when
|
||||
the climbing replica is off, promoting equidistance. When the climbing
|
||||
replica is on, the spring force is computed to promote equidistant
|
||||
absolute differences in energy, rather than distance, each side of
|
||||
the climbing image:
|
||||
absolute differences in energy, rather than distance, each side of the
|
||||
climbing image:
|
||||
|
||||
.. math::
|
||||
|
||||
@ -143,23 +143,22 @@ where *ED* is the cumulative sum of absolute energy differences:
|
||||
|
||||
ED = \sum_{i<N} \left|E(R_{i+1}) - E(R_i)\right|,
|
||||
|
||||
*meanEdist* is the average absolute energy difference between
|
||||
replicas up to the climbing image or from the climbing image
|
||||
to the final image, for images before or after the climbing
|
||||
image respectively. :math:`ED_{ideal}` is the corresponding
|
||||
cumulative sum of average absolute energy differences in
|
||||
each case, in close analogy to *ideal*. This form of nudging
|
||||
is to aid schemes which integrate forces along, or near to,
|
||||
NEB pathways such as :doc:`fix_pafi <fix_pafi>`.
|
||||
*meanEdist* is the average absolute energy difference between replicas
|
||||
up to the climbing image or from the climbing image to the final image,
|
||||
for images before or after the climbing image
|
||||
respectively. :math:`ED_{ideal}` is the corresponding cumulative sum of
|
||||
average absolute energy differences in each case, in close analogy to
|
||||
*ideal*. This form of nudging is to aid schemes which integrate forces
|
||||
along, or near to, NEB pathways such as :doc:`fix_pafi <fix_pafi>`.
|
||||
|
||||
----------
|
||||
|
||||
The keyword *perp* specifies if and how a perpendicular nudging force
|
||||
is computed. It adds a spring force perpendicular to the path in
|
||||
order to prevent the path from becoming too strongly kinked. It can
|
||||
The keyword *perp* specifies if and how a perpendicular nudging force is
|
||||
computed. It adds a spring force perpendicular to the path in order to
|
||||
prevent the path from becoming too strongly kinked. It can
|
||||
significantly improve the convergence of the NEB calculation when the
|
||||
resolution is poor. I.e. when few replicas are used; see
|
||||
:ref:`(Maras) <Maras1>` for details.
|
||||
resolution is poor. I.e. when few replicas are used; see :ref:`(Maras)
|
||||
<Maras1>` for details.
|
||||
|
||||
The perpendicular spring force is given by
|
||||
|
||||
@ -181,10 +180,10 @@ force is added.
|
||||
|
||||
By default, no additional forces act on the first and last replicas
|
||||
during the NEB relaxation, so these replicas simply relax toward their
|
||||
respective local minima. By using the key word *end*, additional
|
||||
forces can be applied to the first and/or last replicas, to enable
|
||||
them to relax toward a MEP while constraining their energy E to the
|
||||
target energy ETarget.
|
||||
respective local minima. By using the key word *end*, additional forces
|
||||
can be applied to the first and/or last replicas, to enable them to
|
||||
relax toward a MEP while constraining their energy E to the target
|
||||
energy ETarget.
|
||||
|
||||
If :math:`E_{Target} > E`, the interatomic force :math:`F_i` for the
|
||||
specified replica becomes:
|
||||
@ -197,33 +196,33 @@ specified replica becomes:
|
||||
The "spring" constant on the difference in energies is the specified
|
||||
*Kspring3* value.
|
||||
|
||||
When *estyle* is specified as *first*, the force is applied to the
|
||||
first replica. When *estyle* is specified as *last*, the force is
|
||||
applied to the last replica. Note that the *end* keyword can be used
|
||||
twice to add forces to both the first and last replicas.
|
||||
When *estyle* is specified as *first*, the force is applied to the first
|
||||
replica. When *estyle* is specified as *last*, the force is applied to
|
||||
the last replica. Note that the *end* keyword can be used twice to add
|
||||
forces to both the first and last replicas.
|
||||
|
||||
For both these *estyle* settings, the target energy *ETarget* is set
|
||||
to the initial energy of the replica (at the start of the NEB
|
||||
calculation).
|
||||
|
||||
If the *estyle* is specified as *last/efirst* or *last/efirst/middle*,
|
||||
force is applied to the last replica, but the target energy *ETarget*
|
||||
is continuously set to the energy of the first replica, as it evolves
|
||||
force is applied to the last replica, but the target energy *ETarget* is
|
||||
continuously set to the energy of the first replica, as it evolves
|
||||
during the NEB relaxation.
|
||||
|
||||
The difference between these two *estyle* options is as follows. When
|
||||
*estyle* is specified as *last/efirst*, no change is made to the
|
||||
inter-replica force applied to the intermediate replicas (neither
|
||||
first or last). If the initial path is too far from the MEP, an
|
||||
intermediate replica may relax "faster" and reach a lower energy than
|
||||
the last replica. In this case the intermediate replica will be
|
||||
relaxing toward its own local minima. This behavior can be prevented
|
||||
by specifying *estyle* as *last/efirst/middle* which will alter the
|
||||
inter-replica force applied to intermediate replicas by removing the
|
||||
contribution of the gradient to the inter-replica force. This will
|
||||
only be done if a particular intermediate replica has a lower energy
|
||||
than the first replica. This should effectively prevent the
|
||||
intermediate replicas from over-relaxing.
|
||||
inter-replica force applied to the intermediate replicas (neither first
|
||||
or last). If the initial path is too far from the MEP, an intermediate
|
||||
replica may relax "faster" and reach a lower energy than the last
|
||||
replica. In this case the intermediate replica will be relaxing toward
|
||||
its own local minima. This behavior can be prevented by specifying
|
||||
*estyle* as *last/efirst/middle* which will alter the inter-replica
|
||||
force applied to intermediate replicas by removing the contribution of
|
||||
the gradient to the inter-replica force. This will only be done if a
|
||||
particular intermediate replica has a lower energy than the first
|
||||
replica. This should effectively prevent the intermediate replicas from
|
||||
over-relaxing.
|
||||
|
||||
After converging a NEB calculation using an *estyle* of
|
||||
*last/efirst/middle*, you should check that all intermediate replicas
|
||||
@ -237,9 +236,10 @@ target energy.
|
||||
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 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.
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ Examples
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: TBD
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
This fix computes different metrics of the nonaffine displacement of
|
||||
particles. The first metric, *d2min* calculates the :math:`D^2_\mathrm{min}`
|
||||
@ -86,8 +86,8 @@ Both of these methods require defining a reference state. With the *fixed* refer
|
||||
style, the user picks a specific timestep *nstep* at which particle positions are saved.
|
||||
If peratom data is accessed from this compute prior to this timestep, it will simply be
|
||||
zeroed. The *update* reference style implies the reference state will be updated every
|
||||
*nstep* timesteps. The *offset* reference only applies to the *d2min* metric and will
|
||||
update the reference state *nstep* timesteps before a multiple of *nevery* timesteps.
|
||||
*nstep* timesteps. The *offset* reference will update the reference state *nstep*
|
||||
timesteps before a multiple of *nevery* timesteps.
|
||||
|
||||
|
||||
----------
|
||||
|
||||
@ -22,6 +22,8 @@ Syntax
|
||||
*mol* = molecule IDs
|
||||
*q* = charge
|
||||
*rmass* = per-atom mass
|
||||
*temperature* = internal temperature of atom
|
||||
*heatflow* = internal heat flow of atom
|
||||
i_name = new integer vector referenced by name
|
||||
d_name = new floating-point vector referenced by name
|
||||
i2_name = new integer array referenced by name
|
||||
@ -59,14 +61,18 @@ these properties for each atom in the system when a data file is read.
|
||||
This fix augments the set of per-atom properties with new custom
|
||||
ones. This can be useful in several scenarios.
|
||||
|
||||
If the atom style does not define molecule IDs, per-atom charge, or
|
||||
per-atom mass, they can be added using the *mol*\ , *q* or *rmass*
|
||||
If the atom style does not define molecule IDs, per-atom charge,
|
||||
per-atom mass, internal temperature, or internal heat flow, they can
|
||||
be added using the *mol*\ , *q*, *rmass*, *temperature*, or *heatflow*
|
||||
keywords. This could be useful to define "molecules" to use as rigid
|
||||
bodies with the :doc:`fix rigid <fix_rigid>` command, or to carry
|
||||
around an extra flag with atoms (stored as a molecule ID) that can be
|
||||
used by various commands like :doc:`compute chunk/atom
|
||||
<compute_chunk_atom>` to group atoms without having to use the group
|
||||
command (which is limited to a total of 32 groups including *all*\ ).
|
||||
For finite-size particles, an internal temperature and heat flow can
|
||||
be used to model heat conduction as in the
|
||||
:doc:`GRANULAR package <Howto_granular>`.
|
||||
|
||||
Another application is to use the *rmass* flag in order to have
|
||||
per-atom masses instead of per-type masses. This could be used to
|
||||
@ -85,9 +91,10 @@ properties that are not needed such as bond lists, which incurs some
|
||||
overhead when there are no bonds.
|
||||
|
||||
In the future, we may add additional existing per-atom properties to
|
||||
fix property/atom, similar to *mol*\ , *q* or *rmass*\ , which
|
||||
"turn-on" specific properties defined by some atom styles, so they can
|
||||
be easily used by atom styles that do not define them.
|
||||
fix property/atom, similar to *mol*\ , *q*, *rmass*\ , *temperature*\ ,
|
||||
or *heatflow* which "turn-on" specific properties defined by some atom
|
||||
styles, so they can be easily used by atom styles that do not define
|
||||
them.
|
||||
|
||||
More generally, the *i_name* and *d_name* options allow one or more
|
||||
new custom per-atom vectors to be defined. Likewise the *i2_name* and
|
||||
|
||||
@ -232,8 +232,6 @@ These fixes are part of the QEQ package. They are only enabled if
|
||||
LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
These qeq fixes are not compatible with the GPU and USER-INTEL packages.
|
||||
|
||||
These qeq fixes will ignore electric field contributions from
|
||||
:doc:`fix efield <fix_efield>`.
|
||||
|
||||
|
||||
@ -171,14 +171,15 @@ Examples of large rigid bodies are a colloidal particle, or portions
|
||||
of a biomolecule such as a protein.
|
||||
|
||||
Example of small rigid bodies are patchy nanoparticles, such as those
|
||||
modeled in :ref:`this paper <Zhang1>` by Sharon Glotzer's group, clumps of
|
||||
granular particles, lipid molecules consisting of one or more point
|
||||
dipoles connected to other spheroids or ellipsoids, irregular
|
||||
particles built from line segments (2d) or triangles (3d), and
|
||||
coarse-grain models of nano or colloidal particles consisting of a
|
||||
small number of constituent particles. Note that the :doc:`fix shake <fix_shake>` command can also be used to rigidify small
|
||||
molecules of 2, 3, or 4 atoms, e.g. water molecules. That fix treats
|
||||
the constituent atoms as point masses.
|
||||
modeled in :ref:`this paper <Zhang1>` by Sharon Glotzer's group,
|
||||
clumps of granular particles, lipid molecules consisting of one or
|
||||
more point dipoles connected to other spheroids or ellipsoids,
|
||||
irregular particles built from line segments (2d) or triangles (3d),
|
||||
and coarse-grain models of nano or colloidal particles consisting of a
|
||||
small number of constituent particles. Note that the :doc:`fix shake
|
||||
<fix_shake>` command can also be used to rigidify small molecules of
|
||||
2, 3, or 4 atoms, e.g. water molecules. That fix treats the
|
||||
constituent atoms as point masses.
|
||||
|
||||
These fixes also update the positions and velocities of the atoms in
|
||||
each rigid body via time integration, in the NVE, NVT, NPT, or NPH
|
||||
@ -212,13 +213,14 @@ processors when ghost atom info is accumulated.
|
||||
|
||||
.. note::
|
||||
|
||||
To use the *rigid/small* styles the ghost atom cutoff must be
|
||||
large enough to span the distance between the atom that owns the body
|
||||
and every other atom in the body. This distance value is printed out
|
||||
when the rigid bodies are defined. If the
|
||||
:doc:`pair_style <pair_style>` cutoff plus neighbor skin does not span
|
||||
this distance, then you should use the :doc:`comm_modify cutoff <comm_modify>` command with a setting epsilon larger than
|
||||
the distance.
|
||||
To use the *rigid/small* styles the ghost atom cutoff must be large
|
||||
enough to span the distance between the atom that owns the body and
|
||||
every other atom in the body. This distance value is printed out
|
||||
when the rigid bodies are defined. If the :doc:`pair_style
|
||||
<pair_style>` cutoff plus neighbor skin does not span this
|
||||
distance, then you should use the :doc:`comm_modify cutoff
|
||||
<comm_modify>` command with a setting epsilon larger than the
|
||||
distance.
|
||||
|
||||
Which of the two variants is faster for a particular problem is hard
|
||||
to predict. The best way to decide is to perform a short test run.
|
||||
@ -229,49 +231,54 @@ differences may accumulate to produce divergent trajectories.
|
||||
.. note::
|
||||
|
||||
You should not update the atoms in rigid bodies via other
|
||||
time-integration fixes (e.g. :doc:`fix nve <fix_nve>`, :doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, :doc:`fix move <fix_move>`),
|
||||
or you will have conflicting updates to positions and velocities
|
||||
resulting in unphysical behavior in most cases. When performing a hybrid
|
||||
simulation with some atoms in rigid bodies, and some not, a separate
|
||||
time integration fix like :doc:`fix nve <fix_nve>` or :doc:`fix nvt <fix_nh>` should be used for the non-rigid particles.
|
||||
time-integration fixes (e.g. :doc:`fix nve <fix_nve>`, :doc:`fix
|
||||
nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, :doc:`fix move
|
||||
<fix_move>`), or you will have conflicting updates to positions and
|
||||
velocities resulting in unphysical behavior in most cases. When
|
||||
performing a hybrid simulation with some atoms in rigid bodies, and
|
||||
some not, a separate time integration fix like :doc:`fix nve
|
||||
<fix_nve>` or :doc:`fix nvt <fix_nh>` should be used for the
|
||||
non-rigid particles.
|
||||
|
||||
.. note::
|
||||
|
||||
These fixes are overkill if you simply want to hold a collection
|
||||
of atoms stationary or have them move with a constant velocity. A
|
||||
simpler way to hold atoms stationary is to not include those atoms in
|
||||
your time integration fix. E.g. use "fix 1 mobile nve" instead of
|
||||
"fix 1 all nve", where "mobile" is the group of atoms that you want to
|
||||
move. You can move atoms with a constant velocity by assigning them
|
||||
an initial velocity (via the :doc:`velocity <velocity>` command),
|
||||
setting the force on them to 0.0 (via the :doc:`fix setforce <fix_setforce>` command), and integrating them as usual
|
||||
(e.g. via the :doc:`fix nve <fix_nve>` command).
|
||||
These fixes are overkill if you simply want to hold a collection of
|
||||
atoms stationary or have them move with a constant velocity. A
|
||||
simpler way to hold atoms stationary is to not include those atoms
|
||||
in your time integration fix. E.g. use "fix 1 mobile nve" instead
|
||||
of "fix 1 all nve", where "mobile" is the group of atoms that you
|
||||
want to move. You can move atoms with a constant velocity by
|
||||
assigning them an initial velocity (via the :doc:`velocity
|
||||
<velocity>` command), setting the force on them to 0.0 (via the
|
||||
:doc:`fix setforce <fix_setforce>` command), and integrating them
|
||||
as usual (e.g. via the :doc:`fix nve <fix_nve>` command).
|
||||
|
||||
.. warning::
|
||||
|
||||
The aggregate properties of each rigid body are
|
||||
calculated at the start of a simulation run and are maintained in
|
||||
internal data structures. The properties include the position and
|
||||
velocity of the center-of-mass of the body, its moments of inertia, and
|
||||
its angular momentum. This is done using the properties of the
|
||||
constituent atoms of the body at that point in time (or see the *infile*
|
||||
keyword option). Thereafter, changing these properties of individual
|
||||
atoms in the body will have no effect on a rigid body's dynamics, unless
|
||||
they effect any computation of per-atom forces or torques. If the
|
||||
keyword *reinit* is set to *yes* (the default), the rigid body data
|
||||
structures will be recreated at the beginning of each *run* command;
|
||||
if the keyword *reinit* is set to *no*, the rigid body data structures
|
||||
will be built only at the very first *run* command and maintained for
|
||||
as long as the rigid fix is defined. For example, you might think you
|
||||
could displace the atoms in a body or add a large velocity to each atom
|
||||
in a body to make it move in a desired direction before a second run is
|
||||
performed, using the :doc:`set <set>` or
|
||||
:doc:`displace_atoms <displace_atoms>` or :doc:`velocity <velocity>`
|
||||
commands. But these commands will not affect the internal attributes
|
||||
of the body unless *reinit* is set to *yes*\ . With *reinit* set to *no*
|
||||
(or using the *infile* option, which implies *reinit* *no*\ ) the position
|
||||
and velocity of individual atoms in the body will be reset when time
|
||||
integration starts again.
|
||||
The aggregate properties of each rigid body are calculated at the
|
||||
start of a simulation run and are maintained in internal data
|
||||
structures. The properties include the position and velocity of the
|
||||
center-of-mass of the body, its moments of inertia, and its angular
|
||||
momentum. This is done using the properties of the constituent
|
||||
atoms of the body at that point in time (or see the *infile*
|
||||
keyword option). Thereafter, changing these properties of
|
||||
individual atoms in the body will have no effect on a rigid body's
|
||||
dynamics, unless they effect any computation of per-atom forces or
|
||||
torques. If the keyword *reinit* is set to *yes* (the default), the
|
||||
rigid body data structures will be recreated at the beginning of
|
||||
each *run* command; if the keyword *reinit* is set to *no*, the
|
||||
rigid body data structures will be built only at the very first
|
||||
*run* command and maintained for as long as the rigid fix is
|
||||
defined. For example, you might think you could displace the atoms
|
||||
in a body or add a large velocity to each atom in a body to make it
|
||||
move in a desired direction before a second run is performed, using
|
||||
the :doc:`set <set>` or :doc:`displace_atoms <displace_atoms>` or
|
||||
:doc:`velocity <velocity>` commands. But these commands will not
|
||||
affect the internal attributes of the body unless *reinit* is set
|
||||
to *yes*\ . With *reinit* set to *no* (or using the *infile*
|
||||
option, which implies *reinit* *no*\ ) the position and velocity of
|
||||
individual atoms in the body will be reset when time integration
|
||||
starts again.
|
||||
|
||||
----------
|
||||
|
||||
@ -316,17 +323,17 @@ to be part of rigid bodies.
|
||||
|
||||
.. note::
|
||||
|
||||
To compute the initial center-of-mass position and other
|
||||
properties of each rigid body, the image flags for each atom in the
|
||||
body are used to "unwrap" the atom coordinates. Thus you must ensure
|
||||
that these image flags are consistent so that the unwrapping creates a
|
||||
To compute the initial center-of-mass position and other properties
|
||||
of each rigid body, the image flags for each atom in the body are
|
||||
used to "unwrap" the atom coordinates. Thus you must ensure that
|
||||
these image flags are consistent so that the unwrapping creates a
|
||||
valid rigid body (one where the atoms are close together),
|
||||
particularly if the atoms in a single rigid body straddle a periodic
|
||||
boundary. This means the input data file or restart file must define
|
||||
the image flags for each atom consistently or that you have used the
|
||||
:doc:`set <set>` command to specify them correctly. If a dimension is
|
||||
non-periodic then the image flag of each atom must be 0 in that
|
||||
dimension, else an error is generated.
|
||||
particularly if the atoms in a single rigid body straddle a
|
||||
periodic boundary. This means the input data file or restart file
|
||||
must define the image flags for each atom consistently or that you
|
||||
have used the :doc:`set <set>` command to specify them correctly.
|
||||
If a dimension is non-periodic then the image flag of each atom
|
||||
must be 0 in that dimension, else an error is generated.
|
||||
|
||||
The *force* and *torque* keywords discussed next are only allowed for
|
||||
the *rigid* styles.
|
||||
@ -362,12 +369,13 @@ settings from the final keyword are used.
|
||||
|
||||
.. note::
|
||||
|
||||
For computational efficiency, you may wish to turn off pairwise
|
||||
and bond interactions within each rigid body, as they no longer
|
||||
contribute to the motion. The :doc:`neigh_modify exclude <neigh_modify>` and :doc:`delete_bonds <delete_bonds>`
|
||||
commands are used to do this. If the rigid bodies have strongly
|
||||
overlapping atoms, you may need to turn off these interactions to
|
||||
avoid numerical problems due to large equal/opposite intra-body forces
|
||||
For computational efficiency, you may wish to turn off pairwise and
|
||||
bond interactions within each rigid body, as they no longer
|
||||
contribute to the motion. The :doc:`neigh_modify exclude
|
||||
<neigh_modify>` and :doc:`delete_bonds <delete_bonds>` commands are
|
||||
used to do this. If the rigid bodies have strongly overlapping
|
||||
atoms, you may need to turn off these interactions to avoid
|
||||
numerical problems due to large equal/opposite intra-body forces
|
||||
swamping the contribution of small inter-body forces.
|
||||
|
||||
For computational efficiency, you should typically define one fix
|
||||
@ -379,7 +387,8 @@ is more expensive.
|
||||
|
||||
The constituent particles within a rigid body can be point particles
|
||||
(the default in LAMMPS) or finite-size particles, such as spheres or
|
||||
ellipsoids or line segments or triangles. See the :doc:`atom_style sphere and ellipsoid and line and tri <atom_style>` commands for more
|
||||
ellipsoids or line segments or triangles. See the :doc:`atom_style
|
||||
sphere and ellipsoid and line and tri <atom_style>` commands for more
|
||||
details on these kinds of particles. Finite-size particles contribute
|
||||
differently to the moment of inertia of a rigid body than do point
|
||||
particles. Finite-size particles can also experience torque (e.g. due
|
||||
@ -389,7 +398,8 @@ orientation. These contributions are accounted for by these fixes.
|
||||
Forces between particles within a body do not contribute to the
|
||||
external force or torque on the body. Thus for computational
|
||||
efficiency, you may wish to turn off pairwise and bond interactions
|
||||
between particles within each rigid body. The :doc:`neigh_modify exclude <neigh_modify>` and :doc:`delete_bonds <delete_bonds>`
|
||||
between particles within each rigid body. The :doc:`neigh_modify
|
||||
exclude <neigh_modify>` and :doc:`delete_bonds <delete_bonds>`
|
||||
commands are used to do this. For finite-size particles this also
|
||||
means the particles can be highly overlapped when creating the rigid
|
||||
body.
|
||||
@ -401,16 +411,17 @@ perform constant NVE time integration. They are referred to below as
|
||||
the 4 NVE rigid styles. The only difference is that the *rigid* and
|
||||
*rigid/small* styles use an integration technique based on Richardson
|
||||
iterations. The *rigid/nve* and *rigid/small/nve* styles uses the
|
||||
methods described in the paper by :ref:`Miller <Miller3>`, which are thought
|
||||
to provide better energy conservation than an iterative approach.
|
||||
methods described in the paper by :ref:`Miller <Miller3>`, which are
|
||||
thought to provide better energy conservation than an iterative
|
||||
approach.
|
||||
|
||||
The *rigid/nvt* and *rigid/nvt/small* styles performs constant NVT
|
||||
integration using a Nose/Hoover thermostat with chains as described
|
||||
originally in :ref:`(Hoover) <Hoover>` and :ref:`(Martyna) <Martyna2>`, which
|
||||
thermostats both the translational and rotational degrees of freedom
|
||||
of the rigid bodies. They are referred to below as the 2 NVT rigid
|
||||
styles. The rigid-body algorithm used by *rigid/nvt* is described in
|
||||
the paper by :ref:`Kamberaj <Kamberaj>`.
|
||||
originally in :ref:`(Hoover) <Hoover>` and :ref:`(Martyna)
|
||||
<Martyna2>`, which thermostats both the translational and rotational
|
||||
degrees of freedom of the rigid bodies. They are referred to below as
|
||||
the 2 NVT rigid styles. The rigid-body algorithm used by *rigid/nvt*
|
||||
is described in the paper by :ref:`Kamberaj <Kamberaj>`.
|
||||
|
||||
The *rigid/npt*, *rigid/nph*, *rigid/npt/small*, and *rigid/nph/small*
|
||||
styles perform constant NPT or NPH integration using a Nose/Hoover
|
||||
@ -436,12 +447,12 @@ The target pressures for each of the 6 components of the stress tensor
|
||||
can be specified independently via the *x*, *y*, *z* keywords, which
|
||||
correspond to the 3 simulation box dimensions. For each component,
|
||||
the external pressure or tensor component at each timestep is a ramped
|
||||
value during the run from *Pstart* to *Pstop*\ . If a target pressure is
|
||||
specified for a component, then the corresponding box dimension will
|
||||
change during a simulation. For example, if the *y* keyword is used,
|
||||
the y-box length will change. A box dimension will not change if that
|
||||
component is not specified, although you have the option to change
|
||||
that dimension via the :doc:`fix deform <fix_deform>` command.
|
||||
value during the run from *Pstart* to *Pstop*\ . If a target pressure
|
||||
is specified for a component, then the corresponding box dimension
|
||||
will change during a simulation. For example, if the *y* keyword is
|
||||
used, the y-box length will change. A box dimension will not change
|
||||
if that component is not specified, although you have the option to
|
||||
change that dimension via the :doc:`fix deform <fix_deform>` command.
|
||||
|
||||
For all barostat keywords, the *Pdamp* parameter operates like the
|
||||
*Tdamp* parameter, determining the time scale on which pressure is
|
||||
@ -525,11 +536,11 @@ discussed below.
|
||||
|
||||
The *langevin* keyword applies a Langevin thermostat to the constant
|
||||
NVE time integration performed by any of the 4 NVE rigid styles:
|
||||
*rigid*, *rigid/nve*, *rigid/small*, *rigid/small/nve*\ . It cannot be
|
||||
used with the 2 NVT rigid styles: *rigid/nvt*, *rigid/small/nvt*\ . The
|
||||
desired temperature at each timestep is a ramped value during the run
|
||||
from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in time
|
||||
units and determines how rapidly the temperature is relaxed. For
|
||||
*rigid*, *rigid/nve*, *rigid/small*, *rigid/small/nve*\ . It cannot
|
||||
be used with the 2 NVT rigid styles: *rigid/nvt*, *rigid/small/nvt*\ .
|
||||
The desired temperature at each timestep is a ramped value during the
|
||||
run from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in
|
||||
time units and determines how rapidly the temperature is relaxed. For
|
||||
example, a value of 100.0 means to relax the temperature in a timespan
|
||||
of (roughly) 100 time units (:math:`\tau` or fs or ps - see the
|
||||
:doc:`units <units>` command). The random # *seed* must be a positive
|
||||
@ -564,29 +575,30 @@ used. *Tchain* is the number of thermostats in the Nose Hoover chain.
|
||||
This value, along with *Tdamp* can be varied to dampen undesirable
|
||||
oscillations in temperature that can occur in a simulation. As a rule
|
||||
of thumb, increasing the chain length should lead to smaller
|
||||
oscillations. The keyword *pchain* specifies the number of
|
||||
thermostats in the chain thermostatting the barostat degrees of
|
||||
freedom.
|
||||
oscillations. The keyword *pchain* specifies the number of thermostats
|
||||
in the chain thermostatting the barostat degrees of freedom.
|
||||
|
||||
.. note::
|
||||
|
||||
There are alternate ways to thermostat a system of rigid bodies.
|
||||
You can use :doc:`fix langevin <fix_langevin>` to treat the individual
|
||||
particles in the rigid bodies as effectively immersed in an implicit
|
||||
solvent, e.g. a Brownian dynamics model. For hybrid systems with both
|
||||
rigid bodies and solvent particles, you can thermostat only the
|
||||
solvent particles that surround one or more rigid bodies by
|
||||
appropriate choice of groups in the compute and fix commands for
|
||||
temperature and thermostatting. The solvent interactions with the
|
||||
rigid bodies should then effectively thermostat the rigid body
|
||||
temperature as well without use of the Langevin or Nose/Hoover options
|
||||
associated with the fix rigid commands.
|
||||
You can use :doc:`fix langevin <fix_langevin>` to treat the
|
||||
individual particles in the rigid bodies as effectively immersed in
|
||||
an implicit solvent, e.g. a Brownian dynamics model. For hybrid
|
||||
systems with both rigid bodies and solvent particles, you can
|
||||
thermostat only the solvent particles that surround one or more
|
||||
rigid bodies by appropriate choice of groups in the compute and fix
|
||||
commands for temperature and thermostatting. The solvent
|
||||
interactions with the rigid bodies should then effectively
|
||||
thermostat the rigid body temperature as well without use of the
|
||||
Langevin or Nose/Hoover options associated with the fix rigid
|
||||
commands.
|
||||
|
||||
----------
|
||||
|
||||
The *mol* keyword can only be used with the *rigid/small* styles. It
|
||||
must be used when other commands, such as :doc:`fix deposit <fix_deposit>` or :doc:`fix pour <fix_pour>`, add rigid
|
||||
bodies on-the-fly during a simulation. You specify a *template-ID*
|
||||
must be used when other commands, such as :doc:`fix deposit
|
||||
<fix_deposit>` or :doc:`fix pour <fix_pour>`, add rigid bodies
|
||||
on-the-fly during a simulation. You specify a *template-ID*
|
||||
previously defined using the :doc:`molecule <molecule>` command, which
|
||||
reads a file that defines the molecule. You must use the same
|
||||
*template-ID* that the other fix which is adding rigid bodies uses.
|
||||
@ -670,16 +682,16 @@ cross periodic boundaries during the simulation.
|
||||
|
||||
.. note::
|
||||
|
||||
If you use the *infile* or *mol* keywords and write restart
|
||||
files during a simulation, then each time a restart file is written,
|
||||
the fix also write an auxiliary restart file with the name
|
||||
rfile.rigid, where "rfile" is the name of the restart file,
|
||||
If you use the *infile* or *mol* keywords and write restart files
|
||||
during a simulation, then each time a restart file is written, the
|
||||
fix also write an auxiliary restart file with the name rfile.rigid,
|
||||
where "rfile" is the name of the restart file,
|
||||
e.g. tmp.restart.10000 and tmp.restart.10000.rigid. This auxiliary
|
||||
file is in the same format described above. Thus it can be used in a
|
||||
new input script that restarts the run and re-specifies a rigid fix
|
||||
using an *infile* keyword and the appropriate filename. Note that the
|
||||
auxiliary file will contain one line for every rigid body, even if the
|
||||
original file only listed a subset of the rigid bodies.
|
||||
file is in the same format described above. Thus it can be used in
|
||||
a new input script that restarts the run and re-specifies a rigid
|
||||
fix using an *infile* keyword and the appropriate filename. Note
|
||||
that the auxiliary file will contain one line for every rigid body,
|
||||
even if the original file only listed a subset of the rigid bodies.
|
||||
|
||||
If the system has rigid bodies with finite-size overlapping particles
|
||||
and the model uses the :doc:`fix gravity <fix_gravity>` command to
|
||||
@ -728,10 +740,11 @@ also accounted for by this fix.
|
||||
|
||||
----------
|
||||
|
||||
If your simulation is a hybrid model with a mixture of rigid bodies and
|
||||
non-rigid particles (e.g. solvent) there are several ways these rigid
|
||||
fixes can be used in tandem with :doc:`fix nve <fix_nve>`, :doc:`fix nvt
|
||||
<fix_nh>`, :doc:`fix npt <fix_nh>`, and :doc:`fix nph <fix_nh>`.
|
||||
If your simulation is a hybrid model with a mixture of rigid bodies
|
||||
and non-rigid particles (e.g. solvent) there are several ways these
|
||||
rigid fixes can be used in tandem with :doc:`fix nve <fix_nve>`,
|
||||
:doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, and :doc:`fix nph
|
||||
<fix_nh>`.
|
||||
|
||||
If you wish to perform NVE dynamics (no thermostatting or
|
||||
barostatting), use one of 4 NVE rigid styles to integrate the rigid
|
||||
@ -741,14 +754,14 @@ particles.
|
||||
If you wish to perform NVT dynamics (thermostatting, but no
|
||||
barostatting), you can use one of the 2 NVT rigid styles for the rigid
|
||||
bodies, and any thermostatting fix for the non-rigid particles
|
||||
(:doc:`fix nvt <fix_nh>`, :doc:`fix langevin <fix_langevin>`, :doc:`fix
|
||||
temp/berendsen <fix_temp_berendsen>`). You can also use one of the 4
|
||||
NVE rigid styles for the rigid bodies and thermostat them using
|
||||
:doc:`fix langevin <fix_langevin>` on the group that contains all the
|
||||
particles in the rigid bodies. The net force added by :doc:`fix
|
||||
langevin <fix_langevin>` to each rigid body effectively thermostats its
|
||||
translational center-of-mass motion. Not sure how well it does at
|
||||
thermostatting its rotational motion.
|
||||
(:doc:`fix nvt <fix_nh>`, :doc:`fix langevin <fix_langevin>`,
|
||||
:doc:`fix temp/berendsen <fix_temp_berendsen>`). You can also use one
|
||||
of the 4 NVE rigid styles for the rigid bodies and thermostat them
|
||||
using :doc:`fix langevin <fix_langevin>` on the group that contains
|
||||
all the particles in the rigid bodies. The net force added by
|
||||
:doc:`fix langevin <fix_langevin>` to each rigid body effectively
|
||||
thermostats its translational center-of-mass motion. Not sure how
|
||||
well it does at thermostatting its rotational motion.
|
||||
|
||||
If you wish to perform NPT or NPH dynamics (barostatting), you cannot
|
||||
use both :doc:`fix npt <fix_nh>` and the NPT or NPH rigid styles. This
|
||||
@ -774,12 +787,12 @@ to the global pressure and the box is scaled the same by any of the
|
||||
barostatting fixes.
|
||||
|
||||
You could even use the second and third options for a non-hybrid
|
||||
simulation consisting of only rigid bodies, assuming you give :doc:`fix
|
||||
npt <fix_nh>` an empty group, though it's an odd thing to do. The
|
||||
barostatting fixes (:doc:`fix npt <fix_nh>` and :doc:`fix press/berensen
|
||||
<fix_press_berendsen>`) will monitor the pressure and change the box
|
||||
dimensions, but not time integrate any particles. The integration of
|
||||
the rigid bodies will be performed by fix rigid/nvt.
|
||||
simulation consisting of only rigid bodies, assuming you give
|
||||
:doc:`fix npt <fix_nh>` an empty group, though it's an odd thing to
|
||||
do. The barostatting fixes (:doc:`fix npt <fix_nh>` and :doc:`fix
|
||||
press/berensen <fix_press_berendsen>`) will monitor the pressure and
|
||||
change the box dimensions, but not time integrate any particles. The
|
||||
integration of the rigid bodies will be performed by fix rigid/nvt.
|
||||
|
||||
----------
|
||||
|
||||
@ -824,10 +837,10 @@ various :doc:`output commands <Howto_output>`. The scalar value
|
||||
calculated by these fixes is "intensive". The scalar is the current
|
||||
temperature of the collection of rigid bodies. This is averaged over
|
||||
all rigid bodies and their translational and rotational degrees of
|
||||
freedom. The translational energy of a rigid body is 1/2 m v\^2, where
|
||||
m = total mass of the body and v = the velocity of its center of mass.
|
||||
The rotational energy of a rigid body is 1/2 I w\^2, where I = the
|
||||
moment of inertia tensor of the body and w = its angular velocity.
|
||||
freedom. The translational energy of a rigid body is 1/2 m v\^2,
|
||||
where m = total mass of the body and v = the velocity of its center of
|
||||
mass. The rotational energy of a rigid body is 1/2 I w\^2, where I =
|
||||
the moment of inertia tensor of the body and w = its angular velocity.
|
||||
Degrees of freedom constrained by the *force* and *torque* keywords
|
||||
are removed from this calculation, but only for the *rigid* and
|
||||
*rigid/nve* fixes.
|
||||
|
||||
@ -155,6 +155,9 @@ This fix is part of the MC 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 style requires an :doc:`atom style <atom_style>` with per atom
|
||||
type masses.
|
||||
|
||||
At present the fix provides optimized subroutines for EAM type
|
||||
potentials (see above) that calculate potential energy changes due to
|
||||
*local* atom type swaps very efficiently. Other potentials are
|
||||
|
||||
@ -96,11 +96,11 @@ each processor, which is acceptable when the overall grid is reasonably
|
||||
small. For larger grids you should use fix *ttm/grid* instead.
|
||||
|
||||
Fix *ttm/mod* adds options to account for external heat sources (e.g. at
|
||||
a surface) and for specifying parameters that allow the electronic
|
||||
heat capacity to depend strongly on electronic temperature. It is
|
||||
more expensive computationally than fix *ttm* because it treats the
|
||||
thermal diffusion equation as non-linear. More details on fix *ttm/mod*
|
||||
are given below.
|
||||
a surface) and for specifying parameters that allow the electronic heat
|
||||
capacity to depend strongly on electronic temperature. It is more
|
||||
expensive computationally than fix *ttm* because it treats the thermal
|
||||
diffusion equation as non-linear. More details on fix *ttm/mod* are
|
||||
given below.
|
||||
|
||||
Heat transfer between the electronic and atomic subsystems is carried
|
||||
out via an inhomogeneous Langevin thermostat. Only atoms in the fix
|
||||
@ -136,23 +136,23 @@ transfer between the subsystems:
|
||||
\bigtriangledown (\kappa_e \bigtriangledown T_e) -
|
||||
g_p (T_e - T_a) + g_s T_a'
|
||||
|
||||
where C_e is the specific heat, rho_e is the density, kappa_e is the
|
||||
thermal conductivity, T is temperature, the "e" and "a" subscripts
|
||||
represent electronic and atomic subsystems respectively, g_p is the
|
||||
coupling constant for the electron-ion interaction, and g_s is the
|
||||
electron stopping coupling parameter. C_e, rho_e, and kappa_e are
|
||||
specified as parameters to the fix. The other quantities are derived.
|
||||
The form of the heat diffusion equation used here is almost the same
|
||||
as that in equation 6 of :ref:`(Duffy) <Duffy>`, with the exception that the
|
||||
electronic density is explicitly represented, rather than being part
|
||||
of the specific heat parameter.
|
||||
where :math:`C_e` is the specific heat, :math:`\rho_e` is the density,
|
||||
:math:`\kappa_e` is the thermal conductivity, *T* is temperature, the
|
||||
"e" and "a" subscripts represent electronic and atomic subsystems
|
||||
respectively, :math:`g_p` is the coupling constant for the electron-ion
|
||||
interaction, and :math:`g_s` is the electron stopping coupling
|
||||
parameter. :math:`C_e`, :math:`\rho_e`, and :math:`\kappa_e` are
|
||||
specified as parameters to the fix *ttm* or *ttm/grid*. The other
|
||||
quantities are derived. The form of the heat diffusion equation used
|
||||
here is almost the same as that in equation 6 of :ref:`(Duffy) <Duffy>`,
|
||||
with the exception that the electronic density is explicitly
|
||||
represented, rather than being part of the specific heat parameter.
|
||||
|
||||
Currently, the TTM fixes assume that none of the user-supplied
|
||||
parameters will vary with temperature. Note that :ref:`(Duffy)
|
||||
<Duffy>` used a tanh() functional form for the temperature dependence
|
||||
of the electronic specific heat, but ignored temperature dependencies
|
||||
of any of the other parameters. See more discussion below for fix
|
||||
ttm/mod.
|
||||
parameters will vary with temperature. Note that :ref:`(Duffy) <Duffy>`
|
||||
used a tanh() functional form for the temperature dependence of the
|
||||
electronic specific heat, but ignored temperature dependencies of any of
|
||||
the other parameters. See more discussion below for fix *ttm/mod*.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -265,27 +265,27 @@ heat sources (e.g. laser heating in ablation simulations):
|
||||
\bigtriangledown (\kappa_e \bigtriangledown T_e) -
|
||||
g_p (T_e - T_a) + g_s T_a' + \theta (x-x_{surface})I_0 \exp(-x/l_{skin})
|
||||
|
||||
where theta is the Heaviside step function, I_0 is the (absorbed)
|
||||
laser pulse intensity for ablation simulations, l_skin is the depth
|
||||
of skin-layer, and all other designations have the same meaning as in
|
||||
the former equation. The duration of the pulse is set by the parameter
|
||||
*tau* in the *init_file*.
|
||||
where :math:`\theta` is the Heaviside step function, :math:`I_0` is the
|
||||
(absorbed) laser pulse intensity for ablation simulations,
|
||||
:math:`l_{skin}` is the depth of the skin-layer, and all other
|
||||
designations have the same meaning as in the former equation. The
|
||||
duration of the pulse is set by the parameter *tau* in the *init_file*.
|
||||
|
||||
Fix ttm/mod also allows users to specify the dependencies of C_e and
|
||||
kappa_e on the electronic temperature. The specific heat is expressed
|
||||
as
|
||||
Fix *ttm/mod* also allows users to specify the dependencies of
|
||||
:math:`C_e` and :math:`\kappa_e` on the electronic temperature. The
|
||||
specific heat is expressed as
|
||||
|
||||
.. math::
|
||||
|
||||
C_e = C_0 + (a_0 + a_1 X + a_2 X^2 + a_3 X^3 + a_4 X^4) \exp (-(AX)^2)
|
||||
|
||||
where *X* = T_e/1000, and the thermal conductivity is defined as
|
||||
kappa_e = D_e\*rho_e\*C_e, where D_e is the thermal diffusion
|
||||
coefficient.
|
||||
where :math:`X = \frac{T_e}{1000}`, and the thermal conductivity is
|
||||
defined as :math:`\kappa_e = D_e \cdot rho_e \cdot C_e`, where
|
||||
:math:`D_e` is the thermal diffusion coefficient.
|
||||
|
||||
Electronic pressure effects are included in the TTM model to account
|
||||
for the blast force acting on ions because of electronic pressure
|
||||
gradient (see :ref:`(Chen) <Chen>`, :ref:`(Norman) <Norman>`). The total force
|
||||
Electronic pressure effects are included in the TTM model to account for
|
||||
the blast force acting on ions because of electronic pressure gradient
|
||||
(see :ref:`(Chen) <Chen>`, :ref:`(Norman) <Norman>`). The total force
|
||||
acting on an ion is:
|
||||
|
||||
.. math::
|
||||
@ -293,25 +293,26 @@ acting on an ion is:
|
||||
{\vec F}_i = - \partial U / \partial {\vec r}_i + {\vec
|
||||
F}_{langevin} - \nabla P_e/n_{ion}
|
||||
|
||||
where F_langevin is a force from Langevin thermostat simulating
|
||||
electron-phonon coupling, and nabla P_e/n_ion is the electron blast
|
||||
force.
|
||||
where :math:`F_{langevin}` is a force from Langevin thermostat
|
||||
simulating electron-phonon coupling, and :math:`\nabla P_e/n_{ion}` is
|
||||
the electron blast force.
|
||||
|
||||
The electronic pressure is taken to be P_e = B\*rho_e\*C_e\*T_e
|
||||
The electronic pressure is taken to be :math:`P_e = B \cdot rho_e \cdot
|
||||
C_e \cdot T_e`
|
||||
|
||||
The current fix ttm/mod implementation allows TTM simulations with a
|
||||
The current fix *ttm/mod* implementation allows TTM simulations with a
|
||||
vacuum. The vacuum region is defined as the grid cells with zero
|
||||
electronic temperature. The numerical scheme does not allow energy
|
||||
exchange with such cells. Since the material can expand to previously
|
||||
unoccupied region in some simulations, the vacuum border can be
|
||||
allowed to move. It is controlled by the *surface_movement* parameter
|
||||
in the *init_file*. If it is set to 1, then "vacuum" cells can be
|
||||
changed to "electron-filled" cells with the temperature *T_e_min* if
|
||||
atoms move into them (currently only implemented for the case of
|
||||
1-dimensional motion of flat surface normal to the X axis). The
|
||||
initial borders of vacuum can be set in the *init_file* via *lsurface*
|
||||
and *rsurface* parameters. In this case, electronic pressure gradient
|
||||
is calculated as
|
||||
unoccupied region in some simulations, the vacuum border can be allowed
|
||||
to move. It is controlled by the *surface_movement* parameter in the
|
||||
*init_file*. If it is set to 1, then "vacuum" cells can be changed to
|
||||
"electron-filled" cells with the temperature *T_e_min* if atoms move
|
||||
into them (currently only implemented for the case of 1-dimensional
|
||||
motion of a flat surface normal to the X axis). The initial locations of
|
||||
the interfaces of the electron density to the vacuum can be set in the
|
||||
*init_file* via *lsurface* and *rsurface* parameters. In this case,
|
||||
electronic pressure gradient is calculated as
|
||||
|
||||
.. math::
|
||||
|
||||
@ -319,10 +320,10 @@ is calculated as
|
||||
\frac{x}{x+\lambda}\frac{(C_e{}T_e)_{x+\Delta
|
||||
x}-(C_e{}T_e)_{x}}{\Delta x} \right]
|
||||
|
||||
where lambda is the electron mean free path (see :ref:`(Norman) <Norman>`,
|
||||
:ref:`(Pisarev) <Pisarev>`)
|
||||
where :math:`\lambda` is the electron mean free path (see :ref:`(Norman)
|
||||
<Norman>`, :ref:`(Pisarev) <Pisarev>`)
|
||||
|
||||
The fix ttm/mod parameter file *init_file* has the following syntax.
|
||||
The fix *ttm/mod* parameter file *init_file* has the following syntax.
|
||||
Every line with an odd number is considered as a comment and
|
||||
ignored. The lines with the even numbers are treated as follows:
|
||||
|
||||
|
||||
175
doc/src/fix_wall_flow.rst
Normal file
175
doc/src/fix_wall_flow.rst
Normal file
@ -0,0 +1,175 @@
|
||||
.. index:: fix wall/flow
|
||||
.. index:: fix wall/flow/kk
|
||||
|
||||
fix wall/flow command
|
||||
=====================
|
||||
|
||||
Accelerator Variants: *wall/flow/kk*
|
||||
|
||||
Syntax
|
||||
""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix ID group-ID wall/flow axis vflow T seed N coords ... keyword value
|
||||
|
||||
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||
* wall/flow = style name of this fix command
|
||||
* axis = flow axis (*x*, *y*, or *z*)
|
||||
* vflow = generated flow velocity in *axis* direction (velocity units)
|
||||
* T = flow temperature (temperature units)
|
||||
* seed = random seed for stochasticity (positive integer)
|
||||
* N = number of walls
|
||||
* coords = list of N wall positions along the *axis* direction in ascending order (distance units)
|
||||
* zero or more keyword/value pairs may be appended
|
||||
* keyword = *units*
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
*units* value = *lattice* or *box*
|
||||
*lattice* = wall positions are defined in lattice units
|
||||
*box* = the wall positions are defined in simulation box units
|
||||
|
||||
Examples
|
||||
""""""""
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
fix 1 all wall/flow x 0.4 1.5 593894 4 2.0 4.0 6.0 8.0
|
||||
|
||||
Description
|
||||
"""""""""""
|
||||
|
||||
.. versionadded:: 17Apr2024
|
||||
|
||||
This fix implements flow boundary conditions (FBC) introduced in
|
||||
:ref:`(Pavlov1) <fbc-Pavlov1>` and :ref:`(Pavlov2) <fbc-Pavlov2>`.
|
||||
The goal is to generate a stationary flow with a shifted Maxwell
|
||||
velocity distribution:
|
||||
|
||||
.. math::
|
||||
|
||||
f_a(v_a) \propto \exp{\left(-\frac{m (v_a-v_{\text{flow}})^2}{2 kB T}\right)}
|
||||
|
||||
where :math:`v_a` is the component of velocity along the specified
|
||||
*axis* argument (a = x,y,z), :math:`v_{\text{flow}}` is the flow
|
||||
velocity specified as the *vflow* argument, *T* is the specified flow
|
||||
temperature, *m* is the particle mass, and *kB* is the Boltzmann
|
||||
constant.
|
||||
|
||||
This is achieved by defining a series of *N* transparent walls along
|
||||
the flow *axis* direction. Each wall is at the specified position
|
||||
listed in the *coords* argument. Note that an additional transparent
|
||||
wall is defined by the code at the boundary of the (periodic)
|
||||
simulation domain in the *axis* direction. So there are effectively
|
||||
N+1 walls.
|
||||
|
||||
Each time a particle in the specified group passes through one of the
|
||||
transparent walls, its velocity is re-assigned. Particles not in the
|
||||
group do not interact with the wall. This can be used, for example, to
|
||||
add obstacles composed of atoms, or to simulate a solution of complex
|
||||
molecules in a one-atom liquid (note that the fix has been tested for
|
||||
one-atom systems only).
|
||||
|
||||
Conceptually, the velocity re-assignment represents creation of a new
|
||||
particle within the system with simultaneous removal of the particle
|
||||
which passed through the wall. The velocity components in directions
|
||||
parallel to the wall are re-assigned according to the standard Maxwell
|
||||
velocity distribution for the specified temperature *T*. The velocity
|
||||
component perpendicular to the wall is re-assigned according to the
|
||||
shifted Maxwell distribution defined above:
|
||||
|
||||
.. math::
|
||||
|
||||
f_{\text{a generated}}(v_a) \propto v_a f_a(v_a)
|
||||
|
||||
It can be shown that for an ideal-gas scenario this procedure makes
|
||||
the velocity distribution of particles between walls exactly as
|
||||
desired.
|
||||
|
||||
Since in most cases simulated systems are not an ideal gas, multiple
|
||||
walls can be defined, since a single wall may not be sufficient for
|
||||
maintaining a stationary flow without "congestion" which can manifest
|
||||
itself as regions in the flow with increased particle density located
|
||||
upstream from static obstacles.
|
||||
|
||||
For the same reason, the actual temperature and velocity of the
|
||||
generated flow may differ from what is requested. The degree of
|
||||
discrepancy is determined by how different from an ideal gas the
|
||||
simulated system is. Therefore, a calibration procedure may be
|
||||
required for such a system as described in :ref:`(Pavlov)
|
||||
<fbc-Pavlov2>`.
|
||||
|
||||
Note that the interactions between particles on different sides of a
|
||||
transparent wall are not disabled or neglected. Likewise particle
|
||||
positions are not altered by the velocity reassignment. This removes
|
||||
the need to modify the force field to work correctly in cases when a
|
||||
particle is close to a wall.
|
||||
|
||||
For example, if particle positions were uniformly redistributed across
|
||||
the surface of a wall, two particles could end up too close to each
|
||||
other, potentially causing the simulation to explode. However due to
|
||||
this compromise, some collective phenomena such as regions with
|
||||
increased/decreased density or collective movements are not fully
|
||||
removed when particles cross a wall. This unwanted consequence can
|
||||
also be potentially mitigated by using more multiple walls.
|
||||
|
||||
.. note::
|
||||
|
||||
When the specified flow has a high velocity, a lost atoms error can
|
||||
occur (see :doc:`error messages <Errors_messages>`). If this
|
||||
happens, you should ensure the checks for neighbor list rebuilds,
|
||||
set via the :doc:`neigh_modify <neigh_modify>` command, are as
|
||||
conservative as possible (every timestep if needed). Those are the
|
||||
default settings.
|
||||
|
||||
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
|
||||
""""""""""""
|
||||
|
||||
Fix *wall_flow* is part of the EXTRA-FIX package. It is only enabled
|
||||
if LAMMPS was built with that package. See the :doc:`Build package
|
||||
<Build_package>` page for more info.
|
||||
|
||||
Flow boundary conditions should not be used with rigid bodies such as
|
||||
those defined by a "fix rigid" command.
|
||||
|
||||
This fix can only be used with periodic boundary conditions along the
|
||||
flow axis. The size of the box in this direction must not change. Also,
|
||||
the fix is designed to work only in an orthogonal simulation box.
|
||||
|
||||
Related commands
|
||||
""""""""""""""""
|
||||
|
||||
:doc:`fix wall/reflect <fix_wall>` command
|
||||
|
||||
Default
|
||||
"""""""
|
||||
|
||||
The default for the units keyword is lattice.
|
||||
|
||||
----------
|
||||
|
||||
.. _fbc-Pavlov1:
|
||||
|
||||
**(Pavlov1)** Pavlov, Kolotinskii, Stegailov, "GPU-Based Molecular Dynamics of Turbulent Liquid Flows with OpenMM", Proceedings of PPAM-2022, LNCS (Springer), vol. 13826, pp. 346-358 (2023)
|
||||
|
||||
.. _fbc-Pavlov2:
|
||||
|
||||
**(Pavlov2)** Pavlov, Galigerov, Kolotinskii, Nikolskiy, Stegailov, "GPU-based Molecular Dynamics of Fluid Flows: Reaching for Turbulence", Int. J. High Perf. Comp. Appl., (2024)
|
||||
@ -195,8 +195,11 @@ doc page for more info.
|
||||
Do not set "neigh_modify once yes" or else this fix will never be
|
||||
called. Reneighboring is **required**.
|
||||
|
||||
Can be run in parallel, but aspects of the GCMC part will not scale well
|
||||
in parallel. Only usable for 3D simulations.
|
||||
This fix style requires an :doc:`atom style <atom_style>` with per atom
|
||||
type masses.
|
||||
|
||||
Can be run in parallel, but some aspects of the insertion procedure
|
||||
will not scale well in parallel. Only usable for 3D simulations.
|
||||
|
||||
|
||||
Related commands
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user