Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp

This commit is contained in:
Andreas Singraber
2021-04-20 23:20:14 +02:00
983 changed files with 37279 additions and 7384 deletions

View File

@ -24,7 +24,9 @@ jobs:
shell: bash shell: bash
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
run: | run: |
cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake \ cmake -C $GITHUB_WORKSPACE/cmake/presets/clang.cmake \
-C $GITHUB_WORKSPACE/cmake/presets/most.cmake \
$GITHUB_WORKSPACE/cmake \
-DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON -DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON
cmake --build . --parallel 2 cmake --build . --parallel 2

View File

@ -22,6 +22,11 @@ set(LAMMPS_TOOLS_DIR ${LAMMPS_DIR}/tools)
set(LAMMPS_PYTHON_DIR ${LAMMPS_DIR}/python) set(LAMMPS_PYTHON_DIR ${LAMMPS_DIR}/python)
set(LAMMPS_POTENTIALS_DIR ${LAMMPS_DIR}/potentials) set(LAMMPS_POTENTIALS_DIR ${LAMMPS_DIR}/potentials)
set(LAMMPS_DOWNLOADS_URL "https://download.lammps.org" CACHE STRING "Base URL for LAMMPS downloads")
set(LAMMPS_POTENTIALS_URL "${LAMMPS_DOWNLOADS_URL}/potentials")
set(LAMMPS_THIRDPARTY_URL "${LAMMPS_DOWNLOADS_URL}/thirdparty")
mark_as_advanced(LAMMPS_DOWNLOADS_URL)
find_package(Git) find_package(Git)
# by default, install into $HOME/.local (not /usr/local), so that no root access (and sudo!!) is needed # by default, install into $HOME/.local (not /usr/local), so that no root access (and sudo!!) is needed
@ -113,13 +118,13 @@ option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS
QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI PLUGIN QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-HDNNP USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC
USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF) USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-PACE)
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP) set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP)
@ -264,6 +269,7 @@ endif()
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool") set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
mark_as_advanced(ENABLE_IWYU) mark_as_advanced(ENABLE_IWYU)
if(ENABLE_IWYU) if(ENABLE_IWYU)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_program(IWYU_EXE NAMES include-what-you-use iwyu) find_program(IWYU_EXE NAMES include-what-you-use iwyu)
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py) find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
if (IWYU_EXE AND IWYU_TOOL) if (IWYU_EXE AND IWYU_TOOL)
@ -382,7 +388,7 @@ else()
endif() endif()
foreach(PKG_WITH_INCL KSPACE PYTHON MLIAP VORONOI USER-COLVARS USER-HDNNP USER-MOLFILE USER-NETCDF USER-PLUMED USER-QMMM foreach(PKG_WITH_INCL KSPACE PYTHON MLIAP VORONOI USER-COLVARS USER-HDNNP USER-MOLFILE USER-NETCDF USER-PLUMED USER-QMMM
USER-QUIP USER-SCAFACOS USER-SMD USER-VTK KIM LATTE MESSAGE MSCG COMPRESS) USER-QUIP USER-SCAFACOS USER-SMD USER-VTK KIM LATTE MESSAGE MSCG COMPRESS USER-PACE)
if(PKG_${PKG_WITH_INCL}) if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL}) include(Packages/${PKG_WITH_INCL})
endif() endif()
@ -533,6 +539,18 @@ foreach(PKG_WITH_INCL CORESHELL QEQ USER-OMP USER-SDPD KOKKOS OPT USER-INTEL GPU
endif() endif()
endforeach() endforeach()
if(PKG_PLUGIN)
if(BUILD_SHARED_LIBS)
target_compile_definitions(lammps PRIVATE -DLMP_PLUGIN)
else()
message(WARNING "Plugin loading will not work unless BUILD_SHARED_LIBS is enabled")
endif()
# link with -ldl or equivalent for plugin loading; except on Windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(lammps PRIVATE ${CMAKE_DL_LIBS})
endif()
endif()
###################################################################### ######################################################################
# the windows version of LAMMPS requires a couple extra libraries # the windows version of LAMMPS requires a couple extra libraries
# and the MPI library - if use - has to be linked right before those # and the MPI library - if use - has to be linked right before those
@ -713,7 +731,7 @@ get_target_property(DEFINES lammps COMPILE_DEFINITIONS)
include(FeatureSummary) include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND) feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
message(STATUS "<<< Build configuration >>> message(STATUS "<<< Build configuration >>>
Operating System: ${CMAKE_SYSTEM_NAME} Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
Build type: ${CMAKE_BUILD_TYPE} Build type: ${CMAKE_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX} Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}") Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")

View File

@ -55,11 +55,15 @@ if(BUILD_DOC)
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
) )
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "a4a6a093a89bc2ccab1452d766b98e53" CACHE STRING "MD5 checksum of MathJax tarball")
mark_as_advanced(MATHJAX_URL)
# download mathjax distribution and unpack to folder "mathjax" # download mathjax distribution and unpack to folder "mathjax"
if(NOT EXISTS ${DOC_BUILD_STATIC_DIR}/mathjax/es5) if(NOT EXISTS ${DOC_BUILD_STATIC_DIR}/mathjax/es5)
file(DOWNLOAD "https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" file(DOWNLOAD ${MATHJAX_URL}
"${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz"
EXPECTED_MD5 a4a6a093a89bc2ccab1452d766b98e53) EXPECTED_MD5 ${MATHJAX_MD5})
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB MATHJAX_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*) file(GLOB MATHJAX_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax) execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)

View File

@ -8,10 +8,12 @@ endif()
include(ExternalProject) include(ExternalProject)
set(GTEST_URL "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" CACHE STRING "URL for GTest tarball") set(GTEST_URL "https://github.com/google/googletest/archive/release-1.10.0.tar.gz" CACHE STRING "URL for GTest tarball")
set(GTEST_MD5 "ecd1fa65e7de707cd5c00bdac56022cd" CACHE STRING "MD5 checksum of GTest tarball")
mark_as_advanced(GTEST_URL) mark_as_advanced(GTEST_URL)
mark_as_advanced(GTEST_MD5)
ExternalProject_Add(googletest ExternalProject_Add(googletest
URL ${GTEST_URL} URL ${GTEST_URL}
URL_MD5 ecd1fa65e7de707cd5c00bdac56022cd URL_MD5 ${GTEST_MD5}
SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src" SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build" BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build"
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_GTEST_OPTS} CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_GTEST_OPTS}

View File

@ -86,7 +86,6 @@ endfunction(GenerateBinaryHeader)
# fetch missing potential files # fetch missing potential files
function(FetchPotentials pkgfolder potfolder) function(FetchPotentials pkgfolder potfolder)
if (EXISTS "${pkgfolder}/potentials.txt") if (EXISTS "${pkgfolder}/potentials.txt")
set(LAMMPS_POTENTIALS_URL "https://download.lammps.org/potentials")
file(STRINGS "${pkgfolder}/potentials.txt" linelist REGEX "^[^#].") file(STRINGS "${pkgfolder}/potentials.txt" linelist REGEX "^[^#].")
foreach(line ${linelist}) foreach(line ${linelist})
string(FIND ${line} " " blank) string(FIND ${line} " " blank)
@ -105,3 +104,13 @@ function(FetchPotentials pkgfolder potfolder)
endforeach() endforeach()
endif() endif()
endfunction(FetchPotentials) endfunction(FetchPotentials)
# set CMAKE_LINUX_DISTRO and CMAKE_DISTRO_VERSION on Linux
if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (EXISTS /etc/os-release))
file(STRINGS /etc/os-release distro REGEX "^NAME=")
string(REGEX REPLACE "NAME=\"?([^\"]*)\"?" "\\1" distro "${distro}")
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=")
string(REGEX REPLACE "VERSION_ID=\"?([^\"]*)\"?" "\\1" disversion "${disversion}")
set(CMAKE_LINUX_DISTRO ${distro})
set(CMAKE_DISTRO_VERSION ${disversion})
endif()

View File

@ -1,16 +1,25 @@
# Download and configure custom MPICH files for Windows # Download and configure custom MPICH files for Windows
message(STATUS "Downloading and configuring MPICH-1.4.1 for Windows") message(STATUS "Downloading and configuring MPICH-1.4.1 for Windows")
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" CACHE STRING "URL for MPICH2 (win64) tarball")
set(MPICH2_WIN32_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win32-devel.tar.gz" CACHE STRING "URL for MPICH2 (win32) tarball")
set(MPICH2_WIN64_DEVEL_MD5 "4939fdb59d13182fd5dd65211e469f14" CACHE STRING "MD5 checksum of MPICH2 (win64) tarball")
set(MPICH2_WIN32_DEVEL_MD5 "a61d153500dce44e21b755ee7257e031" CACHE STRING "MD5 checksum of MPICH2 (win32) tarball")
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
mark_as_advanced(MPICH2_WIN32_DEVEL_URL)
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
mark_as_advanced(MPICH2_WIN32_DEVEL_MD5)
include(ExternalProject) include(ExternalProject)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
ExternalProject_Add(mpi4win_build ExternalProject_Add(mpi4win_build
URL https://download.lammps.org/thirdparty/mpich2-win64-devel.tar.gz URL ${MPICH2_WIN64_DEVEL_URL}
URL_MD5 4939fdb59d13182fd5dd65211e469f14 URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a) BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
else() else()
ExternalProject_Add(mpi4win_build ExternalProject_Add(mpi4win_build
URL https://download.lammps.org/thirdparty/mpich2-win32-devel.tar.gz URL ${MPICH2_WIN32_DEVEL_URL}
URL_MD5 a61d153500dce44e21b755ee7257e031 URL_MD5 ${MPICH2_WIN32_DEVEL_MD5}
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a) BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
endif() endif()

View File

@ -1,11 +1,13 @@
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-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
set(OPENCL_LOADER_MD5 "011cdcbd41030be94f3fced6d763a52a" CACHE STRING "MD5 checksum of OpenCL loader tarball")
mark_as_advanced(OPENCL_LOADER_URL)
mark_as_advanced(OPENCL_LOADER_MD5)
include(ExternalProject) include(ExternalProject)
set(OPENCL_LOADER_URL "https://download.lammps.org/thirdparty/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
mark_as_advanced(OPENCL_LOADER_URL)
ExternalProject_Add(opencl_loader ExternalProject_Add(opencl_loader
URL ${OPENCL_LOADER_URL} URL ${OPENCL_LOADER_URL}
URL_MD5 011cdcbd41030be94f3fced6d763a52a URL_MD5 ${OPENCL_LOADER_MD5}
SOURCE_DIR "${CMAKE_BINARY_DIR}/opencl_loader-src" SOURCE_DIR "${CMAKE_BINARY_DIR}/opencl_loader-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/opencl_loader-build" BINARY_DIR "${CMAKE_BINARY_DIR}/opencl_loader-build"
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_OPENCL_LOADER_OPTS} CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_OPENCL_LOADER_OPTS}

View File

@ -131,7 +131,7 @@ if(GPU_API STREQUAL "CUDA")
add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS}) add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY}) target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS}) target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS})
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS}) target_compile_definitions(gpu PRIVATE -DUSE_CUDA -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
if(CUDPP_OPT) if(CUDPP_OPT)
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini) target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP) target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
@ -218,7 +218,7 @@ elseif(GPU_API STREQUAL "HIP")
if(NOT DEFINED HIP_PLATFORM) if(NOT DEFINED HIP_PLATFORM)
if(NOT DEFINED ENV{HIP_PLATFORM}) if(NOT DEFINED ENV{HIP_PLATFORM})
set(HIP_PLATFORM "hcc" CACHE PATH "HIP Platform to be used during compilation") set(HIP_PLATFORM "amd" CACHE PATH "HIP Platform to be used during compilation")
else() else()
set(HIP_PLATFORM $ENV{HIP_PLATFORM} CACHE PATH "HIP Platform used during compilation") set(HIP_PLATFORM $ENV{HIP_PLATFORM} CACHE PATH "HIP Platform used during compilation")
endif() endif()
@ -226,7 +226,7 @@ elseif(GPU_API STREQUAL "HIP")
set(ENV{HIP_PLATFORM} ${HIP_PLATFORM}) set(ENV{HIP_PLATFORM} ${HIP_PLATFORM})
if(HIP_PLATFORM STREQUAL "hcc") if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture") set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture")
elseif(HIP_PLATFORM STREQUAL "nvcc") elseif(HIP_PLATFORM STREQUAL "nvcc")
find_package(CUDA REQUIRED) find_package(CUDA REQUIRED)
@ -284,7 +284,7 @@ elseif(GPU_API STREQUAL "HIP")
set(CUBIN_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}.cubin") set(CUBIN_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}.cubin")
set(CUBIN_H_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h") set(CUBIN_H_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h")
if(HIP_PLATFORM STREQUAL "hcc") if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY) configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY)
if(HIP_COMPILER STREQUAL "clang") if(HIP_COMPILER STREQUAL "clang")
@ -338,11 +338,16 @@ elseif(GPU_API STREQUAL "HIP")
if(DOWNLOAD_CUB) if(DOWNLOAD_CUB)
message(STATUS "CUB download requested") message(STATUS "CUB download requested")
set(CUB_URL "https://github.com/NVlabs/cub/archive/1.12.0.tar.gz" CACHE STRING "URL for CUB tarball")
set(CUB_MD5 "1cf595beacafff104700921bac8519f3" CACHE STRING "MD5 checksum of CUB tarball")
mark_as_advanced(CUB_URL)
mark_as_advanced(CUB_MD5)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(CUB ExternalProject_Add(CUB
GIT_REPOSITORY https://github.com/NVlabs/cub URL ${CUB_URL}
TIMEOUT 5 URL_MD5 ${CUB_MD5}
PREFIX "${CMAKE_CURRENT_BINARY_DIR}" PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BUILD_COMMAND "" BUILD_COMMAND ""
@ -354,7 +359,7 @@ elseif(GPU_API STREQUAL "HIP")
else() else()
find_package(CUB) find_package(CUB)
if(NOT CUB_FOUND) if(NOT CUB_FOUND)
message(FATAL_ERROR "CUB library not found. Help CMake to find it by setting CUB_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it") message(FATAL_ERROR "CUB library not found. Help CMake to find it by setting CUB_INCLUDE_DIR, or set DOWNLOAD_CUB=ON to download it")
endif() endif()
endif() endif()
@ -381,6 +386,12 @@ elseif(GPU_API STREQUAL "HIP")
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__) target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include) target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
elseif(HIP_PLATFORM STREQUAL "amd")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_AMD__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_AMD__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
endif() endif()
target_link_libraries(lammps PRIVATE gpu) target_link_libraries(lammps PRIVATE gpu)

View File

@ -35,9 +35,13 @@ if(DOWNLOAD_KIM)
include(ExternalProject) include(ExternalProject)
enable_language(C) enable_language(C)
enable_language(Fortran) enable_language(Fortran)
set(KIM_URL "https://s3.openkim.org/kim-api/kim-api-2.2.1.txz" CACHE STRING "URL for KIM tarball")
set(KIM_MD5 "ae1ddda2ef7017ea07934e519d023dca" CACHE STRING "MD5 checksum of KIM tarball")
mark_as_advanced(KIM_URL)
mark_as_advanced(KIM_MD5)
ExternalProject_Add(kim_build ExternalProject_Add(kim_build
URL https://s3.openkim.org/kim-api/kim-api-2.2.1.txz URL ${KIM_URL}
URL_MD5 ae1ddda2ef7017ea07934e519d023dca URL_MD5 ${KIM_MD5}
BINARY_DIR build BINARY_DIR build
CMAKE_ARGS ${CMAKE_REQUEST_PIC} CMAKE_ARGS ${CMAKE_REQUEST_PIC}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}

View File

@ -37,9 +37,13 @@ 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/3.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "08201d1c7cf5bc458ce0f5b44a629d5a" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
ExternalProject_Add(kokkos_build ExternalProject_Add(kokkos_build
URL https://github.com/kokkos/kokkos/archive/3.3.01.tar.gz URL ${KOKKOS_URL}
URL_MD5 08201d1c7cf5bc458ce0f5b44a629d5a URL_MD5 ${KOKKOS_MD5}
CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS} CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a
) )

View File

@ -15,10 +15,14 @@ endif()
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT}) option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
if(DOWNLOAD_LATTE) if(DOWNLOAD_LATTE)
message(STATUS "LATTE download requested - we will build our own") message(STATUS "LATTE download requested - we will build our own")
set(LATTE_URL "https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz" CACHE STRING "URL for LATTE tarball")
set(LATTE_MD5 "820e73a457ced178c08c71389a385de7" CACHE STRING "MD5 checksum of LATTE tarball")
mark_as_advanced(LATTE_URL)
mark_as_advanced(LATTE_MD5)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(latte_build ExternalProject_Add(latte_build
URL https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz URL ${LATTE_URL}
URL_MD5 820e73a457ced178c08c71389a385de7 URL_MD5 ${LATTE_MD5}
SOURCE_SUBDIR cmake SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES} -DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}

View File

@ -7,10 +7,15 @@ else()
endif() endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT}) option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG) if(DOWNLOAD_MSCG)
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "8c45e269ee13f60b303edd7823866a91" CACHE STRING "MD5 checksum of MSCG tarball")
mark_as_advanced(MSCG_URL)
mark_as_advanced(MSCG_MD5)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(mscg_build ExternalProject_Add(mscg_build
URL https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz URL ${MSCG_URL}
URL_MD5 8c45e269ee13f60b303edd7823866a91 URL_MD5 ${MSCG_MD5}
SOURCE_SUBDIR src/CMake SOURCE_SUBDIR src/CMake
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${EXTRA_MSCG_OPTS} CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${EXTRA_MSCG_OPTS}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}

View File

@ -2,8 +2,4 @@ set(MOLFILE_INCLUDE_DIR "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to
set(MOLFILE_INCLUDE_DIRS "${MOLFILE_INCLUDE_DIR}") set(MOLFILE_INCLUDE_DIRS "${MOLFILE_INCLUDE_DIR}")
add_library(molfile INTERFACE) add_library(molfile INTERFACE)
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS}) target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
# no need to link with -ldl on windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
endif()
target_link_libraries(lammps PRIVATE molfile) target_link_libraries(lammps PRIVATE molfile)

View File

