Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Andrew Schultz
2019-06-10 16:15:07 -04:00
484 changed files with 64155 additions and 7950 deletions

View File

@ -87,7 +87,8 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
# this is fast, so check for it all the time
message(STATUS "Running check for auto-generated files from make-based build system")
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${LAMMPS_SOURCE_DIR}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
@ -172,21 +173,17 @@ set(LAMMPS_LINK_LIBS)
set(LAMMPS_DEPS)
set(LAMMPS_API_DEFINES)
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
KSPACE MANYBODY MC MESSAGE MISC MOLECULE PERI REPLICA RIGID SHOCK
SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD
USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD
USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF
USER-PHONON USER-PLUMED USER-PTM USER-QTB 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-ADIOS)
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MOLECULE PERI POEMS QEQ
REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB
USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB 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-ADIOS)
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
set(OTHER_PACKAGES CORESHELL QEQ)
foreach(PKG ${DEFAULT_PACKAGES})
option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()
@ -203,7 +200,6 @@ endif()
include_directories(${LAMMPS_SOURCE_DIR})
if(PKG_USER-ADIOS)
# The search for ADIOS2 must come before MPI because
# it includes its own MPI search with the latest FindMPI.cmake
@ -213,7 +209,6 @@ if(PKG_USER-ADIOS)
list(APPEND LAMMPS_LINK_LIBS adios2::adios2)
endif()
# do MPI detection after language activation, if MPI for these language is required
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
@ -233,7 +228,6 @@ else()
list(APPEND LAMMPS_LINK_LIBS mpi_stubs)
endif()
set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)")
set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall)
set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES})
@ -320,10 +314,26 @@ pkg_depends(USER-LB MPI)
pkg_depends(USER-PHONON KSPACE)
pkg_depends(USER-SCAFACOS MPI)
include(CheckIncludeFileCXX)
find_package(OpenMP QUIET)
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
if(BUILD_OMP OR PKG_KOKKOS OR PKG_USER-INTEL)
# TODO: this is a temporary workaround until a better solution is found. AK 2019-05-30
# GNU GCC 9.x uses settings incompatible with our use of 'default(none)' in OpenMP pragmas
# where we assume older GCC semantics. For the time being, we disable OpenMP by default
# for GCC 9.x and beyond. People may manually turn it on, but need to run the script
# src/USER-OMP/hack_openmp_for_pgi_gcc9.sh on all sources to make it compatible with gcc 9.
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.99.9))
option(BUILD_OMP "Build with OpenMP support" OFF)
else()
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
endif()
if(BUILD_OMP)
find_package(OpenMP REQUIRED)
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
if(NOT HAVE_OMP_H_INCLUDE)
message(FATAL_ERROR "Cannot find required 'omp.h' header file")
endif()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
@ -367,7 +377,7 @@ if(PKG_KSPACE)
endif()
endif()
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-PLUMED OR PKG_USER-QUIP OR PKG_LATTE)
find_package(LAPACK)
find_package(BLAS)
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
@ -441,9 +451,14 @@ else()
set(CUDA_REQUEST_PIC)
endif()
if(PKG_VORONOI)
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" OFF)
find_package(VORO)
if(VORO_FOUND)
set(DOWNLOAD_VORO_DEFAULT OFF)
else()
set(DOWNLOAD_VORO_DEFAULT ON)
endif()
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT})
if(DOWNLOAD_VORO)
message(STATUS "Voro++ download requested - we will build our own")
include(ExternalProject)
@ -476,7 +491,13 @@ if(PKG_VORONOI)
endif()
if(PKG_LATTE)
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" OFF)
find_package(LATTE)
if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF)
else()
set(DOWNLOAD_LATTE_DEFAULT ON)
endif()
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
if(DOWNLOAD_LATTE)
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
message(FATAL_ERROR "For downlading LATTE you need at least cmake-3.7")
@ -488,6 +509,9 @@ if(PKG_LATTE)
URL_MD5 85ac414fdada2d04619c8f936344df14
SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC}
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}
-DCMAKE_Fortran_FLAGS_${BTYPE}=${CMAKE_Fortran_FLAGS_${BTYPE}} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
ExternalProject_get_property(latte_build INSTALL_DIR)
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)
@ -503,7 +527,15 @@ endif()
if(PKG_USER-SCAFACOS)
find_package(GSL REQUIRED)
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" OFF)
find_package(PkgConfig QUIET)
set(DOWNLOAD_SCAFACOS_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SCAFACOS QUIET scafacos)
if(SCAFACOS_FOUND)
set(DOWNLOAD_SCAFACOS_DEFAULT OFF)
endif()
endif()
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
if(DOWNLOAD_SCAFACOS)
message(STATUS "ScaFaCoS download requested - we will build our own")
include(ExternalProject)
@ -543,8 +575,8 @@ if(PKG_USER-SCAFACOS)
list(APPEND LAMMPS_LINK_LIBS ${MPI_Fortran_LIBRARIES})
list(APPEND LAMMPS_LINK_LIBS ${MPI_C_LIBRARIES})
else()
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(SCAFACOS scafacos REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SCAFACOS REQUIRED scafacos)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_LDFLAGS})
endif()
include_directories(${SCAFACOS_INCLUDE_DIRS})
@ -558,29 +590,53 @@ if(PKG_USER-PLUMED)
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" OFF)
find_package(PkgConfig QUIET)
set(DOWNLOAD_PLUMED_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PLUMED QUIET plumed)
if(PLUMED_FOUND)
set(DOWNLOAD_PLUMED_DEFAULT OFF)
endif()
endif()
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
if(DOWNLOAD_PLUMED)
if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
else()
set(PLUMED_CONFIG_MPI "--disable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
endif()
if(BUILD_OMP)
set(PLUMED_CONFIG_OMP "--enable-openmp")
else()
set(PLUMED_CONFIG_OMP "--disable-openmp")
endif()
message(STATUS "PLUMED download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(plumed_build
URL https://github.com/plumed/plumed2/releases/download/v2.4.4/plumed-src-2.4.4.tgz
URL_MD5 71ed465bdc7c2059e282dbda8d564e71
URL https://github.com/plumed/plumed2/releases/download/v2.5.1/plumed-src-2.5.1.tgz
URL_MD5 c2a7b519e32197a120cdf47e0f194f81
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
${CONFIGURE_REQUEST_PIC}
--enable-modules=all
CXX=${CMAKE_MPI_CXX_COMPILER}
CC=${CMAKE_MPI_C_COMPILER}
--enable-modules=all
${PLUMED_CONFIG_MPI}
${PLUMED_CONFIG_OMP}
CXX=${PLUMED_CONFIG_CXX}
CC=${PLUMED_CONFIG_CC}
)
ExternalProject_get_property(plumed_build INSTALL_DIR)
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})
list(APPEND LAMMPS_DEPS plumed_build)
if(PLUMED_MODE STREQUAL "STATIC")
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/plumed/obj/kernel.o
"${PLUMED_INSTALL_DIR}/lib/plumed/obj/PlumedStatic.o" ${GSL_LIBRARIES} ${CMAKE_DL_LIBS})
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${GSL_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
elseif(PLUMED_MODE STREQUAL "SHARED")
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.so ${CMAKE_DL_LIBS})
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.so ${PLUMED_INSTALL_DIR}/lib/libplumedKernel.so ${CMAKE_DL_LIBS})
elseif(PLUMED_MODE STREQUAL "RUNTIME")
add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel.so)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS})
@ -588,7 +644,7 @@ if(PKG_USER-PLUMED)
set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED plumed REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed)
if(PLUMED_MODE STREQUAL "STATIC")
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
@ -607,7 +663,10 @@ if(PKG_USER-MOLFILE)
set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
add_library(molfile INTERFACE)
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
# no need to link with -ldl on windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
endif()
list(APPEND LAMMPS_LINK_LIBS molfile)
endif()
@ -619,7 +678,13 @@ if(PKG_USER-NETCDF)
endif()
if(PKG_USER-SMD)
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" OFF)
find_package(Eigen3 NO_MODULE)
if(EIGEN3_FOUND)
set(DOWNLOAD_EIGEN3_DEFAULT OFF)
else()
set(DOWNLOAD_EIGEN3_DEFAULT ON)
endif()
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT})
if(DOWNLOAD_EIGEN3)
message(STATUS "Eigen3 download requested - we will build our own")
include(ExternalProject)
@ -667,7 +732,13 @@ if(PKG_KIM)
list(APPEND LAMMPS_LINK_LIBS ${CURL_LIBRARIES})
add_definitions(-DLMP_KIM_CURL)
endif()
option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" OFF)
find_package(KIM-API QUIET)
if(KIM-API_FOUND)
set(DOWNLOAD_KIM_DEFAULT OFF)
else()
set(DOWNLOAD_KIM_DEFAULT ON)
endif()
option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT})
if(DOWNLOAD_KIM)
message(STATUS "KIM-API download requested - we will build our own")
enable_language(C)
@ -688,10 +759,7 @@ if(PKG_KIM)
set(KIM-API_LDFLAGS ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX})
list(APPEND LAMMPS_DEPS kim_build)
else()
find_package(KIM-API)
if(NOT KIM-API_FOUND)
message(FATAL_ERROR "KIM-API not found, help CMake to find it by setting PKG_CONFIG_PATH, or set DOWNLOAD_KIM=ON to download it")
endif()
find_package(KIM-API REQUIRED)
endif()
list(APPEND LAMMPS_LINK_LIBS "${KIM-API_LDFLAGS}")
include_directories(${KIM-API_INCLUDE_DIRS})
@ -709,6 +777,7 @@ if(PKG_MESSAGE)
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csmpi")
else()
target_compile_definitions(cslib PRIVATE -DMPI_NO)
target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_MPI)
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csnompi")
endif()
@ -728,7 +797,13 @@ endif()
if(PKG_MSCG)
find_package(GSL REQUIRED)
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" OFF)
find_package(MSCG QUIET)
if(MSGC_FOUND)
set(DOWNLOAD_MSCG_DEFAULT OFF)
else()
set(DOWNLOAD_MSCG_DEFAULT ON)
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
message(FATAL_ERROR "For downlading MSCG you need at least cmake-3.7")
@ -777,7 +852,6 @@ endif()
########################################################################
# Basic system tests (standard libraries, headers, functions, types) #
########################################################################
include(CheckIncludeFileCXX)
foreach(HEADER cmath)
check_include_file_cxx(${HEADER} FOUND_${HEADER})
if(NOT FOUND_${HEADER})
@ -825,6 +899,8 @@ foreach(PKG ${DEFAULT_PACKAGES})
list(APPEND LIB_SOURCES ${${PKG}_SOURCES})
include_directories(${${PKG}_SOURCES_DIR})
endif()
RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach()
# packages that need defines set
@ -843,6 +919,8 @@ foreach(PKG ${ACCEL_PACKAGES})
# check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach()
##############################################
@ -891,7 +969,6 @@ if(PKG_USER-H5MD)
include_directories(${HDF5_INCLUDE_DIRS})
endif()
######################################################################
# packages which selectively include variants based on enabled styles
# e.g. accelerator packages
@ -944,7 +1021,7 @@ if(PKG_USER-OMP)
# detects styles which have USER-OMP version
RegisterStylesExt(${USER-OMP_SOURCES_DIR} omp OMP_SOURCES)
RegisterFixStyle("${USER-OMP_SOURCES_DIR}/fix_omp.h")
RegisterFixStyle(${USER-OMP_SOURCES_DIR}/fix_omp.h)
get_property(USER-OMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
@ -1057,37 +1134,82 @@ if(PKG_OPT)
endif()
if(PKG_USER-INTEL)
find_package(TBB REQUIRED)
find_package(MKL REQUIRED)
include(CheckIncludeFile)
check_include_file(immintrin.h FOUND_IMMINTRIN)
if(NOT FOUND_IMMINTRIN)
message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
endif()
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
endif()
add_definitions(-DLMP_USER_INTEL)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "USER-INTEL needs at least a 2016 intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")
set(INTEL_ARCH_VALUES cpu knl)
set_property(CACHE INTEL_ARCH PROPERTY STRINGS ${INTEL_ARCH_VALUES})
validate_option(INTEL_ARCH INTEL_ARCH_VALUES)
string(TOUPPER ${INTEL_ARCH} INTEL_ARCH)
if(NOT BUILD_OMP)
message(FATAL_ERROR "USER-INTEL requires OpenMP")
endif()
if(NOT ${LAMMPS_MEMALIGN} STREQUAL "64")
message(FATAL_ERROR "USER-INTEL is only useful with LAMMPS_MEMALIGN=64")
endif()
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")
set(INTEL_ARCH_VALUES cpu knl)
set_property(CACHE INTEL_ARCH PROPERTY STRINGS ${INTEL_ARCH_VALUES})
validate_option(INTEL_ARCH INTEL_ARCH_VALUES)
string(TOUPPER ${INTEL_ARCH} INTEL_ARCH)
if(INTEL_ARCH STREQUAL "KNL")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload")
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"")
add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS})
add_definitions(-DLMP_INTEL_OFFLOAD)
find_package(Threads QUIET)
if(Threads_FOUND)
set(INTEL_LRT_MODE "threads" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
else()
set(INTEL_LRT_MODE "none" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
endif()
set(INTEL_LRT_VALUES none threads c++11)
set_property(CACHE INTEL_LRT_MODE PROPERTY STRINGS ${INTEL_LRT_VALUES})
validate_option(INTEL_LRT_MODE INTEL_LRT_VALUES)
string(TOUPPER ${INTEL_LRT_MODE} INTEL_LRT_MODE)
if(INTEL_LRT_MODE STREQUAL "THREADS")
if(Threads_FOUND)
add_definitions(-DLMP_INTEL_USELRT)
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
else()
message(FATAL_ERROR "Must have working threads library for Long-range thread support")
endif()
endif()
if(INTEL_LRT_MODE STREQUAL "C++11")
add_definitions(-DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "USER-INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
else()
message(WARNING "USER-INTEL gives best performance with Intel compilers")
endif()
find_package(TBB QUIET)
if(TBB_FOUND)
list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES})
else()
add_definitions(-DLMP_INTEL_NO_TBB)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries")
endif()
endif()
find_package(MKL QUIET)
if(MKL_FOUND)
add_definitions(-DLMP_USE_MKL_RNG)
list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES})
else()
message(STATUS "Pair style dpd/intel will be faster with MKL libraries")
endif()
if((NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "64") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "128") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "256"))
message(FATAL_ERROR "USER-INTEL only supports memory alignment of 64, 128 or 256 on this platform")
endif()
if(INTEL_ARCH STREQUAL "KNL")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "Must use Intel compiler with USER-INTEL for KNL architecture")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload")
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"")
add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS})
add_definitions(-DLMP_INTEL_OFFLOAD)
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
else()
@ -1100,33 +1222,35 @@ if(PKG_USER-INTEL)
add_compile_options(${_FLAG})
endif()
endforeach()
else()
add_compile_options(-O3 -ffast-math)
endif()
endif()
add_definitions(-DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG)
# collect sources
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/fix_intel.cpp
${USER-INTEL_SOURCES_DIR}/fix_nh_intel.cpp
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp)
list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES} ${MKL_LIBRARIES})
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/intel_preprocess.h
${USER-INTEL_SOURCES_DIR}/intel_buffers.h
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
${USER-INTEL_SOURCES_DIR}/math_extra_intel.h
${USER-INTEL_SOURCES_DIR}/nbin_intel.h
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
${USER-INTEL_SOURCES_DIR}/npair_intel.h
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp
${USER-INTEL_SOURCES_DIR}/intel_simd.h
${USER-INTEL_SOURCES_DIR}/intel_intrinsics.h)
# detect styles which have a USER-INTEL version
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} intel USER-INTEL_SOURCES)
RegisterNBinStyle(${USER-INTEL_SOURCES_DIR}/nbin_intel.h)
RegisterNPairStyle(${USER-INTEL_SOURCES_DIR}/npair_intel.h)
RegisterFixStyle(${USER-INTEL_SOURCES_DIR}/fix_intel.h)
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
if(PKG_KSPACE)
list(APPEND USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
RegisterIntegrateStyle(${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
endif()
# detects styles which have USER-INTEL version
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} opt USER-INTEL_SOURCES)
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES})
include_directories(${USER-INTEL_SOURCES_DIR})
list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES})
include_directories(${USER-INTEL_SOURCES_DIR})
endif()
if(PKG_GPU)
@ -1168,6 +1292,10 @@ if(PKG_GPU)
message(FATAL_ERROR "Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.")
endif()
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
if(CUDA_MPS_SUPPORT)
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
endif()
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
@ -1231,7 +1359,7 @@ if(PKG_GPU)
add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
target_link_libraries(gpu ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
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)
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
if(CUDPP_OPT)
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
@ -1257,7 +1385,15 @@ if(PKG_GPU)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu)
list(REMOVE_ITEM GPU_LIB_CU
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu
)
foreach(GPU_KERNEL ${GPU_LIB_CU})
get_filename_component(basename ${GPU_KERNEL} NAME_WE)
@ -1268,7 +1404,21 @@ if(PKG_GPU)
GenerateOpenCLHeader(gayberne ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu)
GenerateOpenCLHeader(gayberne_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu)
list(APPEND GPU_LIB_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h)
GenerateOpenCLHeader(re_squared ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu)
GenerateOpenCLHeader(re_squared_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu)
GenerateOpenCLHeader(tersoff ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu)
GenerateOpenCLHeader(tersoff_zbl ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu)
GenerateOpenCLHeader(tersoff_mod ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu)
list(APPEND GPU_LIB_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h
)
add_library(gpu STATIC ${GPU_LIB_SOURCES})
target_link_libraries(gpu ${OpenCL_LIBRARIES})
@ -1301,10 +1451,12 @@ endif()
######################################################
# Generate style headers based on global list of
# styles registered during package selection
# Generate packages headers from all packages
######################################################
set(LAMMPS_STYLE_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/styles)
GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})
GeneratePackagesHeaders(${LAMMPS_STYLE_HEADERS_DIR})
include_directories(${LAMMPS_STYLE_HEADERS_DIR})
@ -1313,7 +1465,7 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
######################################
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
list(SORT temp_PKG_LIST)
foreach(PKG ${temp_PKG_LIST})
if(PKG_${PKG})
@ -1381,8 +1533,16 @@ if(BUILD_EXE)
if(ENABLE_TESTING)
add_test(ShowHelp ${LAMMPS_BINARY} -help)
endif()
endif()
enable_language(C)
get_filename_component(MSI2LMP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../tools/msi2lmp/src ABSOLUTE)
file(GLOB MSI2LMP_SOURCES ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
add_executable(msi2lmp ${MSI2LMP_SOURCES})
target_link_libraries(msi2lmp m)
install(TARGETS msi2lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${LAMMPS_DOC_DIR}/msi2lmp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
###############################################################################
# Build documentation
@ -1445,11 +1605,14 @@ if(BUILD_DOC)
endif()
###############################################################################
# Install potential files in data directory
# Install potential and force field files in data directory
###############################################################################
set(LAMMPS_POTENTIALS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/potentials)
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials/ DESTINATION ${LAMMPS_POTENTIALS_DIR})
set(LAMMPS_FRC_FILES_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/frc_files)
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../tools/msi2lmp/frc_files/ DESTINATION ${LAMMPS_FRC_FILES_DIR})
configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY)
configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY)
install(
@ -1533,7 +1696,7 @@ endif()
###############################################################################
# Print package summary
###############################################################################
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
if(PKG_${PKG})
message(STATUS "Building package: ${PKG}")
endif()

View File

@ -36,14 +36,23 @@
# KIM-API-CMAKE_CXX_COMPILER
# KIM-API-CMAKE_Fortran_COMPILER
#
find_package(PkgConfig REQUIRED)
if(KIM-API_FIND_QUIETLY)
set(REQ_OR_QUI "QUIET")
else()
set(REQ_OR_QUI "REQUIRED")
endif()
find_package(PkgConfig ${REQ_OR_QUI})
include(FindPackageHandleStandardArgs)
pkg_check_modules(KIM-API REQUIRED libkim-api>=2.0)
pkg_check_modules(KIM-API ${REQ_OR_QUI} libkim-api>=2.0)
pkg_get_variable(KIM-API-V2-CMAKE_C_COMPILER libkim-api CMAKE_C_COMPILER)
pkg_get_variable(KIM-API-V2-CMAKE_CXX_COMPILER libkim-api CMAKE_CXX_COMPILER)
pkg_get_variable(KIM-API-V2_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
if(KIM-API_FOUND)
pkg_get_variable(KIM-API-CMAKE_C_COMPILER libkim-api CMAKE_C_COMPILER)
pkg_get_variable(KIM-API-CMAKE_CXX_COMPILER libkim-api CMAKE_CXX_COMPILER)
pkg_get_variable(KIM-API_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
endif()
# handle the QUIETLY and REQUIRED arguments and set KIM-API_FOUND to TRUE
# if all listed variables are TRUE

View File

@ -6,7 +6,7 @@ function(GenerateOpenCLHeader varname outfile files)
foreach(IDX RANGE 2 ${ARG_END})
list(GET ARGV ${IDX} filename)
file(READ ${filename} content)
string(REGEX REPLACE "\\s*//[^\n]*\n" "" content "${content}")
string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}")
string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}")
string(REGEX REPLACE "\"" "\\\\\"" content "${content}")
string(REGEX REPLACE "([^\n]+)\n" "\"\\1\\\\n\"\n" content "${content}")

View File

@ -91,6 +91,10 @@ function(RegisterFixStyle path)
AddStyleHeader(${path} FIX)
endfunction(RegisterFixStyle)
function(RegisterIntegrateStyle path)
AddStyleHeader(${path} INTEGRATE)
endfunction(RegisterIntegrateStyle)
function(RegisterStyles search_path)
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
@ -177,3 +181,88 @@ function(DetectBuildSystemConflict lammps_src_dir)
endforeach()
endif()
endfunction(DetectBuildSystemConflict)
function(FindPackagesHeaders path style_class file_pattern headers)
file(GLOB files "${path}/${file_pattern}*.h")
get_property(plist GLOBAL PROPERTY ${headers})
foreach(file_name ${files})
file(STRINGS ${file_name} is_style LIMIT_COUNT 1 REGEX ${style_class})
if(is_style)
list(APPEND plist ${file_name})
endif()
endforeach()
set_property(GLOBAL PROPERTY ${headers} "${plist}")
endfunction(FindPackagesHeaders)
function(RegisterPackages search_path)
FindPackagesHeaders(${search_path} ANGLE_CLASS angle_ PKGANGLE ) # angle ) # force
FindPackagesHeaders(${search_path} ATOM_CLASS atom_vec_ PKGATOM_VEC ) # atom ) # atom atom_vec_hybrid
FindPackagesHeaders(${search_path} BODY_CLASS body_ PKGBODY ) # body ) # atom_vec_body
FindPackagesHeaders(${search_path} BOND_CLASS bond_ PKGBOND ) # bond ) # force
FindPackagesHeaders(${search_path} COMMAND_CLASS "[^.]" PKGCOMMAND ) # command ) # input
FindPackagesHeaders(${search_path} COMPUTE_CLASS compute_ PKGCOMPUTE ) # compute ) # modify
FindPackagesHeaders(${search_path} DIHEDRAL_CLASS dihedral_ PKGDIHEDRAL ) # dihedral ) # force
FindPackagesHeaders(${search_path} DUMP_CLASS dump_ PKGDUMP ) # dump ) # output write_dump
FindPackagesHeaders(${search_path} FIX_CLASS fix_ PKGFIX ) # fix ) # modify
FindPackagesHeaders(${search_path} IMPROPER_CLASS improper_ PKGIMPROPER ) # improper ) # force
FindPackagesHeaders(${search_path} INTEGRATE_CLASS "[^.]" PKGINTEGRATE ) # integrate ) # update
FindPackagesHeaders(${search_path} KSPACE_CLASS "[^.]" PKGKSPACE ) # kspace ) # force
FindPackagesHeaders(${search_path} MINIMIZE_CLASS min_ PKGMINIMIZE ) # minimize ) # update
FindPackagesHeaders(${search_path} NBIN_CLASS nbin_ PKGNBIN ) # nbin ) # neighbor
FindPackagesHeaders(${search_path} NPAIR_CLASS npair_ PKGNPAIR ) # npair ) # neighbor
FindPackagesHeaders(${search_path} NSTENCIL_CLASS nstencil_ PKGNSTENCIL ) # nstencil ) # neighbor
FindPackagesHeaders(${search_path} NTOPO_CLASS ntopo_ PKGNTOPO ) # ntopo ) # neighbor
FindPackagesHeaders(${search_path} PAIR_CLASS pair_ PKGPAIR ) # pair ) # force
FindPackagesHeaders(${search_path} READER_CLASS reader_ PKGREADER ) # reader ) # read_dump
FindPackagesHeaders(${search_path} REGION_CLASS region_ PKGREGION ) # region ) # domain
endfunction(RegisterPackages)
function(CreatePackagesHeader path filename)
set(temp "")
if(ARGC GREATER 2)
list(REMOVE_AT ARGV 0 1)
foreach(FNAME ${ARGV})
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}")
get_filename_component(DNAME ${FNAME} DIRECTORY)
get_filename_component(DNAME ${DNAME} NAME)
get_filename_component(FNAME ${FNAME} NAME)
set(temp "${temp}#undef PACKAGE\n#define PACKAGE \"${DNAME}\"\n")
set(temp "${temp}#include \"${DNAME}/${FNAME}\"\n")
endforeach()
endif()
message(STATUS "Generating ${filename}...")
file(WRITE "${path}/${filename}.tmp" "${temp}" )
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${path}/${filename}")
endfunction(CreatePackagesHeader)
function(GeneratePackagesHeader path property style)
get_property(files GLOBAL PROPERTY ${property})
CreatePackagesHeader("${path}" "packages_${style}.h" ${files})
endfunction(GeneratePackagesHeader)
function(GeneratePackagesHeaders output_path)
GeneratePackagesHeader(${output_path} PKGANGLE angle ) # force
GeneratePackagesHeader(${output_path} PKGATOM_VEC atom ) # atom atom_vec_hybrid
GeneratePackagesHeader(${output_path} PKGBODY body ) # atom_vec_body
GeneratePackagesHeader(${output_path} PKGBOND bond ) # force
GeneratePackagesHeader(${output_path} PKGCOMMAND command ) # input
GeneratePackagesHeader(${output_path} PKGCOMPUTE compute ) # modify
GeneratePackagesHeader(${output_path} PKGDIHEDRAL dihedral ) # force
GeneratePackagesHeader(${output_path} PKGDUMP dump ) # output write_dump
GeneratePackagesHeader(${output_path} PKGFIX fix ) # modify
GeneratePackagesHeader(${output_path} PKGIMPROPER improper ) # force
GeneratePackagesHeader(${output_path} PKGINTEGRATE integrate ) # update
GeneratePackagesHeader(${output_path} PKGKSPACE kspace ) # force
GeneratePackagesHeader(${output_path} PKGMINIMIZE minimize ) # update
GeneratePackagesHeader(${output_path} PKGNBIN nbin ) # neighbor
GeneratePackagesHeader(${output_path} PKGNPAIR npair ) # neighbor
GeneratePackagesHeader(${output_path} PKGNSTENCIL nstencil ) # neighbor
GeneratePackagesHeader(${output_path} PKGNTOPO ntopo ) # neighbor
GeneratePackagesHeader(${output_path} PKGPAIR pair ) # force
GeneratePackagesHeader(${output_path} PKGREADER reader ) # read_dump
GeneratePackagesHeader(${output_path} PKGREGION region ) # domain
endfunction(GeneratePackagesHeaders)

