Merge conflicts
This commit is contained in:
10
.github/CODEOWNERS
vendored
10
.github/CODEOWNERS
vendored
@ -37,7 +37,8 @@ src/MESONT/* @iafoss
|
|||||||
src/ML-HDNNP/* @singraber
|
src/ML-HDNNP/* @singraber
|
||||||
src/ML-IAP/* @athomps
|
src/ML-IAP/* @athomps
|
||||||
src/ML-PACE/* @yury-lysogorskiy
|
src/ML-PACE/* @yury-lysogorskiy
|
||||||
src/ML-POD/* @exapde @rohskopf
|
src/ML-POD/* @exapde
|
||||||
|
src/ML-UF3/* @monk-04
|
||||||
src/MOFFF/* @hheenen
|
src/MOFFF/* @hheenen
|
||||||
src/MOLFILE/* @akohlmey
|
src/MOLFILE/* @akohlmey
|
||||||
src/NETCDF/* @pastewka
|
src/NETCDF/* @pastewka
|
||||||
@ -65,10 +66,15 @@ src/MANYBODY/pair_nb3b_screened.* @flodesani
|
|||||||
src/REPLICA/*_grem.* @dstelter92
|
src/REPLICA/*_grem.* @dstelter92
|
||||||
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
|
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
|
||||||
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
|
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
|
||||||
|
src/EXTRA-FIX/fix_deform_pressure.* @jtclemm
|
||||||
src/MISC/*_tracker.* @jtclemm
|
src/MISC/*_tracker.* @jtclemm
|
||||||
src/MC/fix_gcmc.* @athomps
|
src/MC/fix_gcmc.* @athomps
|
||||||
src/MC/fix_sgcmc.* @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
|
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
|
||||||
|
src/DPD-BASIC/pair_dpd_coul_slater_long.* @Eddy-Barraud
|
||||||
|
src/GPU/pair_dpd_coul_slater_long.* @Eddy-Barraud
|
||||||
|
|
||||||
# core LAMMPS classes
|
# core LAMMPS classes
|
||||||
src/lammps.* @sjplimp
|
src/lammps.* @sjplimp
|
||||||
@ -80,7 +86,7 @@ src/bond.* @sjplimp
|
|||||||
src/comm*.* @sjplimp
|
src/comm*.* @sjplimp
|
||||||
src/compute.* @sjplimp
|
src/compute.* @sjplimp
|
||||||
src/dihedral.* @sjplimp
|
src/dihedral.* @sjplimp
|
||||||
src/domain.* @sjplimp
|
src/domain.* @sjplimp @stanmoore1
|
||||||
src/dump*.* @sjplimp
|
src/dump*.* @sjplimp
|
||||||
src/error.* @sjplimp
|
src/error.* @sjplimp
|
||||||
src/finish.* @sjplimp
|
src/finish.* @sjplimp
|
||||||
|
|||||||
2
.github/workflows/coverity.yml
vendored
2
.github/workflows/coverity.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Cache Coverity
|
- name: Cache Coverity
|
||||||
id: cache-coverity
|
id: cache-coverity
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ./download/
|
path: ./download/
|
||||||
key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }}
|
key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }}
|
||||||
|
|||||||
6
.github/workflows/unittest-macos.yml
vendored
6
.github/workflows/unittest-macos.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: MacOS Unit Test
|
name: MacOS Unit Test
|
||||||
if: ${{ github.repository == 'lammps/lammps' }}
|
if: ${{ github.repository == 'lammps/lammps' }}
|
||||||
runs-on: macos-latest
|
runs-on: macos-13
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
run: mkdir build
|
run: mkdir build
|
||||||
|
|
||||||
- name: Set up ccache
|
- name: Set up ccache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.CCACHE_DIR }}
|
path: ${{ env.CCACHE_DIR }}
|
||||||
key: macos-ccache-${{ github.sha }}
|
key: macos-ccache-${{ github.sha }}
|
||||||
@ -43,6 +43,8 @@ jobs:
|
|||||||
working-directory: build
|
working-directory: build
|
||||||
run: |
|
run: |
|
||||||
ccache -z
|
ccache -z
|
||||||
|
python3 -m venv macosenv
|
||||||
|
source macosenv/bin/activate
|
||||||
python3 -m pip install numpy
|
python3 -m pip install numpy
|
||||||
python3 -m pip install pyyaml
|
python3 -m pip install pyyaml
|
||||||
cmake -C ../cmake/presets/clang.cmake \
|
cmake -C ../cmake/presets/clang.cmake \
|
||||||
|
|||||||
@ -120,6 +120,19 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
|
|||||||
set(CMAKE_TUNE_DEFAULT "-Minform=severe")
|
set(CMAKE_TUNE_DEFAULT "-Minform=severe")
|
||||||
endif()
|
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
|
# silence nvcc warnings
|
||||||
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
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")
|
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||||
@ -209,6 +222,10 @@ endif()
|
|||||||
add_executable(lmp ${MAIN_SOURCES})
|
add_executable(lmp ${MAIN_SOURCES})
|
||||||
target_link_libraries(lmp PRIVATE lammps)
|
target_link_libraries(lmp PRIVATE lammps)
|
||||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
|
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})
|
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||||
@ -239,6 +256,7 @@ set(STANDARD_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
EFF
|
EFF
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -268,6 +286,7 @@ set(STANDARD_PACKAGES
|
|||||||
ML-RANN
|
ML-RANN
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
ML-POD
|
ML-POD
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
@ -416,6 +435,7 @@ if(BUILD_OMP)
|
|||||||
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
|
(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 "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 "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)))
|
((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.
|
# 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.
|
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
|
||||||
@ -426,6 +446,21 @@ if(BUILD_OMP)
|
|||||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL})
|
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL})
|
||||||
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
||||||
target_link_libraries(lmp 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()
|
endif()
|
||||||
|
|
||||||
# lower C++ standard for fmtlib sources when using Intel classic compiler
|
# lower C++ standard for fmtlib sources when using Intel classic compiler
|
||||||
@ -540,12 +575,12 @@ endforeach()
|
|||||||
########################################################################
|
########################################################################
|
||||||
# Basic system tests (standard libraries, headers, functions, types) #
|
# Basic system tests (standard libraries, headers, functions, types) #
|
||||||
########################################################################
|
########################################################################
|
||||||
foreach(HEADER cmath)
|
if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")))
|
||||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
check_include_file_cxx(cmath FOUND_CMATH)
|
||||||
if(NOT FOUND_${HEADER})
|
if(NOT FOUND_CMATH)
|
||||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
message(FATAL_ERROR "Could not find the required 'cmath' header")
|
||||||
endif(NOT FOUND_${HEADER})
|
endif(NOT FOUND_CMATH)
|
||||||
endforeach(HEADER)
|
endif()
|
||||||
|
|
||||||
# make the standard math library overrideable and autodetected (for systems that don't have it)
|
# 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")
|
find_library(STANDARD_MATH_LIB m DOC "Standard Math library")
|
||||||
@ -657,7 +692,7 @@ endif()
|
|||||||
# packages which selectively include variants based on enabled styles
|
# packages which selectively include variants based on enabled styles
|
||||||
# e.g. accelerator packages
|
# e.g. accelerator packages
|
||||||
######################################################################
|
######################################################################
|
||||||
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
foreach(PKG_WITH_INCL CORESHELL DPD-BASIC DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||||
if(PKG_${PKG_WITH_INCL})
|
if(PKG_${PKG_WITH_INCL})
|
||||||
include(Packages/${PKG_WITH_INCL})
|
include(Packages/${PKG_WITH_INCL})
|
||||||
endif()
|
endif()
|
||||||
@ -972,14 +1007,15 @@ if(PKG_KOKKOS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(PKG_KSPACE)
|
if(PKG_KSPACE)
|
||||||
if (LMP_HEFFTE)
|
if (FFT_USE_HEFFTE)
|
||||||
message(STATUS "<<< FFT settings >>>
|
message(STATUS "<<< FFT settings >>>
|
||||||
-- Primary FFT lib: heFFTe")
|
-- Primary FFT lib: heFFTe")
|
||||||
if (HEFFTE_BACKEND)
|
if (FFT_HEFFTE_BACKEND)
|
||||||
message(STATUS "heFFTe backend: ${HEFFTE_BACKEND}")
|
message(STATUS "heFFTe backend: ${FFT_HEFFTE_BACKEND}")
|
||||||
else()
|
else()
|
||||||
message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)")
|
message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)")
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "Using distributed FFT algorithms from heFTTe")
|
||||||
if(FFT_SINGLE)
|
if(FFT_SINGLE)
|
||||||
message(STATUS "Using single precision FFTs")
|
message(STATUS "Using single precision FFTs")
|
||||||
else()
|
else()
|
||||||
@ -998,28 +1034,10 @@ if(PKG_KSPACE)
|
|||||||
else()
|
else()
|
||||||
message(STATUS "Using non-threaded FFTs")
|
message(STATUS "Using non-threaded FFTs")
|
||||||
endif()
|
endif()
|
||||||
if (FFT_HEFFTE)
|
message(STATUS "Using builtin distributed FFT algorithms")
|
||||||
message(STATUS "Using distributed algorithms from heFTTe")
|
endif()
|
||||||
else()
|
if(PKG_KOKKOS)
|
||||||
message(STATUS "Using builtin distributed algorithms")
|
message(STATUS "Kokkos FFT: ${FFT_KOKKOS}")
|
||||||
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()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_DOC)
|
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 ROCM_PATH)
|
||||||
if(NOT DEFINED ENV{ROCM_PATH})
|
if(NOT DEFINED ENV{ROCM_PATH})
|
||||||
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
|
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")
|
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
|
||||||
endif()
|
endif()
|
||||||
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")
|
"${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt")
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}"
|
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)
|
endfunction(ExternalCMakeProject)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
message(STATUS "Downloading and building OpenCL loader library")
|
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_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.05.09.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_MD5 "e7796826b21c059224fabe997e0f2075" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||||
mark_as_advanced(OPENCL_LOADER_URL)
|
mark_as_advanced(OPENCL_LOADER_URL)
|
||||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||||
|
|
||||||
@ -8,4 +8,3 @@ set(INSTALL_LIBOPENCL OFF CACHE BOOL "" FORCE)
|
|||||||
include(ExternalCMakeProject)
|
include(ExternalCMakeProject)
|
||||||
ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "")
|
ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "")
|
||||||
|
|
||||||
add_library(OpenCL::OpenCL ALIAS OpenCL)
|
|
||||||
|
|||||||
9
cmake/Modules/Packages/DPD-BASIC.cmake
Normal file
9
cmake/Modules/Packages/DPD-BASIC.cmake
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# pair style dpd/coul/slater/long may only be installed if also KSPACE is installed
|
||||||
|
if(NOT PKG_KSPACE)
|
||||||
|
get_property(LAMMPS_PAIR_HEADERS GLOBAL PROPERTY PAIR)
|
||||||
|
list(REMOVE_ITEM LAMMPS_PAIR_HEADERS ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.h)
|
||||||
|
set_property(GLOBAL PROPERTY PAIR "${LAMMPS_PAIR_HEADERS}")
|
||||||
|
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||||
|
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.cpp)
|
||||||
|
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
|
||||||
|
endif()
|
||||||
@ -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_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||||
${GPU_SOURCES_DIR}/fix_gpu.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)
|
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
|
||||||
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
||||||
endif()
|
endif()
|
||||||
|
if(PKG_ML-SNAP)
|
||||||
|
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/sna_intel.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_sources(lammps PRIVATE ${INTEL_SOURCES})
|
target_sources(lammps PRIVATE ${INTEL_SOURCES})
|
||||||
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})
|
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})
|
||||||
|
|||||||
@ -45,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_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.2.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||||
set(KOKKOS_MD5 "731647b61a4233f568d583702e9cd6d1" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
set(KOKKOS_MD5 "243de871b3dc2cf3990c1c404032df83" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||||
mark_as_advanced(KOKKOS_URL)
|
mark_as_advanced(KOKKOS_URL)
|
||||||
mark_as_advanced(KOKKOS_MD5)
|
mark_as_advanced(KOKKOS_MD5)
|
||||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||||
@ -71,7 +71,7 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||||
elseif(EXTERNAL_KOKKOS)
|
elseif(EXTERNAL_KOKKOS)
|
||||||
find_package(Kokkos 4.2.00 REQUIRED CONFIG)
|
find_package(Kokkos 4.3.01 REQUIRED CONFIG)
|
||||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||||
else()
|
else()
|
||||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||||
@ -126,16 +126,33 @@ if(PKG_KSPACE)
|
|||||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
||||||
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
|
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
|
||||||
${KOKKOS_PKG_SOURCES_DIR}/remap_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(Kokkos_ENABLE_CUDA)
|
||||||
if(NOT (FFT STREQUAL "KISS"))
|
if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "CUFFT")))
|
||||||
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
|
message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
|
||||||
target_link_libraries(lammps PRIVATE 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()
|
endif()
|
||||||
elseif(Kokkos_ENABLE_HIP)
|
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)
|
include(DetectHIPInstallation)
|
||||||
find_package(hipfft REQUIRED)
|
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)
|
target_link_libraries(lammps PRIVATE hip::hipfft)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -48,10 +48,15 @@ endif()
|
|||||||
|
|
||||||
option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF)
|
option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF)
|
||||||
if(FFT_USE_HEFFTE)
|
if(FFT_USE_HEFFTE)
|
||||||
# if FFT_HEFFTE is enabled, switch the builtin FFT engine with Heffte
|
# if FFT_HEFFTE is enabled, use the heFFTe parallel engine instead of the builtin fftMPI engine
|
||||||
set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL)
|
|
||||||
set(FFT_HEFFTE_BACKEND "" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL")
|
# 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})
|
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
|
if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL
|
||||||
set(HEFFTE_COMPONENTS "FFTW")
|
set(HEFFTE_COMPONENTS "FFTW")
|
||||||
@ -60,24 +65,38 @@ if(FFT_USE_HEFFTE)
|
|||||||
set(HEFFTE_COMPONENTS "MKL")
|
set(HEFFTE_COMPONENTS "MKL")
|
||||||
set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe")
|
set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe")
|
||||||
else()
|
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")
|
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()
|
endif()
|
||||||
|
|
||||||
find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS})
|
find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS})
|
||||||
if (NOT Heffte_FOUND) # download and build
|
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)
|
include(FetchContent)
|
||||||
FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0
|
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 "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz"
|
||||||
URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d
|
URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d
|
||||||
)
|
)
|
||||||
FetchContent_Populate(HEFFTE_PROJECT)
|
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_compile_definitions(lammps PRIVATE -DFFT_HEFFTE "-DFFT_HEFFTE_${FFT_HEFFTE_BACKEND}")
|
||||||
target_link_libraries(lammps PRIVATE Heffte::Heffte)
|
target_link_libraries(lammps PRIVATE Heffte::Heffte)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al
|
|||||||
|
|
||||||
if(DOWNLOAD_MDI)
|
if(DOWNLOAD_MDI)
|
||||||
message(STATUS "MDI download requested - we will build our own")
|
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_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.26.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||||
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball")
|
set(MDI_MD5 "3124bb85259471e2a53a891f04bf697a" CACHE STRING "MD5 checksum for MDI tarball")
|
||||||
mark_as_advanced(MDI_URL)
|
mark_as_advanced(MDI_URL)
|
||||||
mark_as_advanced(MDI_MD5)
|
mark_as_advanced(MDI_MD5)
|
||||||
GetFallbackURL(MDI_URL MDI_FALLBACK)
|
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})
|
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)
|
if(MLIAP_ENABLE_PYTHON)
|
||||||
find_package(Cythonize REQUIRED)
|
find_package(Cythonize REQUIRED)
|
||||||
find_package(Python COMPONENTS NumPy REQUIRED)
|
find_package(Python COMPONENTS NumPy REQUIRED)
|
||||||
@ -36,3 +44,10 @@ if(MLIAP_ENABLE_PYTHON)
|
|||||||
target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON)
|
target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON)
|
||||||
target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR})
|
target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR})
|
||||||
endif()
|
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}F77FLAGS += -fpp -fixed -fPIC\n")
|
||||||
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
|
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
|
||||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
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}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}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")
|
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"
|
GIT_SUBMODULES "src/fox;src/GAP"
|
||||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
|
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
|
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 ""
|
INSTALL_COMMAND ""
|
||||||
BUILD_IN_SOURCE YES
|
BUILD_IN_SOURCE YES
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}
|
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
# Plumed2 support for PLUMED package
|
# Plumed2 support for PLUMED package
|
||||||
|
|
||||||
|
# for supporting multiple concurrent plumed2 installations for debugging and testing
|
||||||
|
set(PLUMED_SUFFIX "" CACHE STRING "Suffix for Plumed2 library")
|
||||||
|
mark_as_advanced(PLUMED_SUFFIX)
|
||||||
|
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
||||||
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
||||||
@ -21,9 +25,11 @@ else()
|
|||||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz"
|
# Note: must also adjust check for supported API versions in
|
||||||
|
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
|
||||||
|
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.1/plumed-src-2.9.1.tgz"
|
||||||
CACHE STRING "URL for PLUMED tarball")
|
CACHE STRING "URL for PLUMED tarball")
|
||||||
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball")
|
set(PLUMED_MD5 "c3b2d31479c1e9ce211719d40e9efbd7" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||||
|
|
||||||
mark_as_advanced(PLUMED_URL)
|
mark_as_advanced(PLUMED_URL)
|
||||||
mark_as_advanced(PLUMED_MD5)
|
mark_as_advanced(PLUMED_MD5)
|
||||||
@ -151,15 +157,15 @@ else()
|
|||||||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
||||||
else()
|
else()
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(PLUMED REQUIRED plumed)
|
pkg_check_modules(PLUMED REQUIRED plumed${PLUMED_SUFFIX})
|
||||||
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
|
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
|
||||||
if(PLUMED_MODE STREQUAL "STATIC")
|
if(PLUMED_MODE STREQUAL "STATIC")
|
||||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
|
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.static)
|
||||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
|
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.shared)
|
||||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${PLUMED_SUFFIX}Kernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
|
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.runtime)
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
|
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
|
||||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
|
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
|
||||||
|
|||||||
@ -59,12 +59,14 @@ done
|
|||||||
|
|
||||||
echo "Set up wrapper script"
|
echo "Set up wrapper script"
|
||||||
MYDIR=$(dirname "$0")
|
MYDIR=$(dirname "$0")
|
||||||
|
cp ${MYDIR}/xdg-open ${DESTDIR}/bin
|
||||||
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
|
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
|
||||||
for s in ${DESTDIR}/bin/*
|
for s in ${DESTDIR}/bin/*
|
||||||
do \
|
do \
|
||||||
EXE=$(basename $s)
|
EXE=$(basename $s)
|
||||||
test ${EXE} = linux_wrapper.sh && continue
|
test ${EXE} = linux_wrapper.sh && continue
|
||||||
test ${EXE} = qt.conf && continue
|
test ${EXE} = qt.conf && continue
|
||||||
|
test ${EXE} = xdg-open && continue
|
||||||
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@ -4,15 +4,17 @@
|
|||||||
# reset locale to avoid problems with decimal numbers
|
# reset locale to avoid problems with decimal numbers
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
BASEDIR=$(dirname "$0")
|
BASEDIR="$(dirname "$0")"
|
||||||
EXENAME=$(basename "$0")
|
EXENAME="$(basename "$0")"
|
||||||
|
|
||||||
|
PATH="${BASEDIR}/bin:${PATH}"
|
||||||
|
|
||||||
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
||||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BASEDIR}/lib"
|
||||||
|
|
||||||
# set some environment variables for LAMMPS etc.
|
# set some environment variables for LAMMPS etc.
|
||||||
LAMMPS_POTENTIALS=${BASEDIR}/share/lammps/potentials
|
LAMMPS_POTENTIALS="${BASEDIR}/share/lammps/potentials"
|
||||||
MSI2LMP_LIBRARY=${BASEDIR}/share/lammps/frc_files
|
MSI2LMP_LIBRARY="${BASEDIR}/share/lammps/frc_files"
|
||||||
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY
|
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY PATH
|
||||||
|
|
||||||
exec "${BASEDIR}/bin/${EXENAME}" "$@"
|
exec "${BASEDIR}/bin/${EXENAME}" "$@"
|
||||||
|
|||||||
1074
cmake/packaging/xdg-open
Executable file
1074
cmake/packaging/xdg-open
Executable file
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,7 @@ set(ALL_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
EFF
|
EFF
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -60,6 +61,7 @@ set(ALL_PACKAGES
|
|||||||
ML-QUIP
|
ML-QUIP
|
||||||
ML-RANN
|
ML-RANN
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
|
|||||||
@ -30,6 +30,7 @@ set(ALL_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
EFF
|
EFF
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -62,6 +63,7 @@ set(ALL_PACKAGES
|
|||||||
ML-QUIP
|
ML-QUIP
|
||||||
ML-RANN
|
ML-RANN
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
|
|||||||
@ -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)
|
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)
|
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
|
# hide deprecation warnings temporarily for stable release
|
||||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
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_CXX_COMPILER hipcc CACHE STRING "" FORCE)
|
||||||
set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" 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
|
# hide deprecation warnings temporarily for stable release
|
||||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ set(WIN_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
EFF
|
EFF
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -50,6 +51,7 @@ set(WIN_PACKAGES
|
|||||||
ML-POD
|
ML-POD
|
||||||
ML-RANN
|
ML-RANN
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
|
|||||||
@ -26,6 +26,7 @@ set(ALL_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
EFF
|
EFF
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -45,6 +46,7 @@ set(ALL_PACKAGES
|
|||||||
ML-IAP
|
ML-IAP
|
||||||
ML-POD
|
ML-POD
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
OPENMP
|
OPENMP
|
||||||
|
|||||||
@ -22,6 +22,7 @@ set(WIN_PACKAGES
|
|||||||
DRUDE
|
DRUDE
|
||||||
EFF
|
EFF
|
||||||
ELECTRODE
|
ELECTRODE
|
||||||
|
EXTRA-COMMAND
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
@ -42,6 +43,7 @@ set(WIN_PACKAGES
|
|||||||
ML-IAP
|
ML-IAP
|
||||||
ML-POD
|
ML-POD
|
||||||
ML-SNAP
|
ML-SNAP
|
||||||
|
ML-UF3
|
||||||
MOFFF
|
MOFFF
|
||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
|
|||||||
@ -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 ' `[^`]\+<[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 ;\
|
||||||
|
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||||
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
deactivate ;\
|
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 ' `[^`]\+<[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 ;\
|
||||||
|
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||||
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
deactivate ;\
|
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 ' `[^`]\+<[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 || : )
|
||||||
|
@( env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||||
|
|
||||||
link_check : $(VENV) html
|
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
|
.SH NAME
|
||||||
.B LAMMPS
|
.B LAMMPS
|
||||||
\- Molecular Dynamics Simulator. Version 21 November 2023
|
\- Molecular Dynamics Simulator. Version 17 April 2024
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B lmp
|
.B lmp
|
||||||
@ -297,7 +297,7 @@ the chapter on errors in the
|
|||||||
manual gives some additional information about error messages, if possible.
|
manual gives some additional information about error messages, if possible.
|
||||||
|
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
© 2003--2022 Sandia Corporation
|
© 2003--2024 Sandia Corporation
|
||||||
|
|
||||||
This package is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License version 2 as
|
||||||
|
|||||||
@ -877,6 +877,9 @@ Bibliography
|
|||||||
**(PLUMED)**
|
**(PLUMED)**
|
||||||
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
|
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)**
|
||||||
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.
|
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
|
The LAMMPS code is subject to multiple levels of automated testing
|
||||||
during development: integration testing (i.e. whether the code compiles
|
during development:
|
||||||
on various platforms and with a variety of settings), unit testing
|
|
||||||
(i.e. whether certain individual parts of the code produce the expected
|
- Integration testing (i.e. whether the code compiles
|
||||||
results for given inputs), run testing (whether selected complete input
|
on various platforms and with a variety of compilers and settings),
|
||||||
decks run without crashing for multiple configurations), and regression
|
- Unit testing (i.e. whether certain functions or classes of the code
|
||||||
testing (i.e. whether selected input examples reproduce the same
|
produce the expected results for given inputs),
|
||||||
results over a given number of steps and operations within a given
|
- Run testing (i.e. whether selected input decks can run to completion
|
||||||
error margin). The status of this automated testing can be viewed on
|
without crashing for multiple configurations),
|
||||||
`https://ci.lammps.org <https://ci.lammps.org>`_.
|
- 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
|
The scripts and inputs for integration, run, and regression testing
|
||||||
are maintained in a
|
are maintained in a
|
||||||
`separate repository <https://github.com/lammps/lammps-testing>`_
|
`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
|
The unit testing facility is integrated into the CMake build process of
|
||||||
of the LAMMPS source code distribution itself. It can be enabled by
|
the LAMMPS source code distribution itself. It can be enabled by
|
||||||
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
|
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
|
||||||
It requires the `YAML <https://pyyaml.org/>`_ library and development
|
It requires the `YAML <https://pyyaml.org/>`_ library and matching
|
||||||
headers (if those are not found locally a recent version will be
|
development headers to compile (if those are not found locally a recent
|
||||||
downloaded and compiled along with LAMMPS and the test program) to
|
version of that library will be downloaded and compiled along with
|
||||||
compile and will download and compile a specific recent version of the
|
LAMMPS and the test programs) and will download and compile a specific
|
||||||
`Googletest <https://github.com/google/googletest/>`_ C++ test framework
|
version of the `GoogleTest <https://github.com/google/googletest/>`_ C++
|
||||||
for implementing the tests.
|
test framework that is used to implement the tests.
|
||||||
|
|
||||||
.. admonition:: Software version requirements for testing
|
.. admonition:: Software version and LAMMPS configuration requirements
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
The compiler and library version requirements for the testing
|
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
|
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
|
(version 4.8.x) are not sufficient. The CMake configuration will try
|
||||||
to detect incompatible versions and either skip incompatible tests or
|
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,
|
installed LAMMPS packages, development environment, operating system,
|
||||||
and configuration settings.
|
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
|
time. Preference is given to parts of the code base that are easy to
|
||||||
test or commonly used.
|
test or commonly used.
|
||||||
|
|
||||||
Tests for styles of the same kind of style (e.g. pair styles or bond
|
Tests as shown by the ``ctest`` program are command lines defined in the
|
||||||
styles) are performed with the same test executable using different
|
``CMakeLists.txt`` files in the ``unittest`` directory tree. A few
|
||||||
input files in YAML format. So to add a test for another style of the
|
tests simply execute LAMMPS with specific command line flags and check
|
||||||
same kind it may be sufficient to add a suitable YAML file.
|
the output to the screen for expected content. A large number of unit
|
||||||
:doc:`Detailed instructions for adding tests <Developer_unittest>` are
|
tests are special tests programs using the `GoogleTest framework
|
||||||
provided in the Programmer Guide part of the manual.
|
<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
|
Unit tests for force styles
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@ -533,9 +533,6 @@ They must be specified in uppercase.
|
|||||||
* - A64FX
|
* - A64FX
|
||||||
- HOST
|
- HOST
|
||||||
- ARMv8.2 with SVE Support
|
- ARMv8.2 with SVE Support
|
||||||
* - WSM
|
|
||||||
- HOST
|
|
||||||
- Intel Westmere CPU (SSE 4.2)
|
|
||||||
* - SNB
|
* - SNB
|
||||||
- HOST
|
- HOST
|
||||||
- Intel Sandy/Ivy Bridge CPU (AVX 1)
|
- Intel Sandy/Ivy Bridge CPU (AVX 1)
|
||||||
@ -566,18 +563,15 @@ They must be specified in uppercase.
|
|||||||
* - KNL
|
* - KNL
|
||||||
- HOST
|
- HOST
|
||||||
- Intel Knights Landing Xeon Phi
|
- Intel Knights Landing Xeon Phi
|
||||||
* - BGQ
|
|
||||||
- HOST
|
|
||||||
- IBM Blue Gene/Q CPU
|
|
||||||
* - POWER7
|
|
||||||
- HOST
|
|
||||||
- IBM POWER7 CPU
|
|
||||||
* - POWER8
|
* - POWER8
|
||||||
- HOST
|
- HOST
|
||||||
- IBM POWER8 CPU
|
- IBM POWER8 CPU
|
||||||
* - POWER9
|
* - POWER9
|
||||||
- HOST
|
- HOST
|
||||||
- IBM POWER9 CPU
|
- IBM POWER9 CPU
|
||||||
|
* - RISCV_SG2042
|
||||||
|
- HOST
|
||||||
|
- SG2042 (RISC-V) CPU
|
||||||
* - KEPLER30
|
* - KEPLER30
|
||||||
- GPU
|
- GPU
|
||||||
- NVIDIA Kepler generation CC 3.0 GPU
|
- NVIDIA Kepler generation CC 3.0 GPU
|
||||||
@ -666,7 +660,7 @@ They must be specified in uppercase.
|
|||||||
- GPU
|
- GPU
|
||||||
- Intel GPU Ponte Vecchio
|
- 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::
|
.. 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.
|
library is included with LAMMPS, but other libraries can be faster.
|
||||||
LAMMPS can use them if they are available on your system.
|
LAMMPS can use them if they are available on your system.
|
||||||
|
|
||||||
.. versionadded:: TBD
|
.. versionadded:: 7Feb2024
|
||||||
|
|
||||||
Alternatively, LAMMPS can use the `heFFTe
|
Alternatively, LAMMPS can use the `heFFTe
|
||||||
<https://icl-utk-edu.github.io/heffte/>`_ library for the MPI
|
<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
|
.. code-block:: bash
|
||||||
|
|
||||||
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS
|
-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_SINGLE=value # yes or no (default), no = double precision
|
||||||
-D FFT_PACK=value # array (default) or pointer or memcpy
|
-D FFT_PACK=value # array (default) or pointer or memcpy
|
||||||
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
|
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The values for the FFT variable must be in upper-case. This is
|
When the Kokkos variant of a package is compiled and selected at run time,
|
||||||
an exception to the rule that all CMake variables can be specified
|
the FFT library selected by the FFT_KOKKOS variable applies. Otherwise,
|
||||||
with lower-case values.
|
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
|
Usually these settings are all that is needed. If FFTW3 is
|
||||||
selected, then CMake will try to detect, if threaded FFTW
|
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
|
FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS
|
||||||
# default is KISS if not specified
|
# 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_SINGLE # do not specify for double precision
|
||||||
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
|
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
|
||||||
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL 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_INC = -I/usr/local/include
|
||||||
FFT_PATH = -L/usr/local/lib
|
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 # FFTW3 double precision
|
||||||
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
|
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
|
||||||
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
|
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
|
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
|
||||||
above).
|
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
|
Performing 3d FFTs in parallel can be time-consuming due to data access
|
||||||
and required communication. This cost can be reduced by performing
|
and required communication. This cost can be reduced by performing
|
||||||
single-precision FFTs instead of double precision. Single precision
|
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
|
``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory
|
||||||
use and parallel communication costs for transposing 3d FFT data.
|
use and parallel communication costs for transposing 3d FFT data.
|
||||||
|
|
||||||
When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW
|
When using ``-DFFT_SINGLE`` with FFTW3, you may need to ensure that
|
||||||
library a second time with support for single-precision.
|
the FFTW3 installation includes support for single-precision.
|
||||||
|
|
||||||
For FFTW3, do the following, which should produce the additional
|
When compiler FFTW3 from source, you can do the following, which should
|
||||||
library ``libfftw3f.a`` or ``libfftw3f.so``\ .
|
produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ OPT.
|
|||||||
|
|
||||||
* :doc:`none <bond_none>`
|
* :doc:`none <bond_none>`
|
||||||
* :doc:`zero <bond_zero>`
|
* :doc:`zero <bond_zero>`
|
||||||
* :doc:`hybrid <bond_hybrid>`
|
* :doc:`hybrid (k) <bond_hybrid>`
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -90,6 +90,7 @@ OPT.
|
|||||||
* :doc:`cosine/shift (o) <angle_cosine_shift>`
|
* :doc:`cosine/shift (o) <angle_cosine_shift>`
|
||||||
* :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>`
|
* :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>`
|
||||||
* :doc:`cosine/squared (o) <angle_cosine_squared>`
|
* :doc:`cosine/squared (o) <angle_cosine_squared>`
|
||||||
|
* :doc:`cosine/squared/restricted (o) <angle_cosine_squared_restricted>`
|
||||||
* :doc:`cross <angle_cross>`
|
* :doc:`cross <angle_cross>`
|
||||||
* :doc:`dipole (o) <angle_dipole>`
|
* :doc:`dipole (o) <angle_dipole>`
|
||||||
* :doc:`fourier (o) <angle_fourier>`
|
* :doc:`fourier (o) <angle_fourier>`
|
||||||
@ -125,9 +126,10 @@ OPT.
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* :doc:`charmm (iko) <dihedral_charmm>`
|
* :doc:`charmm (iko) <dihedral_charmm>`
|
||||||
* :doc:`charmmfsw <dihedral_charmm>`
|
* :doc:`charmmfsw (k) <dihedral_charmm>`
|
||||||
* :doc:`class2 (ko) <dihedral_class2>`
|
* :doc:`class2 (ko) <dihedral_class2>`
|
||||||
* :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>`
|
* :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>`
|
||||||
|
* :doc:`cosine/squared/restricted <dihedral_cosine_squared_restricted>`
|
||||||
* :doc:`fourier (io) <dihedral_fourier>`
|
* :doc:`fourier (io) <dihedral_fourier>`
|
||||||
* :doc:`harmonic (iko) <dihedral_harmonic>`
|
* :doc:`harmonic (iko) <dihedral_harmonic>`
|
||||||
* :doc:`helix (o) <dihedral_helix>`
|
* :doc:`helix (o) <dihedral_helix>`
|
||||||
|
|||||||
@ -61,6 +61,7 @@ OPT.
|
|||||||
* :doc:`controller <fix_controller>`
|
* :doc:`controller <fix_controller>`
|
||||||
* :doc:`damping/cundall <fix_damping_cundall>`
|
* :doc:`damping/cundall <fix_damping_cundall>`
|
||||||
* :doc:`deform (k) <fix_deform>`
|
* :doc:`deform (k) <fix_deform>`
|
||||||
|
* :doc:`deform/pressure <fix_deform_pressure>`
|
||||||
* :doc:`deposit <fix_deposit>`
|
* :doc:`deposit <fix_deposit>`
|
||||||
* :doc:`dpd/energy (k) <fix_dpd_energy>`
|
* :doc:`dpd/energy (k) <fix_dpd_energy>`
|
||||||
* :doc:`drag <fix_drag>`
|
* :doc:`drag <fix_drag>`
|
||||||
@ -267,6 +268,7 @@ OPT.
|
|||||||
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
|
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
|
||||||
* :doc:`wall/colloid <fix_wall>`
|
* :doc:`wall/colloid <fix_wall>`
|
||||||
* :doc:`wall/ees <fix_wall_ees>`
|
* :doc:`wall/ees <fix_wall_ees>`
|
||||||
|
* :doc:`wall/flow (k) <fix_wall_flow>`
|
||||||
* :doc:`wall/gran (k) <fix_wall_gran>`
|
* :doc:`wall/gran (k) <fix_wall_gran>`
|
||||||
* :doc:`wall/gran/region <fix_wall_gran_region>`
|
* :doc:`wall/gran/region <fix_wall_gran_region>`
|
||||||
* :doc:`wall/harmonic <fix_wall>`
|
* :doc:`wall/harmonic <fix_wall>`
|
||||||
|
|||||||
@ -25,16 +25,16 @@ OPT.
|
|||||||
|
|
||||||
* :doc:`none <pair_none>`
|
* :doc:`none <pair_none>`
|
||||||
* :doc:`zero <pair_zero>`
|
* :doc:`zero <pair_zero>`
|
||||||
* :doc:`hybrid (k) <pair_hybrid>`
|
* :doc:`hybrid (ko) <pair_hybrid>`
|
||||||
* :doc:`hybrid/overlay (k) <pair_hybrid>`
|
* :doc:`hybrid/molecular (o) <pair_hybrid>`
|
||||||
* :doc:`hybrid/scaled <pair_hybrid>`
|
* :doc:`hybrid/overlay (ko) <pair_hybrid>`
|
||||||
|
* :doc:`hybrid/scaled (o) <pair_hybrid>`
|
||||||
* :doc:`kim <pair_kim>`
|
* :doc:`kim <pair_kim>`
|
||||||
* :doc:`list <pair_list>`
|
* :doc:`list <pair_list>`
|
||||||
* :doc:`tracker <pair_tracker>`
|
* :doc:`tracker <pair_tracker>`
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* :doc:`adp (ko) <pair_adp>`
|
* :doc:`adp (ko) <pair_adp>`
|
||||||
* :doc:`agni (o) <pair_agni>`
|
* :doc:`agni (o) <pair_agni>`
|
||||||
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
||||||
@ -94,9 +94,10 @@ OPT.
|
|||||||
* :doc:`coul/wolf (ko) <pair_coul>`
|
* :doc:`coul/wolf (ko) <pair_coul>`
|
||||||
* :doc:`coul/wolf/cs <pair_cs>`
|
* :doc:`coul/wolf/cs <pair_cs>`
|
||||||
* :doc:`dpd (giko) <pair_dpd>`
|
* :doc:`dpd (giko) <pair_dpd>`
|
||||||
* :doc:`dpd/fdt <pair_dpd_fdt>`
|
* :doc:`dpd/coul/slater/long (g) <pair_dpd_coul_slater_long>`
|
||||||
* :doc:`dpd/ext (ko) <pair_dpd_ext>`
|
* :doc:`dpd/ext (ko) <pair_dpd_ext>`
|
||||||
* :doc:`dpd/ext/tstat (ko) <pair_dpd_ext>`
|
* :doc:`dpd/ext/tstat (ko) <pair_dpd_ext>`
|
||||||
|
* :doc:`dpd/fdt <pair_dpd_fdt>`
|
||||||
* :doc:`dpd/fdt/energy (k) <pair_dpd_fdt>`
|
* :doc:`dpd/fdt/energy (k) <pair_dpd_fdt>`
|
||||||
* :doc:`dpd/tstat (gko) <pair_dpd>`
|
* :doc:`dpd/tstat (gko) <pair_dpd>`
|
||||||
* :doc:`dsmc <pair_dsmc>`
|
* :doc:`dsmc <pair_dsmc>`
|
||||||
@ -146,7 +147,7 @@ OPT.
|
|||||||
* :doc:`lj/charmm/coul/long/soft (o) <pair_fep_soft>`
|
* :doc:`lj/charmm/coul/long/soft (o) <pair_fep_soft>`
|
||||||
* :doc:`lj/charmm/coul/msm (o) <pair_charmm>`
|
* :doc:`lj/charmm/coul/msm (o) <pair_charmm>`
|
||||||
* :doc:`lj/charmmfsw/coul/charmmfsh <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 (gko) <pair_class2>`
|
||||||
* :doc:`lj/class2/coul/cut (ko) <pair_class2>`
|
* :doc:`lj/class2/coul/cut (ko) <pair_class2>`
|
||||||
* :doc:`lj/class2/coul/cut/soft <pair_fep_soft>`
|
* :doc:`lj/class2/coul/cut/soft <pair_fep_soft>`
|
||||||
@ -245,6 +246,7 @@ OPT.
|
|||||||
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
|
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
|
||||||
* :doc:`pace (k) <pair_pace>`
|
* :doc:`pace (k) <pair_pace>`
|
||||||
* :doc:`pace/extrapolation (k) <pair_pace>`
|
* :doc:`pace/extrapolation (k) <pair_pace>`
|
||||||
|
* :doc:`pedone (o) <pair_pedone>`
|
||||||
* :doc:`pod <pair_pod>`
|
* :doc:`pod <pair_pod>`
|
||||||
* :doc:`peri/eps <pair_peri>`
|
* :doc:`peri/eps <pair_peri>`
|
||||||
* :doc:`peri/lps (o) <pair_peri>`
|
* :doc:`peri/lps (o) <pair_peri>`
|
||||||
@ -256,6 +258,7 @@ OPT.
|
|||||||
* :doc:`rann <pair_rann>`
|
* :doc:`rann <pair_rann>`
|
||||||
* :doc:`reaxff (ko) <pair_reaxff>`
|
* :doc:`reaxff (ko) <pair_reaxff>`
|
||||||
* :doc:`rebo (io) <pair_airebo>`
|
* :doc:`rebo (io) <pair_airebo>`
|
||||||
|
* :doc:`rebomos (o) <pair_rebomos>`
|
||||||
* :doc:`resquared (go) <pair_resquared>`
|
* :doc:`resquared (go) <pair_resquared>`
|
||||||
* :doc:`rheo <pair_rheo>`
|
* :doc:`rheo <pair_rheo>`
|
||||||
* :doc:`rheo/solid <pair_rheo_solid>`
|
* :doc:`rheo/solid <pair_rheo_solid>`
|
||||||
@ -269,7 +272,7 @@ OPT.
|
|||||||
* :doc:`smd/ulsph <pair_smd_ulsph>`
|
* :doc:`smd/ulsph <pair_smd_ulsph>`
|
||||||
* :doc:`smtbq <pair_smtbq>`
|
* :doc:`smtbq <pair_smtbq>`
|
||||||
* :doc:`snap (ik) <pair_snap>`
|
* :doc:`snap (ik) <pair_snap>`
|
||||||
* :doc:`soft (go) <pair_soft>`
|
* :doc:`soft (gko) <pair_soft>`
|
||||||
* :doc:`sph/heatconduction (g) <pair_sph_heatconduction>`
|
* :doc:`sph/heatconduction (g) <pair_sph_heatconduction>`
|
||||||
* :doc:`sph/idealgas <pair_sph_idealgas>`
|
* :doc:`sph/idealgas <pair_sph_idealgas>`
|
||||||
* :doc:`sph/lj (g) <pair_sph_lj>`
|
* :doc:`sph/lj (g) <pair_sph_lj>`
|
||||||
@ -303,6 +306,7 @@ OPT.
|
|||||||
* :doc:`tip4p/long/soft (o) <pair_fep_soft>`
|
* :doc:`tip4p/long/soft (o) <pair_fep_soft>`
|
||||||
* :doc:`tri/lj <pair_tri_lj>`
|
* :doc:`tri/lj <pair_tri_lj>`
|
||||||
* :doc:`ufm (got) <pair_ufm>`
|
* :doc:`ufm (got) <pair_ufm>`
|
||||||
|
* :doc:`uf3 (k) <pair_uf3>`
|
||||||
* :doc:`vashishta (gko) <pair_vashishta>`
|
* :doc:`vashishta (gko) <pair_vashishta>`
|
||||||
* :doc:`vashishta/table (o) <pair_vashishta>`
|
* :doc:`vashishta/table (o) <pair_vashishta>`
|
||||||
* :doc:`wf/cut <pair_wf_cut>`
|
* :doc:`wf/cut <pair_wf_cut>`
|
||||||
|
|||||||
@ -129,7 +129,7 @@ USER-REAXC.
|
|||||||
USER-REAXC package
|
USER-REAXC package
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
.. deprecated:: TBD
|
.. deprecated:: 7Feb2024
|
||||||
|
|
||||||
The USER-REAXC package has been renamed to :ref:`REAXFF <PKG-REAXFF>`.
|
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
|
In the process also the pair style and related fixes were renamed to use
|
||||||
@ -148,6 +148,14 @@ performance characteristics on NVIDIA GPUs. Both, the KOKKOS
|
|||||||
and the :ref:`GPU package <PKG-GPU>` are maintained
|
and the :ref:`GPU package <PKG-GPU>` are maintained
|
||||||
and allow running LAMMPS with GPU acceleration.
|
and allow running LAMMPS with GPU acceleration.
|
||||||
|
|
||||||
|
i-PI tool
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. versionchanged:: TBD
|
||||||
|
|
||||||
|
The i-PI tool has been removed from the LAMMPS distribution. Instead,
|
||||||
|
instructions to install i-PI from PyPi via pip are provided.
|
||||||
|
|
||||||
restart2data tool
|
restart2data tool
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ Available topics in mostly chronological order are:
|
|||||||
- `Setting flags in the constructor`_
|
- `Setting flags in the constructor`_
|
||||||
- `Rename of pack/unpack_comm() to pack/unpack_forward_comm()`_
|
- `Rename of pack/unpack_comm() to pack/unpack_forward_comm()`_
|
||||||
- `Use ev_init() to initialize variables derived from eflag and vflag`_
|
- `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::numeric() functions instead of force->numeric()`_
|
||||||
- `Use utils::open_potential() function to open potential files`_
|
- `Use utils::open_potential() function to open potential files`_
|
||||||
- `Use symbolic Atom and AtomVec constants instead of numerical values`_
|
- `Use symbolic Atom and AtomVec constants instead of numerical values`_
|
||||||
@ -130,6 +131,41 @@ Not applying this change will not cause a compilation error, but
|
|||||||
can lead to inconsistent behavior and incorrect tallying of
|
can lead to inconsistent behavior and incorrect tallying of
|
||||||
energy or virial.
|
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()
|
Use utils::numeric() functions instead of force->numeric()
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -137,11 +173,12 @@ Use utils::numeric() functions instead of force->numeric()
|
|||||||
|
|
||||||
The "numeric()" conversion functions (including "inumeric()",
|
The "numeric()" conversion functions (including "inumeric()",
|
||||||
"bnumeric()", and "tnumeric()") have been moved from the Force class to
|
"bnumeric()", and "tnumeric()") have been moved from the Force class to
|
||||||
the utils namespace. Also they take an additional argument that selects
|
the :doc:`utils namespace <Developer_utils>`. Also they take an
|
||||||
whether the ``Error::all()`` or ``Error::one()`` function should be
|
additional argument that selects whether the ``Error::all()`` or
|
||||||
called in case of an error. The former should be used when *all* MPI
|
``Error::one()`` function should be called in case of an error. The
|
||||||
processes call the conversion function and the latter *must* be used
|
former should be used when *all* MPI processes call the conversion
|
||||||
when they are called from only one or a subset of the MPI processes.
|
function and the latter *must* be used when they are called from only
|
||||||
|
one or a subset of the MPI processes.
|
||||||
|
|
||||||
Old:
|
Old:
|
||||||
|
|
||||||
|
|||||||
@ -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
|
: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
|
:project: progguide
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|||||||
@ -13,15 +13,44 @@ discussions of such cases.
|
|||||||
Unknown identifier in data file
|
Unknown identifier in data file
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
This error happens when LAMMPS encounters a line of text in an unexpected format
|
This error happens when LAMMPS encounters a line of text with an
|
||||||
while reading a data file. This is most commonly cause by inconsistent header and
|
unexpected keyword while :doc:`reading a data file <read_data>`. This
|
||||||
section data. The header section informs LAMMPS how many entries or lines are expected in the
|
would be either header keywords or section header keywords. This is
|
||||||
various sections (like Atoms, Masses, Pair Coeffs, *etc.*\ ) of the data file.
|
most commonly due to a mistyped keyword or due to a keyword that is
|
||||||
If there is a mismatch, LAMMPS will either keep reading beyond the end of a section
|
inconsistent with the :doc:`atom style <atom_style>` used.
|
||||||
or stop reading before the section has ended.
|
|
||||||
|
|
||||||
Such a mismatch can happen unexpectedly when the first line of the data
|
The header section informs LAMMPS how many entries or lines are expected
|
||||||
is *not* a comment as required by the format. That would result in
|
in the various sections (like Atoms, Masses, Pair Coeffs, *etc.*\ ) of
|
||||||
LAMMPS expecting, for instance, 0 atoms because the "atoms" header line
|
the data file. If there is a mismatch, LAMMPS will either keep reading
|
||||||
is treated as a comment.
|
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
|
Fix poems cannot (yet) work with coupled bodies whose joints connect
|
||||||
the bodies in a tree structure.
|
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*
|
*Tried to convert a double to int, but input_double > INT_MAX*
|
||||||
Self-explanatory.
|
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
|
More than the maximum # of neighbors was found multiple times. This
|
||||||
was unexpected.
|
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*
|
*Use special bonds = 0,1,1 with bond style fene*
|
||||||
Most FENE models need this setting for the special_bonds command.
|
Most FENE models need this setting for the special_bonds command.
|
||||||
|
|
||||||
|
|||||||
@ -305,6 +305,8 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
|||||||
:ftype extract_setting: function
|
:ftype extract_setting: function
|
||||||
:f extract_global: :f:func:`extract_global`
|
:f extract_global: :f:func:`extract_global`
|
||||||
:ftype extract_global: function
|
:ftype extract_global: function
|
||||||
|
:f map_atom: :f:func:`map_atom`
|
||||||
|
:ftype map_atom: function
|
||||||
:f extract_atom: :f:func:`extract_atom`
|
:f extract_atom: :f:func:`extract_atom`
|
||||||
:ftype extract_atom: function
|
:ftype extract_atom: function
|
||||||
:f extract_compute: :f:func:`extract_compute`
|
:f extract_compute: :f:func:`extract_compute`
|
||||||
@ -315,6 +317,10 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
|||||||
:ftype extract_variable: function
|
:ftype extract_variable: function
|
||||||
:f set_variable: :f:subr:`set_variable`
|
:f set_variable: :f:subr:`set_variable`
|
||||||
:ftype set_variable: subroutine
|
: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`
|
:f gather_atoms: :f:subr:`gather_atoms`
|
||||||
:ftype gather_atoms: subroutine
|
:ftype gather_atoms: subroutine
|
||||||
:f gather_atoms_concat: :f:subr:`gather_atoms_concat`
|
:f gather_atoms_concat: :f:subr:`gather_atoms_concat`
|
||||||
@ -1251,8 +1257,8 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
|||||||
three elements of the global vector calculated by fix recenter into the
|
three elements of the global vector calculated by fix recenter into the
|
||||||
variables *dx*, *dy*, and *dz*, respectively.
|
variables *dx*, *dy*, and *dz*, respectively.
|
||||||
|
|
||||||
If asked for per-atom or local data, :f:func:`extract_compute` returns a
|
If asked for per-atom or local data, :f:func:`extract_fix` returns a
|
||||||
pointer to actual LAMMPS data. The pointer so returned will have the
|
pointer to actual LAMMPS data. The pointer returned will have the
|
||||||
appropriate size to match the internal data, and will be
|
appropriate size to match the internal data, and will be
|
||||||
type/kind/rank-checked at the time of the assignment. For example,
|
type/kind/rank-checked at the time of the assignment. For example,
|
||||||
|
|
||||||
@ -1398,7 +1404,28 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
|||||||
|
|
||||||
Set the value of a string-style variable.
|
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
|
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 *name*\ . If *name* does not exist or is not a string-style
|
||||||
@ -1406,7 +1433,23 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
|||||||
|
|
||||||
:p character(len=*) name: name of the variable
|
:p character(len=*) name: name of the variable
|
||||||
:p character(len=*) str: new value to assign to 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>`
|
A 2d simulation box must be periodic in z as set by the :doc:`boundary
|
||||||
command. This is the default.
|
<boundary>` command. This is the default.
|
||||||
|
|
||||||
If using the :doc:`create_box <create_box>` command to define a
|
Simulation boxes in LAMMPS can be either orthogonal or triclinic in
|
||||||
simulation box, set the z dimensions narrow, but finite, so that the
|
shape. Orthogonal boxes in 2d are a rectangle with 4 edges that are
|
||||||
:doc:`create_atoms <create_atoms>` command will fill the 3d simulation
|
each perpendicular to either the x or y coordinate axes. Triclinic
|
||||||
box with a single z plane of atoms - e.g.
|
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
|
.. 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
|
# 2d restricted triclinic box using a prism-style region with only xy tilt
|
||||||
atom coordinates, set the "zlo zhi" values to be finite but narrow,
|
region mybox prism 0 10 0 10 -0.5 0.5 2.0 0.0 0.0
|
||||||
similar to the create_box command settings just described. For each
|
create_box 1 mybox
|
||||||
atom in the file, assign a z coordinate so it falls inside the
|
|
||||||
z-boundaries of the box - e.g. 0.0.
|
|
||||||
|
|
||||||
Use the :doc:`fix enforce2d <fix_enforce2d>` command as the last
|
# 2d general triclinic box using a primitive cell for a 2d hex lattice
|
||||||
defined fix to ensure that the z-components of velocities and forces
|
lattice custom 1.0 a1 1.0 0.0 0.0 a2 0.5 0.86602540378 0.0 &
|
||||||
are zeroed out every timestep. The reason to make it the last fix is
|
a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 triclinic/general
|
||||||
so that any forces induced by other fixes will be zeroed out.
|
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.
|
are for 2d models.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Some models in LAMMPS treat particles as finite-size spheres, as
|
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>`
|
opposed to point particles. See the :doc:`atom_style sphere
|
||||||
commands for details. By default, for 2d simulations, such particles
|
<atom_style>` and :doc:`fix nve/sphere <fix_nve_sphere>` commands
|
||||||
will still be modeled as 3d spheres, not 2d discs (circles), meaning
|
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
|
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
|
model them as 2d discs, see the :doc:`set density/disc <set>`
|
||||||
and the *disc* option for the :doc:`fix nve/sphere <fix_nve_sphere>`,
|
command and the *disc* option for the :doc:`fix nve/sphere
|
||||||
:doc:`fix nvt/sphere <fix_nvt_sphere>`, :doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix npt/sphere <fix_npt_sphere>`
|
<fix_nve_sphere>`, :doc:`fix nvt/sphere <fix_nvt_sphere>`,
|
||||||
commands.
|
: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 |
|
| :doc:`dump image <dump_image>` | output body particle attributes as an image |
|
||||||
+------------------------------------------------+-----------------------------------------------------+
|
+------------------------------------------------+-----------------------------------------------------+
|
||||||
|
|
||||||
The pair styles defined for use with specific body styles are listed
|
The pair styles currently defined for use with specific body styles
|
||||||
in the sections below.
|
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
|
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
|
simulation box XYZ axes, not with respect to the principal axes of the
|
||||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||||
|
|
||||||
The coordinates of each sub-particle are specified as its x,y,z
|
The coordinates of each sub-particle are specified as its x,y,z
|
||||||
displacement from the center-of-mass of the body particle. The
|
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
|
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
|
values in the *Atoms* section of the data file, as is the total mass
|
||||||
of the body particle.
|
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
|
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.
|
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
|
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
|
simulation box XYZ axes, not with respect to the principal axes of the
|
||||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||||
|
|
||||||
The coordinates of each vertex are specified as its x,y,z displacement
|
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
|
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
|
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
|
0 0 0
|
||||||
3.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>`
|
The :doc:`pair_style body/rounded/polygon <pair_body_rounded_polygon>`
|
||||||
command can be used with this body style to compute body/body
|
command can be used with this body style to compute body/body
|
||||||
interactions. The :doc:`fix wall/body/polygon <fix_wall_body_polygon>`
|
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
|
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
|
simulation box XYZ axes, not with respect to the principal axes of the
|
||||||
rigid body itself. LAMMPS performs the latter calculation internally.
|
rigid body itself. LAMMPS performs the latter calculation internally.
|
||||||
|
|
||||||
The coordinates of each vertex are specified as its x,y,z displacement
|
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
|
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
|
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,
|
The number of edges and faces for a rod or sphere must be listed,
|
||||||
but is ignored.
|
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
|
The :doc:`pair_style body/rounded/polhedron
|
||||||
<pair_body_rounded_polyhedron>` command can be used with this body
|
<pair_body_rounded_polyhedron>` command can be used with this body
|
||||||
style to compute body/body interactions. The :doc:`fix
|
style to compute body/body interactions. The :doc:`fix
|
||||||
|
|||||||
@ -15,7 +15,8 @@ orientation for rotational models. This produces a stress-free initial
|
|||||||
state. Furthermore, bonds are allowed to break under large strains,
|
state. Furthermore, bonds are allowed to break under large strains,
|
||||||
producing fracture. The examples/bpm directory has sample input scripts
|
producing fracture. The examples/bpm directory has sample input scripts
|
||||||
for simulations of the fragmentation of an impacted plate and the
|
for simulations of the fragmentation of an impacted plate and the
|
||||||
pouring of extended, elastic bodies.
|
pouring of extended, elastic bodies. See :ref:`(Clemmer) <howto-Clemmer>`
|
||||||
|
for more general information on the approach and the LAMMPS implementation.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -150,3 +151,9 @@ the following are currently compatible with BPM bond styles:
|
|||||||
interactions, one will need to switch between different *special_bonds*
|
interactions, one will need to switch between different *special_bonds*
|
||||||
settings in the input script. An example is found in
|
settings in the input script. An example is found in
|
||||||
``examples/bpm/impact``.
|
``examples/bpm/impact``.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. _howto-Clemmer:
|
||||||
|
|
||||||
|
**(Clemmer)** Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024).
|
||||||
|
|||||||
@ -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``
|
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
||||||
* - ``FFT``
|
* - ``FFT``
|
||||||
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
- 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``
|
* - ``FFT_SINGLE``
|
||||||
- select whether to use single precision FFTs (default: ``off``)
|
- select whether to use single precision FFTs (default: ``off``)
|
||||||
* - ``WITH_JPEG``
|
* - ``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
|
To model heat conduction, one must add the temperature and heatflow
|
||||||
atom variables with:
|
atom variables with:
|
||||||
|
|
||||||
* :doc:`fix property/atom <fix_property_atom>`
|
* :doc:`fix property/atom <fix_property_atom>`
|
||||||
|
|
||||||
a temperature integration fix
|
a temperature integration fix
|
||||||
|
|
||||||
* :doc:`fix heat/flow <fix_heat_flow>`
|
* :doc:`fix heat/flow <fix_heat_flow>`
|
||||||
|
|
||||||
and a heat conduction option defined in both
|
and a heat conduction option defined in both
|
||||||
|
|
||||||
* :doc:`pair_style granular <pair_granular>`
|
* :doc:`pair_style granular <pair_granular>`
|
||||||
* :doc:`fix wall/gran <fix_wall_gran>`
|
* :doc:`fix wall/gran <fix_wall_gran>`
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,8 @@ JSON
|
|||||||
"ke": 2.4962152903997174569
|
"ke": 2.4962152903997174569
|
||||||
}
|
}
|
||||||
|
|
||||||
YAML format thermo_style output
|
YAML format thermo_style or dump_style output
|
||||||
===============================
|
=============================================
|
||||||
|
|
||||||
Extracting data from log file
|
Extracting data from log file
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -112,6 +112,9 @@ of that run:
|
|||||||
Number of runs: 2
|
Number of runs: 2
|
||||||
TotEng = -4.62140097780047
|
TotEng = -4.62140097780047
|
||||||
|
|
||||||
|
Extracting data from dump file
|
||||||
|
------------------------------
|
||||||
|
|
||||||
.. versionadded:: 4May2022
|
.. versionadded:: 4May2022
|
||||||
|
|
||||||
YAML format output has been added to multiple commands in LAMMPS,
|
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
|
By default, LAMMPS uses an orthogonal simulation box to encompass the
|
||||||
particles. The :doc:`boundary <boundary>` command sets the boundary
|
particles. The orthogonal box has its "origin" at (xlo,ylo,zlo) and
|
||||||
conditions of the box (periodic, non-periodic, etc). The orthogonal
|
extends to (xhi,yhi,zhi). Conceptually it is defined by 3 edge
|
||||||
box has its "origin" at (xlo,ylo,zlo) and is defined by 3 edge vectors
|
vectors starting from the origin given by **A** = (xhi-xlo,0,0); **B**
|
||||||
starting from the origin given by **a** = (xhi-xlo,0,0); **b** =
|
= (0,yhi-ylo,0); **C** = (0,0,zhi-zlo). The :doc:`boundary
|
||||||
(0,yhi-ylo,0); **c** = (0,0,zhi-zlo). The 6 parameters
|
<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
|
(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
|
is created by one of these commands:
|
||||||
: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.
|
|
||||||
|
|
||||||
LAMMPS also allows simulations to be performed in triclinic
|
* :doc:`create_box <create_box>`
|
||||||
(non-orthogonal) simulation boxes shaped as a parallelepiped with
|
* :doc:`read_data <read_data>`
|
||||||
triclinic symmetry. The parallelepiped has its "origin" at
|
* :doc:`read_restart <read_restart>`
|
||||||
(xlo,ylo,zlo) and is defined by 3 edge vectors starting from the
|
* :doc:`read_dump <read_dump>`
|
||||||
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.
|
|
||||||
|
|
||||||
For example, assume that the 3 vectors **A**,\ **B**,\ **C** are the edge
|
Internally, LAMMPS defines box size parameters lx,ly,lz where lx =
|
||||||
vectors of a general parallelepiped, where there is no restriction on
|
xhi-xlo, and similarly in the y and z dimensions. The 6 parameters, as
|
||||||
**A**,\ **B**,\ **C** other than they form a complete right-handed basis i.e.
|
well as lx,ly,lz, can be output via the :doc:`thermo_style custom
|
||||||
**A** x **B** . **C** > 0. The equivalent LAMMPS **a**,\ **b**,\ **c** are a linear
|
<thermo_style>` command. See the :doc:`Howto 2d <Howto_2d>` doc page
|
||||||
rotation of **A**, **B**, and **C** and can be computed as follows:
|
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::
|
.. 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_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}
|
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 (\^)
|
where A = \| **A** \| indicates the scalar length of **A**\ . The hat
|
||||||
indicates the corresponding unit vector. :math:`\beta` and :math:`\gamma` are angles
|
symbol (\^) indicates the corresponding unit vector. :math:`\beta` and
|
||||||
between the vectors described below. Note that by construction,
|
:math:`\gamma` are angles between the **A**, **B**, **C** vectors
|
||||||
**a**, **b**, and **c** have strictly positive x, y, and z components, respectively.
|
as described below.
|
||||||
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.
|
|
||||||
|
|
||||||
For consistency, the same rotation/inversion applied to the basis vectors
|
For consistency, the same rotation applied to the triclinic box edge
|
||||||
must also be applied to atom positions, velocities,
|
vectors can also be applied to atom positions, velocities, and other
|
||||||
and any other vector quantities.
|
vector quantities. This can be conveniently achieved by first
|
||||||
This can be conveniently achieved by first converting to
|
converting to fractional coordinates in the general triclinic
|
||||||
fractional coordinates in the
|
coordinates and then converting to coordinates in the restricted
|
||||||
old basis and then converting to distance coordinates in the new basis.
|
triclinic basis. The transformation is given by the following equation:
|
||||||
The transformation is given by the following equation:
|
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
@ -82,87 +228,24 @@ The transformation is given by the following equation:
|
|||||||
\mathbf{A \times B}
|
\mathbf{A \times B}
|
||||||
\end{pmatrix} \cdot \mathbf{X}
|
\end{pmatrix} \cdot \mathbf{X}
|
||||||
|
|
||||||
where *V* is the volume of the box, **X** is the original vector quantity and
|
where *V* is the volume of the box (same in either basis), **X** is
|
||||||
**x** is the vector in the LAMMPS basis.
|
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
|
Crystallographic general triclinic representation of a simulation box
|
||||||
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.
|
|
||||||
|
|
||||||
Note that you can define a triclinic box with all 3 tilt factors =
|
General triclinic crystal structures are often defined using three
|
||||||
0.0, so that it is initially orthogonal. This is necessary if the box
|
lattice constants *a*, *b*, and *c*, and three angles :math:`\alpha`,
|
||||||
will become non-orthogonal, e.g. due to the :doc:`fix npt <fix_nh>` or
|
:math:`\beta`, and :math:`\gamma`. Note that in this nomenclature, the
|
||||||
:doc:`fix deform <fix_deform>` commands. Alternatively, you can use the
|
a, b, and c lattice constants are the scalar lengths of the edge
|
||||||
: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
|
|
||||||
vectors **a**, **b**, and **c** defined above. The relationship
|
vectors **a**, **b**, and **c** defined above. The relationship
|
||||||
between these 6 quantities (a, b, c, :math:`\alpha`, :math:`\beta`,
|
between these 6 quantities (a, b, c, :math:`\alpha`, :math:`\beta`,
|
||||||
:math:`\gamma`) and the LAMMPS box sizes (lx,ly,lz) =
|
:math:`\gamma`) and the LAMMPS restricted triclinic box sizes
|
||||||
(xhi-xlo,yhi-ylo,zhi-zlo) and tilt factors (xy,xz,yz) is as follows:
|
(lx,ly,lz) = (xhi-xlo,yhi-ylo,zhi-zlo) and tilt factors (xy,xz,yz) is
|
||||||
|
as follows:
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
@ -186,15 +269,19 @@ The inverse relationship can be written as follows:
|
|||||||
|
|
||||||
The values of *a*, *b*, *c*, :math:`\alpha` , :math:`\beta`, and
|
The values of *a*, *b*, *c*, :math:`\alpha` , :math:`\beta`, and
|
||||||
:math:`\gamma` can be printed out or accessed by computes using the
|
:math:`\gamma` can be printed out or accessed by computes using the
|
||||||
:doc:`thermo_style custom <thermo_style>` keywords
|
:doc:`thermo_style custom <thermo_style>` keywords *cella*, *cellb*,
|
||||||
*cella*, *cellb*, *cellc*, *cellalpha*, *cellbeta*, *cellgamma*,
|
*cellc*, *cellalpha*, *cellbeta*, *cellgamma*, respectively.
|
||||||
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
|
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,
|
BOUNDS for a snapshot is written to a dump file for a restricted
|
||||||
an orthogonal bounding box which encloses the triclinic simulation box
|
triclinic box, an orthogonal bounding box which encloses the triclinic
|
||||||
is output, along with the 3 tilt factors (xy, xz, yz) of the triclinic
|
simulation box is output, along with the 3 tilt factors (xy, xz, yz) of
|
||||||
box, formatted as follows:
|
the restricted triclinic box, formatted as follows:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
@ -204,7 +291,7 @@ box, formatted as follows:
|
|||||||
zlo_bound zhi_bound yz
|
zlo_bound zhi_bound yz
|
||||||
|
|
||||||
This bounding box is convenient for many visualization programs and is
|
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:
|
(xlo,xhi,ylo,yhi,zlo,zhi,xy,xz,yz) as follows:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
@ -217,22 +304,66 @@ calculated from the 9 triclinic box parameters
|
|||||||
zhi_bound = zhi
|
zhi_bound = zhi
|
||||||
|
|
||||||
These formulas can be inverted if you need to convert the bounding box
|
These formulas can be inverted if you need to convert the bounding box
|
||||||
back into the triclinic box parameters, e.g. xlo = xlo_bound -
|
back into the restricted triclinic box parameters, e.g. xlo =
|
||||||
MIN(0.0,xy,xz,xy+xz).
|
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
|
Periodicity and tilt factors for triclinic simulation boxes
|
||||||
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
|
There is no requirement that a triclinic box be periodic in any
|
||||||
material. The :doc:`fix deform <fix_deform>` command can be used for
|
dimension, though it typically should be in y or z if you wish to
|
||||||
this purpose. It allows dynamic control of the xy, xz, yz tilt
|
enforce a shift in coordinates due to periodic boundary conditions
|
||||||
factors as a simulation runs. This is discussed in the next section
|
across the y or z boundaries. See the doc page for the :doc:`boundary
|
||||||
on non-equilibrium MD (NEMD) simulations.
|
<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
|
Ntypes for each interaction is "locked in" when the simulation box
|
||||||
is created.
|
is created.
|
||||||
|
|
||||||
A recent addition to LAMMPS is the option to use strings - referred
|
A recent addition to LAMMPS is the option to use strings - referred to
|
||||||
to as type labels - as an alternative. Using type labels instead of
|
as type labels - as an alternative. Using type labels instead of
|
||||||
numeric types can be advantageous in various scenarios. For example,
|
numeric types can be advantageous in various scenarios. For example,
|
||||||
type labels can make inputs more readable and generic (i.e. usable through
|
type labels can make inputs more readable and generic (i.e. usable
|
||||||
the :doc:`include command <include>` for different systems with different
|
through the :doc:`include command <include>` for different systems with
|
||||||
numerical values assigned to types. This generality also applies to
|
different numerical values assigned to types. This generality also
|
||||||
other inputs like data files read by :doc:`read_data <read_data>` or
|
applies to other inputs like data files read by :doc:`read_data
|
||||||
molecule template files read by the :doc:`molecule <molecule>`
|
<read_data>` or molecule template files read by the :doc:`molecule
|
||||||
command. See below for a list of other commands that can use
|
<molecule>` command. A discussion of the current type label support can
|
||||||
type labels in different ways.
|
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
|
LAMMPS will *internally* continue to use numeric types, which means
|
||||||
that many previous restrictions still apply. For example, the total
|
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
|
for :doc:`fix bond/react <fix_bond_react>` is much simpler when using
|
||||||
type labels, and results in templates that can be used without
|
type labels, and results in templates that can be used without
|
||||||
modification in multiple simulations or different systems.
|
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>`_
|
- 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 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>`_
|
- 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
|
Home page
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|||||||
@ -29,7 +29,7 @@ General features
|
|||||||
* spatial decomposition of simulation domain for MPI parallelism
|
* spatial decomposition of simulation domain for MPI parallelism
|
||||||
* particle decomposition inside spatial decomposition for OpenMP and GPU parallelism
|
* particle decomposition inside spatial decomposition for OpenMP and GPU parallelism
|
||||||
* GPLv2 licensed open-source distribution
|
* 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
|
* modular code with most functionality in optional packages
|
||||||
* only depends on MPI library for basic parallel functionality, MPI stub for serial compilation
|
* only depends on MPI library for basic parallel functionality, MPI stub for serial compilation
|
||||||
* other libraries are optional and only required for specific packages
|
* 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
|
* 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
|
* 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
|
* 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
|
* 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
|
* 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>`
|
* 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_datatype`
|
||||||
- :cpp:func:`lammps_extract_variable`
|
- :cpp:func:`lammps_extract_variable`
|
||||||
- :cpp:func:`lammps_set_variable`
|
- :cpp:func:`lammps_set_variable`
|
||||||
|
- :cpp:func:`lammps_set_string_variable`
|
||||||
|
- :cpp:func:`lammps_set_internal_variable`
|
||||||
- :cpp:func:`lammps_variable_info`
|
- :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
|
.. doxygenfunction:: lammps_variable_info
|
||||||
:project: progguide
|
:project: progguide
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ This section documents the following functions:
|
|||||||
- :cpp:func:`lammps_extract_setting`
|
- :cpp:func:`lammps_extract_setting`
|
||||||
- :cpp:func:`lammps_extract_global_datatype`
|
- :cpp:func:`lammps_extract_global_datatype`
|
||||||
- :cpp:func:`lammps_extract_global`
|
- :cpp:func:`lammps_extract_global`
|
||||||
|
- :cpp:func:`lammps_map_atom`
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
@ -120,3 +121,8 @@ subdomains and processors.
|
|||||||
.. doxygenfunction:: lammps_extract_global
|
.. doxygenfunction:: lammps_extract_global
|
||||||
:project: progguide
|
:project: progguide
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
.. doxygenfunction:: lammps_map_atom
|
||||||
|
: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
|
line, they will modify the flagged files to try to remove the detected
|
||||||
issues.
|
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)
|
Placement of braces (strongly preferred)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,7 @@ page gives those details.
|
|||||||
* :ref:`DRUDE <PKG-DRUDE>`
|
* :ref:`DRUDE <PKG-DRUDE>`
|
||||||
* :ref:`EFF <PKG-EFF>`
|
* :ref:`EFF <PKG-EFF>`
|
||||||
* :ref:`ELECTRODE <PKG-ELECTRODE>`
|
* :ref:`ELECTRODE <PKG-ELECTRODE>`
|
||||||
|
* :ref:`EXTRA-COMMAND <PKG-EXTRA-COMMAND>`
|
||||||
* :ref:`EXTRA-COMPUTE <PKG-EXTRA-COMPUTE>`
|
* :ref:`EXTRA-COMPUTE <PKG-EXTRA-COMPUTE>`
|
||||||
* :ref:`EXTRA-DUMP <PKG-EXTRA-DUMP>`
|
* :ref:`EXTRA-DUMP <PKG-EXTRA-DUMP>`
|
||||||
* :ref:`EXTRA-FIX <PKG-EXTRA-FIX>`
|
* :ref:`EXTRA-FIX <PKG-EXTRA-FIX>`
|
||||||
@ -84,6 +85,7 @@ page gives those details.
|
|||||||
* :ref:`ML-QUIP <PKG-ML-QUIP>`
|
* :ref:`ML-QUIP <PKG-ML-QUIP>`
|
||||||
* :ref:`ML-RANN <PKG-ML-RANN>`
|
* :ref:`ML-RANN <PKG-ML-RANN>`
|
||||||
* :ref:`ML-SNAP <PKG-ML-SNAP>`
|
* :ref:`ML-SNAP <PKG-ML-SNAP>`
|
||||||
|
* :ref:`ML-UF3 <PKG-ML-UF3>`
|
||||||
* :ref:`MOFFF <PKG-MOFFF>`
|
* :ref:`MOFFF <PKG-MOFFF>`
|
||||||
* :ref:`MOLECULE <PKG-MOLECULE>`
|
* :ref:`MOLECULE <PKG-MOLECULE>`
|
||||||
* :ref:`MOLFILE <PKG-MOLFILE>`
|
* :ref:`MOLFILE <PKG-MOLFILE>`
|
||||||
@ -404,6 +406,7 @@ and :ref:`ASPHERE <PKG-ASPHERE>` packages are installed.
|
|||||||
* :doc:`bond_style oxdna2/\* <bond_oxdna>`
|
* :doc:`bond_style oxdna2/\* <bond_oxdna>`
|
||||||
* :doc:`bond_style oxrna2/\* <bond_oxdna>`
|
* :doc:`bond_style oxrna2/\* <bond_oxdna>`
|
||||||
* :doc:`fix nve/dotc/langevin <fix_nve_dotc_langevin>`
|
* :doc:`fix nve/dotc/langevin <fix_nve_dotc_langevin>`
|
||||||
|
* examples/PACKAGES/cgdna
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -677,7 +680,12 @@ DPD-BASIC package
|
|||||||
Pair styles for the basic dissipative particle dynamics (DPD) method
|
Pair styles for the basic dissipative particle dynamics (DPD) method
|
||||||
and DPD thermostatting.
|
and DPD thermostatting.
|
||||||
|
|
||||||
**Author:** Kurt Smith (U Pittsburgh), Martin Svoboda, Martin Lisal (ICPF and UJEP)
|
Pair style :doc:`dpd/coul/slater/long <pair_dpd_coul_slater_long>` also
|
||||||
|
includes smeared charges for coulomb interactions and thus requires the
|
||||||
|
:ref:`KSPACE <PKG-KSPACE>` package to be installed to handle the long-range
|
||||||
|
Coulomb part of the interactions.
|
||||||
|
|
||||||
|
**Authors:** Kurt Smith (U Pittsburgh), Martin Svoboda, Martin Lisal (ICPF and UJEP), Eddy Barraud (IFPEN)
|
||||||
|
|
||||||
**Supporting info:**
|
**Supporting info:**
|
||||||
|
|
||||||
@ -686,6 +694,7 @@ and DPD thermostatting.
|
|||||||
* :doc:`pair_style dpd/tstat <pair_dpd>`
|
* :doc:`pair_style dpd/tstat <pair_dpd>`
|
||||||
* :doc:`pair_style dpd/ext <pair_dpd_ext>`
|
* :doc:`pair_style dpd/ext <pair_dpd_ext>`
|
||||||
* :doc:`pair_style dpd/ext/tstat <pair_dpd_ext>`
|
* :doc:`pair_style dpd/ext/tstat <pair_dpd_ext>`
|
||||||
|
* :doc:`pair_style dpd/coul/slater/long <pair_dpd_coul_slater_long>`
|
||||||
* examples/PACKAGES/dpd-basic
|
* examples/PACKAGES/dpd-basic
|
||||||
|
|
||||||
----------
|
----------
|
||||||
@ -887,6 +896,22 @@ This package has :ref:`specific installation instructions <electrode>` on the
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. _PKG-EXTRA-COMMAND:
|
||||||
|
|
||||||
|
EXTRA-COMMAND package
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
**Contents:**
|
||||||
|
|
||||||
|
Additional command styles that are less commonly used.
|
||||||
|
|
||||||
|
**Supporting info:**
|
||||||
|
|
||||||
|
* src/EXTRA-COMMAND: filenames -> commands
|
||||||
|
* :doc:`general commands <Commands_all>`
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
.. _PKG-EXTRA-COMPUTE:
|
.. _PKG-EXTRA-COMPUTE:
|
||||||
|
|
||||||
EXTRA-COMPUTE package
|
EXTRA-COMPUTE package
|
||||||
@ -1926,6 +1951,31 @@ computes which analyze attributes of the potential.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. _PKG-ML-UF3:
|
||||||
|
|
||||||
|
ML-UF3 package
|
||||||
|
--------------
|
||||||
|
|
||||||
|
**Contents:**
|
||||||
|
|
||||||
|
A pair style for the ultra-fast force field potentials (UF3). UF3 is a
|
||||||
|
methodology for deriving a highly accurate classical potential which is
|
||||||
|
fast to evaluate and is fitted to a large archives of quantum mechanical
|
||||||
|
(DFT) data. The use of b-spline basis set in UF3 enables the rapid
|
||||||
|
evaluation of 2-body and 3-body interactions.
|
||||||
|
|
||||||
|
**Authors:** Ajinkya C Hire (University of Florida),
|
||||||
|
Hendrik Krass (University of Constance),
|
||||||
|
Matthias Rupp (Luxembourg Institute of Science and Technology),
|
||||||
|
Richard Hennig (University of Florida)
|
||||||
|
|
||||||
|
**Supporting info:**
|
||||||
|
|
||||||
|
* src/ML-UF3: filenames -> commands
|
||||||
|
* :doc:`pair_style uf3 <pair_uf3>`
|
||||||
|
* examples/uf3
|
||||||
|
* https://github.com/uf3/uf3
|
||||||
|
|
||||||
.. _PKG-MOFFF:
|
.. _PKG-MOFFF:
|
||||||
|
|
||||||
MOFFF package
|
MOFFF package
|
||||||
|
|||||||
@ -158,6 +158,11 @@ whether an extra library is needed to build and use the package:
|
|||||||
- :doc:`fix electrode/conp <fix_electrode>`
|
- :doc:`fix electrode/conp <fix_electrode>`
|
||||||
- PACKAGES/electrode
|
- PACKAGES/electrode
|
||||||
- no
|
- no
|
||||||
|
* - :ref:`EXTRA-COMMAND <PKG-EXTRA-COMMAND>`
|
||||||
|
- additional command styles
|
||||||
|
- :doc:`general commands <Commands_all>`
|
||||||
|
- n/a
|
||||||
|
- no
|
||||||
* - :ref:`EXTRA-COMPUTE <PKG-EXTRA-COMPUTE>`
|
* - :ref:`EXTRA-COMPUTE <PKG-EXTRA-COMPUTE>`
|
||||||
- additional compute styles
|
- additional compute styles
|
||||||
- :doc:`compute <compute>`
|
- :doc:`compute <compute>`
|
||||||
@ -318,6 +323,11 @@ whether an extra library is needed to build and use the package:
|
|||||||
- :doc:`pair_style snap <pair_snap>`
|
- :doc:`pair_style snap <pair_snap>`
|
||||||
- snap
|
- snap
|
||||||
- no
|
- no
|
||||||
|
* - :ref:`ML-UF3 <PKG-ML-UF3>`
|
||||||
|
- quantum-fitted ultra fast potentials
|
||||||
|
- :doc:`pair_style uf3 <pair_uf3>`
|
||||||
|
- PACKAGES/uf3
|
||||||
|
- no
|
||||||
* - :ref:`MOFFF <PKG-MOFFF>`
|
* - :ref:`MOFFF <PKG-MOFFF>`
|
||||||
- styles for `MOF-FF <MOFplus_>`_ force field
|
- styles for `MOF-FF <MOFplus_>`_ force field
|
||||||
- :doc:`pair_style buck6d/coul/gauss <pair_buck6d_coul_gauss>`
|
- :doc:`pair_style buck6d/coul/gauss <pair_buck6d_coul_gauss>`
|
||||||
|
|||||||
@ -54,8 +54,21 @@ like this:
|
|||||||
x[3] = x coord of atom with ID 2
|
x[3] = x coord of atom with ID 2
|
||||||
...
|
...
|
||||||
x[n3-1] = z coord of atom with ID natoms
|
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
|
Alternatively, you can just change values in the vector returned by
|
||||||
the gather methods, since they are also ctypes vectors.
|
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
|
(Sandia). For more information on developing using Kokkos abstractions
|
||||||
see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
|
see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
|
||||||
|
|
||||||
Kokkos currently provides support for 4 modes of execution (per MPI
|
.. 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
|
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
|
||||||
(threading for many-core CPUs and Intel Phi), CUDA (for NVIDIA
|
(threading for many-core CPUs and Intel Phi), CUDA (for NVIDIA GPUs) and
|
||||||
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
HIP (for AMD GPUs). Additional modes (e.g. OpenMP target, Intel data
|
||||||
produce an executable compatible with a specific hardware.
|
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
|
.. admonition:: C++17 support
|
||||||
:class: note
|
:class: note
|
||||||
@ -54,22 +71,22 @@ produce an executable compatible with a specific hardware.
|
|||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
Kokkos with CUDA currently implicitly assumes that the MPI library is
|
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
|
pre-compiled MPI libraries provided by a Linux distribution. This is
|
||||||
not a problem when using only a single GPU with a single MPI
|
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
|
faults without GPU-aware MPI support. These can be avoided by adding
|
||||||
the flags :doc:`-pk kokkos gpu/aware off <Run_options>` to the
|
the flags :doc:`-pk kokkos gpu/aware off <Run_options>` to the
|
||||||
LAMMPS command line or by using the command :doc:`package kokkos
|
LAMMPS command line or by using the command :doc:`package kokkos
|
||||||
gpu/aware off <package>` in the input file.
|
gpu/aware off <package>` in the input file.
|
||||||
|
|
||||||
.. admonition:: AMD GPU support
|
.. admonition:: Intel Data Center GPU support
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
To build with Kokkos the HIPCC compiler from the AMD ROCm software
|
Support for Kokkos with Intel Data Center GPU accelerators (formerly
|
||||||
version 3.5 or later is required. Supporting this Kokkos mode in
|
known under the code name "Ponte Vecchio") in LAMMPS is still a work
|
||||||
LAMMPS is still work in progress. Please contact the LAMMPS developers
|
in progress. Only a subset of the functionality works correctly.
|
||||||
if you run into problems.
|
Please contact the LAMMPS developers if you run into problems.
|
||||||
|
|
||||||
Building LAMMPS with the KOKKOS package
|
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
|
settings. Experimenting with its options can provide a speed-up for
|
||||||
specific calculations. For example:
|
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::
|
.. note::
|
||||||
|
|
||||||
The default binsize for :doc:`atom sorting <atom_modify>` on GPUs
|
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
|
frequent sorting than default (e.g. sorting every 100 time steps
|
||||||
instead of 1000) may improve performance.
|
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::
|
.. 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
|
performance of a KOKKOS style is a bit slower than the OPENMP
|
||||||
package.
|
package.
|
||||||
* When running large number of atoms per GPU, KOKKOS is typically faster
|
* 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
|
of using single or mixed precision with the GPU package depends
|
||||||
significantly on the hardware in use and the simulated system and pair
|
significantly on the hardware in use and the simulated system and pair
|
||||||
style.
|
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
|
the INTEL package, which is optimized for x86 hardware (not just
|
||||||
from Intel) and compilation with the Intel compilers. The INTEL
|
from Intel) and compilation with the Intel compilers. The INTEL
|
||||||
package also can increase the vector length of vector instructions
|
package also can increase the vector length of vector instructions
|
||||||
by switching to single or mixed precision mode.
|
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
|
See the `Benchmark page <https://www.lammps.org/bench.html>`_ of the
|
||||||
LAMMPS website for performance of the KOKKOS package on different
|
LAMMPS website for performance of the KOKKOS package on different
|
||||||
|
|||||||
@ -90,7 +90,7 @@ Miscellaneous tools
|
|||||||
|
|
||||||
* :ref:`LAMMPS coding standards <coding_standard>`
|
* :ref:`LAMMPS coding standards <coding_standard>`
|
||||||
* :ref:`emacs <emacs>`
|
* :ref:`emacs <emacs>`
|
||||||
* :ref:`i-pi <ipi>`
|
* :ref:`i-PI <ipi>`
|
||||||
* :ref:`kate <kate>`
|
* :ref:`kate <kate>`
|
||||||
* :ref:`LAMMPS shell <lammps_shell>`
|
* :ref:`LAMMPS shell <lammps_shell>`
|
||||||
* :ref:`LAMMPS GUI <lammps_gui>`
|
* :ref:`LAMMPS GUI <lammps_gui>`
|
||||||
@ -376,21 +376,40 @@ See README file in the tools/fep directory.
|
|||||||
|
|
||||||
.. _ipi:
|
.. _ipi:
|
||||||
|
|
||||||
i-pi tool
|
i-PI tool
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
The tools/i-pi directory contains a version of the i-PI package, with
|
.. versionchanged:: TBD
|
||||||
all the LAMMPS-unrelated files removed. It is provided so that it can
|
|
||||||
be used with the :doc:`fix ipi <fix_ipi>` command to perform
|
The tools/i-pi directory used to contain a bundled version of the i-PI
|
||||||
path-integral molecular dynamics (PIMD).
|
software package for use with LAMMPS. This version, however, was
|
||||||
|
removed in 06/2024.
|
||||||
|
|
||||||
The i-PI package was created and is maintained by Michele Ceriotti,
|
The i-PI package was created and is maintained by Michele Ceriotti,
|
||||||
michele.ceriotti at gmail.com, to interface to a variety of molecular
|
michele.ceriotti at gmail.com, to interface to a variety of molecular
|
||||||
dynamics codes.
|
dynamics codes.
|
||||||
|
|
||||||
See the tools/i-pi/manual.pdf file for an overview of i-PI, and the
|
i-PI is now available via PyPi using the pip package manager at:
|
||||||
:doc:`fix ipi <fix_ipi>` page for further details on running PIMD
|
https://pypi.org/project/ipi/
|
||||||
calculations with LAMMPS.
|
|
||||||
|
Here are the commands to set up a virtual environment and install
|
||||||
|
i-PI into it with all its dependencies.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
python -m venv ipienv
|
||||||
|
source ipienv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install ipi
|
||||||
|
|
||||||
|
To install the development version from GitHub, please use:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
pip install git+https://github.com/i-pi/i-pi.git
|
||||||
|
|
||||||
|
For further information, please consult the [i-PI home
|
||||||
|
page](https://ipi-code.org).
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -709,8 +728,8 @@ CMake is required.
|
|||||||
The LAMMPS GUI has been successfully compiled and tested on:
|
The LAMMPS GUI has been successfully compiled and tested on:
|
||||||
|
|
||||||
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
|
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
|
||||||
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS
|
- Fedora Linux 40 x86\_64 using GCC 14 and Clang 17, Qt version 5.15LTS
|
||||||
- Fedora Linux 38 x86\_64 using GCC 13, Qt version 6.5LTS
|
- Fedora Linux 40 x86\_64 using GCC 14, Qt version 6.5LTS
|
||||||
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
|
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
|
||||||
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
|
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
|
||||||
- Windows 10 and 11 x86_64 with MinGW / GCC 10.0 cross-compiler on Fedora 38, Qt version 5.15LTS
|
- Windows 10 and 11 x86_64 with MinGW / GCC 10.0 cross-compiler on Fedora 38, Qt version 5.15LTS
|
||||||
@ -752,22 +771,23 @@ if necessary. When both, Qt5 and Qt6 are available, Qt6 will be preferred
|
|||||||
unless ``-D LAMMPS_GUI_USE_QT5=yes`` is set.
|
unless ``-D LAMMPS_GUI_USE_QT5=yes`` is set.
|
||||||
|
|
||||||
It should be possible to build the LAMMPS GUI as a standalone
|
It should be possible to build the LAMMPS GUI as a standalone
|
||||||
compilation (e.g. when LAMMPS has been compiled with traditional make),
|
compilation (e.g. when LAMMPS has been compiled with traditional make).
|
||||||
then the CMake configuration needs to be told where to find the LAMMPS
|
Then the CMake configuration needs to be told where to find the LAMMPS
|
||||||
headers and the LAMMPS library, via ``-D
|
headers and the LAMMPS library, via ``-D
|
||||||
LAMMPS_SOURCE_DIR=/path/to/lammps/src``. CMake will try to guess a
|
LAMMPS_SOURCE_DIR=/path/to/lammps/src``. CMake will try to guess a
|
||||||
build folder with the LAMMPS library from that path, but it can also be
|
build folder with the LAMMPS library from that path, but it can also be
|
||||||
set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
|
set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
|
||||||
|
|
||||||
Rather than linking to the LAMMPS library during compilation, it is also
|
Rather than linking to the LAMMPS library during compilation, it is also
|
||||||
possible to compile the GUI with a plugin loader library that will load
|
possible to compile the GUI with a plugin loader that will load
|
||||||
the LAMMPS library dynamically at runtime during the start of the GUI
|
the LAMMPS library dynamically at runtime during the start of the GUI
|
||||||
from a shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
|
from a shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
|
||||||
``liblammps.dll`` (depending on the operating system). This has the
|
``liblammps.dll`` (depending on the operating system). This has the
|
||||||
advantage that the LAMMPS library can be updated LAMMPS without having
|
advantage that the LAMMPS library can be built from updated or modified
|
||||||
to recompile the GUI. The ABI of the LAMMPS C-library interface is very
|
LAMMPS source without having to recompile the GUI. The ABI of the
|
||||||
stable and generally backward compatible. This feature is enabled by
|
LAMMPS C-library interface is very stable and generally backward
|
||||||
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
|
compatible. This feature is enabled by setting
|
||||||
|
``-D LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
|
||||||
LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
|
LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
|
||||||
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS
|
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS
|
||||||
distribution.
|
distribution.
|
||||||
@ -779,8 +799,8 @@ macOS
|
|||||||
"""""
|
"""""
|
||||||
|
|
||||||
When building on macOS, the build procedure will try to manufacture a
|
When building on macOS, the build procedure will try to manufacture a
|
||||||
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg'
|
drag-n-drop installer, ``LAMMPS-macOS-multiarch.dmg``, when using the
|
||||||
target (i.e. ``cmake --build <build dir> --target dmg`` or ``make dmg``.
|
'dmg' target (i.e. ``cmake --build <build dir> --target dmg`` or ``make dmg``.
|
||||||
|
|
||||||
To build multi-arch executables that will run on both, arm64 and x86_64
|
To build multi-arch executables that will run on both, arm64 and x86_64
|
||||||
architectures natively, it is necessary to set the CMake variable ``-D
|
architectures natively, it is necessary to set the CMake variable ``-D
|
||||||
@ -820,11 +840,11 @@ and LAMMPS GUI can be launched from anywhere from the command line.
|
|||||||
The standard CMake build procedure can be applied and the
|
The standard CMake build procedure can be applied and the
|
||||||
``mingw-cross.cmake`` preset used. By using ``mingw64-cmake`` the CMake
|
``mingw-cross.cmake`` preset used. By using ``mingw64-cmake`` the CMake
|
||||||
command will automatically include a suitable CMake toolset file (the
|
command will automatically include a suitable CMake toolset file (the
|
||||||
regular cmake command can be used after that). After building the
|
regular cmake command can be used after that to modify the configuration
|
||||||
libraries and executables, you can build the target 'zip'
|
settings, if needed). After building the libraries and executables,
|
||||||
(i.e. ``cmake --build <build dir> --target zip`` or ``make zip``
|
you can build the target 'zip' (i.e. ``cmake --build <build dir> --target zip``
|
||||||
to stage all installed files into a LAMMPS_GUI folder and then
|
or ``make zip`` to stage all installed files into a LAMMPS_GUI folder
|
||||||
run a script to copy all required dependencies, some other files,
|
and then run a script to copy all required dependencies, some other files,
|
||||||
and create a zip file from it.
|
and create a zip file from it.
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
|
|||||||
@ -70,7 +70,9 @@ for more info.
|
|||||||
Related commands
|
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
|
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).
|
||||||
@ -51,7 +51,7 @@ 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
|
U_{angle,i} = K (\theta_i - \theta_0)^2 = K \theta^2 \qquad \theta = \theta_i - \theta_0
|
||||||
|
|
||||||
.. versionchanged:: TBD
|
.. versionchanged:: 7Feb2024
|
||||||
|
|
||||||
By default the potential energy U is shifted so that the value U is 0.0
|
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
|
for $theta = theta_0$. This is equivalent to using the optional keyword
|
||||||
|
|||||||
@ -10,7 +10,7 @@ Syntax
|
|||||||
|
|
||||||
angle_style style
|
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
|
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 <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/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 <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:`cross <angle_cross>` - cross term coupling angle and bond lengths
|
||||||
* :doc:`dipole <angle_dipole>` - angle that controls orientation of a point dipole
|
* :doc:`dipole <angle_dipole>` - angle that controls orientation of a point dipole
|
||||||
* :doc:`fourier <angle_fourier>` - angle with multiple cosine terms
|
* :doc:`fourier <angle_fourier>` - angle with multiple cosine terms
|
||||||
|
|||||||
@ -49,252 +49,229 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
Define what style of atoms to use in a simulation. This determines
|
The *atom_style* command selects which per-atom attributes are
|
||||||
what attributes are associated with the atoms. This command must be
|
associated with atoms in a LAMMPS simulation and thus stored and
|
||||||
used before a simulation is setup via a :doc:`read_data <read_data>`,
|
communicated with those atoms as well as read from and stored in data
|
||||||
:doc:`read_restart <read_restart>`, or :doc:`create_box <create_box>`
|
and restart files. Different models (e.g. :doc:`pair styles
|
||||||
command.
|
<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::
|
.. note::
|
||||||
|
|
||||||
Many of the atom styles discussed here are only enabled if
|
Many of the atom styles discussed here are only enabled if LAMMPS was
|
||||||
LAMMPS was built with a specific package, as listed below in the
|
built with a specific package, as listed below in the Restrictions
|
||||||
Restrictions section.
|
section.
|
||||||
|
|
||||||
Once a style is assigned, it cannot be changed, so use a style general
|
Once a style is selected and the simulation box defined, it cannot be
|
||||||
enough to encompass all attributes. E.g. with style *bond*, angular
|
changed but only augmented with the :doc:`fix property/atom
|
||||||
terms cannot be used or added later to the model. It is OK to use a
|
<fix_property_atom>` command. So one should select an atom style
|
||||||
style more general than needed, though it may be slightly inefficient.
|
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,
|
It is OK to use a style more general than needed, though it may be
|
||||||
what quantities are communicated between processors to enable forces
|
slightly inefficient because it will allocate and communicate
|
||||||
to be computed, and what quantities are listed in the data file read
|
additional unused data.
|
||||||
by the :doc:`read_data <read_data>` command.
|
|
||||||
|
|
||||||
These are the additional attributes of each style and the typical
|
Atom style attributes
|
||||||
kinds of physical systems they are used to model. All styles store
|
"""""""""""""""""""""
|
||||||
coordinates, velocities, atom IDs and types. See the
|
|
||||||
|
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:`read_data <read_data>`, :doc:`create_atoms <create_atoms>`, and
|
||||||
:doc:`set <set>` commands for info on how to set these various
|
:doc:`set <set>` commands for details on how to set these various
|
||||||
quantities.
|
quantities. More information about many of the styles is provided in
|
||||||
|
the Additional Information section below.
|
||||||
|
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
.. list-table::
|
||||||
| *amoeba* | molecular + charge + 1/5 neighbors | AMOEBA/HIPPO polarized force fields |
|
:header-rows: 1
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
:widths: auto
|
||||||
| *angle* | bonds and angles | bead-spring polymers with stiffness |
|
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - Atom style
|
||||||
| *atomic* | only the default values | coarse-grain liquids, solids, metals |
|
- Attributes
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- Required package
|
||||||
| *body* | mass, inertia moments, quaternion, angular momentum | arbitrary bodies |
|
- Applications
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *amoeba*
|
||||||
| *bond* | bonds | bead-spring polymers |
|
- *full* + "1-5 special neighbor data"
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`AMOEBA <PKG-AMOEBA>`
|
||||||
| *charge* | charge | atomic system with charges |
|
- AMOEBA/HIPPO force fields
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *angle*
|
||||||
| *dielectric* | normx normy normz area/patch ed em epsilon curv | system with surface polarization |
|
- *bond* + "angle data"
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||||
| *dipole* | charge and dipole moment | system with dipolar particles |
|
- bead-spring polymers with stiffness
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *atomic*
|
||||||
| *dpd* | internal temperature and internal energies | DPD particles |
|
- tag, type, x, v, f, image, mask
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
-
|
||||||
| *edpd* | temperature and heat capacity | eDPD particles |
|
- atomic liquids, solids, metals
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *body*
|
||||||
| *electron* | charge and spin and eradius | electronic force field |
|
- *atomic* + radius, rmass, angmom, torque, body
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`BODY <PKG-BODY>`
|
||||||
| *ellipsoid* | shape, quaternion, angular momentum | aspherical particles |
|
- arbitrary bodies, see :doc:`body howto <Howto_body>`
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *bond*
|
||||||
| *full* | molecular + charge | bio-molecules |
|
- *atomic* + molecule, nspecial, special + "bond data"
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`MOLECULE <PKG-MOLECULE>`
|
||||||
| *line* | end points, angular velocity | rigid bodies |
|
- bead-spring polymers
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *bpm/sphere*
|
||||||
| *mdpd* | density | mDPD particles |
|
- *bond* + radius, rmass, omega, torque, quat
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`BPM <PKG-BPM>`
|
||||||
| *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules |
|
- granular bonded particle models, see :doc:`BPM howto <Howto_bpm>`
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *charge*
|
||||||
| *oxdna* | nucleotide polarity | coarse-grained DNA and RNA models |
|
- *atomic* + q
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
-
|
||||||
| *peri* | mass, volume | mesoscopic Peridynamic models |
|
- atomic systems with charges
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *dielectric*
|
||||||
| *rheo* | rho, status | solid and fluid RHEO particles |
|
- *full* + mu, area, ed, em, epsilon, curvature, q_scaled
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`DIELECTRIC <PKG-DIELECTRIC>`
|
||||||
| *rheo/thermal* | rho, status, temperature | RHEO particles with temperature |
|
- systems with surface polarization
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *dipole*
|
||||||
| *smd* | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles |
|
- *charge* + mu
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`DIPOLE <PKG-DIPOLE>`
|
||||||
| *sph* | rho, esph, cv | SPH particles |
|
- atomic systems with charges and point dipoles
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *dpd*
|
||||||
| *sphere* | diameter, mass, angular velocity | granular models |
|
- *atomic* + rho + "reactive DPD data"
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`DPD-REACT <PKG-DPD-REACT>`
|
||||||
| *bpm/sphere* | diameter, mass, angular velocity, quaternion | granular bonded particle models (BPM)|
|
- reactive DPD
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *edpd*
|
||||||
| *spin* | magnetic moment | system with magnetic particles |
|
- *atomic* + "eDPD data"
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`DPD-MESO <PKG-DPD-MESO>`
|
||||||
| *tdpd* | chemical concentration | tDPD particles |
|
- Energy conservative DPD (eDPD)
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *electron*
|
||||||
| *template* | template index, template atom | small molecules with fixed topology |
|
- *charge* + espin, eradius, ervel, erforce
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
- :ref:`EFF <PKG-EFF>`
|
||||||
| *tri* | corner points, angular momentum | rigid bodies |
|
- Electron force field systems
|
||||||
+----------------+-----------------------------------------------------+--------------------------------------+
|
* - *ellipsoid*
|
||||||
| *wavepacket* | charge, spin, eradius, etag, cs_re, cs_im | AWPMD |
|
- *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
|
||||||
|
* - *rheo*
|
||||||
|
- *atomic* + rho, status
|
||||||
|
- :ref:`RHEO <PKG-RHEO>`
|
||||||
|
- solid and fluid RHEO particles
|
||||||
|
* - *rheo/thermal*
|
||||||
|
- *atomic* + rho, status, temperature
|
||||||
|
- :ref:`RHEO <PKG-RHEO>`
|
||||||
|
- RHEO particles with temperature
|
||||||
|
* - *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::
|
.. note::
|
||||||
|
|
||||||
It is possible to add some attributes, such as a molecule ID, to
|
It is possible to add some attributes, such as a molecule ID and
|
||||||
atom styles that do not have them via the :doc:`fix property/atom
|
charge, to atom styles that do not have them built in using the
|
||||||
<fix_property_atom>` command. This command also allows new custom
|
:doc:`fix property/atom <fix_property_atom>` command. This command
|
||||||
attributes consisting of extra integer or floating-point values to
|
also allows new custom-named attributes consisting of extra integer
|
||||||
be added to atoms. See the :doc:`fix property/atom
|
or floating-point values or vectors to be added to atoms. See the
|
||||||
<fix_property_atom>` page for examples of cases where this is
|
:doc:`fix property/atom <fix_property_atom>` page for examples of
|
||||||
useful and details on how to initialize, access, and output the
|
cases where this is useful and details on how to initialize,
|
||||||
custom values.
|
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
|
Particle size and mass
|
||||||
per-type basis, using the :doc:`mass <mass>` command, The finite-size
|
""""""""""""""""""""""
|
||||||
particle styles assign mass to individual particles on a per-particle
|
|
||||||
basis.
|
|
||||||
|
|
||||||
For the *sphere* and *bpm/sphere* styles, the particles are spheres
|
All of the atom styles define point particles unless they (1) define
|
||||||
and each stores a per-particle diameter and mass. If the diameter >
|
finite-size spherical particles via the *radius* attribute, or (2)
|
||||||
0.0, the particle is a finite-size sphere. If the diameter = 0.0, it
|
define finite-size aspherical particles (e.g. the *body*, *ellipsoid*,
|
||||||
is a point particle. Note that by use of the *disc* keyword with the
|
*line*, and *tri* styles). Most of these styles can also be used with
|
||||||
:doc:`fix nve/sphere <fix_nve_sphere>`, :doc:`fix nvt/sphere
|
mixtures of point and finite-size particles.
|
||||||
<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.
|
|
||||||
|
|
||||||
For the *ellipsoid* style, the particles are ellipsoids and each
|
Note that the *radius* property may need to be provided as a
|
||||||
stores a flag which indicates whether it is a finite-size ellipsoid or
|
*diameter* (e.g. in :doc:`molecule files <molecule>` or :doc:`data
|
||||||
a point particle. If it is an ellipsoid, it also stores a shape
|
files <read_data>`). See the :doc:`Howto spherical <Howto_spherical>`
|
||||||
vector with the 3 diameters of the ellipsoid and a quaternion 4-vector
|
page for an overview of using finite-size spherical and aspherical
|
||||||
with its orientation.
|
particle models with LAMMPS.
|
||||||
|
|
||||||
For the *dielectric* style, each particle can be either a physical
|
Unless an atom style defines the per-atom *rmass* attribute, particle
|
||||||
particle (e.g. an ion), or an interface particle representing a boundary
|
masses are defined on a per-type basis, using the :doc:`mass <mass>`
|
||||||
element between two regions of different dielectric constant. For
|
command. This means each particle's mass is indexed by its atom
|
||||||
interface particles, in addition to the properties associated with
|
*type*.
|
||||||
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.
|
|
||||||
|
|
||||||
For the *dipole* style, a point dipole is defined for each point
|
A few styles define the per-atom *rmass* attribute which can also be
|
||||||
particle. Note that if you wish the particles to be finite-size
|
added using the :doc:`fix property/atom <fix_property_atom>` command.
|
||||||
spheres as in a Stockmayer potential for a dipolar fluid, so that the
|
In this case each particle stores its own mass. Atom styles that have
|
||||||
particles can rotate due to dipole-dipole interactions, then you need
|
a per-atom rmass may define it indirectly through setting particle
|
||||||
to use atom_style hybrid sphere dipole, which will assign both a
|
diameter and density on a per-particle basis. If both per-type mass
|
||||||
diameter and dipole moment to each particle.
|
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
|
Additional information about specific atom styles
|
||||||
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.
|
|
||||||
|
|
||||||
For the *body* style, the particles are arbitrary bodies with internal
|
For the *body* style, the particles are arbitrary bodies with internal
|
||||||
attributes defined by the "style" of the bodies, which is specified by
|
attributes defined by the "style" of the bodies, which is specified by
|
||||||
@ -313,6 +290,149 @@ Note that there may be additional arguments required along with the
|
|||||||
*bstyle* specification, in the atom_style body command. These
|
*bstyle* specification, in the atom_style body command. These
|
||||||
arguments are described on the :doc:`Howto body <Howto_body>` doc page.
|
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.
|
Typically, simulations require only a single (non-hybrid) atom style.
|
||||||
@ -330,11 +450,12 @@ dipole". When a hybrid style is used, atoms store and communicate the
|
|||||||
union of all quantities implied by the individual styles.
|
union of all quantities implied by the individual styles.
|
||||||
|
|
||||||
When using the *hybrid* style, you cannot combine the *template* style
|
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.
|
per-atom basis.
|
||||||
|
|
||||||
LAMMPS can be extended with new atom styles as well as new body
|
LAMMPS can be extended with new atom styles as well as new body styles;
|
||||||
styles; see the :doc:`Modify <Modify>` doc page.
|
see the corresponding manual page on :doc:`modifying & extending LAMMPS
|
||||||
|
<Modify_atom>`.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@ -350,54 +471,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
|
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
|
with a specific package, as listed below. See the :doc:`Build package
|
||||||
<Build_package>` page for more info.
|
<Build_package>` page for more info. The table above lists which package
|
||||||
|
is required for individual atom styles.
|
||||||
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>`.
|
|
||||||
|
|
||||||
Related commands
|
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
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
The default atom style is atomic. If atom_style sphere is used its
|
The default atom style is *atomic*. If atom_style *sphere* or
|
||||||
default argument is 0.
|
*bpm/sphere* is used, its default argument is 0.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
.. index:: bond_style hybrid
|
.. index:: bond_style hybrid
|
||||||
|
.. index:: bond_style hybrid/kk
|
||||||
|
|
||||||
bond_style hybrid command
|
bond_style hybrid command
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
Accelerator Variants: *hybrid/kk*
|
||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
@ -15,7 +18,7 @@ Syntax
|
|||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
.. code-block: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
bond_style hybrid harmonic fene
|
bond_style hybrid harmonic fene
|
||||||
bond_coeff 1 harmonic 80.0 1.2
|
bond_coeff 1 harmonic 80.0 1.2
|
||||||
@ -60,6 +63,10 @@ bond types.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. include:: accel_styles.rst
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ 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
|
U_{bond,i} = K (r_i - r_0)^2 = K r^2 \qquad r = r_i - r_0
|
||||||
|
|
||||||
.. versionchanged:: TBD
|
.. versionchanged:: 7Feb2024
|
||||||
|
|
||||||
By default the potential energy U is shifted so that he value U is 0.0
|
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
|
for $r = r_0$. This is equivalent to using the optional keyword
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Examples
|
|||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
# LJ units
|
||||||
bond_style oxdna/fene
|
bond_style oxdna/fene
|
||||||
bond_coeff * 2.0 0.25 0.7525
|
bond_coeff * 2.0 0.25 0.7525
|
||||||
|
|
||||||
@ -36,6 +37,32 @@ Examples
|
|||||||
bond_style oxrna2/fene
|
bond_style oxrna2/fene
|
||||||
bond_coeff * 2.0 0.25 0.76107
|
bond_coeff * 2.0 0.25 0.76107
|
||||||
|
|
||||||
|
bond_style oxdna/fene
|
||||||
|
bond_coeff * oxdna_lj.cgdna
|
||||||
|
|
||||||
|
# Real units
|
||||||
|
bond_style oxdna/fene
|
||||||
|
bond_coeff * 11.92337812042065 2.1295 6.409795
|
||||||
|
|
||||||
|
bond_style oxdna2/fene
|
||||||
|
bond_coeff * 11.92337812042065 2.1295 6.4430152
|
||||||
|
|
||||||
|
bond_style oxrna2/fene
|
||||||
|
bond_coeff * 11.92337812042065 2.1295 6.482800913
|
||||||
|
|
||||||
|
bond_style oxrna2/fene
|
||||||
|
bond_coeff * oxrna2_real.cgdna
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The coefficients in the above examples have to be kept fixed and
|
||||||
|
cannot be changed without reparameterizing the entire model. They are
|
||||||
|
provided in forms compatible with both *units lj* and *units real*
|
||||||
|
(see documentation of :doc:`units <units>`). These can also be read
|
||||||
|
from a potential file with correct unit style by specifying the name
|
||||||
|
of the file. Several potential files for each unit style are included
|
||||||
|
in the ``potentials`` directory of the LAMMPS distribution.
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
@ -46,15 +73,14 @@ The *oxdna/fene*, *oxdna2/fene*, and *oxrna2/fene* bond styles use the potential
|
|||||||
E = - \frac{\epsilon}{2} \ln \left[ 1 - \left(\frac{r-r_0}{\Delta}\right)^2\right]
|
E = - \frac{\epsilon}{2} \ln \left[ 1 - \left(\frac{r-r_0}{\Delta}\right)^2\right]
|
||||||
|
|
||||||
to define a modified finite extensible nonlinear elastic (FENE)
|
to define a modified finite extensible nonlinear elastic (FENE)
|
||||||
potential :ref:`(Ouldridge) <Ouldridge0>` to model the connectivity of the
|
potential :ref:`(Ouldridge) <Ouldridge0>` to model the connectivity of
|
||||||
phosphate backbone in the oxDNA/oxRNA force field for coarse-grained
|
the phosphate backbone in the oxDNA/oxRNA force field for coarse-grained
|
||||||
modelling of DNA/RNA.
|
modelling of DNA/RNA.
|
||||||
|
|
||||||
The following coefficients must be defined for the bond type via the
|
The following coefficients must be defined for the bond type via the
|
||||||
:doc:`bond_coeff <bond_coeff>` command as given in the above example, or
|
:doc:`bond_coeff <bond_coeff>` command as given in the above example, or
|
||||||
in the data file or restart files read by the
|
in the data file or restart files read by the :doc:`read_data
|
||||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
<read_data>` or :doc:`read_restart <read_restart>` commands:
|
||||||
commands:
|
|
||||||
|
|
||||||
* :math:`\epsilon` (energy)
|
* :math:`\epsilon` (energy)
|
||||||
* :math:`\Delta` (distance)
|
* :math:`\Delta` (distance)
|
||||||
@ -62,41 +88,40 @@ commands:
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The oxDNA bond style has to be used together with the
|
The oxDNA bond style has to be used together with the corresponding
|
||||||
corresponding oxDNA pair styles for excluded volume interaction
|
oxDNA pair styles for excluded volume interaction *oxdna/excv* ,
|
||||||
*oxdna/excv* , stacking *oxdna/stk* , cross-stacking *oxdna/xstk* and
|
stacking *oxdna/stk* , cross-stacking *oxdna/xstk* and coaxial
|
||||||
coaxial stacking interaction *oxdna/coaxstk* as well as
|
stacking interaction *oxdna/coaxstk* as well as hydrogen-bonding
|
||||||
hydrogen-bonding interaction *oxdna/hbond* (see also documentation of
|
interaction *oxdna/hbond* (see also documentation of :doc:`pair_style
|
||||||
:doc:`pair_style oxdna/excv <pair_oxdna>`). For the oxDNA2
|
oxdna/excv <pair_oxdna>`). For the oxDNA2 :ref:`(Snodin) <Snodin0>`
|
||||||
:ref:`(Snodin) <Snodin0>` bond style the analogous pair styles
|
bond style the analogous pair styles *oxdna2/excv* , *oxdna2/stk* ,
|
||||||
*oxdna2/excv* , *oxdna2/stk* , *oxdna2/xstk* , *oxdna2/coaxstk* ,
|
*oxdna2/xstk* , *oxdna2/coaxstk* , *oxdna2/hbond* and an additional
|
||||||
*oxdna2/hbond* and an additional Debye-Hueckel pair style
|
Debye-Hueckel pair style *oxdna2/dh* have to be defined. The same
|
||||||
*oxdna2/dh* have to be defined. The same applies to the oxRNA2
|
applies to the oxRNA2 :ref:`(Sulc1) <Sulc01>` styles.
|
||||||
:ref:`(Sulc1) <Sulc01>` styles.
|
|
||||||
The coefficients in the above example have to be kept fixed and cannot
|
|
||||||
be changed without reparameterizing the entire model.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
This bond style has to be used with the *atom_style hybrid bond ellipsoid oxdna*
|
This bond style has to be used with the *atom_style hybrid bond
|
||||||
(see documentation of :doc:`atom_style <atom_style>`). The *atom_style oxdna*
|
ellipsoid oxdna* (see documentation of :doc:`atom_style
|
||||||
stores the 3'-to-5' polarity of the nucleotide strand, which is set through
|
<atom_style>`). The *atom_style oxdna* stores the 3'-to-5' polarity
|
||||||
the bond topology in the data file. The first (second) atom in a bond definition
|
of the nucleotide strand, which is set through the bond topology in
|
||||||
is understood to point towards the 3'-end (5'-end) of the strand.
|
the data file. The first (second) atom in a bond definition is
|
||||||
|
understood to point towards the 3'-end (5'-end) of the strand.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
If data files are produced with :doc:`write_data <write_data>`, then the
|
If data files are produced with :doc:`write_data <write_data>`, then
|
||||||
:doc:`newton <newton>` command should be set to *newton on* or *newton off on*.
|
the :doc:`newton <newton>` command should be set to *newton on* or
|
||||||
Otherwise the data files will not have the same 3'-to-5' polarity as the
|
*newton off on*. Otherwise the data files will not have the same
|
||||||
initial data file. This limitation does not apply to binary restart files
|
3'-to-5' polarity as the initial data file. This limitation does not
|
||||||
produced with :doc:`write_restart <write_restart>`.
|
apply to binary restart files produced with :doc:`write_restart
|
||||||
|
<write_restart>`.
|
||||||
|
|
||||||
Example input and data files for DNA and RNA duplexes can be found in
|
Example input and data files for DNA and RNA duplexes can be found in
|
||||||
examples/PACKAGES/cgdna/examples/oxDNA/ , /oxDNA2/ and /oxRNA2/. A simple python
|
``examples/PACKAGES/cgdna/examples/oxDNA/`, `.../oxDNA2/`` and
|
||||||
setup tool which creates single straight or helical DNA strands, DNA/RNA
|
``.../oxRNA2/``. A simple python setup tool which creates single
|
||||||
duplexes or arrays of DNA/RNA duplexes can be found in
|
straight or helical DNA strands, DNA/RNA duplexes or arrays of DNA/RNA
|
||||||
examples/PACKAGES/cgdna/util/.
|
duplexes can be found in ``examples/PACKAGES/cgdna/util/``.
|
||||||
|
|
||||||
Please cite :ref:`(Henrich) <Henrich0>` in any publication that uses
|
Please cite :ref:`(Henrich) <Henrich0>` in any publication that uses
|
||||||
this implementation. An updated documentation that contains general information
|
this implementation. An updated documentation that contains general information
|
||||||
@ -113,6 +138,39 @@ and for sequence-specific hydrogen-bonding and stacking interactions
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
Potential file reading
|
||||||
|
""""""""""""""""""""""
|
||||||
|
|
||||||
|
For each style oxdna, oxdna2 and oxrna2, the first parameter argument
|
||||||
|
can be a filename, and if it is, no further arguments should be
|
||||||
|
supplied. Therefore the following command:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
bond_style oxdna/fene
|
||||||
|
bond_coeff * oxdna_lj.cgdna
|
||||||
|
|
||||||
|
will be interpreted as a request to read the (FENE) potential
|
||||||
|
:ref:`(Ouldridge) <Ouldridge0>` parameters from the file with the given
|
||||||
|
name. The file can define multiple potential parameters for both bonded
|
||||||
|
and pair interactions, but for the above bonded interactions there must
|
||||||
|
exist in the file a line of the form:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
* fene epsilon delta r0
|
||||||
|
|
||||||
|
There are sample potential files for each unit style in the
|
||||||
|
``potentials`` directory of the LAMMPS distribution. The potential file
|
||||||
|
unit system must align with the units defined via the :doc:`units
|
||||||
|
<units>` command. For conversion between different *LJ* and *real* unit
|
||||||
|
systems for oxDNA, the python tool *lj2real.py* located in the
|
||||||
|
``examples/PACKAGES/cgdna/util/`` directory can be used. This tool
|
||||||
|
assumes similar file structure to the examples found in
|
||||||
|
``examples/PACKAGES/cgdna/examples/``.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,10 @@ commands.
|
|||||||
The style *p* means the box is periodic, so that particles interact
|
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
|
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
|
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*
|
constant pressure boundary conditions or box deformation (see the
|
||||||
style must be applied to both faces of a dimension.
|
: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
|
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
|
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
|
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.
|
of the box, e.g. for atoms to evaporate from a surface.
|
||||||
|
|
||||||
For triclinic (non-orthogonal) simulation boxes, if the second dimension
|
LAMMPS also allows use of triclinic (non-orthogonal) simulation boxes.
|
||||||
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.
|
|
||||||
|
|
||||||
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
|
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
|
||||||
geometric description of triclinic boxes, as defined by LAMMPS, and
|
description of both general and restricted triclinic boxes and how to
|
||||||
how to transform these parameters to and from other commonly used
|
define them. General triclinic boxes (arbitrary edge vectors **A**,
|
||||||
triclinic representations.
|
**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
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This command cannot be used after the simulation box is defined by a
|
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_data <read_data>` or :doc:`create_box <create_box>` command
|
||||||
:doc:`read_restart <read_restart>` command. See the
|
or :doc:`read_restart <read_restart>` command. See the
|
||||||
:doc:`change_box <change_box>` command for how to change the simulation
|
:doc:`change_box <change_box>` command for how to change the
|
||||||
box boundaries after it has been defined.
|
simulation box boundaries after it has been defined.
|
||||||
|
|
||||||
For 2d simulations, the z dimension must be periodic.
|
For 2d simulations, the z dimension must be periodic.
|
||||||
|
|
||||||
|
|||||||
@ -204,8 +204,23 @@ angles per atom satisfying the ADF criteria.
|
|||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
This compute is part of the EXTRA-COMPUTE package. It is only enabled
|
||||||
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
|
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,
|
The ADF is not computed for neighbors outside the force cutoff,
|
||||||
since processors (in parallel) don't know about atom coordinates for
|
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
|
if LAMMPS was built with that package. See the :doc:`Build package
|
||||||
<Build_package>` page for more info.
|
<Build_package>` page for more info.
|
||||||
|
|
||||||
|
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||||
|
|
||||||
Related commands
|
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
|
if LAMMPS was built with that package. See the :doc:`Build package
|
||||||
<Build_package>` page for more info.
|
<Build_package>` page for more info.
|
||||||
|
|
||||||
|
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Syntax
|
|||||||
|
|
||||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||||
* count/type = style name of this compute command
|
* count/type = style name of this compute command
|
||||||
* mode = {atom} or {bond} or {angle} or {dihedral} or {improper}
|
* mode = *atom* or *bond* or *angle* or *dihedral* or *improper*
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
@ -69,29 +69,42 @@ for each type:
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
If the {mode} setting is {atom} then the count of atoms for each atom
|
If the *mode* setting is *atom* then the count of atoms for each atom
|
||||||
type is tallied. Only atoms in the specified group are counted.
|
type is tallied. Only atoms in the specified group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {bond} then the count of bonds for each bond
|
The atom count for each type can be normalized by the total number of
|
||||||
|
atoms like so:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
compute typevec all count/type atom # number of atoms of each type
|
||||||
|
variable normtypes vector c_typevec/atoms # divide by total number of atoms
|
||||||
|
variable ntypes equal extract_setting(ntypes) # number of atom types
|
||||||
|
thermo_style custom step v_normtypes[*${ntypes}] # vector variable needs upper limit
|
||||||
|
|
||||||
|
Similarly, bond counts can be normalized by the total number of bonds.
|
||||||
|
The same goes for angles, dihedrals, and impropers (see below).
|
||||||
|
|
||||||
|
If the *mode* setting is *bond* then the count of bonds for each bond
|
||||||
type is tallied. Only bonds with both atoms in the specified group
|
type is tallied. Only bonds with both atoms in the specified group
|
||||||
are counted.
|
are counted.
|
||||||
|
|
||||||
For {mode} = {bond}, broken bonds with a bond type of zero are also
|
For *mode* = *bond*, broken bonds with a bond type of zero are also
|
||||||
counted. The :doc:`bond_style quartic <bond_quartic>` and :doc:`BPM
|
counted. The :doc:`bond_style quartic <bond_quartic>` and :doc:`BPM
|
||||||
bond styles <Howto_bpm>` break bonds by doing this. See the :doc:`
|
bond styles <Howto_bpm>` break bonds by doing this. See the
|
||||||
Howto broken bonds <Howto_broken_bonds>` doc page for more details.
|
:doc:`Howto broken bonds <Howto_broken_bonds>` doc page for more details.
|
||||||
Note that the group setting is ignored for broken bonds; all broken
|
Note that the group setting is ignored for broken bonds; all broken
|
||||||
bonds in the system are counted.
|
bonds in the system are counted.
|
||||||
|
|
||||||
If the {mode} setting is {angle} then the count of angles for each
|
If the *mode* setting is *angle* then the count of angles for each
|
||||||
angle type is tallied. Only angles with all 3 atoms in the specified
|
angle type is tallied. Only angles with all 3 atoms in the specified
|
||||||
group are counted.
|
group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {dihedral} then the count of dihedrals for
|
If the *mode* setting is *dihedral* then the count of dihedrals for
|
||||||
each dihedral type is tallied. Only dihedrals with all 4 atoms in the
|
each dihedral type is tallied. Only dihedrals with all 4 atoms in the
|
||||||
specified group are counted.
|
specified group are counted.
|
||||||
|
|
||||||
If the {mode} setting is {improper} then the count of impropers for
|
If the *mode* setting is *improper* then the count of impropers for
|
||||||
each improper type is tallied. Only impropers with all 4 atoms in the
|
each improper type is tallied. Only impropers with all 4 atoms in the
|
||||||
specified group are counted.
|
specified group are counted.
|
||||||
|
|
||||||
@ -101,18 +114,19 @@ Output info
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
This compute calculates a global vector of counts. If the mode is
|
This compute calculates a global vector of counts. If the mode is
|
||||||
{atom} or {bond} or {angle} or {dihedral} or {improper}, then the
|
*atom* or *bond* or *angle* or *dihedral* or *improper*, then the
|
||||||
vector length is the number of atom types or bond types or angle types
|
vector length is the number of atom types or bond types or angle types
|
||||||
or dihedral types or improper types, respectively.
|
or dihedral types or improper types, respectively.
|
||||||
|
|
||||||
If the mode is {bond} this compute also calculates a global scalar
|
If the mode is *bond* this compute also calculates a global scalar
|
||||||
which is the number of broken bonds with type = 0, as explained above.
|
which is the number of broken bonds with type = 0, as explained above.
|
||||||
|
|
||||||
These values can be used by any command that uses global scalar or
|
These values can be used by any command that uses global scalar or
|
||||||
vector values from a compute as input. See the :doc:`Howto output
|
vector values from a compute as input. See the :doc:`Howto output
|
||||||
<Howto_output>` page for an overview of LAMMPS output options.
|
<Howto_output>` page for an overview of LAMMPS output options.
|
||||||
|
|
||||||
The scalar and vector values calculated by this compute are "extensive".
|
The scalar and vector values calculated by this compute are both
|
||||||
|
"intensive".
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|||||||
@ -106,6 +106,8 @@ Restrictions
|
|||||||
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
|
||||||
LAMMPS was built with that package.
|
LAMMPS was built with that package.
|
||||||
|
|
||||||
|
This compute requires :doc:`neighbor styles 'bin' or 'nsq' <neighbor>`.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ tangential force tensor. The contact tensor is calculated as
|
|||||||
|
|
||||||
.. math::
|
.. 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`
|
where :math:`a` and :math:`b` are the :math:`x`, :math:`y`, :math:`z`
|
||||||
directions, :math:`\delta_{ab}` is the Kronecker delta function, and
|
directions, :math:`\delta_{ab}` is the Kronecker delta function, and
|
||||||
@ -83,7 +83,7 @@ The branch tensor is calculated as
|
|||||||
|
|
||||||
.. math::
|
.. 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
|
where the tensor :math:`D` is defined as
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ The normal force fabric tensor is calculated as
|
|||||||
|
|
||||||
.. math::
|
.. 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
|
where the tensor :math:`N` is defined as
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ as
|
|||||||
|
|
||||||
.. math::
|
.. 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
|
where the tensor :math:`T` is defined as
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ Syntax
|
|||||||
*model* values = style
|
*model* values = style
|
||||||
style = *linear* or *quadratic* or *mliappy*
|
style = *linear* or *quadratic* or *mliappy*
|
||||||
*descriptor* values = style filename
|
*descriptor* values = style filename
|
||||||
style = *sna*
|
style = *sna* or *ace*
|
||||||
filename = name of file containing descriptor definitions
|
filename = name of file containing descriptor definitions
|
||||||
*gradgradflag* value = 0/1
|
*gradgradflag* value = 0/1
|
||||||
toggle gradgrad method for force gradient
|
toggle gradgrad method for force gradient
|
||||||
@ -31,6 +31,7 @@ Examples
|
|||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
compute mliap model linear descriptor sna Ta06A.mliap.descriptor
|
compute mliap model linear descriptor sna Ta06A.mliap.descriptor
|
||||||
|
compute mliap model linear descriptor ace H_N_O_ccs.yace gradgradflag 1
|
||||||
|
|
||||||
Description
|
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
|
It is used primarily for calculating the gradient of energy, force, and
|
||||||
stress components with respect to model parameters, which is useful when
|
stress components with respect to model parameters, which is useful when
|
||||||
training :doc:`mliap pair_style <pair_mliap>` models to match target data.
|
training :doc:`mliap pair_style <pair_mliap>` models to match target data.
|
||||||
It provides separate
|
It provides separate definitions of the interatomic potential functional
|
||||||
definitions of the interatomic potential functional form (*model*)
|
form (*model*) and the geometric quantities that characterize the atomic
|
||||||
and the geometric quantities that characterize the atomic positions
|
positions (*descriptor*). By defining *model* and *descriptor* separately,
|
||||||
(*descriptor*). By defining *model* and *descriptor* separately,
|
|
||||||
it is possible to use many different models with a given descriptor,
|
it is possible to use many different models with a given descriptor,
|
||||||
or many different descriptors with a given model. Currently, the
|
or many different descriptors with a given model. Currently, the compute
|
||||||
compute supports just two models, *linear* and *quadratic*,
|
supports *linear* and *quadratic* SNAP descriptor computes used in
|
||||||
and one descriptor, *sna*, the SNAP descriptor used by
|
:doc:`pair_style snap <pair_snap>`, *linear* SO3 descriptor computes, and
|
||||||
:doc:`pair_style snap <pair_snap>`, including the linear, quadratic,
|
*linear* ACE descriptor computes used in :doc:`pair_style pace <pair_pace>`,
|
||||||
and chem variants. Work is currently underway to extend
|
and it is straightforward to add new descriptor styles.
|
||||||
the interface to handle neural network energy models,
|
|
||||||
and it is also straightforward to add new descriptor styles.
|
|
||||||
|
|
||||||
The compute *mliap* command must be followed by two keywords
|
The compute *mliap* command must be followed by two keywords
|
||||||
*model* and *descriptor* in either order.
|
*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
|
*quadratic* or *mliappy*). The *mliappy* model is only available if
|
||||||
LAMMPS is built with the *mliappy* Python module. There are
|
LAMMPS is built with the *mliappy* Python module. There are
|
||||||
:ref:`specific installation instructions <mliap>` for that module.
|
: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
|
The *descriptor* keyword is followed by a descriptor style, and
|
||||||
additional arguments. The compute currently supports two descriptor
|
additional arguments. The compute currently supports three descriptor
|
||||||
styles *sna* and *so3*, but it is is straightforward to add additional
|
styles: *sna*, *so3*, and *ace*, but it is is straightforward to add
|
||||||
descriptor styles. The SNAP descriptor style *sna* is the same as that
|
additional descriptor styles. The SNAP descriptor style *sna* is the
|
||||||
used by :doc:`pair_style snap <pair_snap>`, including the linear,
|
same as that used by :doc:`pair_style snap <pair_snap>`, including the
|
||||||
quadratic, and chem variants. A single additional argument specifies
|
linear, quadratic, and chem variants. A single additional argument
|
||||||
the descriptor filename containing the parameters and setting used by
|
specifies the descriptor filename containing the parameters and setting used
|
||||||
the SNAP descriptor. The descriptor filename usually ends in the
|
by the SNAP descriptor. The descriptor filename usually ends in the
|
||||||
*.mliap.descriptor* extension. The format of this file is identical to
|
*.mliap.descriptor* extension. The format of this file is identical to
|
||||||
the descriptor file in the :doc:`pair_style mliap <pair_mliap>`, and is
|
the descriptor file in the :doc:`pair_style mliap <pair_mliap>`, and is
|
||||||
described in detail there.
|
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::
|
.. note::
|
||||||
|
|
||||||
The number of LAMMPS atom types (and the value of *nelems* in the model)
|
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
|
LAMMPS was built with that package. In addition, building LAMMPS with
|
||||||
the ML-IAP package requires building LAMMPS with the ML-SNAP package.
|
the ML-IAP package requires building LAMMPS with the ML-SNAP package.
|
||||||
The *mliappy* model also requires building LAMMPS with the PYTHON
|
The *mliappy* model also requires building LAMMPS with the PYTHON
|
||||||
package. See the :doc:`Build package <Build_package>` page for more
|
package. The *ace* descriptor also requires building LAMMPS with the
|
||||||
info.
|
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
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
.. versionadded:: TBD
|
.. versionadded:: 7Feb2024
|
||||||
|
|
||||||
This compute calculates a set of quantities related to the atomic
|
This compute calculates a set of quantities related to the atomic
|
||||||
cluster expansion (ACE) descriptors of the atoms in a group. ACE
|
cluster expansion (ACE) descriptors of the atoms in a group. ACE
|
||||||
|
|||||||
@ -153,7 +153,8 @@ Related commands
|
|||||||
Default
|
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,
|
spx, spy, spz, sp, fmx, fmy, fmz,
|
||||||
nbonds,
|
nbonds,
|
||||||
radius, diameter, omegax, omegay, omegaz,
|
radius, diameter, omegax, omegay, omegaz,
|
||||||
|
temperature, heatflow,
|
||||||
angmomx, angmomy, angmomz,
|
angmomx, angmomy, angmomz,
|
||||||
shapex,shapey, shapez,
|
shapex, shapey, shapez,
|
||||||
quatw, quati, quatj, quatk, tqx, tqy, tqz,
|
quatw, quati, quatj, quatk, tqx, tqy, tqz,
|
||||||
end1x, end1y, end1z, end2x, end2y, end2z,
|
end1x, end1y, end1z, end2x, end2y, end2z,
|
||||||
corner1x, corner1y, corner1z,
|
corner1x, corner1y, corner1z,
|
||||||
@ -56,6 +57,8 @@ Syntax
|
|||||||
*nbonds* = number of bonds assigned to an atom
|
*nbonds* = number of bonds assigned to an atom
|
||||||
*radius,diameter* = radius,diameter of spherical particle
|
*radius,diameter* = radius,diameter of spherical particle
|
||||||
*omegax,omegay,omegaz* = angular velocity 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
|
*angmomx,angmomy,angmomz* = angular momentum of aspherical particle
|
||||||
*shapex,shapey,shapez* = 3 diameters of aspherical particle
|
*shapex,shapey,shapez* = 3 diameters of aspherical particle
|
||||||
*quatw,quati,quatj,quatk* = quaternion components for aspherical or body particles
|
*quatw,quati,quatj,quatk* = quaternion components for aspherical or body particles
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
.. versionadded:: TBD
|
.. versionadded:: 7Feb2024
|
||||||
|
|
||||||
Define a compute that identifies rattlers in a system. Rattlers are often
|
Define a compute that identifies rattlers in a system. Rattlers are often
|
||||||
identified in granular or glassy packings as under-coordinated atoms that
|
identified in granular or glassy packings as under-coordinated atoms that
|
||||||
|
|||||||
@ -13,8 +13,8 @@ Syntax
|
|||||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||||
* rdf = style name of this compute command
|
* rdf = style name of this compute command
|
||||||
* Nbin = number of RDF bins
|
* Nbin = number of RDF bins
|
||||||
* itypeN = central atom type for Nth RDF histogram (see asterisk form below)
|
* itypeN = central atom type for Nth RDF histogram (integer, type label, or asterisk form)
|
||||||
* jtypeN = distribution atom type for Nth RDF histogram (see asterisk form below)
|
* jtypeN = distribution atom type for Nth RDF histogram (integer, type label, or asterisk form)
|
||||||
* zero or more keyword/value pairs may be appended
|
* zero or more keyword/value pairs may be appended
|
||||||
* keyword = *cutoff*
|
* keyword = *cutoff*
|
||||||
|
|
||||||
@ -96,14 +96,16 @@ is computed for :math:`g(r)` between all atom types. If one or more pairs are
|
|||||||
listed, then a separate histogram is generated for each
|
listed, then a separate histogram is generated for each
|
||||||
*itype*,\ *jtype* pair.
|
*itype*,\ *jtype* pair.
|
||||||
|
|
||||||
The *itypeN* and *jtypeN* settings can be specified in one of two
|
The *itypeN* and *jtypeN* settings can be specified in one of three
|
||||||
ways. An explicit numeric value can be used, as in the fourth example
|
ways. One or both of the types in the I,J pair can be a
|
||||||
above. Or a wild-card asterisk can be used to specify a range of atom
|
:doc:`type label <Howto_type_labels>`. Or an explicit numeric value can be
|
||||||
types. This takes the form "\*" or "\*n" or "m\*" or "m\*n". If
|
used, as in the fourth example above. Or a wild-card asterisk can be used
|
||||||
:math:`N` is the number of atom types, then an asterisk with no numeric values
|
to specify a range of atom types. This takes the form "\*" or "\*n" or
|
||||||
means all types from 1 to :math:`N`. A leading asterisk means all types from 1
|
"m\*" or "m\*n". If :math:`N` is the number of atom types, then an asterisk
|
||||||
to n (inclusive). A trailing asterisk means all types from m to :math:`N`
|
with no numeric values means all types from 1 to :math:`N`. A leading
|
||||||
(inclusive). A middle asterisk means all types from m to n (inclusive).
|
asterisk means all types from 1 to n (inclusive). A trailing asterisk
|
||||||
|
means all types from m to :math:`N` (inclusive). A middle asterisk means
|
||||||
|
all types from m to n (inclusive).
|
||||||
|
|
||||||
If both *itypeN* and *jtypeN* are single values, as in the fourth example
|
If both *itypeN* and *jtypeN* are single values, as in the fourth example
|
||||||
above, this means that a :math:`g(r)` is computed where atoms of type *itypeN*
|
above, this means that a :math:`g(r)` is computed where atoms of type *itypeN*
|
||||||
@ -176,22 +178,29 @@ also numbers :math:`\ge 0.0`.
|
|||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
The RDF is not computed for distances longer than the force cutoff,
|
By default, the RDF is not computed for distances longer than the
|
||||||
since processors (in parallel) do not know about atom coordinates for
|
largest force cutoff, since the neighbor list creation will only contain
|
||||||
atoms further away than that distance. If you want an RDF for larger
|
pairs up to that distance (plus neighbor list skin). This distance can
|
||||||
distances, you can use the :doc:`rerun <rerun>` command to post-process
|
be increased using the *cutoff* keyword but this keyword is only valid
|
||||||
a dump file and set the cutoff for the potential to be longer in the
|
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
|
rerun script. Note that in the rerun context, the force cutoff is
|
||||||
arbitrary, since you are not running dynamics and thus are not changing
|
arbitrary and with pair style zero you are not computing any forces, and
|
||||||
your model. The definition of :math:`g(r)` used by LAMMPS is only appropriate
|
you are not running dynamics you are not changing the model that
|
||||||
for characterizing atoms that are uniformly distributed throughout the
|
generated the trajectory.
|
||||||
simulation cell. In such cases, the coordination number is still
|
|
||||||
correct and meaningful. As an example, if a large simulation cell
|
The definition of :math:`g(r)` used by LAMMPS is only appropriate for
|
||||||
contains only one atom of type *itypeN* and one of *jtypeN*, then :math:`g(r)`
|
characterizing atoms that are uniformly distributed throughout the
|
||||||
will register an arbitrarily large spike at whatever distance they
|
simulation cell. In such cases, the coordination number is still correct
|
||||||
happen to be at, and zero everywhere else.
|
and meaningful. As an example, if a large simulation cell contains only
|
||||||
The function :math:`\text{coord}(r)` will show a step
|
one atom of type *itypeN* and one of *jtypeN*, then :math:`g(r)` will
|
||||||
change from zero to one at the location of the spike in :math:`g(r)`.
|
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::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
.. versionadded:: TBD
|
.. versionadded:: 7Feb2024
|
||||||
|
|
||||||
Define a computation that extracts bond information computed by the ReaxFF
|
Define a computation that extracts bond information computed by the ReaxFF
|
||||||
potential specified by :doc:`pair_style reaxff <pair_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 sum c_force
|
||||||
compute 1 all reduce/region subbox 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[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 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
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
.. versionadded:: TBD
|
.. versionadded:: 7Feb2024
|
||||||
|
|
||||||
Define a computation that performs the Supervised Learning Crystal
|
Define a computation that performs the Supervised Learning Crystal
|
||||||
Structure Analysis (SL-CSA) from :ref:`(Lafourcade) <Lafourcade2023_1>`
|
Structure Analysis (SL-CSA) from :ref:`(Lafourcade) <Lafourcade2023_1>`
|
||||||
|
|||||||
@ -289,7 +289,8 @@ Related commands
|
|||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
none
|
By default the compute includes contributions from the keywords:
|
||||||
|
``ke pair bond angle dihedral improper kspace fix``
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -126,16 +126,19 @@ These styles are part of the EXTRA-COMPUTE package. They are only
|
|||||||
enabled if LAMMPS is built with that package. See the :doc:`Build
|
enabled if LAMMPS is built with that package. See the :doc:`Build
|
||||||
package <Build_package>` doc page on for more info.
|
package <Build_package>` doc page on for more info.
|
||||||
|
|
||||||
The method is only implemented for 3d orthogonal simulation boxes whose
|
The method is implemented for orthogonal simulation boxes whose
|
||||||
size does not change in time, and axis-aligned planes.
|
size does not change in time, and axis-aligned planes.
|
||||||
|
|
||||||
The method only works with two-body pair interactions, because it
|
The method only works with two-body pair interactions, because it
|
||||||
requires the class method ``Pair::single()`` to be implemented, which is
|
requires the class method ``Pair::single()`` to be implemented, which is
|
||||||
not possible for manybody potentials. In particular, compute
|
not possible for manybody potentials. In particular, compute
|
||||||
*stress/mop/profile* and *stress/mop* do not work with more than two-body pair
|
*stress/mop/profile* and *stress/mop* do not work with more than two-body
|
||||||
interactions, long range (kspace) interactions and
|
pair interactions, long range (kspace) interactions and
|
||||||
improper intramolecular interactions.
|
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
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ Syntax
|
|||||||
|
|
||||||
create_atoms type style args keyword values ...
|
create_atoms type style args keyword values ...
|
||||||
|
|
||||||
* type = atom type (1-Ntypes) of atoms to create (offset for molecule creation)
|
* type = atom type (1-Ntypes or type label) of atoms to create (offset for molecule creation)
|
||||||
* style = *box* or *region* or *single* or *mesh* or *random*
|
* style = *box* or *region* or *single* or *mesh* or *random*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
@ -37,7 +37,7 @@ Syntax
|
|||||||
seed = random # seed (positive integer)
|
seed = random # seed (positive integer)
|
||||||
*basis* values = M itype
|
*basis* values = M itype
|
||||||
M = which basis atom
|
M = which basis atom
|
||||||
itype = atom type (1-N) to assign to this basis atom
|
itype = atom type (1-Ntypes or type label) to assign to this basis atom
|
||||||
*ratio* values = frac seed
|
*ratio* values = frac seed
|
||||||
frac = fraction of lattice sites (0 to 1) to populate randomly
|
frac = fraction of lattice sites (0 to 1) to populate randomly
|
||||||
seed = random # seed (positive integer)
|
seed = random # seed (positive integer)
|
||||||
@ -74,6 +74,13 @@ Examples
|
|||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
create_atoms 1 box
|
create_atoms 1 box
|
||||||
|
|
||||||
|
labelmap atom 1 Pt
|
||||||
|
create_atoms Pt box
|
||||||
|
|
||||||
|
labelmap atom 1 C 2 Si
|
||||||
|
create_atoms C region regsphere basis Si C
|
||||||
|
|
||||||
create_atoms 3 region regsphere basis 2 3
|
create_atoms 3 region regsphere basis 2 3
|
||||||
create_atoms 3 region regsphere basis 2 3 ratio 0.5 74637
|
create_atoms 3 region regsphere basis 2 3 ratio 0.5 74637
|
||||||
create_atoms 3 single 0 0 5
|
create_atoms 3 single 0 0 5
|
||||||
@ -86,25 +93,46 @@ Description
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
This command creates atoms (or molecules) within the simulation box,
|
This command creates atoms (or molecules) within the simulation box,
|
||||||
either on a lattice, or a single atom (or molecule), or on a surface
|
either on a lattice, or at random points, or on a surface defined by a
|
||||||
defined by a triangulated mesh, or a random collection of atoms (or
|
triangulated mesh. Or it creates a single atom (or molecule) at a
|
||||||
molecules). It is an alternative to reading in atom coordinates
|
specified point. It is an alternative to reading in atom coordinates
|
||||||
explicitly via a :doc:`read_data <read_data>` or :doc:`read_restart
|
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.
|
typically created via the :doc:`create_box <create_box>` command.
|
||||||
Before using this command, a lattice must also be defined using the
|
Before using this command, a lattice must typically also be defined
|
||||||
:doc:`lattice <lattice>` command, unless you specify the *single* style
|
using the :doc:`lattice <lattice>` command, unless you specify the
|
||||||
with units = box or the *random* style. For the remainder of this doc
|
*single* or *mesh* style with units = box or the *random* style. To
|
||||||
page, a created atom or molecule is referred to as a "particle".
|
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
|
If created particles are individual atoms, they are assigned the
|
||||||
specified atom *type*, though this can be altered via the *basis*
|
specified atom *type*, though this can be altered via the *basis*
|
||||||
keyword as discussed below. If molecules are being created, the type
|
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
|
of each atom in the created molecule is specified in a specified file
|
||||||
the :doc:`molecule <molecule>` command, and those values are added to
|
read by the :doc:`molecule <molecule>` command, and those values are
|
||||||
the specified atom *type* (e.g., if *type* = 2 and the file specifies
|
added to the specified atom *type* (e.g., if *type* = 2 and the file
|
||||||
atom types 1, 2, and 3, then each created molecule will have atom types
|
specifies atom types 1, 2, and 3, then each created molecule will have
|
||||||
3, 4, and 5).
|
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
|
For the *box* style, the create_atoms command fills the entire
|
||||||
simulation box with particles on the lattice. If your simulation box
|
simulation box with particles on the lattice. If your simulation box
|
||||||
@ -126,10 +154,117 @@ periodic boundaries. If this is desired, you should either use the
|
|||||||
*box* style, or tweak the region size to get precisely the particles
|
*box* style, or tweak the region size to get precisely the particles
|
||||||
you want.
|
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
|
For the *single* style, a single particle is added to the system at
|
||||||
the specified coordinates. This can be useful for debugging purposes
|
the specified coordinates. This can be useful for debugging purposes
|
||||||
or to create a tiny system with a handful of particles at specified
|
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
|
.. figure:: img/marble_race.jpg
|
||||||
:figwidth: 33%
|
:figwidth: 33%
|
||||||
@ -189,73 +324,6 @@ to the area of that triangle.
|
|||||||
beneficial to exclude computing interactions between the created
|
beneficial to exclude computing interactions between the created
|
||||||
particles using :doc:`neigh_modify exclude <neigh_modify>`.
|
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*
|
Individual atoms are inserted by this command, unless the *mol*
|
||||||
@ -268,6 +336,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
|
required to be in this file are the coordinates and types of atoms in
|
||||||
the molecule.
|
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
|
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
|
*single* styles, is exactly the same as adding atoms on lattice
|
||||||
points, except that entire molecules are added at each point, i.e. on
|
points, except that entire molecules are added at each point, i.e. on
|
||||||
@ -401,12 +475,13 @@ to.
|
|||||||
|
|
||||||
The *overlap* keyword only applies to the *random* style. It prevents
|
The *overlap* keyword only applies to the *random* style. It prevents
|
||||||
newly created particles from being created closer than the specified
|
newly created particles from being created closer than the specified
|
||||||
*Doverlap* distance from any other particle. When the particles being
|
*Doverlap* distance from any other particle. If particles have finite
|
||||||
created are molecules, the radius of the molecule (from its geometric
|
size (see :doc:`atom_style sphere <atom_style>` for example) *Doverlap*
|
||||||
center) is added to *Doverlap*. If particles have finite size (see
|
should be specified large enough to include the particle size in the
|
||||||
:doc:`atom_style sphere <atom_style>` for example) *Doverlap* should
|
non-overlapping criterion. If molecules are being randomly inserted, then
|
||||||
be specified large enough to include the particle size in the
|
an insertion is only accepted if each particle in the molecule meets the
|
||||||
non-overlapping criterion.
|
overlap criterion with respect to other particles (not including particles
|
||||||
|
in the molecule itself).
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -463,12 +538,19 @@ on a single CPU core.
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
The *units* keyword determines the meaning of the distance units used
|
The *units* keyword determines the meaning of the distance units used
|
||||||
to specify the coordinates of the one particle created by the *single*
|
by parameters for various styles. A *box* value selects standard
|
||||||
style, or the overlap distance *Doverlap* by the *overlap* keyword. A
|
distance units as defined by the :doc:`units <units>` command (e.g.,
|
||||||
*box* value selects standard distance units as defined by the
|
:math:`\AA` for units = *real* or *metal*\ . A *lattice* value means
|
||||||
:doc:`units <units>` command (e.g., :math:`\AA` for
|
the distance units are in lattice spacings. These are affected settings:
|
||||||
units = *real* or *metal*\ . A *lattice* value means the distance units are in
|
|
||||||
lattice spacings.
|
* 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 +618,11 @@ command.
|
|||||||
A rotation vector specified for a single molecule must be in
|
A rotation vector specified for a single molecule must be in
|
||||||
the z-direction for a 2d model.
|
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
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
|
|||||||
@ -9,9 +9,11 @@ Syntax
|
|||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
create_box N region-ID keyword value ...
|
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
|
* 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
|
* 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*
|
* 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
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
# orthogonal or restricted triclinic box using regionID = mybox
|
||||||
create_box 2 mybox
|
create_box 2 mybox
|
||||||
create_box 2 mybox bond/types 2 extra/bond/per/atom 1
|
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
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
This command creates a simulation box based on the specified region.
|
This command creates a simulation box. It also partitions the box into
|
||||||
Thus a :doc:`region <region>` command must first be used to define a
|
a regular 3d grid of smaller sub-boxes, one per processor (MPI task).
|
||||||
geometric domain. It also partitions the simulation box into a
|
The geometry of the partitioning is based on the size and shape of the
|
||||||
regular 3d grid of rectangular bricks, one per processor, based on the
|
simulation box, the number of processors being used and the settings
|
||||||
number of processors being used and the settings of the
|
of the :doc:`processors <processors>` command. The partitioning can
|
||||||
:doc:`processors <processors>` command. The partitioning can later be
|
later be changed by the :doc:`balance <balance>` or :doc:`fix balance
|
||||||
changed by the :doc:`balance <balance>` or :doc:`fix balance <fix_balance>` commands.
|
<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.
|
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
|
If the region is not of style *prism*, then LAMMPS encloses the region
|
||||||
(block, sphere, etc.) with an axis-aligned orthogonal bounding box
|
(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
|
If the region is of style *prism*, LAMMPS creates a non-orthogonal
|
||||||
simulation domain shaped as a parallelepiped with triclinic symmetry.
|
simulation domain shaped as a parallelepiped with triclinic symmetry.
|
||||||
As defined by the :doc:`region prism <region>` command, the
|
As defined by the :doc:`region prism <region>` command, the
|
||||||
parallelepiped has its "origin" at (xlo,ylo,zlo) and is defined by three
|
parallelepiped has an "origin" at (xlo,ylo,zlo) and three edge vectors
|
||||||
edge vectors starting from the origin given by
|
starting from the origin given by :math:`\vec a =
|
||||||
:math:`\vec a = (x_\text{hi}-x_\text{lo},0,0)`;
|
(x_\text{hi}-x_\text{lo},0,0)`; :math:`\vec b =
|
||||||
:math:`\vec b = (xy,y_\text{hi}-y_\text{lo},0)`; and
|
(xy,y_\text{hi}-y_\text{lo},0)`; and :math:`\vec c =
|
||||||
:math:`\vec c = (xz,yz,z_\text{hi}-z_\text{lo})`.
|
(xz,yz,z_\text{hi}-z_\text{lo})`. In LAMMPS lingo, this is a
|
||||||
The parameters *xy*\ , *xz*\ , and *yz* can be 0.0 or
|
restricted triclinic box because the three edge vectors cannot be
|
||||||
positive or negative values and are called "tilt factors" because they
|
defined in arbitrary (general) directions. The parameters *xy*\ ,
|
||||||
are the amount of displacement applied to faces of an originally
|
*xz*\ , and *yz* can be 0.0 or positive or negative values and are
|
||||||
orthogonal box to transform it into the parallelepiped.
|
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
|
Typically a *prism* region used with the create_box command should
|
||||||
tilt factors :math:`(xy,xz,yz)` that do not skew the box more than half
|
have tilt factors :math:`(xy,xz,yz)` that do not skew the box more
|
||||||
the distance of the parallel box length. For example, if
|
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`
|
:math:`x_\text{lo} = 2` and :math:`x_\text{hi} = 12`, then the
|
||||||
box length is 10 and the :math:`xy` tilt factor must be between
|
:math:`x` box length is 10 and the :math:`xy` tilt factor must be
|
||||||
:math:`-5` and :math:`5`. Similarly, both :math:`xz` and :math:`yz`
|
between :math:`-5` and :math:`5`. Similarly, both :math:`xz` and
|
||||||
must be between :math:`-(x_\text{hi}-x_\text{lo})/2` 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
|
: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),
|
limitation, since if the maximum tilt factor is 5 (as in this
|
||||||
then configurations with tilt :math:`= \dots, -15`, :math:`-5`,
|
example), then configurations with tilt :math:`= \dots, -15`,
|
||||||
:math:`5`, :math:`15`, :math:`25, \dots` are all geometrically
|
:math:`-5`, :math:`5`, :math:`15`, :math:`25, \dots` are all
|
||||||
equivalent. Simulations with large tilt factors will run inefficiently,
|
geometrically equivalent.
|
||||||
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.
|
|
||||||
|
|
||||||
See the :doc:`Howto triclinic <Howto_triclinic>` page for a
|
LAMMPS will issue a warning if the tilt factors of the created box do
|
||||||
geometric description of triclinic boxes, as defined by LAMMPS, and
|
not meet this criterion. This is because simulations with large tilt
|
||||||
how to transform these parameters to and from other commonly used
|
factors may run inefficiently, since they require more ghost atoms and
|
||||||
triclinic representations.
|
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
|
See the :doc:`Howto triclinic <Howto_triclinic>` page for geometric
|
||||||
in the dimension that the tilt is applied to, which is given by the second
|
descriptions of triclinic boxes and tilt factors, as well as how to
|
||||||
dimension of the tilt factor (e.g., :math:`y` for :math:`xy` tilt). This is so
|
transform the restricted triclinic parameters to and from other
|
||||||
that pairs of atoms interacting across that boundary will have one of them
|
commonly used triclinic representations.
|
||||||
shifted by the tilt factor. Periodicity is set by the
|
|
||||||
:doc:`boundary <boundary>` command. For example, if the :math:`xy` tilt factor
|
When a prism region is used, the simulation domain should normally be
|
||||||
is non-zero, then the :math:`y` dimension should be periodic. Similarly, the
|
periodic in the dimension that the tilt is applied to, which is given
|
||||||
:math:`z` dimension should be periodic if :math:`xz` or :math:`yz` is non-zero.
|
by the second dimension of the tilt factor (e.g., :math:`y` for
|
||||||
LAMMPS does not require this periodicity, but you may lose atoms if this is not
|
:math:`xy` tilt). This is so that pairs of atoms interacting across
|
||||||
the case.
|
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
|
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
|
:doc:`fix deform <fix_deform>` command), the simulation box must be
|
||||||
be triclinic, even if the tilt factors are initially 0.0. You can
|
created as triclinic, even if the tilt factors are initially 0.0. You
|
||||||
also change an orthogonal box to a triclinic box or vice versa by
|
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
|
using the :doc:`change box <change_box>` command with its *ortho* and
|
||||||
*triclinic* options.
|
*triclinic* options.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If the system is non-periodic (in a dimension), then you should
|
If the system is non-periodic (in a dimension), then you should not
|
||||||
not make the lo/hi box dimensions (as defined in your
|
make the lo/hi box dimensions (as defined in your :doc:`region
|
||||||
:doc:`region <region>` command) radically smaller/larger than the extent
|
<region>` command) radically smaller/larger than the extent of the
|
||||||
of the atoms you eventually plan to create (e.g., via the
|
atoms you eventually plan to create (e.g., via the
|
||||||
:doc:`create_atoms <create_atoms>` command). For example, if your atoms
|
:doc:`create_atoms <create_atoms>` command). For example, if your
|
||||||
extend from 0 to 50, you should not specify the box bounds as :math:`-10000`
|
atoms extend from 0 to 50, you should not specify the box bounds as
|
||||||
and :math:`10000`. This is because as described above, LAMMPS uses the
|
:math:`-10000` and :math:`10000`. This is because as described
|
||||||
specified box size to lay out the 3d grid of processors. A huge
|
above, LAMMPS uses the specified box size to lay out the 3d grid of
|
||||||
(mostly empty) box will be sub-optimal for performance when using
|
processors. A huge (mostly empty) box will be sub-optimal for
|
||||||
"fixed" boundary conditions (see the :doc:`boundary <boundary>`
|
performance when using "fixed" boundary conditions (see the
|
||||||
command). When using "shrink-wrap" boundary conditions (see the
|
:doc:`boundary <boundary>` command). When using "shrink-wrap"
|
||||||
:doc:`boundary <boundary>` command), a huge (mostly empty) box may cause
|
boundary conditions (see the :doc:`boundary <boundary>` command), a
|
||||||
a parallel simulation to lose atoms the first time that LAMMPS
|
huge (mostly empty) box may cause a parallel simulation to lose
|
||||||
shrink-wraps the box around the atoms.
|
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
|
The optional keywords can be used to create a system that allows for
|
||||||
bond (angle, dihedral, improper) interactions, or for molecules with
|
bond (angle, dihedral, improper) interactions, or for molecules with
|
||||||
special 1--2, 1--3, or 1--4 neighbors to be added later. These optional
|
special 1--2, 1--3, or 1--4 neighbors to be added later. These
|
||||||
keywords serve the same purpose as the analogous keywords that can be
|
optional keywords serve the same purpose as the analogous keywords
|
||||||
used in a data file which are recognized by the
|
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.
|
: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
|
Note that if these keywords are not used, then the create_box command
|
||||||
creates an atomic (non-molecular) simulation that does not allow bonds
|
creates an atomic (non-molecular) simulation that does not allow bonds
|
||||||
between pairs of atoms to be defined, or a
|
between pairs of atoms to be defined, or a :doc:`bond potential
|
||||||
:doc:`bond potential <bond_style>` to be specified, or for molecules with
|
<bond_style>` to be specified, or for molecules with special neighbors
|
||||||
special neighbors to be added to the system by commands such as
|
to be added to the system by commands such as :doc:`create_atoms mol
|
||||||
:doc:`create_atoms mol <create_atoms>`, :doc:`fix deposit <fix_deposit>`
|
<create_atoms>`, :doc:`fix deposit <fix_deposit>` or :doc:`fix pour
|
||||||
or :doc:`fix pour <fix_pour>`.
|
<fix_pour>`.
|
||||||
|
|
||||||
As an example, see the examples/deposit/in.deposit.molecule script,
|
As an example, see the examples/deposit/in.deposit.molecule script,
|
||||||
which deposits molecules onto a substrate. Initially there are no
|
which deposits molecules onto a substrate. Initially there are no
|
||||||
molecules in the system, but they are added later by the
|
molecules in the system, but they are added later by the :doc:`fix
|
||||||
:doc:`fix deposit <fix_deposit>` command. The create_box command in the
|
deposit <fix_deposit>` command. The create_box command in the script
|
||||||
script uses the bond/types and extra/bond/per/atom keywords to allow
|
uses the bond/types and extra/bond/per/atom keywords to allow this.
|
||||||
this. If the added molecule contained more than one special bond
|
If the added molecule contained more than one special bond (allowed by
|
||||||
(allowed by default), an extra/special/per/atom keyword would also
|
default), an extra/special/per/atom keyword would also need to be
|
||||||
need to be specified.
|
specified.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -43,6 +43,9 @@ Examples
|
|||||||
delete_bonds all bond 0*3 special
|
delete_bonds all bond 0*3 special
|
||||||
delete_bonds all stats
|
delete_bonds all stats
|
||||||
|
|
||||||
|
labelmap atom 4 hc
|
||||||
|
delete_bonds all atom hc special
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
@ -59,19 +62,20 @@ For all styles, by default, an interaction is only turned off (or on)
|
|||||||
if all the atoms involved are in the specified group. See the *any*
|
if all the atoms involved are in the specified group. See the *any*
|
||||||
keyword to change the behavior.
|
keyword to change the behavior.
|
||||||
|
|
||||||
Several of the styles (\ *atom*, *bond*, *angle*, *dihedral*,
|
Several of the styles (\ *atom*, *bond*, *angle*, *dihedral*, *improper*\ )
|
||||||
*improper*\ ) take a *type* as an argument. The specified *type* should
|
take a *type* as an argument. The specified *type* can be a
|
||||||
be an integer from 0 to :math:`N`, where :math:`N` is the number of relevant
|
:doc:`type label <Howto_type_labels>`. Otherwise, the type should be an
|
||||||
|
integer from 0 to :math:`N`, where :math:`N` is the number of relevant
|
||||||
types (atom types, bond types, etc.). A value of 0 is only relevant for
|
types (atom types, bond types, etc.). A value of 0 is only relevant for
|
||||||
style *bond*\ ; see details below. In all cases, a wildcard asterisk
|
style *bond*\ ; see details below. For numeric types, a wildcard asterisk
|
||||||
can be used in place of or in conjunction with the *type* argument to
|
can be used in place of or in conjunction with the *type* argument to
|
||||||
specify a range of types. This takes the form "\*" or "\*n" or "m\*" or
|
specify a range of types. This takes the form "\*" or "\*n" or "m\*" or
|
||||||
"m\*n". If :math:`N` is the number of types, then an asterisk with no numeric
|
"m\*n". If :math:`N` is the number of types, then an asterisk with no
|
||||||
values means all types from 0 to :math:`N`. A leading asterisk means all
|
numeric values means all types from 0 to :math:`N`. A leading asterisk
|
||||||
types from 0 to n (inclusive). A trailing asterisk means all types
|
means all types from 0 to n (inclusive). A trailing asterisk means all
|
||||||
from m to N (inclusive). A middle asterisk means all types from m to
|
types from m to N (inclusive). A middle asterisk means all types from m to
|
||||||
n (inclusive). Note that it is fine to include a type of 0 for
|
n (inclusive). Note that it is fine to include a type of 0 for non-bond
|
||||||
non-bond styles; it will simply be ignored.
|
styles; it will simply be ignored.
|
||||||
|
|
||||||
For style *multi* all bond, angle, dihedral, and improper interactions
|
For style *multi* all bond, angle, dihedral, and improper interactions
|
||||||
of any type, involving atoms in the group, are turned off.
|
of any type, involving atoms in the group, are turned off.
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
.. index:: dihedral_style charmm/kk
|
.. index:: dihedral_style charmm/kk
|
||||||
.. index:: dihedral_style charmm/omp
|
.. index:: dihedral_style charmm/omp
|
||||||
.. index:: dihedral_style charmmfsw
|
.. index:: dihedral_style charmmfsw
|
||||||
|
.. index:: dihedral_style charmmfsw/kk
|
||||||
|
|
||||||
dihedral_style charmm command
|
dihedral_style charmm command
|
||||||
=============================
|
=============================
|
||||||
@ -12,6 +13,8 @@ Accelerator Variants: *charmm/intel*, *charmm/kk*, *charmm/omp*
|
|||||||
dihedral_style charmmfsw command
|
dihedral_style charmmfsw command
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
Accelerator Variants: *charmmfsw/kk*
|
||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
@ -144,7 +147,9 @@ for more info.
|
|||||||
Related commands
|
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
|
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
|
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
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
@ -105,6 +105,7 @@ exist.
|
|||||||
* :doc:`charmmfsw <dihedral_charmm>` - CHARMM dihedral with force switching
|
* :doc:`charmmfsw <dihedral_charmm>` - CHARMM dihedral with force switching
|
||||||
* :doc:`class2 <dihedral_class2>` - COMPASS (class 2) dihedral
|
* :doc:`class2 <dihedral_class2>` - COMPASS (class 2) dihedral
|
||||||
* :doc:`cosine/shift/exp <dihedral_cosine_shift_exp>` - dihedral with exponential in spring constant
|
* :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:`fourier <dihedral_fourier>` - dihedral with multiple cosine terms
|
||||||
* :doc:`harmonic <dihedral_harmonic>` - harmonic dihedral
|
* :doc:`harmonic <dihedral_harmonic>` - harmonic dihedral
|
||||||
* :doc:`helix <dihedral_helix>` - helix dihedral
|
* :doc:`helix <dihedral_helix>` - helix dihedral
|
||||||
|
|||||||
139
doc/src/dump.rst
139
doc/src/dump.rst
@ -104,7 +104,6 @@ Syntax
|
|||||||
q, mux, muy, muz, mu,
|
q, mux, muy, muz, mu,
|
||||||
radius, diameter, omegax, omegay, omegaz,
|
radius, diameter, omegax, omegay, omegaz,
|
||||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||||
heatflow, temperature,
|
|
||||||
c_ID, c_ID[I], f_ID, f_ID[I], v_name,
|
c_ID, c_ID[I], f_ID, f_ID[I], v_name,
|
||||||
i_name, d_name, i2_name[I], d2_name[I]
|
i_name, d_name, i2_name[I], d2_name[I]
|
||||||
|
|
||||||
@ -115,6 +114,7 @@ Syntax
|
|||||||
proc = ID of processor that owns atom
|
proc = ID of processor that owns atom
|
||||||
procp1 = ID+1 of processor that owns atom
|
procp1 = ID+1 of processor that owns atom
|
||||||
type = atom type
|
type = atom type
|
||||||
|
typelabel = atom :doc:`type label <Howto_type_labels>`
|
||||||
element = name of atom element, as defined by :doc:`dump_modify <dump_modify>` command
|
element = name of atom element, as defined by :doc:`dump_modify <dump_modify>` command
|
||||||
mass = atom mass
|
mass = atom mass
|
||||||
x,y,z = unscaled atom coordinates
|
x,y,z = unscaled atom coordinates
|
||||||
@ -131,8 +131,6 @@ Syntax
|
|||||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||||
tqx,tqy,tqz = torque on finite-size particles
|
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 = 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)
|
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
|
f_ID = per-atom vector calculated by a fix with ID
|
||||||
@ -278,16 +276,20 @@ format <dump_modify>` command and its options.
|
|||||||
Format of native LAMMPS format dump files:
|
Format of native LAMMPS format dump files:
|
||||||
|
|
||||||
The *atom*, *custom*, *grid*, and *local* styles create files in a
|
The *atom*, *custom*, *grid*, and *local* styles create files in a
|
||||||
simple LAMMPS-specific text format that is self-explanatory when
|
simple LAMMPS-specific text format that is mostly self-explanatory
|
||||||
viewing a dump file. Many post-processing tools either included with
|
when viewing a dump file. Many post-processing tools either included
|
||||||
LAMMPS or third-party tools can read this format, as does the
|
with LAMMPS or third-party tools can read this format, as does the
|
||||||
:doc:`rerun <rerun>` command. See tools described on the :doc:`Tools
|
:doc:`rerun <rerun>` command. See tools described on the :doc:`Tools
|
||||||
<Tools>` doc page for examples, including `Pizza.py
|
<Tools>` doc page for examples, including `Pizza.py
|
||||||
<https://lammps.github.io/pizza>`_.
|
<https://lammps.github.io/pizza>`_.
|
||||||
|
|
||||||
For all these styles, the dimensions of the simulation box are
|
For all these styles, the dimensions of the simulation box are
|
||||||
included in each snapshot. For an orthogonal simulation box this
|
included in each snapshot. The simulation box in LAMMPS can be
|
||||||
information is formatted as:
|
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::
|
.. parsed-literal::
|
||||||
|
|
||||||
@ -304,10 +306,10 @@ the six characters is one of *p* (periodic), *f* (fixed), *s* (shrink wrap),
|
|||||||
or *m* (shrink wrapped with a minimum value). See the
|
or *m* (shrink wrapped with a minimum value). See the
|
||||||
:doc:`boundary <boundary>` command for details.
|
:doc:`boundary <boundary>` command for details.
|
||||||
|
|
||||||
For triclinic simulation boxes (non-orthogonal), an orthogonal
|
For a restricted triclinic simulation box, an orthogonal bounding box
|
||||||
bounding box which encloses the triclinic simulation box is output,
|
which encloses the restricted triclinic simulation box is output,
|
||||||
along with the three tilt factors (*xy*, *xz*, *yz*) of the triclinic box,
|
along with the three tilt factors (*xy*, *xz*, *yz*) of the triclinic
|
||||||
formatted as follows:
|
box, formatted as follows:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
@ -329,6 +331,10 @@ bounding box extents (xlo_bound, xhi_bound, etc.) are calculated from the
|
|||||||
triclinic parameters, and how to transform those parameters to and
|
triclinic parameters, and how to transform those parameters to and
|
||||||
from other commonly used triclinic representations.
|
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
|
The *atom* and *custom* styles output a "ITEM: NUMBER OF ATOMS" line
|
||||||
with the count of atoms in the snapshot. Likewise they output an
|
with the count of atoms in the snapshot. Likewise they output an
|
||||||
"ITEM: ATOMS" line which includes column descriptors for the per-atom
|
"ITEM: ATOMS" line which includes column descriptors for the per-atom
|
||||||
@ -400,7 +406,6 @@ command.
|
|||||||
|
|
||||||
Dump files in other popular formats:
|
Dump files in other popular formats:
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
This section only discusses file formats relevant to this doc page.
|
This section only discusses file formats relevant to this doc page.
|
||||||
@ -466,8 +471,9 @@ followed by one line per atom with the atom type and the :math:`x`-,
|
|||||||
:math:`y`-, and :math:`z`-coordinate of that atom. You can use the
|
:math:`y`-, and :math:`z`-coordinate of that atom. You can use the
|
||||||
:doc:`dump_modify element <dump_modify>` option to change the output
|
:doc:`dump_modify element <dump_modify>` option to change the output
|
||||||
from using the (numerical) atom type to an element name (or some other
|
from using the (numerical) atom type to an element name (or some other
|
||||||
label). This will help many visualization programs to guess bonds and
|
label). This option will help many visualization programs to guess bonds
|
||||||
colors.
|
and colors. You can use the :doc:`dump_modify types labels <dump_modify>`
|
||||||
|
option to replace numeric atom types with :doc:`type labels <Howto_type_labels>`.
|
||||||
|
|
||||||
.. versionadded:: 22Dec2022
|
.. versionadded:: 22Dec2022
|
||||||
|
|
||||||
@ -656,6 +662,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:
|
Arguments for different styles:
|
||||||
|
|
||||||
The sections below describe per-atom, local, and per grid cell
|
The sections below describe per-atom, local, and per grid cell
|
||||||
@ -689,21 +776,21 @@ command creates a per-atom array with six columns:
|
|||||||
|
|
||||||
Per-atom attributes used as arguments to the *custom* and *cfg* styles:
|
Per-atom attributes used as arguments to the *custom* and *cfg* styles:
|
||||||
|
|
||||||
The *id*, *mol*, *proc*, *procp1*, *type*, *element*, *mass*, *vx*,
|
The *id*, *mol*, *proc*, *procp1*, *type*, *typelabel*, *element*, *mass*,
|
||||||
*vy*, *vz*, *fx*, *fy*, *fz*, *q* attributes are self-explanatory.
|
*vx*, *vy*, *vz*, *fx*, *fy*, *fz*, *q* attributes are self-explanatory.
|
||||||
|
|
||||||
*Id* is the atom ID. *Mol* is the molecule ID, included in the data
|
*Id* is the atom ID. *Mol* is the molecule ID, included in the data file
|
||||||
file for molecular systems. *Proc* is the ID of the processor (0 to
|
for molecular systems. *Proc* is the ID of the processor (0 to
|
||||||
:math:`N_\text{procs}-1`) that currently owns the atom. *Procp1* is the
|
:math:`N_\text{procs}-1`) that currently owns the atom. *Procp1* is the
|
||||||
proc ID+1, which can be convenient in place of a *type* attribute (1 to
|
proc ID+1, which can be convenient in place of a *type* attribute (1 to
|
||||||
:math:`N_\text{types}`) for coloring atoms in a visualization program.
|
:math:`N_\text{types}`) for coloring atoms in a visualization program.
|
||||||
*Type* is the atom type (1 to :math:`N_\text{types}`). *Element* is
|
*Type* is the atom type (1 to :math:`N_\text{types}`). *Typelabel* is the
|
||||||
typically the chemical name of an element, which you must assign to each
|
atom :doc:`type label <Howto_type_labels>`. *Element* is typically the
|
||||||
type via the :doc:`dump_modify element <dump_modify>` command. More
|
chemical name of an element, which you must assign to each type via the
|
||||||
generally, it can be any string you wish to associated with an atom
|
:doc:`dump_modify element <dump_modify>` command. More generally, it can
|
||||||
type. *Mass* is the atom mass. The quantities *vx*, *vy*, *vz*, *fx*,
|
be any string you wish to associated with an atom type. *Mass* is the atom
|
||||||
*fy*, *fz*, and *q* are components of atom velocity and force and atomic
|
mass. The quantities *vx*, *vy*, *vz*, *fx*, *fy*, *fz*, and *q* are
|
||||||
charge.
|
components of atom velocity and force and atomic charge.
|
||||||
|
|
||||||
There are several options for outputting atom coordinates. The *x*,
|
There are several options for outputting atom coordinates. The *x*,
|
||||||
*y*, and *z* attributes write atom coordinates "unscaled", in the
|
*y*, and *z* attributes write atom coordinates "unscaled", in the
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Syntax
|
|||||||
* one or more keyword/value pairs may be appended
|
* one or more keyword/value pairs may be appended
|
||||||
|
|
||||||
* these keywords apply to various dump styles
|
* 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 *types* or *units* or *unwrap*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
@ -74,12 +74,14 @@ Syntax
|
|||||||
-N = sort per-atom lines in descending order by the Nth column
|
-N = sort per-atom lines in descending order by the Nth column
|
||||||
*tfactor* arg = time scaling factor (> 0.0)
|
*tfactor* arg = time scaling factor (> 0.0)
|
||||||
*thermo* arg = *yes* or *no*
|
*thermo* arg = *yes* or *no*
|
||||||
*time* arg = *yes* or *no*
|
|
||||||
*thresh* args = attribute operator value
|
*thresh* args = attribute operator value
|
||||||
attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style
|
attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style
|
||||||
operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "\|\^"
|
operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "\|\^"
|
||||||
value = numeric value to compare to, or LAST
|
value = numeric value to compare to, or LAST
|
||||||
these 3 args can be replaced by the word "none" to turn off thresholding
|
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*
|
||||||
|
*types* value = *numeric* or *labels*
|
||||||
*units* arg = *yes* or *no*
|
*units* arg = *yes* or *no*
|
||||||
*unwrap* arg = *yes* or *no*
|
*unwrap* arg = *yes* or *no*
|
||||||
|
|
||||||
@ -802,8 +804,9 @@ region since the last dump.
|
|||||||
dump_modify ... thresh v_charge |^ LAST
|
dump_modify ... thresh v_charge |^ LAST
|
||||||
|
|
||||||
This will dump atoms whose charge has changed from an absolute value
|
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
|
less than :math:`\frac12` to greater than :math:`\frac12` (or vice
|
||||||
reactive force field).
|
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
|
The choice of operators listed above are the usual comparison
|
||||||
operators. The XOR operation (exclusive or) is also included as "\|\^".
|
operators. The XOR operation (exclusive or) is also included as "\|\^".
|
||||||
@ -811,6 +814,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
|
0.0 and the other is non-zero, then the result is "true" and the
|
||||||
threshold criterion is met. Otherwise it is not met.
|
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*,
|
The *time* keyword only applies to the dump *atom*, *custom*, *local*,
|
||||||
@ -835,6 +850,36 @@ The default setting is *no*\ .
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
The *types* keyword applies only to the dump xyz style. If this keyword is
|
||||||
|
used with a value of *numeric*, then numeric atom types are printed in the
|
||||||
|
xyz file (default). If the value *labels* is specified, then
|
||||||
|
:doc:`type labels <Howto_type_labels>` are printed for atom types.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
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
|
The *units* keyword only applies to the dump *atom*, *custom*, and
|
||||||
*local* styles (and their COMPRESS package versions *atom/gz*,
|
*local* styles (and their COMPRESS package versions *atom/gz*,
|
||||||
*custom/gz* and *local/gz*\ ). If set to *yes*, each individual dump
|
*custom/gz* and *local/gz*\ ). If set to *yes*, each individual dump
|
||||||
@ -922,10 +967,12 @@ The option defaults are
|
|||||||
* sort = off for dump styles *atom*, *custom*, *cfg*, and *local*
|
* sort = off for dump styles *atom*, *custom*, *cfg*, and *local*
|
||||||
* sort = id for dump styles *dcd*, *xtc*, and *xyz*
|
* sort = id for dump styles *dcd*, *xtc*, and *xyz*
|
||||||
* thresh = none
|
* thresh = none
|
||||||
|
* time = no
|
||||||
|
* triclinic/general = no
|
||||||
|
* types = numeric
|
||||||
* units = no
|
* units = no
|
||||||
* unwrap = no
|
* unwrap = no
|
||||||
|
|
||||||
* compression_level = 9 (gz variants)
|
* compression_level = 9 (gz variants)
|
||||||
* compression_level = 0 (zstd variants)
|
* compression_level = 0 (zstd variants)
|
||||||
* checksum = yes (zstd variants)
|
* checksum = yes (zstd variants)
|
||||||
|
|
||||||
|
|||||||
@ -226,6 +226,7 @@ accelerated styles exist.
|
|||||||
* :doc:`controller <fix_controller>` - apply control loop feedback mechanism
|
* :doc:`controller <fix_controller>` - apply control loop feedback mechanism
|
||||||
* :doc:`damping/cundall <fix_damping_cundall>` - Cundall non-viscous damping for granular simulations
|
* :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 <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:`deposit <fix_deposit>` - add new atoms above a surface
|
||||||
* :doc:`dpd/energy <fix_dpd_energy>` - constant energy dissipative particle dynamics
|
* :doc:`dpd/energy <fix_dpd_energy>` - constant energy dissipative particle dynamics
|
||||||
* :doc:`drag <fix_drag>` - drag atoms towards a defined coordinate
|
* :doc:`drag <fix_drag>` - drag atoms towards a defined coordinate
|
||||||
@ -431,6 +432,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/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/colloid <fix_wall>` - Lennard-Jones wall interacting with finite-size particles
|
||||||
* :doc:`wall/ees <fix_wall_ees>` - wall for ellipsoidal 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 <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/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
|
* :doc:`wall/harmonic <fix_wall>` - harmonic spring wall
|
||||||
|
|||||||
@ -21,17 +21,17 @@ Syntax
|
|||||||
*pair* args = pstyle pparam I J v_name
|
*pair* args = pstyle pparam I J v_name
|
||||||
pstyle = pair style name (e.g., lj/cut)
|
pstyle = pair style name (e.g., lj/cut)
|
||||||
pparam = parameter to adapt over time
|
pparam = parameter to adapt over time
|
||||||
I,J = type pair(s) to set parameter for
|
I,J = type pair(s) to set parameter for (integer or type label)
|
||||||
v_name = variable with name that calculates value of pparam
|
v_name = variable with name that calculates value of pparam
|
||||||
*bond* args = bstyle bparam I v_name
|
*bond* args = bstyle bparam I v_name
|
||||||
bstyle = bond style name (e.g., harmonic)
|
bstyle = bond style name (e.g., harmonic)
|
||||||
bparam = parameter to adapt over time
|
bparam = parameter to adapt over time
|
||||||
I = type bond to set parameter for
|
I = type bond to set parameter for (integer or type label)
|
||||||
v_name = variable with name that calculates value of bparam
|
v_name = variable with name that calculates value of bparam
|
||||||
*angle* args = astyle aparam I v_name
|
*angle* args = astyle aparam I v_name
|
||||||
astyle = angle style name (e.g., harmonic)
|
astyle = angle style name (e.g., harmonic)
|
||||||
aparam = parameter to adapt over time
|
aparam = parameter to adapt over time
|
||||||
I = type angle to set parameter for
|
I = type angle to set parameter for (integer or type label)
|
||||||
v_name = variable with name that calculates value of aparam
|
v_name = variable with name that calculates value of aparam
|
||||||
*kspace* arg = v_name
|
*kspace* arg = v_name
|
||||||
v_name = variable with name that calculates scale factor on :math:`k`-space terms
|
v_name = variable with name that calculates scale factor on :math:`k`-space terms
|
||||||
@ -67,6 +67,9 @@ Examples
|
|||||||
variable ramp_up equal "ramp(0.01,0.5)"
|
variable ramp_up equal "ramp(0.01,0.5)"
|
||||||
fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up
|
fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up
|
||||||
|
|
||||||
|
labelmap atom 1 c1
|
||||||
|
fix 1 all adapt 1 pair soft a c1 c1 v_prefactor
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
@ -254,10 +257,12 @@ should be specified to indicate which type pairs to apply it to. If a global
|
|||||||
parameter is specified, the :math:`I` and :math:`J` settings still need to be
|
parameter is specified, the :math:`I` and :math:`J` settings still need to be
|
||||||
specified, but are ignored.
|
specified, but are ignored.
|
||||||
|
|
||||||
Similar to the :doc:`pair_coeff command <pair_coeff>`, :math:`I` and :math:`J`
|
Similar to the :doc:`pair_coeff command <pair_coeff>`, :math:`I` and
|
||||||
can be specified in one of two ways. Explicit numeric values can be used for
|
:math:`J` can be specified in one of several ways. Explicit numeric values
|
||||||
each, as in the first example above. :math:`I \le J` is required. LAMMPS sets
|
can be used for each, as in the first example above. Or, one or both of
|
||||||
the coefficients for the symmetric :math:`J,I` interaction to the same values.
|
the types in the I,J pair can be a :doc:`type label <Howto_type_labels>`.
|
||||||
|
LAMMPS sets the coefficients for the symmetric :math:`J,I` interaction to
|
||||||
|
the same values.
|
||||||
|
|
||||||
A wild-card asterisk can be used in place of or in conjunction with
|
A wild-card asterisk can be used in place of or in conjunction with
|
||||||
the :math:`I,J` arguments to set the coefficients for multiple pairs of atom
|
the :math:`I,J` arguments to set the coefficients for multiple pairs of atom
|
||||||
@ -266,8 +271,9 @@ is the number of atom types, then an asterisk with no numeric values
|
|||||||
means all types from 1 to :math:`N`. A leading asterisk means all types from
|
means all types from 1 to :math:`N`. A leading asterisk means all types from
|
||||||
1 to n (inclusive). A trailing asterisk means all types from m to :math:`N`
|
1 to n (inclusive). A trailing asterisk means all types from m to :math:`N`
|
||||||
(inclusive). A middle asterisk means all types from m to n
|
(inclusive). A middle asterisk means all types from m to n
|
||||||
(inclusive). Note that only type pairs with :math:`I \le J` are considered; if
|
(inclusive). For the asterisk syntax, note that only type pairs with
|
||||||
asterisks imply type pairs where :math:`J < I`, they are ignored.
|
:math:`I \le J` are considered; if asterisks imply type pairs where
|
||||||
|
:math:`J < I`, they are ignored.
|
||||||
|
|
||||||
IMPORTANT NOTE: If :doc:`pair_style hybrid or hybrid/overlay
|
IMPORTANT NOTE: If :doc:`pair_style hybrid or hybrid/overlay
|
||||||
<pair_hybrid>` is being used, then the *pstyle* will be a sub-style
|
<pair_hybrid>` is being used, then the *pstyle* will be a sub-style
|
||||||
|
|||||||
@ -21,13 +21,13 @@ Syntax
|
|||||||
*pair* args = pstyle pparam I J v_name
|
*pair* args = pstyle pparam I J v_name
|
||||||
pstyle = pair style name (e.g., lj/cut)
|
pstyle = pair style name (e.g., lj/cut)
|
||||||
pparam = parameter to adapt over time
|
pparam = parameter to adapt over time
|
||||||
I,J = type pair(s) to set parameter for
|
I,J = type pair(s) to set parameter for (integer or type label)
|
||||||
v_name = variable with name that calculates value of pparam
|
v_name = variable with name that calculates value of pparam
|
||||||
*kspace* arg = v_name
|
*kspace* arg = v_name
|
||||||
v_name = variable with name that calculates scale factor on K-space terms
|
v_name = variable with name that calculates scale factor on K-space terms
|
||||||
*atom* args = aparam v_name
|
*atom* args = aparam v_name
|
||||||
aparam = parameter to adapt over time
|
aparam = parameter to adapt over time
|
||||||
I = type(s) to set parameter for
|
I = type(s) to set parameter for (integer or type label)
|
||||||
v_name = variable with name that calculates value of aparam
|
v_name = variable with name that calculates value of aparam
|
||||||
|
|
||||||
* zero or more keyword/value pairs may be appended
|
* zero or more keyword/value pairs may be appended
|
||||||
@ -56,6 +56,9 @@ Examples
|
|||||||
fix 1 all adapt/fep 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
|
fix 1 all adapt/fep 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
|
||||||
fix 1 all adapt/fep 10 atom diameter 1 v_size
|
fix 1 all adapt/fep 10 atom diameter 1 v_size
|
||||||
|
|
||||||
|
labelmap atom 1 c1
|
||||||
|
fix 1 all adapt/fep 1 pair soft a c1 c1 v_prefactor
|
||||||
|
|
||||||
|
|
||||||
Example input scripts available: examples/PACKAGES/fep
|
Example input scripts available: examples/PACKAGES/fep
|
||||||
|
|
||||||
@ -218,10 +221,12 @@ be specified to indicate which type pairs to apply it to. If a global
|
|||||||
parameter is specified, the *I* and *J* settings still need to be
|
parameter is specified, the *I* and *J* settings still need to be
|
||||||
specified, but are ignored.
|
specified, but are ignored.
|
||||||
|
|
||||||
Similar to the :doc:`pair_coeff command <pair_coeff>`, I and J can be
|
Similar to the :doc:`pair_coeff command <pair_coeff>`, :math:`I` and
|
||||||
specified in one of two ways. Explicit numeric values can be used for
|
:math:`J` can be specified in one of several ways. Explicit numeric values
|
||||||
each, as in the first example above. :math:`I \le J` is required. LAMMPS sets
|
can be used for each, as in the first example above. Or, one or both of
|
||||||
the coefficients for the symmetric J,I interaction to the same values.
|
the types in the I,J pair can be a :doc:`type label <Howto_type_labels>`.
|
||||||
|
LAMMPS sets the coefficients for the symmetric :math:`J,I` interaction to
|
||||||
|
the same values.
|
||||||
|
|
||||||
A wild-card asterisk can be used in place of or in conjunction with
|
A wild-card asterisk can be used in place of or in conjunction with
|
||||||
the :math:`I,J` arguments to set the coefficients for multiple pairs of atom
|
the :math:`I,J` arguments to set the coefficients for multiple pairs of atom
|
||||||
@ -230,8 +235,9 @@ the number of atom types, then an asterisk with no numeric values means
|
|||||||
all types from 1 to :math:`N`. A leading asterisk means all types from 1 to n
|
all types from 1 to :math:`N`. A leading asterisk means all types from 1 to n
|
||||||
(inclusive). A trailing asterisk means all types from m to :math:`N`
|
(inclusive). A trailing asterisk means all types from m to :math:`N`
|
||||||
(inclusive). A middle asterisk means all types from m to n
|
(inclusive). A middle asterisk means all types from m to n
|
||||||
(inclusive). Note that only type pairs with :math:`I \le J` are considered; if
|
(inclusive). For the asterisk syntax, note that only type pairs with
|
||||||
asterisks imply type pairs where :math:`J < I`, they are ignored.
|
:math:`I \le J` are considered; if asterisks imply type pairs where
|
||||||
|
:math:`J < I`, they are ignored.
|
||||||
|
|
||||||
IMPROTANT NOTE: If :doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>` is
|
IMPROTANT NOTE: If :doc:`pair_style hybrid or hybrid/overlay <pair_hybrid>` is
|
||||||
being used, then the *pstyle* will be a sub-style name. You must specify
|
being used, then the *pstyle* will be a sub-style name. You must specify
|
||||||
|
|||||||
@ -35,7 +35,11 @@ the implementation of AMOEBA and HIPPO in LAMMPS.
|
|||||||
|
|
||||||
Bitorsion interactions add additional potential energy contributions
|
Bitorsion interactions add additional potential energy contributions
|
||||||
to pairs of overlapping phi-psi dihedrals of amino-acids, which are
|
to pairs of overlapping phi-psi dihedrals of amino-acids, which are
|
||||||
important to properly represent their conformational behavior.
|
important to properly represent their conformational behavior. Each
|
||||||
|
bitorsion interaction is thus defined for a 5-tuple of atoms
|
||||||
|
:math:`IJKLM` with bonds between successive atoms in the list,
|
||||||
|
i.e. two overlapping dihedral interactions for atoms :math:`IJKL` and
|
||||||
|
:math:`JKLM`.
|
||||||
|
|
||||||
The examples/amoeba directory has a sample input script and data file
|
The examples/amoeba directory has a sample input script and data file
|
||||||
for ubiquitin, which illustrates use of the fix amoeba/bitorsion
|
for ubiquitin, which illustrates use of the fix amoeba/bitorsion
|
||||||
@ -68,14 +72,15 @@ lines:
|
|||||||
[...]
|
[...]
|
||||||
N 3 314 315 317 318 330
|
N 3 314 315 317 318 330
|
||||||
|
|
||||||
The first column is an index from 1 to :math:`N` to enumerate the bitorsion
|
The first column is an index from 1 to :math:`N` to enumerate the
|
||||||
5-atom tuples; it is ignored by LAMMPS. The second column is the
|
bitorsion 5-atom tuples; it is ignored by LAMMPS. The second column
|
||||||
*type* of the interaction; it is an index into the bitorsion force
|
is the *type* of the interaction; it is an index into the bitorsion
|
||||||
field file. The remaining 5 columns are the atom IDs of the atoms in
|
force field file. The remaining 5 columns are the atom IDs of the
|
||||||
the two 4-atom dihedrals that overlap to create the bitorsion 5-body
|
atoms (in order) for the 5-tuple :math:`IJKLM`, as described above.
|
||||||
interaction. Note that the *bitorsions* and *BiTorsions* keywords for
|
|
||||||
the header and body sections match those specified in the
|
Note that the *bitorsions* and *BiTorsions* keywords for the header
|
||||||
:doc:`read_data <read_data>` command following the data file name.
|
and body sections match those specified in the :doc:`read_data
|
||||||
|
<read_data>` command following the data file name.
|
||||||
|
|
||||||
The data file should be generated by using the
|
The data file should be generated by using the
|
||||||
tools/tinker/tinker2lmp.py conversion script which creates a LAMMPS
|
tools/tinker/tinker2lmp.py conversion script which creates a LAMMPS
|
||||||
|
|||||||
@ -57,7 +57,7 @@ should have two lines like these in its header section:
|
|||||||
M pitorsion types
|
M pitorsion types
|
||||||
N pitorsions
|
N pitorsions
|
||||||
|
|
||||||
where :math:`N` is the number of pitorsion 5-body interactions and :math:`M` is
|
where :math:`N` is the number of pitorsion 6-body interactions and :math:`M` is
|
||||||
the number of pitorsion types. It should also have two sections in the body
|
the number of pitorsion types. It should also have two sections in the body
|
||||||
of the data file like these with :math:`M` and :math:`N` lines each:
|
of the data file like these with :math:`M` and :math:`N` lines each:
|
||||||
|
|
||||||
@ -74,21 +74,20 @@ of the data file like these with :math:`M` and :math:`N` lines each:
|
|||||||
|
|
||||||
PiTorsions
|
PiTorsions
|
||||||
|
|
||||||
1 1 8 10 12 18 20
|
1 1 2 4 3 20 21 24
|
||||||
2 5 18 20 22 25 27
|
2 5 21 23 22 37 38 41
|
||||||
[...]
|
[...]
|
||||||
N 3 314 315 317 318 330
|
N 7 27 29 28 30 35 36
|
||||||
|
|
||||||
For PiTorsion Coeffs, the first column is an index from 1 to :math:`M` to
|
For PiTorsion Coeffs, the first column is an index from 1 to :math:`M`
|
||||||
enumerate the pitorsion types. The second column is the single
|
to enumerate the pitorsion types. The second column is the single
|
||||||
prefactor coefficient needed for each type.
|
prefactor coefficient needed for each type.
|
||||||
|
|
||||||
For PiTorsions, the first column is an index from 1 to :math:`N` to enumerate
|
For PiTorsions, the first column is an index from 1 to :math:`N` to
|
||||||
the pitorsion 5-atom tuples; it is ignored by LAMMPS. The second
|
enumerate the pitorsion 6-atom tuples; it is ignored by LAMMPS. The
|
||||||
column is the "type" of the interaction; it is an index into the
|
second column is the "type" of the interaction; it is an index into
|
||||||
PiTorsion Coeffs. The remaining 5 columns are the atom IDs of the
|
the PiTorsion Coeffs. The remaining 6 columns are the atom IDs of the
|
||||||
atoms in the two 4-atom dihedrals that overlap to create the pitorsion
|
atoms (in order) for the 6-tuple :math:`IJKLMN`, as described above.
|
||||||
5-body interaction.
|
|
||||||
|
|
||||||
Note that the *pitorsion types* and *pitorsions* and *PiTorsion
|
Note that the *pitorsion types* and *pitorsions* and *PiTorsion
|
||||||
Coeffs* and *PiTorsions* keywords for the header and body sections of
|
Coeffs* and *PiTorsions* keywords for the header and body sections of
|
||||||
|
|||||||
@ -21,7 +21,7 @@ Syntax
|
|||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
*types* values = two or more atom types
|
*types* values = two or more atom types (1-Ntypes or type label)
|
||||||
*mu* values = chemical potential of swap types (energy units)
|
*mu* values = chemical potential of swap types (energy units)
|
||||||
*ke* value = *no* or *yes*
|
*ke* value = *no* or *yes*
|
||||||
*no* = no conservation of kinetic energy after atom swaps
|
*no* = no conservation of kinetic energy after atom swaps
|
||||||
@ -168,7 +168,7 @@ the following global cumulative quantities:
|
|||||||
* 1 = swap attempts
|
* 1 = swap attempts
|
||||||
* 2 = swap accepts
|
* 2 = swap accepts
|
||||||
|
|
||||||
The vector values calculated by this fix are "extensive".
|
The vector values calculated by this fix are "intensive".
|
||||||
|
|
||||||
No parameter of this fix can be used with the *start/stop* keywords of
|
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
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user