@ -0,0 +1,26 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.4.9.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "4db54962fbd6adcf8c18d46e1798ceb5" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
# download library sources to build folder
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz SHOW_PROGRESS EXPECTED_HASH MD5=${PACELIB_MD5})
# uncompress downloaded sources
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
file(GLOB PACE_EVALUATOR_INCLUDE_DIR ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE)
file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE/*.cpp)
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
set_target_properties(pace PROPERTIES OUTPUT_NAME pace${LAMMPS_MACHINE})
target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
target_link_libraries(lammps PRIVATE pace)

View File

@ -53,10 +53,17 @@ if(DOWNLOAD_PLUMED)
elseif(PLUMED_MODE STREQUAL "RUNTIME") elseif(PLUMED_MODE STREQUAL "RUNTIME")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a") set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a")
endif() endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.1/plumed-src-2.7.1.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "4eac6a462ec84dfe0cec96c82421b8e8" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(plumed_build ExternalProject_Add(plumed_build
URL https://github.com/plumed/plumed2/releases/download/v2.7.0/plumed-src-2.7.0.tgz URL ${PLUMED_URL}
URL_MD5 95f29dd0c067577f11972ff90dfc7d12 URL_MD5 ${PLUMED_MD5}
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
${CONFIGURE_REQUEST_PIC} ${CONFIGURE_REQUEST_PIC}

View File

@ -14,15 +14,19 @@ endif()
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT}) option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
if(DOWNLOAD_SCAFACOS) if(DOWNLOAD_SCAFACOS)
message(STATUS "ScaFaCoS download requested - we will build our own") message(STATUS "ScaFaCoS download requested - we will build our own")
set(SCAFACOS_URL "https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz" CACHE STRING "URL for SCAFACOS tarball")
set(SCAFACOS_MD5 "bd46d74e3296bd8a444d731bb10c1738" CACHE STRING "MD5 checksum of SCAFACOS tarball")
mark_as_advanced(SCAFACOS_URL)
mark_as_advanced(SCAFACOS_MD5)
# version 1.0.1 needs a patch to compile and linke cleanly with GCC 10 and later. # version 1.0.1 needs a patch to compile and linke cleanly with GCC 10 and later.
file(DOWNLOAD https://download.lammps.org/thirdparty/scafacos-1.0.1-fix.diff ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff file(DOWNLOAD ${LAMMPS_THIRDPARTY_URL}/scafacos-1.0.1-fix.diff ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff
EXPECTED_HASH MD5=4baa1333bb28fcce102d505e1992d032) EXPECTED_HASH MD5=4baa1333bb28fcce102d505e1992d032)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(scafacos_build ExternalProject_Add(scafacos_build
URL https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz URL ${SCAFACOS_URL}
URL_MD5 bd46d74e3296bd8a444d731bb10c1738 URL_MD5 ${SCAFACOS_MD5}
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-doc CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-doc
--enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m --enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m

View File

@ -7,10 +7,14 @@ endif()
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT}) option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT})
if(DOWNLOAD_EIGEN3) if(DOWNLOAD_EIGEN3)
message(STATUS "Eigen3 download requested - we will build our own") message(STATUS "Eigen3 download requested - we will build our own")
set(EIGEN3_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz" CACHE STRING "URL for Eigen3 tarball")
set(EIGEN3_MD5 "9e30f67e8531477de4117506fe44669b" CACHE STRING "MD5 checksum of Eigen3 tarball")
mark_as_advanced(EIGEN3_URL)
mark_as_advanced(EIGEN3_MD5)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(Eigen3_build ExternalProject_Add(Eigen3_build
URL https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz URL ${EIGEN3_URL}
URL_MD5 9e30f67e8531477de4117506fe44669b URL_MD5 ${EIGEN3_MD5}
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
) )
ExternalProject_get_property(Eigen3_build SOURCE_DIR) ExternalProject_get_property(Eigen3_build SOURCE_DIR)

View File

@ -7,6 +7,11 @@ endif()
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT}) option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT})
if(DOWNLOAD_VORO) if(DOWNLOAD_VORO)
message(STATUS "Voro++ download requested - we will build our own") message(STATUS "Voro++ download requested - we will build our own")
set(VORO_URL "${LAMMPS_THIRDPARTY_URL}/voro++-0.4.6.tar.gz" CACHE STRING "URL for Voro++ tarball")
set(VORO_MD5 "2338b824c3b7b25590e18e8df5d68af9" CACHE STRING "MD5 checksum for Voro++ tarball")
mark_as_advanced(VORO_URL)
mark_as_advanced(VORO_MD5)
include(ExternalProject) include(ExternalProject)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
@ -22,8 +27,8 @@ if(DOWNLOAD_VORO)
endif() endif()
ExternalProject_Add(voro_build ExternalProject_Add(voro_build
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz URL ${VORO_URL}
URL_MD5 2338b824c3b7b25590e18e8df5d68af9 URL_MD5 ${VORO_MD5}
PATCH_COMMAND patch -b -p0 < ${LAMMPS_LIB_SOURCE_DIR}/voronoi/voro-make.patch PATCH_COMMAND patch -b -p0 < ${LAMMPS_LIB_SOURCE_DIR}/voronoi/voro-make.patch
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_COMMAND make ${VORO_BUILD_OPTIONS}

View File

@ -16,11 +16,14 @@ if(ENABLE_TESTING)
set(MEMORYCHECK_COMMAND "${VALGRIND_BINARY}" CACHE FILEPATH "Memory Check Command") set(MEMORYCHECK_COMMAND "${VALGRIND_BINARY}" CACHE FILEPATH "Memory Check Command")
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT_OPTIONS}" CACHE STRING "Memory Check Command Options") set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT_OPTIONS}" CACHE STRING "Memory Check Command Options")
# check if a faster linker is available. # we need to build and link a LOT of tester executables, so it is worth checking if
# only verified with GNU and Clang compilers and new CMake # a faster linker is available. requires GNU or Clang compiler, newer CMake.
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) # also only verified with Fedora Linux > 30 and Ubuntu <= 18.04 (Ubuntu 20.04 fails)
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")) AND ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")))
if (((CMAKE_LINUX_DISTRO STREQUAL Ubuntu) AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
OR ((CMAKE_LINUX_DISTRO STREQUAL Fedora) AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
set(CMAKE_CUSTOM_LINKER_DEFAULT default) set(CMAKE_CUSTOM_LINKER_DEFAULT default)
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG) check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)

View File

@ -2,10 +2,13 @@ message(STATUS "Downloading and building YAML library")
include(ExternalProject) include(ExternalProject)
set(YAML_URL "https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz" CACHE STRING "URL for libyaml tarball") set(YAML_URL "https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz" CACHE STRING "URL for libyaml tarball")
set(YAML_MD5 "bb15429d8fb787e7d3f1c83ae129a999" CACHE STRING "MD5 checksum of libyaml tarball")
mark_as_advanced(YAML_URL) mark_as_advanced(YAML_URL)
mark_as_advanced(YAML_MD5)
ExternalProject_Add(libyaml ExternalProject_Add(libyaml
URL ${YAML_URL} URL ${YAML_URL}
URL_MD5 bb15429d8fb787e7d3f1c83ae129a999 URL_MD5 ${YAML_MD5}
SOURCE_DIR "${CMAKE_BINARY_DIR}/yaml-src" SOURCE_DIR "${CMAKE_BINARY_DIR}/yaml-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/yaml-build" BINARY_DIR "${CMAKE_BINARY_DIR}/yaml-build"
CONFIGURE_COMMAND <SOURCE_DIR>/configure ${CONFIGURE_REQUEST_PIC} CONFIGURE_COMMAND <SOURCE_DIR>/configure ${CONFIGURE_REQUEST_PIC}

View File

@ -4,7 +4,7 @@
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI
POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION

View File

@ -18,8 +18,8 @@ digraph lammps {
Up [shape=box label="Update" color=blue] Up [shape=box label="Update" color=blue]
Un [shape=box label="Universe" color=blue] Un [shape=box label="Universe" color=blue]
Ti [shape=box label="Timer" color=blue] Ti [shape=box label="Timer" color=blue]
Lt [label="Lattice"]
Rg [label="Region" color=red] Rg [label="Region" color=red]
Lt [label="Lattice"]
Rb [shape=box label="RegionBlock"] Rb [shape=box label="RegionBlock"]
Rs [shape=box label="RegionSphere"] Rs [shape=box label="RegionSphere"]
Av [label="AtomVec" color=red] Av [label="AtomVec" color=red]
@ -34,6 +34,7 @@ digraph lammps {
Du [label="Dump" color=red] Du [label="Dump" color=red]
Fi [label="Fix" color=red] Fi [label="Fix" color=red]
Cp [label="Compute" color=red] Cp [label="Compute" color=red]
Cm [label="Command" color=red]
Th [label="Thermo"] Th [label="Thermo"]
Va [label="Variable"] Va [label="Variable"]
Ew [shape=box label="Ewald"] Ew [shape=box label="Ewald"]
@ -71,16 +72,19 @@ digraph lammps {
Dg [shape=box label="DumpCFG"] Dg [shape=box label="DumpCFG"]
Ve [shape=box label="Verlet"] Ve [shape=box label="Verlet"]
Rr [shape=box label="Respa"] Rr [shape=box label="Respa"]
Ru [shape=box label="Run"]
Se [shape=box label="Set"]
Pt [shape=box label="PPPMTIP4P"] Pt [shape=box label="PPPMTIP4P"]
Vs [shape=box label="VerletSplit"] Vs [shape=box label="VerletSplit"]
Ro [shape=box label="RespaOMP"] Ro [shape=box label="RespaOMP"]
Mc [shape=box label="MinCG"] Mc [shape=box label="MinCG"]
Mf [shape=box label="MinFire"] Mf [shape=box label="MinFire"]
La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2] La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2]
Do -> {Lt Rg} [penwidth=2] Do -> {Rg Lt} [penwidth=2]
Rg -> {Rb Rs} [style=dashed penwidth=2] Rg -> {Rb Rs} [style=dashed penwidth=2]
Co -> {Cb Ct} [style=dashed penwidth=2] Co -> {Cb Ct} [style=dashed penwidth=2]
In -> Va [penwidth=2] In -> {Va Cm} [penwidth=2]
Cm -> {Ru Se} [style=dashed penwidth=2]
Mo -> {Fi Cp} [penwidth=2] Mo -> {Fi Cp} [penwidth=2]
Fo -> {Pa Bo An Di Im Ks} [penwidth=2] Fo -> {Pa Bo An Di Im Ks} [penwidth=2]
Ks -> {Ew Pp} [style=dashed penwidth=2] Ks -> {Ew Pp} [style=dashed penwidth=2]

View File

@ -1,4 +1,4 @@
.TH LAMMPS "10 March 2021" "2021-03-10" .TH LAMMPS "8 April 2021" "2021-04-08"
.SH NAME .SH NAME
.B LAMMPS .B LAMMPS
\- Molecular Dynamics Simulator. \- Molecular Dynamics Simulator.

View File

@ -1,7 +1,7 @@
Basic build options Basic build options
=================== ===================
The following topics are covered on this page, for building both with The following topics are covered on this page, for building with both
CMake and make: CMake and make:
* :ref:`Serial vs parallel build <serial>` * :ref:`Serial vs parallel build <serial>`

View File

@ -53,6 +53,7 @@ This is the list of packages that may require additional steps.
* :ref:`USER-MESONT <user-mesont>` * :ref:`USER-MESONT <user-mesont>`
* :ref:`USER-MOLFILE <user-molfile>` * :ref:`USER-MOLFILE <user-molfile>`
* :ref:`USER-NETCDF <user-netcdf>` * :ref:`USER-NETCDF <user-netcdf>`
* :ref:`USER-PACE <user-pace>`
* :ref:`USER-PLUMED <user-plumed>` * :ref:`USER-PLUMED <user-plumed>`
* :ref:`USER-OMP <user-omp>` * :ref:`USER-OMP <user-omp>`
* :ref:`USER-QMMM <user-qmmm>` * :ref:`USER-QMMM <user-qmmm>`
@ -126,7 +127,7 @@ CMake build
# default is sm_50 # default is sm_50
-D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip -D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip
# value depends on selected HIP_PLATFORM # value depends on selected HIP_PLATFORM
# default is 'gfx906' for HIP_PLATFORM=hcc and 'sm_50' for HIP_PLATFORM=nvcc # default is 'gfx906' for HIP_PLATFORM=amd and 'sm_50' for HIP_PLATFORM=nvcc
-D HIP_USE_DEVICE_SORT=value # enables GPU sorting -D HIP_USE_DEVICE_SORT=value # enables GPU sorting
# value = yes (default) or no # value = yes (default) or no
-D CUDPP_OPT=value # use GPU binning on with CUDA (should be off for modern GPUs) -D CUDPP_OPT=value # use GPU binning on with CUDA (should be off for modern GPUs)
@ -170,17 +171,24 @@ desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
If you are compiling with HIP, note that before running CMake you will have to If you are compiling with HIP, note that before running CMake you will have to
set appropriate environment variables. Some variables such as set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` or :code:`CUDA_PATH` are necessary for :code:`hipcc` :code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
and the linker to work correctly. and the linker to work correctly.
.. code:: bash .. code:: bash
# AMDGPU target # AMDGPU target (ROCm <= 4.0)
export HIP_PLATFORM=hcc export HIP_PLATFORM=hcc
export HCC_AMDGPU_TARGET=gfx906 export HCC_AMDGPU_TARGET=gfx906
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc .. cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
make -j 4 make -j 4
.. code:: bash
# AMDGPU target (ROCm >= 4.1)
export HIP_PLATFORM=amd
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
make -j 4
.. code:: bash .. code:: bash
# CUDA target (not recommended, use GPU_ARCH=cuda) # CUDA target (not recommended, use GPU_ARCH=cuda)
@ -1241,6 +1249,46 @@ be built for the most part with all major versions of the C++ language.
---------- ----------
.. _user-pace:
USER-PACE package
-----------------------------
This package requires a library that can be downloaded and built
in lib/pace or somewhere else, which must be done before building
LAMMPS with this package. The code for the library can be found
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
.. tabs::
.. tab:: CMake build
By default the library will be downloaded from the git repository
and built automatically when the USER-PACE package is enabled with
``-D PKG_USER-PACE=yes``. The location for the sources may be
customized by setting the variable ``PACELIB_URL`` when
configuring with CMake (e.g. to use a local archive on machines
without internet access). Since CMake checks the validity of the
archive with ``md5sum`` you may also need to set ``PACELIB_MD5``
if you provide a different library version than what is downloaded
automatically.
.. tab:: Traditional make
You can download and build the USER-PACE library
in one step from the ``lammps/src`` dir, using these commands,
which invoke the ``lib/pace/Install.py`` script.
.. code-block:: bash
$ make lib-pace # print help message
$ make lib-pace args="-b" # download and build the default version in lib/pace
You should not need to edit the ``lib/pace/Makefile.lammps`` file.
----------
.. _user-plumed: .. _user-plumed:
USER-PLUMED package USER-PLUMED package

View File

@ -30,17 +30,17 @@ steps, as explained on the :doc:`Build extras <Build_extras>` page.
These links take you to the extra instructions for those select These links take you to the extra instructions for those select
packages: packages:
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` | | :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` |
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` | | :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` |
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-HDNNP <user-hdnnp>` | :ref:`USER-INTEL <user-intel>` | | :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-HDNNP <user-hdnnp>` | :ref:`USER-INTEL <user-intel>` |
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-MOLFILE <user-molfile>` | :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` | :ref:`USER-QUIP <user-quip>` | | :ref:`USER-MOLFILE <user-molfile>` | :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PACE <user-pace>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` |
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-SCAFACOS <user-scafacos>` | :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | | | | :ref:`USER-QUIP <user-quip>` | :ref:`USER-SCAFACOS <user-scafacos>` | :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | |
+--------------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+ +--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
The mechanism for including packages is simple but different for CMake The mechanism for including packages is simple but different for CMake
versus make. versus make.

View File

@ -86,6 +86,7 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`pair_style <pair_style>` * :doc:`pair_style <pair_style>`
* :doc:`pair_write <pair_write>` * :doc:`pair_write <pair_write>`
* :doc:`partition <partition>` * :doc:`partition <partition>`
* :doc:`plugin <plugin>`
* :doc:`prd <prd>` * :doc:`prd <prd>`
* :doc:`print <print>` * :doc:`print <print>`
* :doc:`processors <processors>` * :doc:`processors <processors>`

View File

@ -46,6 +46,7 @@ OPT.
* :doc:`bond/react <fix_bond_react>` * :doc:`bond/react <fix_bond_react>`
* :doc:`bond/swap <fix_bond_swap>` * :doc:`bond/swap <fix_bond_swap>`
* :doc:`box/relax <fix_box_relax>` * :doc:`box/relax <fix_box_relax>`
* :doc:`charge/regulation <fix_charge_regulation>`
* :doc:`client/md <fix_client_md>` * :doc:`client/md <fix_client_md>`
* :doc:`cmap <fix_cmap>` * :doc:`cmap <fix_cmap>`
* :doc:`colvars <fix_colvars>` * :doc:`colvars <fix_colvars>`

View File

@ -26,6 +26,7 @@ OPT.
* :doc:`zero <pair_zero>` * :doc:`zero <pair_zero>`
* :doc:`hybrid (k) <pair_hybrid>` * :doc:`hybrid (k) <pair_hybrid>`
* :doc:`hybrid/overlay (k) <pair_hybrid>` * :doc:`hybrid/overlay (k) <pair_hybrid>`
* :doc:`hybrid/scaled <pair_hybrid>`
* :doc:`kim <pair_kim>` * :doc:`kim <pair_kim>`
* :doc:`list <pair_list>` * :doc:`list <pair_list>`
* *
@ -33,7 +34,6 @@ OPT.
* *
* *
* *
*
* :doc:`adp (o) <pair_adp>` * :doc:`adp (o) <pair_adp>`
* :doc:`agni (o) <pair_agni>` * :doc:`agni (o) <pair_agni>`
* :doc:`airebo (io) <pair_airebo>` * :doc:`airebo (io) <pair_airebo>`
@ -69,6 +69,7 @@ OPT.
* :doc:`comb3 <pair_comb>` * :doc:`comb3 <pair_comb>`
* :doc:`cosine/squared <pair_cosine_squared>` * :doc:`cosine/squared <pair_cosine_squared>`
* :doc:`coul/cut (gko) <pair_coul>` * :doc:`coul/cut (gko) <pair_coul>`
* :doc:`coul/cut/global (o) <pair_coul>`
* :doc:`coul/cut/soft (o) <pair_fep_soft>` * :doc:`coul/cut/soft (o) <pair_fep_soft>`
* :doc:`coul/debye (gko) <pair_coul>` * :doc:`coul/debye (gko) <pair_coul>`
* :doc:`coul/diel (o) <pair_coul_diel>` * :doc:`coul/diel (o) <pair_coul_diel>`
@ -188,7 +189,7 @@ OPT.
* :doc:`mgpt <pair_mgpt>` * :doc:`mgpt <pair_mgpt>`
* :doc:`mie/cut (g) <pair_mie>` * :doc:`mie/cut (g) <pair_mie>`
* :doc:`mliap <pair_mliap>` * :doc:`mliap <pair_mliap>`
* :doc:`mm3/switch3/coulgauss/long <pair_mm3_switch3_coulgauss_long>` * :doc:`mm3/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>`
* :doc:`momb <pair_momb>` * :doc:`momb <pair_momb>`
* :doc:`morse (gkot) <pair_morse>` * :doc:`morse (gkot) <pair_morse>`
* :doc:`morse/smooth/linear (o) <pair_morse>` * :doc:`morse/smooth/linear (o) <pair_morse>`
@ -216,6 +217,7 @@ OPT.
* :doc:`oxrna2/stk <pair_oxrna2>` * :doc:`oxrna2/stk <pair_oxrna2>`
* :doc:`oxrna2/xstk <pair_oxrna2>` * :doc:`oxrna2/xstk <pair_oxrna2>`
* :doc:`oxrna2/coaxstk <pair_oxrna2>` * :doc:`oxrna2/coaxstk <pair_oxrna2>`
* :doc:`pace <pair_pace>`
* :doc:`peri/eps <pair_peri>` * :doc:`peri/eps <pair_peri>`
* :doc:`peri/lps (o) <pair_peri>` * :doc:`peri/lps (o) <pair_peri>`
* :doc:`peri/pmb (o) <pair_peri>` * :doc:`peri/pmb (o) <pair_peri>`

View File

@ -14,6 +14,7 @@ of time and requests from the LAMMPS user community.
Developer_flow Developer_flow
Developer_write Developer_write
Developer_notes Developer_notes
Developer_plugins
Developer_unittest Developer_unittest
Classes Classes
Developer_utils Developer_utils

View File

@ -49,8 +49,8 @@ underscore character '_' to separate words. Outside of bundled libraries
which may have different conventions, all C and C++ header files have a which may have different conventions, all C and C++ header files have a
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a ``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
``.c`` extension. A small number of C++ classes and utility functions ``.c`` extension. A small number of C++ classes and utility functions
are implemented with only a ``.h`` file. Examples are the Pointer class are implemented with only a ``.h`` file. Examples are the Pointers and
or the MathVec functions. Commands classes or the MathVec functions.
Class topology Class topology
-------------- --------------
@ -144,7 +144,7 @@ implement specific commands that can be invoked before, after, or in
between runs. For these an instance of the class is created, its between runs. For these an instance of the class is created, its
command() method called and then, after completion, the class instance command() method called and then, after completion, the class instance
deleted. Examples for this are the create_box, create_atoms, minimize, deleted. Examples for this are the create_box, create_atoms, minimize,
run, or velocity command styles. run, set, or velocity command styles.
For all those ``styles`` certain naming conventions are employed: for For all those ``styles`` certain naming conventions are employed: for
the fix nve command the class is called FixNVE and the source files are the fix nve command the class is called FixNVE and the source files are
@ -175,11 +175,11 @@ follows:
- The Input class reads and processes input input strings and files, - The Input class reads and processes input input strings and files,
stores variables, and invokes :doc:`commands <Commands_all>`. stores variables, and invokes :doc:`commands <Commands_all>`.
- As discussed above, command style classes are directly derived from - Command style classes are derived from the Command class. They provide
the Pointers class. They provide input script commands that perform input script commands that perform one-time operations
one-time operations before/after/between simulations or which invoke a before/after/between simulations or which invoke a simulation. They
simulation. They are instantiated from within the Input class, are usually instantiated from within the Input class, its ``command``
invoked, then immediately destructed. method invoked, and then immediately destructed.
- The Finish class is instantiated to print statistics to the screen - The Finish class is instantiated to print statistics to the screen
after a simulation is performed, by commands like run and minimize. after a simulation is performed, by commands like run and minimize.

View File

@ -0,0 +1,251 @@
Writing plugins
---------------
Plugins provide a mechanism to add functionality to a LAMMPS executable
without recompiling LAMMPS. The functionality for this and the
:doc:`plugin command <plugin>` are implemented in the
:ref:`PLUGIN package <PKG-PLUGIN>` which must be installed to use plugins.
Plugins use the operating system's capability to load dynamic shared
object (DSO) files in a way similar shared libraries and then reference
specific functions in those DSOs. Any DSO file with plugins has to include
an initialization function with a specific name, "lammpsplugin_init", that
has to follow specific rules described below. When loading the DSO with
the "plugin" command, this function is looked up and called and will then
register the contained plugin(s) with LAMMPS.
From the programmer perspective this can work because of the object
oriented design of LAMMPS where all pair style commands are derived from
the class Pair, all fix style commands from the class Fix and so on and
usually only functions present in those base classes are called
directly. When a :doc:`pair_style` command or :doc:`fix` command is
issued a new instance of such a derived class is created. This is done
by a so-called factory function which is mapped to the style name. Thus
when, for example, the LAMMPS processes the command ``pair_style lj/cut
2.5``, LAMMPS will look up the factory function for creating the
``PairLJCut`` class and then execute it. The return value of that
function is a ``Pair *`` pointer and the pointer will be assigned to the
location for the currently active pair style.
A DSO file with a plugin thus has to implement such a factory function
and register it with LAMMPS so that it gets added to the map of available
styles of the given category. To register a plugin with LAMMPS an
initialization function has to be present in the DSO file called
``lammpsplugin_init`` which is called with three ``void *`` arguments:
a pointer to the current LAMMPS instance, a pointer to the opened DSO
handle, and a pointer to the registration function. The registration
function takes two arguments: a pointer to a ``lammpsplugin_t`` struct
with information about the plugin and a pointer to the current LAMMPS
instance. Please see below for an example of how the registration is
done.
Members of ``lammpsplugin_t``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. list-table::
:header-rows: 1
:widths: auto
* - Member
- Description
* - version
- LAMMPS Version string the plugin was compiled for
* - style
- Style of the plugin (pair, bond, fix, command, etc.)
* - name
- Name of the plugin style
* - info
- String with information about the plugin
* - author
- String with the name and email of the author
* - creator.v1
- Pointer to factory function for pair, bond, angle, dihedral, improper or command styles
* - creator.v2
- Pointer to factory function for compute, fix, or region styles
* - handle
- Pointer to the open DSO file handle
Only one of the three alternate creator entries can be used at a time
and which of those is determined by the style of plugin. The
"creator.v1" element is for factory functions of supported styles
computing forces (i.e. command, pair, bond, angle, dihedral, or
improper styles) and the function takes as single argument the pointer
to the LAMMPS instance. The factory function is cast to the
``lammpsplugin_factory1`` type before assignment. The "creator.v2"
element is for factory functions creating an instance of a fix, compute,
or region style and takes three arguments: a pointer to the LAMMPS
instance, an integer with the length of the argument list and a ``char
**`` pointer to the list of arguments. The factory function pointer
needs to be cast to the ``lammpsplugin_factory2`` type before
assignment.
Pair style example
^^^^^^^^^^^^^^^^^^
As an example, a hypothetical pair style plugin "morse2" implemented in
a class ``PairMorse2`` in the files ``pair_morse2.h`` and
``pair_morse2.cpp`` with the factory function and initialization
function would look like this:
.. code-block:: C++
#include "lammpsplugin.h"
#include "version.h"
#include "pair_morse2.h"
using namespace LAMMPS_NS;
static Pair *morse2creator(LAMMPS *lmp)
{
return new PairMorse2(lmp);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_regfunc register_plugin = (lammpsplugin_regfunc) regfunc;
lammpsplugin_t plugin;
plugin.version = LAMMPS_VERSION;
plugin.style = "pair";
plugin.name = "morse2";
plugin.info = "Morse2 variant pair style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v1 = (lammpsplugin_factory1 *) &morse2creator;
plugin.handle = handle;
(*register_plugin)(&plugin,lmp);
}
The factory function in this example is called ``morse2creator()``. It
receives a pointer to the LAMMPS class as only argument and thus has to
be assigned to the *creator.v1* member of the plugin struct and cast to
the ``lammpsplugin_factory1`` function pointer type. It returns a
pointer to the allocated class instance derived from the ``Pair`` class.
This function may be declared static to avoid clashes with other
plugins. The name of the derived class, ``PairMorse2``, however must be
unique inside the entire LAMMPS executable.
Fix style example
^^^^^^^^^^^^^^^^^
If the factory function would be for a fix or compute, which take three
arguments (a pointer to the LAMMPS class, the number of arguments and the
list of argument strings), then the pointer type is ``lammpsplugin_factory2``
and it must be assigned to the *creator.v2* member of the plugin struct.
Below is an example for that:
.. code-block:: C++
#include "lammpsplugin.h"
#include "version.h"
#include "fix_nve2.h"
using namespace LAMMPS_NS;
static Fix *nve2creator(LAMMPS *lmp, int argc, char **argv)
{
return new FixNVE2(lmp,argc,argv);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_regfunc register_plugin = (lammpsplugin_regfunc) regfunc;
lammpsplugin_t plugin;
plugin.version = LAMMPS_VERSION;
plugin.style = "fix";
plugin.name = "nve2";
plugin.info = "NVE2 variant fix style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v2 = (lammpsplugin_factory2 *) &nve2creator;
plugin.handle = handle;
(*register_plugin)(&plugin,lmp);
}
Command style example
^^^^^^^^^^^^^^^^^^^^^
Command styles also use the first variant of factory function as
demonstrated in the following example, which also shows that the
implementation of the plugin class may be within the same source
file as the plugin interface code:
.. code-block:: C++
#include "lammpsplugin.h"
#include "comm.h"
#include "error.h"
#include "command.h"
#include "version.h"
#include <cstring>
namespace LAMMPS_NS {
class Hello : public Command {
public:
Hello(class LAMMPS *lmp) : Command(lmp) {};
void command(int, char **);
};
}
using namespace LAMMPS_NS;
void Hello::command(int argc, char **argv)
{
if (argc != 1) error->all(FLERR,"Illegal hello command");
if (comm->me == 0)
utils::logmesg(lmp,fmt::format("Hello, {}!\n",argv[0]));
}
static void hellocreator(LAMMPS *lmp)
{
return new Hello(lmp);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_t plugin;
lammpsplugin_regfunc register_plugin = (lammpsplugin_regfunc) regfunc;
plugin.version = LAMMPS_VERSION;
plugin.style = "command";
plugin.name = "hello";
plugin.info = "Hello world command v1.1";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v1 = (lammpsplugin_factory1 *) &hellocreator;
plugin.handle = handle;
(*register_plugin)(&plugin,lmp);
}
Additional Details
^^^^^^^^^^^^^^^^^^
The initialization function **must** be called ``lammpsplugin_init``, it
**must** have C bindings and it takes three void pointers as arguments.
The first is a pointer to the LAMMPS class that calls it and it needs to
be passed to the registration function. The second argument is a
pointer to the internal handle of the DSO file, this needs to be added
to the plugin info struct, so that the DSO can be closed and unloaded
when all its contained plugins are unloaded. The third argument is a
function pointer to the registration function and needs to be stored
in a variable of ``lammpsplugin_regfunc`` type and then called with a
pointer to the ``lammpsplugin_t`` struct and the pointer to the LAMMPS
instance as arguments to register a single plugin. There may be multiple
calls to multiple plugins in the same initialization function.
To register a plugin a struct of the ``lammpsplugin_t`` needs to be filled
with relevant info: current LAMMPS version string, kind of style, name of
style, info string, author string, pointer to factory function, and the
DSO handle. The registration function is called with a pointer to the address
of this struct and the pointer of the LAMMPS class. The registration function
will then add the factory function of the plugin style to the respective
style map under the provided name. It will also make a copy of the struct
in a list of all loaded plugins and update the reference counter for loaded
plugins from this specific DSO file.
The pair style itself (i.e. the PairMorse2 class in this example) can be
written just like any other pair style that is included in LAMMPS. For
a plugin, the use of the ``PairStyle`` macro in the section encapsulated
by ``#ifdef PAIR_CLASS`` is not needed, since the mapping of the class
name to the style name is done by the plugin registration function with
the information from the ``lammpsplugin_t`` struct. It may be included
in case the new code is intended to be later included in LAMMPS directly.

View File

@ -4,10 +4,10 @@ Adding tests for unit testing
This section discusses adding or expanding tests for the unit test This section discusses adding or expanding tests for the unit test
infrastructure included into the LAMMPS source code distribution. infrastructure included into the LAMMPS source code distribution.
Unlike example inputs, unit tests focus on testing the "local" behavior Unlike example inputs, unit tests focus on testing the "local" behavior
of individual features, tend to run very fast, and should be set up to of individual features, tend to run fast, and should be set up to cover
cover as much of the added code as possible. When contributing code to as much of the added code as possible. When contributing code to the
the distribution, the LAMMPS developers will appreciate if additions distribution, the LAMMPS developers will appreciate if additions to the
to the integrated unit test facility are included. integrated unit test facility are included.
Given the complex nature of MD simulations where many operations can Given the complex nature of MD simulations where many operations can
only be performed when suitable "real" simulation environment has been only be performed when suitable "real" simulation environment has been
@ -50,6 +50,9 @@ available:
* - File name: * - File name:
- Test name: - Test name:
- Description: - Description:
* - ``test_argutils.cpp``
- ArgInfo
- Tests for ``ArgInfo`` class used by LAMMPS
* - ``test_fmtlib.cpp`` * - ``test_fmtlib.cpp``
- FmtLib - FmtLib
- Tests for ``fmtlib::`` functions used by LAMMPS - Tests for ``fmtlib::`` functions used by LAMMPS
@ -155,23 +158,27 @@ have the desired effect:
{ {
ASSERT_EQ(lmp->update->ntimestep, 0); ASSERT_EQ(lmp->update->ntimestep, 0);
if (!verbose) ::testing::internal::CaptureStdout(); BEGIN_HIDE_OUTPUT();
lmp->input->one("reset_timestep 10"); command("reset_timestep 10");
if (!verbose) ::testing::internal::GetCapturedStdout(); END_HIDE_OUTPUT();
ASSERT_EQ(lmp->update->ntimestep, 10); ASSERT_EQ(lmp->update->ntimestep, 10);
if (!verbose) ::testing::internal::CaptureStdout(); BEGIN_HIDE_OUTPUT();
lmp->input->one("reset_timestep 0"); command("reset_timestep 0");
if (!verbose) ::testing::internal::GetCapturedStdout(); END_HIDE_OUTPUT();
ASSERT_EQ(lmp->update->ntimestep, 0); ASSERT_EQ(lmp->update->ntimestep, 0);
TEST_FAILURE(".*ERROR: Timestep must be >= 0.*", command("reset_timestep -10"););
TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", command("reset_timestep"););
TEST_FAILURE(".*ERROR: Illegal reset_timestep .*", command("reset_timestep 10 10"););
TEST_FAILURE(".*ERROR: Expected integer .*", command("reset_timestep xxx"););
} }
Please note the use of the (global) verbose variable to control whether Please note the use of the ``BEGIN_HIDE_OUTPUT`` and ``END_HIDE_OUTPUT``
the LAMMPS command will be silent by capturing the output or not. In functions that will capture output from running LAMMPS. This is normally
the default case, verbose == false, the test output will be compact and discarded but by setting the verbose flag (via setting the ``TEST_ARGS``
not mixed with LAMMPS output. However setting the verbose flag (via environment variable, ``TEST_ARGS=-v``) it can be printed and used to
setting the ``TEST_ARGS`` environment variable, ``TEST_ARGS=-v``) can be understand why tests fail unexpectedly.
helpful to understand why tests fail unexpectedly.
Another complexity of these tests stems from the need to capture Another complexity of these tests stems from the need to capture
situations where LAMMPS will stop with an error, i.e. handle so-called situations where LAMMPS will stop with an error, i.e. handle so-called
@ -210,6 +217,12 @@ The following test programs are currently available:
* - ``test_lattice_region.cpp`` * - ``test_lattice_region.cpp``
- LatticeRegion - LatticeRegion
- Tests to validate the :doc:`lattice <lattice>` and :doc:`region <region>` commands - Tests to validate the :doc:`lattice <lattice>` and :doc:`region <region>` commands
* - ``test_groups.cpp``
- GroupTest
- Tests to validate the :doc:`group <group>` command
* - ``test_variables.cpp``
- VariableTest
- Tests to validate the :doc:`variable <variable>` command
* - ``test_kim_commands.cpp`` * - ``test_kim_commands.cpp``
- KimCommands - KimCommands
- Tests for several commands from the :ref:`KIM package <PKG-KIM>` - Tests for several commands from the :ref:`KIM package <PKG-KIM>`

View File

@ -101,6 +101,9 @@ and parsing files or arguments.
.. doxygenfunction:: split_words .. doxygenfunction:: split_words
:project: progguide :project: progguide
.. doxygenfunction:: split_lines
:project: progguide
.. doxygenfunction:: strmatch .. doxygenfunction:: strmatch
:project: progguide :project: progguide

View File

@ -18,12 +18,13 @@ This compute
calculates rotational kinetic energy which can be :doc:`output with thermodynamic info <Howto_output>`. calculates rotational kinetic energy which can be :doc:`output with thermodynamic info <Howto_output>`.
Use one of these 3 pair potentials, which compute forces and torques Use one of these 4 pair potentials, which compute forces and torques
between interacting pairs of particles: between interacting pairs of particles:
* :doc:`pair_style <pair_style>` gran/history * :doc:`pair_style gran/history <pair_gran>`
* :doc:`pair_style <pair_style>` gran/no_history * :doc:`pair_style gran/no_history <pair_gran>`
* :doc:`pair_style <pair_style>` gran/hertzian * :doc:`pair_style gran/hertzian <pair_gran>`
* :doc:`pair_style granular <pair_granular>`
These commands implement fix options specific to granular systems: These commands implement fix options specific to granular systems:
@ -31,6 +32,7 @@ These commands implement fix options specific to granular systems:
* :doc:`fix pour <fix_pour>` * :doc:`fix pour <fix_pour>`
* :doc:`fix viscous <fix_viscous>` * :doc:`fix viscous <fix_viscous>`
* :doc:`fix wall/gran <fix_wall_gran>` * :doc:`fix wall/gran <fix_wall_gran>`
* :doc:`fix wall/gran/region <fix_wall_gran_region>`
The fix style *freeze* zeroes both the force and torque of frozen The fix style *freeze* zeroes both the force and torque of frozen
atoms, and should be used for granular system instead of the fix style atoms, and should be used for granular system instead of the fix style

View File

@ -21,8 +21,8 @@ orientations and their associated inter-atomic distances.
The command :doc:`fix precession/spin <fix_precession_spin>` allows to The command :doc:`fix precession/spin <fix_precession_spin>` allows to
apply a constant magnetic torque on all the spins in the system. This apply a constant magnetic torque on all the spins in the system. This
torque can be an external magnetic field (Zeeman interaction), or an torque can be an external magnetic field (Zeeman interaction), and an
uniaxial magnetic anisotropy. uniaxial or cubic magnetic anisotropy.
A Langevin thermostat can be applied to those magnetic spins using A Langevin thermostat can be applied to those magnetic spins using
:doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat :doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat

View File

@ -86,7 +86,33 @@ check out any other desired branch) first.
Once you have updated your local files with a ``git pull`` (or ``git Once you have updated your local files with a ``git pull`` (or ``git
checkout``), you still need to re-build LAMMPS if any source files have checkout``), you still need to re-build LAMMPS if any source files have
changed. To do this, you should cd to the src directory and type: changed. How to do this depends on the build system you are using.
.. tabs::
.. tab:: CMake build
Change to your build folder and type:
.. code-block:: bash
cmake . --build
CMake should auto-detect whether it needs to re-run the CMake
configuration step and otherwise redo the build for all files
that have been changed or files that depend on changed files.
In case some build options have been changed or renamed, you
may have to update those by running:
.. code-block:: bash
cmake .
and then rebuild.
.. tab:: Traditional make
Switch to the src directory and type:
.. code-block:: bash .. code-block:: bash
@ -94,25 +120,25 @@ changed. To do this, you should cd to the src directory and type:
$ make package-update # sync package files with src files $ make package-update # sync package files with src files
$ make foo # re-build for your machine (mpi, serial, etc) $ make foo # re-build for your machine (mpi, serial, etc)
just as described on the :doc:`Apply patch <Install_patch>` page, Just as described on the :doc:`Apply patch <Install_patch>` page,
after a patch has been installed. after a patch has been installed.
.. warning:: .. warning::
If you wish to edit/change a src file that is from a If you wish to edit/change a src file that is from a package,
package, you should edit the version of the file inside the package you should edit the version of the file inside the package
sub-directory with src, then re-install the package. The version in sub-directory with src, then re-install the package. The
the source directory is merely a copy and will be wiped out if you type "make version in the source directory is merely a copy and will be
package-update". wiped out if you type "make package-update".
.. warning:: .. admonition:: Git protocols
:class: note
The GitHub servers support both the "git://" and The servers at github.com support the "git://" and "https://" access
"https://" access protocols for anonymous read-only access. If you protocols for anonymous, read-only access. If you have a suitably
have a correspondingly configured GitHub account, you may also use configured GitHub account, you may also use SSH protocol with the
SSH access with the URL "git@github.com:lammps/lammps.git". URL "git@github.com:lammps/lammps.git".
The LAMMPS GitHub project is managed by Christoph Junghans (LANL, The LAMMPS GitHub project is currently managed by Axel Kohlmeyer
junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at (Temple U, akohlmey at gmail.com) and Richard Berger (Temple U,
gmail.com) and Richard Berger (Temple U, richard.berger at richard.berger at temple.edu).
temple.edu).

View File

@ -43,24 +43,54 @@ up to date.
* A list of updated files print out to the screen. The -b switch * A list of updated files print out to the screen. The -b switch
creates backup files of your originals (e.g. src/force.cpp.orig), so creates backup files of your originals (e.g. src/force.cpp.orig), so
you can manually undo the patch if something goes wrong. you can manually undo the patch if something goes wrong.
* Type the following from the src directory, to enforce consistency
between the src and package directories. This is OK to do even if you * Once you have updated your local files you need to re-build LAMMPS.
don't use one or more packages. If you are applying several patches If you are applying several patches successively, you only need to
successively, you only need to type this once at the end. The purge do the rebuild once at the end. How to do it depends on the build
command removes deprecated src files if any were removed by the patch system you are using.
from package sub-directories.
.. tabs::
.. tab:: CMake build
Change to your build folder and type:
.. code-block:: bash .. code-block:: bash
$ make purge cmake . --build
$ make package-update
* Re-build LAMMPS via the "make" command. CMake should auto-detect whether it needs to re-run the CMake
configuration step and otherwise redo the build for all files
that have been changed or files that depend on changed files.
In case some build options have been changed or renamed, you
may have to update those by running:
.. code-block:: bash
cmake .
and then rebuild.
.. tab:: Traditional make
Switch to the src directory and type:
.. code-block:: bash
$ make purge # remove any deprecated src files
$ make package-update # sync package files with src files
$ make foo # re-build for your machine (mpi, serial, etc)
to enforce consistency of the source between the src folder
and package directories. This is OK to do even if you don't
use any packages. The "make purge" command removes any deprecated
src files if they were removed by the patch from a package
sub-directory.
.. warning:: .. warning::
If you wish to edit/change a source file that is part of a package, If you wish to edit/change a src file that is from a package,
you should edit the version of the file inside the package folder in you should edit the version of the file inside the package
src, and then re-install or update the package. The version in the sub-directory with src, then re-install the package. The
src directory is merely a copy and will be wiped out when you type version in the source directory is merely a copy and will be
"make package-update". wiped out if you type "make package-update".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

@ -76,7 +76,7 @@ It documents the following functions:
----------------------- -----------------------
.. doxygenfunction:: lammps_create_atoms(void *handle, int n, int *id, int *type, double *x, double *v, int *image, int bexpand) .. doxygenfunction:: lammps_create_atoms(void *handle, int n, const int *id, const int *type, const double *x, const double *v, const int *image, int bexpand)
:project: progguide :project: progguide

View File

@ -1,14 +1,15 @@
Input script command style Input script command style
========================== ==========================
New commands can be added to LAMMPS input scripts by adding new New commands can be added to LAMMPS input scripts by adding new classes
classes that have a "command" method. For example, the create_atoms, that are derived from the Command class and thus must have a "command"
read_data, velocity, and run commands are all implemented in this method. For example, the create_atoms, read_data, velocity, and run
fashion. When such a command is encountered in the LAMMPS input commands are all implemented in this fashion. When such a command is
script, LAMMPS simply creates a class with the corresponding name, encountered in the LAMMPS input script, LAMMPS simply creates a class
invokes the "command" method of the class, and passes it the arguments instance with the corresponding name, invokes the "command" method of
from the input script. The command method can perform whatever the class, and passes it the arguments from the input script. The
operations it wishes on LAMMPS data structures. command method can perform whatever operations it wishes on LAMMPS data
structures.
The single method your new class must define is as follows: The single method your new class must define is as follows:

View File

@ -50,6 +50,7 @@ page gives those details.
* :ref:`MSCG <PKG-MSCG>` * :ref:`MSCG <PKG-MSCG>`
* :ref:`OPT <PKG-OPT>` * :ref:`OPT <PKG-OPT>`
* :ref:`PERI <PKG-PERI>` * :ref:`PERI <PKG-PERI>`
* :ref:`PLUGIN <PKG-PLUGIN>`
* :ref:`POEMS <PKG-POEMS>` * :ref:`POEMS <PKG-POEMS>`
* :ref:`PYTHON <PKG-PYTHON>` * :ref:`PYTHON <PKG-PYTHON>`
* :ref:`QEQ <PKG-QEQ>` * :ref:`QEQ <PKG-QEQ>`
@ -90,6 +91,7 @@ page gives those details.
* :ref:`USER-MOLFILE <PKG-USER-MOLFILE>` * :ref:`USER-MOLFILE <PKG-USER-MOLFILE>`
* :ref:`USER-NETCDF <PKG-USER-NETCDF>` * :ref:`USER-NETCDF <PKG-USER-NETCDF>`
* :ref:`USER-OMP <PKG-USER-OMP>` * :ref:`USER-OMP <PKG-USER-OMP>`
* :ref:`USER-PACE <PKG-USER-PACE>`
* :ref:`USER-PHONON <PKG-USER-PHONON>` * :ref:`USER-PHONON <PKG-USER-PHONON>`
* :ref:`USER-PLUMED <PKG-USER-PLUMED>` * :ref:`USER-PLUMED <PKG-USER-PLUMED>`
* :ref:`USER-PTM <PKG-USER-PTM>` * :ref:`USER-PTM <PKG-USER-PTM>`
@ -585,7 +587,7 @@ MC package
Several fixes and a pair style that have Monte Carlo (MC) or MC-like Several fixes and a pair style that have Monte Carlo (MC) or MC-like
attributes. These include fixes for creating, breaking, and swapping attributes. These include fixes for creating, breaking, and swapping
bonds, for performing atomic swaps, and performing grand-canonical MC bonds, for performing atomic swaps, and performing grand-canonical MC
(GCMC) in conjunction with dynamics. (GCMC) or similar processes in conjunction with dynamics.
**Supporting info:** **Supporting info:**
@ -593,8 +595,12 @@ bonds, for performing atomic swaps, and performing grand-canonical MC
* :doc:`fix atom/swap <fix_atom_swap>` * :doc:`fix atom/swap <fix_atom_swap>`
* :doc:`fix bond/break <fix_bond_break>` * :doc:`fix bond/break <fix_bond_break>`
* :doc:`fix bond/create <fix_bond_create>` * :doc:`fix bond/create <fix_bond_create>`
* :doc:`fix bond/create/angle <fix_bond_create>`
* :doc:`fix bond/swap <fix_bond_swap>` * :doc:`fix bond/swap <fix_bond_swap>`
* :doc:`fix charge/regulation <fix_charge_regulation>`
* :doc:`fix gcmc <fix_gcmc>` * :doc:`fix gcmc <fix_gcmc>`
* :doc:`fix tfmc <fix_tfmc>`
* :doc:`fix widom <fix_widom>`
* :doc:`pair_style dsmc <pair_dsmc>` * :doc:`pair_style dsmc <pair_dsmc>`
* https://lammps.sandia.gov/movies.html#gcmc * https://lammps.sandia.gov/movies.html#gcmc
@ -844,6 +850,28 @@ Foster (UTSA).
---------- ----------
.. _PKG-PLUGIN:
PLUGIN package
--------------
**Contents:**
A :doc:`plugin <plugin>` command that can load and unload several
kind of styles in LAMMPS from shared object files at runtime without
having to recompile and relink LAMMPS.
**Authors:** Axel Kohlmeyer (Temple U)
**Supporting info:**
* src/PLUGIN: filenames -> commands
* :doc:`plugin command <plugin>`
* :doc:`Information on writing plugins <Developer_plugins>`
* examples/plugin
----------
.. _PKG-POEMS: .. _PKG-POEMS:
POEMS package POEMS package
@ -1327,6 +1355,46 @@ This package has :ref:`specific installation instructions <user-colvars>` on the
---------- ----------
.. _PKG-USER-PACE:
USER-PACE package
-------------------
**Contents:**
A pair style for the Atomic Cluster Expansion potential (ACE).
ACE is a methodology for deriving a highly accurate classical potential
fit to a large archive of quantum mechanical (DFT) data. The USER-PACE
package provides an efficient implementation for running simulations
with ACE potentials.
**Authors:**
This package was written by Yury Lysogorskiy^1,
Cas van der Oord^2, Anton Bochkarev^1,
Sarath Menon^1, Matteo Rinaldi^1, Thomas Hammerschmidt^1, Matous Mrovec^1,
Aidan Thompson^3, Gabor Csanyi^2, Christoph Ortner^4, Ralf Drautz^1.
^1: Ruhr-University Bochum, Bochum, Germany
^2: University of Cambridge, Cambridge, United Kingdom
^3: Sandia National Laboratories, Albuquerque, New Mexico, USA
^4: University of British Columbia, Vancouver, BC, Canada
**Install:**
This package has :ref:`specific installation instructions <user-pace>` on the :doc:`Build extras <Build_extras>` page.
**Supporting info:**
* src/USER-PACE: filenames -> commands
* :doc:`pair_style pace <pair_pace>`
* examples/USER/pace
----------
.. _PKG-USER-PLUMED: .. _PKG-USER-PLUMED:
USER-PLUMED package USER-PLUMED package
@ -2490,6 +2558,6 @@ which discuss the `QuickFF <quickff_>`_ methodology.
* :doc:`bond_style mm3 <bond_mm3>` * :doc:`bond_style mm3 <bond_mm3>`
* :doc:`improper_style distharm <improper_distharm>` * :doc:`improper_style distharm <improper_distharm>`
* :doc:`improper_style sqdistharm <improper_sqdistharm>` * :doc:`improper_style sqdistharm <improper_sqdistharm>`
* :doc:`pair_style mm3/switch3/coulgauss/long <pair_mm3_switch3_coulgauss_long>` * :doc:`pair_style mm3/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>`
* :doc:`pair_style lj/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>` * :doc:`pair_style lj/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>`
* examples/USER/yaff * examples/USER/yaff

View File

@ -71,6 +71,8 @@ package:
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+ +----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`PERI <PKG-PERI>` | Peridynamics models | :doc:`pair_style peri <pair_peri>` | peri | no | | :ref:`PERI <PKG-PERI>` | Peridynamics models | :doc:`pair_style peri <pair_peri>` | peri | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+ +----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`PLUGIN <PKG-PLUGIN>` | Plugin loader command | :doc:`plugin <plugin>` | plugins | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`POEMS <PKG-POEMS>` | coupled rigid body motion | :doc:`fix poems <fix_poems>` | rigid | int | | :ref:`POEMS <PKG-POEMS>` | coupled rigid body motion | :doc:`fix poems <fix_poems>` | rigid | int |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+ +----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`PYTHON <PKG-PYTHON>` | embed Python code in an input script | :doc:`python <python>` | python | sys | | :ref:`PYTHON <PKG-PYTHON>` | embed Python code in an input script | :doc:`python <python>` | python | sys |

View File

@ -83,6 +83,8 @@ package:
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-OMP <PKG-USER-OMP>` | OpenMP-enabled styles | :doc:`Speed omp <Speed_omp>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no | | :ref:`USER-OMP <PKG-USER-OMP>` | OpenMP-enabled styles | :doc:`Speed omp <Speed_omp>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-PACE <PKG-USER-PACE>` | Fast implementation of Atomic Cluster Expansion (ACE) potential | :doc:`pair pace <pair_pace>` | USER/pace | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-PHONON <PKG-USER-PHONON>` | phonon dynamical matrix | :doc:`fix phonon <fix_phonon>` | USER/phonon | no | | :ref:`USER-PHONON <PKG-USER-PHONON>` | phonon dynamical matrix | :doc:`fix phonon <fix_phonon>` | USER/phonon | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ +------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-PLUMED <PKG-USER-PLUMED>` | :ref:`PLUMED <PLUMED>` free energy library | :doc:`fix plumed <fix_plumed>` | USER/plumed | ext | | :ref:`USER-PLUMED <PKG-USER-PLUMED>` | :ref:`PLUMED <PLUMED>` free energy library | :doc:`fix plumed <fix_plumed>` | USER/plumed | ext |

View File

@ -142,7 +142,7 @@ Style Constants
Type Constants Type Constants
-------------- --------------
.. py:data:: LMP_TYPE_SCALAR, LMP_TYLE_VECTOR, LMP_TYPE_ARRAY, LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS .. py:data:: LMP_TYPE_SCALAR, LMP_TYPE_VECTOR, LMP_TYPE_ARRAY, LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS
:type: int :type: int
Constants in the :py:mod:`lammps` module to select what type of data Constants in the :py:mod:`lammps` module to select what type of data

View File

@ -1,6 +1,43 @@
Neighbor list access Neighbor list access
==================== ====================
Access to neighbor lists is handled through a couple of wrapper classes
that allows to treat it like either a python list or a NumPy array. The
access procedure is similar to that of the C-library interface: use one
of the "find" functions to look up the index of the neighbor list in the
global table of neighbor lists and then get access to the neighbor list
data. The code sample below demonstrates reading the neighbor list data
using the NumPy access method.
.. code-block:: python
from lammps import lammps
import numpy as np
lmp = lammps()
lmp.commands_string("""
region box block -2 2 -2 2 -2 2
lattice fcc 1.0
create_box 1 box
create_atoms 1 box
mass 1 1.0
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0
run 0 post no""")
# look up the neighbor list
nlidx = lmp.find_pair_neighlist('lj/cut')
nl = lmp.numpy.get_neighlist(nlidx)
tags = lmp.extract_atom('id')
print("half neighbor list with {} entries".format(nl.size))
# print neighbor list contents
for i in range(0,nl.size):
idx, nlist = nl.get(i)
print("\natom {} with ID {} has {} neighbors:".format(idx,tags[idx],nlist.size))
if nlist.size > 0:
for n in np.nditer(nlist):
print(" atom {} with ID {}".format(n,tags[n]))
**Methods:** **Methods:**
* :py:meth:`lammps.get_neighlist() <lammps.lammps.get_neighlist()>`: Get neighbor list for given index * :py:meth:`lammps.get_neighlist() <lammps.lammps.get_neighlist()>`: Get neighbor list for given index

View File

@ -71,9 +71,3 @@ Default
none none
----------
.. _cosine-Mayo:
**(Mayo)** Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
(1990).

View File

@ -27,7 +27,7 @@ Syntax
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command
*hybrid* args = list of one or more sub-styles, each with their args *hybrid* args = list of one or more sub-styles, each with their args
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* * accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* or *spin/kk*
Examples Examples
"""""""" """"""""

View File

@ -77,6 +77,7 @@ Commands
pair_style pair_style
pair_write pair_write
partition partition
plugin
prd prd
print print
processors processors

View File

@ -46,13 +46,14 @@ system volume (or area in 2d). The second term is the virial, equal to
-dU/dV, computed for all pairwise as well as 2-body, 3-body, 4-body, -dU/dV, computed for all pairwise as well as 2-body, 3-body, 4-body,
many-body, and long-range interactions, where :math:`r_i` and many-body, and long-range interactions, where :math:`r_i` and
:math:`f_i` are the position and force vector of atom *i*, and the black :math:`f_i` are the position and force vector of atom *i*, and the black
dot indicates a dot product. When periodic boundary conditions are dot indicates a dot product. This is computed in parallel for each
used, N' necessarily includes periodic image (ghost) atoms outside the sub-domain and then summed over all parallel processes. Thus N'
central box, and the position and force vectors of ghost atoms are thus necessarily includes atoms from neighboring sub-domains (so-called ghost
included in the summation. When periodic boundary conditions are not atoms) and the position and force vectors of ghost atoms are thus
used, N' = N = the number of atoms in the system. :doc:`Fixes <fix>` included in the summation. Only when running in serial and without
that impose constraints (e.g. the :doc:`fix shake <fix_shake>` command) periodic boundary conditions is N' = N = the number of atoms in the
also contribute to the virial term. system. :doc:`Fixes <fix>` that impose constraints (e.g. the :doc:`fix
shake <fix_shake>` command) may also contribute to the virial term.
A symmetric pressure tensor, stored as a 6-element vector, is also A symmetric pressure tensor, stored as a 6-element vector, is also
calculated by this compute. The 6 components of the vector are calculated by this compute. The 6 components of the vector are

View File

@ -15,10 +15,10 @@ Syntax
.. code-block:: LAMMPS .. code-block:: LAMMPS
dihedral_style style interp Ntable dihedral_style style interpolation Ntable
* style = *table* or *table/cut* * style = *table* or *table/cut*
* interp = *linear* or *spline* = method of interpolation * interpolation = *linear* or *spline* = method of interpolation
* Ntable = size of the internal lookup table * Ntable = size of the internal lookup table
Examples Examples

View File

@ -349,7 +349,7 @@ the box size stored with the snapshot.
The *xtc* style writes XTC files, a compressed trajectory format used The *xtc* style writes XTC files, a compressed trajectory format used
by the GROMACS molecular dynamics package, and described by the GROMACS molecular dynamics package, and described
`here <http://manual.gromacs.org/current/online/xtc.html>`_. `here <https://manual.gromacs.org/current/reference-manual/file-formats.html#xtc>`_.
The precision used in XTC files can be adjusted via the The precision used in XTC files can be adjusted via the
:doc:`dump_modify <dump_modify>` command. The default value of 1000 :doc:`dump_modify <dump_modify>` command. The default value of 1000
means that coordinates are stored to 1/1000 nanometer accuracy. XTC means that coordinates are stored to 1/1000 nanometer accuracy. XTC

View File

@ -308,8 +308,8 @@ performed with dump style *xtc*\ .
---------- ----------
The *format* keyword can be used to change the default numeric format The *format* keyword can be used to change the default numeric format output
output by the text-based dump styles: *atom*\ , *custom*\ , *cfg*\ , and by the text-based dump styles: *atom*\ , *local*\ , *custom*\ , *cfg*\ , and
*xyz* styles, and their MPIIO variants. Only the *line* or *none* *xyz* styles, and their MPIIO variants. Only the *line* or *none*
options can be used with the *atom* and *xyz* styles. options can be used with the *atom* and *xyz* styles.
@ -362,7 +362,7 @@ settings, reverting all values to their default format.
compute 1 all property/local batom1 batom2 compute 1 all property/local batom1 batom2
dump 1 all local 100 tmp.bonds index c_1[1] c_1[2] dump 1 all local 100 tmp.bonds index c_1[1] c_1[2]
dump_modify 1 format "%d %0.0f %0.0f" dump_modify 1 format line "%d %0.0f %0.0f"
will output the two atom IDs for atoms in each bond as integers. If will output the two atom IDs for atoms in each bond as integers. If
the dump_modify command were omitted, they would appear as the dump_modify command were omitted, they would appear as

View File

@ -189,6 +189,7 @@ accelerated styles exist.
* :doc:`bond/react <fix_bond_react>` - apply topology changes to model reactions * :doc:`bond/react <fix_bond_react>` - apply topology changes to model reactions
* :doc:`bond/swap <fix_bond_swap>` - Monte Carlo bond swapping * :doc:`bond/swap <fix_bond_swap>` - Monte Carlo bond swapping
* :doc:`box/relax <fix_box_relax>` - relax box size during energy minimization * :doc:`box/relax <fix_box_relax>` - relax box size during energy minimization
* :doc:`charge/regulation <fix_charge_regulation>` - Monte Carlo sampling of charge regulation
* :doc:`client/md <fix_client_md>` - MD client for client/server simulations * :doc:`client/md <fix_client_md>` - MD client for client/server simulations
* :doc:`cmap <fix_cmap>` - enables CMAP cross-terms of the CHARMM force field * :doc:`cmap <fix_cmap>` - enables CMAP cross-terms of the CHARMM force field
* :doc:`colvars <fix_colvars>` - interface to the collective variables "Colvars" library * :doc:`colvars <fix_colvars>` - interface to the collective variables "Colvars" library

View File

@ -307,7 +307,9 @@ atoms in the chunk. The averaged output value for the chunk on the
average over atoms across the entire *Nfreq* timescale. For the average over atoms across the entire *Nfreq* timescale. For the
*density/number* and *density/mass* values, the volume (bin volume or *density/number* and *density/mass* values, the volume (bin volume or
system volume) used in the final normalization will be the volume at system volume) used in the final normalization will be the volume at
the final *Nfreq* timestep. the final *Nfreq* timestep. For the *temp* values, degrees of freedom and
kinetic energy are summed separately across the entire *Nfreq* timescale, and
the output value is calculated by dividing those two sums.
If the *norm* setting is *sample*\ , the chunk value is summed over If the *norm* setting is *sample*\ , the chunk value is summed over
atoms for each sample, as is the count, and an "average sample value" atoms for each sample, as is the count, and an "average sample value"

View File

@ -138,8 +138,8 @@ vector or columns of the array had been listed one by one. E.g. these
.. code-block:: LAMMPS .. code-block:: LAMMPS
compute myCOM all com/chunk compute myCOM all com/chunk
fix 1 all ave/histo 100 1 100 c_myCOM[*] file tmp1.com mode vector fix 1 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[*] file tmp1.com mode vector
fix 2 all ave/histo 100 1 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector fix 2 all ave/histo 100 1 100 -10.0 10.0 100 c_myCOM[1] c_myCOM[2] c_myCOM[3] file tmp2.com mode vector
If the fix ave/histo/weight command is used, exactly two values must If the fix ave/histo/weight command is used, exactly two values must
be specified. If the values are vectors, they must be the same be specified. If the values are vectors, they must be the same

View File

@ -0,0 +1,276 @@
.. index:: fix charge/regulation
fix charge/regulation command
=============================
Syntax
""""""
.. parsed-literal::
fix ID group-ID charge/regulation cation_type anion_type keyword value(s)
* ID, group-ID are documented in fix command
* charge/regulation = style name of this fix command
* cation_type = atom type of free cations
* anion_type = atom type of free anions
* zero or more keyword/value pairs may be appended
.. parsed-literal::
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *xrd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
*pH* value = pH of the solution
*pKa* value = acid dissociation constant
*pKb* value = base dissociation constant
*pIp* value = chemical potential of free cations
*pIm* value = chemical potential of free anions
*pKs* value = solution self-dissociation constant
*acid_type* = atom type of acid groups
*base_type* = atom type of base groups
*lunit_nm* value = unit length used by LAMMPS (# in the units of nanometers)
*temp* value = temperature
*tempfixid* value = fix ID of temperature thermostat
*nevery* value = invoke this fix every nevery steps
*nmc* value = number of charge regulation MC moves to attempt every nevery steps
*xrd* value = cutoff distance for acid/base reaction
*seed* value = random # seed (positive integer)
*tag* value = yes or no (yes: The code assign unique tags to inserted ions; no: The tag of all inserted ions is "0")
*group* value = group-ID, inserted ions are assigned to group group-ID. Can be used multiple times to assign inserted ions to multiple groups.
*onlysalt* values = flag charge_cation charge_anion.
flag = yes or no (yes: the fix performs only ion insertion/deletion, no: perform acid/base dissociation and ion insertion/deletion)
charge_cation, charge_anion = value of cation/anion charge, must be an integer (only specify if flag = yes)
*pmcmoves* values = pmcA pmcB pmcI - MC move fractions for acid ionization (pmcA), base ionization (pmcB) and free ion exchange (pmcI)
Examples
""""""""
.. code-block:: LAMMPS
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5 pKb 7 lb 1.0 nevery 200 nexchange 200 seed 123 tempfixid fT
fix chareg all charge/regulation 1 2 pIp 3 pIm 3 onlysalt yes 2 -1 seed 123 tag yes temp 1.0
Description
"""""""""""
This fix performs Monte Carlo (MC) sampling of charge regulation and
exchange of ions with a reservoir as discussed in :ref:`(Curk1) <Curk1>`
and :ref:`(Curk2) <Curk2>`. The implemented method is largely analogous
to the grand-reaction ensemble method in :ref:`(Landsgesell)
<Landsgesell>`. The implementation is parallelized, compatible with
existing LAMMPS functionalities, and applicable to any system utilizing
discrete, ionizable groups or surface sites.
Specifically, the fix implements the following three types of MC moves,
which discretely change the charge state of individual particles and
insert ions into the systems: :math:`\mathrm{A} \rightleftharpoons
\mathrm{A}^-+\mathrm{X}^+`, :math:`\mathrm{B} \rightleftharpoons
\mathrm{B}^++\mathrm{X}^-`, and :math:`\emptyset \rightleftharpoons
Z^-\mathrm{X}^{Z^+}+Z^+\mathrm{X}^{-Z^-}`. In the former two types of
reactions, Monte Carlo moves alter the charge value of specific atoms
(:math:`\mathrm{A}`, :math:`\mathrm{B}`) and simultaneously insert a
counterion to preserve the charge neutrality of the system, modeling the
dissociation/association process. The last type of reaction performs
grand canonical MC exchange of ion pairs with a (fictitious) reservoir.
In our implementation "acid" refers to particles that can attain charge
:math:`q=\{0,-1\}` and "base" to particles with :math:`q=\{0,1\}`,
whereas the MC exchange of free ions allows any integer charge values of
:math:`{Z^+}` and :math:`{Z^-}`.
Here we provide several practical examples for modeling charge
regulation effects in solvated systems. An acid ionization reaction
(:math:`\mathrm{A} \rightleftharpoons \mathrm{A}^-+\mathrm{H}^+`) can be
defined via a single line in the input file
.. code-block:: LAMMPS
fix acid_reaction all charge/regulation 2 3 acid_type 1 pH 7.0 pKa 5.0 pIp 7.0 pIm 7.0
where the fix attempts to charge :math:`\mathrm{A}` (discharge
:math:`\mathrm{A}^-`) to :math:`\mathrm{A}^-` (:math:`\mathrm{A}`) and
insert (delete) a proton (atom type 2). Besides, the fix implements
self-ionization reaction of water :math:`\emptyset \rightleftharpoons
\mathrm{H}^++\mathrm{OH}^-`. However, this approach is highly
inefficient at :math:`\mathrm{pH} \approx 7` when the concentration of
both protons and hydroxyl ions is low, resulting in a relatively low
acceptance rate of MC moves.
A more efficient way is to allow salt ions to participate in ionization
reactions, which can be easily achieved via
.. code-block:: LAMMPS
fix acid_reaction all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
where particles of atom type 4 and 5 are the salt cations and anions,
both at chemical potential pI=2.0, see :ref:`(Curk1) <Curk1>` and
:ref:`(Landsgesell) <Landsgesell>` for more details.
Similarly, we could have simultaneously added a base ionization reaction
(:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
.. code-block:: LAMMPS
fix base_reaction all charge/regulation 2 3 base_type 6 pH 7.0 pKb 6.0 pIp 7.0 pIm 7.0
where the fix will attempt to charge :math:`\mathrm{B}` (discharge
:math:`\mathrm{B}^+`) to :math:`\mathrm{B}^+` (:math:`\mathrm{B}`) and
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3. If
neither the acid or the base type is specified, for example,
.. code-block:: LAMMPS
fix salt_reaction all charge/regulation 4 5 pIp 2.0 pIm 2.0
the fix simply inserts or deletes an ion pair of a free cation (atom
type 4) and a free anion (atom type 5) as done in a conventional
grand-canonical MC simulation.
The fix is compatible with LAMMPS sub-packages such as *molecule* or
*rigid*. That said, the acid and base particles can be part of larger
molecules or rigid bodies. Free ions that are inserted to or deleted
from the system must be defined as single particles (no bonded
interactions allowed) and cannot be part of larger molecules or rigid
bodies. If *molecule* package is used, all inserted ions have a molecule
ID equal to zero.
Note that LAMMPS implicitly assumes a constant number of particles
(degrees of freedom). Since using this fix alters the total number of
particles during the simulation, any thermostat used by LAMMPS, such as
NVT or Langevin, must use a dynamic calculation of system
temperature. This can be achieved by specifying a dynamic temperature
compute (e.g. dtemp) and using it with the desired thermostat, e.g. a
Langevin thermostat:
.. code-block:: LAMMPS
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
The chemical potential units (e.g. pH) are in the standard log10
representation assuming reference concentration :math:`\rho_0 =
\mathrm{mol}/\mathrm{l}`. Therefore, to perform the internal unit
conversion, the length (in nanometers) of the LAMMPS unit length must be
specified via *lunit_nm* (default is set to the Bjerrum length in water
at room temperature *lunit_nm* = 0.71nm). For example, in the dilute
ideal solution limit, the concentration of free ions will be
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`.
The temperature used in MC acceptance probability is set by *temp*. This
temperature should be the same as the temperature set by the molecular
dynamics thermostat. For most purposes, it is probably best to use
*tempfixid* keyword which dynamically sets the temperature equal to the
chosen MD thermostat temperature, in the example above we assumed the
thermostat fix-ID is *fT*. The inserted particles attain a random
velocity corresponding to the specified temperature. Using *tempfixid*
overrides any fixed temperature set by *temp*.
The *xrd* keyword can be used to restrict the inserted/deleted
counterions to a specific radial distance from an acid or base particle
that is currently participating in a reaction. This can be used to
simulate more realist reaction dynamics. If *xrd* = 0 or *xrd* > *L* /
2, where *L* is the smallest box dimension, the radial restriction is
automatically turned off and free ion can be inserted or deleted
anywhere in the simulation box.
If the *tag yes* is used, every inserted atom gets a unique tag ID,
otherwise, the tag of every inserted atom is set to 0. *tag yes* might
cause an integer overflow in very long simulations since the tags are
unique to every particle and thus increase with every successful
particle insertion.
The *pmcmoves* keyword sets the relative probability of attempting the
three types of MC moves (reactions): acid charging, base charging, and
ion pair exchange. The fix only attempts to perform particle charging
MC moves if *acid_type* or *base_type* is defined. Otherwise fix only
performs free ion insertion/deletion. For example, if *acid_type* is not
defined, *pmcA* is automatically set to 0. The vector *pmcmoves* is
automatically normalized, for example, if set to *pmcmoves* 0 0.33 0.33,
the vector would be normalized to [0,0.5,0.5].
The *only_salt* option can be used to perform multivalent
grand-canonical ion-exchange moves. If *only_salt yes* is used, no
charge exchange is performed, only ion insertion/deletion (*pmcmoves* is
set to [0,0,1]), but ions can be multivalent. In the example above, an
MC move would consist of three ion insertion/deletion to preserve the
charge neutrality of the system.
The *group* keyword can be used to add inserted particles to a specific
group-ID. All inserted particles are automatically added to group *all*.
Output
""""""
This fix computes a global vector of length 8, which can be accessed by
various output commands. The vector values are the following global
quantities:
* 1 = cumulative MC attempts
* 2 = cumulative MC successes
* 3 = current # of neutral acid atoms
* 4 = current # of -1 charged acid atoms
* 5 = current # of neutral base atoms
* 6 = current # of +1 charged base atoms
* 7 = current # of free cations
* 8 = current # of free anions
Restrictions
""""""""""""
This fix is part of the MC package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
The :doc:`atom_style <atom_style>`, used must contain the charge
property, for example, the style could be *charge* or *full*. Only
usable for 3D simulations. Atoms specified as free ions cannot be part
of rigid bodies or molecules and cannot have bonding interactions. The
scheme is limited to integer charges, any atoms with non-integer charges
will not be considered by the fix.
All interaction potentials used must be continuous, otherwise the MD
integration and the particle exchange MC moves do not correspond to the
same equilibrium ensemble. For example, if an lj/cut pair style is used,
the LJ potential must be shifted so that it vanishes at the cutoff. This
can be easily achieved using the :doc:`pair_modify <pair_modify>`
command, i.e., by using: *pair_modify shift yes*.
.. note::
Region restrictions are not yet implemented.
Related commands
""""""""""""""""
:doc:`fix gcmc <fix_gcmc>`,
:doc:`fix atom/swap <fix_atom_swap>`
Default
"""""""
pH = 7.0; pKa = 100.0; pKb = 100.0; pIp = 5.0; pIm = 5.0; pKs = 14.0;
acid_type = -1; base_type = -1; lunit_nm = 0.71; temp = 1.0; nevery =
100; nmc = 100; xrd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
[1/3, 1/3, 1/3], group-ID = all
----------
.. _Curk1:
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Coarse-grained simulation of charge regulation using LAMMPS", preprint (2021).
.. _Curk2:
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL (2021)
.. _Landsgesell:
**(Landsgesell)** J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Kosovan, and C. Holm, "Grand-reaction method for simulations of ionization equilibria coupled to ion partitioning", Macromolecules 53, 3007-3020 (2020).

View File

@ -127,6 +127,11 @@ the :doc:`run <run>` command.
The forces due to this fix are imposed during an energy minimization, The forces due to this fix are imposed during an energy minimization,
invoked by the :doc:`minimize <minimize>` command. invoked by the :doc:`minimize <minimize>` command.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
.. note:: .. note::
If you want the potential energy associated with the CMAP terms If you want the potential energy associated with the CMAP terms

View File

@ -115,6 +115,18 @@ The version with "bondmax" will just run somewhat faster, due to less
overhead in computing bond lengths and not storing them in a separate overhead in computing bond lengths and not storing them in a separate
compute. compute.
A variable can be used to implement a large variety of conditions,
including to stop when a specific file exists. Example:
.. code-block:: LAMMPS
variable exit equal is_file(EXIT)
fix 10 all halt 100 v_exit != 0 error soft
Will stop the current run command when a file ``EXIT`` is created
in the current working directory. The condition can be cleared
by removing the file through the :doc:`shell <shell>` command.
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 "\|\^".
In this context, XOR means that if either the attribute or avalue is In this context, XOR means that if either the attribute or avalue is

View File

@ -56,27 +56,28 @@ Examples
Description Description
""""""""""" """""""""""
Perform the charge equilibration (QEq) method as described in :ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano) <Nakano1>` (also known Perform the charge equilibration (QEq) method as described in
as the matrix inversion method) and in :ref:`(Rick and Stuart) <Rick1>` (also :ref:`(Rappe and Goddard) <Rappe1>` and formulated in :ref:`(Nakano)
known as the extended Lagrangian method) based on the <Nakano1>` (also known as the matrix inversion method) and in
electronegativity equilization principle. :ref:`(Rick and Stuart) <Rick1>` (also known as the extended Lagrangian
method) based on the electronegativity equilization principle.
These fixes can be used with any :doc:`pair style <pair_style>` in These fixes can be used with any :doc:`pair style <pair_style>` in
LAMMPS, so long as per-atom charges are defined. The most typical LAMMPS, so long as per-atom charges are defined. The most typical
use-case is in conjunction with a :doc:`pair style <pair_style>` that use-case is in conjunction with a :doc:`pair style <pair_style>` that
performs charge equilibration periodically (e.g. every timestep), such performs charge equilibration periodically (e.g. every timestep), such
as the ReaxFF or Streitz-Mintmire potential. as the ReaxFF or Streitz-Mintmire potential. But these fixes can also
But these fixes can also be used with be used with potentials that normally assume per-atom charges are fixed,
potentials that normally assume per-atom charges are fixed, e.g. a e.g. a :doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>`
:doc:`Buckingham <pair_buck>` or :doc:`LJ/Coulombic <pair_lj>` potential. potential.
Because the charge equilibration calculation is effectively Because the charge equilibration calculation is effectively independent
independent of the pair style, these fixes can also be used to perform of the pair style, these fixes can also be used to perform a one-time
a one-time assignment of charges to atoms. For example, you could assignment of charges to atoms. For example, you could define the QEq
define the QEq fix, perform a zero-timestep run via the :doc:`run <run>` fix, perform a zero-timestep run via the :doc:`run <run>` command
command without any pair style defined which would set per-atom without any pair style defined which would set per-atom charges (based
charges (based on the current atom configuration), then remove the fix on the current atom configuration), then remove the fix via the
via the :doc:`unfix <unfix>` command before performing further dynamics. :doc:`unfix <unfix>` command before performing further dynamics.
.. note:: .. note::
@ -87,11 +88,14 @@ via the :doc:`unfix <unfix>` command before performing further dynamics.
.. note:: .. note::
The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used The :doc:`fix qeq/comb <fix_qeq_comb>` command must still be used to
to perform charge equilibration with the :doc:`COMB potential <pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>` perform charge equilibration with the :doc:`COMB potential
command can be used to perform charge equilibration with the :doc:`ReaxFF force field <pair_reaxc>`, although fix qeq/shielded yields the <pair_comb>`. The :doc:`fix qeq/reax <fix_qeq_reax>` command can be
same results as fix qeq/reax if *Nevery*\ , *cutoff*\ , and *tolerance* used to perform charge equilibration with the :doc:`ReaxFF force
are the same. Eventually the fix qeq/reax command will be deprecated. field <pair_reaxc>`, although fix qeq/shielded yields the same
results as fix qeq/reax if *Nevery*\ , *cutoff*\ , and *tolerance*
are the same. Eventually the fix qeq/reax command will be
deprecated.
The QEq method minimizes the electrostatic energy of the system (or The QEq method minimizes the electrostatic energy of the system (or
equalizes the derivative of energy with respect to charge of all the equalizes the derivative of energy with respect to charge of all the
@ -134,55 +138,57 @@ usually a good number.
The *qeq/shielded* style describes partial charges on atoms also as The *qeq/shielded* style describes partial charges on atoms also as
point charges, but uses a shielded Coulomb potential to describe the point charges, but uses a shielded Coulomb potential to describe the
interaction between a pair of charged particles. Interaction through interaction between a pair of charged particles. Interaction through
the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force field <vanDuin>` paper. The shielding accounts for charge overlap the shielded Coulomb is given by equation (13) of the :ref:`ReaxFF force
field <vanDuin>` paper. The shielding accounts for charge overlap
between charged particles at small separation. This style is the same between charged particles at small separation. This style is the same
as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with :doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and *gamma* as :doc:`fix qeq/reax <fix_qeq_reax>`, and can be used with
parameters from the *qfile* file are used. When using the string :doc:`pair_style reax/c <pair_reaxc>`. Only the *chi*\ , *eta*\ , and
*reax/c* as filename, these parameters are extracted directly from *gamma* parameters from the *qfile* file are used. When using the string
an active *reax/c* pair style. This style solves partial *reax/c* as filename, these parameters are extracted directly from an
charges on atoms via the matrix inversion method. A tolerance of active *reax/c* pair style. This style solves partial charges on atoms
1.0e-6 is usually a good number. via the matrix inversion method. A tolerance of 1.0e-6 is usually a
good number.
The *qeq/slater* style describes partial charges on atoms as spherical The *qeq/slater* style describes partial charges on atoms as spherical
charge densities centered around atoms via the Slater 1\ *s* orbital, so charge densities centered around atoms via the Slater 1\ *s* orbital, so
that the interaction between a pair of charged particles is the that the interaction between a pair of charged particles is the product
product of two Slater 1\ *s* orbitals. The expression for the Slater of two Slater 1\ *s* orbitals. The expression for the Slater 1\ *s*
1\ *s* orbital is given under equation (6) of the orbital is given under equation (6) of the :ref:`Streitz-Mintmire
:ref:`Streitz-Mintmire <Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and <Streitz1>` paper. Only the *chi*\ , *eta*\ , *zeta*\ , and *qcore*
*qcore* parameters from the *qfile* file are used. When using the string parameters from the *qfile* file are used. When using the string
*coul/streitz* as filename, these parameters are extracted directly from *coul/streitz* as filename, these parameters are extracted directly from
an active *coul/streitz* pair style. This style solves an active *coul/streitz* pair style. This style solves partial charges
partial charges on atoms via the matrix inversion method. A tolerance on atoms via the matrix inversion method. A tolerance of 1.0e-6 is
of 1.0e-6 is usually a good number. Keyword *alpha* can be used to usually a good number. Keyword *alpha* can be used to change the Slater
change the Slater type orbital exponent. type orbital exponent.
The *qeq/dynamic* style describes partial charges on atoms as point The *qeq/dynamic* style describes partial charges on atoms as point
charges that interact through 1/r, but the extended Lagrangian method charges that interact through 1/r, but the extended Lagrangian method is
is used to solve partial charges on atoms. Only the *chi* and *eta* used to solve partial charges on atoms. Only the *chi* and *eta*
parameters from the *qfile* file are used. Note that Coulomb parameters from the *qfile* file are used. Note that Coulomb
catastrophe can occur if repulsion between the pair of charged catastrophe can occur if repulsion between the pair of charged particles
particles is too weak. A tolerance of 1.0e-3 is usually a good is too weak. A tolerance of 1.0e-3 is usually a good number. Keyword
number. Keyword *qdamp* can be used to change the damping factor, while *qdamp* can be used to change the damping factor, while keyword *qstep*
keyword *qstep* can be used to change the time step size. can be used to change the time step size.
The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model and charge The :ref:`\ *qeq/fire*\ <Shan>` style describes the same charge model
solver as the *qeq/dynamic* style, but employs a FIRE minimization and charge solver as the *qeq/dynamic* style, but employs a FIRE
algorithm to solve for equilibrium charges. minimization algorithm to solve for equilibrium charges. Keyword
Keyword *qdamp* can be used to change the damping factor, while *qdamp* can be used to change the damping factor, while keyword *qstep*
keyword *qstep* can be used to change the time step size. can be used to change the time step size.
Note that *qeq/point*\ , *qeq/shielded*\ , and *qeq/slater* describe Note that *qeq/point*\ , *qeq/shielded*\ , and *qeq/slater* describe
different charge models, whereas the matrix inversion method and the different charge models, whereas the matrix inversion method and the
extended Lagrangian method (\ *qeq/dynamic* and *qeq/fire*\ ) are extended Lagrangian method (\ *qeq/dynamic* and *qeq/fire*\ ) are
different solvers. different solvers.
Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all describe Note that *qeq/point*\ , *qeq/dynamic* and *qeq/fire* styles all
charges as point charges that interact through 1/r relationship, but describe charges as point charges that interact through 1/r
solve partial charges on atoms using different solvers. These three relationship, but solve partial charges on atoms using different
styles should yield comparable results if solvers. These three styles should yield comparable results if the QEq
the QEq parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the parameters and *Nevery*\ , *cutoff*\ , and *tolerance* are the same.
same. Style *qeq/point* is typically faster, *qeq/dynamic* scales Style *qeq/point* is typically faster, *qeq/dynamic* scales better on
better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ . larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
.. note:: .. note::
@ -200,9 +206,11 @@ better on larger sizes, and *qeq/fire* is faster than *qeq/dynamic*\ .
Restart, fix_modify, output, run start/stop, minimize info Restart, fix_modify, output, run start/stop, minimize info
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about these fixes is written to :doc:`binary restart files <restart>`. No global scalar or vector or per-atom No information about these fixes is written to :doc:`binary restart
quantities are stored by these fixes for access by various :doc:`output commands <Howto_output>`. No parameter of these fixes can be used files <restart>`. No global scalar or vector or per-atom quantities are
with the *start/stop* keywords of the :doc:`run <run>` command. stored by these fixes for access by various :doc:`output commands
<Howto_output>`. No parameter of these fixes can be used with the
*start/stop* keywords of the :doc:`run <run>` command.
Thexe fixes are invoked during :doc:`energy minimization <minimize>`. Thexe fixes are invoked during :doc:`energy minimization <minimize>`.
@ -210,7 +218,8 @@ Restrictions
"""""""""""" """"""""""""
These fixes are part of the QEQ package. They are only enabled if These fixes are part of the QEQ package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -29,6 +29,7 @@ Syntax
gamma_t = damping coefficient for collisions in tangential direction (1/time units or 1/time-distance units - see discussion below) gamma_t = damping coefficient for collisions in tangential direction (1/time units or 1/time-distance units - see discussion below)
xmu = static yield criterion (unitless value between 0.0 and 1.0e4) xmu = static yield criterion (unitless value between 0.0 and 1.0e4)
dampflag = 0 or 1 if tangential damping force is excluded or included dampflag = 0 or 1 if tangential damping force is excluded or included
optional keyword = *limit_damping*, limit damping to prevent attractive interaction
.. parsed-literal:: .. parsed-literal::
@ -95,7 +96,8 @@ Specifically, delta = radius - r = overlap of particle with wall, m_eff
= mass of particle, and the effective radius of contact = RiRj/Ri+Rj is = mass of particle, and the effective radius of contact = RiRj/Ri+Rj is
set to the radius of the particle. set to the radius of the particle.
The parameters *Kn*\ , *Kt*\ , *gamma_n*, *gamma_t*, *xmu* and *dampflag* The parameters *Kn*\ , *Kt*\ , *gamma_n*, *gamma_t*, *xmu*, *dampflag*,
and the optional keyword *limit_damping*
have the same meaning and units as those specified with the have the same meaning and units as those specified with the
:doc:`pair_style gran/\* <pair_gran>` commands. This means a NULL can be :doc:`pair_style gran/\* <pair_gran>` commands. This means a NULL can be
used for either *Kt* or *gamma_t* as described on that page. If a used for either *Kt* or *gamma_t* as described on that page. If a

View File

@ -181,7 +181,8 @@ radius - r = overlap of particle with wall, m_eff = mass of particle,
and the effective radius of contact is just the radius of the and the effective radius of contact is just the radius of the
particle. particle.
The parameters *Kn*\ , *Kt*\ , *gamma_n*, *gamma_t*, *xmu* and *dampflag* The parameters *Kn*\ , *Kt*\ , *gamma_n*, *gamma_t*, *xmu*, *dampflag*,
and the optional keyword *limit_damping*
have the same meaning and units as those specified with the have the same meaning and units as those specified with the
:doc:`pair_style gran/\* <pair_gran>` commands. This means a NULL can be :doc:`pair_style gran/\* <pair_gran>` commands. This means a NULL can be
used for either *Kt* or *gamma_t* as described on that page. If a used for either *Kt* or *gamma_t* as described on that page. If a

View File

@ -10,6 +10,8 @@
.. index:: pair_style coul/dsf/gpu .. index:: pair_style coul/dsf/gpu
.. index:: pair_style coul/dsf/kk .. index:: pair_style coul/dsf/kk
.. index:: pair_style coul/dsf/omp .. index:: pair_style coul/dsf/omp
.. index:: pair_style coul/cut/global
.. index:: pair_style coul/cut/global/omp
.. index:: pair_style coul/long .. index:: pair_style coul/long
.. index:: pair_style coul/long/omp .. index:: pair_style coul/long/omp
.. index:: pair_style coul/long/kk .. index:: pair_style coul/long/kk
@ -40,6 +42,11 @@ pair_style coul/dsf command
Accelerator Variants: *coul/dsf/gpu*, *coul/dsf/kk*, *coul/dsf/omp* Accelerator Variants: *coul/dsf/gpu*, *coul/dsf/kk*, *coul/dsf/omp*
pair_style coul/cut/global command
==================================
Accelerator Variants: *coul/cut/omp*
pair_style coul/long command pair_style coul/long command
============================ ============================
@ -76,8 +83,8 @@ Syntax
pair_style coul/cut cutoff pair_style coul/cut cutoff
pair_style coul/debye kappa cutoff pair_style coul/debye kappa cutoff
pair_style coul/dsf alpha cutoff pair_style coul/dsf alpha cutoff
pair_style coul/cut/global cutoff
pair_style coul/long cutoff pair_style coul/long cutoff
pair_style coul/long/gpu cutoff
pair_style coul/wolf alpha cutoff pair_style coul/wolf alpha cutoff
pair_style coul/streitz cutoff keyword alpha pair_style coul/streitz cutoff keyword alpha
pair_style tip4p/cut otype htype btype atype qdist cutoff pair_style tip4p/cut otype htype btype atype qdist cutoff
@ -245,6 +252,11 @@ Streitz-Mintmire parameterization for the material being modeled.
---------- ----------
Pair style *coul/cut/global* computes the same Coulombic interactions
as style *coul/cut* except that it allows only a single global cutoff
and thus makes it compatible for use in combination with long-range
coulomb styles in :doc:`hybrid pair styles <pair_hybrid>`.
Styles *coul/long* and *coul/msm* compute the same Coulombic Styles *coul/long* and *coul/msm* compute the same Coulombic
interactions as style *coul/cut* except that an additional damping interactions as style *coul/cut* except that an additional damping
factor is applied so it can be used in conjunction with the factor is applied so it can be used in conjunction with the

View File

@ -150,7 +150,7 @@ shifted to be 0.0 at the cutoff distance Rc.
The :doc:`pair_modify <pair_modify>` table option is not relevant The :doc:`pair_modify <pair_modify>` table option is not relevant
for these pair styles. for these pair styles.
These pair style do not support the :doc:`pair_modify <pair_modify>` These pair styles do not support the :doc:`pair_modify <pair_modify>`
tail option for adding long-range tail corrections to energy and tail option for adding long-range tail corrections to energy and
pressure. pressure.

View File

@ -363,7 +363,7 @@ Mixing, shift, table, tail correction, restart, rRESPA info
The different versions of the *lj/cut/soft* pair styles support mixing. For The different versions of the *lj/cut/soft* pair styles support mixing. For
atom type pairs I,J and I != J, the :math:`\epsilon` and :math:`\sigma` atom type pairs I,J and I != J, the :math:`\epsilon` and :math:`\sigma`
coefficients and cutoff distance for these pair style can be mixed. The default coefficients and cutoff distance for these pair styles can be mixed. The default
mix value is *geometric* for 12-6 styles. mix value is *geometric* for 12-6 styles.
The mixing rule for epsilon and sigma for *lj/class2/soft* 9-6 potentials is to The mixing rule for epsilon and sigma for *lj/class2/soft* 9-6 potentials is to

View File

@ -188,7 +188,7 @@ Restrictions
The *gayberne* style is part of the ASPHERE package. It is only The *gayberne* style is part of the ASPHERE package. It is only
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
These pair style require that atoms store torque and a quaternion to These pair styles require that atoms store torque and a quaternion to
represent their orientation, as defined by the represent their orientation, as defined by the
:doc:`atom_style <atom_style>`. It also require they store a per-type :doc:`atom_style <atom_style>`. It also require they store a per-type
:doc:`shape <set>`. The particles cannot store a per-particle :doc:`shape <set>`. The particles cannot store a per-particle

View File

@ -26,7 +26,7 @@ Syntax
.. code-block:: LAMMPS .. code-block:: LAMMPS
pair_style style Kn Kt gamma_n gamma_t xmu dampflag pair_style style Kn Kt gamma_n gamma_t xmu dampflag keyword
* style = *gran/hooke* or *gran/hooke/history* or *gran/hertz/history* * style = *gran/hooke* or *gran/hooke/history* or *gran/hertz/history*
* Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below) * Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
@ -36,6 +36,13 @@ Syntax
* xmu = static yield criterion (unitless value between 0.0 and 1.0e4) * xmu = static yield criterion (unitless value between 0.0 and 1.0e4)
* dampflag = 0 or 1 if tangential damping force is excluded or included * dampflag = 0 or 1 if tangential damping force is excluded or included
* keyword = *limit_damping*
.. parsed-literal::
*limit_damping* value = none
limit damping to prevent attractive interaction
.. note:: .. note::
Versions of LAMMPS before 9Jan09 had different style names for Versions of LAMMPS before 9Jan09 had different style names for
@ -54,6 +61,8 @@ Examples
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 1 pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 1
pair_style gran/hooke 200000.0 70000.0 50.0 30.0 0.5 0 pair_style gran/hooke 200000.0 70000.0 50.0 30.0 0.5 0
pair_style gran/hooke 200000.0 70000.0 50.0 30.0 0.5 0 limit_damping
Description Description
""""""""""" """""""""""
@ -208,6 +217,12 @@ potential is used as a sub-style of :doc:`pair_style hybrid <pair_hybrid>`, then
pair_coeff command to determine which atoms interact via a granular pair_coeff command to determine which atoms interact via a granular
potential. potential.
If two particles are moving away from each other while in contact, there
is a possibility that the particles could experience an effective attractive
force due to damping. If the *limit_damping* keyword is used, this option
will zero out the normal component of the force if there is an effective
attractive force.
---------- ----------
.. include:: accel_styles.rst .. include:: accel_styles.rst

View File

@ -24,7 +24,7 @@ Examples
pair_coeff * * hooke 1000.0 50.0 tangential linear_history 500.0 1.0 0.4 damping mass_velocity pair_coeff * * hooke 1000.0 50.0 tangential linear_history 500.0 1.0 0.4 damping mass_velocity
pair_style granular pair_style granular
pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 pair_coeff * * hertz 1000.0 50.0 tangential mindlin 1000.0 1.0 0.4 limit_damping
pair_style granular pair_style granular
pair_coeff * * hertz/material 1e8 0.3 0.3 tangential mindlin_rescale NULL 1.0 0.4 damping tsuji pair_coeff * * hertz/material 1e8 0.3 0.3 tangential mindlin_rescale NULL 1.0 0.4 damping tsuji
@ -623,6 +623,14 @@ Finally, the twisting torque on each particle is given by:
---------- ----------
If two particles are moving away from each other while in contact, there
is a possibility that the particles could experience an effective attractive
force due to damping. If the optional *limit_damping* keyword is used, this option
will zero out the normal component of the force if there is an effective
attractive force. This keyword cannot be used with the JKR or DMT models.
----------
The *granular* pair style can reproduce the behavior of the The *granular* pair style can reproduce the behavior of the
*pair gran/\** styles with the appropriate settings (some very *pair gran/\** styles with the appropriate settings (some very
minor differences can be expected due to corrections in minor differences can be expected due to corrections in
@ -657,6 +665,12 @@ then LAMMPS will use that cutoff for the specified atom type
combination, and automatically set pairwise cutoffs for the remaining combination, and automatically set pairwise cutoffs for the remaining
atom types. atom types.
If two particles are moving away from each other while in contact, there
is a possibility that the particles could experience an effective attractive
force due to damping. If the *limit_damping* keyword is used, this option
will zero out the normal component of the force if there is an effective
attractive force. This keyword cannot be used with the JKR or DMT models.
---------- ----------
.. include:: accel_styles.rst .. include:: accel_styles.rst

View File

@ -2,6 +2,7 @@
.. index:: pair_style hybrid/kk .. index:: pair_style hybrid/kk
.. index:: pair_style hybrid/overlay .. index:: pair_style hybrid/overlay
.. index:: pair_style hybrid/overlay/kk .. index:: pair_style hybrid/overlay/kk
.. index:: pair_style hybrid/scaled
pair_style hybrid command pair_style hybrid command
========================= =========================
@ -13,6 +14,9 @@ pair_style hybrid/overlay command
Accelerator Variants: *hybrid/overlay/kk* Accelerator Variants: *hybrid/overlay/kk*
pair_style hybrid/scaled command
==================================
Syntax Syntax
"""""" """"""
@ -20,8 +24,10 @@ Syntax
pair_style hybrid style1 args style2 args ... pair_style hybrid style1 args style2 args ...
pair_style hybrid/overlay style1 args style2 args ... pair_style hybrid/overlay style1 args style2 args ...
pair_style hybrid/scaled factor1 style1 args factor2 style 2 args ...
* style1,style2 = list of one or more pair styles and their arguments * style1,style2 = list of one or more pair styles and their arguments
* factor1,factor2 = scale factors for pair styles, may be a variable
Examples Examples
"""""""" """"""""
@ -37,47 +43,73 @@ Examples
pair_coeff * * lj/cut 1.0 1.0 pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * coul/long pair_coeff * * coul/long
pair_style hybrid/scaled 0.5 tersoff 0.5 sw
pair_coeff * * tersoff Si.tersoff Si
pair_coeff * * sw Si.sw Si
variable one equal ramp(1.0,0.0)
variable two equal 1.0-v_one
pair_style hybrid/scaled v_one lj/cut 2.5 v_two morse 2.5
pair_coeff 1 1 lj/cut 1.0 1.0 2.5
pair_coeff 1 1 morse 1.0 1.0 1.0 2.5
Description Description
""""""""""" """""""""""
The *hybrid* and *hybrid/overlay* styles enable the use of multiple The *hybrid*, *hybrid/overlay*, and *hybrid/scaled* styles enable the
pair styles in one simulation. With the *hybrid* style, exactly one use of multiple pair styles in one simulation. With the *hybrid* style,
pair style is assigned to each pair of atom types. With the exactly one pair style is assigned to each pair of atom types. With the
*hybrid/overlay* style, one or more pair styles can be assigned to *hybrid/overlay* and *hybrid/scaled* styles, one or more pair styles can
each pair of atom types. The assignment of pair styles to type pairs be assigned to each pair of atom types. The assignment of pair styles
is made via the :doc:`pair_coeff <pair_coeff>` command. to type pairs is made via the :doc:`pair_coeff <pair_coeff>` command.
The major difference between the *hybrid/overlay* and *hybrid/scaled*
styles is that the *hybrid/scaled* adds a scale factor for each
sub-style contribution to forces, energies and stresses. Because of the
added complexity, the *hybrid/scaled* style has more overhead and thus
may be slower than *hybrid/overlay*.
Here are two examples of hybrid simulations. The *hybrid* style could Here are two examples of hybrid simulations. The *hybrid* style could
be used for a simulation of a metal droplet on a LJ surface. The be used for a simulation of a metal droplet on a LJ surface. The metal
metal atoms interact with each other via an *eam* potential, the atoms interact with each other via an *eam* potential, the surface atoms
surface atoms interact with each other via a *lj/cut* potential, and interact with each other via a *lj/cut* potential, and the metal/surface
the metal/surface interaction is also computed via a *lj/cut* interaction is also computed via a *lj/cut* potential. The
potential. The *hybrid/overlay* style could be used as in the second *hybrid/overlay* style could be used as in the second example above,
example above, where multiple potentials are superposed in an additive where multiple potentials are superposed in an additive fashion to
fashion to compute the interaction between atoms. In this example, compute the interaction between atoms. In this example, using *lj/cut*
using *lj/cut* and *coul/long* together gives the same result as if and *coul/long* together gives the same result as if the
the *lj/cut/coul/long* potential were used by itself. In this case, *lj/cut/coul/long* potential were used by itself. In this case, it
it would be more efficient to use the single combined potential, but would be more efficient to use the single combined potential, but in
in general any combination of pair potentials can be used together in general any combination of pair potentials can be used together in to
to produce an interaction that is not encoded in any single pair_style produce an interaction that is not encoded in any single pair_style
file, e.g. adding Coulombic forces between granular particles. file, e.g. adding Coulombic forces between granular particles.
If the *hybrid/scaled* style is used instead of *hybrid/overlay*\ ,
contributions from sub-styles are weighted by their scale factors, which
may be fractional or even negative. Furthermore the scale factors may
be variables that may change during a simulation. This enables
switching smoothly between two different pair styles or two different
parameter sets during a run.
All pair styles that will be used are listed as "sub-styles" following All pair styles that will be used are listed as "sub-styles" following
the *hybrid* or *hybrid/overlay* keyword, in any order. Each the *hybrid* or *hybrid/overlay* keyword, in any order. In case of the
sub-style's name is followed by its usual arguments, as illustrated in *hybrid/scaled* pair style, each sub-style is prefixed with a scale
the example above. See the doc pages of individual pair styles for a factor. The scale factor is either a floating point number or an equal
listing and explanation of the appropriate arguments. style (or equivalent) variable. Each sub-style's name is followed by
its usual arguments, as illustrated in the examples above. See the doc
pages of the individual pair styles for a listing and explanation of the
appropriate arguments for them.
Note that an individual pair style can be used multiple times as a Note that an individual pair style can be used multiple times as a
sub-style. For efficiency this should only be done if your model sub-style. For efficiency reasons this should only be done if your
requires it. E.g. if you have different regions of Si and C atoms and model requires it. E.g. if you have different regions of Si and C atoms
wish to use a Tersoff potential for pure Si for one set of atoms, and and wish to use a Tersoff potential for pure Si for one set of atoms,
a Tersoff potential for pure C for the other set (presumably with some and a Tersoff potential for pure C for the other set (presumably with
third potential for Si-C interactions), then the sub-style *tersoff* some third potential for Si-C interactions), then the sub-style
could be listed twice. But if you just want to use a Lennard-Jones or *tersoff* could be listed twice. But if you just want to use a
other pairwise potential for several different atom type pairs in your Lennard-Jones or other pairwise potential for several different atom
model, then you should just list the sub-style once and use the type pairs in your model, then you should just list the sub-style once
pair_coeff command to assign parameters for the different type pairs. and use the pair_coeff command to assign parameters for the different
type pairs.
.. note:: .. note::
@ -143,16 +175,16 @@ one sub-style. Just as with a simulation using a single pair style,
if you specify the same atom type pair in a second pair_coeff command, if you specify the same atom type pair in a second pair_coeff command,
the previous assignment will be overwritten. the previous assignment will be overwritten.
For the *hybrid/overlay* style, each atom type pair I,J can be For the *hybrid/overlay* and *hybrid/scaled* styles, each atom type pair
assigned to one or more sub-styles. If you specify the same atom type I,J can be assigned to one or more sub-styles. If you specify the same
pair in a second pair_coeff command with a new sub-style, then the atom type pair in a second pair_coeff command with a new sub-style, then
second sub-style is added to the list of potentials that will be the second sub-style is added to the list of potentials that will be
calculated for two interacting atoms of those types. If you specify calculated for two interacting atoms of those types. If you specify the
the same atom type pair in a second pair_coeff command with a same atom type pair in a second pair_coeff command with a sub-style that
sub-style that has already been defined for that pair of atoms, then has already been defined for that pair of atoms, then the new pair
the new pair coefficients simply override the previous ones, as in the coefficients simply override the previous ones, as in the normal usage
normal usage of the pair_coeff command. E.g. these two sets of of the pair_coeff command. E.g. these two sets of commands are the
commands are the same: same:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -166,23 +198,24 @@ commands are the same:
Coefficients must be defined for each pair of atoms types via the Coefficients must be defined for each pair of atoms types via the
:doc:`pair_coeff <pair_coeff>` command as described above, or in the :doc:`pair_coeff <pair_coeff>` command as described above, or in the
data file or restart files read by the :doc:`read_data <read_data>` or data file read by the :doc:`read_data <read_data>` commands, or by
:doc:`read_restart <read_restart>` commands, or by mixing as described mixing as described below.
below.
For both the *hybrid* and *hybrid/overlay* styles, every atom type For all of the *hybrid*, *hybrid/overlay*, and *hybrid/scaled* styles,
pair I,J (where I <= J) must be assigned to at least one sub-style via every atom type pair I,J (where I <= J) must be assigned to at least one
the :doc:`pair_coeff <pair_coeff>` command as in the examples above, or sub-style via the :doc:`pair_coeff <pair_coeff>` command as in the
in the data file read by the :doc:`read_data <read_data>`, or by mixing examples above, or in the data file read by the :doc:`read_data
as described below. <read_data>`, or by mixing as described below. Also all sub-styles
must be used at least once in a :doc:`pair_coeff <pair_coeff>` command.
If you want there to be no interactions between a particular pair of If you want there to be no interactions between a particular pair of
atom types, you have 3 choices. You can assign the type pair to some atom types, you have 3 choices. You can assign the type pair to some
sub-style and use the :doc:`neigh_modify exclude type <neigh_modify>` sub-style and use the :doc:`neigh_modify exclude type <neigh_modify>`
command. You can assign it to some sub-style and set the coefficients command. You can assign it to some sub-style and set the coefficients
so that there is effectively no interaction (e.g. epsilon = 0.0 in a so that there is effectively no interaction (e.g. epsilon = 0.0 in a LJ
LJ potential). Or, for *hybrid* and *hybrid/overlay* simulations, you potential). Or, for *hybrid*, *hybrid/overlay*, or *hybrid/scaled*
can use this form of the pair_coeff command in your input script: simulations, you can use this form of the pair_coeff command in your
input script:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -195,13 +228,13 @@ or this form in the "Pair Coeffs" section of the data file:
3 none 3 none
If an assignment to *none* is made in a simulation with the If an assignment to *none* is made in a simulation with the
*hybrid/overlay* pair style, it wipes out all previous assignments of *hybrid/overlay* or *hybrid/scaled* pair style, it wipes out all
that atom type pair to sub-styles. previous assignments of that pair of atom types to sub-styles.
Note that you may need to use an :doc:`atom_style <atom_style>` hybrid Note that you may need to use an :doc:`atom_style <atom_style>` hybrid
command in your input script, if atoms in the simulation will need command in your input script, if atoms in the simulation will need
attributes from several atom styles, due to using multiple pair attributes from several atom styles, due to using multiple pair
potentials. styles with different requirements.
---------- ----------
@ -210,8 +243,9 @@ for applying weightings that change the strength of pairwise
interactions between pairs of atoms that are also 1-2, 1-3, and 1-4 interactions between pairs of atoms that are also 1-2, 1-3, and 1-4
neighbors in the molecular bond topology, as normally set by the neighbors in the molecular bond topology, as normally set by the
:doc:`special_bonds <special_bonds>` command. Different weights can be :doc:`special_bonds <special_bonds>` command. Different weights can be
assigned to different pair hybrid sub-styles via the :doc:`pair_modify special <pair_modify>` command. This allows multiple force fields assigned to different pair hybrid sub-styles via the :doc:`pair_modify
to be used in a model of a hybrid system, however, there is no consistent special <pair_modify>` command. This allows multiple force fields to be
used in a model of a hybrid system, however, there is no consistent
approach to determine parameters automatically for the interactions approach to determine parameters automatically for the interactions
between the two force fields, this is only recommended when particles between the two force fields, this is only recommended when particles
described by the different force fields do not mix. described by the different force fields do not mix.
@ -260,7 +294,10 @@ the specific syntax, requirements and restrictions.
---------- ----------
The potential energy contribution to the overall system due to an The potential energy contribution to the overall system due to an
individual sub-style can be accessed and output via the :doc:`compute pair <compute_pair>` command. individual sub-style can be accessed and output via the :doc:`compute
pair <compute_pair>` command. Note that in the case of pair style
*hybrid/scaled* this is the **unscaled** potential energy of the
selected sub-style.
---------- ----------
@ -282,28 +319,27 @@ Pair_style hybrid allows interactions between type pairs 2-2, 1-2,
could even add a second interaction for 1-1 to be computed by another could even add a second interaction for 1-1 to be computed by another
pair style, assuming pair_style hybrid/overlay is used. pair style, assuming pair_style hybrid/overlay is used.
But you should not, as a general rule, attempt to exclude the But you should not, as a general rule, attempt to exclude the many-body
many-body interactions for some subset of the type pairs within the interactions for some subset of the type pairs within the set of 1,3,4
set of 1,3,4 interactions, e.g. exclude 1-1 or 1-3 interactions. That interactions, e.g. exclude 1-1 or 1-3 interactions. That is not
is not conceptually well-defined for many-body interactions, since the conceptually well-defined for many-body interactions, since the
potential will typically calculate energies and foces for small groups potential will typically calculate energies and foces for small groups
of atoms, e.g. 3 or 4 atoms, using the neighbor lists of the atoms to of atoms, e.g. 3 or 4 atoms, using the neighbor lists of the atoms to
find the additional atoms in the group. It is typically non-physical find the additional atoms in the group.
to think of excluding an interaction between a particular pair of
atoms when the potential computes 3-body or 4-body interactions.
However, you can still use the pair_coeff none setting or the However, you can still use the pair_coeff none setting or the
:doc:`neigh_modify exclude <neigh_modify>` command to exclude certain :doc:`neigh_modify exclude <neigh_modify>` command to exclude certain
type pairs from the neighbor list that will be passed to a many-body type pairs from the neighbor list that will be passed to a many-body
sub-style. This will alter the calculations made by a many-body sub-style. This will alter the calculations made by a many-body
potential, since it builds its list of 3-body, 4-body, etc potential beyond the specific pairs, since it builds its list of 3-body,
interactions from the pair list. You will need to think carefully as 4-body, etc interactions from the pair lists. You will need to think
to whether it produces a physically meaningful result for your model. **carefully** as to whether excluding such pairs produces a physically
meaningful result for your model.
For example, imagine you have two atom types in your model, type 1 for For example, imagine you have two atom types in your model, type 1 for
atoms in one surface, and type 2 for atoms in the other, and you wish atoms in one surface, and type 2 for atoms in the other, and you wish
to use a Tersoff potential to compute interactions within each to use a Tersoff potential to compute interactions within each
surface, but not between surfaces. Then either of these two command surface, but not between the surfaces. Then either of these two command
sequences would implement that model: sequences would implement that model:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -320,9 +356,9 @@ Either way, only neighbor lists with 1-1 or 2-2 interactions would be
passed to the Tersoff potential, which means it would compute no passed to the Tersoff potential, which means it would compute no
3-body interactions containing both type 1 and 2 atoms. 3-body interactions containing both type 1 and 2 atoms.
Here is another example, using hybrid/overlay, to use 2 many-body Here is another example to use 2 many-body potentials together in an
potentials together, in an overlapping manner. Imagine you have CNT overlapping manner using hybrid/overlay. Imagine you have CNT (C atoms)
(C atoms) on a Si surface. You want to use Tersoff for Si/Si and Si/C on a Si surface. You want to use Tersoff for Si/Si and Si/C
interactions, and AIREBO for C/C interactions. Si atoms are type 1; C interactions, and AIREBO for C/C interactions. Si atoms are type 1; C
atoms are type 2. Something like this will work: atoms are type 2. Something like this will work:
@ -333,9 +369,9 @@ atoms are type 2. Something like this will work:
pair_coeff * * airebo CH.airebo NULL C pair_coeff * * airebo CH.airebo NULL C
Note that to prevent the Tersoff potential from computing C/C Note that to prevent the Tersoff potential from computing C/C
interactions, you would need to modify the SiC.tersoff file to turn interactions, you would need to **modify** the SiC.tersoff potential
off C/C interaction, i.e. by setting the appropriate coefficients to file to turn off C/C interaction, i.e. by setting the appropriate
0.0. coefficients to 0.0.
---------- ----------
@ -343,18 +379,19 @@ Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are
functionally the same as the corresponding style without the suffix. functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available They have been optimized to run faster, depending on your available
hardware, as discussed on the :doc:`Speed packages <Speed_packages>` doc hardware, as discussed on the :doc:`Speed packages <Speed_packages>` doc
page. page. Pair style *hybrid/scaled* does (currently) not support the
*gpu*, *omp*, *kk*, or *intel* suffix.
Since the *hybrid* and *hybrid/overlay* styles delegate computation to Since the *hybrid*, *hybrid/overlay*, *hybrid/scaled* styles delegate
the individual sub-styles, the suffix versions of the *hybrid* and computation to the individual sub-styles, the suffix versions of the
*hybrid/overlay* styles are used to propagate the corresponding suffix *hybrid* and *hybrid/overlay* styles are used to propagate the
to all sub-styles, if those versions exist. Otherwise the corresponding suffix to all sub-styles, if those versions
non-accelerated version will be used. exist. Otherwise the non-accelerated version will be used.
The individual accelerated sub-styles are part of the GPU, USER-OMP The individual accelerated sub-styles are part of the GPU, KOKKOS,
and OPT packages, respectively. They are only enabled if LAMMPS was USER-INTEL, USER-OMP, and OPT packages, respectively. They are only
built with those packages. See the :doc:`Build package <Build_package>` enabled if LAMMPS was built with those packages. See the :doc:`Build
doc page for more info. package <Build_package>` doc page for more info.
You can specify the accelerated styles explicitly in your input script You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the :doc:`-suffix command-line switch <Run_options>` when you invoke LAMMPS, or you can use the by including their suffix, or you can use the :doc:`-suffix command-line switch <Run_options>` when you invoke LAMMPS, or you can use the
@ -372,28 +409,31 @@ Any pair potential settings made via the
:doc:`pair_modify <pair_modify>` command are passed along to all :doc:`pair_modify <pair_modify>` command are passed along to all
sub-styles of the hybrid potential. sub-styles of the hybrid potential.
For atom type pairs I,J and I != J, if the sub-style assigned to I,I For atom type pairs I,J and I != J, if the sub-style assigned to I,I and
and J,J is the same, and if the sub-style allows for mixing, then the J,J is the same, and if the sub-style allows for mixing, then the
coefficients for I,J can be mixed. This means you do not have to coefficients for I,J can be mixed. This means you do not have to
specify a pair_coeff command for I,J since the I,J type pair will be specify a pair_coeff command for I,J since the I,J type pair will be
assigned automatically to the sub-style defined for both I,I and J,J assigned automatically to the sub-style defined for both I,I and J,J and
and its coefficients generated by the mixing rule used by that its coefficients generated by the mixing rule used by that sub-style.
sub-style. For the *hybrid/overlay* style, there is an additional For the *hybrid/overlay* and *hybrid/scaled* style, there is an
requirement that both the I,I and J,J pairs are assigned to a single additional requirement that both the I,I and J,J pairs are assigned to a
sub-style. See the "pair_modify" command for details of mixing rules. single sub-style. See the :doc:`pair_modify <pair_modify>` command for
See the See the doc page for the sub-style to see if allows for details of mixing rules. See the See the doc page for the sub-style to
mixing. see if allows for mixing.
The hybrid pair styles supports the :doc:`pair_modify <pair_modify>` The hybrid pair styles supports the :doc:`pair_modify <pair_modify>`
shift, table, and tail options for an I,J pair interaction, if the shift, table, and tail options for an I,J pair interaction, if the
associated sub-style supports it. associated sub-style supports it.
For the hybrid pair styles, the list of sub-styles and their For the hybrid pair styles, the list of sub-styles and their respective
respective settings are written to :doc:`binary restart files <restart>`, so a :doc:`pair_style <pair_style>` command does settings are written to :doc:`binary restart files <restart>`, so a
not need to specified in an input script that reads a restart file. :doc:`pair_style <pair_style>` command does not need to specified in an
However, the coefficient information is not stored in the restart input script that reads a restart file. However, the coefficient
file. Thus, pair_coeff commands need to be re-specified in the information is not stored in the restart file. Thus, pair_coeff
restart input script. commands need to be re-specified in the restart input script. For pair
style *hybrid/scaled* also the names of any variables used as scale
factors are restored, but not the variables themselves, so those may
need to be redefined when continuing from a restart.
These pair styles support the use of the *inner*\ , *middle*\ , and These pair styles support the use of the *inner*\ , *middle*\ , and
*outer* keywords of the :doc:`run_style respa <run_style>` command, if *outer* keywords of the :doc:`run_style respa <run_style>` command, if
@ -409,6 +449,9 @@ e.g. *lj/cut/coul/long* or *buck/coul/long*\ . You must insure that the
short-range Coulombic cutoff used by each of these long pair styles is short-range Coulombic cutoff used by each of these long pair styles is
the same or else LAMMPS will generate an error. the same or else LAMMPS will generate an error.
Pair style *hybrid/scaled* currently only works for non-accelerated
pair styles and pair styles from the OPT package.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -1,8 +1,12 @@
.. index:: pair_style lj/switch3/coulgauss/long .. index:: pair_style lj/switch3/coulgauss/long
.. index:: pair_style mm3/switch3/coulgauss/long
pair_style lj/switch3/coulgauss/long command pair_style lj/switch3/coulgauss/long command
============================================ ============================================
pair_style mm3/switch3/coulgauss/long command
=============================================
Syntax Syntax
"""""" """"""
@ -10,7 +14,7 @@ Syntax
pair_style style args pair_style style args
* style = *lj/switch3/coulgauss/long* * style = *lj/switch3/coulgauss/long* or *mm3/switch3/coulgauss/long*
* args = list of arguments for a particular style * args = list of arguments for a particular style
.. parsed-literal:: .. parsed-literal::
@ -20,6 +24,11 @@ Syntax
cutoff2 = global cutoff for Coulombic (optional) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units)
width = width parameter of the smoothing function (distance units) width = width parameter of the smoothing function (distance units)
*mm3/switch3/coulgauss/long* args = cutoff (cutoff2) width
cutoff = global cutoff for MM3 (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
width = width parameter of the smoothing function (distance units)
Examples Examples
"""""""" """"""""
@ -31,6 +40,12 @@ Examples
pair_style lj/switch3/coulgauss/long 12.0 10.0 3.0 pair_style lj/switch3/coulgauss/long 12.0 10.0 3.0
pair_coeff 1 0.2 2.5 1.2 pair_coeff 1 0.2 2.5 1.2
pair_style mm3/switch3/coulgauss/long 12.0 3.0
pair_coeff 1 0.2 2.5 1.2
pair_style mm3/switch3/coulgauss/long 12.0 10.0 3.0
pair_coeff 1 0.2 2.5 1.2
Description Description
""""""""""" """""""""""
@ -41,8 +56,17 @@ vdW potential
E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right] E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right]
, which goes smoothly to zero at the cutoff r_c as defined The *mm3/switch3/coulgauss/long* style evaluates the MM3
by the switching function vdW potential :ref:`(Allinger) <mm3-allinger1989>`
.. math::
E & = \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\
r_{v,ij} & = r_{v,i} + r_{v,j} \\
\epsilon_{ij} & = \sqrt{\epsilon_i \epsilon_j}
Both potentials go smoothly to zero at the cutoff r_c as defined by the
switching function
.. math:: .. math::
@ -85,14 +109,35 @@ commands:
Mixing, shift, table, tail correction, restart, rRESPA info Mixing, shift, table, tail correction, restart, rRESPA info
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/long pair styles can be mixed.
The default mix value is *geometric*\ . See the "pair_modify" command
for details.
Shifting the potential energy is not necessary because the switching Shifting the potential energy is not necessary because the switching
function ensures that the potential is zero at the cut-off. function ensures that the potential is zero at the cut-off.
These pair styles support the :doc:`pair_modify <pair_modify>` table and
options since they can tabulate the short-range portion of the
long-range Coulombic interactions.
Thes pair styles do not support the :doc:`pair_modify <pair_modify>`
tail option for adding a long-range tail correction to the
Lennard-Jones portion of the energy and pressure.
These pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do not need
to be specified in an input script that reads a restart file.
These pair styles can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. They do not support the
*inner*\ , *middle*\ , *outer* keywords.
Restrictions Restrictions
"""""""""""" """"""""""""
These styles are part of the USER-YAFF package. They are only These styles are part of the USER-YAFF package. They are only enabled
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. if LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -1,109 +0,0 @@
.. index:: pair_style mm3/switch3/coulgauss/long
pair_style mm3/switch3/coulgauss/long command
=============================================
Syntax
""""""
.. code-block:: LAMMPS
pair_style style args
* style = *mm3/switch3/coulgauss/long*
* args = list of arguments for a particular style
.. parsed-literal::
*mm3/switch3/coulgauss/long* args = cutoff (cutoff2) width
cutoff = global cutoff for MM3 (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
width = width parameter of the smoothing function (distance units)
Examples
""""""""
.. code-block:: LAMMPS
pair_style mm3/switch3/coulgauss/long 12.0 3.0
pair_coeff 1 0.2 2.5 1.2
pair_style mm3/switch3/coulgauss/long 12.0 10.0 3.0
pair_coeff 1 0.2 2.5 1.2
Description
"""""""""""
The *mm3/switch3/coulgauss/long* style evaluates the MM3
vdW potential :ref:`(Allinger) <mm3-allinger1989>`
.. math::
E & = \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\
r_{v,ij} & = r_{v,i} + r_{v,j} \\
\epsilon_{ij} & = \sqrt{\epsilon_i \epsilon_j}
, which goes smoothly to zero at the cutoff r_c as defined
by the switching function
.. math::
S_3(r) = \left\lbrace \begin{array}{ll}
1 & \quad\mathrm{if}\quad r < r_\mathrm{c} - w \\
3x^2 - 2x^3 & \quad\mathrm{if}\quad r < r_\mathrm{c} \quad\mathrm{with\quad} x=\frac{r_\mathrm{c} - r}{w} \\
0 & \quad\mathrm{if}\quad r >= r_\mathrm{c}
\end{array} \right.
where w is the width defined in the arguments. This potential
is combined with Coulomb interaction between Gaussian charge densities:
.. math::
E = \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}}
where :math:`q_i` and :math:`q_j` are the charges on the 2 atoms,
epsilon is the dielectric constant which can be set by the
:doc:`dielectric <dielectric>` command, ::math:`\gamma_i` and
:math:`\gamma_j` are the widths of the Gaussian charge distribution and
erf() is the error-function. This style has to be used in conjunction
with the :doc:`kspace_style <kspace_style>` command
If one cutoff is specified it is used for both the vdW and Coulomb
terms. If two cutoffs are specified, the first is used as the cutoff
for the vdW terms, and the second is the cutoff for the Coulombic term.
The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
above, or in the data file or restart files read by the
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
commands:
* :math:`\epsilon` (energy)
* :math:`r_v` (distance)
* :math:`\gamma` (distance)
----------
Mixing, shift, table, tail correction, restart, rRESPA info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Mixing rules are fixed for this style as defined above.
Shifting the potential energy is not necessary because the switching
function ensures that the potential is zero at the cut-off.
Restrictions
""""""""""""
These styles are part of the USER-YAFF package. They are only
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`
Default
"""""""
none

114
doc/src/pair_pace.rst Normal file
View File

@ -0,0 +1,114 @@
.. index:: pair_style pace
pair_style pace command
========================
Syntax
""""""
.. code-block:: LAMMPS
pair_style pace ... keyword values ...
* an optional keyword may be appended
* keyword = *product* or *recursive*
.. parsed-literal::
*product* = use product algorithm for basis functions
*recursive* = use recursive algorithm for basis functions
Examples
""""""""
.. code-block:: LAMMPS
pair_style pace
pair_style pace product
pair_coeff * * Cu-PBE-core-rep.ace Cu
Description
"""""""""""
Pair style *pace* computes interactions using the Atomic Cluster
Expansion (ACE), which is a general expansion of the atomic energy in
multi-body basis functions. :ref:`(Drautz) <Drautz20191>`.
The *pace* pair style
provides an efficient implementation that
is described in this paper :ref:`(Lysogorskiy) <Lysogorskiy20211>`.
In ACE, the total energy is decomposed into a sum over
atomic energies. The energy of atom *i* is expressed as a
linear or non-linear function of one or more density functions.
By projecting the
density onto a local atomic base, the lowest order contributions
to the energy can be expressed as a set of scalar polynomials in
basis function contributions summed over neighbor atoms.
Only a single pair_coeff command is used with the *pace* style which
specifies an ACE coefficient file followed by N additional arguments
specifying the mapping of ACE elements to LAMMPS atom types,
where N is the number of LAMMPS atom types:
* ACE coefficient file
* N element names = mapping of ACE elements to atom types
Only a single pair_coeff command is used with the *pace* style which
specifies an ACE file that fully defines the potential.
Note that unlike for other potentials, cutoffs are
not set in the pair_style or pair_coeff command; they are specified in
the ACE file.
The pair_style *pace* command may be followed by an optional keyword
*product* or *recursive*, which determines which of two algorithms
is used for the calculation of basis functions and derivatives.
The default is *recursive*.
See the :doc:`pair_coeff <pair_coeff>` doc page for alternate ways
to specify the path for the ACE coefficient file.
Mixing, shift, table, tail correction, restart, rRESPA info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS with
user-specifiable parameters as described above. You never need to
specify a pair_coeff command with I != J arguments for this style.
This pair style does not support the :doc:`pair_modify <pair_modify>`
shift, table, and tail options.
This pair style does not write its information to :doc:`binary restart files <restart>`, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*\ , *middle*\ , *outer* keywords.
----------
Restrictions
""""""""""""
This pair style is part of the USER-PACE package. It is only enabled if LAMMPS
was built with that package.
See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`pair_style snap <pair_snap>`
Default
"""""""
recursive
.. _Drautz20191:
**(Drautz)** Drautz, Phys Rev B, 99, 014104 (2019).
.. _Lysogorskiy20211:
**(Lysogorskiy)** Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, TBD (2021).

View File

@ -95,10 +95,11 @@ accelerated styles exist.
* :doc:`none <pair_none>` - turn off pairwise interactions * :doc:`none <pair_none>` - turn off pairwise interactions
* :doc:`hybrid <pair_hybrid>` - multiple styles of pairwise interactions * :doc:`hybrid <pair_hybrid>` - multiple styles of pairwise interactions
* :doc:`hybrid/overlay <pair_hybrid>` - multiple styles of superposed pairwise interactions * :doc:`hybrid/overlay <pair_hybrid>` - multiple styles of superposed pairwise interactions
* :doc:`hybrid/scaled <pair_hybrid>` - multiple styles of scaled superposed pairwise interactions
* :doc:`zero <pair_zero>` - neighbor list but no interactions * :doc:`zero <pair_zero>` - neighbor list but no interactions
* :doc:`adp <pair_adp>` - angular dependent potential (ADP) of Mishin * :doc:`adp <pair_adp>` - angular dependent potential (ADP) of Mishin
* :doc:`agni <pair_agni>` - machine learned potential mapping atomic environment to forces * :doc:`agni <pair_agni>` - AGNI machine-learning potential
* :doc:`airebo <pair_airebo>` - AIREBO potential of Stuart * :doc:`airebo <pair_airebo>` - AIREBO potential of Stuart
* :doc:`airebo/morse <pair_airebo>` - AIREBO with Morse instead of LJ * :doc:`airebo/morse <pair_airebo>` - AIREBO with Morse instead of LJ
* :doc:`atm <pair_atm>` - Axilrod-Teller-Muto potential * :doc:`atm <pair_atm>` - Axilrod-Teller-Muto potential
@ -132,6 +133,7 @@ accelerated styles exist.
* :doc:`comb3 <pair_comb>` - charge-optimized many-body (COMB3) potential * :doc:`comb3 <pair_comb>` - charge-optimized many-body (COMB3) potential
* :doc:`cosine/squared <pair_cosine_squared>` - Cooke-Kremer-Deserno membrane model potential * :doc:`cosine/squared <pair_cosine_squared>` - Cooke-Kremer-Deserno membrane model potential
* :doc:`coul/cut <pair_coul>` - cutoff Coulomb potential * :doc:`coul/cut <pair_coul>` - cutoff Coulomb potential
* :doc:`coul/cut/global <pair_coul>` - cutoff Coulomb potential
* :doc:`coul/cut/soft <pair_fep_soft>` - Coulomb potential with a soft core * :doc:`coul/cut/soft <pair_fep_soft>` - Coulomb potential with a soft core
* :doc:`coul/debye <pair_coul>` - cutoff Coulomb potential with Debye screening * :doc:`coul/debye <pair_coul>` - cutoff Coulomb potential with Debye screening
* :doc:`coul/diel <pair_coul_diel>` - Coulomb potential with dielectric permittivity * :doc:`coul/diel <pair_coul_diel>` - Coulomb potential with dielectric permittivity
@ -251,7 +253,7 @@ accelerated styles exist.
* :doc:`mgpt <pair_mgpt>` - simplified model generalized pseudopotential theory (MGPT) potential * :doc:`mgpt <pair_mgpt>` - simplified model generalized pseudopotential theory (MGPT) potential
* :doc:`mesont/tpm <pair_mesont_tpm>` - nanotubes mesoscopic force field * :doc:`mesont/tpm <pair_mesont_tpm>` - nanotubes mesoscopic force field
* :doc:`mie/cut <pair_mie>` - Mie potential * :doc:`mie/cut <pair_mie>` - Mie potential
* :doc:`mm3/switch3/coulgauss/long <pair_mm3_switch3_coulgauss_long>` - smoothed MM3 vdW potential with Gaussian electrostatics * :doc:`mm3/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>` - smoothed MM3 vdW potential with Gaussian electrostatics
* :doc:`momb <pair_momb>` - Many-Body Metal-Organic (MOMB) force field * :doc:`momb <pair_momb>` - Many-Body Metal-Organic (MOMB) force field
* :doc:`morse <pair_morse>` - Morse potential * :doc:`morse <pair_morse>` - Morse potential
* :doc:`morse/smooth/linear <pair_morse>` - linear smoothed Morse potential * :doc:`morse/smooth/linear <pair_morse>` - linear smoothed Morse potential
@ -279,6 +281,7 @@ accelerated styles exist.
* :doc:`oxrna2/hbond <pair_oxrna2>` - * :doc:`oxrna2/hbond <pair_oxrna2>` -
* :doc:`oxrna2/stk <pair_oxrna2>` - * :doc:`oxrna2/stk <pair_oxrna2>` -
* :doc:`oxrna2/xstk <pair_oxrna2>` - * :doc:`oxrna2/xstk <pair_oxrna2>` -
* :doc:`pace <pair_pace>` - Atomic Cluster Expansion (ACE) machine-learning potential
* :doc:`peri/eps <pair_peri>` - peridynamic EPS potential * :doc:`peri/eps <pair_peri>` - peridynamic EPS potential
* :doc:`peri/lps <pair_peri>` - peridynamic LPS potential * :doc:`peri/lps <pair_peri>` - peridynamic LPS potential
* :doc:`peri/pmb <pair_peri>` - peridynamic PMB potential * :doc:`peri/pmb <pair_peri>` - peridynamic PMB potential
@ -296,7 +299,7 @@ accelerated styles exist.
* :doc:`smd/ulsph <pair_smd_ulsph>` - * :doc:`smd/ulsph <pair_smd_ulsph>` -
* :doc:`smtbq <pair_smtbq>` - * :doc:`smtbq <pair_smtbq>` -
* :doc:`mliap <pair_mliap>` - Multiple styles of machine-learning potential * :doc:`mliap <pair_mliap>` - Multiple styles of machine-learning potential
* :doc:`snap <pair_snap>` - SNAP quantum-accurate potential * :doc:`snap <pair_snap>` - SNAP machine-learning potential
* :doc:`soft <pair_soft>` - Soft (cosine) potential * :doc:`soft <pair_soft>` - Soft (cosine) potential
* :doc:`sph/heatconduction <pair_sph_heatconduction>` - * :doc:`sph/heatconduction <pair_sph_heatconduction>` -
* :doc:`sph/idealgas <pair_sph_idealgas>` - * :doc:`sph/idealgas <pair_sph_idealgas>` -

View File

@ -217,7 +217,7 @@ This pair style can only be used via the *pair* keyword of the
Restrictions Restrictions
"""""""""""" """"""""""""
These pair style are part of the MANYBODY package. They is only These pair styles are part of the MANYBODY package. They are only
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
These pair styles requires the :doc:`newton <newton>` setting to be "on" These pair styles requires the :doc:`newton <newton>` setting to be "on"

90
doc/src/plugin.rst Normal file
View File

@ -0,0 +1,90 @@
.. index:: plugin
plugin command
==============
Syntax
""""""
.. parsed-literal::
plugin command args
* command = *load* or *unload* or *list* or *clear*
* args = list of arguments for a particular plugin command
.. parsed-literal::
*load* file = load plugin(s) from shared object in *file*
*unload* style name = unload plugin *name* of style *style*
*style* = *pair* or *bond* or *angle* or *dihedral* or *improper* or *compute* or *fix* or *region* or *command*
*list* = print a list of currently loaded plugins
*clear* = unload all currently loaded plugins
Examples
""""""""
.. code-block:: LAMMPS
plugin load morse2plugin.so
plugin unload pair morse2/omp
plugin unload command hello
plugin list
plugin clear
Description
"""""""""""
The plugin command allows to load (and unload) additional styles and
commands into a LAMMPS binary from so-called dynamic shared object (DSO)
files. This enables to add new functionality to an existing LAMMPS
binary without having to recompile and link the entire executable.
The *load* command will load and initialize all plugins contained in the
plugin DSO with the given filename. A message with information the
plugin style and name and more will be printed. Individual DSO files
may contain multiple plugins. More details about how to write and
compile the plugin DSO is given in programmer's guide part of the manual
under :doc:`Developer_plugins`.
The *unload* command will remove the given style or the given name from
the list of available styles. If the plugin style is currently in use,
that style instance will be deleted.
The *list* command will print a list of the loaded plugins and their
styles and names.
The *clear* command will unload all currently loaded plugins.
Restrictions
""""""""""""
The *plugin* command is part of the PLUGIN package. It is
only enabled if LAMMPS was built with that package.
See the :doc:`Build package <Build_package>` doc page for
more info. Plugins are not available on Windows.
For the loading of plugins to work the LAMMPS library must be
:ref:`compiled as a shared library <library>`. If plugins
access functions or classes from a package, LAMMPS must have
been compiled with that package included.
Plugins are dependent on the LAMMPS binary interface (ABI)
and particularly the MPI library used. So they are not guaranteed
to work when the plugin was compiled with a different MPI library
or different compilation settings or a different LAMMPS version.
There are no checks, so if there is a mismatch the plugin object
will either not load or data corruption and crashes may happen.
Related commands
""""""""""""""""
none
Default
"""""""
none

View File

@ -15,7 +15,7 @@ Syntax
.. parsed-literal:: .. parsed-literal::
keyword = *first* or *last* or *every* or *skip* or *start* or *stop* or *dump* keyword = *first* or *last* or *every* or *skip* or *start* or *stop* or *post* or *dump*
*first* args = Nfirst *first* args = Nfirst
Nfirst = dump timestep to start on Nfirst = dump timestep to start on
*last* args = Nlast *last* args = Nlast
@ -28,6 +28,7 @@ Syntax
Nstart = timestep on which pseudo run will start Nstart = timestep on which pseudo run will start
*stop* args = Nstop *stop* args = Nstop
Nstop = timestep to which pseudo run will end Nstop = timestep to which pseudo run will end
*post* value = *yes* or *no*
*dump* args = same as :doc:`read_dump <read_dump>` command starting with its field arguments *dump* args = same as :doc:`read_dump <read_dump>` command starting with its field arguments
Examples Examples
@ -154,6 +155,10 @@ Also note that an error will occur if you read a snapshot from the
dump file with a timestep value larger than the *stop* setting you dump file with a timestep value larger than the *stop* setting you
have specified. have specified.
The *post* keyword can be used to minimize the output to the screen that
happens after a *rerun* command, similar to the post keyword of the
:doc:`run command <run>`. It is set to *no* by default.
The *dump* keyword is required and must be the last keyword specified. The *dump* keyword is required and must be the last keyword specified.
Its arguments are passed internally to the :doc:`read_dump <read_dump>` Its arguments are passed internally to the :doc:`read_dump <read_dump>`
command. The first argument following the *dump* keyword should be command. The first argument following the *dump* keyword should be
@ -226,4 +231,4 @@ Default
The option defaults are first = 0, last = a huge value (effectively The option defaults are first = 0, last = a huge value (effectively
infinity), start = same as first, stop = same as last, every = 0, skip infinity), start = same as first, stop = same as last, every = 0, skip
= 1; = 1, post = no;

View File

@ -87,7 +87,7 @@ energy is a derived unit (in SI units you equivalently have the relation
* charge = reduced LJ charge, where :math:`q^* = q \frac{1}{\sqrt{4 \pi \varepsilon_0 \sigma \epsilon}}` * charge = reduced LJ charge, where :math:`q^* = q \frac{1}{\sqrt{4 \pi \varepsilon_0 \sigma \epsilon}}`
* dipole = reduced LJ dipole, moment where :math:`\mu^* = \mu \frac{1}{\sqrt{4 \pi \varepsilon_0 \sigma^3 \epsilon}}` * dipole = reduced LJ dipole, moment where :math:`\mu^* = \mu \frac{1}{\sqrt{4 \pi \varepsilon_0 \sigma^3 \epsilon}}`
* electric field = force/charge, where :math:`E^* = E \frac{\sqrt{4 \pi \varepsilon_0 \sigma \epsilon} \sigma}{\epsilon}` * electric field = force/charge, where :math:`E^* = E \frac{\sqrt{4 \pi \varepsilon_0 \sigma \epsilon} \sigma}{\epsilon}`
* density = mass/volume, where :math:`\rho^* = \rho \sigma^{dim}` * density = mass/volume, where :math:`\rho^* = \rho \frac{\sigma^{dim}}{m}`
Note that for LJ units, the default mode of thermodynamic output via Note that for LJ units, the default mode of thermodynamic output via
the :doc:`thermo_style <thermo_style>` command is to normalize all the :doc:`thermo_style <thermo_style>` command is to normalize all

View File

@ -65,8 +65,8 @@ Syntax
bound(group,dir,region), gyration(group,region), ke(group,reigon), bound(group,dir,region), gyration(group,region), ke(group,reigon),
angmom(group,dim,region), torque(group,dim,region), angmom(group,dim,region), torque(group,dim,region),
inertia(group,dimdim,region), omega(group,dim,region) inertia(group,dimdim,region), omega(group,dim,region)
special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x) special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name)
feature functions = is_active(category,feature,exact), is_defined(category,id,exact) feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id)
atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i] atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i]
atom vector = id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q atom vector = id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q
compute references = c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i] compute references = c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i]
@ -429,7 +429,7 @@ argument. For *equal*\ -style variables the formula computes a scalar
quantity, which becomes the value of the variable whenever it is quantity, which becomes the value of the variable whenever it is
evaluated. For *vector*\ -style variables the formula must compute a evaluated. For *vector*\ -style variables the formula must compute a
vector of quantities, which becomes the value of the variable whenever vector of quantities, which becomes the value of the variable whenever
it is evaluated. The calculated vector can be on length one, but it it is evaluated. The calculated vector can be of length one, but it
cannot be a simple scalar value like that produced by an equal-style cannot be a simple scalar value like that produced by an equal-style
compute. I.e. the formula for a vector-style variable must have at compute. I.e. the formula for a vector-style variable must have at
least one quantity in it that refers to a global vector produced by a least one quantity in it that refers to a global vector produced by a
@ -821,6 +821,10 @@ Special Functions
Special functions take specific kinds of arguments, meaning their Special functions take specific kinds of arguments, meaning their
arguments cannot be formulas themselves. arguments cannot be formulas themselves.
The is_file(x) function is a test whether 'x' is a (readable) file
and returns 1 in this case, otherwise it returns 0. For that 'x'
is taken as a literal string and must not have any blanks in it.
The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions
each take 1 argument which is of the form "c_ID" or "c_ID[N]" or each take 1 argument which is of the form "c_ID" or "c_ID[N]" or
"f_ID" or "f_ID[N]" or "v_name". The first two are computes and the "f_ID" or "f_ID[N]" or "v_name". The first two are computes and the

View File

@ -261,6 +261,7 @@ bitmask
bitrate bitrate
bitrates bitrates
Bitzek Bitzek
Bjerrum
Blaise Blaise
blanchedalmond blanchedalmond
blocksize blocksize
@ -268,6 +269,7 @@ blueviolet
bn bn
bni bni
bo bo
Bochkarev
Bochum Bochum
bocs bocs
bodyflag bodyflag
@ -343,6 +345,7 @@ Cao
Capolungo Capolungo
Caro Caro
cartesian cartesian
Cas
CasP CasP
Caswell Caswell
Cates Cates
@ -502,6 +505,8 @@ coulgauss
coulombic coulombic
Coulombic Coulombic
Coulombics Coulombics
counterion
counterions
Courant Courant
covalent covalent
covalently covalently
@ -730,6 +735,7 @@ DRUDE
dsf dsf
dsmc dsmc
dt dt
dtemp
dtgrow dtgrow
dtheta dtheta
dtshrink dtshrink
@ -878,6 +884,7 @@ equilibrates
equilibrating equilibrating
equilibration equilibration
Equilibria Equilibria
equilibria
equilization equilization
equipartitioning equipartitioning
Ercolessi Ercolessi
@ -1069,6 +1076,7 @@ fuer
fx fx
fy fy
fz fz
Gabor
Gahler Gahler
gainsboro gainsboro
Galindo Galindo
@ -1193,6 +1201,7 @@ Halperin
Halver Halver
Hamaker Hamaker
Hamel Hamel
Hammerschmidt
haptic haptic
Hara Hara
Harpertown Harpertown
@ -1214,6 +1223,7 @@ hcp
hdnnp hdnnp
HDNNP HDNNP
heatconduction heatconduction
Hebbeker
Hebenstreit Hebenstreit
Hecht Hecht
Heenen Heenen
@ -1281,6 +1291,7 @@ hy
hydrophobicity hydrophobicity
hydrostatic hydrostatic
hydrostatically hydrostatically
hydroxyl
Hynninen Hynninen
Hyoungki Hyoungki
hyperdynamics hyperdynamics
@ -1371,6 +1382,7 @@ ints
inv inv
invariants invariants
inversed inversed
ionizable
ionocovalent ionocovalent
iostreams iostreams
iparam iparam
@ -1550,6 +1562,7 @@ Koning
Kooser Kooser
Korn Korn
Koskinen Koskinen
Kosovan
Koster Koster
Kosztin Kosztin
Kp Kp
@ -1590,11 +1603,13 @@ lammps
Lammps Lammps
LAMMPS LAMMPS
lammpsplot lammpsplot
lammpsplugin
Lampis Lampis
Lamoureux Lamoureux
Lanczos Lanczos
Lande Lande
Landron Landron
Landsgesell
langevin langevin
Langevin Langevin
Langston Langston
@ -1732,10 +1747,13 @@ lpsapi
lrt lrt
lsfftw lsfftw
ltbbmalloc ltbbmalloc
Lua
lubricateU lubricateU
lucy lucy
Lua
Luding Luding
Luijten
lunit
Lunkad
Lussetti Lussetti
Lustig Lustig
lval lval
@ -1744,6 +1762,7 @@ lx
ly ly
Lybrand Lybrand
lyon lyon
Lysogorskiy
Lyulin Lyulin
lz lz
Maaravi Maaravi
@ -1802,8 +1821,10 @@ Materias
mathbf mathbf
mathjax mathjax
matlab matlab
Matous
matplotlib matplotlib
Matsubara Matsubara
Matteo
Mattice Mattice
Mattox Mattox
Mattson Mattson
@ -1864,6 +1885,7 @@ MEMALIGN
membered membered
memcheck memcheck
Mendelev Mendelev
Menon
mer mer
Meremianin Meremianin
Mersenne Mersenne
@ -1987,6 +2009,7 @@ mpiio
mpirun mpirun
mplayer mplayer
mps mps
Mrovec
Mryglod Mryglod
mscg mscg
MSCG MSCG
@ -2021,6 +2044,7 @@ multiscale
multisectioning multisectioning
multithreading multithreading
Multithreading Multithreading
multivalent
Mundy Mundy
Murdick Murdick
Murtola Murtola
@ -2066,6 +2090,7 @@ Nanoletters
nanomechanics nanomechanics
nanometer nanometer
nanometers nanometers
nanoparticle
nanoparticles nanoparticles
Nanotube Nanotube
nanotube nanotube
@ -2175,6 +2200,7 @@ nm
Nm Nm
Nmax Nmax
nmax nmax
nmc
Nmin Nmin
nmin nmin
Nmols Nmols
@ -2309,9 +2335,11 @@ OMP
oneAPI oneAPI
onelevel onelevel
oneway oneway
onlysalt
onn onn
ons ons
OO OO
Oord
opencl opencl
openKIM openKIM
openmp openmp
@ -2332,6 +2360,7 @@ Orsi
ortho ortho
orthonormal orthonormal
orthorhombic orthorhombic
Ortner
oso oso
Otype Otype
Ouldridge Ouldridge
@ -2391,6 +2420,8 @@ pbc
pc pc
pchain pchain
Pchain Pchain
pcmoves
pmcmoves
Pdamp Pdamp
pdb pdb
pdf pdf
@ -2435,6 +2466,7 @@ phosphide
Phs Phs
Physica Physica
physik physik
pI
Piaggi Piaggi
picocoulomb picocoulomb
picocoulombs picocoulombs
@ -2446,7 +2478,9 @@ pid
piecewise piecewise
Pieniazek Pieniazek
Pieter Pieter
pIm
pimd pimd
pIp
Piola Piola
Pisarev Pisarev
Pishevar Pishevar
@ -2461,6 +2495,9 @@ ploop
PloS PloS
plt plt
plumedfile plumedfile
pKa
pKb
pKs
pmb pmb
Pmolrotate Pmolrotate
Pmoltrans Pmoltrans
@ -2621,6 +2658,7 @@ radians
Rafferty Rafferty
rahman rahman
Rahman Rahman
Ralf
Raman Raman
ramped ramped
ramping ramping
@ -2682,6 +2720,7 @@ representable
Reproducibility Reproducibility
reproducibility reproducibility
repuls repuls
reqid
rescale rescale
rescaled rescaled
rescales rescales
@ -2727,6 +2766,7 @@ Rij
RIj RIj
Rik Rik
Rin Rin
Rinaldi
Rino Rino
RiRj RiRj
Risi Risi
@ -2786,6 +2826,7 @@ rst
rstyle rstyle
Rubensson Rubensson
Rubia Rubia
Rud
Rudd Rudd
Rudra Rudra
Rudranarayan Rudranarayan
@ -2815,6 +2856,7 @@ Sandia
sandybrown sandybrown
sanitizer sanitizer
Sanyal Sanyal
Sarath
sc sc
scafacos scafacos
SCAFACOS SCAFACOS

View File

@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
import mpmath as mp import mpmath as mp
hbar=0.658212 # Planck's constant (eV.fs/rad) hbar=0.658212 # Planck's constant (eV.fs/rad)
# J0=0.05 # per-neighbor exchange interaction (eV) J0=0.05 # per-neighbor exchange interaction (eV)
# exchange interaction parameters # exchange interaction parameters
J1 = 11.254 # in eV J1 = 11.254 # in eV

View File

@ -3,9 +3,15 @@
# clean old res # clean old res
rm res_*.dat rm res_*.dat
# compute Lammps # test standard Lammps
./../../../../src/lmp_serial \ ./../../../../src/lmp_serial \
-in test-spin-precession.in -in test-spin-precession.in
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in test-spin-precession.in
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"

View File

@ -2,8 +2,10 @@
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
atom_modify map array atom_modify map array
boundary f f f boundary f f f
shell echo "test1"
atom_modify map array atom_modify map array
lattice sc 3.0 lattice sc 3.0

View File

@ -3,9 +3,15 @@
# clean old res # clean old res
rm res_*.dat rm res_*.dat
# compute Lammps # test standard Lammps
./../../../../src/lmp_serial \ ./../../../../src/lmp_serial \
-in test-spin-precession.in -in test-spin-precession.in
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in test-spin-precession.in
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"

View File

@ -2,6 +2,7 @@
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
atom_modify map array atom_modify map array
boundary f f f boundary f f f

View File

@ -12,7 +12,14 @@ do
temp="$(echo "$tempi+$i*($tempf-$tempi)/$N" | bc -l)" temp="$(echo "$tempi+$i*($tempf-$tempi)/$N" | bc -l)"
sed s/temperature/${temp}/g test-prec-spin.template > \ sed s/temperature/${temp}/g test-prec-spin.template > \
test-prec-spin.in test-prec-spin.in
# test standard Lammps
./../../../../src/lmp_serial -in test-prec-spin.in ./../../../../src/lmp_serial -in test-prec-spin.in
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in test-prec-spin.in
Hz="$(tail -n 1 average_spin | awk -F " " '{print $3}')" Hz="$(tail -n 1 average_spin | awk -F " " '{print $3}')"
sz="$(tail -n 1 average_spin | awk -F " " '{print $5}')" sz="$(tail -n 1 average_spin | awk -F " " '{print $5}')"
en="$(tail -n 1 average_spin | awk -F " " '{print $6}')" en="$(tail -n 1 average_spin | awk -F " " '{print $6}')"

View File

@ -2,6 +2,7 @@
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
atom_modify map array atom_modify map array
boundary p p p boundary p p p

View File

@ -3,6 +3,7 @@
clear clear
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
dimension 3 dimension 3
boundary p p p boundary p p p
@ -46,4 +47,8 @@ variable tmag equal c_out_mag[6]
thermo_style custom step time v_tmag temp v_emag ke pe etotal thermo_style custom step time v_tmag temp v_emag ke pe etotal
thermo 200 thermo 200
compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 1 all custom 10 dump_iron.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
run 100000 run 100000
# run 1

View File

@ -3,9 +3,14 @@
# clean old res # clean old res
rm res_*.dat rm res_*.dat
# compute Lammps # test standard Lammps
./../../../../src/lmp_serial \ ../../../../src/lmp_serial -in in.spin.iron-nve
-in in.spin.iron-nve
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in in.spin.iron-nve
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"

View File

@ -3,6 +3,7 @@
clear clear
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
dimension 3 dimension 3
boundary p p p boundary p p p

View File

@ -3,6 +3,7 @@
clear clear
units metal units metal
atom_style spin atom_style spin
# atom_style spin/kk
dimension 3 dimension 3
boundary p p p boundary p p p

View File

@ -3,16 +3,32 @@
# clean old res # clean old res
rm res_*.dat rm res_*.dat
# compute NVT Spin -> Lattice ### compute NVT Spin -> Lattice
# test standard Lammps
./../../../../src/lmp_serial -in in.spin.nvt_spin ./../../../../src/lmp_serial -in in.spin.nvt_spin
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in in.spin.nvt_spin
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"
en="$(echo "$en-$in" | bc -l)" en="$(echo "$en-$in" | bc -l)"
tail -n +$in log.lammps | head -n $en > res_nvt_spin.dat tail -n +$in log.lammps | head -n $en > res_nvt_spin.dat
# compute NVT Lattice -> Spin ### compute NVT Lattice -> Spin
# test standard Lammps
./../../../../src/lmp_serial -in in.spin.nvt_lattice ./../../../../src/lmp_serial -in in.spin.nvt_lattice
# test spin/kk with Kokkos Lammps
# mpirun -np 1 ../../../../src/lmp_kokkos_mpi_only \
# -k on -sf kk -in in.spin.nvt_lattice
# extract data from Lammps run
in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')" in="$(grep -n Step log.lammps | awk -F ':' '{print $1}')"
en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')" en="$(grep -n Loop log.lammps | awk -F ':' '{print $1}')"
in="$(echo "$in+1" | bc -l)" in="$(echo "$in+1" | bc -l)"

View File

@ -0,0 +1,36 @@
This directory has two input scripts that illustrates how to use fix
charge_regulation in LAMMPS to perform coarse-grained molecular dynamics
(MD) simulations with incorporation of charge regulation effects. The
charge regulation is implemented via Monte Carlo (MC) sampling following
the reaction ensemble MC approach, producing a MC/MD hybrid tool for
modeling charge regulation in solvated systems.
The script `in.chreg-acid` sets up a simple weak acid electrolyte
(pH=7,pKa=6,pI=3). Four different types of MC moves are implemented:
acid protonation & de-protonation, and monovalent ion pair insertion and
deletion. Note here we have grouped all free monovalent ions into a
single type, a physically natural choice on the level of coarse-grained
primitive electrolyte models, which increases the calculation
performance but has no effects on thermodynamic observables. The
variables such as pH, pKa, pI, and lb at the top of the input script can
be adjusted to play with various simulation parameters. The cumulative
MC attempted moves and cumulative number of accepted moves, as well as,
current number of neutral and charged acid particles, neutral and
charged base particles (in this example always 0), and the current
number of free cations and anions in the system are printed in the
output.
The script `in.chreg-polymer` sets up a weak poly-electrolyte chain of
N=80 beads. Each bead is a weak acid with pKa=5 and solution has pH=7
and monovalent salt chemical potential pI=3. In this example, we choose
to treat salt ions, protons, and hydroxyl ions separately, which results
in 5 types of MC moves: acid [type 1] protonation & de-protonation (with
protons [type 4] insertion & deletion), acid [type 1] protonation &
de-protonation (with salt cation [type 2] insertion & deletion), water
self-ionization (insertion and deletion of proton [type4] and hydroxyl
ion [type 5] pair), insertion and deletion of monovalent salt pair [type
2 and type 3] , insertion and deletion of a proton [type4] and salt
anion [type 3]. The current number of neutral and charged acid
particles, the current number of free salt cations and anions, and the
current number of protons and hydroxyl ions are printed in the output.

View File

@ -0,0 +1,235 @@
LAMMPS data file generated by get_input.py
219 atoms
3 atom types
-2.5000000000000000e+01 2.5000000000000000e+01 xlo xhi
-2.5000000000000000e+01 2.5000000000000000e+01 ylo yhi
-2.5000000000000000e+01 2.5000000000000000e+01 zlo zhi
Masses
1 1
2 1
3 1
Atoms
1 1 0 2.5983275747497636 -8.368052973860795 20.001288664343484
2 1 -1 -18.182868728594865 -8.079792367885453 8.253737231981816
3 1 -1 -17.437350808966414 8.120411567445771 10.747650340639332
4 1 -1 6.502476583291578 -23.497326620756837 19.948223080086798
5 1 -1 -22.528179279677296 -18.783433570718127 -17.964657736688018
6 1 -1 -9.713496019164342 18.97235576760402 -19.495620818582825
7 1 -1 -12.831976006720659 0.12265736526942561 -21.679396938423718
8 1 -1 20.909063679212295 -2.16535062758771 0.46197866620165584
9 1 -1 23.86211981166997 24.024928465132284 10.534067202515907
10 1 -1 -0.5289298325031275 23.820222457999776 -2.657199543669442
11 1 -1 9.57021229491361 11.973871502198485 3.4206509716759186
12 1 -1 -10.201559985782705 7.557482594092384 12.07004973873643
13 1 -1 4.898458045226889 2.0169997859717945 -20.765285372762087
14 1 -1 -24.086606883730077 4.424991619615298 -4.204294764756856
15 1 -1 3.6837161829600795 -4.763233144818308 -12.75873457519811
16 1 -1 -12.217842496816345 -17.720229208905618 -13.556354139556914
17 1 -1 -21.456229140133704 -7.423996317612119 -6.94398044071275
18 1 -1 13.697298849253912 8.503639732052164 8.085487457359058
19 1 -1 -5.764222710061347 11.49890485049034 -5.1113880296575935
20 1 -1 3.9944161041544426 16.928204188257893 -14.875635895409372
21 1 -1 4.509525276444776 16.63590711792657 -22.21846494992397
22 1 -1 22.115374932704306 -18.97293932558108 -23.982486000144267
23 1 -1 14.169061011408473 -16.69837647199978 13.779039228068108
24 1 -1 17.186846147657228 8.827459489898189 23.055435051390333
25 1 -1 2.9822901981431045 -16.83687718528342 -21.278623587083484
26 1 -1 16.657554689423897 -1.6217275605348647 -11.315859420404218
27 1 -1 19.215533149393543 -15.512634977936068 7.2701088767584565
28 1 -1 -8.886744157248422 -24.09644410100167 4.013016013803799
29 1 -1 20.99918340066754 4.4716257356730225 0.3847245765737597
30 1 -1 1.3442294253060716 5.601341425720583 -14.918594492786674
31 1 -1 -6.962977050326831 20.470183675946515 -16.37885865567279
32 1 -1 -9.98531733187143 9.52233798117566 -24.979630708193724
33 1 -1 -17.327989778292306 5.761352103841766 5.720220488689204
34 1 -1 5.168359673466362 -23.698812306679418 2.6199762372169744
35 1 -1 18.978042448492154 6.41188742965139 6.31975357155018
36 1 -1 -16.38534911663758 -14.8262205163943 4.125239045887575
37 1 -1 7.974455406459249 -18.88332583451115 11.00721254217055
38 1 -1 13.779816416416402 1.8581999350851426 9.104219696003227
39 1 -1 -23.90949397031401 -3.346877828308571 -10.228782973473443
40 1 -1 21.61647622174447 8.443955423089903 -19.12066464239769
41 1 -1 -8.823979405515548 14.461154001848172 16.061704411241706
42 1 -1 -2.4406878944912513 12.5535360118296 20.606764200087852
43 1 -1 -18.459404356124697 15.260951448001258 21.187332685021346
44 1 -1 2.2354003384439878 -23.350013178190736 11.369307324043625
45 1 -1 15.595889705552018 -6.6075680254604805 5.434256329408505
46 1 -1 -17.528243443870238 4.109747707896265 -1.4167331089310942
47 1 -1 2.161977144405782 -16.511059804921263 -12.186191310598671
48 1 -1 -8.685671837367341 -7.0743613044263185 -1.1561844713769105
49 1 -1 15.62258718398045 -6.559293763708908 20.556775995508488
50 1 -1 -6.965207014475155 -14.348784897390543 -14.421447863144754
51 1 -1 -12.099361509567913 -24.62785640990423 -15.839126670614329
52 1 -1 6.673854222058246 7.83575773885061 -9.714128155619994
53 1 -1 -17.413453800948826 12.386754276446203 -16.882300786608994
54 1 -1 21.8966589175091 12.485943283688762 -14.553421680298634
55 1 -1 -8.37629917390651 -24.783875012947064 7.454467809536389
56 1 -1 14.081149297694104 -21.719204113108943 -17.447225564400064
57 1 -1 4.681992702049627 1.9719544892622558 -7.823736613205725
58 1 -1 4.353171917533494 15.86928389762705 24.669680272563014
59 1 -1 23.31502072066573 -4.685724298328946 2.459643890128799
60 1 -1 7.0470920520598455 23.016693234922386 -13.139471333592677
61 1 -1 11.725555941181668 -15.809323171320772 -1.6292879532275037
62 1 -1 -20.36388898925061 -12.084932320023162 -22.816700826388757
63 1 -1 -2.492146614764735 -0.7314052253623018 -15.89959178250266
64 1 -1 -22.45303825831233 -11.27996814407809 -9.553770912146142
65 1 -1 24.76771926037101 20.128947543233757 10.528974830883733
66 1 -1 11.326213670190818 -11.624187194192492 -9.687726413467862
67 1 -1 -5.712764220166093 15.778887306376163 -0.9263244618113831
68 1 -1 -15.073201136996362 -12.372916148178115 -5.461704510273556
69 1 -1 -5.82976670348781 -4.57812040989473 9.0443548565365
70 1 -1 -5.429195387856279 1.4542054472230177 -7.397291151203568
71 1 -1 -23.385555726942343 -11.924588975396505 3.8215294321466153
72 1 -1 -1.0694104826815725 2.999945633116507 3.67092922106918
73 1 -1 12.134312161994352 1.9747455475585376 -14.895893366599623
74 1 -1 21.30950120583112 18.97294626436546 -17.520867878211376
75 1 -1 -24.356703356157063 3.594879254976714 17.172993705171677
76 1 -1 12.634233603338409 24.373499564220822 4.561976273909789
77 1 -1 -10.740243207970495 19.345205140729554 -3.3368424800818097
78 1 -1 -3.027848793907552 10.604939843027267 7.493012332728249
79 1 -1 5.000539296336658 11.770088203844622 17.227492055930185
80 1 -1 1.1585200269400353 -24.45822157176123 -12.515688997756257
81 1 -1 1.9163088584430596 -14.064330279670672 11.302445490552905
82 1 -1 -20.857041355570576 21.292791787236673 17.397470691573346
83 1 -1 -24.50473305235651 -12.741459355708756 -1.9325218065560357
84 1 -1 2.658628688373309 -1.1131226252194608 7.491603553398086
85 1 -1 -18.515435126408363 24.20642384141299 14.466889392835121
86 1 -1 19.63928177206153 9.942655640416291 8.691463646789934
87 1 -1 -7.69626451160762 11.762517043363786 -7.457263991495665
88 1 -1 1.051431093064835 -11.460307039827766 16.90304637479744
89 1 -1 0.9157815447227939 23.656751182559688 -6.538587603918376
90 1 -1 23.330169435555234 -7.293893221439802 -10.739388379883973
91 1 -1 1.3454906653067376 0.3584300740797559 8.837879234629618
92 1 -1 -21.93056639286312 -10.890279576013356 -10.412914392053596
93 1 -1 21.9136101677979 -10.780221720642636 11.543925933359859
94 1 -1 1.213289938136601 -7.171863230861625 20.734527885288102
95 1 -1 23.102370131877777 21.949933206350458 0.29281565885028016
96 1 -1 -18.917780884063298 -0.03244735062602544 23.633906995676227
97 1 -1 7.583004866601307 10.74178675512821 -4.857297835527785
98 1 -1 -7.4910066746799835 -14.168364618485734 -6.426540836249767
99 1 -1 -20.672200987670426 -8.746789722660697 11.011389790610103
100 1 -1 -18.662115132221917 -21.356740361991612 -8.735991534410413
101 2 1 11.900973676882046 6.591531431964558 19.018193594877637
102 2 1 -23.433591822114983 -18.956429005519567 4.8373984358422994
103 2 1 -11.825475204099472 -3.8206287568445134 3.1167558949026173
104 2 1 -17.49780467176259 -23.115560141825554 9.614132296727426
105 2 1 10.88916113281772 4.512200980010334 18.685489050240854
106 2 1 -22.04662313800728 23.973268925992897 -23.417792740205652
107 2 1 -13.57041123540546 17.3687874050987 21.186270978357783
108 2 1 6.586851196789095 16.27860887432974 -3.638909639278946
109 2 1 8.191448685630277 6.828880619305412 -6.347576950950089
110 2 1 -15.723292856220288 -20.484673256634117 -15.14713811293425
111 2 1 18.58081219522701 19.060706710849452 -10.295676869062909
112 2 1 -21.09194001526127 -7.739334786748358 5.417635948058724
113 2 1 -14.10404878784055 -15.769737592448523 -18.881834262561505
114 2 1 -14.644589058195612 8.84169065013063 8.611654925486256
115 2 1 -11.719050253933538 -4.9700119000832 -0.9846728956163453
116 2 1 19.498247505274143 -10.418045613133986 -22.12098182226518
117 2 1 21.857683401772697 20.157098661061575 -13.652393197742995
118 2 1 -17.623414455798407 21.873813778550875 -6.533965802006303
119 2 1 7.231785003326529 -13.925962842972222 5.360080190636602
120 2 1 -7.509430039873415 19.13541714591672 -16.23545960168472
121 2 1 -4.048249209544995 13.126195473202351 -7.156541250053138
122 2 1 -20.26837137264583 21.46366988603839 15.603080527043964
123 2 1 -4.478253524569759 -3.1812369811955783 -18.52918159641348
124 2 1 21.541019047040052 13.514999235394065 -1.8086547561089752
125 2 1 -15.223319907923727 -5.958117989814905 -7.194967640819577
126 2 1 -20.87181173003304 -7.66780336209651 20.518235718821714
127 2 1 -3.7444846073700297 21.014628245718292 7.197818215477007
128 2 1 -5.904222844268787 7.656315546673127 -1.3911802017487425
129 2 1 -21.49072414090769 -23.123923448235523 10.49453669763092
130 2 1 24.90628307456096 7.081046671281136 -14.422530828641655
131 2 1 -12.173002002514222 -23.250366655717176 -5.145802772598103
132 2 1 -19.68809858318764 4.476541650697328 6.249229323733747
133 2 1 16.85550827580734 -0.8462194407221624 18.011901711631936
134 2 1 17.289399533444858 -11.99379336569853 11.875868193611936
135 2 1 19.532020913911126 -23.053375288330326 -4.9162076250112605
136 2 1 -12.432304028989998 5.029488375070969 7.535325299264009
137 2 1 14.934807008644 8.086694342170496 19.68691014849572
138 2 1 -7.088283921093918 -23.094109864922018 16.57088328184242
139 2 1 14.77413976080318 21.343550134324772 13.996489344579572
140 2 1 -14.606423208703657 -6.928316926567433 -22.717483260149475
141 2 1 -17.139771555632173 14.533410346451518 -21.83064865887975
142 2 1 4.261830086466784 15.518968841247663 -17.791505649414617
143 2 1 -9.814793042774223 -5.120956154726329 14.054454130549104
144 2 1 8.313311590434793 3.9666876022475606 -20.677101093823236
145 2 1 10.603190079756637 -2.62347089527481 1.6661989541795634
146 2 1 -17.763718339721695 1.2541370478041287 -21.55649971308305
147 2 1 -8.538066365356812 14.81814356892842 -4.478673557614034
148 2 1 -5.809558827384787 14.611789154829552 13.287687188309562
149 2 1 8.986830839040898 -17.43898584267833 -18.08640526127862
150 2 1 -13.315275244526854 8.890431200255954 -8.708179477452443
151 2 1 -0.5407152591412618 -23.67970550599055 -24.1586910560046
152 2 1 -19.79961109336906 -16.10906604558887 -5.879899717095562
153 2 1 -23.626316306846658 9.337407355717588 -9.640842288307239
154 2 1 -18.847256196659333 -16.303517291166603 -10.786416046984721
155 2 1 13.567770091716845 -24.4927974402177 8.896906985984664
156 2 1 13.652894892068794 -24.87567116574863 21.89026113439551
157 2 1 -8.575912713332162 9.92386172372207 5.029537530028822
158 2 1 20.69339436974964 1.129252448454178 0.3584458063532807
159 2 1 -0.9971941518705947 18.317397852358788 6.795424830570379
160 2 1 23.155704681402298 15.458725773368961 17.01599672991628
161 2 1 22.278634187244123 14.642946508468171 20.543957651530896
162 2 1 9.771629496835963 -21.696904301438853 -5.259678202922196
163 2 1 5.253009955872763 17.911287158418148 15.769047957152992
164 2 1 -20.759038961257414 5.59089552770853 -12.383953925685166
165 2 1 3.2163819108147145 -4.948608591009169 -17.85036103684716
166 2 1 20.637631925250837 9.109955226257064 6.177181979863878
167 2 1 5.306344093540837 12.647347581939556 23.229957406774105
168 2 1 -24.15187998806597 17.263903348029615 -17.141028077545826
169 2 1 -15.705280442832997 -15.655358704303895 -10.488762557871972
170 2 1 -6.601131108664461 -22.50322976595015 -5.672942609306119
171 2 1 22.869179482568555 13.369592422303498 -9.378437532422556
172 2 1 -23.151055417980903 -3.928919101213168 -11.117061489640207
173 2 1 1.3592343286386246 -18.552063924235036 -15.346172149331993
174 2 1 10.23567488314778 -18.14207926130103 -1.6884247085891886
175 2 1 12.595888032974493 -1.7416169207452157 -21.786811832485718
176 2 1 -0.14792438162408672 17.11748549051584 1.2788726677139053
177 2 1 24.349235298880274 -8.664350854740949 12.4309854455257
178 2 1 -18.827147816604253 -18.80258748867273 -1.6980553939283212
179 2 1 -9.048793002383698 -1.788614428205263 -11.841289777017172
180 2 1 -22.49667217853208 -22.112076711777533 10.01393503943838
181 2 1 -16.183333848138453 1.3098533508906556 0.8096413611556166
182 2 1 -4.007575369376703 -24.447854073342157 -19.683971619997376
183 2 1 8.79123015290173 -15.890906503248287 -23.45721570121758
184 2 1 -8.557898021171628 -21.985380426316674 22.626382729361595
185 2 1 7.143974673263372 16.57516065778192 0.5907315164854055
186 2 1 7.05280226857041 6.658154377550723 17.993436860997946
187 2 1 20.98391844656716 -3.7711929542825544 -22.37222924252256
188 2 1 -8.856382807041598 -16.421301042649826 -7.682473719905396
189 2 1 -14.381919492441797 -7.667674808763277 -10.178028203828621
190 2 1 -22.93472549116592 10.072854607637751 3.756868463885592
191 2 1 9.458987867260412 17.23200182595278 -0.03503381482496337
192 2 1 11.013603635791974 19.842184408029837 -5.83598462187852
193 2 1 23.28897987479008 2.835578651649044 -20.512845011389647
194 2 1 -18.86161127148128 8.956542530565656 14.193388541103026
195 2 1 13.688477473034126 -15.973205475346514 10.952445409682397
196 2 1 2.1058159557459497 2.740725960214597 -23.72037436968614
197 2 1 20.982351847235442 7.072739454450108 -24.07322254392252
198 2 1 5.962360707177609 -19.424513569281604 22.469955103109243
199 2 1 -17.13607356062674 20.038457022813326 12.94227215395123
200 2 1 11.592617137491743 22.283887092702138 2.339699650677858
201 2 1 -1.3864952037065237 19.199632510575505 -7.684210221911414
202 2 1 -22.44476570586083 -19.66385674506424 -8.981660607669522
203 2 1 0.36547911522815824 -7.628556098996082 16.326944822668068
204 2 1 -9.766164330974753 24.38435844399602 -14.352553497163
205 2 1 -0.6310792726759544 -5.625399375968325 13.665993163571486
206 2 1 2.6795300975636103 -0.37097710463575595 15.575183407667495
207 2 1 10.68508361399715 24.638181487800373 -17.538711281692827
208 2 1 18.30809729940504 18.39121662193474 18.285926328751984
209 2 1 -11.52561870836783 -11.871004571782223 12.890674390475048
210 3 -1 16.038097437687007 -0.8308290507120688 9.140710202344948
211 3 -1 -12.071581865552927 23.77532123232212 -6.250109721970887
212 3 -1 24.179073767023887 19.6390206210449 22.20321951706368
213 3 -1 22.899159789805424 8.918385700451317 -1.1269016129923664
214 3 -1 -10.48576153865241 5.691510884812594 21.955276995406933
215 3 -1 6.272776670877239 10.035821052072265 22.22030412319301
216 3 -1 14.689947575936934 -7.785907120217196 0.5033983092114553
217 3 -1 23.173937996535116 -21.041572031861037 -21.057283440516468
218 3 -1 -6.015120142466472 6.3962924962024985 21.58241945230285
219 3 -1 -0.77667042466472 0.3962848125024985 1.582473830285

View File

@ -0,0 +1,235 @@
LAMMPS data file generated by get_input.py
219 atoms
3 atom types
-180 180 xlo xhi
-180 180 ylo yhi
-180 180 zlo zhi
Masses
1 20
2 20
3 20
Atoms
1 1 0 18.70795854 -60.24998141 144.0092784
2 1 -1 -130.9166548 -58.17450505 59.42690807
3 1 -1 -125.5489258 58.46696329 77.38308245
4 1 -1 46.8178314 -169.1807517 143.6272062
5 1 -1 -162.2028908 -135.2407217 -129.3455357
6 1 -1 -69.93717134 136.6009615 -140.3684699
7 1 -1 -92.39022725 0.88313303 -156.091658
8 1 -1 150.5452585 -15.59052452 3.326246397
9 1 -1 171.8072626 172.9794849 75.84528386
10 1 -1 -3.808294794 171.5056017 -19.13183671
11 1 -1 68.90552852 86.21187482 24.628687
12 1 -1 -73.4512319 54.41387468 86.90435812
13 1 -1 35.26889793 14.52239846 -149.5100547
14 1 -1 -173.4235696 31.85993966 -30.27092231
15 1 -1 26.52275652 -34.29527864 -91.86288894
16 1 -1 -87.96846598 -127.5856503 -97.6057498
17 1 -1 -154.4848498 -53.45277349 -49.99665917
18 1 -1 98.62055171 61.22620607 58.21550969
19 1 -1 -41.50240351 82.79211492 -36.80199381
20 1 -1 28.75979595 121.8830702 -107.1045784
21 1 -1 32.46858199 119.7785312 -159.9729476
22 1 -1 159.2306995 -136.6051631 -172.6738992
23 1 -1 102.0172393 -120.2283106 99.20908244
24 1 -1 123.7452923 63.55770833 165.9991324
25 1 -1 21.47248943 -121.2255157 -153.2060898
26 1 -1 119.9343938 -11.67643844 -81.47418783
27 1 -1 138.3518387 -111.6909718 52.34478391
28 1 -1 -63.98455793 -173.4943975 28.8937153
29 1 -1 151.1941205 32.1957053 2.770016951
30 1 -1 9.678451862 40.32965827 -107.4138803
31 1 -1 -50.13343476 147.3853225 -117.9277823
32 1 -1 -71.89428479 68.56083346 -179.8533411
33 1 -1 -124.7615264 41.48173515 41.18558752
34 1 -1 37.21218965 -170.6314486 18.86382891
35 1 -1 136.6419056 46.16558949 45.50222572
36 1 -1 -117.9745136 -106.7487877 29.70172113
37 1 -1 57.41607893 -135.959946 79.2519303
38 1 -1 99.2146782 13.37903953 65.55038181
39 1 -1 -172.1483566 -24.09752036 -73.64723741
40 1 -1 155.6386288 60.79647905 -137.6687854
41 1 -1 -63.53265172 104.1203088 115.6442718
42 1 -1 -17.57295284 90.38545929 148.3687022
43 1 -1 -132.9077114 109.8788504 152.5487953
44 1 -1 16.09488244 -168.1200949 81.85901273
45 1 -1 112.2904059 -47.57448978 39.12664557
46 1 -1 -126.2033528 29.5901835 -10.20047838
47 1 -1 15.56623544 -118.8796306 -87.74057744
48 1 -1 -62.53683723 -50.93540139 -8.324528194
49 1 -1 112.4826277 -47.2269151 148.0087872
50 1 -1 -50.1494905 -103.3112513 -103.8344246
51 1 -1 -87.11540287 -177.3205662 -114.041712
52 1 -1 48.0517504 56.41745572 -69.94172272
53 1 -1 -125.3768674 89.18463079 -121.5525657
54 1 -1 157.6559442 89.89879164 -104.7846361
55 1 -1 -60.30935405 -178.4439001 53.67216823
56 1 -1 101.3842749 -156.3782696 -125.6200241
57 1 -1 33.71034745 14.19807232 -56.33090362
58 1 -1 31.34283781 114.2588441 177.621698
59 1 -1 167.8681492 -33.73721495 17.70943601
60 1 -1 50.73906277 165.7201913 -94.6041936
61 1 -1 84.42400278 -113.8271268 -11.73087326
62 1 -1 -146.6200007 -87.0115127 -164.2802459
63 1 -1 -17.94345563 -5.266117623 -114.4770608
64 1 -1 -161.6618755 -81.21577064 -68.78715057
65 1 -1 178.3275787 144.9284223 75.80861878
66 1 -1 81.54873843 -83.6941478 -69.75163018
67 1 -1 -41.13190239 113.6079886 -6.669536125
68 1 -1 -108.5270482 -89.08499627 -39.32427247
69 1 -1 -41.97432027 -32.96246695 65.11935497
70 1 -1 -39.09020679 10.47027922 -53.26049629
71 1 -1 -168.3760012 -85.85704062 27.51501191
72 1 -1 -7.699755475 21.59960856 26.43069039
73 1 -1 87.36704757 14.21816794 -107.2504322
74 1 -1 153.4284087 136.6052131 -126.1502487
75 1 -1 -175.3682642 25.88313064 123.6455547
76 1 -1 90.96648194 175.4891969 32.84622917
77 1 -1 -77.3297511 139.285477 -24.02526586
78 1 -1 -21.80051132 76.35556687 53.9496888
79 1 -1 36.00388293 84.74463507 124.0379428
80 1 -1 8.341344194 -176.0991953 -90.11296078
81 1 -1 13.79742378 -101.263178 81.37760753
82 1 -1 -150.1706978 153.3081009 125.261789
83 1 -1 -176.434078 -91.73850736 -13.91415701
84 1 -1 19.14212656 -8.014482902 53.93954558
85 1 -1 -133.3111329 174.2862517 104.1616036
86 1 -1 141.4028288 71.58712061 62.57853826
87 1 -1 -55.41310448 84.69012271 -53.69230074
88 1 -1 7.57030387 -82.51421069 121.7019339
89 1 -1 6.593627122 170.3286085 -47.07783075
90 1 -1 167.9772199 -52.51603119 -77.32359634
91 1 -1 9.68753279 2.580696533 63.63273049
92 1 -1 -157.900078 -78.41001295 -74.97298362
93 1 -1 157.7779932 -77.61759639 83.11626672
94 1 -1 8.735687555 -51.63741526 149.2886008
95 1 -1 166.3370649 158.0395191 2.108272744
96 1 -1 -136.2080224 -0.233620925 170.1641304
97 1 -1 54.59763504 77.34086464 -34.97254442
98 1 -1 -53.93524806 -102.0122253 -46.27109402
99 1 -1 -148.8398471 -62.976886 79.28200649
100 1 -1 -134.367229 -153.7685306 -62.89913905
101 2 1 85.68701047 47.45902631 136.9309939
102 2 1 -168.7218611 -136.4862888 34.82926874
103 2 1 -85.14342147 -27.50852705 22.44064244
104 2 1 -125.9841936 -166.432033 69.22175254
105 2 1 78.40196016 32.48784706 134.5355212
106 2 1 -158.7356866 172.6075363 -168.6081077
107 2 1 -97.70696089 125.0552693 152.541151
108 2 1 47.42532862 117.2059839 -26.2001494
109 2 1 58.97843054 49.16794046 -45.70255405
110 2 1 -113.2077086 -147.4896474 -109.0593944
111 2 1 133.7818478 137.2370883 -74.12887346
112 2 1 -151.8619681 -55.72321046 39.00697883
113 2 1 -101.5491513 -113.5421107 -135.9492067
114 2 1 -105.4410412 63.66017268 62.00391546
115 2 1 -84.37716183 -35.78408568 -7.089644848
116 2 1 140.387382 -75.00992841 -159.2710691
117 2 1 157.3753205 145.1311104 -98.29723102
118 2 1 -126.8885841 157.4914592 -47.04455377
119 2 1 52.06885202 -100.2669325 38.59257737
120 2 1 -54.06789629 137.7750035 -116.8953091
121 2 1 -29.14739431 94.50860741 -51.527097
122 2 1 -145.9322739 154.5384232 112.3421798
123 2 1 -32.24342538 -22.90490626 -133.4101075
124 2 1 155.0953371 97.30799449 -13.02231424
125 2 1 -109.6079033 -42.89844953 -51.80376701
126 2 1 -150.2770445 -55.20818421 147.7312972
127 2 1 -26.96028917 151.3053234 51.82429115
128 2 1 -42.51040448 55.12547194 -10.01649745
129 2 1 -154.7332138 -166.4922488 75.56066422
130 2 1 179.3252381 50.98353603 -103.842222
131 2 1 -87.64561442 -167.4026399 -37.04977996
132 2 1 -141.7543098 32.23109989 44.99445113
133 2 1 121.3596596 -6.092779973 129.6856923
134 2 1 124.4836766 -86.35531223 85.50625099
135 2 1 140.6305506 -165.9843021 -35.3966949
136 2 1 -89.51258901 36.2123163 54.25434215
137 2 1 107.5306105 58.22419926 141.7457531
138 2 1 -51.03564423 -166.277591 119.3103596
139 2 1 106.3738063 153.673561 100.7747233
140 2 1 -105.1662471 -49.88388187 -163.5658795
141 2 1 -123.4063552 104.6405545 -157.1806703
142 2 1 30.68517662 111.7365757 -128.0988407
143 2 1 -70.66650991 -36.87088431 101.1920697
144 2 1 59.85584345 28.56015074 -148.8751279
145 2 1 76.34296857 -18.88899045 11.99663247
146 2 1 -127.898772 9.029786744 -155.2067979
147 2 1 -61.47407783 106.6906337 -32.24644961
148 2 1 -41.82882356 105.2048819 95.67134776
149 2 1 64.70518204 -125.5606981 -130.2221179
150 2 1 -95.86998176 64.01110464 -62.69889224
151 2 1 -3.893149866 -170.4938796 -173.9425756
152 2 1 -142.5571999 -115.9852755 -42.33527796
153 2 1 -170.1094774 67.22933296 -69.41406448
154 2 1 -135.7002446 -117.3853245 -77.66219554
155 2 1 97.68794466 -176.3481416 64.0577303
156 2 1 98.30084322 -179.1048324 157.6098802
157 2 1 -61.74657154 71.45180441 36.21267022
158 2 1 148.9924395 8.130617629 2.580809806
159 2 1 -7.179797893 131.8852645 48.92705878
160 2 1 166.7210737 111.3028256 122.5151765
161 2 1 160.4061661 105.4292149 147.9164951
162 2 1 70.35573238 -156.217711 -37.86968306
163 2 1 37.82167168 128.9612675 113.5371453
164 2 1 -149.4650805 40.2544478 -89.16446826
165 2 1 23.15794976 -35.62998186 -128.5225995
166 2 1 148.5909499 65.59167763 44.47571026
167 2 1 38.20567747 91.06090259 167.2556933
168 2 1 -173.8935359 124.3001041 -123.4154022
169 2 1 -113.0780192 -112.7185827 -75.51909042
170 2 1 -47.52814398 -162.0232543 -40.84518679
171 2 1 164.6580923 96.26106544 -67.52475023
172 2 1 -166.687599 -28.28821753 -80.04284273
173 2 1 9.786487166 -133.5748603 -110.4924395
174 2 1 73.69685916 -130.6229707 -12.1566579
175 2 1 90.69039384 -12.53964183 -156.8650452
176 2 1 -1.065055548 123.2458955 9.207883208
177 2 1 175.3144942 -62.38332615 89.50309521
178 2 1 -135.5554643 -135.3786299 -12.22599884
179 2 1 -65.15130962 -12.87802388 -85.25728639
180 2 1 -161.9760397 -159.2069523 72.10033228
181 2 1 -116.5200037 9.430944126 5.8294178
182 2 1 -28.85454266 -176.0245493 -141.7245957
183 2 1 63.2968571 -114.4145268 -168.891953
184 2 1 -61.61686575 -158.2947391 162.9099557
185 2 1 51.43661765 119.3411567 4.253266919
186 2 1 50.78017633 47.93871152 129.5527454
187 2 1 151.0842128 -27.15258927 -161.0800505
188 2 1 -63.76595621 -118.2333675 -55.31381078
189 2 1 -103.5498203 -55.20725862 -73.28180307
190 2 1 -165.1300235 72.52455317 27.04945294
191 2 1 68.10471264 124.0704131 -0.252243467
192 2 1 79.29794618 142.8637277 -42.01908928
193 2 1 167.6806551 20.41616629 -147.6924841
194 2 1 -135.8036012 64.48710622 102.1923975
195 2 1 98.55703781 -115.0070794 78.85760695
196 2 1 15.16187488 19.73322691 -170.7866955
197 2 1 151.0729333 50.92372407 -173.3272023
198 2 1 42.92899709 -139.8564977 161.7836767
199 2 1 -123.3797296 144.2768906 93.18435951
200 2 1 83.46684339 160.4439871 16.84583748
201 2 1 -9.982765467 138.2373541 -55.3263136
202 2 1 -161.6023131 -141.5797686 -64.66795638
203 2 1 2.63144963 -54.92560391 117.5540027
204 2 1 -70.31638318 175.5673808 -103.3383852
205 2 1 -4.543770763 -40.50287551 98.39515078
206 2 1 19.2926167 -2.671035153 112.1413205
207 2 1 76.93260202 177.3949067 -126.2787212
208 2 1 131.8183006 132.4167597 131.6586696
209 2 1 -82.9844547 -85.47123292 92.81285561
210 3 -1 115.4743016 -5.981969165 65.81311346
211 3 -1 -86.91538943 171.1823129 -45.00079
212 3 -1 174.0893311 141.4009485 159.8631805
213 3 -1 164.8739505 64.21237704 -8.113691614
214 3 -1 -75.49748308 40.97887837 158.0779944
215 3 -1 45.16399203 72.25791157 159.9861897
216 3 -1 105.7676225 -56.05853127 3.624467826
217 3 -1 166.8523536 -151.4993186 -151.6124408
218 3 -1 -43.30886503 46.05330597 155.3934201
219 3 -1 -5.592027058 2.85325065 11.39381158

View File

@ -0,0 +1,264 @@
##A Weak PE Chain of N=80
160 atoms
79 bonds
5 atom types
1 bond types
-50 50 xlo xhi
-50 50 ylo yhi
-50 50 zlo zhi
Masses
1 1.0
2 1.0
3 1.0
4 1.0
5 1.0
Atoms
# atom_id molecule_id atom_type charge x y z
1 1 1 -1 0 0 -48.37753795169063
2 1 1 -1 0 0 -47.255075903381254
3 1 1 -1 0 0 -46.13261385507188
4 1 1 -1 0 0 -45.01015180676251
5 1 1 -1 0 0 -43.887689758453135
6 1 1 -1 0 0 -42.76522771014376
7 1 1 -1 0 0 -41.64276566183439
8 1 1 -1 0 0 -40.520303613525016
9 1 1 -1 0 0 -39.39784156521564
10 1 1 -1 0 0 -38.27537951690627
11 1 1 -1 0 0 -37.1529174685969
12 1 1 -1 0 0 -36.030455420287524
13 1 1 -1 0 0 -34.90799337197815
14 1 1 -1 0 0 -33.78553132366878
15 1 1 -1 0 0 -32.663069275359405
16 1 1 -1 0 0 -31.54060722705003
17 1 1 -1 0 0 -30.41814517874066
18 1 1 -1 0 0 -29.295683130431286
19 1 1 -1 0 0 -28.173221082121913
20 1 1 -1 0 0 -27.05075903381254
21 1 1 -1 0 0 -25.928296985503167
22 1 1 -1 0 0 -24.805834937193794
23 1 1 -1 0 0 -23.68337288888442
24 1 1 -1 0 0 -22.560910840575048
25 1 1 -1 0 0 -21.438448792265675
26 1 1 -1 0 0 -20.3159867439563
27 1 1 -1 0 0 -19.19352469564693
28 1 1 -1 0 0 -18.071062647337556
29 1 1 -1 0 0 -16.948600599028183
30 1 1 -1 0 0 -15.82613855071881
31 1 1 -1 0 0 -14.703676502409436
32 1 1 -1 0 0 -13.581214454100063
33 1 1 -1 0 0 -12.45875240579069
34 1 1 -1 0 0 -11.336290357481317
35 1 1 -1 0 0 -10.213828309171944
36 1 1 -1 0 0 -9.091366260862571
37 1 1 -1 0 0 -7.968904212553198
38 1 1 -1 0 0 -6.846442164243825
39 1 1 -1 0 0 -5.723980115934452
40 1 1 -1 0 0 -4.601518067625079
41 1 1 -1 0 0 -3.4790560193157063
42 1 1 -1 0 0 -2.3565939710063333
43 1 1 -1 0 0 -1.2341319226969603
44 1 1 -1 0 0 -0.11166987438758724
45 1 1 -1 0 0 1.0107921739217858
46 1 1 -1 0 0 2.133254222231159
47 1 1 -1 0 0 3.255716270540532
48 1 1 -1 0 0 4.378178318849905
49 1 1 -1 0 0 5.500640367159278
50 1 1 -1 0 0 6.623102415468651
51 1 1 -1 0 0 7.745564463778024
52 1 1 -1 0 0 8.868026512087397
53 1 1 -1 0 0 9.99048856039677
54 1 1 -1 0 0 11.112950608706143
55 1 1 -1 0 0 12.235412657015516
56 1 1 -1 0 0 13.357874705324889
57 1 1 -1 0 0 14.480336753634262
58 1 1 -1 0 0 15.602798801943635
59 1 1 -1 0 0 16.725260850253008
60 1 1 -1 0 0 17.84772289856238
61 1 1 -1 0 0 18.970184946871754
62 1 1 -1 0 0 20.092646995181127
63 1 1 -1 0 0 21.2151090434905
64 1 1 -1 0 0 22.337571091799873
65 1 1 -1 0 0 23.460033140109246
66 1 1 -1 0 0 24.58249518841862
67 1 1 -1 0 0 25.704957236727992
68 1 1 -1 0 0 26.827419285037365
69 1 1 -1 0 0 27.949881333346738
70 1 1 -1 0 0 29.07234338165611
71 1 1 -1 0 0 30.194805429965484
72 1 1 -1 0 0 31.317267478274857
73 1 1 -1 0 0 32.43972952658423
74 1 1 -1 0 0 33.5621915748936
75 1 1 -1 0 0 34.684653623202976
76 1 1 -1 0 0 35.80711567151235
77 1 1 -1 0 0 36.92957771982172
78 1 1 -1 0 0 38.052039768131095
79 1 1 -1 0 0 39.17450181644047
80 1 1 -1 0 0 40.29696386474984
81 0 2 1 -27.886422274724097 27.72001798427955 38.68169635811057
82 0 2 1 29.812255760623188 17.871838747003693 -29.094648426460257
83 0 2 1 -13.23881351410531 13.28123966828678 -24.422176415560116
84 0 2 1 4.9465650593939685 -37.7521903558826 -15.115417767729575
85 0 2 1 34.82527943387106 29.457664434004897 -25.565595338061254
86 0 2 1 46.35660570786446 -7.161776614070412 -20.2471250527001
87 0 2 1 39.20854546781531 34.96815569014278 13.893531822586723
88 0 2 1 -7.797240698180197 0.07861219105048889 48.686453603015224
89 0 2 1 43.92391845355516 -39.42362941705827 22.448930565867585
90 0 2 1 -40.371744364329984 -17.743039071967246 -15.08153047835009
91 0 2 1 -21.573165497710058 -0.5844447399891948 -45.73596994149077
92 0 2 1 -19.882394451769102 -7.392447895357577 30.733607063808876
93 0 2 1 -17.393031309514107 26.882975097407467 -47.64059480000892
94 0 2 1 25.652222561671735 1.0229206994719107 -14.959030208952043
95 0 2 1 26.075045766879313 19.902341017250052 46.70284805469666
96 0 2 1 39.91980369168496 0.753749460187592 -26.203575929573407
97 0 2 1 13.777613371273958 7.112171629839359 -33.5270487721399
98 0 2 1 18.944534687271826 20.090215089875286 -34.381335468790574
99 0 2 1 -23.801856387842435 -42.275962146864586 -8.322936238250279
100 0 2 1 -31.386991395893826 29.83894468611787 8.937114269513422
101 0 2 1 -41.07090001085809 49.59339931450579 6.666864232174753
102 0 2 1 -46.58911504232167 -32.46068937927039 19.40424197066872
103 0 2 1 -39.94659416571965 -36.28203465180086 5.841020764632312
104 0 2 1 -26.027467090120137 -41.05522015175137 -1.1145958296128313
105 0 2 1 37.09602855959457 23.76087951027276 45.09142423198867
106 0 2 1 -27.78138413517528 -48.97344929918942 45.91491289356401
107 0 2 1 4.468912883622387 -5.217782298407556 6.381420595433383
108 0 2 1 36.758686966564525 48.425582881586166 -25.909273336802997
109 0 2 1 -27.045102667146036 -19.713951008254117 4.339232870380627
110 0 2 1 -5.984280016624311 -49.45311479123866 36.35727783065221
111 0 2 1 27.833389147163018 -47.80144978082761 -47.71458334276804
112 0 2 1 -23.628507668044364 -30.353876765128685 36.174277933133254
113 0 2 1 -40.93360714431151 40.1336490864843 -27.035347797435495
114 0 2 1 6.3523980881104976 -28.636485436097082 -10.671354350535445
115 0 2 1 42.765716958607086 -32.85779663523676 -1.9682360265562124
116 0 2 1 -33.68069757415453 16.800769050458484 -6.273374390373085
117 0 2 1 13.909148568042937 4.921040289518388 12.111069913598996
118 0 2 1 6.728324076730296 -48.44092815223126 -35.92436883370601
119 0 2 1 -18.121173967321912 -15.76903395165283 2.2495451015454933
120 0 2 1 -11.75253233489407 -45.82569982175387 -12.477142440015896
121 0 2 1 1.9713864197144133 17.961034900064007 32.97992150691711
122 0 2 1 -3.993384770632943 -47.63120435620297 27.75490859098018
123 0 2 1 -0.32208279553454844 -47.30616152402566 -22.751109302380367
124 0 2 1 -0.135777029397957 23.88599790464609 -31.87440560354473
125 0 2 1 -6.123924906817393 -2.038519565120424 45.4809181974626
126 0 2 1 -29.622588299895046 42.40404115712096 6.640479709229595
127 0 2 1 -11.694512971272673 19.983258641775762 -38.152427411711145
128 0 2 1 -20.93721440637313 39.46397829322392 -45.52708262202337
129 0 2 1 34.13340147809369 36.14268504987945 -23.978137043267044
130 0 2 1 -37.422309952611485 29.181841318883087 27.55677757161692
131 0 2 1 30.11314373799594 18.721794400471353 1.5553303682670574
132 0 2 1 -7.3563467211571805 46.84253369205935 -39.84708490437832
133 0 2 1 -3.695927445484358 2.494403998274727 -7.634369981832755
134 0 2 1 44.09701173592077 17.717328437831043 31.54108326477207
135 0 2 1 48.070189931616795 10.601166369398662 -28.28574863896286
136 0 2 1 -7.044858382811761 -42.080663380241766 -1.4369925734636553
137 0 2 1 -12.485032488076918 23.87106169116919 6.178803347562642
138 0 2 1 -15.613232443702309 10.103630885941392 -20.447182948810916
139 0 2 1 28.610332347774147 37.08335835592116 -19.90280831362493
140 0 2 1 25.853920233242505 -27.768648181803655 24.971357611943475
141 0 2 1 9.256159541363296 -23.562096053197934 -4.722701100419371
142 0 2 1 39.96929397877305 -11.88228547846326 -28.70638149104603
143 0 2 1 -37.98545134633291 -23.50528193202669 -10.939982626098441
144 0 2 1 25.40017763114089 -47.49220127581256 15.1783064865064
145 0 2 1 28.073596076651768 3.6631266774864386 31.54355751177208
146 0 2 1 -19.596457173068703 46.79824882013442 -12.302655772327597
147 0 2 1 -36.46192411958321 -2.785830672302666 -25.1901381125736
148 0 2 1 -27.377389198969894 11.295792272951147 39.32842550184691
149 0 2 1 32.24967019136358 -20.517755791016402 31.20590722085157
150 0 2 1 47.70698618147787 9.75462874031868 -28.267447889542563
151 0 2 1 17.157803106328345 -27.48141290657965 7.7670687016760525
152 0 2 1 15.089833959419678 5.342811012118396 27.35336620165029
153 0 2 1 9.836963929211372 -11.047378229392443 -20.960811370690678
154 0 2 1 44.66600586278604 14.949733274456321 -29.328965994323575
155 0 2 1 -21.006260382140685 8.492712712433658 -46.31580169190271
156 0 2 1 -29.970979487850748 -36.46250489415931 26.914372830947457
157 0 2 1 -1.0821372755756329 -8.453379951300242 -19.95665062432509
158 0 2 1 -24.033653425909772 -39.51330620205049 20.067656167683793
159 0 2 1 27.747287624384626 -21.904990435351312 -10.819345241055956
160 0 2 1 -40.86737066410612 -25.609300376714796 -21.128139356809783
Bonds
# bond_id bond_type atom1_id atom2_id
1 1 1 2
2 1 2 3
3 1 3 4
4 1 4 5
5 1 5 6
6 1 6 7
7 1 7 8
8 1 8 9
9 1 9 10
10 1 10 11
11 1 11 12
12 1 12 13
13 1 13 14
14 1 14 15
15 1 15 16
16 1 16 17
17 1 17 18
18 1 18 19
19 1 19 20
20 1 20 21
21 1 21 22
22 1 22 23
23 1 23 24
24 1 24 25
25 1 25 26
26 1 26 27
27 1 27 28
28 1 28 29
29 1 29 30
30 1 30 31
31 1 31 32
32 1 32 33
33 1 33 34
34 1 34 35
35 1 35 36
36 1 36 37
37 1 37 38
38 1 38 39
39 1 39 40
40 1 40 41
41 1 41 42
42 1 42 43
43 1 43 44
44 1 44 45
45 1 45 46
46 1 46 47
47 1 47 48
48 1 48 49
49 1 49 50
50 1 50 51
51 1 51 52
52 1 52 53
53 1 53 54
54 1 54 55
55 1 55 56
56 1 56 57
57 1 57 58
58 1 58 59
59 1 59 60
60 1 60 61
61 1 61 62
62 1 62 63
63 1 63 64
64 1 64 65
65 1 65 66
66 1 66 67
67 1 67 68
68 1 68 69
69 1 69 70
70 1 70 71
71 1 71 72
72 1 72 73
73 1 73 74
74 1 74 75
75 1 75 76
76 1 76 77
77 1 77 78
78 1 78 79
79 1 79 80

View File

@ -0,0 +1,36 @@
# Charge regulation lammps for simple weak electrolyte
units lj
atom_style charge
neighbor 3.0 bin
read_data data.chreg-acid
variable cut_long equal 12.5
variable nevery equal 100
variable nmc equal 100
variable pH equal 7.0
variable pKa equal 6.0
variable pIm equal 3.0
variable pIp equal 3.0
variable cut_lj equal 2^(1.0/6.0)
variable lunit_nm equal 0.72 # in the units of nm
velocity all create 1.0 8008 loop geom
pair_style lj/cut/coul/long ${cut_lj} ${cut_long}
pair_coeff * * 1.0 1.0
kspace_style ewald 1.0e-3
pair_modify shift yes
######### VERLET INTEGRATION WITH LANGEVIN THERMOSTAT ###########
fix fnve all nve
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
fix chareg all charge/regulation 2 3 acid_type 1 pH ${pH} pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
thermo 100
thermo_style custom step pe c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
timestep 0.005
run 2000

View File

@ -0,0 +1,44 @@
# Charge regulation lammps for simple weak electrolyte
units real
atom_style charge
neighbor 10.0 bin
read_data data.chreg-acid-real
#real units
variable sigma equal 7.2 # particle diameter 0.72 nm
variable temperature equal 298 # temperature 298 K
variable kb index 0.0019872067 # kB in Kcal/mol/K
variable epsilon equal ${kb}*${temperature}
variable tunit equal 2000 # time unit is 2000 fs
variable timestep equal 0.005*${tunit}
variable cut_long equal 12.5*${sigma}
variable nevery equal 100
variable nmc equal 100
variable pH equal 7.0
variable pKa equal 6.0
variable pIm equal 3.0
variable pIp equal 3.0
variable cut_lj equal 2^(1.0/6.0)*${sigma}
velocity all create ${temperature} 8008 loop geom
pair_style lj/cut/coul/long ${cut_lj} ${cut_long}
pair_coeff * * ${epsilon} ${sigma}
kspace_style pppm 1.0e-3
dielectric 78
pair_modify shift yes
######### VERLET INTEGRATION WITH LANGEVIN THERMOSTAT ###########
fix fnve all nve
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin $(v_temperature) $(v_temperature) $(v_tunit) 123
fix_modify fT temp dtemp
fix chareg all charge/regulation 2 3 acid_type 1 pH ${pH} pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm 0.1 nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
thermo 100
thermo_style custom step pe c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
timestep ${timestep}
run 2000

View File

@ -0,0 +1,33 @@
# Charge regulation lammps for a polymer chain
units lj
atom_style full
neighbor 3.0 bin
read_data data.chreg-polymer
bond_style harmonic
bond_coeff 1 100 1.122462 # K R0
velocity all create 1.0 8008 loop geom
pair_style lj/cut/coul/long 1.122462 20
pair_coeff * * 1.0 1.0 1.122462 # charges
kspace_style pppm 1.0e-3
pair_modify shift yes
dielectric 1.0
######### VERLET INTEGRATION WITH LANGEVIN THERMOSTAT ###########
fix fnve all nve
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
fix chareg1 all charge/regulation 2 3 acid_type 1 pH 7.0 pKa 6.5 pIp 3.0 pIm 3.0 temp 1.0 nmc 40 seed 2345
fix chareg2 all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 6.5 pIp 7.0 pIm 7.0 temp 1.0 nmc 40 seed 2345
fix chareg3 all charge/regulation 4 3 pIp 7.0 pIm 3.0 temp 1.0 nmc 20 seed 2345
thermo 100
# print: step, potential energy, temperature, neutral acids, charged acids, salt cations, salt anions, H+ ions, OH- ions
thermo_style custom step pe c_dtemp f_chareg1[3] f_chareg1[4] f_chareg1[7] f_chareg1[8] f_chareg2[7] f_chareg2[8]
timestep 0.005
run 2000

View File

@ -0,0 +1,125 @@
LAMMPS (10 Feb 2021)
using 1 OpenMP thread(s) per MPI task
# Charge regulation lammps for simple weak electrolyte
units lj
atom_style charge
neighbor 3.0 bin
read_data data.chreg-acid
Reading data file ...
orthogonal box = (-25.000000 -25.000000 -25.000000) to (25.000000 25.000000 25.000000)
1 by 1 by 1 MPI processor grid
reading atoms ...
219 atoms
read_data CPU = 0.003 seconds
variable cut_long equal 12.5
variable nevery equal 100
variable nmc equal 100
variable pH equal 7.0
variable pKa equal 6.0
variable pIm equal 3.0
variable pIp equal 3.0
variable cut_lj equal 2^(1.0/6.0)
variable lunit_nm equal 0.72 # in the units of nm
velocity all create 1.0 8008 loop geom
pair_style lj/cut/coul/long ${cut_lj} ${cut_long}
pair_style lj/cut/coul/long 1.12246204830937 ${cut_long}
pair_style lj/cut/coul/long 1.12246204830937 12.5
pair_coeff * * 1.0 1.0
kspace_style ewald 1.0e-3
pair_modify shift yes
######### VERLET INTEGRATION WITH LANGEVIN THERMOSTAT ###########
fix fnve all nve
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
fix chareg all charge/regulation 2 3 acid_type 1 pH ${pH} pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery 100 nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery 100 nmc 100 seed 2345 tempfixid fT
thermo 100
thermo_style custom step pe c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
timestep 0.005
run 2000
Ewald initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:339)
G vector (1/distance) = 0.14221027
estimated absolute RMS force accuracy = 0.0010128126
estimated relative force accuracy = 0.0010128126
KSpace vectors: actual max1d max3d = 257 5 665
kxmax kymax kzmax = 5 5 5
0 atoms in group FixChargeRegulation:exclusion_group:chareg
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (src/neighbor.cpp:486)
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 15.5
ghost atom cutoff = 15.5
binsize = 7.75, bins = 7 7 7
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.91 | 11.91 | 11.91 Mbytes
Step PotEng c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
0 -0.049662059 1 0 0 1 99 0 0 109 10
100 -0.053672881 0.99159291 100 71 16 84 0 0 92 8
200 -0.053383027 0.90935145 200 156 26 74 0 0 85 11
300 -0.040471335 0.97937429 300 240 21 79 0 0 87 8
400 -0.036188123 1.0837424 400 319 14 86 0 0 92 6
500 -0.057294925 1.0507526 500 407 10 90 0 0 98 8
600 -0.056009748 1.0669354 600 487 15 85 0 0 92 7
700 -0.069686562 0.99202496 700 567 14 86 0 0 96 10
800 -0.054695624 1.0592933 800 647 25 75 0 0 82 7
900 -0.058693653 0.97870458 900 728 27 73 0 0 83 10
1000 -0.062352957 1.0008923 1000 805 24 76 0 0 84 8
1100 -0.065011926 0.91691048 1100 886 22 78 0 0 87 9
1200 -0.080463686 0.98879304 1200 963 23 77 0 0 88 11
1300 -0.062146141 1.0566033 1300 1047 21 79 0 0 88 9
1400 -0.046980246 1.0847512 1400 1129 17 83 0 0 94 11
1500 -0.042935292 1.0075805 1500 1203 24 76 0 0 86 10
1600 -0.056075891 0.94173489 1600 1277 23 77 0 0 90 13
1700 -0.042279161 1.1126317 1700 1355 28 72 0 0 82 10
1800 -0.036842528 1.0255327 1800 1436 24 76 0 0 83 7
1900 -0.038816022 0.93883373 1900 1511 23 77 0 0 86 9
2000 -0.047008287 0.98904085 2000 1592 26 74 0 0 81 7
Loop time of 11.6365 on 1 procs for 2000 steps with 188 atoms
Performance: 74249.079 tau/day, 171.873 timesteps/s
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.24337 | 0.24337 | 0.24337 | 0.0 | 2.09
Kspace | 4.6009 | 4.6009 | 4.6009 | 0.0 | 39.54
Neigh | 0.023451 | 0.023451 | 0.023451 | 0.0 | 0.20
Comm | 0.027729 | 0.027729 | 0.027729 | 0.0 | 0.24
Output | 0.0007813 | 0.0007813 | 0.0007813 | 0.0 | 0.01
Modify | 6.7345 | 6.7345 | 6.7345 | 0.0 | 57.87
Other | | 0.005713 | | | 0.05
Nlocal: 188.000 ave 188 max 188 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 597.000 ave 597 max 597 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 2196.00 ave 2196 max 2196 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 2196
Ave neighs/atom = 11.680851
Neighbor list builds = 2059
Dangerous builds = 0
Total wall time: 0:00:11

View File

@ -0,0 +1,125 @@
LAMMPS (10 Feb 2021)
using 1 OpenMP thread(s) per MPI task
# Charge regulation lammps for simple weak electrolyte
units lj
atom_style charge
neighbor 3.0 bin
read_data data.chreg-acid
Reading data file ...
orthogonal box = (-25.000000 -25.000000 -25.000000) to (25.000000 25.000000 25.000000)
1 by 2 by 2 MPI processor grid
reading atoms ...
219 atoms
read_data CPU = 0.003 seconds
variable cut_long equal 12.5
variable nevery equal 100
variable nmc equal 100
variable pH equal 7.0
variable pKa equal 6.0
variable pIm equal 3.0
variable pIp equal 3.0
variable cut_lj equal 2^(1.0/6.0)
variable lunit_nm equal 0.72 # in the units of nm
velocity all create 1.0 8008 loop geom
pair_style lj/cut/coul/long ${cut_lj} ${cut_long}
pair_style lj/cut/coul/long 1.12246204830937 ${cut_long}
pair_style lj/cut/coul/long 1.12246204830937 12.5
pair_coeff * * 1.0 1.0
kspace_style ewald 1.0e-3
pair_modify shift yes
######### VERLET INTEGRATION WITH LANGEVIN THERMOSTAT ###########
fix fnve all nve
compute dtemp all temp
compute_modify dtemp dynamic yes
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
fix chareg all charge/regulation 2 3 acid_type 1 pH ${pH} pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa ${pKa} pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp ${pIp} pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm ${pIm} lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm ${lunit_nm} nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery ${nevery} nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery 100 nmc ${nmc} seed 2345 tempfixid fT
fix chareg all charge/regulation 2 3 acid_type 1 pH 7 pKa 6 pIp 3 pIm 3 lunit_nm 0.72 nevery 100 nmc 100 seed 2345 tempfixid fT
thermo 100
thermo_style custom step pe c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
timestep 0.005
run 2000
Ewald initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:339)
G vector (1/distance) = 0.14221027
estimated absolute RMS force accuracy = 0.0010128126
estimated relative force accuracy = 0.0010128126
KSpace vectors: actual max1d max3d = 257 5 665
kxmax kymax kzmax = 5 5 5
0 atoms in group FixChargeRegulation:exclusion_group:chareg
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (src/neighbor.cpp:486)
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 15.5
ghost atom cutoff = 15.5
binsize = 7.75, bins = 7 7 7
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.89 | 11.89 | 11.89 Mbytes
Step PotEng c_dtemp f_chareg[1] f_chareg[2] f_chareg[3] f_chareg[4] f_chareg[5] f_chareg[6] f_chareg[7] f_chareg[8]
0 -0.049662059 1 0 0 1 99 0 0 109 10
100 -0.06196414 1.0156327 100 72 15 85 0 0 93 8
200 -0.053901683 0.95128403 200 160 24 76 0 0 87 11
300 -0.043852423 0.98035058 300 246 22 78 0 0 85 7
400 -0.048370798 1.0909844 400 324 16 84 0 0 91 7
500 -0.042546472 1.026849 500 410 13 87 0 0 95 8
600 -0.06133022 0.97805065 600 494 14 86 0 0 93 7
700 -0.053815853 1.0641005 700 572 17 83 0 0 91 8
800 -0.059974814 1.0192348 800 650 23 77 0 0 83 6
900 -0.051808132 1.0773288 900 728 25 75 0 0 85 10
1000 -0.050390995 1.0236954 1000 804 28 72 0 0 81 9
1100 -0.069766444 1.030965 1100 890 25 75 0 0 85 10
1200 -0.074580231 1.0490058 1200 963 21 79 0 0 88 9
1300 -0.060169443 0.93456607 1300 1043 22 78 0 0 86 8
1400 -0.05120764 1.0374062 1400 1127 19 81 0 0 92 11
1500 -0.027644416 0.99804782 1500 1204 24 76 0 0 85 9
1600 -0.038599195 0.99015524 1600 1283 22 78 0 0 90 12
1700 -0.050222686 1.1444379 1700 1365 27 73 0 0 84 11
1800 -0.049338003 1.1188048 1800 1449 22 78 0 0 84 6
1900 -0.04533154 0.99894341 1900 1527 22 78 0 0 86 8
2000 -0.058837311 0.95302017 2000 1608 26 74 0 0 81 7
Loop time of 3.98119 on 4 procs for 2000 steps with 188 atoms
Performance: 217020.495 tau/day, 502.362 timesteps/s
96.2% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.050626 | 0.061127 | 0.071318 | 3.4 | 1.54
Kspace | 1.1987 | 1.2504 | 1.288 | 3.1 | 31.41
Neigh | 0.0056982 | 0.0063858 | 0.0069821 | 0.7 | 0.16
Comm | 0.068302 | 0.11638 | 0.17922 | 12.8 | 2.92
Output | 0.00055408 | 0.00092399 | 0.0020106 | 0.0 | 0.02
Modify | 2.5399 | 2.5406 | 2.5417 | 0.0 | 63.81
Other | | 0.005394 | | | 0.14
Nlocal: 47.0000 ave 55 max 42 min
Histogram: 1 0 1 1 0 0 0 0 0 1
Nghost: 328.250 ave 335 max 317 min
Histogram: 1 0 0 0 0 1 0 0 0 2
Neighs: 547.000 ave 659 max 466 min
Histogram: 2 0 0 0 0 0 1 0 0 1
Total # of neighbors = 2188
Ave neighs/atom = 11.638298
Neighbor list builds = 2057
Dangerous builds = 0
Total wall time: 0:00:04

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