View File

@ -155,11 +155,13 @@ make
The CMake build exposes a lot of different options. In the old build system
some of the package selections were possible by using special make target like
`make yes-std` or `make no-lib`. Achieving the same result with cmake requires
`make yes-std` or `make no-lib`. Achieving a similar result with cmake requires
specifying all options manually. This can quickly become a very long command
line that is hard to handle. While these could be stored in a simple script
file, there is another way of defining "presets" to compile LAMMPS in a certain
way.
way. Since the cmake build process - contrary to the conventional build system -
includes the compilation of the bundled libraries into the standard build process,
the grouping of those presets is somewhat different.
A preset is a regular CMake script file that can use constructs such as
variables, lists and for-loops to manipulate configuration options and create
@ -171,10 +173,10 @@ Such a file can then be passed to cmake via the `-C` flag. Several examples of
presets can be found in the `cmake/presets` folder.
```bash
# build LAMMPS with all "standard" packages which don't use libraries and enable GPU package
# build LAMMPS with all packages enabled which don't use external libraries and enable GPU package
mkdir build
cd build
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on ../cmake
```
# Reference
@ -209,7 +211,7 @@ cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
</td>
</tr>
<tr>
<td><code><CMAKE_VERBOSE_MAKEFILE/code></td>
<td><code>CMAKE_VERBOSE_MAKEFILE</code></td>
<td>Enable verbose output from Makefile builds (useful for debugging), the same can be achived by adding `VERBOSE=1` to the `make` call.</td>
<td>
<dl>
@ -1429,6 +1431,17 @@ TODO
</dl>
</td>
</tr>
<tr>
<td><code>INTEL_LRT_MODE</code></td>
<td>How to support Long-range thread mode in Verlet integration</td>
<td>
<dl>
<dt><code>threads</code> (default, if pthreads available)</dt>
<dt><code>none</code> (default, if pthreads not available)</dt>
<dt><code>c++11</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>
@ -1503,6 +1516,16 @@ target API.
</dl>
</td>
</tr>
<tr>
<td><code>CUDA_MPS_SUPPORT</code> (CUDA only)</td>
<td>Enable tweaks for running with Nvidia CUDA Multi-process services daemon</td>
<td>
<dl>
<dt><code>on</code></dt>
<dt><code>off</code> (default)</dt>
</dl>
</td>
</tr>
<tr>
<td><code>BIN2C</code> (CUDA only)</td>
<td>Path to bin2c executable, will automatically pick up the first one in your $PATH.</td>

View File

@ -1,2 +1,4 @@
# set environment for LAMMPS executables to find potential files
# set environment for LAMMPS and msi2lmp executables
# to find potential and force field files
if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_POTENTIALS_DIR@
if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_FRC_FILES_DIR@

View File

@ -1,2 +1,5 @@
# set environment for LAMMPS executables to find potential files
export LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
# set environment for LAMMPS and msi2lmp executables
# to find potential and force field files
LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_FRC_FILES_DIR@}
export LAMMPS_POTENTIALS MSI2LMP_LIBRARY

View File

@ -1,21 +1,17 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
# preset that turns on all existing packages off. can be used to reset
# an existing package selection without losing any other settings
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MOLECULE
MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -1,21 +1,19 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
# preset that turns on all existing packages. using the combination
# this preset followed by the nolib.cmake preset should configure a
# LAMMPS binary, with as many packages included, that can be compiled
# with just a working C++ compiler and an MPI library.
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MOLECULE
MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

17
cmake/presets/clang.cmake Normal file
View File

@ -0,0 +1,17 @@
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBG" CACHE STRING "" FORCE)
set(MPI_CXX "clang++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "clang" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_CXX "clang++" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "/usr/lib64/libomp.so" CACHE PATH "" FORCE)

View File

@ -1,71 +0,0 @@
set(PKG_ASPHERE OFF CACHE BOOL "" FORCE)
set(PKG_BODY OFF CACHE BOOL "" FORCE)
set(PKG_CLASS2 OFF CACHE BOOL "" FORCE)
set(PKG_COLLOID OFF CACHE BOOL "" FORCE)
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
set(PKG_CORESHELL OFF CACHE BOOL "" FORCE)
set(PKG_DIPOLE OFF CACHE BOOL "" FORCE)
set(PKG_GPU OFF CACHE BOOL "" FORCE)
set(PKG_GRANULAR OFF CACHE BOOL "" FORCE)
set(PKG_KIM OFF CACHE BOOL "" FORCE)
set(PKG_KOKKOS OFF CACHE BOOL "" FORCE)
set(PKG_KSPACE OFF CACHE BOOL "" FORCE)
set(PKG_LATTE OFF CACHE BOOL "" FORCE)
set(PKG_LIB OFF CACHE BOOL "" FORCE)
set(PKG_MANYBODY OFF CACHE BOOL "" FORCE)
set(PKG_MC OFF CACHE BOOL "" FORCE)
set(PKG_MEAM OFF CACHE BOOL "" FORCE)
set(PKG_MISC OFF CACHE BOOL "" FORCE)
set(PKG_MOLECULE OFF CACHE BOOL "" FORCE)
set(PKG_MPIIO OFF CACHE BOOL "" FORCE)
set(PKG_MSCG OFF CACHE BOOL "" FORCE)
set(PKG_OPT OFF CACHE BOOL "" FORCE)
set(PKG_PERI OFF CACHE BOOL "" FORCE)
set(PKG_POEMS OFF CACHE BOOL "" FORCE)
set(PKG_PYTHOFF OFF CACHE BOOL "" FORCE)
set(PKG_QEQ OFF CACHE BOOL "" FORCE)
set(PKG_REAX OFF CACHE BOOL "" FORCE)
set(PKG_REPLICA OFF CACHE BOOL "" FORCE)
set(PKG_RIGID OFF CACHE BOOL "" FORCE)
set(PKG_SHOCK OFF CACHE BOOL "" FORCE)
set(PKG_SNAP OFF CACHE BOOL "" FORCE)
set(PKG_SRD OFF CACHE BOOL "" FORCE)
set(PKG_VOROFFOI OFF CACHE BOOL "" FORCE)
set(PKG_USER OFF CACHE BOOL "" FORCE)
set(PKG_USER-ATC OFF CACHE BOOL "" FORCE)
set(PKG_USER-AWPMD OFF CACHE BOOL "" FORCE)
set(PKG_USER-BOCS OFF CACHE BOOL "" FORCE)
set(PKG_USER-CGDNA OFF CACHE BOOL "" FORCE)
set(PKG_USER-CGSDK OFF CACHE BOOL "" FORCE)
set(PKG_USER-COLVARS OFF CACHE BOOL "" FORCE)
set(PKG_USER-DIFFRACTIOFF OFF CACHE BOOL "" FORCE)
set(PKG_USER-DPD OFF CACHE BOOL "" FORCE)
set(PKG_USER-DRUDE OFF CACHE BOOL "" FORCE)
set(PKG_USER-EFF OFF CACHE BOOL "" FORCE)
set(PKG_USER-FEP OFF CACHE BOOL "" FORCE)
set(PKG_USER-H5MD OFF CACHE BOOL "" FORCE)
set(PKG_USER-INTEL OFF CACHE BOOL "" FORCE)
set(PKG_USER-LB OFF CACHE BOOL "" FORCE)
set(PKG_USER-MANIFOLD OFF CACHE BOOL "" FORCE)
set(PKG_USER-MEAMC OFF CACHE BOOL "" FORCE)
set(PKG_USER-MESO OFF CACHE BOOL "" FORCE)
set(PKG_USER-MGPT OFF CACHE BOOL "" FORCE)
set(PKG_USER-MISC OFF CACHE BOOL "" FORCE)
set(PKG_USER-MOFFF OFF CACHE BOOL "" FORCE)
set(PKG_USER-MOLFILE OFF CACHE BOOL "" FORCE)
set(PKG_USER-NETCDF OFF CACHE BOOL "" FORCE)
set(PKG_USER-OMP OFF CACHE BOOL "" FORCE)
set(PKG_USER-PHONON OFF CACHE BOOL "" FORCE)
set(PKG_USER-PLUMED OFF CACHE BOOL "" FORCE)
set(PKG_USER-QMMM OFF CACHE BOOL "" FORCE)
set(PKG_USER-QTB OFF CACHE BOOL "" FORCE)
set(PKG_USER-QUIP OFF CACHE BOOL "" FORCE)
set(PKG_USER-REAXC OFF CACHE BOOL "" FORCE)
set(PKG_USER-SDPD OFF CACHE BOOL "" FORCE)
set(PKG_USER-SMD OFF CACHE BOOL "" FORCE)
set(PKG_USER-SMTBQ OFF CACHE BOOL "" FORCE)
set(PKG_USER-SPH OFF CACHE BOOL "" FORCE)
set(PKG_USER-TALLY OFF CACHE BOOL "" FORCE)
set(PKG_USER-UEF OFF CACHE BOOL "" FORCE)
set(PKG_USER-VTK OFF CACHE BOOL "" FORCE)

View File

@ -0,0 +1,17 @@
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI POEMS QEQ
REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI USER-ATC USER-AWPMD
USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-INTEL USER-MANIFOLD
USER-MEAMC USER-MESO USER-MISC USER-MOFFF USER-MOLFILE USER-OMP
USER-PHONON USER-PTM USER-QTB USER-REAXC USER-SDPD USER-SMD
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF)
foreach(PKG ${WIN_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(LAMMPS_MEMALIGN "0" CACHE STRING "" FORCE)
set(INTEL_LRT_MODE "none" CACHE STRING "" FORCE)

View File

@ -0,0 +1,8 @@
# preset that turns on just a few, frequently used packages
# this will be compiled quickly and handle a lot of common inputs.
set(ALL_PACKAGES KSPACE MANYBODY MOLECULE RIGID)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()

15
cmake/presets/most.cmake Normal file
View File

@ -0,0 +1,15 @@
# preset that turns on a wide range of packages, some of which require
# external libraries. Compared to all_on.cmake some more unusual packages
# are removed. The resulting binary should be able to run most inputs.
set(ALL_PACKAGES ASPHERE CLASS2 COLLOID CORESHELL DIPOLE
GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
PYTHON QEQ REPLICA RIGID SHOCK SRD VORONOI
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD
USER-DRUDE USER-FEP USER-MEAMC USER-MESO
USER-MISC USER-MOFFF USER-OMP USER-PLUMED USER-PHONON USER-REAXC
USER-SPH USER-SMD USER-UEF USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()

View File

@ -1,21 +1,10 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
# preset that turns off all packages that require some form of external
# library or special compiler (fortran or cuda) or equivalent.
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MPIIO MSCG PYTHON
VORONOI USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB
USER-MOLFILE USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP
USER-SCAFACOS USER-SMD USER-VTK)
foreach(PKG ${PACKAGES_WITH_LIB})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -1,22 +0,0 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
foreach(PKG ${STANDARD_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()

View File

@ -1,26 +0,0 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
foreach(PKG ${STANDARD_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()
foreach(PKG ${PACKAGES_WITH_LIB})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
endforeach()

View File

@ -1,22 +0,0 @@
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
MOLECULE MPIIO MSCG OPT PERI POEMS
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK)
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
foreach(PKG ${USER_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
endforeach()

View File

@ -1,40 +1,259 @@
.TH LAMMPS "2018-08-22"
.TH LAMMPS "5 June 2019" "2019-06-05"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
.SH SYNOPSIS
.B lmp
-in in.file
.B lmp
\-in <input file> [OPTIONS] ...
or
mpirun \-np 2
.B lmp
-in in.file
mpirun \-np 2
.B lmp
<input file> [OPTIONS] ...
or
.B lmp
\-r2data file.restart file.data
.SH DESCRIPTION
.B LAMMPS
LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale
Atomic/Molecular Massively Parallel Simulator. LAMMPS has potentials for soft
materials (biomolecules, polymers) and solid-state materials (metals,
semiconductors) and coarse-grained or mesoscopic systems. It can be used to
model atoms or, more generically, as a parallel particle simulator at the
.B LAMMPS
is a classical molecular dynamics code, and an acronym for \fBL\fRarge-scale
\fBA\fRtomic/\fBM\fRolecular \fBM\fRassively \fBP\fRarallel \fBS\fRimulator.
.B LAMMPS
has potentials for soft
materials (bio-molecules, polymers) and solid-state materials (metals,
semiconductors) and coarse-grained or mesoscopic systems. It can be used to
model atoms or, more generically, as a parallel particle simulator at the
atomic, meso, or continuum scale.
See http://lammps.sandia.gov/ for documentation.
See https://lammps.sandia.gov/ for more information and documentation.
.SH EXECUTABLE NAME
The
.B LAMMPS
executable can have different names depending on how it was configured,
compiled and installed. It will be either
.B lmp
or
.B lmp_<machine name>.
The <machine name> suffix corresponds to the (machine specific) makefile
used to compile
.B LAMMPS
when using the conventional build process. When building
.B LAMMPS
using
.B CMake
this <machine name> parameter can be chosen arbitrarily at configuration
time, but more common is to just use
.B lmp
without a suffix. In this manpage we will use
.B lmp
to represent any of those names.
.SH OPTIONS
See https://lammps.sandia.gov/doc/Run_options.html for details on
command-line options.
.SH COPYRIGHT
© 2003--2018 Sandia Corporation
.TP
\fB\-h\fR or \fB\-help\fR
Print a brief help summary and a list of settings and options compiled
into this executable. It also explicitly lists all LAMMPS styles
(atom_style, fix, compute, pair_style, bond_style, etc) available in
the specific executable. This can tell you if the command you want to
use was included via the appropriate package at compile time.
LAMMPS will print the info and immediately exit if this switch is used.
.TP
\fB\-e\fR or \fB\-echo\fR
Set the style of command echoing. The style can be
.B none
or
.B screen
or
.B log
or
.B both.
Depending on the style, each command read from the input script will
be echoed to the screen and/or logfile. This can be useful to figure
out which line of your script is causing an input error.
The default value is
.B log.
.TP
\fB\-i <input file>\fR or \fB\-in <input file>\fR
Specify a file to use as an input script. If it is not specified,
LAMMPS reads its script from standard input. This is a required
switch when running LAMMPS in multi-partition mode.
.TP
\fB\-k on/off [keyword value]\fR or \fB\-kokkos on/off [keyword value]\fR
Enable or disable general KOKKOS support, as provided by the KOKKOS
package. Even if LAMMPS is built with this package, this switch must
be set to \fBon\fR to enable running with KOKKOS-enabled styles. More
details on this switch and its optional keyword value pairs are discussed
at: https://lammps.sandia.gov/doc/Run_options.html
.TP
\fB\-l <log file>\fR or \fB\-log <log file>\fR
Specify a log file for LAMMPS to write status information to.
The default value is "log.lammps". If the file name "none" is used,
\fBLAMMPS\fR will not write a log file. In multi-partition mode only
some high-level all-partition information is written to the "<log file>"
file, the remainder is written in a per-partition file "<log file>.N"
with "N" being the respective partition number, unless overridden
by the \-plog flag (see below).
.TP
\fB\-m <number>\fR or \fB\-mpicolor <number>\fR
If used, this must be the first command-line argument after the
.B LAMMPS
executable name. It is only used when
.B LAMMPS
is launched by an mpirun command which also launches one or more
other executable(s) at the same time.
.B LAMMPS
and the other executable(s) perform an MPI_Comm_split(), each with
their own different colors, to split the MPI_COMM_WORLD communicator
for each executable to the subset of processors they are supposed to
be actually running on. Currently, this is only used in
.B LAMMPS
to perform client/server messaging with another application.
.B LAMMPS
can act as either a client or server (or both).
.TP
\fB\-nc\fR or \fB\-nocite\fR
Disable writing the "log.cite" file which is normally written to
list references for specific cite-able features used during a
.B LAMMPS
run.
.TP
\fB\-pk <style> [options]\fR or \fB\-package <style> [options]\fR
Invoke the \fBpackage\R command with <style> and optional arguments.
The syntax is the same as if the command appeared in an input script.
For example "-pk gpu 2" is the same as "package gpu 2" in the input
script. The possible styles and options are discussed in the
.B LAMMPS
manual for the "package" command. This switch can be used multiple
times, e.g. to set options for the USER-INTEL and USER-OMP packages
when used together. Along with the "-sf" or "-suffix" switch, this
is a convenient mechanism for invoking accelerator packages and their
options without having to edit an input script.
.TP
\fB\-p\fR or \fB\-partition\fR
Invoke
.B LAMMPS
in multi-partition mode. Without this,
.B LAMMPS
uses all P processors allocated via MPI to run a single simulation.
If this switch is used, the P processors are split into separate
partitions and each partition runs its own simulation. The arguments
to the switch specify the number of processors in each partition.
Arguments of the form "MxN" mean M partitions, each with N processors.
Arguments of the form "N" mean a single partition with N processors.
The sum of processors in all partitions must be equal P. Thus the
command “-partition 8x2 4 5” has 10 partitions and runs on a total
of 25 processors. Running with multiple partitions is required for
multi-replica simulations, where each replica runs on on one or more
few processors.
.TP
\fB\-pl <basename>\fR or \fB\-plog <basename>\fR
Specify the base name for the per-partition log files in multi-partition
runs, where partition N writes log information to <basename>.N.
If basename is set to "none", then no per-partition log files are created.
This overrides the name specified in the \-log command-line option.
.TP
\fB\-ps <basename>\fR or \fB\-pscreen <basename>\fR
Specify the base name for the per-partition screen files in multi-partition
runs, where partition N writes screen output to <basename>.N.
If basename is set to "none", then no per-partition screen files are created.
The default value is "screen" or whatever is set by the \-screen flag.
.TP
\fB\-r2data <restart file> [remap] <data file>\fR or
\fB\-restart2data <restart file> [remap] <data file>\fR
Convert <restart file> previously written by
.B LAMMPS
into a data file and immediately exit. This option has replaced the
external restart2data executable. Following <restart file>
argument, the optional word "remap" may be used. This has the
same effect like adding it to a "read_restart" command.
The syntax following the <data file> name is identical to the
arguments of the "write_data" command. See the
.B LAMMPS
manual for details on either of the two commands.
.TP
\fB\-r2dump <restart file> [remap] <dump file>\fR or
\fB\-restart2dump <restart file> [remap] <dump file>\fR
Convert <restart file> previously written by
.B LAMMPS
into a dump file and immediately exit. Following <restart file>
argument, the optional word "remap" may be used. This has the
same effect like adding it to a "read_restart" command.
The syntax following the <dump file> name is identical to the
arguments of the "dump" command. See the
.B LAMMPS
manual for details on either of the two commands.
.TP
\fB\-sc <file name>\fR or \fB\-screen <file name>\fR
Specify a file for
.B LAMMPS
to write its screen information to. By default, this will be
the standard output. If <file name> is "none", (most) screen
output will be suppressed. In multi-partition mode only
some high-level all-partition information is written to the
screen or "<file name>" file, the remainder is written in a
per-partition file "screen.N" or "<file name>.N"
with "N" being the respective partition number, and unless
overridden by the \-pscreen flag (see above).
.TP
\fB\-sf <suffix>\fR or \fB\-suffix <suffix>\fR
Use variants of various styles in the input, if they exist. This is
achieved by transparently trying to convert a style named <my/style>
into <my/style/suffix> if that latter style exists, but otherwise
fall back to the former. The most useful suffixes are "gpu",
"intel", "kk", "omp", "opt", or "hybrid". These refer to styles from
optional packages that LAMMPS can be built with. The hybrid suffix is
special, as it enables, having two suffixes tried (e.g. first "intel"
and then "omp") and thus requires two arguments. Along with the
"-package" command-line switch, this is a convenient mechanism for
invoking styles from accelerator packages and setting their options
without having to edit an input script.
See https://lammps.sandia.gov/doc/Run_options.html for additional
details and discussions on command-line options.
.SH LAMMPS BASICS
LAMMPS executes by reading commands from a input script (text file),
one line at a time. When the input script ends, LAMMPS exits. Each
command causes LAMMPS to take some action. It may set or change an
internal, read and parse a file, or run a simulation. Most commands
have default settings, which means you only need to use the command
if you wish to change the default.
The ordering of commands in an input script is usually not very important
unless a command like "run" is encountered, which starts some calculation
using the current internal state. Also, if a "pair_style" or "bond_style"
other similar style command is issued that has a different name from what
was previously active, it will replace the previous style and wipe out
all corresponding "pair_coeff" or "bond_coeff" or equivalent settings.
Some commands are only valid when they follow other commands. For
example you cannot set the temperature of a group of atoms until atoms
have been defined and a group command is used to define which atoms
belong to the group of a given name. Sometimes command B will use values
that can be set by command A. This means command A must precede command
B in the input to have the desired effect. Some commands must be issued
.B before
the simulation box is defined and others can only be issued
.B after.
Many input script errors are detected by
.B LAMMPS
and an ERROR or WARNING message is printed. The documentation for
each command lists restrictions on how the command can be used, and
the chapter on errors in the
.B LAMMPS
manual gives some additional information about error messages, if possible.
.SH COPYRIGHT
© 2003--2019 Sandia Corporation
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

111
doc/msi2lmp.1 Normal file
View File

@ -0,0 +1,111 @@
.TH MSI2LMP "v3.9.9" "2018-11-05"
.SH NAME
.B MSI2LMP
\- Converter for Materials Studio files to LAMMPS
.SH SYNOPSIS
.B msi2lmp
<ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
.SH DESCRIPTION
.PP
.B MSI2LMP
is a tool bundled with LAMMPS to aide in the conversion of simulation
inputs from Biovia's Materials Studio software for use with LAMMPS.
It is a standalone program that generates a LAMMPS data file based on
the information in an MS .car file (atom coordinates), an .mdf file
(molecular topology and atom types) and an .frc (forcefield parameters)
file. The .car and .mdf files are specific to a molecular system while
the .frc file is specific to a forcefield (variant). The only coherency
needed between .frc and .car/.mdf files are the atom types.
.PP
.SH OPTIONS
.TP
\fB\<ROOTNAME>\fR
This has to be the first argument and is a
.B mandatory
argument. It defines the root of the file names; i.e. for a
.B <ROOTNAME>
of benzene, you have to provide the files 'benzene.car' and 'benzene.mdf'
in the current working directory.
.B msi2lmp
will then read and process those files according to its remaining settings.
All other settins are optional and have defaults as listed.
.TP
\fB\-c <I,1,II,2,O,0>\fR, \fB\-class <I,1,II,2,O,0>\fR
The \-c or \-class option selects the force field class, i.e which pair
styles and bond styles and so on are required in the LAMMPS input file.
Class I or class 1 uses similar combination of functional forms as Amber
and Charmm force field and support the force fields
.B cvff
and
.B clayff.
Class II or class 2 corresponds to the more complex force fields
.B COMPASS
and
.B pcff.
Class O or class 0 finally is an experimental and incomplete extension
and supports generating output for
.B OPLS-AA
.TP
\fB\-f <ffname>\fR, \fB\-frc <ffname>\fR
The \-c or \-frc option allows the selection of the force field parameter
file
.B<ffname>.frc.
Valid names for <ffname> with this distribution are: cvff, clayff, cvff_aug,
pcff, compass_published, cff91, and oplsaa. If the argument is a pathname,
i.e. it starts with a '.' or a '/', then this absolute path is used to read
the force field, otherwise
.B msi2lmp
will look in the folder pointed to by the environment variable
$MSI2LMP_LIBRARY. If the variable is not set, then it will look in the current
directory. The extension '.frc' is appended, if missing.
Default is to look for the cvff.frc force field file.
.TP
\fB\-p <loglevel>\fR, \fB\-print <loglevel>\fR,
Selects the amount of information messages about the progress of the
conversion printed to the screen.
.B <loglevel>
can be a number from 0 (silent except for errors) to 3 (very detailed).
.TP
\fB\-i\fR, \fB\-ignore\fR,
Ignore errors about missing parameters and use 0.0 for the respective
force constants making these no-ops. Is correct to be used for a few
molecules and settings, but often an indication, that either the atom
type assignment have errors, or the force field file is missing entries.
.TP
\fB\-n\fR, \fB\-nocenter\fR,
Do not center the box around the (geometrical) center of the atoms,
but around the origin. Default is to recenter.
.TP
\fB\-o\fR, \fB\-oldstyle\fR,
Write out a data file without style hint comments to be compatible
with old LAMMPS versions. Default is to write out those comments.
.TP
\fB-s <x> <y> <z>\fR, \fB-shift <x> <y> <z>\fR,
Shift the entire system (box and coordinates) by a vector
(default: 0.0 0.0 0.0).
.TP
.SH EXAMPLES
msi2lmp benzene -c 2 -p 1 -f ../frc_files/pcff.frc
msi2lmp benzene-class1 -c I
msi2lmp decane -c 0 -f oplsaa
.SH COPYRIGHT
© 2003--2019 Sandia Corporation
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

View File

@ -28,7 +28,7 @@ Makefile(s). Example:
cd lammps # change to the LAMMPS distribution directory
mkdir build; cd build # create a new directory (folder) for build
cmake ../cmake \[options ...\] # configuration with (command-line) cmake
cmake \[options ...\] ../cmake # configuration with (command-line) cmake
make # compilation :pre
The cmake command will detect available features, enable selected
@ -41,7 +41,8 @@ If your machine has multiple CPU cores (most do these days), using a
command like "make -jN" (with N being the number of available local
CPU cores) can be much faster. If you plan to do development on
LAMMPS or need to re-compile LAMMPS repeatedly, installation of the
ccache (= Compiler Cache) software may speed up compilation even more.
ccache (= Compiler Cache) software may speed up repeated compilation
even more.
After compilation, you can optionally copy the LAMMPS executable and
library into your system folders (by default under $HOME/.local) with:
@ -108,7 +109,8 @@ command-line options. Several useful ones are:
-D CMAKE_BUILD_TYPE=type # type = Release or Debug
-G output # style of output CMake generates
-DVARIABLE=value # setting for a LAMMPS feature to enable
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir :pre
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir
-C path/to/preset/file # load some CMake settings before configuring :pre
All the LAMMPS-specific -D variables that a LAMMPS build supports are
described on the pages linked to from the "Build"_Build.html doc page.

View File

@ -30,7 +30,6 @@ This is the list of packages that may require additional steps.
"KIM"_#kim,
"KOKKOS"_#kokkos,
"LATTE"_#latte,
"MEAM"_#meam,
"MESSAGE"_#message,
"MSCG"_#mscg,
"OPT"_#opt,
@ -82,17 +81,19 @@ which GPU hardware to build for.
[CMake build]:
-D GPU_API=value # value = opencl (default) or cuda
-D GPU_PREC=value # precision setting
# value = double or mixed (default) or single
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is Cuda-compiler dependent, but typically sm_20
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
# enables CUDA Performance Primitives Optimizations
# yes (default) or no :pre
-D GPU_API=value # value = opencl (default) or cuda
-D GPU_PREC=value # precision setting
# value = double or mixed (default) or single
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is Cuda-compiler dependent, but typically sm_20
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
# enables CUDA Performance Primitives Optimizations
# value = yes (default) or no
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
# value = yes or no (default) :pre
GPU_ARCH settings for different GPU hardware is as follows:
@ -245,7 +246,10 @@ Maxwell50 = NVIDIA Maxwell generation CC 5.0
Maxwell52 = NVIDIA Maxwell generation CC 5.2
Maxwell53 = NVIDIA Maxwell generation CC 5.3
Pascal60 = NVIDIA Pascal generation CC 6.0
Pascal61 = NVIDIA Pascal generation CC 6.1 :ul
Pascal61 = NVIDIA Pascal generation CC 6.1
Volta70 = NVIDIA Volta generation CC 7.0
Volta72 = NVIDIA Volta generation CC 7.2
Turing75 = NVIDIA Turing generation CC 7.5 :ul
[CMake build]:
@ -346,49 +350,6 @@ the compiler you use on your system to build LATTE.
:line
MEAM package :h4,link(meam)
NOTE: the use of the MEAM package is discouraged, as it has been
superseded by the USER-MEAMC package, which is a direct translation of
the Fortran code in the MEAM library to C++. The code in USER-MEAMC
should be functionally equivalent to the MEAM package, fully supports
use of "pair_style hybrid"_pair_hybrid.html (the MEAM package does
not), and has optimizations that make it significantly faster than the
MEAM package.
[CMake build]:
No additional settings are needed besides "-D PKG_MEAM=yes".
[Traditional make]:
Before building LAMMPS, you must build the MEAM library in lib/meam.
You can build the MEAM library manually if you prefer; follow the
instructions in lib/meam/README. You can also do it in one step from
the lammps/src dir, using a command like these, which simply invoke
the lib/meam/Install.py script with the specified args:
make lib-meam # print help message
make lib-meam args="-m mpi" # build with default Fortran compiler compatible with your MPI library
make lib-meam args="-m serial" # build with compiler compatible with "make serial" (GNU Fortran)
make lib-meam args="-m ifort" # build with Intel Fortran compiler using Makefile.ifort :pre
NOTE: You should test building the MEAM library with both the Intel
and GNU compilers to see if a simulation runs faster with one versus
the other on your system.
The build should produce two files: lib/meam/libmeam.a and
lib/meam/Makefile.lammps. The latter is copied from an existing
Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with
Fortran (MEAM library). Typically the two compilers used for LAMMPS
and the MEAM library need to be consistent (e.g. both Intel or both
GNU compilers). If necessary, you can edit/create a new
lib/meam/Makefile.machine file for your system, which should define an
EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine
file.
:line
MESSAGE package :h4,link(message)
This package can optionally include support for messaging via sockets,
@ -857,23 +818,34 @@ file.
USER-INTEL package :h4,link(user-intel)
To build with this package, you must choose which hardware you want to
build for, either Intel CPUs or Intel KNLs. You should also typically
"install the USER-OMP package"_#user-omp, as it can be used in tandem
with the USER-INTEL package to good effect, as explained on the "Speed
intel"_Speed_intel.html doc page.
build for, either x86 CPUs or Intel KNLs in offload mode. You should
also typically "install the USER-OMP package"_#user-omp, as it can be
used in tandem with the USER-INTEL package to good effect, as explained
on the "Speed intel"_Speed_intel.html doc page.
[CMake build]:
-D INTEL_ARCH=value # value = cpu (default) or knl
-D BUILD_OMP=yes # also required to build with the USER-INTEl package :pre
-D INTEL_LRT_MODE=value # value = threads, none, or c++11 :pre
Requires an Intel compiler as well as the Intel TBB and MKL libraries.
In Long-range thread mode (LRT) a modified verlet style is used, that
operates the Kspace calculation in a separate thread concurrently to
other calculations. This has to be enabled in the "package intel"_package.html
command at runtime. With the setting "threads" it used the pthreads
library, while c++11 will use the built-in thread support of C++11
compilers. The option "none" skips compilation of this feature. The
default is to use "threads" if pthreads is available and otherwise "none".
Best performance is achieved with Intel hardware, Intel compilers, as well as
the Intel TBB and MKL libraries. However, the code also compiles, links, and
runs with other compilers and without TBB and MKL.
[Traditional make]:
Choose which hardware to compile for in Makefile.machine via the
following settings. See src/MAKE/OPTIONS/Makefile.intel_cpu* and
Makefile.knl files for examples.
Makefile.knl files for examples. and src/USER-INTEL/README for
additional information.
For CPUs:

View File

@ -41,7 +41,6 @@ packages:
"KIM"_Build_extras.html#kim,
"KOKKOS"_Build_extras.html#kokkos,
"LATTE"_Build_extras.html#latte,
"MEAM"_Build_extras.html#meam,
"MESSAGE"_Build_extras.html#message,
"MSCG"_Build_extras.html#mscg,
"OPT"_Build_extras.html#opt,
@ -149,26 +148,41 @@ system. Using these files you can enable/disable portions of the
available packages in LAMMPS. If you need a custom preset you can take
one of them as a starting point and customize it to your needs.
cmake -C ../cmake/presets/all_on.cmake \[OPTIONS\] ../cmake | enable all packages
cmake -C ../cmake/presets/all_off.cmake \[OPTIONS\] ../cmake | disable all packages
cmake -C ../cmake/presets/std.cmake \[OPTIONS\] ../cmake | enable standard packages
cmake -C ../cmake/presets/user.cmake \[OPTIONS\] ../cmake | enable user packages
cmake -C ../cmake/presets/std_nolib.cmake \[OPTIONS\] ../cmake | enable standard packages that do not require extra libraries
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake | disable all packages that do not require extra libraries
cmake -C ../cmake/presets/manual_selection.cmake \[OPTIONS\] ../cmake | example of how to create a manual selection of packages :tb(s=|,a=l)
cmake -C ../cmake/presets/all_on.cmake \[OPTIONS\] ../cmake |
enable all packages |
cmake -C ../cmake/presets/all_off.cmake \[OPTIONS\] ../cmake |
disable all packages |
cmake -C ../cmake/presets/minimal.cmake \[OPTIONS\] ../cmake |
enable just a few core packages |
cmake -C ../cmake/presets/most.cmake \[OPTIONS\] ../cmake |
enable most common packages |
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake |
disable packages that do require extra libraries or tools |
cmake -C ../cmake/presets/clang.cmake \[OPTIONS\] ../cmake |
change settings to use the Clang compilers by default |
cmake -C ../cmake/presets/mingw.cmake \[OPTIONS\] ../cmake |
enable all packages compatible with MinGW compilers :tb(c=2,s=|,a=l)
NOTE: Running cmake this way manipulates the variable cache in your
current build directory. You can combine presets and options with
multiple cmake runs.
current build directory. You can combine multiple presets and options
in a single cmake run, or change settings incrementally by running
cmake with new flags.
[Example:]
# build LAMMPS with all "standard" packages which don't
# use libraries and enable GPU package
# build LAMMPS with most commonly used packages, but then remove
# those requiring additional library or tools, but still enable
# GPU package and configure it for using CUDA. You can run.
mkdir build
cd build
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake :pre
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake :pre
# to add another package, say BODY to the previous configuration you can run:
cmake -D PKG_BODY=on . :pre
# to reset the package selection from above to the default of no packages
# but leaving all other settings untouched. You can run:
cmake -C ../cmake/presets/no_all.cmake . :pre
:line
[Make shortcuts for installing many packages]:

View File

@ -57,10 +57,10 @@ FFT_INC = -DFFT_SINGLE # do not specify for double precision
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY :pre
# default is FFT_PACK_ARRAY if not specified
FFT_INC = -I/usr/local/include
FFT_INC = -I/usr/local/include
FFT_PATH = -L/usr/local/lib
FFT_LIB = -lfftw3 # FFTW3 double precision
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
FFT_LIB = -lfftw3 # FFTW3 double precision
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core # MKL with Intel compiler
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # MKL with GNU compier :pre
@ -179,8 +179,11 @@ e.g. from 511 to -512, which can cause diagnostics like the
mean-squared displacement, as calculated by the "compute
msd"_compute_msd.html command, to be faulty.
Note that the USER-ATC package is not currently compatible with the
"bigbig" setting.
Note that the USER-ATC package and the USER-INTEL package are currently
not compatible with the "bigbig" setting. Also, there are limitations
when using the library interface. Some functions with known issues
have been replaced by dummy calls printing a corresponding error rather
than crashing randomly or corrupting data.
Also note that the GPU package requires its lib/gpu library to be
compiled with the same size setting, or the link will fail. A CMake

View File

@ -51,11 +51,10 @@ provides a unix/linux interface to low-level Windows functions, so LAMMPS
can be compiled on Windows. The necessary (minor) modifications to LAMMPS
are included, but may not always up-to-date for recently added functionality
and the corresponding new code. A machine makefile for using cygwin for
the old build system is provided. The CMake build system is untested
for this; you will have to request that makefiles are generated and
manually set the compiler.
the old build system is provided. Using CMake for this mode of compilation
is untested and not likely to work.
When compiling for Windows [not] set the -DLAMMPS_MEMALIGN define
When compiling for Windows do [not] set the -DLAMMPS_MEMALIGN define
in the LMP_INC makefile variable and add -lwsock32 -lpsapi to the linker
flags in LIB makefile variable. Try adding -static-libgcc or -static or
both to the linker flags when your resulting LAMMPS Windows executable
@ -79,7 +78,13 @@ probably the currently best tested and supported way to build LAMMPS
executables for Windows. There are makefiles provided for the
traditional build system, but CMake has also been successfully tested
using the mingw32-cmake and mingw64-cmake wrappers that are bundled
with the cross-compiler environment on Fedora machines.
with the cross-compiler environment on Fedora machines. A CMake preset
selecting all packages compatible with this cross-compilation build
is provided. You likely need to disable the GPU package unless you
download and install the contents of the pre-compiled "OpenCL ICD loader
library"_https://download.lammps.org/thirdparty/opencl-win-devel.tar.gz
into your MinGW64 cross-compiler environment. The cross-compilation
currently will only produce non-MPI serial binaries.
Please keep in mind, though, that this only applies to compiling LAMMPS.
Whether the resulting binaries do work correctly is no tested by the

View File

@ -33,6 +33,11 @@ commands in it are used to define a LAMMPS simulation.
Commands_bond
Commands_kspace
.. toctree::
:maxdepth: 1
Commands_removed
END_RST -->
<!-- HTML_ONLY -->
@ -49,5 +54,7 @@ END_RST -->
"Bond, angle, dihedral, improper commands"_Commands_bond.html
"KSpace solvers"_Commands_kspace.html :all(b)
"Removed commands and packages"_Commands_removed.html :all(b)
<!-- END_HTML_ONLY -->

View File

@ -83,6 +83,7 @@ An alphabetic list of all general LAMMPS commands.
"molecule"_molecule.html,
"ndx2group"_group2ndx.html,
"neb"_neb.html,
"neb/spin"_neb_spin.html,
"neigh_modify"_neigh_modify.html,
"neighbor"_neighbor.html,
"newton"_newton.html,

View File

@ -28,8 +28,12 @@ OPT.
"none"_bond_none.html,
"zero"_bond_zero.html,
"hybrid"_bond_hybrid.html :tb(c=3,ea=c)
"hybrid"_bond_hybrid.html,
,
,
,
,
,
"class2 (ko)"_bond_class2.html,
"fene (iko)"_bond_fene.html,
"fene/expand (o)"_bond_fene_expand.html,
@ -56,8 +60,12 @@ OPT.
"none"_angle_none.html,
"zero"_angle_zero.html,
"hybrid"_angle_hybrid.html :tb(c=3,ea=c)
"hybrid"_angle_hybrid.html,
,
,
,
,
,
"charmm (iko)"_angle_charmm.html,
"class2 (ko)"_angle_class2.html,
"class2/p6"_angle_class2.html,
@ -89,8 +97,12 @@ OPT.
"none"_dihedral_none.html,
"zero"_dihedral_zero.html,
"hybrid"_dihedral_hybrid.html :tb(c=3,ea=c)
"hybrid"_dihedral_hybrid.html,
,
,
,
,
,
"charmm (iko)"_dihedral_charmm.html,
"charmmfsw"_dihedral_charmm.html,
"class2 (ko)"_dihedral_class2.html,
@ -117,8 +129,12 @@ OPT.
"none"_improper_none.html,
"zero"_improper_zero.html,
"hybrid"_improper_hybrid.html :tb(c=3,ea=c)
"hybrid"_improper_hybrid.html,
,
,
,
,
,
"class2 (ko)"_improper_class2.html,
"cossq (o)"_improper_cossq.html,
"cvff (io)"_improper_cvff.html,

View File

@ -116,6 +116,7 @@ Actions:
"minimize"_minimize.html,
"neb"_neb.html,
"neb_spin"_neb_spin.html,
"prd"_prd.html,
"rerun"_rerun.html,
"run"_run.html,

View File

@ -61,6 +61,7 @@ OPT.
"edpd/source"_fix_dpd_source.html,
"efield"_fix_efield.html,
"ehex"_fix_ehex.html,
"electron/stopping"_fix_electron_stopping.html,
"enforce2d (k)"_fix_enforce2d.html,
"eos/cv"_fix_eos_cv.html,
"eos/table"_fix_eos_table.html,
@ -106,6 +107,7 @@ OPT.
"mvv/edpd"_fix_mvv_dpd.html,
"mvv/tdpd"_fix_mvv_dpd.html,
"neb"_fix_neb.html,
"neb_spin"_fix_neb_spin.html,
"nph (ko)"_fix_nh.html,
"nph/asphere (o)"_fix_nph_asphere.html,
"nph/body"_fix_nph_body.html,

View File

@ -27,8 +27,11 @@ OPT.
"none"_pair_none.html,
"zero"_pair_zero.html,
"hybrid (k)"_pair_hybrid.html,
"hybrid/overlay (k)"_pair_hybrid.html :tb(c=4,ea=c)
"hybrid/overlay (k)"_pair_hybrid.html,
,
,
,
,
"adp (o)"_pair_adp.html,
"agni (o)"_pair_agni.html,
"airebo (io)"_pair_airebo.html,
@ -80,6 +83,8 @@ OPT.
"dpd/fdt/energy (k)"_pair_dpd_fdt.html,
"dpd/tstat (go)"_pair_dpd.html,
"dsmc"_pair_dsmc.html,
"e3b"_pair_e3b.html,
"drip"_pair_drip.html,
"eam (gikot)"_pair_eam.html,
"eam/alloy (gikot)"_pair_eam.html,
"eam/cd (o)"_pair_eam.html,
@ -98,6 +103,7 @@ OPT.
"gran/hertz/history (o)"_pair_gran.html,
"gran/hooke (o)"_pair_gran.html,
"gran/hooke/history (ko)"_pair_gran.html,
"granular"_pair_granular.html,
"gw"_pair_gw.html,
"gw/zbl"_pair_gw.html,
"hbond/dreiding/lj (o)"_pair_hbond_dreiding.html,

View File

@ -0,0 +1,66 @@
"Higher level section"_Commands.html - "LAMMPS WWW Site"_lws - "LAMMPS
Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands.html)
:line
Removed commands and packages :h3
This page lists LAMMPS commands and packages that have been removed from
the distribution and provides suggestions for alternatives or replacements.
LAMMPS has special dummy styles implemented, that will stop LAMMPS and
print a suitable error message in most cases, when a style/command is used
that has been removed.
Fix ave/spatial and fix ave/spatial/sphere :h4
The fixes ave/spatial and ave/spatial/sphere have been removed from LAMMPS
since they were superseded by the more general and extensible "chunk
infrastructure". Here the system is partitioned in one of many possible
ways through the "compute chunk/atom"_compute_chunk_atom.html command
and then averaging is done using "fix ave/chunk"_fix_ave_chunk.html.
Please refer to the "chunk HOWTO"_Howto_chunk.html section for an overview.
MEAM package :h4
The MEAM package has been removed since it was superseded by the
"USER-MEAMC package"_Package_details.html#PKG-USER-MEAMC. The code in
the USER-MEAMC package is a translation of the Fortran code of MEAM into C++,
which removes several restrictions (e.g. there can be multiple instances
in hybrid pair styles) and allows for some optimizations leading
to better performance. The new pair style "meam/c"_pair_meamc.html has
the exact same syntax as the old "meam" pair style and thus pair style
"meam"_pair_meamc.html is an alias to the new style and backward
compatibility of old inputs is preserved.
REAX package :h4
The REAX package has been removed since it was superseded by the
"USER-REAXC package"_Package_details.html#PKG-USER-REAXC. The USER-REAXC
package has been tested to yield equivalent results to the REAX package,
offers better performance, supports OpenMP multi-threading via USER-OMP,
and GPU and threading parallelization through KOKKOS. The new pair styles
are not syntax compatible with the removed reax pair style, so input
files will have to be adapted.
USER-CUDA package :h4
The USER-CUDA package had been removed, since it had been unmaintained
for a long time and had known bugs and problems. Significant parts of
the design were transferred to the
"KOKKOS package"_Package_details.html#PKG-KOKKOS, which has similar
performance characteristics on Nvidia GPUs. Both, the KOKKOS
and the "GPU package"_Package_details.html#PKG-GPU are maintained
and allow running LAMMPS with GPU acceleration.
restart2data tool :h4
The functionality of the restart2data tool has been folded into the
LAMMPS executable directly instead of having a separate tool. A
combination of the commands "read_restart"_read_restart.html and
"write_data"_write_data.html can be used to the same effect. For added
convenience this conversion can also be triggered by "command line
flags"_Run_options.html

BIN
doc/src/Eqs/e3b.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

15
doc/src/Eqs/e3b.tex Normal file
View File

@ -0,0 +1,15 @@
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
E =& E_2 \sum_{i,j}e^{-k_2 r_{ij}} + E_A \sum_{\substack{i,j,k,\ell \\\in \textrm{type A}}} f(r_{ij})f(r_{k\ell}) + E_B \sum_{\substack{i,j,k,\ell \\\in \textrm{type B}}} f(r_{ij})f(r_{k\ell}) + E_C \sum_{\substack{i,j,k,\ell \\\in \textrm{type C}}} f(r_{ij})f(r_{k\ell}) \\
f(r) =& e^{-k_3 r}s(r) \\
s(r) =& \begin{cases}
1 & r<R_s \\
\displaystyle\frac{(R_f-r)^2(R_f-3R_s+2r)}{(R_f-R_s)^3} & R_s\leq r\leq R_f \\
0 & r>R_f\\
\end{cases}
\end{align*}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,21 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb,amsthm,bm}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\bm{H}_{cubic} = -\sum_{{ i}=1}^{N} K_{1}
\Big[
\left(\vec{s}_{i} \cdot \vec{n1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n2} \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n2} \right)^2
\left(\vec{s}_{i} \cdot \vec{n3} \right)^2 +
\left(\vec{s}_{i} \cdot \vec{n1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n3} \right)^2 \Big]
+K_{2}^{(c)} \left(\vec{s}_{i} \cdot \vec{n1} \right)^2
\left(\vec{s}_{i} \cdot \vec{n2} \right)^2
\left(\vec{s}_{i} \cdot \vec{n3} \right)^2 \nonumber
\end{equation}
\end{varwidth}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -0,0 +1,15 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amssymb, graphics, setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\omega_i^{\nu} =
(\nu - 1) \Delta \omega_i
{\rm ~~and~~} \Delta \omega_i = \frac{\omega_i}{Q-1}
, \nonumber
\end{equation}
\end{varwidth}
\end{document}

BIN
doc/src/Eqs/neb_spin_k.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -0,0 +1,16 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amssymb, graphics, setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\vec{k}_i =
\frac{\vec{m}_i^I \times \vec{m}_i^F}{\left|\vec{m}_i^I
\times \vec{m}_i^F\right|}
%&{\rm ~if~}& \vec{m}_i^I \times \vec{m}_i^F
, \nonumber
\end{equation}
\end{varwidth}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,16 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amssymb, graphics, setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\vec{m}_i^{\nu} = \vec{m}_i^{I} \cos(\omega_i^{\nu})
+ (\vec{k}_i \times \vec{m}_i^{I}) \sin(\omega_i^{\nu})
+ (1.0-\cos(\omega_i^{\nu})) \vec{k}_i (\vec{k}_i\cdot
\vec{m}_i^{I})
, \nonumber
\end{equation}
\end{varwidth}
\end{document}

BIN
doc/src/Eqs/pair_drip.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

14
doc/src/Eqs/pair_drip.tex Normal file
View File

@ -0,0 +1,14 @@
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{bm}
\begin{document}
\begin{eqnarray*}
E &=& \frac{1}{2} \sum_{i} \sum_{j\notin\text{layer}\,i} \phi_{ij} \\\phi_{ij} &=& f_\text{c}(x_r) \left[ e^{-\lambda(r_{ij} - z_0 )} \left[C+f(\rho_{ij})+ g(\rho_{ij}, \{\alpha_{ij}^{(m)}\}) \right]- A\left (\frac{z_0}{r_{ij}} \right)^6 \right] \\
\end{eqnarray*}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,9 +1,9 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E(r) = \frac{A}{r^{12}} - \frac{A}{r^{6}}
E(r) = \frac{A}{r^{12}} - \frac{B}{r^{6}}
$$
\end{document}

View File

@ -610,6 +610,62 @@ This means there is something invalid about the topology definitions. :dd
The data file header lists bonds but no bond types. :dd
{Bond/react: Cannot use fix bond/react with non-molecular systems} :dt
Only systems with bonds that can be changed can be used. Atom_style
template does not qualify. :dd
{Bond/react: Rmax cutoff is longer than pairwise cutoff} :dt
This is not allowed because bond creation is done using the pairwise
neighbor list. :dd
{Bond/react: Molecule template ID for fix bond/react does not exist} :dt
A valid molecule template must have been created with the molecule
command. :dd
{Bond/react: Reaction templates must contain the same number of atoms} :dt
There should be a one-to-one correspondence between atoms in the
pre-reacted and post-reacted templates, as specified by the map file. :dd
{Bond/react: Unknown section in map file} :dt
Please ensure reaction map files are properly formatted. :dd
{Bond/react: Atom affected by reaction too close to template edge} :dt
This means an atom which changes type during the reaction is too close
to an 'edge' atom defined in the superimpose file. This could cause
incorrect assignment of bonds, angle, etc. Generally, this means you
must include more atoms in your templates, such that there are at
least two atoms between each atom involved in the reaction and an edge
atom. :dd
{Bond/react: Fix bond/react needs ghost atoms from farther away} :dt
This is because a processor needs to superimpose the entire unreacted
molecule template onto simulation atoms it knows about. The
comm_modify cutoff command can be used to extend the communication
range. :dd
{Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted} :dt
Self-explanatory. :dd
{Bond/react special bond generation overflow} :dt
The number of special bonds per-atom created by a reaction exceeds the
system setting. See the read_data or create_box command for how to
specify this value. :dd
{Bond/react topology/atom exceed system topology/atom} :dt
The number of bonds, angles etc per-atom created by a reaction exceeds
the system setting. See the read_data or create_box command for how to
specify this value. :dd
{Both restart files must use % or neither} :dt
Self-explanatory. :dd
@ -5828,6 +5884,12 @@ Must have periodic x,y dimensions and non-periodic z dimension to use
Must have periodic x,y dimensions and non-periodic z dimension to use
2d slab option with pppm/disp. :dd
{Incorrect conversion in format string} :dt
A format style variable was not using either a %f, a %g, or a %e conversion.
Or an immediate variable with format suffix was not using either
a %f, a %g or a %e conversion in the format suffix. :dd
{Incorrect element names in ADP potential file} :dt
The element names in the ADP file do not match those requested. :dd
@ -7035,6 +7097,18 @@ Self-explanatory. :dd
One or more GPUs must be used when Kokkos is compiled for CUDA. :dd
{Kspace_modify mesh parameter must be all zero or all positive} :dt
Valid kspace mesh parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero (the default). :dd
{Kspace_modify mesh/disp parameter must be all zero or all positive} :dt
Valid kspace mesh/disp parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero [and]
the required accuracy via {force/disp/real} as well as
{force/disp/kspace} is set. :dd
{Kspace style does not support compute group/group} :dt
Self-explanatory. :dd
@ -7448,6 +7522,11 @@ The Atoms section of a data file must come before a Triangles section. :dd
The Atoms section of a data file must come before a Velocities
section. :dd
{Must re-specify non-restarted pair style (xxx) after read_restart} :dt
For pair styles, that do not store their settings in a restart file,
it must be defined with a new 'pair_style' command after read_restart. :dd
{Must set both respa inner and outer} :dt
Cannot use just the inner or outer option with respa without using the
@ -9990,25 +10069,25 @@ quote. :dd
Self-explanatory. :dd
{Unexpected end of AngleCoeffs section} :dt
{Unexpected empty line in AngleCoeffs section} :dt
Read a blank line. :dd
Read a blank line where there should be coefficient data. :dd
{Unexpected end of BondCoeffs section} :dt
{Unexpected empty line in BondCoeffs section} :dt
Read a blank line. :dd
Read a blank line where there should be coefficient data. :dd
{Unexpected end of DihedralCoeffs section} :dt
{Unexpected empty line in DihedralCoeffs section} :dt
Read a blank line. :dd
Read a blank line where there should be coefficient data. :dd
{Unexpected end of ImproperCoeffs section} :dt
{Unexpected empty line in ImproperCoeffs section} :dt
Read a blank line. :dd
Read a blank line where there should be coefficient data. :dd
{Unexpected end of PairCoeffs section} :dt
{Unexpected empty line in PairCoeffs section} :dt
Read a blank line. :dd
Read a blank line where there should be coefficient data. :dd
{Unexpected end of custom file} :dt
@ -10049,19 +10128,19 @@ create_box command. :dd
A universe or uloop style variable must specify a number of values >= to the
number of processor partitions. :dd
{Unknown angle style} :dt
{Unrecognized angle style} :dt
The choice of angle style is unknown. :dd
{Unknown atom style} :dt
{Unrecognized atom style} :dt
The choice of atom style is unknown. :dd
{Unknown body style} :dt
{Unrecognized body style} :dt
The choice of body style is unknown. :dd
{Unknown bond style} :dt
{Unrecognized bond style} :dt
The choice of bond style is unknown. :dd
@ -10077,23 +10156,23 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Unknown command: %s} :dt
{Unrecognized command: %s} :dt
The command is not known to LAMMPS. Check the input script. :dd
{Unknown compute style} :dt
{Unrecognized compute style} :dt
The choice of compute style is unknown. :dd
{Unknown dihedral style} :dt
{Unrecognized dihedral style} :dt
The choice of dihedral style is unknown. :dd
{Unknown dump reader style} :dt
{Unrecognized dump reader style} :dt
The choice of dump reader style via the format keyword is unknown. :dd
{Unknown dump style} :dt
{Unrecognized dump style} :dt
The choice of dump style is unknown. :dd
@ -10101,7 +10180,7 @@ The choice of dump style is unknown. :dd
Self-explanatory. :dd
{Unknown fix style} :dt
{Unrecognized fix style} :dt
The choice of fix style is unknown. :dd
@ -10109,7 +10188,7 @@ The choice of fix style is unknown. :dd
A section of the data file cannot be read by LAMMPS. :dd
{Unknown improper style} :dt
{Unrecognized improper style} :dt
The choice of improper style is unknown. :dd
@ -10117,7 +10196,7 @@ The choice of improper style is unknown. :dd
One or more specified keywords are not recognized. :dd
{Unknown kspace style} :dt
{Unrecognized kspace style} :dt
The choice of kspace style is unknown. :dd
@ -10133,7 +10212,7 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Unknown pair style} :dt
{Unrecognized pair style} :dt
The choice of pair style is unknown. :dd
@ -10141,7 +10220,7 @@ The choice of pair style is unknown. :dd
The choice of sub-style is unknown. :dd
{Unknown region style} :dt
{Unrecognized region style} :dt
The choice of region style is unknown. :dd

View File

@ -82,6 +82,11 @@ bond/angle/dihedral. LAMMPS computes this by taking the maximum bond
length, multiplying by the number of bonds in the interaction (e.g. 3
for a dihedral) and adding a small amount of stretch. :dd
{Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type} :dt
You may want to double-check that all atom types are properly assigned
in the post-reaction template. :dd
{Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero} :dt
Self-explanatory. :dd

View File

@ -11,7 +11,7 @@ Section"_Tools.html :c
Example scripts :h3
The LAMMPS distribution includes an examples sub-directory with many
sample problems. Many are 2d models that run quickly are are
sample problems. Many are 2d models that run quickly and are
straightforward to visualize, requiring at most a couple of minutes to
run on a desktop machine. Each problem has an input script (in.*) and
produces a log file (log.*) when it runs. Some use a data file
@ -52,13 +52,14 @@ Lowercase directories :h4
accelerate: run with various acceleration options (OpenMP, GPU, Phi)
airebo: polyethylene with AIREBO potential
atm: Axilrod-Teller-Muto potential example
balance: dynamic load balancing, 2d system
body: body particles, 2d system
cmap: CMAP 5-body contributions to CHARMM force field
colloid: big colloid particles in a small particle solvent, 2d system
comb: models using the COMB potential
coreshell: core/shell model using CORESHELL package
controller: use of fix controller as a thermostat
coreshell: core/shell model using CORESHELL package
crack: crack propagation in a 2d solid
deposit: deposit atoms and molecules on a surface
dipole: point dipolar particles, 2d system
@ -70,10 +71,13 @@ friction: frictional contact of spherical asperities between 2d surfaces
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
granregion: use of fix wall/region/gran as boundary on granular particles
hugoniostat: Hugoniostat shock dynamics
hyper: global and local hyperdynamics of diffusion on Pt surface
indent: spherical indenter into a 2d solid
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
latte: examples for using fix latte for DFTB via the LATTE library
meam: MEAM test for SiC and shear (same as shear examples)
melt: rapid melt of 3d LJ system
message: demos for LAMMPS client/server coupling with the MESSAGE package
micelle: self-assembly of small lipid-like molecules into 2d bilayers
min: energy minimization of 2d LJ melt
mscg: parameterize a multi-scale coarse-graining (MSCG) model
@ -88,6 +92,7 @@ pour: pouring of granular particles into a 3d box, then chute flow
prd: parallel replica dynamics of vacancy diffusion in bulk Si
python: using embedded Python in a LAMMPS input script
qeq: use of the QEQ package for charge equilibration
rdf-adf: computing radial and angle distribution functions for water
reax: RDX and TATB models using the ReaxFF
rigid: rigid bodies modeled as independent or coupled
shear: sideways shear applied to 2d solid, with and without a void
@ -95,6 +100,7 @@ snap: NVE dynamics for BCC tantalum crystal using SNAP potential
srd: stochastic rotation dynamics (SRD) particles as solvent
streitz: use of Streitz/Mintmire potential with charge equilibration
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
threebody: regression test input for a variety of manybody potentials
vashishta: use of the Vashishta potential
voronoi: Voronoi tesselation via compute voronoi/atom command :tb(s=:)
@ -131,8 +137,10 @@ COUPLE: examples of how to use LAMMPS as a library
DIFFUSE: compute diffusion coefficients via several methods
ELASTIC: compute elastic constants at zero temperature
ELASTIC_T: compute elastic constants at finite temperature
HEAT: compute thermal conductivity for LJ and water via fix ehex
KAPPA: compute thermal conductivity via several methods
MC: using LAMMPS in a Monte Carlo mode to relax the energy of a system
SPIN: examples for features of the SPIN package
USER: examples for USER packages and USER-contributed commands
VISCOSITY: compute viscosity via several methods :tb(s=:)

View File

@ -148,7 +148,7 @@ END_RST -->
<!-- HTML_ONLY -->
"CHARMM, AMBER, and DREIDING force fields"_Howto_bioFF.html
"CHARMM, AMBER, COMPASS, and DREIDING force fields"_Howto_bioFF.html
"TIP3P water model"_Howto_tip3p.html
"TIP4P water model"_Howto_tip4p.html
"SPC water model"_Howto_spc.html :all(b)

View File

@ -7,29 +7,31 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
:line
CHARMM, AMBER, and DREIDING force fields :h3
CHARMM, AMBER, COMPASS, and DREIDING force fields :h3
A force field has 2 parts: the formulas that define it and the
coefficients used for a particular system. Here we only discuss
formulas implemented in LAMMPS that correspond to formulas commonly
used in the CHARMM, AMBER, and DREIDING force fields. Setting
coefficients is done in the input data file via the
"read_data"_read_data.html command or in the input script with
used in the CHARMM, AMBER, COMPASS, and DREIDING force fields. Setting
coefficients is done either from special sections in an input data file
via the "read_data"_read_data.html command or in the input script with
commands like "pair_coeff"_pair_coeff.html or
"bond_coeff"_bond_coeff.html. See the "Tools"_Tools.html doc page for
additional tools that can use CHARMM or AMBER to assign force field
coefficients and convert their output into LAMMPS input.
"bond_coeff"_bond_coeff.html and so on. See the "Tools"_Tools.html doc
page for additional tools that can use CHARMM, AMBER, or Materials
Studio generated files to assign force field coefficients and convert
their output into LAMMPS input.
See "(MacKerell)"_#howto-MacKerell for a description of the CHARMM force
field. See "(Cornell)"_#howto-Cornell for a description of the AMBER force
field.
field. See "(Cornell)"_#howto-Cornell for a description of the AMBER
force field. See "(Sun)"_#howto-Sun for a description of the COMPASS
force field.
:link(charmm,http://www.scripps.edu/brooks)
:link(amber,http://amber.scripps.edu)
These style choices compute force field formulas that are consistent
with common options in CHARMM or AMBER. See each command's
documentation for the formula it computes.
The interaction styles listed below compute force field formulas that
are consistent with common options in CHARMM or AMBER. See each
command's documentation for the formula it computes.
"bond_style"_bond_harmonic.html harmonic
"angle_style"_angle_charmm.html charmm
@ -44,28 +46,54 @@ documentation for the formula it computes.
"special_bonds"_special_bonds.html charmm
"special_bonds"_special_bonds.html amber :ul
NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were
released in March 2017. We recommend they be used instead of the
older {charmm} styles. See discussion of the differences on the "pair
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html
doc pages.
NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were released
in March 2017. We recommend they be used instead of the older {charmm}
styles. See discussion of the differences on the "pair
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html doc
pages.
COMPASS is a general force field for atomistic simulation of common
organic molecules, inorganic small molecules, and polymers which was
developed using ab initio and empirical parameterization techniques.
See the "Tools"_Tools.html doc page for the msi2lmp tool for creating
LAMMPS template input and data files from BIOVIA's Materials Studio
files. Please note that the msi2lmp tool is very old and largely
unmaintained, so it does not support all features of Materials Studio
provided force field files, especially additions during the last decade.
You should watch the output carefully and compare results, where
possible. See "(Sun)"_#howto-Sun for a description of the COMPASS force
field.
These interaction styles listed below compute force field formulas that
are consistent with the COMPASS force field. See each command's
documentation for the formula it computes.
"bond_style"_bond_class2.html class2
"angle_style"_angle_class2.html class2
"dihedral_style"_dihedral_class2.html class2
"improper_style"_improper_class2.html class2 :ul
"pair_style"_pair_class2.html lj/class2
"pair_style"_pair_class2.html lj/class2/coul/cut
"pair_style"_pair_class2.html lj/class2/coul/long :ul
"special_bonds"_special_bonds.html lj/coul 0 0 1 :ul
DREIDING is a generic force field developed by the "Goddard
group"_http://www.wag.caltech.edu at Caltech and is useful for
predicting structures and dynamics of organic, biological and
main-group inorganic molecules. The philosophy in DREIDING is to use
general force constants and geometry parameters based on simple
hybridization considerations, rather than individual force constants
and geometric parameters that depend on the particular combinations of
atoms involved in the bond, angle, or torsion terms. DREIDING has an
"explicit hydrogen bond term"_pair_hbond_dreiding.html to describe
interactions involving a hydrogen atom on very electronegative atoms
(N, O, F).
predicting structures and dynamics of organic, biological and main-group
inorganic molecules. The philosophy in DREIDING is to use general force
constants and geometry parameters based on simple hybridization
considerations, rather than individual force constants and geometric
parameters that depend on the particular combinations of atoms involved
in the bond, angle, or torsion terms. DREIDING has an "explicit hydrogen
bond term"_pair_hbond_dreiding.html to describe interactions involving a
hydrogen atom on very electronegative atoms (N, O, F).
See "(Mayo)"_#howto-Mayo for a description of the DREIDING force field
These style choices compute force field formulas that are consistent
with the DREIDING force field. See each command's
The interaction styles listed below compute force field formulas that
are consistent with the DREIDING force field. See each command's
documentation for the formula it computes.
"bond_style"_bond_harmonic.html harmonic
@ -100,6 +128,9 @@ Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
[(Cornell)] Cornell, Cieplak, Bayly, Gould, Merz, Ferguson,
Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995).
:link(howto-Sun)
[(Sun)] Sun, J. Phys. Chem. B, 102, 7338-7364 (1998).
:link(howto-Mayo)
[(Mayo)] Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
(1990).

View File

@ -29,3 +29,5 @@ diffusion coefficient. The instantaneous VACF values can be
accumulated in a vector via the "fix vector"_fix_vector.html command,
and time integrated via the "variable trap"_variable.html function,
and thus extract D.
:line

View File

@ -274,7 +274,7 @@ crash. Even without reaching this extreme case, the correlation
between nearby dipoles on the same molecule may be exaggerated. Often,
special bond relations prevent bonded neighboring atoms to see the
charge of each other's DP, so that the problem does not always appear.
It is possible to use screened dipole dipole interactions by using the
It is possible to use screened dipole-dipole interactions by using the
"{pair_style thole}"_pair_thole.html. This is implemented as a
correction to the Coulomb pair_styles, which dampens at short distance
the interactions between the charges representing the induced dipoles.

View File

@ -166,9 +166,6 @@ void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *)
void lammps_scatter_atoms(void *, char *, int, int, void *)
void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *) :pre
void lammps_create_atoms(void *, int, tagint *, int *, double *, double *,
imageint *, int) :pre
The gather functions collect peratom info of the requested type (atom
coords, atom types, forces, etc) from all processors, and returns the
same vector of values to each calling processor. The scatter
@ -176,6 +173,11 @@ functions do the inverse. They distribute a vector of peratom values,
passed by all calling processors, to individual atoms, which may be
owned by different processors.
IMPORTANT NOTE: These functions are not compatible with the
-DLAMMPS_BIGBIG setting when compiling LAMMPS. Dummy functions
that result in an error message and abort will be substituted
instead of resulting in random crashes and memory corruption.
The lammps_gather_atoms() function does this for all N atoms in the
system, ordered by atom ID, from 1 to N. The
lammps_gather_atoms_concat() function does it for all N atoms, but
@ -196,6 +198,9 @@ those values to each atom in the system. The
lammps_scatter_atoms_subset() function takes a subset of IDs as an
argument and only scatters those values to the owning atoms.
void lammps_create_atoms(void *, int, tagint *, int *, double *, double *,
imageint *, int) :pre
The lammps_create_atoms() function takes a list of N atoms as input
with atom types and coords (required), an optionally atom IDs and
velocities and image flags. It uses the coords of each atom to assign

View File

@ -17,6 +17,7 @@ periodically.
These are the relevant commands:
"neb"_neb.html for nudged elastic band calculations
"neb_spin"_neb_spin.html for magnetic nudged elastic band calculations
"prd"_prd.html for parallel replica dynamics
"tad"_tad.html for temperature accelerated dynamics
"temper"_temper.html for parallel tempering

View File

@ -10,7 +10,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
Magnetic spins :h3
The magnetic spin simulations are enabled by the SPIN package, whose
implementation is detailed in "Tranchida"_#Tranchida7.
implementation is detailed in "Tranchida"_#Tranchida.
The model represents the simulation of atomic magnetic spins coupled
to lattice vibrations. The dynamics of those magnetic spins can be used
@ -36,13 +36,28 @@ A Langevin thermostat can be applied to those magnetic spins using
"fix langevin/spin"_fix_langevin_spin.html. Typically, this thermostat
can be coupled to another Langevin thermostat applied to the atoms
using "fix langevin"_fix_langevin.html in order to simulate
thermostatted spin-lattice system.
thermostatted spin-lattice systems.
The magnetic Gilbert damping can also be applied using "fix
langevin/spin"_fix_langevin_spin.html. It allows to either dissipate
the thermal energy of the Langevin thermostat, or to perform a
relaxation of the magnetic configuration toward an equilibrium state.
The command "fix setforce/spin"_fix_setforce.html allows to set the
components of the magnetic precession vectors (while erasing and
replacing the previously computed magnetic precession vectors on
the atom).
This command can be used to freeze the magnetic moment of certain
atoms in the simulation by zeroing their precession vector.
The command "fix nve/spin"_fix_nve_spin.html can be used to
perform a symplectic integration of the combined dynamics of spins
and atomic motions.
The minimization style "min/spin"_min_spin.html can be applied
to the spins to perform a minimization of the spin configuration.
All the computed magnetic properties can be output by two main
commands. The first one is "compute spin"_compute_spin.html, that
enables to evaluate magnetic averaged quantities, such as the total
@ -54,6 +69,6 @@ magnetic spin, or the magnetic force acting on this spin.
:line
:link(Tranchida7)
:link(Tranchida)
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
arXiv preprint arXiv:1801.10233, (2018).
Journal of Computational Physics, 372, 406-425, (2018).

View File

@ -10,7 +10,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
TIP3P water model :h3
The TIP3P water model as implemented in CHARMM
"(MacKerell)"_#howto-MacKerell specifies a 3-site rigid water molecule with
"(MacKerell)"_#howto-tip3p specifies a 3-site rigid water molecule with
charges and Lennard-Jones parameters assigned to each of the 3 atoms.
In LAMMPS the "fix shake"_fix_shake.html command can be used to hold
the two O-H bonds and the H-O-H angle rigid. A bond style of
@ -60,6 +60,10 @@ models"_http://en.wikipedia.org/wiki/Water_model.
:line
:link(howto-tip3p)
[(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field,
Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
:link(Jorgensen1)
[(Jorgensen)] Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
Phys, 79, 926 (1983).

View File

@ -52,7 +52,7 @@ as if you unpacked a current LAMMPS tarball, with the exception, that
the HTML documentation files are not included. They can be fetched
from the LAMMPS website by typing "make fetch" in the doc directory.
Or they can be generated from the content provided in doc/src by
typing "make html" from the the doc directory.
typing "make html" from the doc directory.
After initial cloning, as bug fixes and new features are added to
LAMMPS, as listed on "this page"_Errors_bugs.html, you can stay

View File

@ -40,7 +40,7 @@ as if you unpacked a current LAMMPS tarball, with the exception, that
the HTML documentation files are not included. They can be fetched
from the LAMMPS website by typing "make fetch" in the doc directory.
Or they can be generated from the content provided in doc/src by
typing "make html" from the the doc directory.
typing "make html" from the doc directory.
After initial checkout, as bug fixes and new features are added to
LAMMPS, as listed on "this page"_Errors_bugs.html, you can stay

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="28 Feb 2019 version">
<META NAME="docnumber" CONTENT="5 Jun 2019 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@ -21,7 +21,7 @@
:line
LAMMPS Documentation :c,h1
28 Feb 2019 version :c,h2
5 Jun 2019 version :c,h2
"What is a LAMMPS version?"_Manual_version.html

View File

@ -209,7 +209,7 @@ available on your system.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#compress on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -359,7 +359,7 @@ developed the pair style.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#kim on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -405,7 +405,7 @@ lib/kokkos.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#kokkos on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -478,7 +478,7 @@ Cawkwell, Anders Niklasson, and Christian Negre.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#latte on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -655,7 +655,7 @@ University of Chicago.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#mscg on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -687,7 +687,7 @@ and Vincent Natoli (Stone Ridge Technolgy).
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#opt on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -707,7 +707,7 @@ PERI package :link(PKG-PERI),h4
An atom style, several pair styles which implement different
Peridynamics materials models, and several computes which calculate
diagnostics. Peridynamics is a a particle-based meshless continuum
diagnostics. Peridynamics is a particle-based meshless continuum
model.
[Authors:] The original package was created by Mike Parks (Sandia).
@ -744,7 +744,7 @@ connections at hinge points.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#poems on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -776,7 +776,7 @@ lib/python/README for more details.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#python on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -906,7 +906,7 @@ SPIN package :link(PKG-SPIN),h4
Model atomic magnetic spins classically, coupled to atoms moving in
the usual manner via MD. Various pair, fix, and compute styles.
[Author:] Julian Tranchida (Sandia).
[Author:] Julien Tranchida (Sandia).
[Supporting info:]
@ -919,6 +919,7 @@ src/SPIN: filenames -> commands
"fix nve/spin"_fix_nve_spin.html
"fix precession/spin"_fix_precession_spin.html
"compute spin"_compute_spin.html
"neb/spin"_neb_spin.html
examples/SPIN :ul
:line
@ -965,7 +966,7 @@ and LBNL.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#voronoi on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1017,7 +1018,7 @@ atomic information to continuum fields.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-atc on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1044,7 +1045,7 @@ model.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-awpmd on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1184,7 +1185,7 @@ Tribello.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-plumed on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1229,7 +1230,7 @@ isothermal, isoenergetic, isobaric and isenthalpic conditions are
included. These enable long timesteps via the Shardlow splitting
algorithm.
[Authors:] Jim Larentzos (ARL), Tim Mattox (Engility Corp), and and John
[Authors:] Jim Larentzos (ARL), Tim Mattox (Engility Corp), and John
Brennan (ARL).
[Supporting info:]
@ -1362,7 +1363,7 @@ H5MD format.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-h5md on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1419,7 +1420,7 @@ NOTE: the USER-INTEL package contains styles that require using the
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-intel on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1556,7 +1557,7 @@ USER-MESO package :link(PKG-USER-MESO),h4
[Contents:]
Several extensions of the the dissipative particle dynamics (DPD)
Several extensions of the dissipative particle dynamics (DPD)
method. Specifically, energy-conserving DPD (eDPD) that can model
non-isothermal processes, many-body DPD (mDPD) for simulating
vapor-liquid coexistence, and transport DPD (tDPD) for modeling
@ -1639,7 +1640,7 @@ at
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-molfile on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1679,7 +1680,7 @@ tools:
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-netcdf on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1723,7 +1724,7 @@ install/un-install the package and build LAMMPS in the usual manner:
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-omp on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1807,7 +1808,7 @@ without changes to LAMMPS itself.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-qmmm on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1865,7 +1866,7 @@ on your system.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-quip on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -1983,7 +1984,7 @@ Dynamics, Ernst Mach Institute, Germany).
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-smd on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
@ -2109,7 +2110,7 @@ system.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#gpu on the "Build
instructions"_Build_extras.html#user-vtk on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]

View File

@ -180,7 +180,7 @@ doubles is returned, one value per atom, which you can use via normal
Python subscripting. The values will be zero for atoms not in the
specified group.
The get_thermo() method returns returns the current value of a thermo
The get_thermo() method returns the current value of a thermo
keyword as a float.
The get_natoms() method returns the total number of atoms in the

View File

@ -79,7 +79,7 @@ stdin.
Explicitly enable or disable KOKKOS support, as provided by the KOKKOS
package. Even if LAMMPS is built with this package, as described
in "Speed kokkos"_Speed_kokkos.html, this switch must be set to enable
running with the KOKKOS-enabled styles the package provides. If the
running with KOKKOS-enabled styles the package provides. If the
switch is not set (the default), LAMMPS will operate as if the KOKKOS
package were not installed; i.e. you can run standard LAMMPS or with
the GPU or USER-OMP packages, for testing or benchmarking purposes.
@ -242,7 +242,7 @@ processors.
Running with multiple partitions can be useful for running
"multi-replica simulations"_Howto_replica.html, where each replica
runs on on one or a few processors. Note that with MPI installed on a
runs on one or a few processors. Note that with MPI installed on a
machine (e.g. your desktop), you can run on more (virtual) processors
than you have physical processors.
@ -448,7 +448,7 @@ partition screen files file.N.
[-suffix style args] :link(suffix)
Use variants of various styles if they exist. The specified style can
be {cuda}, {gpu}, {intel}, {kk}, {omp}, {opt}, or {hybrid}. These
be {gpu}, {intel}, {kk}, {omp}, {opt}, or {hybrid}. These
refer to optional packages that LAMMPS can be built with, as described
in "Accelerate performance"_Speed.html. The "gpu" style corresponds to the
GPU package, the "intel" style to the USER-INTEL package, the "kk"

View File

@ -93,7 +93,7 @@ monitor thread utilization and load balance is provided. A new {Thread
timings} section is also added, which lists the time spent in reducing
the per-thread data elements to the storage for non-threaded
computation. These thread timings are measured for the first MPI rank
only and and thus, because the breakdown for MPI tasks can change from
only and thus, because the breakdown for MPI tasks can change from
MPI rank to MPI rank, this breakdown can be very different for
individual ranks. Here is an example output for this section:

View File

@ -24,7 +24,7 @@ LAMMPS to run on the CPU cores and co-processor cores simultaneously.
Angle Styles: charmm, harmonic :ulb,l
Bond Styles: fene, fourier, harmonic :l
Dihedral Styles: charmm, harmonic, opls :l
Dihedral Styles: charmm, fourier, harmonic, opls :l
Fixes: nve, npt, nvt, nvt/sllod, nve/asphere :l
Improper Styles: cvff, harmonic :l
Pair Styles: airebo, airebo/morse, buck/coul/cut, buck/coul/long,

View File

@ -111,16 +111,10 @@ Makefile.kokkos_mpi_only) will give better performance than the OpenMP
back end (i.e. Makefile.kokkos_omp) because some of the overhead to make
the code thread-safe is removed.
NOTE: The default for the "package kokkos"_package.html command is to
use "full" neighbor lists and set the Newton flag to "off" for both
pairwise and bonded interactions. However, when running on CPUs, it
will typically be faster to use "half" neighbor lists and set the
Newton flag to "on", just as is the case for non-accelerated pair
styles. It can also be faster to use non-threaded communication. Use
the "-pk kokkos" "command-line switch"_Run_options.html to change the
default "package kokkos"_package.html options. See its doc page for
details and default settings. Experimenting with its options can
provide a speed-up for specific calculations. For example:
NOTE: Use the "-pk kokkos" "command-line switch"_Run_options.html to
change the default "package kokkos"_package.html options. See its doc
page for details and default settings. Experimenting with its options
can provide a speed-up for specific calculations. For example:
mpirun -np 16 lmp_kokkos_mpi_only -k on -sf kk -pk kokkos newton on neigh half comm no -in in.lj # Newton on, Half neighbor list, non-threaded comm :pre
@ -190,19 +184,18 @@ tasks/node. The "-k on t Nt" command-line switch sets the number of
threads/task as Nt. The product of these two values should be N, i.e.
256 or 264.
NOTE: The default for the "package kokkos"_package.html command is to
use "full" neighbor lists and set the Newton flag to "off" for both
pairwise and bonded interactions. When running on KNL, this will
typically be best for pair-wise potentials. For many-body potentials,
using "half" neighbor lists and setting the Newton flag to "on" may be
faster. It can also be faster to use non-threaded communication. Use
the "-pk kokkos" "command-line switch"_Run_options.html to change the
default "package kokkos"_package.html options. See its doc page for
details and default settings. Experimenting with its options can
provide a speed-up for specific calculations. For example:
NOTE: The default for the "package kokkos"_package.html command when
running on KNL is to use "half" neighbor lists and set the Newton flag
to "on" for both pairwise and bonded interactions. This will typically
be best for many-body potentials. For simpler pair-wise potentials, it
may be faster to use a "full" neighbor list with Newton flag to "off".
Use the "-pk kokkos" "command-line switch"_Run_options.html to change
the default "package kokkos"_package.html options. See its doc page for
details and default settings. Experimenting with its options can provide
a speed-up for specific calculations. For example:
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos comm no -in in.lj # Newton off, full neighbor list, non-threaded comm
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos newton on neigh half comm no -in in.reax # Newton on, half neighbor list, non-threaded comm :pre
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos comm host -in in.reax # Newton on, half neighbor list, threaded comm
mpirun -np 64 lmp_kokkos_phi -k on t 4 -sf kk -pk kokkos newton off neigh full comm no -in in.lj # Newton off, full neighbor list, non-threaded comm :pre
NOTE: MPI tasks and threads should be bound to cores as described
above for CPUs.
@ -236,19 +229,19 @@ one or more nodes, each with two GPUs:
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj # 1 node, 2 MPI tasks/node, 2 GPUs/node
mpirun -np 32 -ppn 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -in in.lj # 16 nodes, 2 MPI tasks/node, 2 GPUs/node (32 GPUs total) :pre
NOTE: The default for the "package kokkos"_package.html command is to
use "full" neighbor lists and set the Newton flag to "off" for both
pairwise and bonded interactions, along with threaded communication.
When running on Maxwell or Kepler GPUs, this will typically be
best. For Pascal GPUs, using "half" neighbor lists and setting the
Newton flag to "on" may be faster. For many pair styles, setting the
neighbor binsize equal to the ghost atom cutoff will give speedup.
Use the "-pk kokkos" "command-line switch"_Run_options.html to change
the default "package kokkos"_package.html options. See its doc page
for details and default settings. Experimenting with its options can
provide a speed-up for specific calculations. For example:
NOTE: The default for the "package kokkos"_package.html command when
running on GPUs is to use "full" neighbor lists and set the Newton flag
to "off" for both pairwise and bonded interactions, along with threaded
communication. When running on Maxwell or Kepler GPUs, this will
typically be best. For Pascal GPUs, using "half" neighbor lists and
setting the Newton flag to "on" may be faster. For many pair styles,
setting the neighbor binsize equal to twice the CPU default value will
give speedup, which is the default when running on GPUs. Use the "-pk
kokkos" "command-line switch"_Run_options.html to change the default
"package kokkos"_package.html options. See its doc page for details and
default settings. Experimenting with its options can provide a speed-up
for specific calculations. For example:
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos binsize 2.8 -in in.lj # Set binsize = neighbor ghost cutoff
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos newton on neigh half binsize 2.8 -in in.lj # Newton on, half neighbor list, set binsize = neighbor ghost cutoff :pre
NOTE: For good performance of the KOKKOS package on GPUs, you must

View File

@ -77,6 +77,7 @@ Post-processing tools :h3
"python"_#pythontools,
"reax"_#reax_tool,
"smd"_#smd,
"spin"_#spin,
"xmgrace"_#xmgrace :tb(c=6,ea=c,a=l)
Miscellaneous tools :h3
@ -511,6 +512,20 @@ Ernst Mach Institute in Germany (georg.ganzenmueller at emi.fhg.de).
:line
spin tool :h4,link(spin)
The spin sub-directory contains a C file interpolate.c which can
be compiled and used to perform a cubic polynomial interpolation of
the MEP following a GNEB calculation.
See the README file in tools/spin/interpolate_gneb for more details.
This tool was written by the SPIN package author, Julien
Tranchida at Sandia National Labs (jtranch at sandia.gov, and by Aleksei
Ivanov, at University of Iceland (ali5 at hi.is).
:line
vim tool :h4,link(vim)
The files in the tools/vim directory are add-ons to the VIM editor

View File

@ -67,6 +67,7 @@ Commands :h1
minimize
molecule
neb
neb_spin
neigh_modify
neighbor
newton

View File

@ -468,7 +468,7 @@ property/chunk"_compute_property_chunk.html command.
NOTE: The compression operation requires global communication across
all processors to share their chunk ID values. It can require large
memory on every processor to store them, even after they are
compressed, if there are are a large number of unique chunk IDs with
compressed, if there are a large number of unique chunk IDs with
atoms assigned to them. It uses a STL map to find unique chunk IDs
and store them in sorted order. Each time an atom is assigned a
compressed chunk ID, it must access the STL map. All of this means

View File

@ -49,7 +49,7 @@ For inputs that are computes, they must be a compute that calculates
per-chunk values. These are computes whose style names end in
"/chunk".
For inputs that are fixes, they should be a a fix that calculates
For inputs that are fixes, they should be a fix that calculates
per-chunk values. For example, "fix ave/chunk"_fix_ave_chunk.html or
"fix ave/time"_fix_ave_time.html (assuming it is time-averaging
per-chunk data).

View File

@ -15,8 +15,9 @@ compute ID group-ID coord/atom cstyle args ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
coord/atom = style name of this compute command :l
cstyle = {cutoff} or {orientorder} :l
{cutoff} args = cutoff typeN
{cutoff} args = cutoff \[group group2-ID\] typeN
cutoff = distance within which to count coordination neighbors (distance units)
group {group2-ID} = select group-ID to restrict which atoms to consider for coordination number (optional)
typeN = atom type for Nth coordination count (see asterisk form below)
{orientorder} args = orientorderID threshold
orientorderID = ID of an orientorder/atom compute
@ -28,6 +29,7 @@ cstyle = {cutoff} or {orientorder} :l
compute 1 all coord/atom cutoff 2.0
compute 1 all coord/atom cutoff 6.0 1 2
compute 1 all coord/atom cutoff 6.0 2*4 5*8 *
compute 1 solute coord/atom cutoff 2.0 group solvent
compute 1 all coord/atom orientorder 2 0.5 :pre
[Description:]
@ -38,9 +40,14 @@ meaning of the resulting value depend on the {cstyle} keyword used.
The {cutoff} cstyle calculates one or more traditional coordination
numbers for each atom. A coordination number is defined as the number
of neighbor atoms with specified atom type(s) that are within the
specified cutoff distance from the central atom. Atoms not in the
specified group are included in the coordination number tally.
of neighbor atoms with specified atom type(s), and optionally within
the specified group, that are within the specified cutoff distance from
the central atom. The compute group selects only the central atoms; all
neighboring atoms, unless selected by type, type range, or group option,
are included in the coordination number tally.
The optional {group} keyword allows to specify from which group atoms
contribute to the coordination number. Default setting is group 'all'.
The {typeN} keywords allow specification of which atom types
contribute to each coordination number. One coordination number is
@ -122,7 +129,9 @@ explained above.
"compute cluster/atom"_compute_cluster_atom.html
"compute orientorder/atom"_compute_orientorder_atom.html
[Default:] none
[Default:]
group = all
:line

View File

@ -96,7 +96,7 @@ group. The argument {maxedge} of the this keyword is the largest number
of edges on a single Voronoi cell face expected to occur in the
sample. This keyword adds the generation of a global vector with
{maxedge}+1 entries. The last entry in the vector contains the number of
faces with with more than {maxedge} edges. Since the polygon with the
faces with more than {maxedge} edges. Since the polygon with the
smallest amount of edges is a triangle, entries 1 and 2 of the vector
will always be zero.

View File

@ -47,7 +47,7 @@ division by sin(74.4)*sin(48.1) (the minima positions for theta1 and theta2).
The following coefficients must be defined for each dihedral type via the
"dihedral_coeff"_dihedral_coeff.html command as in the example above, or in
the Dihedral Coeffs section of a data file file read by the
the Dihedral Coeffs section of a data file read by the
"read_data"_read_data.html command:
n (integer >= 1)

View File

@ -174,7 +174,7 @@ radians instead of degrees. (Note: This changes the way the forces
are scaled in the 4th column of the data file.)
The optional "CHECKU" keyword is followed by a filename. This allows
the user to save all of the the {Ntable} different entries in the
the user to save all of the {Ntable} different entries in the
interpolated energy table to a file to make sure that the interpolated
function agrees with the user's expectations. (Note: You can
temporarily increase the {Ntable} parameter to a high value for this

View File

@ -21,7 +21,7 @@ dump ID group-ID style N file args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be dumped :l
style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {custom} or {custom/gz} or {custom/mpiio} or {dcd} or {h5md} or {image} or or {local} or {molfile} or {movie} or {netcdf} or {netcdf/mpiio} or {vtk} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} :l
style = {atom} or {atom/gz} or {atom/mpiio} or {cfg} or {cfg/gz} or {cfg/mpiio} or {custom} or {custom/gz} or {custom/mpiio} or {dcd} or {h5md} or {image} or {local} or {molfile} or {movie} or {netcdf} or {netcdf/mpiio} or {vtk} or {xtc} or {xyz} or {xyz/gz} or {xyz/mpiio} :l
N = dump every this many timesteps :l
file = name of file to write dump info to :l
args = list of arguments for a particular style :l
@ -196,7 +196,7 @@ For post-processing purposes the {atom}, {local}, and {custom} text
files are self-describing in the following sense.
The dimensions of the simulation box are included in each snapshot.
For an orthogonal simulation box this information is is formatted as:
For an orthogonal simulation box this information is formatted as:
ITEM: BOX BOUNDS xx yy zz
xlo xhi
@ -619,7 +619,7 @@ should be replaced by the actual name of the variable that has been
defined previously in the input script. Only an atom-style variable
can be referenced, since it is the only style that generates per-atom
values. Variables of style {atom} can reference individual atom
attributes, per-atom atom attributes, thermodynamic keywords, or
attributes, per-atom attributes, thermodynamic keywords, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of creating quantities to output to a
dump file.

View File

@ -310,7 +310,7 @@ NOTE: Atom and molecule IDs are stored internally as 4-byte or 8-byte
signed integers, depending on how LAMMPS was compiled. When
specifying the {format int} option you can use a "%d"-style format
identifier in the format string and LAMMPS will convert this to the
corresponding 8-byte form it it is needed when outputting those
corresponding 8-byte form if it is needed when outputting those
values. However, when specifying the {line} option or {format M
string} option for those values, you should specify a format string
appropriate for an 8-byte signed integer, e.g. one with "%ld", if

View File

@ -201,6 +201,7 @@ accelerated styles exist.
"edpd/source"_fix_dpd_source.html -
"efield"_fix_efield.html - impose electric field on system
"ehex"_fix_ehex.html - enhanced heat exchange algorithm
"electron/stopping"_fix_electron_stopping.html - electronic stopping power as a friction force
"enforce2d"_fix_enforce2d.html - zero out z-dimension velocity and force
"eos/cv"_fix_eos_cv.html -
"eos/table"_fix_eos_table.html -
@ -320,20 +321,16 @@ accelerated styles exist.
"restrain"_fix_restrain.html - constrain a bond, angle, dihedral
"rhok"_fix_rhok.html -
"rigid"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NVE integration
"rigid/nph"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPH integration
"rigid/nph/small"_fix_rigid.html -
"rigid/npt"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPT integration
"rigid/npt/small"_fix_rigid.html -
"rigid/nve"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with alternate NVE integration
"rigid/nve/small"_fix_rigid.html -
"rigid/nvt"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NVT integration
"rigid/nvt/small"_fix_rigid.html -
"rigid/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVE integration
"rigid/small/nph"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NPH integration
"rigid/small/npt"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NPT integration
"rigid/small/nve"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with alternate NVE integration
"rigid/small/nvt"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVT integration
"rigid/meso"_fix_rigid_meso.html - constrain clusters of mesoscopic SPH/SDPD particles to move as a rigid body
"rigid/nph"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPH integration
"rigid/nph/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NPH integration
"rigid/npt"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPT integration
"rigid/npt/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NPT integration
"rigid/nve"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with alternate NVE integration
"rigid/nve/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with alternate NVE integration
"rigid/nvt"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NVT integration
"rigid/nvt/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVT integration
"rigid/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVE integration
"rx"_fix_rx.html -
"saed/vtk"_fix_saed_vtk.html -
"setforce"_fix_setforce.html - set the force on each atom

View File

@ -141,11 +141,16 @@ specify if this should be done.
This fix writes the state of the fix to "binary restart
files"_restart.html. This includes information about the random
number generator seed, the next timestep for MC exchanges, etc. See
number generator seed, the next timestep for MC exchanges, the number
of exchange attempts and successes etc. See
the "read_restart"_read_restart.html command for info on how to
re-specify a fix in an input script that reads a restart file, so that
the operation of the fix continues in an uninterrupted fashion.
NOTE: For this to work correctly, the timestep must [not] be changed
after reading the restart with "reset_timestep"_reset_timestep.html.
The fix will try to detect it and stop with an error.
None of the "fix_modify"_fix_modify.html options are relevant to this
fix.

View File

@ -361,7 +361,7 @@ computes that calculate a temperature to see which ones implement a
bias.
The {adof} and {cdof} keywords define the values used in the degree of
freedom (DOF) formula described above for for temperature calculation
freedom (DOF) formula described above for temperature calculation
for each chunk. They are only used when the {temp} value is
calculated. They can be used to calculate a more appropriate
temperature for some kinds of chunks. Here are 3 examples:

View File

@ -18,8 +18,8 @@ fix ID group-ID bond/react common_keyword values ...
ID, group-ID are documented in "fix"_fix.html command. Group-ID is ignored. :ulb,l
bond/react = style name of this fix command :l
zero or more common keyword/value pairs may be appended directly after 'bond/react' :l
these apply to all reaction specifications (below) :l
the common keyword/values may be appended directly after 'bond/react' :l
this applies to all reaction specifications (below) :l
common_keyword = {stabilization} :l
{stabilization} values = {no} or {yes} {group-ID} {xmax}
{no} = no reaction site stabilization
@ -136,10 +136,12 @@ words, can be customized for each reaction, or reaction step):
A check for possible new reaction sites is performed every {Nevery}
timesteps.
Two conditions must be met for a reaction to occur. First a bonding
atom pair must be identified. Second, the topology surrounding the
bonding atom pair must match the topology of the pre-reaction
template. If both these conditions are met, the reaction site is
Three physical conditions must be met for a reaction to occur. First,
a bonding atom pair must be identified within the reaction distance
cutoffs. Second, the topology surrounding the bonding atom pair must
match the topology of the pre-reaction template. Finally, any reaction
constraints listed in the map file (see below) must be satisfied. If
all of these conditions are met, the reaction site is eligible to be
modified to match the post-reaction template.
A bonding atom pair will be identified if several conditions are met.
@ -203,14 +205,24 @@ new types must also be defined during the setup of a given simulation.
A discussion of correctly handling this is also provided on the
"molecule"_molecule.html command page.
NOTE: When a reaction occurs, it is possible that the resulting
topology/atom (e.g. special bonds, dihedrals, etc.) exceeds that of
the existing system and reaction templates. As when inserting
molecules, enough space for this increased topology/atom must be
reserved by using the relevant "extra" keywords to the
"read_data"_read_data.html or "create_box"_create_box.html commands.
The map file is a text document with the following format:
A map file has a header and a body. The header of map file the
contains one mandatory keyword and three optional keywords. The
mandatory keyword is 'equivalences' and the optional keywords are
'edgeIDs' and 'deleteIDs' and 'customIDs':
contains one mandatory keyword and four optional keywords. The
mandatory keyword is 'equivalences':
N {equivalences} = # of atoms N in the reaction molecule templates :pre
The optional keywords are 'edgeIDs', 'deleteIDs', 'customIDs' and
'constraints':
N {equivalences} = # of atoms N in the reaction molecule templates
N {edgeIDs} = # of edge atoms N in the pre-reacted molecule template
N {deleteIDs} = # of atoms N that are specified for deletion
N {customIDs} = # of atoms N that are specified for a custom update
@ -244,8 +256,8 @@ A sample map file is given below:
# this is a map file :pre
2 edgeIDs
7 equivalences :pre
7 equivalences
2 edgeIDs :pre
BondingIDs :pre
@ -297,26 +309,25 @@ can allow for the possibility of one or more reverse reactions.
The optional keywords deal with the probability of a given reaction
occurring as well as the stable equilibration of each reaction site as
it occurs.
it occurs:
The {prob} keyword can affect whether an eligible reaction actually
occurs. The fraction setting must be a value between 0.0 and 1.0. A
uniform random number between 0.0 and 1.0 is generated and the
The {prob} keyword can affect whether or not an eligible reaction
actually occurs. The fraction setting must be a value between 0.0 and
1.0. A uniform random number between 0.0 and 1.0 is generated and the
eligible reaction only occurs if the random number is less than the
fraction. Up to N reactions are permitted to occur, as optionally
specified by the {max_rxn} keyword.
The {stabilize_steps} keyword allows for the specification of how many
timesteps a reaction site is stabilized before being returned to the
overall system thermostat.
In order to produce the most physical behavior, this 'reaction site
equilibration time' should be tuned to be as small as possible while
retaining stability for a given system or reaction step. After a
limited number of case studies, this number has been set to a default
of 60 timesteps. Ideally, it should be individually tuned for each fix
reaction step. Note that in some situations, decreasing rather than
increasing this parameter will result in an increase in stability.
overall system thermostat. In order to produce the most physical
behavior, this 'reaction site equilibration time' should be tuned to
be as small as possible while retaining stability for a given system
or reaction step. After a limited number of case studies, this number
has been set to a default of 60 timesteps. Ideally, it should be
individually tuned for each fix reaction step. Note that in some
situations, decreasing rather than increasing this parameter will
result in an increase in stability.
The {update_edges} keyword can increase the number of atoms whose
atomic charges are updated, when the pre-reaction template contains
@ -324,11 +335,11 @@ edge atoms. When the value is set to 'charges,' all atoms' atomic
charges are updated to those specified by the post-reaction template,
including atoms near the edge of reaction templates. When the value is
set to 'custom,' an additional section must be included in the map
file that specifies whether to update charges, on a per-atom basis.
The format of this section is detailed above. Listing a pre-reaction
atom ID with a value of 'charges' will force the update of the atom's
charge, even if it is near a template edge. Atoms not near a template
edge are unaffected by this setting.
file that specifies whether or not to update charges, on a per-atom
basis. The format of this section is detailed above. Listing a
pre-reaction atom ID with a value of 'charges' will force the update
of the atom's charge, even if it is near a template edge. Atoms not
near a template edge are unaffected by this setting.
A few other considerations:

View File

@ -98,6 +98,16 @@ fix to add the energy change from the biasing force added by the fix
to the system's potential energy as part of "thermodynamic
output"_thermo_style.html.
The {fix_modify configfile <config file>} option allows to add settings
from an additional config file to the colvars module. This option can
only be used, after the system has been initialized with a "run"_run.html
command.
The {fix_modify config <quoted string>} option allows to add settings
from inline strings. Those have to fit on a single line when enclosed
in a pair of double quotes ("), or can span multiple lines when bracketed
by a pair of triple double quotes (""", like python embedded documentation).
This fix computes a global scalar which can be accessed by various
"output commands"_Howto_output.html. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this

View File

@ -261,6 +261,10 @@ next timestep for deposition, etc. See the
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.
NOTE: For this to work correctly, the timestep must [not] be changed
after reading the restart with "reset_timestep"_reset_timestep.html.
The fix will try to detect it and stop with an error.
None of the "fix_modify"_fix_modify.html options are relevant to this
fix. No global or per-atom quantities are stored by this fix for
access by various "output commands"_Howto_output.html. No parameter

View File

@ -0,0 +1,165 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
fix electron/stopping command :h3
[Syntax:]
fix ID group-ID electron/stopping Ecut file keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
electron/stopping = style name of this fix command :l
Ecut = minimum kinetic energy for electronic stopping (energy units) :l
file = name of the file containing the electronic stopping power table :l
zero or more keyword/value pairs may be appended to args :l
keyword = {region} or {minneigh} :l
{region} value = region-ID
region-ID = region, whose atoms will be affected by this fix
{minneigh} value = minneigh
minneigh = minimum number of neighbors an atom to have stopping applied :pre
:ule
[Examples:]
fix el all electron/stopping 10.0 elstop-table.txt
fix el all electron/stopping 10.0 elstop-table.txt minneigh 3
fix el mygroup electron/stopping 1.0 elstop-table.txt region bulk :pre
[Description:]
This fix implements inelastic energy loss for fast projectiles in solids. It
applies a friction force to fast moving atoms to slow them down due to
"electronic stopping"_#elstopping (energy lost via electronic collisions per
unit of distance). This fix should be used for simulation of irradiation
damage or ion implantation, where the ions can lose noticeable amounts of
energy from electron excitations. If the electronic stopping power is not
considered, the simulated range of the ions can be severely overestimated
("Nordlund98"_#Nordlund98, "Nordlund95"_#Nordlund95).
The electronic stopping is implemented by applying a friction force
to each atom as:
\begin\{equation\}
\vec\{F\}_i = \vec\{F\}^0_i - \frac\{\vec\{v\}_i\}\{\|\vec\{v\}_i\|\} \cdot S_e
\end\{equation\}
where \(\vec\{F\}_i\) is the resulting total force on the atom.
\(\vec\{F\}^0_i\) is the original force applied to the atom, \(\vec\{v\}_i\) is
its velocity and \(S_e\) is the stopping power of the ion.
NOTE: In addition to electronic stopping, atomic cascades and irradiation
simulations require the use of an adaptive timestep (see
"fix dt/reset"_fix_dt_reset.html) and the repulsive ZBL potential (see
"ZBL"_pair_zbl.html potential) or similar. Without these settings the
interaction between the ion and the target atoms will be faulty. It is also
common to use in such simulations a thermostat ("fix_nvt"_fix_nh.html) in
the borders of the simulation cell.
NOTE: This fix removes energy from fast projectiles without depositing it as a
heat to the simulation cell. Such implementation might lead to the unphysical
results when the amount of energy deposited to the electronic system is large,
e.g. simulations of Swift Heavy Ions (energy per nucleon of 100 keV/amu or
higher) or multiple projectiles. You could compensate energy loss by coupling
bulk atoms with some thermostat or control heat transfer between electronic and
atomic subsystems with the two-temperature model ("fix_ttm"_fix_ttm.html).
At low velocities the electronic stopping is negligible. The electronic
friction is not applied to atoms whose kinetic energy is smaller than {Ecut},
or smaller than the lowest energy value given in the table in {file}.
Electronic stopping should be applied only when a projectile reaches bulk
material. This fix scans neighbor list and excludes atoms with fewer than
{minneigh} neighbors (by default one). If the pair potential cutoff is large,
minneigh should be increased, though not above the number of nearest neighbors
in bulk material. An alternative is to disable the check for neighbors by
setting {minneigh} to zero and using the {region} keyword. This is necessary
when running simulations of cluster bombardment.
If the {region} keyword is used, the atom must also be in the specified
geometric "region"_region.html in order to have electronic stopping applied to
it. This is useful if the position of the bulk material is fixed. By default
the electronic stopping is applied everywhere in the simulation cell.
:line
The energy ranges and stopping powers are read from the file {file}.
Lines starting with {#} and empty lines are ignored. Otherwise each
line must contain exactly [N+1] numbers, where [N] is the number of atom
types in the simulation.
The first column is the energy for which the stopping powers on that
line apply. The energies must be sorted from the smallest to the largest.
The other columns are the stopping powers \(S_e\) for each atom type,
in ascending order, in force "units"_units.html. The stopping powers for
intermediate energy values are calculated with linear interpolation between
2 nearest points.
For example:
# This is a comment
# atom-1 atom-2
# eV eV/Ang eV/Ang # units metal
10 0 0
250 60 80
750 100 150 :pre
If an atom which would have electronic stopping applied to it has a
kinetic energy higher than the largest energy given in {file}, LAMMPS
will exit with an error message.
The stopping power depends on the energy of the ion and the target
material. The electronic stopping table can be obtained from
scientific publications, experimental databases or by using
"SRIM"_#SRIM software. Other programs such as "CasP"_#CasP or
"PASS"_#PASS can calculate the energy deposited as a function
of the impact parameter of the ion; these results can be used
to derive the stopping power.
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
files"_restart.html.
The "fix_modify"_fix_modify.html options are not supported.
This fix computes a global scalar, which can be accessed by various
"output commands"_Howto_output.html. The scalar is the total energy
loss from electronic stopping applied by this fix since the start of
the latest run. It is considered "intensive".
The {start/stop} keywords of the "run"_run.html command have no effect
on this fix.
[Restrictions:]
This pair style is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the "Build package"_Build_package.html
doc page for more info.
[Default:]
The default is no limitation by region, and minneigh = 1.
:line
:link(elstopping)
[(electronic stopping)] Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29
:link(Nordlund98)
[(Nordlund98)] Nordlund, Kai, et al. Physical Review B 57.13 (1998): 7556.
:link(Nordlund95)
[(Nordlund95)] Nordlund, Kai. Computational materials science 3.4 (1995): 448-456.
:link(SRIM)
[(SRIM)] SRIM webpage: http://www.srim.org/
:link(CasP)
[(CasP)] CasP webpage: https://www.helmholtz-berlin.de/people/gregor-schiwietz/casp_en.html
:link(PASS)
[(PASS)] PASS webpage: https://www.sdu.dk/en/DPASS

View File

@ -373,11 +373,16 @@ adds all inserted atoms of the specified type to the
This fix writes the state of the fix to "binary restart
files"_restart.html. This includes information about the random
number generator seed, the next timestep for MC exchanges, etc. See
number generator seed, the next timestep for MC exchanges, the number
of MC step attempts and successes etc. See
the "read_restart"_read_restart.html command for info on how to
re-specify a fix in an input script that reads a restart file, so that
the operation of the fix continues in an uninterrupted fashion.
NOTE: For this to work correctly, the timestep must [not] be changed
after reading the restart with "reset_timestep"_reset_timestep.html.
The fix will try to detect it and stop with an error.
None of the "fix_modify"_fix_modify.html options are relevant to this
fix.

View File

@ -113,12 +113,11 @@ state of the system, e.g. via a "write_dump"_write_dump.html or
"write_restart"_write_restart.html command.
If its value is {continue}, the behavior is the same as for {soft},
except subsequent subsequent "run"_run.html or
"minimize"_minimize.html commands are executed. This allows your
script to remedy the condition that triggered the halt, if necessary.
Note that you may wish use the "unfix"_unfix.html command on the fix
halt ID, so that the same condition is not immediately triggered in a
subsequent run.
except subsequent "run"_run.html or "minimize"_minimize.html commands
are executed. This allows your script to remedy the condition that
triggered the halt, if necessary. Note that you may wish use the
"unfix"_unfix.html command on the fix halt ID, so that the same
condition is not immediately triggered in a subsequent run.
The optional {message} keyword determines whether a message is printed
to the screen and logfile when the halt condition is triggered. If

View File

@ -188,7 +188,7 @@ No information about this fix is written to "binary restart
files"_restart.html.
The "fix_modify"_fix_modify.html {energy} option is supported by this
fix to add the energy of the bias potential to the the system's
fix to add the energy of the bias potential to the system's
potential energy as part of "thermodynamic output"_thermo_style.html.
This fix computes a global scalar and global vector of length 12, which

View File

@ -301,7 +301,7 @@ No information about this fix is written to "binary restart
files"_restart.html.
The "fix_modify"_fix_modify.html {energy} option is supported by this
fix to add the energy of the bias potential to the the system's
fix to add the energy of the bias potential to the system's
potential energy as part of "thermodynamic output"_thermo_style.html.
This fix computes a global scalar and global vector of length 21,
@ -322,13 +322,13 @@ vector stores the following quantities:
9 = fraction of biased bonds with negative strain during this run
10 = average bias coeff for all bonds during this run (unitless)
11 = min bias coeff for any bond during this run (unitless)
12 = max bias coeff for any bond during this run (unitless)
12 = max bias coeff for any bond during this run (unitless) :ul
13 = max drift distance of any bond atom during this run (distance units)
14 = max distance from proc subbox of any ghost atom with maxstrain < qfactor during this run (distance units)
15 = max distance outside my box of any ghost atom with any maxstrain during this run (distance units)
16 = count of ghost atoms that could not be found on reneighbor steps during this run
17 = count of bias overlaps (< Dcut) found during this run
17 = count of bias overlaps (< Dcut) found during this run :ul
18 = cumulative hyper time since fix created (time units)
19 = cumulative count of event timesteps since fix created

View File

@ -99,4 +99,4 @@ integration fix (e.g. {fix nve/spin}).
:link(Tranchida2)
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
Journal of Computational Physics, (2018).
Journal of Computational Physics, 372, 406-425, (2018).

View File

@ -97,7 +97,7 @@ Note that in this case the specified {Kspring} is in force/distance
units.
With a value of {ideal}, the spring force is computed as suggested in
"(WeinenE)"_#WeinenE :
"(WeinanE)"_#WeinanE :
Fnudge_parallel = -{Kspring} * (RD-RDideal) / (2 * meanDist) :pre
@ -224,8 +224,8 @@ specified (no inter-replica force on the end replicas).
[(Henkelman2)] Henkelman, Uberuaga, Jonsson, J Chem Phys, 113,
9901-9904 (2000).
:link(WeinenE)
[(WeinenE)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002).
:link(WeinanE)
[(WeinanE)] E, Ren, Vanden-Eijnden, Phys Rev B, 66, 052301 (2002).
:link(Jonsson)
[(Jonsson)] Jonsson, Mills and Jacobsen, in Classical and Quantum

76
doc/src/fix_neb_spin.txt Normal file
View File

@ -0,0 +1,76 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
fix neb/spin command :h3
[Syntax:]
fix ID group-ID neb/spin Kspring :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
neb/spin = style name of this fix command :l
Kspring = spring constant for parallel nudging force
(force/distance units or force units, see parallel keyword) :pre,ule
[Examples:]
fix 1 active neb/spin 1.0
[Description:]
Add nudging forces to spins in the group for a multi-replica
simulation run via the "neb/spin"_neb_spin.html command to perform a
geodesic nudged elastic band (GNEB) calculation for finding the
transition state.
Hi-level explanations of GNEB are given with the
"neb/spin"_neb_spin.html command and on the
"Howto replica"_Howto_replica.html doc page.
The fix neb/spin command must be used with the "neb/spin" command and
defines how inter-replica nudging forces are computed. A GNEB
calculation is divided in two stages. In the first stage n replicas
are relaxed toward a MEP until convergence. In the second stage, the
climbing image scheme is enabled, so that the replica having the highest
energy relaxes toward the saddle point (i.e. the point of highest energy
along the MEP), and a second relaxation is performed.
The nudging forces are calculated as explained in
"(BessarabB)"_#BessarabB).
See this reference for more explanation about their expression.
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
files"_restart.html. None of the "fix_modify"_fix_modify.html options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various "output commands"_Howto_output.html.
No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command.
The forces due to this fix are imposed during an energy minimization,
as invoked by the "minimize"_minimize.html command via the
"neb/spin"_neb_spin.html command.
[Restrictions:]
This command can only be used if LAMMPS was built with the SPIN
package. See the "Build package"_Build_package.html doc
page for more info.
[Related commands:]
"neb_spin"_neb_spin.html
[Default:]
none
:line
:link(BessarabB)
[(BessarabB)] Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196,
335-347 (2015).

View File

@ -73,4 +73,4 @@ instead of "array" is also valid.
:link(Tranchida1)
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
Journal of Computational Physics, (2018).
Journal of Computational Physics, 372, 406-425, (2018).

View File

@ -14,24 +14,28 @@ fix ID group precession/spin style args :pre
ID, group are documented in "fix"_fix.html command :ulb,l
precession/spin = style name of this fix command :l
style = {zeeman} or {anisotropy} :l
style = {zeeman} or {anisotropy} or {cubic} :l
{zeeman} args = H x y z
H = intensity of the magnetic field (in Tesla)
x y z = vector direction of the field
{anisotropy} args = K x y z
K = intensity of the magnetic anisotropy (in eV)
x y z = vector direction of the anisotropy :pre
{cubic} args = K1 K2c n1x n1y n1x n2x n2y n2z n3x n3y n3z
K1 and K2c = intensity of the magnetic anisotropy (in eV)
n1x to n3z = three direction vectors of the cubic anisotropy :pre
:ule
[Examples:]
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0
fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0
fix 1 3 precession/spin anisotropy 0.001 0.0 0.0 1.0
fix 1 iron precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.001 0.0 0.0 1.0 :pre
[Description:]
Impose a force torque to each magnetic spin in the group.
This fix applies a precession torque to each magnetic spin in the group.
Style {zeeman} is used for the simulation of the interaction
between the magnetic spins in the defined group and an external
@ -50,10 +54,29 @@ for the magnetic spins in the defined group:
with n defining the direction of the anisotropy, and K (in eV) its intensity.
If K>0, an easy axis is defined, and if K<0, an easy plane is defined.
In both cases, the choice of (x y z) imposes the vector direction for the force.
Only the direction of the vector is important; it's length is ignored.
Style {cubic} is used to simulate a cubic anisotropy, with three
possible easy axis for the magnetic spins in the defined group:
Both styles can be combined within one single command line.
:c,image(Eqs/fix_spin_cubic.jpg)
with K1 and K2c (in eV) the intensity coefficients and
n1, n2 and n3 defining the three anisotropic directions
defined by the command (from n1x to n3z).
For n1 = (100), n2 = (010), and n3 = (001), K1 < 0 defines an
iron type anisotropy (easy axis along the (001)-type cube
edges), and K1 > 0 defines a nickel type anisotropy (easy axis
along the (111)-type cube diagonals).
K2^c > 0 also defines easy axis along the (111)-type cube
diagonals.
See chapter 2 of "(Skomski)"_#Skomski1 for more details on cubic
anisotropies.
In all cases, the choice of (x y z) only imposes the vector
directions for the forces. Only the direction of the vector is
important; it's length is ignored (the entered vectors are
normalized).
Those styles can be combined within one single command line.
:line
@ -85,3 +108,9 @@ package"_Build_package.html doc page for more info.
"atom_style spin"_atom_style.html
[Default:] none
:line
:link(Skomski1)
[(Skomski)] Skomski, R. (2008). Simple models of magnetism.
Oxford University Press.

View File

@ -14,7 +14,7 @@ fix ID group-ID print N string keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
print = style name of this fix command :l
N = print every N steps :l
N = print every N steps; N can be a variable (see below) :l
string = text string to print with optional variable names :l
zero or more keyword/value pairs may be appended :l
keyword = {file} or {append} or {screen} or {title} :l
@ -40,6 +40,21 @@ If it contains variables it must be enclosed in double quotes to
insure they are not evaluated when the input script line is read, but
will instead be evaluated each time the string is printed.
Instead of a numeric value, N can be specified as an "equal-style
variable"_variable.html, which should be specified as v_name, where
name is the variable name. In this case, the variable is evaluated at
the beginning of a run to determine the [next] timestep at which the
string will be written out. On that timestep, the variable will be
evaluated again to determine the next timestep, etc.
Thus the variable should return timestep values. See the stagger()
and logfreq() and stride() math functions for "equal-style
variables"_variable.html, as examples of useful functions to use in
this context. For example, the following commands will print output at
timesteps 10,20,30,100,200,300,1000,2000,etc:
variable s equal logfreq(10,3,10)
fix extra all print v_s "Coords of marker atom = $x $y $z" :pre
The specified group-ID is ignored by this fix.
See the "variable"_variable.html command for a description of {equal}

View File

@ -8,6 +8,7 @@
fix setforce command :h3
fix setforce/kk command :h3
fix setforce/spin command :h3
[Syntax:]
@ -27,6 +28,7 @@ keyword = {region} :l
fix freeze indenter setforce 0.0 0.0 0.0
fix 2 edge setforce NULL 0.0 0.0
fix 1 edge setforce/spin 0.0 0.0 0.0
fix 2 edge setforce NULL 0.0 v_oscillate :pre
[Description:]
@ -65,6 +67,19 @@ to it.
:line
Style {spin} suffix sets the components of the magnetic precession
vectors instead of the mechanical forces. This also erases all
previously computed magnetic precession vectors on the atom, though
additional magnetic fixes could add new forces.
This command can be used to freeze the magnetic moment of certain
atoms in the simulation by zeroing their precession vector.
All options defined above remain valid, they just apply to the magnetic
precession vectors instead of the forces.
:line
Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
@ -117,7 +132,10 @@ forces to any value besides zero when performing a minimization. Use
the "fix addforce"_fix_addforce.html command if you want to apply a
non-zero force to atoms during a minimization.
[Restrictions:] none
[Restrictions:]
The fix {setforce/spin} only makes sense when LAMMPS was built with the
SPIN package.
[Related commands:]

View File

@ -17,13 +17,13 @@ wall/gran = style name of this fix command :l
fstyle = style of force interactions between particles and wall :l
possible choices: hooke, hooke/history, hertz/history, granular :pre
fstyle_params = parameters associated with force interaction style :l
For {hooke}, {hooke/history}, and {hertz/history}, {fstyle_params} are:
Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below)
gamma_n = damping coefficient for collisions in normal 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)
dampflag = 0 or 1 if tangential damping force is excluded or included :pre
For {hooke}, {hooke/history}, and {hertz/history}, {fstyle_params} are:
Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below)
gamma_n = damping coefficient for collisions in normal 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)
dampflag = 0 or 1 if tangential damping force is excluded or included :pre
For {granular}, {fstyle_params} are set using the same syntax as for the {pair_coeff} command of "pair_style granular"_pair_granular.html :pre
wallstyle = {xplane} or {yplane} or {zplane} or {zcylinder} :l
args = list of arguments for a particular style :l
@ -46,10 +46,10 @@ keyword = {wiggle} or {shear} :l
fix 1 all wall/gran hooke 200000.0 NULL 50.0 NULL 0.5 0 xplane -10.0 10.0
fix 1 all wall/gran hooke/history 200000.0 NULL 50.0 NULL 0.5 0 zplane 0.0 NULL
fix 2 all wall/gran hooke 100000.0 20000.0 50.0 30.0 0.5 1 zcylinder 15.0 wiggle z 3.0 2.0
fix 3 all wall/gran granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 zplane 0.0 NULL
fix 4 all wall/gran granular jkr 1000.0 50.0 0.3 5.0 tangential mindlin 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall zcylinder 15.0 wiggle z 3.0 2.0
fix 5 all wall/gran granular dmt 1000.0 50.0 0.3 10.0 tangential mindlin 800.0 0.5 0.1 roll sds 500.0 200.0 0.1 twisting marshall zplane 0.0 NULL :pre
fix 2 all wall/gran hooke 100000.0 20000.0 50.0 30.0 0.5 1 zcylinder 15.0 wiggle z 3.0 2.0
fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping velocity region myBox
fix 4 all wall/gran/region granular jkr 1e5 1500.0 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall region myCone
fix 5 all wall/gran/region granular dmt 1e5 0.2 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall damping tsuji region myCone :pre
[Description:]

View File

@ -17,23 +17,23 @@ wall/region = style name of this fix command :l
fstyle = style of force interactions between particles and wall :l
possible choices: hooke, hooke/history, hertz/history, granular :pre
fstyle_params = parameters associated with force interaction style :l
For {hooke}, {hooke/history}, and {hertz/history}, {fstyle_params} are:
Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below)
gamma_n = damping coefficient for collisions in normal 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)
dampflag = 0 or 1 if tangential damping force is excluded or included :pre
For {hooke}, {hooke/history}, and {hertz/history}, {fstyle_params} are:
Kn = elastic constant for normal particle repulsion (force/distance units or pressure units - see discussion below)
Kt = elastic constant for tangential contact (force/distance units or pressure units - see discussion below)
gamma_n = damping coefficient for collisions in normal 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)
dampflag = 0 or 1 if tangential damping force is excluded or included :pre
For {granular}, {fstyle_params} are set using the same syntax as for the {pair_coeff} command of "pair_style granular"_pair_granular.html :pre
wallstyle = region (see "fix wall/gran"_fix_wall_gran.html for options for other kinds of walls) :l
region-ID = region whose boundary will act as wall :l,ule
[Examples:]
fix wall all wall/gran/region hooke/history 1000.0 200.0 200.0 100.0 0.5 1 region myCone
fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 region myBox
fix 4 all wall/gran/region granular jkr 1000.0 50.0 tangential linear_history 800.0 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall region myCone
fix 5 all wall/gran/region granular dmt 1000.0 50.0 0.3 10.0 tangential linear_history 800.0 0.5 0.1 roll sds 500.0 200.0 0.1 twisting marshall region myCone :pre
fix wall all wall/gran/region hooke/history 1000.0 200.0 200.0 100.0 0.5 1 region myCone
fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping velocity region myBox
fix 4 all wall/gran/region granular jkr 1e5 1500.0 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall region myCone
fix 5 all wall/gran/region granular dmt 1e5 0.2 0.3 10.0 tangential mindlin NULL 1.0 0.5 rolling sds 500.0 200.0 0.5 twisting marshall damping tsuji region myCone :pre
[Description:]

View File

@ -40,6 +40,7 @@ Fixes :h1
fix_dt_reset
fix_efield
fix_ehex
fix_electron_stopping
fix_enforce2d
fix_eos_cv
fix_eos_table
@ -83,6 +84,7 @@ Fixes :h1
fix_msst
fix_mvv_dpd
fix_neb
fix_neb_spin
fix_nh
fix_nh_eff
fix_nh_uef

View File

@ -26,12 +26,13 @@ kim_query latconst get_test_result test=TE_156715955670 model=MO_800509458712 &
The kim_query command allows to retrieve properties from the OpenKIM
through a web query. The result is stored in a string style
"variable"_variable.html, the name of which must be given as the first
argument of the kim_query command. The second required argument is the
name of the actual query function (e.g. {get_test_result}). All following
argument of the kim_query command. The second required argument is the
name of the actual query function (e.g. {get_test_result}). All following
arguments are parameters handed over to the web query in the format
{keyword=value}. This list of supported keywords and the type of how
the value has to be encoded depends on the query function used.
For more details on this, please refer to the OpenKIM homepage.
{keyword=value}. The list of supported keywords and the type of how
the value has to be encoded depends on the query function used. This
mirrors the functionality available on the OpenKIM webpage at
"https://query.openkim.org"_https://query.openkim.org/
[Restrictions:]

View File

@ -179,6 +179,7 @@ min_spin.html
minimize.html
molecule.html
neb.html
neb_spin.html
neigh_modify.html
neighbor.html
newton.html
@ -265,6 +266,7 @@ fix_drude_transform.html
fix_dt_reset.html
fix_efield.html
fix_ehex.html
fix_electron_stopping.html
fix_enforce2d.html
fix_eos_cv.html
fix_eos_table.html
@ -308,6 +310,7 @@ fix_mscg.html
fix_msst.html
fix_mvv_dpd.html
fix_neb.html
fix_neb_spin.html
fix_nh.html
fix_nh_eff.html
fix_nph_asphere.html
@ -571,6 +574,8 @@ pair_dipole.html
pair_dpd.html
pair_dpd_fdt.html
pair_dsmc.html
pair_e3b.html
pair_drip.html
pair_eam.html
pair_edip.html
pair_eff.html

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