Addressing include conflict

This commit is contained in:
jtclemm
2020-06-11 16:24:29 -06:00
793 changed files with 90218 additions and 35314 deletions

4
.github/CODEOWNERS vendored
View File

@ -115,6 +115,10 @@ src/min* @sjplimp @stanmoore1
# tools # tools
tools/msi2lmp/* @akohlmey tools/msi2lmp/* @akohlmey
tools/emacs/* @HaoZeke tools/emacs/* @HaoZeke
tools/singularity/* @akohlmey @rbberger
# tests
unittest/* @akohlmey @rbberger
# cmake # cmake
cmake/* @junghans @rbberger cmake/* @junghans @rbberger

View File

@ -3,16 +3,24 @@
# This file is part of LAMMPS # This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger # Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
########################################
project(lammps CXX) project(lammps CXX)
set(SOVERSION 0) set(SOVERSION 0)
get_filename_component(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src ABSOLUTE)
get_filename_component(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib ABSOLUTE) get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE) get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
get_filename_component(LAMMPS_DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../doc ABSOLUTE)
get_filename_component(LAMMPS_TOOLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../tools ABSOLUTE) set(LAMMPS_SOURCE_DIR ${LAMMPS_DIR}/src)
get_filename_component(LAMMPS_PYTHON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../python ABSOLUTE) set(LAMMPS_LIB_SOURCE_DIR ${LAMMPS_DIR}/lib)
get_filename_component(LAMMPS_POTENTIALS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../potentials ABSOLUTE) set(LAMMPS_DOC_DIR ${LAMMPS_DIR}/doc)
set(LAMMPS_TOOLS_DIR ${LAMMPS_DIR}/tools)
set(LAMMPS_PYTHON_DIR ${LAMMPS_DIR}/python)
set(LAMMPS_POTENTIALS_DIR ${LAMMPS_DIR}/potentials)
find_package(Git) find_package(Git)
@ -24,6 +32,12 @@ endif()
# Cmake modules/macros are in a subdirectory to keep this file cleaner # Cmake modules/macros are in a subdirectory to keep this file cleaner
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
# make sure LIBRARY_PATH is set if environment variable is set
if (DEFINED ENV{LIBRARY_PATH})
list(APPEND CMAKE_LIBRARY_PATH "$ENV{LIBRARY_PATH}")
message(STATUS "Appending $ENV{LIBRARY_PATH} to CMAKE_LIBRARY_PATH: ${CMAKE_LIBRARY_PATH}")
endif()
include(LAMMPSUtils) include(LAMMPSUtils)
get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h PROJECT_VERSION) get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h PROJECT_VERSION)
@ -57,11 +71,11 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
endif() endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native") set(CMAKE_TUNE_DEFAULT "-march=native")
endif() endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_TUNE_DEFAULT "-ffast-math -march=native") set(CMAKE_TUNE_DEFAULT "-march=native")
endif() endif()
# we require C++11 without extensions # we require C++11 without extensions
@ -491,7 +505,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HE
# Generate lmpgitversion.h # Generate lmpgitversion.h
###################################### ######################################
add_custom_target(gitversion COMMAND ${CMAKE_COMMAND} add_custom_target(gitversion COMMAND ${CMAKE_COMMAND}
-DCMAKE_CURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DLAMMPS_DIR="${LAMMPS_DIR}"
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}" -DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
-DGIT_FOUND="${GIT_FOUND}" -DGIT_FOUND="${GIT_FOUND}"
-DLAMMPS_STYLE_HEADERS_DIR="${LAMMPS_STYLE_HEADERS_DIR}" -DLAMMPS_STYLE_HEADERS_DIR="${LAMMPS_STYLE_HEADERS_DIR}"
@ -538,8 +552,6 @@ if(BUILD_SHARED_LIBS)
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY) configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS) install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
file(GLOB MODULE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Modules/Find*.cmake)
install(FILES ${MODULE_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY) configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY)
write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion) write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion)

View File

@ -1,11 +1,5 @@
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
if(@BUILD_MPI@) if(@BUILD_MPI@)
find_dependency(MPI REQUIRED CXX) find_dependency(MPI REQUIRED CXX)
endif() endif()
if(@PKG_KSPACE@)
if(@FFT@ STREQUAL "FFTW3")
find_dependency(@FFTW@ REQUIRED MODULE)
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/LAMMPS_Targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/LAMMPS_Targets.cmake")

View File

@ -15,14 +15,35 @@ if(ENABLE_COVERAGE)
gen_coverage_xml gen_coverage_xml
COMMAND ${GCOVR_BINARY} -s -x -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml COMMAND ${GCOVR_BINARY} -s -x -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating XML Coverage Report..." COMMENT "Generating XML coverage report..."
) )
set(COVERAGE_HTML_DIR ${CMAKE_BINARY_DIR}/coverage_html)
add_custom_target(coverage_html_folder
COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_HTML_DIR})
add_custom_target( add_custom_target(
gen_coverage_html gen_coverage_html
COMMAND ${GCOVR_BINARY} -s --html --html-details -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.html COMMAND ${GCOVR_BINARY} -s --html --html-details -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o ${COVERAGE_HTML_DIR}/index.html
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating HTML Coverage Report..." COMMENT "Generating HTML coverage report..."
) )
add_dependencies(gen_coverage_html coverage_html_folder)
add_custom_target(clean_coverage_html
${CMAKE_COMMAND} -E remove_directory ${COVERAGE_HTML_DIR}
COMMENT "Deleting HTML coverage report..."
)
add_custom_target(reset_coverage
${CMAKE_COMMAND} -E remove -f */*.gcda */*/*.gcda */*/*/*.gcda
*/*/*/*/*.gcda */*/*/*/*/*.gcda */*/*/*/*/*/*.gcda
*/*/*/*/*/*/*/*.gcda */*/*/*/*/*/*/*/*.gcda
*/*/*/*/*/*/*/*/*/*.gcda */*/*/*/*/*/*/*/*/*/*.gcda
WORKIND_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Deleting coverage data files..."
)
add_dependencies(reset_coverage clean_coverage_html)
endif() endif()
endif() endif()

View File

@ -1,27 +0,0 @@
# - Find latte
# Find the native LATTE libraries.
#
# LATTE_LIBRARIES - List of libraries when using latte.
# LATTE_FOUND - True if latte found.
#
find_library(LATTE_LIBRARY NAMES latte)
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LATTE_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LATTE DEFAULT_MSG LATTE_LIBRARY)
# Copy the results to the output variables and target.
if(LATTE_FOUND)
set(LATTE_LIBRARIES ${LATTE_LIBRARY})
if(NOT TARGET LATTE::latte)
add_library(LATTE::latte UNKNOWN IMPORTED)
set_target_properties(LATTE::latte PROPERTIES
IMPORTED_LOCATION "${LATTE_LIBRARY}")
endif()
endif()
mark_as_advanced(LATTE_LIBRARY)

View File

@ -6,7 +6,6 @@
# TBB_MALLOC_FOUND - True if tbb found. # TBB_MALLOC_FOUND - True if tbb found.
# #
######################################################## ########################################################
# TBB Malloc # TBB Malloc

View File

@ -0,0 +1,30 @@
# - Find libyaml
# Find the native Yaml headers and libraries.
#
# YAML_INCLUDE_DIRS - where to find yaml.h
# YAML_LIBRARIES - List of libraries when using libyaml
# YAML_FOUND - True if libyaml is found.
#
find_path(YAML_INCLUDE_DIR yaml.h PATH_SUFFIXES yaml)
find_library(YAML_LIBRARY NAMES yaml)
# handle the QUIET and REQUIRED arguments and
# set YAML_FOUND to TRUE if all variables are non-zero
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(YAML DEFAULT_MSG YAML_LIBRARY YAML_INCLUDE_DIR)
# Copy the results to the output variables and target.
if(YAML_FOUND)
set(YAML_LIBRARIES ${YAML_LIBRARY})
set(YAML_INCLUDE_DIRS ${YAML_INCLUDE_DIR})
if(NOT TARGET Yaml::Yaml)
add_library(Yaml::Yaml UNKNOWN IMPORTED)
set_target_properties(Yaml::Yaml PROPERTIES
IMPORTED_LOCATION "${YAML_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${YAML_INCLUDE_DIR}")
endif()
endif()
mark_as_advanced(YAML_INCLUDE_DIR YAML_LIBRARY)

77
cmake/Modules/GTest.cmake Normal file
View File

@ -0,0 +1,77 @@
message(STATUS "Downloading and building Google Test library")
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(GTEST_LIB_POSTFIX d)
else()
set(GTEST_LIB_POSTFIX)
endif()
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0
SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build"
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_GTEST_OPTS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
BUILD_BYPRODUCTS <BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${GTEST_LIB_POSTFIX}.a
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock${GTEST_LIB_POSTFIX}.a
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${GTEST_LIB_POSTFIX}.a
<BINARY_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock_main${GTEST_LIB_POSTFIX}.a
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
INSTALL_COMMAND ""
TEST_COMMAND "")
ExternalProject_Get_Property(googletest SOURCE_DIR)
set(GTEST_INCLUDE_DIR ${SOURCE_DIR}/googletest/include)
set(GMOCK_INCLUDE_DIR ${SOURCE_DIR}/googlemock/include)
# workaround for CMake 3.10 on ubuntu 18.04
file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIR})
file(MAKE_DIRECTORY ${GMOCK_INCLUDE_DIR})
ExternalProject_Get_Property(googletest BINARY_DIR)
set(GTEST_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest${GTEST_LIB_POSTFIX}.a)
set(GMOCK_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock${GTEST_LIB_POSTFIX}.a)
set(GTEST_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gtest_main${GTEST_LIB_POSTFIX}.a)
set(GMOCK_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gmock_main${GTEST_LIB_POSTFIX}.a)
# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
find_package(Threads QUIET)
add_library(GTest::GTest UNKNOWN IMPORTED)
set_target_properties(GTest::GTest PROPERTIES
IMPORTED_LOCATION ${GTEST_LIBRARY_PATH}
INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIR}
IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(GTest::GTest googletest)
add_library(GTest::GMock UNKNOWN IMPORTED)
set_target_properties(GTest::GMock PROPERTIES
IMPORTED_LOCATION ${GMOCK_LIBRARY_PATH}
INTERFACE_INCLUDE_DIRECTORIES ${GMOCK_INCLUDE_DIR}
IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(GTest::GMock googletest)
add_library(GTest::GTestMain UNKNOWN IMPORTED)
set_target_properties(GTest::GTestMain PROPERTIES
IMPORTED_LOCATION ${GTEST_MAIN_LIBRARY_PATH}
INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIR}
IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(GTest::GTestMain googletest)
add_library(GTest::GMockMain UNKNOWN IMPORTED)
set_target_properties(GTest::GMockMain PROPERTIES
IMPORTED_LOCATION ${GMOCK_MAIN_LIBRARY_PATH}
INTERFACE_INCLUDE_DIRECTORIES ${GMOCK_INCLUDE_DIR}
IMPORTED_LINK_INTERFACE_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(GTest::GMockMain googletest)

View File

@ -40,6 +40,17 @@ if(GPU_API STREQUAL "CUDA")
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)") set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
if (GPU_LIB_OLD_CUBIN_HEADERS)
message(FATAL_ERROR "########################################################################\n"
"Found file(s) generated by the make-based build system in lib/gpu\n"
"Please run\n"
" make -C ${LAMMPS_LIB_SOURCE_DIR}/gpu -f Makefile.serial clean\n"
"to remove\n"
"########################################################################")
endif()
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu) file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu) list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
@ -79,7 +90,7 @@ if(GPU_API STREQUAL "CUDA")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_75,code=[sm_75,compute_75] ") string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_75,code=[sm_75,compute_75] ")
endif() endif()
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING}) -DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC} cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC}

View File

@ -35,8 +35,8 @@ if(DOWNLOAD_KOKKOS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(kokkos_build ExternalProject_Add(kokkos_build
URL https://github.com/kokkos/kokkos/archive/3.1.00.tar.gz URL https://github.com/kokkos/kokkos/archive/3.1.01.tar.gz
URL_MD5 f638a6c786f748a602b26faa0e96ebab URL_MD5 3ccb2100f7fc316891e7dad3bc33fa37
CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS} CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a
) )
@ -50,10 +50,7 @@ if(DOWNLOAD_KOKKOS)
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS) target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS)
add_dependencies(LAMMPS::KOKKOS kokkos_build) add_dependencies(LAMMPS::KOKKOS kokkos_build)
elseif(EXTERNAL_KOKKOS) elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3.1) find_package(Kokkos 3.1.01 REQUIRED CONFIG)
if(NOT Kokkos_FOUND)
message(FATAL_ERROR "KOKKOS library version 3.1 or later not found, help CMake to find it by setting KOKKOS_LIBRARY, or set DOWNLOAD_KOKKOS=ON to download it")
endif()
target_link_libraries(lammps PRIVATE Kokkos::kokkos) target_link_libraries(lammps PRIVATE Kokkos::kokkos)
else() else()
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)

View File

@ -2,7 +2,7 @@ option(FFT_SINGLE "Use single precision FFTs instead of double precision FFTs" O
set(FFTW "FFTW3") set(FFTW "FFTW3")
if(FFT_SINGLE) if(FFT_SINGLE)
set(FFTW "FFTW3F") set(FFTW "FFTW3F")
target_compile_definitions(lammps PUBLIC -DFFT_SINGLE) target_compile_definitions(lammps PRIVATE -DFFT_SINGLE)
endif() endif()
find_package(${FFTW} QUIET) find_package(${FFTW} QUIET)
if(${FFTW}_FOUND) if(${FFTW}_FOUND)
@ -17,8 +17,8 @@ string(TOUPPER ${FFT} FFT)
if(FFT STREQUAL "FFTW3") if(FFT STREQUAL "FFTW3")
find_package(${FFTW} REQUIRED) find_package(${FFTW} REQUIRED)
target_compile_definitions(lammps PUBLIC -DFFT_FFTW3) target_compile_definitions(lammps PRIVATE -DFFT_FFTW3)
target_link_libraries(lammps PUBLIC ${FFTW}::${FFTW}) target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW})
if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY) if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY)
option(FFT_FFTW_THREADS "Use threaded FFTW library" ON) option(FFT_FFTW_THREADS "Use threaded FFTW library" ON)
else() else()

View File

@ -6,7 +6,7 @@ if(TARGET LATTE::latte)
return() return()
endif() endif()
find_package(LATTE) find_package(LATTE 1.2.2 CONFIG)
if(LATTE_FOUND) if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF) set(DOWNLOAD_LATTE_DEFAULT OFF)
else() else()
@ -17,8 +17,8 @@ if(DOWNLOAD_LATTE)
message(STATUS "LATTE download requested - we will build our own") message(STATUS "LATTE download requested - we will build our own")
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(latte_build ExternalProject_Add(latte_build
URL https://github.com/lanl/LATTE/archive/v1.2.1.tar.gz URL https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz
URL_MD5 85ac414fdada2d04619c8f936344df14 URL_MD5 820e73a457ced178c08c71389a385de7
SOURCE_SUBDIR cmake SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES} -DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
@ -35,10 +35,6 @@ if(DOWNLOAD_LATTE)
target_link_libraries(lammps PRIVATE LAMMPS::LATTE) target_link_libraries(lammps PRIVATE LAMMPS::LATTE)
add_dependencies(LAMMPS::LATTE latte_build) add_dependencies(LAMMPS::LATTE latte_build)
else() else()
find_package(LATTE) find_package(LATTE 1.2.2 REQUIRED CONFIG)
if(NOT LATTE_FOUND) target_link_libraries(lammps PRIVATE LATTE::latte)
message(FATAL_ERROR "LATTE library not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
endif()
# latte needs lapack
target_link_libraries(lammps PRIVATE LATTE::latte ${LAPACK_LIBRARIES})
endif() endif()

View File

@ -1,8 +1,5 @@
enable_language(C) enable_language(C)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
cmake_policy(SET CMP0074 NEW)
endif()
find_package(HDF5 REQUIRED) find_package(HDF5 REQUIRED)
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES}) target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS}) target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})

View File

@ -1,8 +1,7 @@
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary. # USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio" # NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
cmake_policy(SET CMP0074 NEW) # may use NetCDF or PNetCDF with MPI, but must have NetCDF without
endif()
if(NOT BUILD_MPI) if(NOT BUILD_MPI)
find_package(NetCDF REQUIRED) find_package(NetCDF REQUIRED)
else() else()

View File

@ -4,48 +4,7 @@
option(ENABLE_TESTING "Enable testing" OFF) option(ENABLE_TESTING "Enable testing" OFF)
if(ENABLE_TESTING) if(ENABLE_TESTING)
enable_testing() enable_testing()
option(LAMMPS_TESTING_SOURCE_DIR "Location of lammps-testing source directory" "") get_filename_component(LAMMPS_UNITTEST_DIR ${LAMMPS_SOURCE_DIR}/../unittest ABSOLUTE)
option(LAMMPS_TESTING_GIT_TAG "Git tag of lammps-testing" "master") get_filename_component(LAMMPS_UNITTEST_BIN ${CMAKE_BINARY_DIR}/unittest ABSOLUTE)
mark_as_advanced(LAMMPS_TESTING_SOURCE_DIR LAMMPS_TESTING_GIT_TAG) add_subdirectory(${LAMMPS_UNITTEST_DIR} ${LAMMPS_UNITTEST_BIN})
if (CMAKE_VERSION VERSION_GREATER "3.10.3" AND NOT LAMMPS_TESTING_SOURCE_DIR)
include(FetchContent)
FetchContent_Declare(lammps-testing
GIT_REPOSITORY https://github.com/lammps/lammps-testing.git
GIT_TAG ${LAMMPS_TESTING_GIT_TAG}
)
FetchContent_GetProperties(lammps-testing)
if(NOT lammps-testing_POPULATED)
message(STATUS "Downloading tests...")
FetchContent_Populate(lammps-testing)
endif()
set(LAMMPS_TESTING_SOURCE_DIR ${lammps-testing_SOURCE_DIR})
elseif(NOT LAMMPS_TESTING_SOURCE_DIR)
message(WARNING "Full test-suite requires CMake >= 3.11 or copy of\n"
"https://github.com/lammps/lammps-testing in LAMMPS_TESTING_SOURCE_DIR")
endif()
add_test(NAME ShowHelp COMMAND $<TARGET_FILE:lmp> -help)
if(EXISTS ${LAMMPS_TESTING_SOURCE_DIR})
message(STATUS "Running test discovery...")
file(GLOB_RECURSE TEST_SCRIPTS ${LAMMPS_TESTING_SOURCE_DIR}/tests/core/*/in.*)
foreach(script_path ${TEST_SCRIPTS})
get_filename_component(TEST_NAME ${script_path} EXT)
get_filename_component(SCRIPT_NAME ${script_path} NAME)
get_filename_component(PARENT_DIR ${script_path} DIRECTORY)
string(SUBSTRING ${TEST_NAME} 1 -1 TEST_NAME)
string(REPLACE "-" "_" TEST_NAME ${TEST_NAME})
string(REPLACE "+" "_" TEST_NAME ${TEST_NAME})
set(TEST_NAME "test_core_${TEST_NAME}_serial")
add_test(NAME ${TEST_NAME} COMMAND $<TARGET_FILE:lmp> -in ${SCRIPT_NAME} WORKING_DIRECTORY ${PARENT_DIR})
endforeach()
list(LENGTH TEST_SCRIPTS NUM_TESTS)
message(STATUS "Found ${NUM_TESTS} tests.")
endif()
endif() endif()

View File

@ -3,17 +3,19 @@ set(temp_git_commit "(unknown)")
set(temp_git_branch "(unknown)") set(temp_git_branch "(unknown)")
set(temp_git_describe "(unknown)") set(temp_git_describe "(unknown)")
set(temp_git_info "false") set(temp_git_info "false")
if(GIT_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
message(STATUS "Git Directory: ${LAMMPS_DIR}/.git")
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
set(temp_git_info "true") set(temp_git_info "true")
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. rev-parse HEAD execute_process(COMMAND ${GIT_EXECUTABLE} -C ${LAMMPS_DIR} rev-parse HEAD
OUTPUT_VARIABLE temp_git_commit OUTPUT_VARIABLE temp_git_commit
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. rev-parse --abbrev-ref HEAD execute_process(COMMAND ${GIT_EXECUTABLE} -C ${LAMMPS_DIR} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE temp_git_branch OUTPUT_VARIABLE temp_git_branch
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. describe --dirty=-modified execute_process(COMMAND ${GIT_EXECUTABLE} -C ${LAMMPS_DIR} describe --dirty=-modified
OUTPUT_VARIABLE temp_git_describe OUTPUT_VARIABLE temp_git_describe
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)

View File

@ -1,4 +1,4 @@
.TH LAMMPS "5 May 2020" "2020-05-5" .TH LAMMPS "2 June 2020" "2020-06-02"
.SH NAME .SH NAME
.B LAMMPS .B LAMMPS
\- Molecular Dynamics Simulator. \- Molecular Dynamics Simulator.

View File

@ -107,7 +107,7 @@ re-compile and relink the LAMMPS executable with ``cmake --build .`` (or
``cmake .`` and then compile again. The included dependency tracking ``cmake .`` and then compile again. The included dependency tracking
should make certain that only the necessary subset of files are should make certain that only the necessary subset of files are
re-compiled. You can also delete compiled objects, libraries and re-compiled. You can also delete compiled objects, libraries and
executables with ``cmake --build . clean`` (or ``make clean``). executables with ``cmake --build . --target clean`` (or ``make clean``).
After compilation, you may optionally install the LAMMPS executable into After compilation, you may optionally install the LAMMPS executable into
your system with: your system with:

View File

@ -57,53 +57,252 @@ variable during configuration. Examples:
.. _testing: .. _testing:
Code Coverage and Testing Code Coverage and Unit Testing
--------------------------------------- ------------------------------
We do extensive regression testing of the LAMMPS code base on a continuous The LAMMPS code is subject to multiple levels of automated testing
basis. Some of the logic to do this has been added to the CMake build so during development: integration testing (i.e. whether the code compiles
developers can run the tests directly on their workstation. on various platforms and with a variety of settings), unit testing
(i.e. whether certain individual parts of the code produce the expected
results for given inputs), run testing (whether selected complete input
decks run without crashing for multiple configurations), and regression
testing (i.e. whether selected input examples reproduce the same
results over a given number of steps and operations within a given
error margin). The status of this automated testing can be viewed on
`https://ci.lammps.org <https://ci.lammps.org>`_.
The unit testing facility is integrated into the CMake build process
of the LAMMPS source code distribution itself. It can be enabled by
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
It requires the `YAML <http://pyyaml.org/>`_ library and development
headers to compile and will download and compile a recent version of the
`Googletest <https://github.com/google/googletest/>`_ C++ test framework
for implementing the tests.
After compilation is complete, the unit testing is started in the build
folder using the ``ctest`` command, which is part of the CMake software.
The output of this command will be looking something like this::
[...]$ ctest
Test project /home/akohlmey/compile/lammps/build-testing
Start 1: MolPairStyle:hybrid-overlay
1/26 Test #1: MolPairStyle:hybrid-overlay ......... Passed 0.02 sec
Start 2: MolPairStyle:hybrid
2/26 Test #2: MolPairStyle:hybrid ................. Passed 0.01 sec
Start 3: MolPairStyle:lj_class2
[...]
Start 25: AngleStyle:harmonic
25/26 Test #25: AngleStyle:harmonic ................. Passed 0.01 sec
Start 26: AngleStyle:zero
26/26 Test #26: AngleStyle:zero ..................... Passed 0.01 sec
100% tests passed, 0 tests failed out of 26
Total Test time (real) = 0.27 sec
The ``ctest`` command has many options, the most important ones are:
.. list-table::
* - Option
- Function
* - -V
- verbose output: display output of individual test runs
* - -j <num>
- parallel run: run <num> tests in parallel
* - -R <regex>
- run subset of tests matching the regular expression <regex>
* - -E <regex>
- exclude subset of tests matching the regular expression <regex>
* - -N
- dry-run: display list of tests without running them
In its full implementation, the unit test framework will consist of multiple
kinds of tests implemented in different programming languages (C++, C, Python,
Fortran) and testing different aspects of the LAMMPS software and its features.
At the moment only tests for "force styles" are implemented. More on those
in the next section.
.. note:: .. note::
this is incomplete and only represents a small subset of tests that we run This unit test framework is new and still under development.
The coverage is only minimal and will be expanded over time.
Tests styles of the same kind of style (e.g. pair styles or
bond styles) are performed with the same executable using
different input files in YAML format. So to add a test for
another pair style can be done by copying the YAML file and
editing the style settings and then running the individual test
program with a flag to update the computed reference data.
Detailed documentation about how to add new test program and
the contents of the YAML files for existing test programs
will be provided in time as well.
Unit tests for force styles
^^^^^^^^^^^^^^^^^^^^^^^^^^^
A large part of LAMMPS are different "styles" for computing non-bonded
and bonded interactions selected through the :doc:`pair_style`,
:doc:`bond_style`, :doc:`angle_style`, :doc:`dihedral_style`,
:doc:`improper_style`, and :doc:`kspace_style`. Since these all share
common interfaces, it is possible to write generic test programs that
will call those common interfaces for small test systems with less than
100 atoms and compare the results with pre-recorded reference results.
A test run is then a a collection multiple individual test runs each
with many comparisons to reference results based on template input
files, individual command settings, relative error margins, and
reference data stored in a YAML format file with ``.yaml``
suffix. Currently the programs ``pair_style``, ``bond_style``, and
``angle_style`` are implemented. They will compare forces, energies and
(global) stress for all atoms after a ``run 0`` calculation and after a
few steps of MD with :doc:`fix nve <fix_nve>`, each in multiple variants
with different settings and also for multiple accelerated styles. If a
prerequisite style or package is missing, the individual tests are
skipped. All tests will be executed on a single MPI process, so using
the CMake option ``-D BUILD_MPI=off`` can significantly speed up testing,
since this will skip the MPI initialization for each test run.
Below is an example command and output:
.. parsed-literal::
[tests]$ pair_style mol-pair-lj_cut.yaml
[==========] Running 6 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 6 tests from PairStyle
[ RUN ] PairStyle.plain
[ OK ] PairStyle.plain (24 ms)
[ RUN ] PairStyle.omp
[ OK ] PairStyle.omp (18 ms)
[ RUN ] PairStyle.intel
[ OK ] PairStyle.intel (6 ms)
[ RUN ] PairStyle.opt
[ SKIPPED ] PairStyle.opt (0 ms)
[ RUN ] PairStyle.single
[ OK ] PairStyle.single (7 ms)
[ RUN ] PairStyle.extract
[ OK ] PairStyle.extract (6 ms)
[----------] 6 tests from PairStyle (62 ms total)
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (63 ms total)
[ PASSED ] 5 tests.
[ SKIPPED ] 1 test, listed below:
[ SKIPPED ] PairStyle.opt
In this particular case, 5 out of 6 sets of tests were conducted, the
tests for the ``lj/cut/opt`` pair style was skipped, since the tests
executable did not include it. To learn what individual tests are performed,
you (currently) need to read the source code. You can use code coverage
recording (see next section) to confirm how well the tests cover the individual
source files.
The force style test programs have a common set of options:
.. list-table::
* - Option
- Function
* - -g <newfile>
- regenerate reference data in new YAML file
* - -u
- update reference data in the original YAML file
* - -s
- print error statistics for each group of comparisons
* - -v
- verbose output: also print the executed LAMMPS commands
To add a test for a style that is not yet covered, it is usually best
to copy a YAML file for a similar style to a new file, edit the details
of the style (how to call it, how to set its coefficients) and then
run test command with either the *-g* and the replace the initial
test file with the regenerated one or the *-u* option. The *-u* option
will destroy the original file, if the generation run does not complete,
so using *-g* is recommended unless the YAML file is fully tested
and working.
.. admonition:: Recommendations and notes for YAML files
:class: note
- The reference results should be recorded without any code
optimization or related compiler flags enabled.
- The ``epsilon`` parameter defines the relative precision with which
the reference results must be met. The test geometries often have
high and low energy parts and thus a significant impact from
floating-point math truncation errors is to be expected. Some
functional forms and potentials are more noisy than others, so this
parameter needs to be adjusted. Typically a value around 1.0e-13
can be used, but it may need to be as large as 1.0e-8 in some
cases.
- The tests for pair styles from OPT, USER-OMP and USER-INTEL are
performed with automatically rescaled epsilon to account for
additional loss of precision from code optimizations and different
summation orders.
- When compiling with aggressive compiler optimization, some tests
are likely to fail. It is recommended to inspect the individual
tests in detail to decide whether the specific error for a specific
property is acceptable (it often is), or this may be an indication
of mis-compiled code (or undesired large of precision due to
reordering of operations).
Collect and visualize code coverage metrics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can also collect code coverage metrics while running LAMMPS or the
tests by enabling code coverage support during the CMake configuration:
.. code-block:: bash .. code-block:: bash
-D ENABLE_TESTING=value # enable simple run tests of LAMMPS, value = no (default) or yes -D ENABLE_COVERAGE=on # enable coverage measurements (off by default)
-D LAMMPS_TESTING_SOURCE_DIR=path # path to lammps-testing repository (option if in custom location)
-D LAMMPS_TESTING_GIT_TAG=value # version of lammps-testing repository that should be used, value = master (default) or custom git commit or tag
If you enable testing in the CMake build it will create an additional This will instrument all object files to write information about which
target called "test". You can run them with: lines of code were accessed during execution in files next to the
corresponding object files. These can be post-processed to visually
show the degree of coverage and which code paths are accessed and which
are not taken. When working on unit tests (see above), this can be
extremely helpful to determine which parts of the code are not executed
and thus what kind of tests are still missing. The coverage data is
cumulative, i.e. new data is added with each new run.
Enabling code coverage will also add the following build targets to
generate coverage reports after running the LAMMPS executable or the
unit tests:
.. code-block:: bash .. code-block:: bash
cmake --build . test make gen_coverage_html # generate coverage report in HTML format
make gen_coverage_xml # generate coverage report in XML format
make clean_coverage_html # delete folder with HTML format coverage report
make reset_coverage # delete all collected coverage data and HTML output
The test cases used come from the lammps-testing repository. They are These reports require `GCOVR <https://gcovr.com/>`_ to be installed. The easiest way
derivatives of the examples folder with some modifications to make the to do this to install it via pip:
run faster.
You can also collect code coverage metrics while running the tests by
enabling coverage support during building.
.. code-block:: bash
-D ENABLE_COVERAGE=value # enable coverage measurements, value = no (default) or yes
This will also add the following targets to generate coverage reports
after running the LAMMPS executable:
.. code-block:: bash
make test # run tests first!
make gen_coverage_html # generate coverage report in HTML format
make gen_coverage_xml # generate coverage report in XML format
These reports require GCOVR to be installed. The easiest way to do this
to install it via pip:
.. code-block:: bash .. code-block:: bash
pip install git+https://github.com/gcovr/gcovr.git pip install git+https://github.com/gcovr/gcovr.git
After post-processing with ``gen_coverage_html`` the results are in
a folder ``coverage_html`` and can be viewed with a web browser.
The images below illustrate how the data is presented.
.. list-table::
* - .. figure:: JPG/coverage-overview-top.png
:target: JPG/coverage-overview-top.png
Top of the overview page
- .. figure:: JPG/coverage-overview-manybody.png
:target: JPG/coverage-overview-manybody.png
Styles with good coverage
- .. figure:: JPG/coverage-file-top.png
:target: JPG/coverage-file-top.png
Top of individual source page
- .. figure:: JPG/coverage-file-branches.png
:target: JPG/coverage-file-branches.png
Source page with branches

View File

@ -132,6 +132,10 @@ Thus the GPU_ARCH setting is merely an optimization, to have code for
the preferred GPU architecture directly included rather than having to wait the preferred GPU architecture directly included rather than having to wait
for the JIT compiler of the CUDA driver to translate it. for the JIT compiler of the CUDA driver to translate it.
When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
using the traditional build procedure. CMake will detect files generated by that
process and will terminate with an error and a suggestion for how to remove them.
If you are compiling with HIP, note that before running CMake you will have to If you are compiling with HIP, note that before running CMake you will have to
set appropriate environment variables. Some variables such as set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` or :code:`CUDA_PATH` are necessary for :code:`hipcc` :code:`HCC_AMDGPU_TARGET` or :code:`CUDA_PATH` are necessary for :code:`hipcc`
@ -320,12 +324,13 @@ to have an executable that will run on this and newer architectures.
.. note:: .. note::
If you run Kokkos on a newer GPU architecture than what LAMMPS was If you run Kokkos on a different GPU architecture than what LAMMPS
compiled with, there will be a delay during device initialization was compiled with, there will be a delay during device initialization
since the just-in-time compiler has to recompile all GPU kernels while the just-in-time compiler is recompiling all GPU kernels for
for the new hardware. This is, however, not possible when compiled the new hardware. This is, however, only supported for GPUs of the
for NVIDIA GPUs with CC 3.x (Kepler) for GPUs with CC 5.0 (Maxwell) **same** major hardware version and different minor hardware versions,
and newer as they are not compatible. e.g. 5.0 and 5.2 but not 5.2 and 6.0. LAMMPS will abort with an
error message indicating a mismatch, if that happens.
The settings discussed below have been tested with LAMMPS and are The settings discussed below have been tested with LAMMPS and are
confirmed to work. Kokkos is an active project with ongoing improvements confirmed to work. Kokkos is an active project with ongoing improvements
@ -580,9 +585,14 @@ recommended when developing a Kokkos-enabled style in LAMMPS.
The CMake option ``-DKokkos_ENABLE_CUDA_UVM=on`` or the makefile The CMake option ``-DKokkos_ENABLE_CUDA_UVM=on`` or the makefile
setting ``KOKKOS_CUDA_OPTIONS=enable_lambda,force_uvm`` enables the setting ``KOKKOS_CUDA_OPTIONS=enable_lambda,force_uvm`` enables the
use of CUDA "Unified Virtual Memory" in Kokkos. Please note, that use of CUDA "Unified Virtual Memory" (UVM) in Kokkos. UVM allows to
the LAMMPS KOKKOS package must **always** be compiled with the transparently use RAM on the host to supplement the memory used on the
*enable_lambda* option when using GPUs. GPU (with some performance penalty) and thus enables running larger
problems that would otherwise not fit into the RAM on the GPU.
Please note, that the LAMMPS KOKKOS package must **always** be compiled
with the *enable_lambda* option when using GPUs. The CMake configuration
will thus always enable it.
---------- ----------

View File

@ -94,6 +94,7 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`package <package>` * :doc:`package <package>`
* :doc:`pair_coeff <pair_coeff>` * :doc:`pair_coeff <pair_coeff>`
* :doc:`pair_modify <pair_modify>` * :doc:`pair_modify <pair_modify>`
* :doc:`pair_style <pair_style>`
* :doc:`pair_write <pair_write>` * :doc:`pair_write <pair_write>`
* :doc:`partition <partition>` * :doc:`partition <partition>`
* :doc:`prd <prd>` * :doc:`prd <prd>`

View File

@ -79,9 +79,6 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`ke/atom/eff <compute_ke_atom_eff>` * :doc:`ke/atom/eff <compute_ke_atom_eff>`
* :doc:`ke/eff <compute_ke_eff>` * :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>` * :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`meso/e/atom <compute_meso_e_atom>`
* :doc:`meso/rho/atom <compute_meso_rho_atom>`
* :doc:`meso/t/atom <compute_meso_t_atom>`
* :doc:`momentum <compute_momentum>` * :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>` * :doc:`msd <compute_msd>`
* :doc:`msd/chunk <compute_msd_chunk>` * :doc:`msd/chunk <compute_msd_chunk>`
@ -133,6 +130,9 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`sna/atom <compute_sna_atom>` * :doc:`sna/atom <compute_sna_atom>`
* :doc:`snad/atom <compute_sna_atom>` * :doc:`snad/atom <compute_sna_atom>`
* :doc:`snav/atom <compute_sna_atom>` * :doc:`snav/atom <compute_sna_atom>`
* :doc:`sph/e/atom <compute_sph_e_atom>`
* :doc:`sph/rho/atom <compute_sph_rho_atom>`
* :doc:`sph/t/atom <compute_sph_t_atom>`
* :doc:`spin <compute_spin>` * :doc:`spin <compute_spin>`
* :doc:`stress/atom <compute_stress_atom>` * :doc:`stress/atom <compute_stress_atom>`
* :doc:`stress/mop <compute_stress_mop>` * :doc:`stress/mop <compute_stress_mop>`

View File

@ -95,9 +95,7 @@ OPT.
* :doc:`lb/viscous <fix_lb_viscous>` * :doc:`lb/viscous <fix_lb_viscous>`
* :doc:`lineforce <fix_lineforce>` * :doc:`lineforce <fix_lineforce>`
* :doc:`manifoldforce <fix_manifoldforce>` * :doc:`manifoldforce <fix_manifoldforce>`
* :doc:`meso <fix_meso>`
* :doc:`meso/move <fix_meso_move>` * :doc:`meso/move <fix_meso_move>`
* :doc:`meso/stationary <fix_meso_stationary>`
* :doc:`momentum (k) <fix_momentum>` * :doc:`momentum (k) <fix_momentum>`
* :doc:`move <fix_move>` * :doc:`move <fix_move>`
* :doc:`mscg <fix_mscg>` * :doc:`mscg <fix_mscg>`
@ -149,6 +147,7 @@ OPT.
* :doc:`oneway <fix_oneway>` * :doc:`oneway <fix_oneway>`
* :doc:`orient/bcc <fix_orient>` * :doc:`orient/bcc <fix_orient>`
* :doc:`orient/fcc <fix_orient>` * :doc:`orient/fcc <fix_orient>`
* :doc:`orient/eco <fix_orient_eco>`
* :doc:`phonon <fix_phonon>` * :doc:`phonon <fix_phonon>`
* :doc:`pimd <fix_pimd>` * :doc:`pimd <fix_pimd>`
* :doc:`planeforce <fix_planeforce>` * :doc:`planeforce <fix_planeforce>`
@ -202,6 +201,8 @@ OPT.
* :doc:`smd/move_tri_surf <fix_smd_move_triangulated_surface>` * :doc:`smd/move_tri_surf <fix_smd_move_triangulated_surface>`
* :doc:`smd/setvel <fix_smd_setvel>` * :doc:`smd/setvel <fix_smd_setvel>`
* :doc:`smd/wall_surface <fix_smd_wall_surface>` * :doc:`smd/wall_surface <fix_smd_wall_surface>`
* :doc:`sph <fix_sph>`
* :doc:`sph/stationary <fix_sph_stationary>`
* :doc:`spring <fix_spring>` * :doc:`spring <fix_spring>`
* :doc:`spring/chunk <fix_spring_chunk>` * :doc:`spring/chunk <fix_spring_chunk>`
* :doc:`spring/rg <fix_spring_rg>` * :doc:`spring/rg <fix_spring_rg>`

View File

@ -92,8 +92,8 @@ OPT.
* :doc:`drip <pair_drip>` * :doc:`drip <pair_drip>`
* :doc:`eam (gikot) <pair_eam>` * :doc:`eam (gikot) <pair_eam>`
* :doc:`eam/alloy (gikot) <pair_eam>` * :doc:`eam/alloy (gikot) <pair_eam>`
* :doc:`eam/cd (o) <pair_eam>` * :doc:`eam/cd <pair_eam>`
* :doc:`eam/cd/old (o) <pair_eam>` * :doc:`eam/cd/old <pair_eam>`
* :doc:`eam/fs (gikot) <pair_eam>` * :doc:`eam/fs (gikot) <pair_eam>`
* :doc:`edip (o) <pair_edip>` * :doc:`edip (o) <pair_edip>`
* :doc:`edip/multi <pair_edip>` * :doc:`edip/multi <pair_edip>`

View File

@ -415,8 +415,10 @@ This is particularly convenient, if you have set a custom build command
via the ``CMAKE_MAKE_PROGRAM`` variable. via the ``CMAKE_MAKE_PROGRAM`` variable.
When calling the build program, you can also select which "target" is to When calling the build program, you can also select which "target" is to
be build through appending the name of the target to the build command. be build through appending the ``--target`` flag and the name of the target
Example: ``cmake --build . all``. The following abstract targets are available: to the build command. When using ``make`` as build tool, you can just append
the target name to the command. Example: ``cmake --build . --target all`` or
``make all``. The following abstract targets are available:
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
@ -432,7 +434,7 @@ Example: ``cmake --build . all``. The following abstract targets are available:
* - ``install`` * - ``install``
- install all target files into folders in ``CMAKE_INSTALL_PREFIX`` - install all target files into folders in ``CMAKE_INSTALL_PREFIX``
* - ``test`` * - ``test``
- run some simple tests (if configured with ``-D ENABLE_TESTING=on``) - run some tests (if configured with ``-D ENABLE_TESTING=on``)
* - ``clean`` * - ``clean``
- remove all generated files - remove all generated files

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

View File

@ -3,115 +3,169 @@ Atom styles
Classes that define an :doc:`atom style <atom_style>` are derived from Classes that define an :doc:`atom style <atom_style>` are derived from
the AtomVec class and managed by the Atom class. The atom style the AtomVec class and managed by the Atom class. The atom style
determines what attributes are associated with an atom. A new atom determines what attributes are associated with an atom and
style can be created if one of the existing atom styles does not communicated when it is a ghost atom or migrates to a new processor.
define all the attributes you need to store and communicate with A new atom style can be created if one of the existing atom styles
atoms. does not define all the attributes you need to store and communicate
with atoms.
Atom_vec_atomic.cpp is a simple example of an atom style. Atom_vec_atomic.cpp is the simplest example of an atom style.
Examining the code for others will make these instructions more clear.
Here is a brief description of methods you define in your new derived Note that the :doc:`atom style hybrid <atom_style>` command can be
class. See atom_vec.h for details. used to define atoms or particles which have the union of properties
of individual styles. Also the :doc:`fix property/atom <fix_property_atom>`
command can be used to add a single property (e.g. charge
or a molecule ID) to a style that does not have it. It can also be
used to add custom properties to an atom, with options to communicate
them with ghost atoms or read them from a data file. Other LAMMPS
commands can access these custom properties, as can new pair, fix,
compute styles that are written to work with these properties. For
example, the :doc:`set <set>` command can be used to set the values of
custom per-atom properties from an input script. All of these methods
are less work than writing code for a new atom style.
+-------------------------+--------------------------------------------------------------------------------+ If you follow these directions your new style will automatically work
| init | one time setup (optional) | in tandem with others via the :doc:`atom_style hybrid <atom_style>`
+-------------------------+--------------------------------------------------------------------------------+ command.
| grow | re-allocate atom arrays to longer lengths (required) |
+-------------------------+--------------------------------------------------------------------------------+
| grow_reset | make array pointers in Atom and AtomVec classes consistent (required) |
+-------------------------+--------------------------------------------------------------------------------+
| copy | copy info for one atom to another atom's array locations (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_comm | store an atom's info in a buffer communicated every timestep (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_comm_vel | add velocity info to communication buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_comm_hybrid | store extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_comm | retrieve an atom's info from the buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_comm_vel | also retrieve velocity info (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_comm_hybrid | retrieve extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_reverse | store an atom's info in a buffer communicating partial forces (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_reverse_hybrid | store extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_reverse | retrieve an atom's info from the buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_reverse_hybrid | retrieve extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_border | store an atom's info in a buffer communicated on neighbor re-builds (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_border_vel | add velocity info to buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_border_hybrid | store extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_border | retrieve an atom's info from the buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_border_vel | also retrieve velocity info (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_border_hybrid | retrieve extra info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_exchange | store all an atom's info to migrate to another processor (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_exchange | retrieve an atom's info from the buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| size_restart | number of restart quantities associated with proc's atoms (required) |
+-------------------------+--------------------------------------------------------------------------------+
| pack_restart | pack atom quantities into a buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| unpack_restart | unpack atom quantities from a buffer (required) |
+-------------------------+--------------------------------------------------------------------------------+
| create_atom | create an individual atom of this style (required) |
+-------------------------+--------------------------------------------------------------------------------+
| data_atom | parse an atom line from the data file (required) |
+-------------------------+--------------------------------------------------------------------------------+
| data_atom_hybrid | parse additional atom info unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| data_vel | parse one line of velocity information from data file (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| data_vel_hybrid | parse additional velocity data unique to this atom style (optional) |
+-------------------------+--------------------------------------------------------------------------------+
| memory_usage | tally memory allocated by atom arrays (required) |
+-------------------------+--------------------------------------------------------------------------------+
The constructor of the derived class sets values for several variables The first step is to define a set of strings in the constructor of the
that you must set when defining a new atom style, which are documented new derived class. Each string will have zero or more space-separated
in atom_vec.h. New atom arrays are defined in atom.cpp. Search for variable names which are identical to those used in the atom.h header
the word "customize" and you will find locations you will need to file for per-atom properties. Note that some represent per-atom
modify. vectors (q, molecule) while other are per-atom arrays (x,v). For all
but the last 2 strings you do not need to specify any of
(id,type,x,v,f). Those are included automatically as needed in the
other strings.
.. note:: .. list-table::
It is possible to add some attributes, such as a molecule ID, to * - fields_grow
atom styles that do not have them via the :doc:`fix property/atom <fix_property_atom>` command. This command also - full list of properties which is allocated and stored
allows new custom attributes consisting of extra integer or * - fields_copy
floating-point values to be added to atoms. See the :doc:`fix property/atom <fix_property_atom>` doc page for examples of cases - list of properties to copy atoms are rearranged on-processor
where this is useful and details on how to initialize, access, and * - fields_comm
output the custom values. - list of properties communicated to ghost atoms every step
* - fields_comm_vel
- additional properties communicated if :doc:`comm_modify vel <atom_style>` is used
* - fields_reverse
- list of properties summed from ghost atoms every step
* - fields_border
- list of properties communicated with ghost atoms every reneighboring step
* - fields_border_vel
- additional properties communicated if :doc:`comm_modify vel <atom_style>` is used
* - fields_exchange
- list of properties communicated when an atom migrates to another processor
* - fields_restart
- list of properties written/read to/from a restart file
* - fields_create
- list of properties defined when an atom is created by :doc:`create_atoms <create_atoms>`
* - fields_data_atom
- list of properties (in order) in the Atoms section of a data file, as read by :doc:`read_data <read_data>`
* - fields_data_vel
- list of properties (in order) in the Velocities section of a data file, as read by :doc:`read_data <read_data>`
New :doc:`pair styles <pair_style>`, :doc:`fixes <fix>`, or In these strings you can list variable names which LAMMPS already
:doc:`computes <compute>` can be added to LAMMPS, as discussed below. defines (in some other atom style), or you can create new variable
The code for these classes can use the per-atom properties defined by names. You should not re-use a LAMMPS variable for something with
fix property/atom. The Atom class has a find_custom() method that is different meaning in your atom style. If the meaning is related, but
useful in this context: interpreted differently by your atom style, then using the same
variable name means a user should not use your style and the other
style together in a :doc:`atom_style hybrid <atom_style>` command.
Because there will only be one value of the variable and different
parts of LAMMPS will then likely use it differently. LAMMPS has
no way of checking for this.
.. code-block:: c++ If you are defining new variable names then make them descriptive and
unique to your new atom style. For example choosing "e" for energy is
a bad choice; it is too generic. A better choice would be "e_foo",
where "foo" is specific to your style.
int index = atom->find_custom(char *name, int &flag); If any of the variable names in your new atom style do not exist in
LAMMPS, you need to add them to the src/atom.h and atom.cpp files.
The "name" of a custom attribute, as specified in the :doc:`fix property/atom <fix_property_atom>` command, is checked to verify Search for the word "customize" or "customization" in these 2 files to
that it exists and its index is returned. The method also sets flag = see where to add your variable. Adding a flag to the 2nd
0/1 depending on whether it is an integer or floating-point attribute. customization section in atom.h is only necessary if your code (e.g. a
The vector of values associated with the attribute can then be pair style) needs to check that a per-atom property is defined. These
accessed using the returned index as flags should also be set in the constructor of the atom style child
class.
.. code-block:: c++ In atom.cpp, aside from the constructor and destructor, there are 3
methods that a new variable name or flag needs to be added to.
int *ivector = atom->ivector[index]; In Atom::peratom_create() when using the add_peratom() method, a
double *dvector = atom->dvector[index]; final length argument of 0 is for per-atom vectors, a length > 1 is
for per-atom arrays. Note the use of an extra per-thread flag and the
add_peratom_vary() method when last dimension of the array is
variable-length.
Ivector or dvector are vectors of length Nlocal = # of owned atoms, Adding the variable name to Atom::extract() enable the per-atom data
which store the attributes of individual atoms. to be accessed through the :doc:`LAMMPS library interface
<Howto_library>` by a calling code, including from :doc:`Python
<Python_head>`.
The constructor of the new atom style will also typically set a few
flags which are defined at the top of atom_vec.h. If these are
unclear, see how other atom styles use them.
The grow_pointers() method is also required to make
a copy of peratom data pointers, as explained in the code.
There are a number of other optional methods which your atom style can
implement. These are only needed if you need to do something
out-of-the-ordinary which the default operation of the AtomVec parent
class does not take care of. The best way to figure out why they are
sometimes useful is to look at how other atom styles use them.
* process_args = use if the atom style has arguments
* init = called before each run
* force_clear = called before force computations each timestep
A few atom styles define "bonus" data associated with some or all of
their particles, such as :doc:`atom_style ellipsoid or tri
<atom_style>`. These methods work with that data:
* copy_bonus
* clear_bonus
* pack_comm_bonus
* unpack_comm_bonus
* pack_border_bonus
* unpack_border_bonus
* pack_exchange_bonus
* unpack_exchange_bonus
* size_restart_bonus
* pack_restart_bonus
* unpack_restart_bonus
* data_atom_bonus
* memory_usage_bonus
The :doc:`atom_style body <atom_style>` command can define a particle
geometry with an arbitrary number of values. This method reads it
from a data file:
* data_body
These methods are called before or after operations handled by the
parent AtomVec class. They allow an atom style to do customized
operations on the per-atom values. For example :doc:`atom_style
sphere <atom_style>` reads a diameter and density of each particle
from a data file. But these need to be converted internally to a
radius and mass. That operation is done in the data_atom_post()
method.
* pack_restart_pre
* pack_restart_post
* unpack_restart_init
* create_atom_post
* data_atom_post
* pack_data_pre
* pack_data_post
These methods enable the :doc:`compute property/atom <compute_property_atom>`
command to access per-atom variables it does not
already define as arguments, so that they can be written to a dump
file or used by other LAMMPS commands.
* property_atom
* pack_property_atom

View File

@ -1,37 +1,51 @@
Submitting new features for inclusion in LAMMPS Submitting new features for inclusion in LAMMPS
=============================================== ===============================================
We encourage users to submit new features or modifications for LAMMPS We encourage users to submit new features or modifications for LAMMPS to
to `the core developers <https://lammps.sandia.gov/authors.html>`_ so they `the core developers <https://lammps.sandia.gov/authors.html>`_ so they
can be added to the LAMMPS distribution. The preferred way to manage can be added to the LAMMPS distribution. The preferred way to manage and
and coordinate this is as of Fall 2016 via the LAMMPS project on coordinate this is via the LAMMPS project on `GitHub
`GitHub <https://github.com/lammps/lammps>`_. An alternative is to <https://github.com/lammps/lammps>`_. Please see the :doc:`GitHub
contact the LAMMPS developers or the indicated developer of a package Tutorial <Howto_github>` for a demonstration on how to do that. An
or feature directly and send in your contribution via e-mail. alternative is to contact the LAMMPS developers or the indicated
developer of a package or feature directly and send in your contribution
via e-mail, but that can add a significant delay on getting your
contribution included, depending on how busy the developer is you
contact, how complex a task it would be to integrate that code, and how
many - if any - changes are required before the code can be included.
For any larger modifications or programming project, you are For any larger modifications or programming project, you are encouraged
encouraged to contact the LAMMPS developers ahead of time, in order to to contact the LAMMPS developers ahead of time, in order to discuss
discuss implementation strategies and coding guidelines, that will implementation strategies and coding guidelines, that will make it
make it easier to integrate your contribution and result in less work easier to integrate your contribution and result in less work for
for everybody involved. You are also encouraged to search through the everybody involved. You are also encouraged to search through the list
list of `open issues on GitHub <https://github.com/lammps/lammps/issues>`_ and submit a new issue of `open issues on GitHub <https://github.com/lammps/lammps/issues>`_
for a planned feature, so you would not duplicate the work of others and submit a new issue for a planned feature, so you would not duplicate
(and possibly get scooped by them) or have your work duplicated by the work of others (and possibly get scooped by them) or have your work
others. duplicated by others.
How quickly your contribution will be integrated depends largely on For informal communication with (some of) the LAMMPS developers you may
how much effort it will cause to integrate and test it, how much it ask to join the `LAMMPS developers on Slack <https://lammps.slack.com>`_.
requires changes to the core codebase, and of how much interest it is This slack work space is by invitation only. Thus for access, please
to the larger LAMMPS community. Please see below for a checklist of send an e-mail to ``slack@lammps.org`` explaining what part of LAMMPS
typical requirements. Once you have prepared everything, see the you are working on. Only discussions related to LAMMPS development are
:doc:`Using GitHub with LAMMPS Howto <Howto_github>` doc page for instructions on how to tolerated, so this is **NOT** for people that look for help with compiling,
submit your changes or new files through a GitHub pull request. If you installing, or using LAMMPS. Please contact the `lammps-users mailing
prefer to submit patches or full files, you should first make certain, list <https://lammps.sandia.gov>`_ for those purposes instead.
that your code works correctly with the latest patch-level version of
LAMMPS and contains all bug fixes from it. Then create a gzipped tar How quickly your contribution will be integrated depends largely on how
file of all changed or added files or a corresponding patch file using much effort it will cause to integrate and test it, how much it requires
'diff -u' or 'diff -c' and compress it with gzip. Please only use gzip changes to the core codebase, and of how much interest it is to the
compression, as this works well on all platforms. larger LAMMPS community. Please see below for a checklist of typical
requirements. Once you have prepared everything, see the :doc:`Using
GitHub with LAMMPS Howto <Howto_github>` doc page for instructions on
how to submit your changes or new files through a GitHub pull
request. If you prefer to submit patches or full files, you should first
make certain, that your code works correctly with the latest patch-level
version of LAMMPS and contains all bug fixes from it. Then create a
gzipped tar file of all changed or added files or a corresponding patch
file using 'diff -u' or 'diff -c' and compress it with gzip. Please only
use gzip compression, as this works well on all platforms.
If the new features/files are broadly useful we may add them as core If the new features/files are broadly useful we may add them as core
files to LAMMPS or as part of a :doc:`standard package <Packages_standard>`. Else we will add them as a files to LAMMPS or as part of a :doc:`standard package <Packages_standard>`. Else we will add them as a

View File

@ -2064,7 +2064,7 @@ molecules, and chiral-sensitive reactions.
* examples/USER/reaction * examples/USER/reaction
* `2017 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug17/pdf/gissinger.pdf>`_ * `2017 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug17/pdf/gissinger.pdf>`_
* `2019 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug19/talk_gissinger.pdf>`_ * `2019 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug19/talk_gissinger.pdf>`_
* disarmmd.org * reacter.org
---------- ----------

View File

@ -10,7 +10,7 @@ Syntax
atom_style style args atom_style style args
* style = *angle* or *atomic* or *body* or *bond* or *charge* or *dipole* or *dpd* or *edpd* or *mdpd* or *tdpd* or *electron* or *ellipsoid* or *full* or *line* or *meso* or *molecular* or *peri* or *smd* or *sphere* or *spin* or *tri* or *template* or *hybrid* * style = *angle* or *atomic* or *body* or *bond* or *charge* or *dipole* or *dpd* or *edpd* or *electron* or *ellipsoid* or *full* or *line* or *mdpd* or *molecular* or *peri* or *smd* or *sph* or *sphere* or *spin* or *tdpd* or *tri* or *template* or *hybrid*
.. parsed-literal:: .. parsed-literal::
@ -18,7 +18,9 @@ Syntax
*body* args = bstyle bstyle-args *body* args = bstyle bstyle-args
bstyle = style of body particles bstyle = style of body particles
bstyle-args = additional arguments specific to the bstyle bstyle-args = additional arguments specific to the bstyle
see the :doc:`Howto body <Howto_body>` doc page for details see the :doc:`Howto body <Howto_body>` doc
page for details
*sphere* arg = 0/1 (optional) for static/dynamic particle radii
*tdpd* arg = Nspecies *tdpd* arg = Nspecies
Nspecies = # of chemical species Nspecies = # of chemical species
*template* arg = template-ID *template* arg = template-ID
@ -91,10 +93,6 @@ quantities.
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *edpd* | temperature and heat capacity | eDPD particles | | *edpd* | temperature and heat capacity | eDPD particles |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *mdpd* | density | mDPD particles |
+--------------+-----------------------------------------------------+--------------------------------------+
| *tdpd* | chemical concentration | tDPD particles |
+--------------+-----------------------------------------------------+--------------------------------------+
| *electron* | charge and spin and eradius | electronic force field | | *electron* | charge and spin and eradius | electronic force field |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *ellipsoid* | shape, quaternion, angular momentum | aspherical particles | | *ellipsoid* | shape, quaternion, angular momentum | aspherical particles |
@ -103,7 +101,7 @@ quantities.
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *line* | end points, angular velocity | rigid bodies | | *line* | end points, angular velocity | rigid bodies |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *meso* | rho, e, cv | SPH particles | | *mdpd* | density | mDPD particles |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules | | *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
@ -111,10 +109,14 @@ quantities.
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *smd* | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles | | *smd* | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *sph* | rho, esph, cv | SPH particles |
+--------------+-----------------------------------------------------+--------------------------------------+
| *sphere* | diameter, mass, angular velocity | granular models | | *sphere* | diameter, mass, angular velocity | granular models |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *spin* | magnetic moment | system with magnetic particles | | *spin* | magnetic moment | system with magnetic particles |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *tdpd* | chemical concentration | tDPD particles |
+--------------+-----------------------------------------------------+--------------------------------------+
| *template* | template index, template atom | small molecules with fixed topology | | *template* | template index, template atom | small molecules with fixed topology |
+--------------+-----------------------------------------------------+--------------------------------------+ +--------------+-----------------------------------------------------+--------------------------------------+
| *tri* | corner points, angular momentum | rigid bodies | | *tri* | corner points, angular momentum | rigid bodies |
@ -144,9 +146,16 @@ basis.
For the *sphere* style, the particles are spheres and each stores a For the *sphere* style, the particles are spheres and each stores a
per-particle diameter and mass. If the diameter > 0.0, the particle per-particle diameter and mass. If the diameter > 0.0, the particle
is a finite-size sphere. If the diameter = 0.0, it is a point is a finite-size sphere. If the diameter = 0.0, it is a point
particle. Note that by use of the *disc* keyword with the :doc:`fix nve/sphere <fix_nve_sphere>`, :doc:`fix nvt/sphere <fix_nvt_sphere>`, particle. Note that by use of the *disc* keyword with the :doc:`fix
:doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix npt/sphere <fix_npt_sphere>` commands, spheres can be effectively nve/sphere <fix_nve_sphere>`, :doc:`fix nvt/sphere <fix_nvt_sphere>`,
treated as 2d discs for a 2d simulation if desired. See also the :doc:`set density/disc <set>` command. :doc:`fix nph/sphere <fix_nph_sphere>`, :doc:`fix npt/sphere
<fix_npt_sphere>` commands, spheres can be effectively treated as 2d
discs for a 2d simulation if desired. See also the :doc:`set
density/disc <set>` command. The *sphere* style takes an optional 0
or 1 argument. A value of 0 means the radius of each sphere is
constant for the duration of the simulation. A value of 1 means the
radii may vary dynamically during the simulation, e.g. due to use of
the :doc:`fix adapt <fix_adapt>` command.
For the *ellipsoid* style, the particles are ellipsoids and each For the *ellipsoid* style, the particles are ellipsoids and each
stores a flag which indicates whether it is a finite-size ellipsoid or stores a flag which indicates whether it is a finite-size ellipsoid or
@ -189,8 +198,8 @@ particles which store a set of chemical concentration. An integer
"cc_species" is required to specify the number of chemical species "cc_species" is required to specify the number of chemical species
involved in a tDPD system. involved in a tDPD system.
The *meso* style is for smoothed particle hydrodynamics (SPH) The *sph* style is for smoothed particle hydrodynamics (SPH)
particles which store a density (rho), energy (e), and heat capacity particles which store a density (rho), energy (esph), and heat capacity
(cv). (cv).
The *smd* style is for a general formulation of Smooth Particle The *smd* style is for a general formulation of Smooth Particle
@ -335,7 +344,7 @@ for energy-conserving dissipative particle dynamics (eDPD), many-body
dissipative particle dynamics (mDPD), and transport dissipative particle dissipative particle dynamics (mDPD), and transport dissipative particle
dynamics (tDPD), respectively. dynamics (tDPD), respectively.
The *meso* style is part of the USER-SPH package for smoothed particle The *sph* style is part of the USER-SPH package for smoothed particle
hydrodynamics (SPH). See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in LAMMPS. hydrodynamics (SPH). See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in LAMMPS.
The *spin* style is part of the SPIN package. The *spin* style is part of the SPIN package.
@ -351,7 +360,8 @@ Related commands
Default Default
""""""" """""""
atom_style atomic The default atom style is atomic. If atom_style sphere is used its
default argument is 0.
---------- ----------

View File

@ -225,9 +225,6 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` doc
* :doc:`ke/atom/eff <compute_ke_atom_eff>` - per-atom translational and radial kinetic energy in the electron force field model * :doc:`ke/atom/eff <compute_ke_atom_eff>` - per-atom translational and radial kinetic energy in the electron force field model
* :doc:`ke/eff <compute_ke_eff>` - kinetic energy of a group of nuclei and electrons in the electron force field model * :doc:`ke/eff <compute_ke_eff>` - kinetic energy of a group of nuclei and electrons in the electron force field model
* :doc:`ke/rigid <compute_ke_rigid>` - translational kinetic energy of rigid bodies * :doc:`ke/rigid <compute_ke_rigid>` - translational kinetic energy of rigid bodies
* :doc:`meso/e/atom <compute_meso_e_atom>` - per-atom internal energy of Smooth-Particle Hydrodynamics atoms
* :doc:`meso/rho/atom <compute_meso_rho_atom>` - per-atom mesoscopic density of Smooth-Particle Hydrodynamics atoms
* :doc:`meso/t/atom <compute_meso_t_atom>` - per-atom internal temperature of Smooth-Particle Hydrodynamics atoms
* :doc:`momentum <compute_momentum>` - translational momentum * :doc:`momentum <compute_momentum>` - translational momentum
* :doc:`msd <compute_msd>` - mean-squared displacement of group of atoms * :doc:`msd <compute_msd>` - mean-squared displacement of group of atoms
* :doc:`msd/chunk <compute_msd_chunk>` - mean-squared displacement for each chunk * :doc:`msd/chunk <compute_msd_chunk>` - mean-squared displacement for each chunk
@ -279,6 +276,9 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` doc
* :doc:`sna/atom <compute_sna_atom>` - bispectrum components for each atom * :doc:`sna/atom <compute_sna_atom>` - bispectrum components for each atom
* :doc:`snad/atom <compute_sna_atom>` - derivative of bispectrum components for each atom * :doc:`snad/atom <compute_sna_atom>` - derivative of bispectrum components for each atom
* :doc:`snav/atom <compute_sna_atom>` - virial contribution from bispectrum components for each atom * :doc:`snav/atom <compute_sna_atom>` - virial contribution from bispectrum components for each atom
* :doc:`sph/e/atom <compute_sph_e_atom>` - per-atom internal energy of Smooth-Particle Hydrodynamics atoms
* :doc:`sph/rho/atom <compute_sph_rho_atom>` - per-atom density of Smooth-Particle Hydrodynamics atoms
* :doc:`sph/t/atom <compute_sph_t_atom>` - per-atom internal temperature of Smooth-Particle Hydrodynamics atoms
* :doc:`spin <compute_spin>` - magnetic quantities for a system of atoms having spins * :doc:`spin <compute_spin>` - magnetic quantities for a system of atoms having spins
* :doc:`stress/atom <compute_stress_atom>` - stress tensor for each atom * :doc:`stress/atom <compute_stress_atom>` - stress tensor for each atom
* :doc:`stress/mop <compute_stress_mop>` - normal components of the local stress tensor using the method of planes * :doc:`stress/mop <compute_stress_mop>` - normal components of the local stress tensor using the method of planes

View File

@ -37,7 +37,7 @@ and the relative shape anisotropy, k:
b = & l_y - l_x \\ b = & l_y - l_x \\
k = & \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2} k = & \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2}
where :math:`l_x` <= :math:`l_y` <= :math`l_z` are the three eigenvalues of the gyration tensor. A general description where :math:`l_x` <= :math:`l_y` <= :math:`l_z` are the three eigenvalues of the gyration tensor. A general description
of these parameters is provided in :ref:`(Mattice) <Mattice2>` while an application to polymer systems of these parameters is provided in :ref:`(Mattice) <Mattice2>` while an application to polymer systems
can be found in :ref:`(Theodorou) <Theodorou2>`. The asphericity is always non-negative and zero can be found in :ref:`(Theodorou) <Theodorou2>`. The asphericity is always non-negative and zero
only when the three principal moments are equal. This zero condition is met when the distribution only when the three principal moments are equal. This zero condition is met when the distribution

View File

@ -67,8 +67,8 @@ Syntax
.. parsed-literal:: .. parsed-literal::
PERI package per-atom properties: PERI package per-atom properties:
vfrac = ??? vfrac = volume fraction
s0 = ??? s0 = max stretch of any bond a particle is part of
.. parsed-literal:: .. parsed-literal::
@ -81,11 +81,11 @@ Syntax
.. parsed-literal:: .. parsed-literal::
USER-SPH package per-atom properties: USER-SPH package per-atom properties:
rho = ??? rho = density of SPH particles
drho = ??? drho = change in density
e = ??? e = energy
de = ??? de = change in thermal energy
cv = ??? cv = heat capacity
.. parsed-literal:: .. parsed-literal::
@ -108,13 +108,17 @@ Description
Define a computation that simply stores atom attributes for each atom Define a computation that simply stores atom attributes for each atom
in the group. This is useful so that the values can be used by other in the group. This is useful so that the values can be used by other
:doc:`output commands <Howto_output>` that take computes as inputs. See :doc:`output commands <Howto_output>` that take computes as inputs.
for example, the :doc:`compute reduce <compute_reduce>`, :doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/histo <fix_ave_histo>`, :doc:`fix ave/chunk <fix_ave_chunk>`, and :doc:`atom-style variable <variable>` See for example, the :doc:`compute reduce <compute_reduce>`, :doc:`fix
commands. ave/atom <fix_ave_atom>`, :doc:`fix ave/histo <fix_ave_histo>`,
:doc:`fix ave/chunk <fix_ave_chunk>`, and :doc:`atom-style variable
<variable>` commands.
The list of possible attributes is the same as that used by the :doc:`dump custom <dump>` command, which describes their meaning, with some The list of possible attributes is the same as that used by the
additional quantities that are only defined for certain :doc:`atom styles <atom_style>`. Basically, this augmented list gives an :doc:`dump custom <dump>` command, which describes their meaning, with
input script access to any per-atom quantity stored by LAMMPS. some additional quantities that are only defined for certain
:doc:`atom styles <atom_style>`. Basically, this augmented list gives
an input script access to any per-atom quantity stored by LAMMPS.
The values are stored in a per-atom vector or array as discussed The values are stored in a per-atom vector or array as discussed
below. Zeroes are stored for atoms not in the specified group or for below. Zeroes are stored for atoms not in the specified group or for
@ -132,8 +136,9 @@ particles and body particles and store the 4-vector quaternion
representing the orientation of each particle. See the :doc:`set <set>` representing the orientation of each particle. See the :doc:`set <set>`
command for an explanation of the quaternion vector. command for an explanation of the quaternion vector.
*End1x*\ , *end1y*\ , *end1z*\ , *end2x*\ , *end2y*\ , *end2z*\ , are defined for *End1x*\ , *end1y*\ , *end1z*\ , *end2x*\ , *end2y*\ , *end2z*\ , are
line segment particles and define the end points of each line segment. defined for line segment particles and define the end points of each
line segment.
*Corner1x*\ , *corner1y*\ , *corner1z*\ , *corner2x*\ , *corner2y*\ , *Corner1x*\ , *corner1y*\ , *corner1z*\ , *corner2x*\ , *corner2y*\ ,
*corner2z*\ , *corner3x*\ , *corner3y*\ , *corner3z*\ , are defined for *corner2z*\ , *corner3x*\ , *corner3y*\ , *corner3z*\ , are defined for
@ -144,14 +149,14 @@ number of explicit bonds assigned to an atom. Note that if the
:doc:`newton bond <newton>` command is set to *on*\ , which is the :doc:`newton bond <newton>` command is set to *on*\ , which is the
default, then every bond in the system is assigned to only one of the default, then every bond in the system is assigned to only one of the
two atoms in the bond. Thus a bond between atoms I,J may be tallied two atoms in the bond. Thus a bond between atoms I,J may be tallied
for either atom I or atom J. If :doc:`newton bond off <newton>` is set, for either atom I or atom J. If :doc:`newton bond off <newton>` is
it will be tallied with both atom I and atom J. set, it will be tallied with both atom I and atom J.
The *i_name* and *d_name* attributes refer to custom integer and The *i_name* and *d_name* attributes refer to custom integer and
floating-point properties that have been added to each atom via the floating-point properties that have been added to each atom via the
:doc:`fix property/atom <fix_property_atom>` command. When that command :doc:`fix property/atom <fix_property_atom>` command. When that
is used specific names are given to each attribute which are what is command is used specific names are given to each attribute which are
specified as the "name" portion of *i_name* or *d_name*. what is specified as the "name" portion of *i_name* or *d_name*.
**Output info:** **Output info:**
@ -160,8 +165,8 @@ on the number of input values. If a single input is specified, a
per-atom vector is produced. If two or more inputs are specified, a per-atom vector is produced. If two or more inputs are specified, a
per-atom array is produced where the number of columns = the number of per-atom array is produced where the number of columns = the number of
inputs. The vector or array can be accessed by any command that uses inputs. The vector or array can be accessed by any command that uses
per-atom values from a compute as input. See the :doc:`Howto output <Howto_output>` doc page for an overview of LAMMPS output per-atom values from a compute as input. See the :doc:`Howto output
options. <Howto_output>` doc page for an overview of LAMMPS output options.
The vector or array values will be in whatever :doc:`units <units>` the The vector or array values will be in whatever :doc:`units <units>` the
corresponding attribute is in, e.g. velocity units for vx, charge corresponding attribute is in, e.g. velocity units for vx, charge
@ -178,7 +183,8 @@ Restrictions
Related commands Related commands
"""""""""""""""" """"""""""""""""
:doc:`dump custom <dump>`, :doc:`compute reduce <compute_reduce>`, :doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/chunk <fix_ave_chunk>`, :doc:`dump custom <dump>`, :doc:`compute reduce <compute_reduce>`,
:doc:`fix property/atom <fix_property_atom>` :doc::doc:`fix ave/atom <fix_ave_atom>`, :doc:`fix ave/chunk
:doc:<fix_ave_chunk>`, `fix property/atom <fix_property_atom>`
**Default:** none **Default:** none

View File

@ -1,6 +1,6 @@
.. index:: compute meso/e/atom .. index:: compute sph/e/atom
compute meso/e/atom command compute sph/e/atom command
=========================== ===========================
Syntax Syntax
@ -8,17 +8,17 @@ Syntax
.. parsed-literal:: .. parsed-literal::
compute ID group-ID meso/e/atom compute ID group-ID sph/e/atom
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
* meso/e/atom = style name of this compute command * sph/e/atom = style name of this compute command
Examples Examples
"""""""" """"""""
.. code-block:: LAMMPS .. code-block:: LAMMPS
compute 1 all meso/e/atom compute 1 all sph/e/atom
Description Description
""""""""""" """""""""""
@ -27,8 +27,8 @@ Define a computation that calculates the per-atom internal energy
for each atom in a group. for each atom in a group.
The internal energy is the energy associated with the internal degrees The internal energy is the energy associated with the internal degrees
of freedom of a mesoscopic particles, e.g. a Smooth-Particle of freedom of an SPH particle, i.e. a Smooth-Particle Hydrodynamics
Hydrodynamics particle. particle.
See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in
LAMMPS. LAMMPS.

View File

@ -1,6 +1,6 @@
.. index:: compute meso/rho/atom .. index:: compute sph/rho/atom
compute meso/rho/atom command compute sph/rho/atom command
============================= =============================
Syntax Syntax
@ -8,32 +8,31 @@ Syntax
.. parsed-literal:: .. parsed-literal::
compute ID group-ID meso/rho/atom compute ID group-ID sph/rho/atom
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
* meso/rho/atom = style name of this compute command * sph/rho/atom = style name of this compute command
Examples Examples
"""""""" """"""""
.. code-block:: LAMMPS .. code-block:: LAMMPS
compute 1 all meso/rho/atom compute 1 all sph/rho/atom
Description Description
""""""""""" """""""""""
Define a computation that calculates the per-atom mesoscopic density Define a computation that calculates the per-atom SPH density for each
for each atom in a group. atom in a group, i.e. a Smooth-Particle Hydrodynamics density.
The mesoscopic density is the mass density of a mesoscopic particle, The SPH density is the mass density of an SPH particle, calculated by
calculated by kernel function interpolation using "pair style kernel function interpolation using "pair style sph/rhosum".
sph/rhosum".
See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in
LAMMPS. LAMMPS.
The value of the mesoscopic density will be 0.0 for atoms not in the The value of the SPH density will be 0.0 for atoms not in the
specified compute group. specified compute group.
**Output info:** **Output info:**

View File

@ -1,6 +1,6 @@
.. index:: compute meso/t/atom .. index:: compute sph/t/atom
compute meso/t/atom command compute sph/t/atom command
=========================== ===========================
Syntax Syntax
@ -8,17 +8,17 @@ Syntax
.. parsed-literal:: .. parsed-literal::
compute ID group-ID meso/t/atom compute ID group-ID sph/t/atom
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
* meso/t/atom = style name of this compute command * sph/t/atom = style name of this compute command
Examples Examples
"""""""" """"""""
.. code-block:: LAMMPS .. code-block:: LAMMPS
compute 1 all meso/t/atom compute 1 all sph/t/atom
Description Description
""""""""""" """""""""""
@ -27,8 +27,8 @@ Define a computation that calculates the per-atom internal temperature
for each atom in a group. for each atom in a group.
The internal temperature is the ratio of internal energy over the heat The internal temperature is the ratio of internal energy over the heat
capacity associated with the internal degrees of freedom of a mesoscopic capacity associated with the internal degrees of freedom of an SPH
particles, e.g. a Smooth-Particle Hydrodynamics particle. particles, i.e. a Smooth-Particle Hydrodynamics particle.
.. math:: .. math::

View File

@ -552,9 +552,9 @@ when writing to XTC files. By default they are initialized for
whatever :doc:`units <units>` style is being used, to write out whatever :doc:`units <units>` style is being used, to write out
coordinates in nanometers and time in picoseconds. I.e. for *real* coordinates in nanometers and time in picoseconds. I.e. for *real*
units, LAMMPS defines *sfactor* = 0.1 and *tfactor* = 0.001, since the units, LAMMPS defines *sfactor* = 0.1 and *tfactor* = 0.001, since the
Angstroms and fmsec used by *real* units are 0.1 nm and 0.001 psec Angstroms and fs used by *real* units are 0.1 nm and 0.001 ps
respectively. If you are using a units system with distance and time respectively. If you are using a units system with distance and time
units far from nm and psec, you may wish to write XTC files with units far from nm and ps, you may wish to write XTC files with
different units, since the compression algorithm used in XTC files is different units, since the compression algorithm used in XTC files is
most effective when the typical magnitude of position data is between most effective when the typical magnitude of position data is between
10.0 and 0.1. 10.0 and 0.1.

View File

@ -238,9 +238,7 @@ accelerated styles exist.
* :doc:`lb/viscous <fix_lb_viscous>` - * :doc:`lb/viscous <fix_lb_viscous>` -
* :doc:`lineforce <fix_lineforce>` - constrain atoms to move in a line * :doc:`lineforce <fix_lineforce>` - constrain atoms to move in a line
* :doc:`manifoldforce <fix_manifoldforce>` - restrain atoms to a manifold during minimization * :doc:`manifoldforce <fix_manifoldforce>` - restrain atoms to a manifold during minimization
* :doc:`meso <fix_meso>` - time integration for SPH/DPDE particles
* :doc:`meso/move <fix_meso_move>` - move mesoscopic SPH/SDPD particles in a prescribed fashion * :doc:`meso/move <fix_meso_move>` - move mesoscopic SPH/SDPD particles in a prescribed fashion
* :doc:`meso/stationary <fix_meso_stationary>` -
* :doc:`momentum <fix_momentum>` - zero the linear and/or angular momentum of a group of atoms * :doc:`momentum <fix_momentum>` - zero the linear and/or angular momentum of a group of atoms
* :doc:`move <fix_move>` - move atoms in a prescribed fashion * :doc:`move <fix_move>` - move atoms in a prescribed fashion
* :doc:`mscg <fix_mscg>` - apply MSCG method for force-matching to generate coarse grain models * :doc:`mscg <fix_mscg>` - apply MSCG method for force-matching to generate coarse grain models
@ -292,6 +290,7 @@ accelerated styles exist.
* :doc:`oneway <fix_oneway>` - constrain particles on move in one direction * :doc:`oneway <fix_oneway>` - constrain particles on move in one direction
* :doc:`orient/bcc <fix_orient>` - add grain boundary migration force for BCC * :doc:`orient/bcc <fix_orient>` - add grain boundary migration force for BCC
* :doc:`orient/fcc <fix_orient>` - add grain boundary migration force for FCC * :doc:`orient/fcc <fix_orient>` - add grain boundary migration force for FCC
* :doc:`orient/eco <fix_orient_eco>` - add generalized grain boundary migration force
* :doc:`phonon <fix_phonon>` - calculate dynamical matrix from MD simulations * :doc:`phonon <fix_phonon>` - calculate dynamical matrix from MD simulations
* :doc:`pimd <fix_pimd>` - Feynman path integral molecular dynamics * :doc:`pimd <fix_pimd>` - Feynman path integral molecular dynamics
* :doc:`planeforce <fix_planeforce>` - constrain atoms to move in a plane * :doc:`planeforce <fix_planeforce>` - constrain atoms to move in a plane
@ -345,6 +344,8 @@ accelerated styles exist.
* :doc:`smd/move_tri_surf <fix_smd_move_triangulated_surface>` - * :doc:`smd/move_tri_surf <fix_smd_move_triangulated_surface>` -
* :doc:`smd/setvel <fix_smd_setvel>` - * :doc:`smd/setvel <fix_smd_setvel>` -
* :doc:`smd/wall_surface <fix_smd_wall_surface>` - * :doc:`smd/wall_surface <fix_smd_wall_surface>` -
* :doc:`sph <fix_sph>` - time integration for SPH/DPDE particles
* :doc:`sph/stationary <fix_sph_stationary>` -
* :doc:`spring <fix_spring>` - apply harmonic spring force to group of atoms * :doc:`spring <fix_spring>` - apply harmonic spring force to group of atoms
* :doc:`spring/chunk <fix_spring_chunk>` - apply harmonic spring force to each chunk of atoms * :doc:`spring/chunk <fix_spring_chunk>` - apply harmonic spring force to each chunk of atoms
* :doc:`spring/rg <fix_spring_rg>` - spring on radius of gyration of group of atoms * :doc:`spring/rg <fix_spring_rg>` - spring on radius of gyration of group of atoms

44
doc/src/fix_bond_react.rst Executable file → Normal file
View File

@ -300,7 +300,8 @@ either 'none' or 'charges.' Further details are provided in the
discussion of the 'update_edges' keyword. The fifth optional section discussion of the 'update_edges' keyword. The fifth optional section
begins with the keyword 'Constraints' and lists additional criteria begins with the keyword 'Constraints' and lists additional criteria
that must be satisfied in order for the reaction to occur. Currently, that must be satisfied in order for the reaction to occur. Currently,
there are four types of constraints available, as discussed below. there are four types of constraints available, as discussed below:
'distance', 'angle', 'dihedral', and 'arrhenius'.
A sample map file is given below: A sample map file is given below:
@ -353,8 +354,9 @@ has syntax as follows:
distance *ID1* *ID2* *rmin* *rmax* distance *ID1* *ID2* *rmin* *rmax*
where 'distance' is the required keyword, *ID1* and *ID2* are where 'distance' is the required keyword, *ID1* and *ID2* are
pre-reaction atom IDs, and these two atoms must be separated by a pre-reaction atom IDs (or molecule-fragment IDs, see below), and these
distance between *rmin* and *rmax* for the reaction to occur. two atoms must be separated by a distance between *rmin* and *rmax*
for the reaction to occur.
The constraint of type 'angle' has the following syntax: The constraint of type 'angle' has the following syntax:
@ -363,11 +365,11 @@ The constraint of type 'angle' has the following syntax:
angle *ID1* *ID2* *ID3* *amin* *amax* angle *ID1* *ID2* *ID3* *amin* *amax*
where 'angle' is the required keyword, *ID1*\ , *ID2* and *ID3* are where 'angle' is the required keyword, *ID1*\ , *ID2* and *ID3* are
pre-reaction atom IDs, and these three atoms must form an angle pre-reaction atom IDs (or molecule-fragment IDs, see below), and these
between *amin* and *amax* for the reaction to occur (where *ID2* is three atoms must form an angle between *amin* and *amax* for the
the central atom). Angles must be specified in degrees. This reaction to occur (where *ID2* is the central atom). Angles must be
constraint can be used to enforce a certain orientation between specified in degrees. This constraint can be used to enforce a certain
reacting molecules. orientation between reacting molecules.
The constraint of type 'dihedral' has the following syntax: The constraint of type 'dihedral' has the following syntax:
@ -376,15 +378,23 @@ The constraint of type 'dihedral' has the following syntax:
dihedral *ID1* *ID2* *ID3* *ID4* *amin* *amax* *amin2* *amax2* dihedral *ID1* *ID2* *ID3* *ID4* *amin* *amax* *amin2* *amax2*
where 'dihedral' is the required keyword, and *ID1*\ , *ID2*\ , *ID3* where 'dihedral' is the required keyword, and *ID1*\ , *ID2*\ , *ID3*
and *ID4* are pre-reaction atom IDs. Dihedral angles are calculated in and *ID4* are pre-reaction atom IDs (or molecule-fragment IDs, see
the interval (-180,180]. Refer to the :doc:`dihedral style <dihedral_style>` below). Dihedral angles are calculated in the interval (-180,180].
documentation for further details on convention. If *amin* is less Refer to the :doc:`dihedral style <dihedral_style>` documentation for
than *amax*, these four atoms must form a dihedral angle greater than further details on convention. If *amin* is less than *amax*, these
*amin* **and** less than *amax* for the reaction to occur. If *amin* four atoms must form a dihedral angle greater than *amin* **and** less
is greater than *amax*, these four atoms must form a dihedral angle than *amax* for the reaction to occur. If *amin* is greater than
greater than *amin* **or** less than *amax* for the reaction to occur. *amax*, these four atoms must form a dihedral angle greater than
Angles must be specified in degrees. Optionally, a second range of *amin* **or** less than *amax* for the reaction to occur. Angles must
permissible angles *amin2*-*amax2* can be specified. be specified in degrees. Optionally, a second range of permissible
angles *amin2*-*amax2* can be specified.
For the 'distance', 'angle', and 'dihedral' constraints (explained
above), atom IDs can be replaced by pre-reaction molecule-fragment
IDs. The molecule-fragment ID must begin with a letter. The location
of the ID is the geometric center of all atom positions in the
fragment. The molecule fragment must have been defined in the
:doc:`molecule <molecule>` command for the pre-reaction template.
The constraint of type 'arrhenius' imposes an additional reaction The constraint of type 'arrhenius' imposes an additional reaction
probability according to the temperature-dependent Arrhenius equation: probability according to the temperature-dependent Arrhenius equation:

View File

@ -154,8 +154,8 @@ specified in units of distance/time. This is effectively a "constant
engineering strain rate", where rate = V/L0 and L0 is the initial box engineering strain rate", where rate = V/L0 and L0 is the initial box
length. The distance can be in lattice or box distance units. See length. The distance can be in lattice or box distance units. See
the discussion of the units keyword below. For example, if the the discussion of the units keyword below. For example, if the
initial box length is 100 Angstroms, and V is 10 Angstroms/psec, then initial box length is 100 Angstroms, and V is 10 Angstroms/ps, then
after 10 psec, the box length will have doubled. After 20 psec, it after 10 ps, the box length will have doubled. After 20 ps, it
will have tripled. will have tripled.
The *erate* style changes a dimension of the box at a "constant The *erate* style changes a dimension of the box at a "constant
@ -174,7 +174,7 @@ function of time will change as
where dt is the elapsed time (in time units). Thus if *erate* R is where dt is the elapsed time (in time units). Thus if *erate* R is
specified as 0.1 and time units are picoseconds, this means the box specified as 0.1 and time units are picoseconds, this means the box
length will increase by 10% of its original length every picosecond. length will increase by 10% of its original length every picosecond.
I.e. strain after 1 psec = 0.1, strain after 2 psec = 0.2, etc. R = I.e. strain after 1 ps = 0.1, strain after 2 ps = 0.2, etc. R =
-0.01 means the box length will shrink by 1% of its original length -0.01 means the box length will shrink by 1% of its original length
every picosecond. Note that for an "engineering" rate the change is every picosecond. Note that for an "engineering" rate the change is
based on the original box length, so running with R = 1 for 10 based on the original box length, so running with R = 1 for 10
@ -201,7 +201,7 @@ The box length L as a function of time will change as
where dt is the elapsed time (in time units). Thus if *trate* R is where dt is the elapsed time (in time units). Thus if *trate* R is
specified as ln(1.1) and time units are picoseconds, this means the specified as ln(1.1) and time units are picoseconds, this means the
box length will increase by 10% of its current (not original) length box length will increase by 10% of its current (not original) length
every picosecond. I.e. strain after 1 psec = 0.1, strain after 2 psec every picosecond. I.e. strain after 1 ps = 0.1, strain after 2 ps
= 0.21, etc. R = ln(2) or ln(3) means the box length will double or = 0.21, etc. R = ln(2) or ln(3) means the box length will double or
triple every picosecond. R = ln(0.99) means the box length will triple every picosecond. R = ln(0.99) means the box length will
shrink by 1% of its current length every picosecond. Note that for a shrink by 1% of its current length every picosecond. Note that for a
@ -317,8 +317,8 @@ specified in units of distance/time. This is effectively an
initial box length perpendicular to the direction of shear. The initial box length perpendicular to the direction of shear. The
distance can be in lattice or box distance units. See the discussion distance can be in lattice or box distance units. See the discussion
of the units keyword below. For example, if the initial tilt factor of the units keyword below. For example, if the initial tilt factor
is 5 Angstroms, and the V is 10 Angstroms/psec, then after 1 psec, the is 5 Angstroms, and the V is 10 Angstroms/ps, then after 1 ps, the
tilt factor will be 15 Angstroms. After 2 psec, it will be 25 tilt factor will be 15 Angstroms. After 2 ps, it will be 25
Angstroms. Angstroms.
The *erate* style changes a tilt factor at a "constant engineering The *erate* style changes a tilt factor at a "constant engineering
@ -342,9 +342,9 @@ box perpendicular to the shear direction (e.g. y box length for xy
deformation), and dt is the elapsed time (in time units). Thus if deformation), and dt is the elapsed time (in time units). Thus if
*erate* R is specified as 0.1 and time units are picoseconds, this *erate* R is specified as 0.1 and time units are picoseconds, this
means the shear strain will increase by 0.1 every picosecond. I.e. if means the shear strain will increase by 0.1 every picosecond. I.e. if
the xy shear strain was initially 0.0, then strain after 1 psec = 0.1, the xy shear strain was initially 0.0, then strain after 1 ps = 0.1,
strain after 2 psec = 0.2, etc. Thus the tilt factor would be 0.0 at strain after 2 ps = 0.2, etc. Thus the tilt factor would be 0.0 at
time 0, 0.1\*ybox at 1 psec, 0.2\*ybox at 2 psec, etc, where ybox is the time 0, 0.1\*ybox at 1 ps, 0.2\*ybox at 2 ps, etc, where ybox is the
original y box length. R = 1 or 2 means the tilt factor will increase original y box length. R = 1 or 2 means the tilt factor will increase
by 1 or 2 every picosecond. R = -0.01 means a decrease in shear by 1 or 2 every picosecond. R = -0.01 means a decrease in shear
strain by 0.01 every picosecond. strain by 0.01 every picosecond.
@ -373,7 +373,7 @@ where T0 is the initial tilt factor and dt is the elapsed time (in
time units). Thus if *trate* R is specified as ln(1.1) and time units time units). Thus if *trate* R is specified as ln(1.1) and time units
are picoseconds, this means the shear strain or tilt factor will are picoseconds, this means the shear strain or tilt factor will
increase by 10% every picosecond. I.e. if the xy shear strain was increase by 10% every picosecond. I.e. if the xy shear strain was
initially 0.1, then strain after 1 psec = 0.11, strain after 2 psec = initially 0.1, then strain after 1 ps = 0.11, strain after 2 ps =
0.121, etc. R = ln(2) or ln(3) means the tilt factor will double or 0.121, etc. R = ln(2) or ln(3) means the tilt factor will double or
triple every picosecond. R = ln(0.99) means the tilt factor will triple every picosecond. R = ln(0.99) means the tilt factor will
shrink by 1% every picosecond. Note that the change is continuous, so shrink by 1% every picosecond. Note that the change is continuous, so

View File

@ -57,7 +57,7 @@ its current value(s) used to determine the flux.
If *eflux* is a numeric constant or equal-style variable which evaluates If *eflux* is a numeric constant or equal-style variable which evaluates
to a scalar value, then *eflux* determines the change in aggregate energy to a scalar value, then *eflux* determines the change in aggregate energy
of the entire group of atoms per unit time, e.g. in eV/psec for of the entire group of atoms per unit time, e.g. in eV/ps for
:doc:`metal units <units>`. In this case it is an "extensive" quantity, :doc:`metal units <units>`. In this case it is an "extensive" quantity,
meaning its magnitude should be scaled with the number of atoms in the meaning its magnitude should be scaled with the number of atoms in the
group. Note that since *eflux* also has per-time units (i.e. it is a group. Note that since *eflux* also has per-time units (i.e. it is a

View File

@ -188,7 +188,7 @@ particles.
*damp_com* is the characteristic time for reaching thermal equilibrium *damp_com* is the characteristic time for reaching thermal equilibrium
of the centers of mass. For example, a value of 100.0 means to relax of the centers of mass. For example, a value of 100.0 means to relax
the temperature of the centers of mass in a timespan of (roughly) 100 the temperature of the centers of mass in a timespan of (roughly) 100
time units (tau or fmsec or psec - see the :doc:`units <units>` time units (tau or fs or ps - see the :doc:`units <units>`
command). *damp_drude* is the characteristic time for reaching command). *damp_drude* is the characteristic time for reaching
thermal equilibrium of the dipoles. It is typically a few timesteps. thermal equilibrium of the dipoles. It is typically a few timesteps.

View File

@ -60,17 +60,19 @@ internal energy and extrapolated velocity are also updated.
.. note:: .. note::
The particles affected by this fix should not be time integrated The particles affected by this fix should not be time integrated by
by other fixes (e.g. :doc:`fix meso <fix_meso>`, :doc:`fix meso/stationary <fix_meso_stationary>`), since that will change their other fixes (e.g. :doc:`fix sph <fix_sph>`, :doc:`fix
sph/stationary <fix_sph_stationary>`), since that will change their
positions and velocities twice. positions and velocities twice.
.. note:: .. note::
As particles move due to this fix, they will pass through periodic As particles move due to this fix, they will pass through periodic
boundaries and be remapped to the other side of the simulation box, boundaries and be remapped to the other side of the simulation box,
just as they would during normal time integration (e.g. via the :doc:`fix meso <fix_meso>` command). It is up to you to decide whether periodic just as they would during normal time integration (e.g. via the
boundaries are appropriate with the kind of particle motion you are :doc:`fix sph <fix_sph>` command). It is up to you to decide
prescribing with this fix. whether periodic boundaries are appropriate with the kind of
particle motion you are prescribing with this fix.
.. note:: .. note::
@ -100,7 +102,7 @@ specified, *V* is the specified velocity vector with components
specified. This style also sets the velocity of each particle to V = specified. This style also sets the velocity of each particle to V =
(Vx,Vy,Vz). If any of the velocity components is specified as NULL, (Vx,Vy,Vz). If any of the velocity components is specified as NULL,
then the position and velocity of that component is time integrated then the position and velocity of that component is time integrated
the same as the :doc:`fix meso <fix_meso>` command would perform, using the same as the :doc:`fix sph <fix_sph>` command would perform, using
the corresponding force component on the particle. the corresponding force component on the particle.
Note that the *linear* style is identical to using the *variable* Note that the *linear* style is identical to using the *variable*
@ -128,7 +130,7 @@ elapsed since the fix was specified. This style also sets the
velocity of each particle to the time derivative of this expression. velocity of each particle to the time derivative of this expression.
If any of the amplitude components is specified as NULL, then the If any of the amplitude components is specified as NULL, then the
position and velocity of that component is time integrated the same as position and velocity of that component is time integrated the same as
the :doc:`fix meso <fix_meso>` command would perform, using the the :doc:`fix sph <fix_sph>` command would perform, using the
corresponding force component on the particle. corresponding force component on the particle.
Note that the *wiggle* style is identical to using the *variable* Note that the *wiggle* style is identical to using the *variable*
@ -180,21 +182,21 @@ particle.
Any of the 6 variables can be specified as NULL. If both the Any of the 6 variables can be specified as NULL. If both the
displacement and velocity variables for a particular x,y,z component displacement and velocity variables for a particular x,y,z component
are specified as NULL, then the position and velocity of that are specified as NULL, then the position and velocity of that
component is time integrated the same as the :doc:`fix meso <fix_meso>` component is time integrated the same as the :doc:`fix sph <fix_sph>`
command would perform, using the corresponding force component on the command would perform, using the corresponding force component on the
particle. If only the velocity variable for a component is specified as particle. If only the velocity variable for a component is specified
NULL, then the displacement variable will be used to set the position as NULL, then the displacement variable will be used to set the
of the particle, and its velocity component will not be changed. If only position of the particle, and its velocity component will not be
the displacement variable for a component is specified as NULL, then changed. If only the displacement variable for a component is
the velocity variable will be used to set the velocity of the particle, specified as NULL, then the velocity variable will be used to set the
and the position of the particle will be time integrated using that velocity of the particle, and the position of the particle will be
velocity. time integrated using that velocity.
The *units* keyword determines the meaning of the distance units used The *units* keyword determines the meaning of the distance units used
to define the *linear* velocity and *wiggle* amplitude and *rotate* to define the *linear* velocity and *wiggle* amplitude and *rotate*
origin. This setting is ignored for the *variable* style. A *box* origin. This setting is ignored for the *variable* style. A *box*
value selects standard units as defined by the :doc:`units <units>` value selects standard units as defined by the :doc:`units <units>`
command, e.g. velocity in Angstroms/fmsec and amplitude and position command, e.g. velocity in Angstroms/fs and amplitude and position
in Angstroms for units = real. A *lattice* value means the velocity in Angstroms for units = real. A *lattice* value means the velocity
units are in lattice spacings per time and the amplitude and position units are in lattice spacings per time and the amplitude and position
are in lattice spacings. The :doc:`lattice <lattice>` command must have are in lattice spacings. The :doc:`lattice <lattice>` command must have
@ -236,17 +238,18 @@ Restrictions
"""""""""""" """"""""""""
This fix is part of the USER-SDPD package. It is only enabled if This fix is part of the USER-SDPD package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info. LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
This fix requires that atoms store density and internal energy as This fix requires that atoms store density and internal energy as
defined by the :doc:`atom_style meso <atom_style>` command. defined by the :doc:`atom_style sph <atom_style>` command.
All particles in the group must be mesoscopic SPH/SDPD particles. All particles in the group must be mesoscopic SPH/SDPD particles.
Related commands Related commands
"""""""""""""""" """"""""""""""""
:doc:`fix move <fix_move>`, :doc:`fix meso <fix_meso>`, :doc:`fix move <fix_move>`, :doc:`fix sph <fix_sph>`,
:doc:`displace_atoms <displace_atoms>` :doc:`displace_atoms <displace_atoms>`
Default Default

View File

@ -193,7 +193,7 @@ The *units* keyword determines the meaning of the distance units used
to define the *linear* velocity and *wiggle* amplitude and *rotate* to define the *linear* velocity and *wiggle* amplitude and *rotate*
origin. This setting is ignored for the *variable* style. A *box* origin. This setting is ignored for the *variable* style. A *box*
value selects standard units as defined by the :doc:`units <units>` value selects standard units as defined by the :doc:`units <units>`
command, e.g. velocity in Angstroms/fmsec and amplitude and position command, e.g. velocity in Angstroms/fs and amplitude and position
in Angstroms for units = real. A *lattice* value means the velocity in Angstroms for units = real. A *lattice* value means the velocity
units are in lattice spacings per time and the amplitude and position units are in lattice spacings per time and the amplitude and position
are in lattice spacings. The :doc:`lattice <lattice>` command must have are in lattice spacings. The :doc:`lattice <lattice>` command must have

34
doc/src/fix_nh.rst Normal file → Executable file
View File

@ -46,7 +46,7 @@ Syntax
.. parsed-literal:: .. parsed-literal::
keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint* or *update* keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *ptemp* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint* or *update*
*temp* values = Tstart Tstop Tdamp *temp* values = Tstart Tstop Tdamp
Tstart,Tstop = external temperature at start/end of run Tstart,Tstop = external temperature at start/end of run
Tdamp = temperature damping parameter (time units) Tdamp = temperature damping parameter (time units)
@ -69,6 +69,8 @@ Syntax
*nreset* value = reset reference cell every this many timesteps *nreset* value = reset reference cell every this many timesteps
*drag* value = Df *drag* value = Df
Df = drag factor added to barostat/thermostat (0.0 = no drag) Df = drag factor added to barostat/thermostat (0.0 = no drag)
*ptemp* value = Ttarget
Ttarget = target temperature for barostat
*dilate* value = dilate-group-ID *dilate* value = dilate-group-ID
dilate-group-ID = only dilate atoms in this group due to barostat volume changes dilate-group-ID = only dilate atoms in this group due to barostat volume changes
*scalexy* value = *yes* or *no* = scale xy with ly *scalexy* value = *yes* or *no* = scale xy with ly
@ -137,8 +139,8 @@ description below. The desired temperature at each timestep is a
ramped value during the run from *Tstart* to *Tstop*\ . The *Tdamp* ramped value during the run from *Tstart* to *Tstop*\ . The *Tdamp*
parameter is specified in time units and determines how rapidly the parameter is specified in time units and determines how rapidly the
temperature is relaxed. For example, a value of 10.0 means to relax temperature is relaxed. For example, a value of 10.0 means to relax
the temperature in a timespan of (roughly) 10 time units (e.g. tau or the temperature in a timespan of (roughly) 10 time units (e.g. :math:`\tau`
fmsec or psec - see the :doc:`units <units>` command). The atoms in the or fs or ps - see the :doc:`units <units>` command). The atoms in the
fix group are the only ones whose velocities and positions are updated fix group are the only ones whose velocities and positions are updated
by the velocity/position update portion of the integration. by the velocity/position update portion of the integration.
@ -195,8 +197,8 @@ simulation box must be triclinic, even if its initial tilt factors are
For all barostat keywords, the *Pdamp* parameter operates like the For all barostat keywords, the *Pdamp* parameter operates like the
*Tdamp* parameter, determining the time scale on which pressure is *Tdamp* parameter, determining the time scale on which pressure is
relaxed. For example, a value of 10.0 means to relax the pressure in relaxed. For example, a value of 10.0 means to relax the pressure in
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see a timespan of (roughly) 10 time units (e.g. :math:`\tau` or fs or ps
the :doc:`units <units>` command). - see the :doc:`units <units>` command).
.. note:: .. note::
@ -208,6 +210,28 @@ the :doc:`units <units>` command).
time units, and that timesteps are NOT the same as time units for most time units, and that timesteps are NOT the same as time units for most
:doc:`units <units>` settings. :doc:`units <units>` settings.
The relaxation rate of the barostat is set by its inertia :math:`W`:
.. math::
W = (N + 1) k T_{\rm target} P_{\rm damp}^2
where :math:`N` is the number of atoms, :math:`k` is the Boltzmann constant,
and :math:`T_{\rm target}` is the target temperature of the barostat :ref:`(Martyna) <nh-Martyna>`.
If a thermostat is defined, :math:`T_{\rm target}` is the target temperature
of the thermostat. If a thermostat is not defined, :math:`T_{\rm target}`
is set to the current temperature of the system when the barostat is initialized.
If this temperature is too low the simulation will quit with an error.
Note: in previous versions of LAMMPS, :math:`T_{\rm target}` would default to
a value of 1.0 for *lj* units and 300.0 otherwise if the system had a temperature
of exactly zero.
If a thermostat is not specified by this fix, :math:`T_{\rm target}` can be
manually specified using the *Ptemp* parameter. This may be useful if the
barostat is initialized when the current temperature does not reflect the
steady state temperature of the system. This keyword may also be useful in
athermal simulations where the temperature is not well defined.
Regardless of what atoms are in the fix group (the only atoms which Regardless of what atoms are in the fix group (the only atoms which
are time integrated), a global pressure or stress tensor is computed are time integrated), a global pressure or stress tensor is computed
for all atoms. Similarly, when the size of the simulation box is for all atoms. Similarly, when the size of the simulation box is

View File

@ -103,8 +103,8 @@ description below. The desired temperature at each timestep is a
ramped value during the run from *Tstart* to *Tstop*\ . The *Tdamp* ramped value during the run from *Tstart* to *Tstop*\ . The *Tdamp*
parameter is specified in time units and determines how rapidly the parameter is specified in time units and determines how rapidly the
temperature is relaxed. For example, a value of 10.0 means to relax temperature is relaxed. For example, a value of 10.0 means to relax
the temperature in a timespan of (roughly) 10 time units (e.g. tau or the temperature in a timespan of (roughly) 10 time units (e.g. :math:`\tau`
fmsec or psec - see the :doc:`units <units>` command). The atoms in the or fs or ps - see the :doc:`units <units>` command). The atoms in the
fix group are the only ones whose velocities and positions are updated fix group are the only ones whose velocities and positions are updated
by the velocity/position update portion of the integration. by the velocity/position update portion of the integration.
@ -154,8 +154,8 @@ simulation box must be triclinic, even if its initial tilt factors are
For all barostat keywords, the *Pdamp* parameter operates like the For all barostat keywords, the *Pdamp* parameter operates like the
*Tdamp* parameter, determining the time scale on which pressure is *Tdamp* parameter, determining the time scale on which pressure is
relaxed. For example, a value of 10.0 means to relax the pressure in relaxed. For example, a value of 10.0 means to relax the pressure in
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see a timespan of (roughly) 10 time units (e.g. :math:`\tau` or fs or ps
the :doc:`units <units>` command). - see the :doc:`units <units>` command).
.. note:: .. note::

View File

@ -94,7 +94,7 @@ corresponds to T = 300 K.
The *damp* parameter is specified in time units and determines how The *damp* parameter is specified in time units and determines how
rapidly the temperature is relaxed. For example, a value of 0.03 rapidly the temperature is relaxed. For example, a value of 0.03
means to relax the temperature in a timespan of (roughly) 0.03 time means to relax the temperature in a timespan of (roughly) 0.03 time
units tau (see the :doc:`units <units>` command). units :math:`\tau` (see the :doc:`units <units>` command).
The damp factor can be thought of as inversely related to the The damp factor can be thought of as inversely related to the
viscosity of the solvent, i.e. a small relaxation time implies a viscosity of the solvent, i.e. a small relaxation time implies a
high-viscosity solvent and vice versa. See the discussion about gamma high-viscosity solvent and vice versa. See the discussion about gamma

View File

@ -6,6 +6,9 @@ fix orient/fcc command
fix orient/bcc command fix orient/bcc command
====================== ======================
Syntax
""""""
.. parsed-literal:: .. parsed-literal::
fix ID group-ID orient/fcc nstats dir alat dE cutlo cuthi file0 file1 fix ID group-ID orient/fcc nstats dir alat dE cutlo cuthi file0 file1

154
doc/src/fix_orient_eco.rst Normal file
View File

@ -0,0 +1,154 @@
.. index:: fix orient/eco
fix orient/eco command
======================
.. parsed-literal::
fix ID group-ID orient/eco u0 eta cutoff orientationsFile
* ID, group-ID are documented in fix command
* u0 = energy added to each atom (energy units)
* eta = cutoff value (usually 0.25)
* cutoff = cutoff radius for orientation parameter calculation
* orientationsFile = file that specifies orientation of each grain
Examples
""""""""
.. code-block:: LAMMPS
fix gb all orient/eco 0.08 0.25 3.524 sigma5.ori
Description
"""""""""""
The fix applies a synthetic driving force to a grain boundary which can
be used for the investigation of grain boundary motion. The affiliation
of atoms to either of the two grains forming the grain boundary is
determined from an orientation-dependent order parameter as described
in :ref:`(Ulomek) <Ulomek>`. The potential energy of atoms is either increased by an amount
of 0.5*\ *u0* or -0.5*\ *u0* according to the orientation of the surrounding
crystal. This creates a potential energy gradient which pushes atoms near
the grain boundary to orient according to the energetically favorable
grain orientation. This fix is designed for applications in bicrystal system
with one grain boundary and open ends, or two opposite grain boundaries in
a periodic system. In either case, the entire system can experience a
displacement during the simulation which needs to be accounted for in the
evaluation of the grain boundary velocity. While the basic method is
described in :ref:`(Ulomek) <Ulomek>`, the implementation follows the efficient
implementation from :ref:`(Schratt & Mohles) <Schratt>`. The synthetic potential energy added to an
atom j is given by the following formulas
.. math::
w(|\vec{r}_{jk}|) = w_{jk} & = \left\{\begin{array}{lc} \frac{|\vec{r}_{jk}|^{4}}{r_{\mathrm{cut}}^{4}}
-2\frac{|\vec{r}_{jk}|^{2}}{r_{\mathrm{cut}}^{2}}+1, & |\vec{r}_{jk}|<r_{\mathrm{cut}} \\
0, & |\vec{r}_{jk}|\ge r_{\mathrm{cut}}
\end{array}\right. \\
\chi_{j} & = \frac{1}{N}\sum_{l=1}^{3}\left\lbrack\left\vert\psi_{l}^{\mathrm{I}}(\vec{r}_{j})\right\vert^{2}-\left\vert\psi_{l}^{\mathrm{II}}(\vec{r}_{j})\right\vert^{2}\right\rbrack \\
\psi_{l}^{\mathrm{X}}(\vec{r}_{j}) & = \sum_{k\in\mathit{\Gamma}_{j}}w_{jk}\exp\left(\mathrm{i}\vec{r}_{jk}\cdot\vec{q}_{l}^{\mathrm{X}}\right) \\
u(\chi_{j}) & = \frac{u_{0}}{2}\left\{\begin{array}{lc}
1, & \chi_{j}\ge\eta\\
\sin\left(\frac{\pi\chi_{j}}{2\eta}\right), & -\eta<\chi_{j}<\eta\\
-1, & \chi_{j}\le-\eta
\end{array}\right.
which are fully explained in :ref:`(Ulomek) <Ulomek>`
and :ref:`(Schratt & Mohles) <Schratt>`.
The force on each atom is the negative gradient of the synthetic potential energy. It
depends on the surrounding of this atom. An atom far from the grain boundary does not
experience a synthetic force as its surrounding is that of an oriented single crystal
and thermal fluctuations are masked by the parameter *eta*\ . Near the grain boundary
however, the gradient is nonzero and synthetic force terms are computed.
The orientationsFile specifies the perfect oriented crystal basis vectors for the
two adjoining crystals. The first three lines (line=row vector) for the energetically penalized and the
last three lines for the energetically favored grain assuming *u0* is positive. For
negative *u0*, this is reversed. With the *cutoff* parameter, the size of the region around
each atom which is used in the order parameter computation is defined. The cutoff must be
smaller than the interaction range of the MD potential. It should at
least include the nearest neighbor shell. For high temperatures or low angle
grain boundaries, it might be beneficial to increase the cutoff in order to get a more
precise identification of the atoms surrounding. However, computation time will
increase as more atoms are considered in the order parameter and force computation.
It is also worth noting that the cutoff radius must not exceed the communication
distance for ghost atoms in LAMMPS. With orientationsFile, the
6 oriented crystal basis vectors is specified. Each line of the input file
contains the three components of a primitive lattice vector oriented according to
the grain orientation in the simulation box. The first (last) three lines correspond
to the primitive lattice vectors of the first (second) grain. An example for
a :math:`\Sigma\langle001\rangle` mis-orientation is given at the end.
If no synthetic energy difference between the grains is created, :math:`u0=0`, the
force computation is omitted. In this case, still, the order parameter of the
driving force is computed and can be used to track the grain boundary motion throughout the
simulation.
**Restart, fix_modify, output, run start/stop, minimize info:**
No information about this fix is written to :doc: `binary restart files <restart>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this fix to
add the potential energy of atom interactions with the grain boundary
driving force to the system's potential energy as part of thermodynamic output.
The total sum of added synthetic potential energy is computed and can be accessed
by various output options. The order parameter as well as the thermally masked
output parameter are stored in per-atom arrays and can also be accessed by various
:doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the start/stop keywords of the run command. This fix is
not invoked during energy minimization.
Restrictions
""""""""""""
This fix is part of the USER-MISC package. It is only enabled if LAMMPS was
built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
Related commands
""""""""""""""""
:doc:`fix_modify <fix_modify>`
:doc:`fix_orient <fix_orient>`
**Default:** none
----------
.. _Ulomek:
**(Ulomek)** Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007
.. _Schratt:
**(Schratt & Mohles)** Schratt, Mohles. Comp. Mat. Sci. 182 (2020) 109774
----------
For illustration purposes, here is an example file that specifies a
:math:`\Sigma=5 \langle 001 \rangle` tilt grain boundary. This is for a lattice constant of 3.52 Angstrom:
.. parsed-literal::
sigma5.ori:
1.671685 0.557228 1.76212
0.557228 -1.671685 1.76212
2.228913 -1.114456 0.00000
0.557228 1.671685 1.76212
1.671685 -0.557228 1.76212
2.228913 1.114456 0.00000

View File

@ -3,7 +3,8 @@
fix poems command fix poems command
================= =================
Syntax: Syntax
""""""
.. parsed-literal:: .. parsed-literal::

View File

@ -90,7 +90,7 @@ although you have the option to change that dimension via the :doc:`fix deform <
For all barostat keywords, the *Pdamp* parameter determines the time For all barostat keywords, the *Pdamp* parameter determines the time
scale on which pressure is relaxed. For example, a value of 10.0 scale on which pressure is relaxed. For example, a value of 10.0
means to relax the pressure in a timespan of (roughly) 10 time units means to relax the pressure in a timespan of (roughly) 10 time units
(tau or fmsec or psec - see the :doc:`units <units>` command). (tau or fs or ps - see the :doc:`units <units>` command).
.. note:: .. note::

View File

@ -3,6 +3,9 @@
fix rhok command fix rhok command
================ ================
Syntax
""""""
.. parsed-literal:: .. parsed-literal::
fix ID group-ID rhok nx ny nz K a fix ID group-ID rhok nx ny nz K a

View File

@ -429,8 +429,8 @@ that dimension via the :doc:`fix deform <fix_deform>` command.
For all barostat keywords, the *Pdamp* parameter operates like the For all barostat keywords, the *Pdamp* parameter operates like the
*Tdamp* parameter, determining the time scale on which pressure is *Tdamp* parameter, determining the time scale on which pressure is
relaxed. For example, a value of 10.0 means to relax the pressure in relaxed. For example, a value of 10.0 means to relax the pressure in
a timespan of (roughly) 10 time units (e.g. tau or fmsec or psec - see a timespan of (roughly) 10 time units (e.g. :math:`\tau` or fs or ps
the :doc:`units <units>` command). - see the :doc:`units <units>` command).
Regardless of what atoms are in the fix group (the only atoms which Regardless of what atoms are in the fix group (the only atoms which
are time integrated), a global pressure or stress tensor is computed are time integrated), a global pressure or stress tensor is computed
@ -514,7 +514,7 @@ desired temperature at each timestep is a ramped value during the run
from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in time from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in time
units and determines how rapidly the temperature is relaxed. For units and determines how rapidly the temperature is relaxed. For
example, a value of 100.0 means to relax the temperature in a timespan example, a value of 100.0 means to relax the temperature in a timespan
of (roughly) 100 time units (tau or fmsec or psec - see the of (roughly) 100 time units (:math:`\tau` or fs or ps - see the
:doc:`units <units>` command). The random # *seed* must be a positive :doc:`units <units>` command). The random # *seed* must be a positive
integer. integer.
@ -539,7 +539,7 @@ timestep is a ramped value during the run from *Tstart* to *Tstop*\ .
The *Tdamp* parameter is specified in time units and determines how The *Tdamp* parameter is specified in time units and determines how
rapidly the temperature is relaxed. For example, a value of 100.0 rapidly the temperature is relaxed. For example, a value of 100.0
means to relax the temperature in a timespan of (roughly) 100 time means to relax the temperature in a timespan of (roughly) 100 time
units (tau or fmsec or psec - see the :doc:`units <units>` command). units (tau or fs or ps - see the :doc:`units <units>` command).
Nose/Hoover chains are used in conjunction with this thermostat. The Nose/Hoover chains are used in conjunction with this thermostat. The
*tparam* keyword can optionally be used to change the chain settings *tparam* keyword can optionally be used to change the chain settings

View File

@ -75,19 +75,21 @@ internal energy and extrapolated velocity are also updated.
.. note:: .. note::
You should not update the particles in rigid bodies via other You should not update the particles in rigid bodies via other
time-integration fixes (e.g. :doc:`fix meso <fix_meso>`, time-integration fixes (e.g. :doc:`fix sph <fix_sph>`, :doc:`fix
:doc:`fix meso/stationary <fix_meso_stationary>`), or you will have conflicting sph/stationary <fix_sph_stationary>`), or you will have conflicting
updates to positions and velocities resulting in unphysical behavior in most updates to positions and velocities resulting in unphysical
cases. When performing a hybrid simulation with some atoms in rigid bodies, behavior in most cases. When performing a hybrid simulation with
and some not, a separate time integration fix like :doc:`fix meso <fix_meso>` some atoms in rigid bodies, and some not, a separate time
should be used for the non-rigid particles. integration fix like :doc:`fix sph <fix_sph>` should be used for
the non-rigid particles.
.. note:: .. note::
These fixes are overkill if you simply want to hold a collection These fixes are overkill if you simply want to hold a collection of
of particles stationary or have them move with a constant velocity. To particles stationary or have them move with a constant velocity. To
hold particles stationary use :doc:`fix meso/stationary <fix_meso_stationary>` instead. If you would like to hold particles stationary use :doc:`fix sph/stationary
move particles with a constant velocity use :doc:`fix meso/move <fix_meso_move>`. <fix_sph_stationary>` instead. If you would like to move particles
with a constant velocity use :doc:`fix meso/move <fix_meso_move>`.
.. warning:: .. warning::
@ -346,7 +348,7 @@ package. It is only enabled if LAMMPS was built with both packages. See
the :doc:`Build package <Build_package>` doc page for more info. the :doc:`Build package <Build_package>` doc page for more info.
This fix requires that atoms store density and internal energy as This fix requires that atoms store density and internal energy as
defined by the :doc:`atom_style meso <atom_style>` command. defined by the :doc:`atom_style sph <atom_style>` command.
All particles in the group must be mesoscopic SPH/SDPD particles. All particles in the group must be mesoscopic SPH/SDPD particles.

View File

@ -1,6 +1,6 @@
.. index:: fix meso .. index:: fix sph
fix meso command fix sph command
================ ================
Syntax Syntax
@ -8,25 +8,26 @@ Syntax
.. parsed-literal:: .. parsed-literal::
fix ID group-ID meso fix ID group-ID sph
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* meso = style name of this fix command * sph = style name of this fix command
Examples Examples
"""""""" """"""""
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix 1 all meso fix 1 all sph
Description Description
""""""""""" """""""""""
Perform time integration to update position, velocity, internal energy Perform time integration to update position, velocity, internal energy
and local density for atoms in the group each timestep. This fix is and local density for atoms in the group each timestep. This fix is
needed to time-integrate mesoscopic systems where particles carry needed to time-integrate SPH systems where particles carry internal
internal variables such as SPH or DPDE. variables such as internal energy. SPH stands for Smoothed Particle
Hydrodynamics.
See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in
LAMMPS. LAMMPS.
@ -48,6 +49,6 @@ LAMMPS was built with that package. See the :doc:`Build package <Build_package>
Related commands Related commands
"""""""""""""""" """"""""""""""""
"fix meso/stationary" :doc:`fix sph/stationary <fix_sph_stationary>`
**Default:** none **Default:** none

View File

@ -1,6 +1,6 @@
.. index:: fix meso/stationary .. index:: fix sph/stationary
fix meso/stationary command fix sph/stationary command
=========================== ===========================
Syntax Syntax
@ -8,17 +8,17 @@ Syntax
.. parsed-literal:: .. parsed-literal::
fix ID group-ID meso/stationary fix ID group-ID sph/stationary
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* meso = style name of this fix command * sph = style name of this fix command
Examples Examples
"""""""" """"""""
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix 1 boundary meso/stationary fix 1 boundary sph/stationary
Description Description
""""""""""" """""""""""
@ -27,7 +27,7 @@ Perform time integration to update internal energy and local density,
but not position or velocity for atoms in the group each timestep. but not position or velocity for atoms in the group each timestep.
This fix is needed for SPH simulations to correctly time-integrate This fix is needed for SPH simulations to correctly time-integrate
fixed boundary particles which constrain a fluid to a given region in fixed boundary particles which constrain a fluid to a given region in
space. space. SPH stands for Smoothed Particle Hydrodynamics.
See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to using SPH in
LAMMPS. LAMMPS.
@ -49,6 +49,6 @@ LAMMPS was built with that package. See the :doc:`Build package <Build_package>
Related commands Related commands
"""""""""""""""" """"""""""""""""
"fix meso" :doc:`fix sph <fix_sph>`
**Default:** none **Default:** none

View File

@ -45,7 +45,7 @@ The desired temperature at each timestep is a ramped value during the
run from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in run from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in
time units and determines how rapidly the temperature is relaxed. For time units and determines how rapidly the temperature is relaxed. For
example, a value of 100.0 means to relax the temperature in a timespan example, a value of 100.0 means to relax the temperature in a timespan
of (roughly) 100 time units (tau or fmsec or psec - see the of (roughly) 100 time units (tau or fs or ps - see the
:doc:`units <units>` command). :doc:`units <units>` command).
*Tstart* can be specified as an equal-style :doc:`variable <variable>`. *Tstart* can be specified as an equal-style :doc:`variable <variable>`.

View File

@ -59,7 +59,7 @@ The desired temperature at each timestep is a ramped value during the
run from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in run from *Tstart* to *Tstop*\ . The *Tdamp* parameter is specified in
time units and determines how rapidly the temperature is relaxed. For time units and determines how rapidly the temperature is relaxed. For
example, a value of 100.0 means to relax the temperature in a timespan example, a value of 100.0 means to relax the temperature in a timespan
of (roughly) 100 time units (tau or fmsec or psec - see the of (roughly) 100 time units (tau or fs or ps - see the
:doc:`units <units>` command). :doc:`units <units>` command).
*Tstart* can be specified as an equal-style :doc:`variable <variable>`. *Tstart* can be specified as an equal-style :doc:`variable <variable>`.

View File

@ -88,7 +88,7 @@ time:
\lambda(\tau) = \tau \lambda(\tau) = \tau
where tau is the scaled time variable *t/t_s*. The option *2* performs where :math:`\tau` is the scaled time variable *t/t_s*. The option *2* performs
the lambda switching at a rate defined by the following switching the lambda switching at a rate defined by the following switching
function function

View File

@ -45,7 +45,7 @@ Syntax
radius = cylinder radius (distance units) radius = cylinder radius (distance units)
* zero or more keyword/value pairs may be appended to args * zero or more keyword/value pairs may be appended to args
* keyword = *wiggle* or *shear* * keyword = *wiggle* or *shear* or *contacts*
.. parsed-literal:: .. parsed-literal::
@ -56,6 +56,9 @@ Syntax
*shear* values = dim vshear *shear* values = dim vshear
dim = *x* or *y* or *z* dim = *x* or *y* or *z*
vshear = magnitude of shear velocity (velocity units) vshear = magnitude of shear velocity (velocity units)
*contacts* value = none
generate contact information for each particle
Examples Examples
"""""""" """"""""
@ -68,6 +71,7 @@ Examples
fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping velocity region myBox 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 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 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
fix 6 all wall/gran hooke 200000.0 NULL 50.0 NULL 0.5 0 xplane -10.0 10.0 contacts
Description Description
""""""""""" """""""""""
@ -171,6 +175,7 @@ the clockwise direction for *vshear* > 0 or counter-clockwise for
*vshear* < 0. In this case, *vshear* is the tangential velocity of *vshear* < 0. In this case, *vshear* is the tangential velocity of
the wall at whatever *radius* has been defined. the wall at whatever *radius* has been defined.
**Restart, fix_modify, output, run start/stop, minimize info:** **Restart, fix_modify, output, run start/stop, minimize info:**
This fix writes the shear friction state of atoms interacting with the This fix writes the shear friction state of atoms interacting with the
@ -181,11 +186,37 @@ 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 restart file, so that the operation of the fix continues in an
uninterrupted fashion. uninterrupted fashion.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this If the :code:`contacts` option is used, this fix generates a per-atom array
fix. No global or per-atom quantities are stored by this fix for with 8 columns as output, containing the contact information for owned
access by various :doc:`output commands <Howto_output>`. No parameter particles (nlocal on each processor). All columns in this per-atom array will
of this fix can be used with the *start/stop* keywords of the be zero if no contact has occurred. The values of these columns are listed in
:doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`. the following table:
+-------+----------------------------------------------------+----------------+
| Index | Value | Units |
+=======+====================================================+================+
| 1 | 1.0 if particle is in contact with wall, | |
| | 0.0 otherwise | |
+-------+----------------------------------------------------+----------------+
| 2 | Force :math:`f_x` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 3 | Force :math:`f_y` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 4 | Force :math:`f_z` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 5 | :math:`\Delta x` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 6 | :math:`\Delta y` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 7 | :math:`\Delta z` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 8 | Radius :math:`r` of atom | distance units |
+-------+----------------------------------------------------+----------------+
None of the :doc:`fix_modify <fix_modify>` options are relevant to this fix.
No parameter of this fix can be used with the *start/stop* keywords of the
:doc:`run <run>` command. This fix is not invoked during :doc:`energy
minimization <minimize>`.
Restrictions Restrictions
"""""""""""" """"""""""""

View File

@ -8,7 +8,7 @@ Syntax
.. parsed-literal:: .. parsed-literal::
fix ID group-ID wall/gran/region fstyle fstyle_params wallstyle regionID fix ID group-ID wall/gran/region fstyle fstyle_params wallstyle regionID keyword values ...
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* wall/region = style name of this fix command * wall/region = style name of this fix command
@ -36,6 +36,12 @@ Syntax
* wallstyle = region (see :doc:`fix wall/gran <fix_wall_gran>` for options for other kinds of walls) * wallstyle = region (see :doc:`fix wall/gran <fix_wall_gran>` for options for other kinds of walls)
* region-ID = region whose boundary will act as wall * region-ID = region whose boundary will act as wall
* keyword = *contacts*
.. parsed-literal::
*contacts* value = none
generate contact information for each particle
Examples Examples
"""""""" """"""""
@ -46,6 +52,7 @@ Examples
fix 3 all wall/gran/region granular hooke 1000.0 50.0 tangential linear_nohistory 1.0 0.4 damping velocity region myBox 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 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 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
fix wall all wall/gran/region hooke/history 1000.0 200.0 200.0 100.0 0.5 1 region myCone contacts
Description Description
""""""""""" """""""""""
@ -215,11 +222,37 @@ uninterrupted fashion.
use the same fix ID for fix wall/gran/region, but assign it a region use the same fix ID for fix wall/gran/region, but assign it a region
with a different region ID. with a different region ID.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this If the :code:`contacts` option is used, this fix generates a per-atom array
fix. No global or per-atom quantities are stored by this fix for with 8 columns as output, containing the contact information for owned
access by various :doc:`output commands <Howto_output>`. No parameter particles (nlocal on each processor). All columns in this per-atom array will
of this fix can be used with the *start/stop* keywords of the be zero if no contact has occurred. The values of these columns are listed in
:doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`. the following table:
+-------+----------------------------------------------------+----------------+
| Index | Value | Units |
+=======+====================================================+================+
| 1 | 1.0 if particle is in contact with wall, | |
| | 0.0 otherwise | |
+-------+----------------------------------------------------+----------------+
| 2 | Force :math:`f_x` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 3 | Force :math:`f_y` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 4 | Force :math:`f_z` exerted on the wall | force units |
+-------+----------------------------------------------------+----------------+
| 5 | :math:`\Delta x` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 6 | :math:`\Delta y` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 7 | :math:`\Delta z` between wall surface and particle | distance units |
+-------+----------------------------------------------------+----------------+
| 8 | Radius :math:`r` of atom | distance units |
+-------+----------------------------------------------------+----------------+
None of the :doc:`fix_modify <fix_modify>` options are relevant to this fix.
No parameter of this fix can be used with the *start/stop* keywords of the
:doc:`run <run>` command. This fix is not invoked during :doc:`energy
minimization <minimize>`.
Restrictions Restrictions
"""""""""""" """"""""""""

View File

@ -145,16 +145,16 @@ parameters, see the :doc:`How-To <Howto_dispersion>` discussion.
The *fftbench* keyword applies only to PPPM. It is off by default. If The *fftbench* keyword applies only to PPPM. It is off by default. If
this option is turned on, LAMMPS will perform a short FFT benchmark this option is turned on, LAMMPS will perform a short FFT benchmark
computation and report its timings, and will thus finish a some seconds computation and report its timings, and will thus finish some seconds
later than it would if this option were off. later than it would if this option were off.
---------- ----------
The *force/disp/real* and *force/disp/kspace* keywords set the force The *force/disp/real* and *force/disp/kspace* keywords set the force
accuracy for the real and space computations for the dispersion part accuracy for the real and reciprocal space computations for the dispersion
of pppm/disp. As shown in :ref:`(Isele-Holder) <Isele-Holder1>`, optimal part of pppm/disp. As shown in :ref:`(Isele-Holder) <Isele-Holder1>`,
performance and accuracy in the results is obtained when these values optimal performance and accuracy in the results is obtained when these
are different. values are different.
---------- ----------
@ -413,10 +413,10 @@ slab correction has also been extended to point dipole interactions
---------- ----------
The *force/disp/real* and *force/disp/kspace* keywords set the force The *force/disp/real* and *force/disp/kspace* keywords set the force
accuracy for the real and space computations for the dispersion part accuracy for the real and reciprocal space computations for the dispersion
of pppm/disp. As shown in :ref:`(Isele-Holder) <Isele-Holder1>`, optimal part of pppm/disp. As shown in :ref:`(Isele-Holder) <Isele-Holder1>`,
performance and accuracy in the results is obtained when these values optimal performance and accuracy in the results is obtained when these
are different. values are different.
The *disp/auto* option controls whether the pppm/disp is allowed to The *disp/auto* option controls whether the pppm/disp is allowed to
generate PPPM parameters automatically. If set to *no*\ , parameters generate PPPM parameters automatically. If set to *no*\ , parameters

View File

@ -39,15 +39,9 @@ pair_style eam/alloy/opt command
pair_style eam/cd command pair_style eam/cd command
========================= =========================
pair_style eam/cd/omp command
=============================
pair_style eam/cd/old command pair_style eam/cd/old command
============================= =============================
pair_style eam/cd/old/omp command
=================================
pair_style eam/fs command pair_style eam/fs command
========================= =========================

View File

@ -28,7 +28,9 @@ Syntax
* flagHI (optional) = 0/1 to exclude/include 1/r hydrodynamic interactions * flagHI (optional) = 0/1 to exclude/include 1/r hydrodynamic interactions
* flagVF (optional) = 0/1 to exclude/include volume fraction corrections in the long-range isotropic terms * flagVF (optional) = 0/1 to exclude/include volume fraction corrections in the long-range isotropic terms
**Examples:** (all assume radius = 1) Examples
""""""""
(all assume radius = 1)
.. code-block:: LAMMPS .. code-block:: LAMMPS

View File

@ -22,7 +22,9 @@ Syntax
* flagHI (optional) = 0/1 to exclude/include 1/r hydrodynamic interactions * flagHI (optional) = 0/1 to exclude/include 1/r hydrodynamic interactions
* flagVF (optional) = 0/1 to exclude/include volume fraction corrections in the long-range isotropic terms * flagVF (optional) = 0/1 to exclude/include volume fraction corrections in the long-range isotropic terms
**Examples:** (all assume radius = 1) Examples
""""""""
(all assume radius = 1)
.. code-block:: LAMMPS .. code-block:: LAMMPS

View File

@ -107,11 +107,11 @@ command, after the third read_data command is used.
The *add*\ , *offset*\ , *shift*\ , *extra*\ , and *group* keywords are The *add*\ , *offset*\ , *shift*\ , *extra*\ , and *group* keywords are
useful in this context. useful in this context.
If a simulation box does not yet exist, the *add* keyword If a simulation box does not yet exist, the *add* keyword cannot be
cannot be used; the read_data command is being used for the first used; the read_data command is being used for the first time. If a
time. If a simulation box does exist, due to using the simulation box does exist, due to using the :doc:`create_box
:doc:`create_box <create_box>` command, or a previous read_data command, <create_box>` command, or a previous read_data command, then the *add*
then the *add* keyword must be used. keyword must be used.
.. note:: .. note::
@ -571,68 +571,69 @@ appended to it, which indicate which image of a periodic simulation
box the atom is in. These may be important to include for some kinds box the atom is in. These may be important to include for some kinds
of analysis. of analysis.
+------------+---------------------------------------------------------------------------+ .. list-table::
| angle | atom-ID molecule-ID atom-type x y z |
+------------+---------------------------------------------------------------------------+ * - angle
| atomic | atom-ID atom-type x y z | - atom-ID molecule-ID atom-type x y z
+------------+---------------------------------------------------------------------------+ * - atomic
| body | atom-ID atom-type bodyflag mass x y z | - atom-ID atom-type x y z
+------------+---------------------------------------------------------------------------+ * - body
| bond | atom-ID molecule-ID atom-type x y z | - atom-ID atom-type bodyflag mass x y z
+------------+---------------------------------------------------------------------------+ * - bond
| charge | atom-ID atom-type q x y z | - atom-ID molecule-ID atom-type x y z
+------------+---------------------------------------------------------------------------+ * - charge
| dipole | atom-ID atom-type q x y z mux muy muz | - atom-type q x y z
+------------+---------------------------------------------------------------------------+ * - dipole
| dpd | atom-ID atom-type theta x y z | - atom-ID atom-type q x y z mux muy muz
+------------+---------------------------------------------------------------------------+ * - dpd
| edpd | atom-ID atom-type edpd_temp edpd_cv x y z | - atom-ID atom-type theta x y z
+------------+---------------------------------------------------------------------------+ * - edpd
| mdpd | atom-ID atom-type rho x y z | - atom-ID atom-type edpd_temp edpd_cv x y z
+------------+---------------------------------------------------------------------------+ * - electron
| tdpd | atom-ID atom-type x y z cc1 cc2 ... ccNspecies | - atom-ID atom-type q spin eradius x y z
+------------+---------------------------------------------------------------------------+ * - ellipsoid
| electron | atom-ID atom-type q spin eradius x y z | - atom-ID atom-type ellipsoidflag density x y z
+------------+---------------------------------------------------------------------------+ * - full
| ellipsoid | atom-ID atom-type ellipsoidflag density x y z | - atom-ID molecule-ID atom-type q x y z
+------------+---------------------------------------------------------------------------+ * - line
| full | atom-ID molecule-ID atom-type q x y z | - atom-ID molecule-ID atom-type lineflag density x y z
+------------+---------------------------------------------------------------------------+ * - mdpd
| line | atom-ID molecule-ID atom-type lineflag density x y z | - atom-ID atom-type rho x y z
+------------+---------------------------------------------------------------------------+ * - molecular
| meso | atom-ID atom-type rho e cv x y z | - atom-ID molecule-ID atom-type x y z
+------------+---------------------------------------------------------------------------+ * - peri
| molecular | atom-ID molecule-ID atom-type x y z | - atom-ID atom-type volume density x y z
+------------+---------------------------------------------------------------------------+ * - smd
| peri | atom-ID atom-type volume density x y z | - atom-ID atom-type molecule volume mass kernel-radius contact-radius x0 y0 z0 x y z
+------------+---------------------------------------------------------------------------+ * - sph
| smd | atom-ID atom-type molecule volume mass kernel-radius contact-radius x y z | - atom-ID atom-type rho esph cv x y z
+------------+---------------------------------------------------------------------------+ * - sphere
| sphere | atom-ID atom-type diameter density x y z | - atom-ID atom-type diameter density x y z
+------------+---------------------------------------------------------------------------+ * - spin
| spin | atom-ID atom-type sp x y z spx spy spz | - atom-ID atom-type x y z spx spy spz sp
+------------+---------------------------------------------------------------------------+ * - tdpd
| template | atom-ID molecule-ID template-index template-atom atom-type x y z | - atom-ID atom-type x y z cc1 cc2 ... ccNspecies
+------------+---------------------------------------------------------------------------+ * - template
| tri | atom-ID molecule-ID atom-type triangleflag density x y z | - atom-ID molecule-ID template-index template-atom atom-type x y z
+------------+---------------------------------------------------------------------------+ * - tri
| wavepacket | atom-ID atom-type charge spin eradius etag cs_re cs_im x y z | - atom-ID molecule-ID atom-type triangleflag density x y z
+------------+---------------------------------------------------------------------------+ * - wavepacket
| hybrid | atom-ID atom-type x y z sub-style1 sub-style2 ... | - atom-ID atom-type charge spin eradius etag cs_re cs_im x y z
+------------+---------------------------------------------------------------------------+ * - hybrid
- atom-ID atom-type x y z sub-style1 sub-style2 ...
The per-atom values have these meanings and units, listed alphabetically: The per-atom values have these meanings and units, listed alphabetically:
* atom-ID = integer ID of atom * atom-ID = integer ID of atom
* atom-type = type of atom (1-Ntype) * atom-type = type of atom (1-Ntype)
* bodyflag = 1 for body particles, 0 for point particles * bodyflag = 1 for body particles, 0 for point particles
* cc = chemical concentration for tDPD particles for each species (mole/volume units) * ccN = chemical concentration for tDPD particles for each species (mole/volume units)
* contact-radius = ??? (distance units) * contact-radius = ??? (distance units)
* cs_re,cs_im = real/imaginary parts of wave packet coefficients * cs_re,cs_im = real/imaginary parts of wave packet coefficients
* cv = heat capacity (need units) for SPH particles * cv = heat capacity (need units) for SPH particles
* density = density of particle (mass/distance\^3 or mass/distance\^2 or mass/distance units, depending on dimensionality of particle) * density = density of particle (mass/distance\^3 or mass/distance\^2 or mass/distance units, depending on dimensionality of particle)
* diameter = diameter of spherical atom (distance units) * diameter = diameter of spherical atom (distance units)
* e = energy (need units) for SPH particles * esph = energy (need units) for SPH particles
* edpd_temp = temperature for eDPD particles (temperature units) * edpd_temp = temperature for eDPD particles (temperature units)
* edpd_cv = volumetric heat capacity for eDPD particles (energy/temperature/volume units) * edpd_cv = volumetric heat capacity for eDPD particles (energy/temperature/volume units)
* ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles * ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles
@ -646,14 +647,15 @@ The per-atom values have these meanings and units, listed alphabetically:
* q = charge on atom (charge units) * q = charge on atom (charge units)
* rho = density (need units) for SPH particles * rho = density (need units) for SPH particles
* spin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP) * spin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP)
* sp = norm of magnetic spin of atom (in number of Bohr magnetons) * sp = magnitude of magnetic spin of atom (Bohr magnetons)
* spx,spy,spz = components of magnetic spin of atom (adim normalized vector) * spx,spy,spz = components of magnetic spin of atom (unit vector)
* template-atom = which atom within a template molecule the atom is * template-atom = which atom within a template molecule the atom is
* template-index = which molecule within the molecule template the atom is part of * template-index = which molecule within the molecule template the atom is part of
* theta = internal temperature of a DPD particle * theta = internal temperature of a DPD particle
* triangleflag = 1 for triangular particles, 0 for point or spherical particles * triangleflag = 1 for triangular particles, 0 for point or spherical particles
* volume = volume of Peridynamic particle (distance\^3 units) * volume = volume of Peridynamic particle (distance\^3 units)
* x,y,z = coordinates of atom (distance units) * x,y,z = coordinates of atom (distance units)
* x0,y0,z0 = original (strain-free) coordinates of atom (distance units)
The units for these quantities depend on the unit style; see the The units for these quantities depend on the unit style; see the
:doc:`units <units>` command for details. :doc:`units <units>` command for details.
@ -715,17 +717,18 @@ as spheres when converting density to mass. However, they can also be
modeled as 2d discs (circles) if the :doc:`set density/disc <set>` modeled as 2d discs (circles) if the :doc:`set density/disc <set>`
command is used to reset their mass after the read_data command is command is used to reset their mass after the read_data command is
used. A *disc* keyword can also be used with time integration fixes, used. A *disc* keyword can also be used with time integration fixes,
such as :doc:`fix nve/sphere <fix_nve_sphere>` and :doc:`fix nvt/sphere <fix_nve_sphere>` to time integrate their motion as 2d such as :doc:`fix nve/sphere <fix_nve_sphere>` and :doc:`fix
nvt/sphere <fix_nve_sphere>` to time integrate their motion as 2d
discs (not 3d spheres), by changing their moment of inertia. discs (not 3d spheres), by changing their moment of inertia.
For atom_style hybrid, following the 5 initial values (ID,type,x,y,z), For atom\_style hybrid, following the 5 initial values
specific values for each sub-style must be listed. The order of the (ID,type,x,y,z), specific values for each sub-style must be listed.
sub-styles is the same as they were listed in the The order of the sub-styles is the same as they were listed in the
:doc:`atom_style <atom_style>` command. The sub-style specific values :doc:`atom_style <atom_style>` command. The specific values for each
are those that are not the 5 standard ones (ID,type,x,y,z). For sub-style are those that are not the 5 standard ones (ID,type,x,y,z).
example, for the "charge" sub-style, a "q" value would appear. For For example, for the "charge" sub-style, a "q" value would appear.
the "full" sub-style, a "molecule-ID" and "q" would appear. These are For the "full" sub-style, a "molecule-ID" and "q" would appear. These
listed in the same order they appear as listed above. Thus if are listed in the same order they appear as listed above. Thus if
.. parsed-literal:: .. parsed-literal::
@ -738,12 +741,14 @@ were used in the input script, each atom line would have these fields:
atom-ID atom-type x y z q diameter density atom-ID atom-type x y z q diameter density
Note that if a non-standard value is defined by multiple sub-styles, Note that if a non-standard value is defined by multiple sub-styles,
it must appear multiple times in the atom line. E.g. the atom line it only appears once in the atom line. E.g. the atom line for
for atom_style hybrid dipole full would list "q" twice: atom_style hybrid dipole full would list "q" only once, with the
dipole sub-style fields; "q" does not appear with the full sub-style
fields.
.. parsed-literal:: .. parsed-literal::
atom-ID atom-type x y z q mux muy myz molecule-ID q atom-ID atom-type x y z q mux muy myz molecule-ID
Atom lines specify the (x,y,z) coordinates of atoms. These can be Atom lines specify the (x,y,z) coordinates of atoms. These can be
inside or outside the simulation box. When the data file is read, inside or outside the simulation box. When the data file is read,
@ -1176,9 +1181,9 @@ pair style. See the :doc:`pair_style <pair_style>` and
:doc:`pair_coeff <pair_coeff>` commands for details. Since pair :doc:`pair_coeff <pair_coeff>` commands for details. Since pair
coefficients for types I != J are not specified, these will be coefficients for types I != J are not specified, these will be
generated automatically by the pair style's mixing rule. See the generated automatically by the pair style's mixing rule. See the
individual pair_style doc pages and the :doc:`pair_modify mix <pair_modify>` command for details. Pair coefficients can also individual pair_style doc pages and the :doc:`pair_modify mix
be set via the :doc:`pair_coeff <pair_coeff>` command in the input <pair_modify>` command for details. Pair coefficients can also be set
script. via the :doc:`pair_coeff <pair_coeff>` command in the input script.
---------- ----------
@ -1200,15 +1205,15 @@ script.
3 3 0.022 2.35197 0.022 2.35197 3 3 0.022 2.35197 0.022 2.35197
3 5 0.022 2.35197 0.022 2.35197 3 5 0.022 2.35197 0.022 2.35197
This section must have N\*(N+1)/2 lines where N = # of atom types. The This section must have N\*(N+1)/2 lines where N = # of atom types.
number and meaning of the coefficients are specific to the defined The number and meaning of the coefficients are specific to the defined
pair style. See the :doc:`pair_style <pair_style>` and pair style. See the :doc:`pair_style <pair_style>` and
:doc:`pair_coeff <pair_coeff>` commands for details. Since pair :doc:`pair_coeff <pair_coeff>` commands for details. Since pair
coefficients for types I != J are all specified, these values will coefficients for types I != J are all specified, these values will
turn off the default mixing rule defined by the pair style. See the turn off the default mixing rule defined by the pair style. See the
individual pair_style doc pages and the :doc:`pair_modify mix <pair_modify>` command for details. Pair coefficients can also individual pair_style doc pages and the :doc:`pair_modify mix
be set via the :doc:`pair_coeff <pair_coeff>` command in the input <pair_modify>` command for details. Pair coefficients can also be set
script. via the :doc:`pair_coeff <pair_coeff>` command in the input script.
---------- ----------

View File

@ -150,8 +150,8 @@ timestep, angle interactions computed 4x, pair interactions computed
The :doc:`timestep <timestep>` command sets the large timestep for the The :doc:`timestep <timestep>` command sets the large timestep for the
outermost rRESPA level. Thus if the 3 loop factors are "2 2 2" for outermost rRESPA level. Thus if the 3 loop factors are "2 2 2" for
4-level rRESPA, and the outer timestep is set to 4.0 fmsec, then the 4-level rRESPA, and the outer timestep is set to 4.0 fs, then the
inner timestep would be 8x smaller or 0.5 fmsec. All other LAMMPS inner timestep would be 8x smaller or 0.5 fs. All other LAMMPS
commands that specify number of timesteps (e.g. :doc:`thermo <thermo>` commands that specify number of timesteps (e.g. :doc:`thermo <thermo>`
for thermo output every N steps, :doc:`neigh_modify delay/every <neigh_modify>` parameters, :doc:`dump <dump>` every N for thermo output every N steps, :doc:`neigh_modify delay/every <neigh_modify>` parameters, :doc:`dump <dump>` every N
steps, etc) refer to the outermost timesteps. steps, etc) refer to the outermost timesteps.
@ -213,10 +213,10 @@ With that caveat, a few rules-of-thumb may be useful in selecting
simulations using the CHARMM or a similar all-atom force field, but simulations using the CHARMM or a similar all-atom force field, but
the concepts are adaptable to other problems. Without SHAKE, bonds the concepts are adaptable to other problems. Without SHAKE, bonds
involving hydrogen atoms exhibit high-frequency vibrations and require involving hydrogen atoms exhibit high-frequency vibrations and require
a timestep on the order of 0.5 fmsec in order to conserve energy. The a timestep on the order of 0.5 fs in order to conserve energy. The
relatively inexpensive force computations for the bonds, angles, relatively inexpensive force computations for the bonds, angles,
impropers, and dihedrals can be computed on this innermost 0.5 fmsec impropers, and dihedrals can be computed on this innermost 0.5 fs
step. The outermost timestep cannot be greater than 4.0 fmsec without step. The outermost timestep cannot be greater than 4.0 fs without
risking energy drift. Smooth switching of forces between the levels risking energy drift. Smooth switching of forces between the levels
of the rRESPA hierarchy is also necessary to avoid drift, and a 1-2 of the rRESPA hierarchy is also necessary to avoid drift, and a 1-2
angstrom "healing distance" (the distance between the outer and inner angstrom "healing distance" (the distance between the outer and inner
@ -230,14 +230,14 @@ simulations:
run_style respa 4 2 2 2 inner 2 4.5 6.0 middle 3 8.0 10.0 outer 4 run_style respa 4 2 2 2 inner 2 4.5 6.0 middle 3 8.0 10.0 outer 4
With these settings, users can expect good energy conservation and With these settings, users can expect good energy conservation and
roughly a 2.5 fold speedup over the *verlet* style with a 0.5 fmsec roughly a 2.5 fold speedup over the *verlet* style with a 0.5 fs
timestep. timestep.
If SHAKE is used with the *respa* style, time reversibility is lost, If SHAKE is used with the *respa* style, time reversibility is lost,
but substantially longer time steps can be achieved. For biomolecular but substantially longer time steps can be achieved. For biomolecular
simulations using the CHARMM or similar all-atom force field, bonds simulations using the CHARMM or similar all-atom force field, bonds
involving hydrogen atoms exhibit high frequency vibrations and require involving hydrogen atoms exhibit high frequency vibrations and require
a time step on the order of 0.5 fmsec in order to conserve energy. a time step on the order of 0.5 fs in order to conserve energy.
These high frequency modes also limit the outer time step sizes since These high frequency modes also limit the outer time step sizes since
the modes are coupled. It is therefore desirable to use SHAKE with the modes are coupled. It is therefore desirable to use SHAKE with
respa in order to freeze out these high frequency motions and increase respa in order to freeze out these high frequency motions and increase
@ -253,7 +253,7 @@ rRESPA:
With these settings, users can expect good energy conservation and With these settings, users can expect good energy conservation and
roughly a 1.5 fold speedup over the *verlet* style with SHAKE and a roughly a 1.5 fold speedup over the *verlet* style with SHAKE and a
2.0 fmsec timestep. 2.0 fs timestep.
For non-biomolecular simulations, the *respa* style can be For non-biomolecular simulations, the *respa* style can be
advantageous if there is a clear separation of time scales - fast and advantageous if there is a clear separation of time scales - fast and

View File

@ -13,7 +13,7 @@ Syntax
* style = *atom* or *type* or *mol* or *group* or *region* * style = *atom* or *type* or *mol* or *group* or *region*
* ID = atom ID range or type range or mol ID range or group ID or region ID * ID = atom ID range or type range or mol ID range or group ID or region ID
* one or more keyword/value pairs may be appended * one or more keyword/value pairs may be appended
* keyword = *type* or *type/fraction* or *type/ratio* or *type/subset* or *mol* or *x* or *y* or *z* or *charge* or *dipole* or *dipole/random* or *quat* or *spin* or *spin/random* or *quat* or *quat/random* or *diameter* or *shape* or *length* or *tri* or *theta* or *theta/random* or *angmom* or *omega* or *mass* or *density* or *density/disc* or *volume* or *image* or *bond* or *angle* or *dihedral* or *improper* or *meso/e* or *meso/cv* or *meso/rho* or *smd/contact/radius* or *smd/mass/density* or *dpd/theta* or *edpd/temp* or *edpd/cv* or *cc* or *i_name* or *d_name* * keyword = *type* or *type/fraction* or *type/ratio* or *type/subset* or *mol* or *x* or *y* or *z* or *charge* or *dipole* or *dipole/random* or *quat* or *spin* or *spin/random* or *quat* or *quat/random* or *diameter* or *shape* or *length* or *tri* or *theta* or *theta/random* or *angmom* or *omega* or *mass* or *density* or *density/disc* or *volume* or *image* or *bond* or *angle* or *dihedral* or *improper* or *sph/e* or *sph/cv* or *sph/rho* or *smd/contact/radius* or *smd/mass/density* or *dpd/theta* or *edpd/temp* or *edpd/cv* or *cc* or *i_name* or *d_name*
.. parsed-literal:: .. parsed-literal::
@ -94,11 +94,11 @@ Syntax
*angle* value = angle type for all angles between selected atoms *angle* value = angle type for all angles between selected atoms
*dihedral* value = dihedral type for all dihedrals between selected atoms *dihedral* value = dihedral type for all dihedrals between selected atoms
*improper* value = improper type for all impropers between selected atoms *improper* value = improper type for all impropers between selected atoms
*meso/e* value = energy of SPH particles (need units) *sph/e* value = energy of SPH particles (need units)
value can be an atom-style variable (see below) value can be an atom-style variable (see below)
*meso/cv* value = heat capacity of SPH particles (need units) *sph/cv* value = heat capacity of SPH particles (need units)
value can be an atom-style variable (see below) value can be an atom-style variable (see below)
*meso/rho* value = density of SPH particles (need units) *sph/rho* value = density of SPH particles (need units)
value can be an atom-style variable (see below) value can be an atom-style variable (see below)
*smd/contact/radius* = radius for short range interactions, i.e. contact and friction *smd/contact/radius* = radius for short range interactions, i.e. contact and friction
value can be an atom-style variable (see below) value can be an atom-style variable (see below)
@ -299,29 +299,31 @@ for each particle set by this command. This keyword does not allow
use of an atom-style variable. use of an atom-style variable.
Keyword *diameter* sets the size of the selected atoms. The particles Keyword *diameter* sets the size of the selected atoms. The particles
must be finite-size spheres as defined by the :doc:`atom_style sphere <atom_style>` command. The diameter of a particle can be must be finite-size spheres as defined by the :doc:`atom_style sphere
set to 0.0, which means they will be treated as point particles. Note <atom_style>` command. The diameter of a particle can be set to 0.0,
that this command does not adjust the particle mass, even if it was which means they will be treated as point particles. Note that this
defined with a density, e.g. via the :doc:`read_data <read_data>` command does not adjust the particle mass, even if it was defined with
command. a density, e.g. via the :doc:`read_data <read_data>` command.
Keyword *shape* sets the size and shape of the selected atoms. The Keyword *shape* sets the size and shape of the selected atoms. The
particles must be ellipsoids as defined by the :doc:`atom_style ellipsoid <atom_style>` command. The *Sx*\ , *Sy*\ , *Sz* settings are particles must be ellipsoids as defined by the :doc:`atom_style
the 3 diameters of the ellipsoid in each direction. All 3 can be set ellipsoid <atom_style>` command. The *Sx*\ , *Sy*\ , *Sz* settings
to the same value, which means the ellipsoid is effectively a sphere. are the 3 diameters of the ellipsoid in each direction. All 3 can be
They can also all be set to 0.0 which means the particle will be set to the same value, which means the ellipsoid is effectively a
treated as a point particle. Note that this command does not adjust sphere. They can also all be set to 0.0 which means the particle will
the particle mass, even if it was defined with a density, e.g. via the be treated as a point particle. Note that this command does not
:doc:`read_data <read_data>` command. adjust the particle mass, even if it was defined with a density,
e.g. via the :doc:`read_data <read_data>` command.
Keyword *length* sets the length of selected atoms. The particles Keyword *length* sets the length of selected atoms. The particles
must be line segments as defined by the :doc:`atom_style line <atom_style>` command. If the specified value is non-zero the must be line segments as defined by the :doc:`atom_style line
line segment is (re)set to a length = the specified value, centered <atom_style>` command. If the specified value is non-zero the line
around the particle position, with an orientation along the x-axis. segment is (re)set to a length = the specified value, centered around
If the specified value is 0.0, the particle will become a point the particle position, with an orientation along the x-axis. If the
particle. Note that this command does not adjust the particle mass, specified value is 0.0, the particle will become a point particle.
even if it was defined with a density, e.g. via the Note that this command does not adjust the particle mass, even if it
:doc:`read_data <read_data>` command. was defined with a density, e.g. via the :doc:`read_data <read_data>`
command.
Keyword *tri* sets the size of selected atoms. The particles must be Keyword *tri* sets the size of selected atoms. The particles must be
triangles as defined by the :doc:`atom_style tri <atom_style>` command. triangles as defined by the :doc:`atom_style tri <atom_style>` command.
@ -335,7 +337,8 @@ does not adjust the particle mass, even if it was defined with a
density, e.g. via the :doc:`read_data <read_data>` command. density, e.g. via the :doc:`read_data <read_data>` command.
Keyword *theta* sets the orientation of selected atoms. The particles Keyword *theta* sets the orientation of selected atoms. The particles
must be line segments as defined by the :doc:`atom_style line <atom_style>` command. The specified value is used to set the must be line segments as defined by the :doc:`atom_style line
<atom_style>` command. The specified value is used to set the
orientation angle of the line segments with respect to the x axis. orientation angle of the line segments with respect to the x axis.
Keyword *theta/random* randomizes the orientation of theta for the Keyword *theta/random* randomizes the orientation of theta for the
@ -346,44 +349,47 @@ regardless of how many processors are being used. This keyword does
not allow use of an atom-style variable. not allow use of an atom-style variable.
Keyword *angmom* sets the angular momentum of selected atoms. The Keyword *angmom* sets the angular momentum of selected atoms. The
particles must be ellipsoids as defined by the :doc:`atom_style ellipsoid <atom_style>` command or triangles as defined by the particles must be ellipsoids as defined by the :doc:`atom_style
:doc:`atom_style tri <atom_style>` command. The angular momentum vector ellipsoid <atom_style>` command or triangles as defined by the
of the particles is set to the 3 specified components. :doc:`atom_style tri <atom_style>` command. The angular momentum
vector of the particles is set to the 3 specified components.
Keyword *omega* sets the angular velocity of selected atoms. The Keyword *omega* sets the angular velocity of selected atoms. The
particles must be spheres as defined by the particles must be spheres as defined by the :doc:`atom_style sphere
:doc:`atom_style sphere <atom_style>` command. The angular velocity <atom_style>` command. The angular velocity vector of the particles
vector of the particles is set to the 3 specified components. is set to the 3 specified components.
Keyword *mass* sets the mass of all selected particles. The particles Keyword *mass* sets the mass of all selected particles. The particles
must have a per-atom mass attribute, as defined by the must have a per-atom mass attribute, as defined by the
:doc:`atom_style <atom_style>` command. See the "mass" command for how :doc:`atom_style <atom_style>` command. See the "mass" command for
to set mass values on a per-type basis. how to set mass values on a per-type basis.
Keyword *density* or *density/disc* also sets the mass of all selected Keyword *density* or *density/disc* also sets the mass of all selected
particles, but in a different way. The particles must have a per-atom particles, but in a different way. The particles must have a per-atom
mass attribute, as defined by the :doc:`atom_style <atom_style>` mass attribute, as defined by the :doc:`atom_style <atom_style>`
command. If the atom has a radius attribute (see :doc:`atom_style sphere <atom_style>`) and its radius is non-zero, its mass is set command. If the atom has a radius attribute (see :doc:`atom_style
from the density and particle volume for 3d systems (the input density sphere <atom_style>`) and its radius is non-zero, its mass is set from
is assumed to be in mass/distance\^3 units). For 2d, the default is the density and particle volume for 3d systems (the input density is
for LAMMPS to model particles with a radius attribute as spheres. assumed to be in mass/distance\^3 units). For 2d, the default is for
LAMMPS to model particles with a radius attribute as spheres.
However, if the *density/disc* keyword is used, then they can be However, if the *density/disc* keyword is used, then they can be
modeled as 2d discs (circles). Their mass is set from the density and modeled as 2d discs (circles). Their mass is set from the density and
particle area (the input density is assumed to be in mass/distance\^2 particle area (the input density is assumed to be in mass/distance\^2
units). units).
If the atom has a shape attribute (see :doc:`atom_style ellipsoid <atom_style>`) and its 3 shape parameters are non-zero, If the atom has a shape attribute (see :doc:`atom_style ellipsoid
then its mass is set from the density and particle volume (the input <atom_style>`) and its 3 shape parameters are non-zero, then its mass
density is assumed to be in mass/distance\^3 units). The is set from the density and particle volume (the input density is
*density/disc* keyword has no effect; it does not (yet) treat 3d assumed to be in mass/distance\^3 units). The *density/disc* keyword
ellipsoids as 2d ellipses. has no effect; it does not (yet) treat 3d ellipsoids as 2d ellipses.
If the atom has a length attribute (see :doc:`atom_style line <atom_style>`) and its length is non-zero, then its mass is If the atom has a length attribute (see :doc:`atom_style line
set from the density and line segment length (the input density is <atom_style>`) and its length is non-zero, then its mass is set from
assumed to be in mass/distance units). If the atom has an area the density and line segment length (the input density is assumed to
attribute (see :doc:`atom_style tri <atom_style>`) and its area is be in mass/distance units). If the atom has an area attribute (see
non-zero, then its mass is set from the density and triangle area (the :doc:`atom_style tri <atom_style>`) and its area is non-zero, then its
input density is assumed to be in mass/distance\^2 units). mass is set from the density and triangle area (the input density is
assumed to be in mass/distance\^2 units).
If none of these cases are valid, then the mass is set to the density If none of these cases are valid, then the mass is set to the density
value directly (the input density is assumed to be in mass units). value directly (the input density is assumed to be in mass units).
@ -399,14 +405,15 @@ defined. A value of 2 means add 2 box lengths to get the true value.
A value of -1 means subtract 1 box length to get the true value. A value of -1 means subtract 1 box length to get the true value.
LAMMPS updates these flags as atoms cross periodic boundaries during LAMMPS updates these flags as atoms cross periodic boundaries during
the simulation. The flags can be output with atom snapshots via the the simulation. The flags can be output with atom snapshots via the
:doc:`dump <dump>` command. If a value of NULL is specified for any of :doc:`dump <dump>` command. If a value of NULL is specified for any
nx,ny,nz, then the current image value for that dimension is unchanged. of nx,ny,nz, then the current image value for that dimension is
For non-periodic dimensions only a value of 0 can be specified. unchanged. For non-periodic dimensions only a value of 0 can be
This command can be useful after a system has been equilibrated and specified. This command can be useful after a system has been
atoms have diffused one or more box lengths in various directions. equilibrated and atoms have diffused one or more box lengths in
This command can then reset the image values for atoms so that they various directions. This command can then reset the image values for
are effectively inside the simulation box, e.g if a diffusion atoms so that they are effectively inside the simulation box, e.g if a
coefficient is about to be measured via the :doc:`compute msd <compute_msd>` command. Care should be taken not to reset the diffusion coefficient is about to be measured via the :doc:`compute
msd <compute_msd>` command. Care should be taken not to reset the
image flags of two atoms in a bond to the same value if the bond image flags of two atoms in a bond to the same value if the bond
straddles a periodic boundary (rather they should be different by +/- straddles a periodic boundary (rather they should be different by +/-
1). This will not affect the dynamics of a simulation, but may mess 1). This will not affect the dynamics of a simulation, but may mess
@ -423,10 +430,10 @@ etc) was set by the *bond types* (\ *angle types*\ , etc) field in the
header of the data file read by the :doc:`read_data <read_data>` header of the data file read by the :doc:`read_data <read_data>`
command. These keywords do not allow use of an atom-style variable. command. These keywords do not allow use of an atom-style variable.
Keywords *meso/e*\ , *meso/cv*\ , and *meso/rho* set the energy, heat Keywords *sph/e*\ , *sph/cv*\ , and *sph/rho* set the energy, heat
capacity, and density of smoothed particle hydrodynamics (SPH) capacity, and density of smoothed particle hydrodynamics (SPH)
particles. See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_ to particles. See `this PDF guide <USER/sph/SPH_LAMMPS_userguide.pdf>`_
using SPH in LAMMPS. to using SPH in LAMMPS.
Keyword *smd/mass/density* sets the mass of all selected particles, Keyword *smd/mass/density* sets the mass of all selected particles,
but it is only applicable to the Smooth Mach Dynamics package but it is only applicable to the Smooth Mach Dynamics package

View File

@ -28,7 +28,8 @@ Syntax
*angle* value = *yes* or *no* *angle* value = *yes* or *no*
*dihedral* value = *yes* or *no* *dihedral* value = *yes* or *no*
Examples: Examples
""""""""
.. code-block:: LAMMPS .. code-block:: LAMMPS

View File

@ -46,22 +46,22 @@ Related commands
Default Default
""""""" """""""
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| choice of :doc:`units <units>` | time units | default timestep size | | choice of :doc:`units <units>` | time units | default timestep size |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| lj | tau | 0.005 tau | | lj | :math:`\tau` | 0.005 :math:`\tau` |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| real | fmsec | 1.0 fmsec | | real | fs | 1.0 fs |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| metal | psec | 0.001 psec | | metal | ps | 0.001 ps |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| si | sec | 1.0e-8 sec (10 nsec) | | si | s | 1.0e-8 s (10 ns) |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| cgs | sec | 1.0e-8 sec (10 nsec) | | cgs | s | 1.0e-8 s (10 ns) |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| electron | fmsec | 0.001 fmsec | | electron | fs | 0.001 fs |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| micro | usec | 2.0 usec | | micro | :math:`\mu`\ s| 2.0 :math:`\mu`\ s |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+
| nano | nsec | 0.00045 nsec | | nano | ns | 0.00045 ns |
+--------------------------------+------------+-----------------------+ +--------------------------------+---------------+-----------------------+

View File

@ -203,7 +203,7 @@ For style *nano*\ , these are the units:
The units command also sets the timestep size and neighbor skin The units command also sets the timestep size and neighbor skin
distance to default values for each style: distance to default values for each style:
* For style *lj* these are dt = 0.005 tau and skin = 0.3 sigma. * For style *lj* these are dt = 0.005 :math:`\tau` and skin = 0.3 :math:`\sigma`.
* For style *real* these are dt = 1.0 femtoseconds and skin = 2.0 Angstroms. * For style *real* these are dt = 1.0 femtoseconds and skin = 2.0 Angstroms.
* For style *metal* these are dt = 0.001 picoseconds and skin = 2.0 Angstroms. * For style *metal* these are dt = 0.001 picoseconds and skin = 2.0 Angstroms.
* For style *si* these are dt = 1.0e-8 seconds and skin = 0.001 meters. * For style *si* these are dt = 1.0e-8 seconds and skin = 0.001 meters.

View File

@ -225,8 +225,8 @@ body defined by the fix, as described above.
The *units* keyword is used by *set* and *ramp*\ . If units = box, The *units* keyword is used by *set* and *ramp*\ . If units = box,
the velocities and coordinates specified in the velocity command are the velocities and coordinates specified in the velocity command are
in the standard units described by the :doc:`units <units>` command in the standard units described by the :doc:`units <units>` command
(e.g. Angstroms/fmsec for real units). If units = lattice, velocities (e.g. Angstroms/fs for real units). If units = lattice, velocities
are in units of lattice spacings per time (e.g. spacings/fmsec) and are in units of lattice spacings per time (e.g. spacings/fs) and
coordinates are in lattice spacings. The :doc:`lattice <lattice>` coordinates are in lattice spacings. The :doc:`lattice <lattice>`
command must have been previously used to define the lattice spacing. command must have been previously used to define the lattice spacing.

View File

@ -135,6 +135,7 @@ atan
atc atc
AtC AtC
ATC ATC
athermal
athomps athomps
atm atm
atomeye atomeye
@ -223,6 +224,7 @@ Bfrac
bgq bgq
Bh Bh
Bialke Bialke
bicrystal
Biersack Biersack
bigbig bigbig
bigint bigint
@ -284,6 +286,7 @@ br
Branduardi Branduardi
Branicio Branicio
brennan brennan
Brien
Brilliantov Brilliantov
Broadwell Broadwell
Broglie Broglie
@ -327,6 +330,7 @@ ccache
ccachepiecewise ccachepiecewise
ccl ccl
ccmake ccmake
ccN
ccNspecies ccNspecies
CCu CCu
cd cd
@ -593,6 +597,7 @@ Derjaguin
Derlet Derlet
Deserno Deserno
Destree Destree
destructor
detils detils
Devanathan Devanathan
devel devel
@ -627,7 +632,6 @@ dipolar
dir dir
Direc Direc
dirname dirname
disarmmd
discoverable discoverable
discretization discretization
discretized discretized
@ -719,6 +723,7 @@ ebook
ebt ebt
ec ec
Ec Ec
eco
ecoul ecoul
ecp ecp
Ecut Ecut
@ -833,6 +838,7 @@ Espanol
Eshelby Eshelby
eshelby eshelby
eskm eskm
esph
esu esu
esub esub
esw esw
@ -940,7 +946,6 @@ fmackay
fmag fmag
fmass fmass
fmm fmm
fmsec
fmx fmx
fmy fmy
fmz fmz
@ -1821,6 +1826,7 @@ Modine
mofff mofff
MOFFF MOFFF
Mohd Mohd
Mohles
mol mol
Mol Mol
molfile molfile
@ -1983,6 +1989,7 @@ Neumann
Nevent Nevent
nevery nevery
Nevery Nevery
newfile
Newns Newns
newtype newtype
Neyts Neyts
@ -2075,9 +2082,9 @@ Nroff
nrun nrun
Ns Ns
Nsample Nsample
nsec
Nskip Nskip
Nspecies Nspecies
ns
nsq nsq
Nstart Nstart
nstats nstats
@ -2161,6 +2168,7 @@ optimizations
orangered orangered
organometallic organometallic
orientational orientational
orientationsFile
orientorder orientorder
Orlikowski Orlikowski
ornl ornl
@ -2350,7 +2358,6 @@ ps
Ps Ps
pscreen pscreen
pscrozi pscrozi
psec
pseudodynamics pseudodynamics
pseudopotential pseudopotential
Pstart Pstart
@ -2455,6 +2462,7 @@ rdc
rdf rdf
RDideal RDideal
rdx rdx
reacter
README README
realtime realtime
reamin reamin
@ -2626,6 +2634,7 @@ Schimansky
Schiotz Schiotz
Schlitter Schlitter
Schmid Schmid
Schratt
Schoen Schoen
Schotte Schotte
Schulten Schulten
@ -3038,6 +3047,7 @@ ul
ulb ulb
Uleft Uleft
uloop uloop
Ulomek
ulsph ulsph
uMech uMech
umin umin

View File

@ -10,7 +10,7 @@ velocity all create 1.44 320984 loop geom
neighbor 0.3 bin neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule all neigh_modify exclude molecule/intra all
pair_style line/lj 2.5 pair_style line/lj 2.5
pair_coeff * * 1.0 1.0 1.0 0.25 2.5 pair_coeff * * 1.0 1.0 1.0 0.25 2.5
@ -33,8 +33,10 @@ compute 2 all ke
compute 3 all pe compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms variable toteng equal (c_1+c_2+c_3)/atoms
compute_modify thermo_temp extra/dof -350
thermo 1000 thermo 1000
thermo_style custom step temp f_2 pe ke c_1 c_2 c_3 v_toteng thermo_style custom step f_2 pe ke c_1 c_2 c_3 v_toteng
run 10000 run 10000

View File

@ -36,7 +36,7 @@ velocity small create 1.44 87287 loop geom
neighbor 0.3 bin neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule big include big neigh_modify exclude molecule/intra big include big
comm_modify mode multi group big vel yes comm_modify mode multi group big vel yes
neigh_modify include big neigh_modify include big
@ -68,13 +68,15 @@ compute tbig big temp
variable pebig equal pe*atoms/count(big) variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big) variable ebig equal etotal*atoms/count(big)
compute_modify tbig extra/dof -350
compute 1 big erotate/asphere compute 1 big erotate/asphere
compute 2 all ke compute 2 all ke
compute 3 all pe compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms variable toteng equal (c_1+c_2+c_3)/atoms
thermo 1000 thermo 1000
thermo_style custom step temp c_tsmall f_2[9] c_1 etotal & thermo_style custom step c_tsmall f_2[9] c_1 etotal &
v_pebig v_ebig press v_pebig v_ebig press
thermo_modify temp tbig thermo_modify temp tbig

View File

@ -35,7 +35,7 @@ velocity small create 1.44 87287 loop geom
neighbor 0.3 bin neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule big include big neigh_modify exclude molecule/intra big include big
comm_modify mode multi group big vel yes comm_modify mode multi group big vel yes
neigh_modify include big neigh_modify include big
@ -66,6 +66,8 @@ compute tbig big temp
variable pebig equal pe*atoms/count(big) variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big) variable ebig equal etotal*atoms/count(big)
compute_modify tbig extra/dof -4500
compute 1 big erotate/asphere compute 1 big erotate/asphere
compute 2 all ke compute 2 all ke
compute 3 all pe compute 3 all pe

View File

@ -1,5 +1,5 @@
# Input File for DPD fluid under isothermal conditions using the VV-SSA integration scheme # Input File for DPD fluid under isothermal conditions using the VV-SSA integration scheme
log log.dpd-shardlow
boundary p p p boundary p p p
units metal units metal

View File

@ -1,6 +1,5 @@
# INPUT FILE FOR DPD_Fluid # INPUT FILE FOR DPD_Fluid
log log.dpd-vv
boundary p p p boundary p p p
units metal # ev, ps units metal # ev, ps

View File

@ -1,5 +1,5 @@
# Input File for DPD fluid under isoenergetic conditions using the VV-SSA integration scheme # Input File for DPD fluid under isoenergetic conditions using the VV-SSA integration scheme
log log.dpde-shardlow
boundary p p p boundary p p p
units metal # ev, ps units metal # ev, ps

View File

@ -1,6 +1,5 @@
# INPUT FILE FOR DPD_Fluid # INPUT FILE FOR DPD_Fluid
log log.dpde-vv
boundary p p p boundary p p p
units metal # ev, ps units metal # ev, ps

View File

@ -1,5 +1,5 @@
# Input File for DPD fluid under isoenthalpic conditions using the VV-SSA integration scheme # Input File for DPD fluid under isoenthalpic conditions using the VV-SSA integration scheme
log log.dpdh-shardlow
boundary p p p boundary p p p
units metal # ev, ps units metal # ev, ps

View File

@ -1,5 +1,5 @@
# Input File for DPD fluid under isobaric conditions using the VV-SSA integration scheme # Input File for DPD fluid under isobaric conditions using the VV-SSA integration scheme
log log.dpdp-shardlow
boundary p p p boundary p p p
units metal units metal

View File

@ -1,6 +1,5 @@
# Example for running DPD-RX # Example for running DPD-RX
log log.dpdrx-shardlow
boundary p p p boundary p p p
units metal # ev, ps units metal # ev, ps
atom_style dpd atom_style dpd

View File

@ -1,5 +1,5 @@
# RDX coarse-grain model # RDX coarse-grain model
log log.multi-lucy
units metal # ev, ps units metal # ev, ps
atom_style dpd atom_style dpd
atom_modify map array atom_modify map array

View File

@ -1,5 +1,4 @@
variable sname index adamantane_ionized variable sname index adamantane_ionized
log ${sname}.nve.log
units electron units electron
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index Be-solid variable sname index Be-solid
log ${sname}.spe.log
units electron units electron
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index ch4 variable sname index ch4
log ${sname}.nve.log
units electron units electron
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index ch4 variable sname index ch4
log ${sname}.nve.log
units electron units electron
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index ch4_ionized variable sname index ch4_ionized
log ${sname}.nvt.log
units electron units electron
newton on newton on
@ -15,6 +14,7 @@ pair_coeff * *
comm_modify vel yes comm_modify vel yes
# minimize # minimize
min_style cg min_style cg
min_modify line quadratic min_modify line quadratic
minimize 0 1.0e-6 10000 100000 minimize 0 1.0e-6 10000 100000

View File

@ -1,5 +1,4 @@
variable sname index h_atom.ang variable sname index h_atom.ang
log ${sname}.spe.log
units real units real
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index h_atom.bohr variable sname index h_atom.bohr
log ${sname}.spe.log
units electron units electron
newton on newton on

View File

@ -1,5 +1,4 @@
variable sname index h2 variable sname index h2
log ${sname}.spe.log
units electron units electron
newton on newton on
@ -47,4 +46,4 @@ unfix 3
#fix 1 all nve/eff #fix 1 all nve/eff
run 100000 run 10000

View File

@ -1,5 +1,4 @@
variable sname index h2bulk variable sname index h2bulk
log ${sname}.npt.log
units electron units electron
newton on newton on
@ -41,7 +40,8 @@ dump 2 all xyz 10000 ${sname}.npt.xyz
compute 1 all property/atom spin eradius compute 1 all property/atom spin eradius
dump 3 all custom 10000 ${sname}.npt.lammpstrj id type x y z c_1[1] c_1[2] dump 3 all custom 10000 ${sname}.npt.lammpstrj id type x y z c_1[1] c_1[2]
run 10000000 thermo 1
run 10
unfix 1 unfix 1
undump 2 undump 2

View File

@ -1,5 +1,4 @@
variable sname index h2bulk variable sname index h2bulk
log ${sname}.nve.log
units electron units electron
newton on newton on
@ -18,13 +17,13 @@ comm_modify vel yes
compute effTemp all temp/eff compute effTemp all temp/eff
thermo 1000 thermo 10
thermo_style custom step pe temp press thermo_style custom step pe temp press
thermo_modify temp effTemp thermo_modify temp effTemp
# structure minimization # structure minimization
min_style cg min_style cg
minimize 0 1.0e-4 1000 10000 minimize 0 1.0e-4 10 10
timestep 0.001 timestep 0.001
@ -41,7 +40,7 @@ dump 2 all xyz 1000 ${sname}.nve.xyz
compute 1 all property/atom spin eradius compute 1 all property/atom spin eradius
dump 3 all custom 1000 ${sname}.nve.lammpstrj id type x y z c_1[1] c_1[2] c_peatom c_keatom dump 3 all custom 1000 ${sname}.nve.lammpstrj id type x y z c_1[1] c_1[2] c_peatom c_keatom
run 100000 run 10
unfix 1 unfix 1
#unfix 2 #unfix 2

View File

@ -1,5 +1,4 @@
variable sname index h2bulk.ang variable sname index h2bulk.ang
log ${sname}.nve.log
units real units real
newton on newton on
@ -29,13 +28,13 @@ variable epauli equal c_energies[2]
variable ecoul equal c_energies[3] variable ecoul equal c_energies[3]
variable erres equal c_energies[4] variable erres equal c_energies[4]
thermo 100 thermo 10
thermo_style custom step etotal pe ke v_eke v_epauli v_ecoul v_erres press v_press temp thermo_style custom step etotal pe ke v_eke v_epauli v_ecoul v_erres press v_press temp
thermo_modify temp effTemp press effPress flush yes thermo_modify temp effTemp press effPress flush yes
# structure minimization # structure minimization
min_style cg min_style cg
minimize 0 1.0e-4 1000 10000 minimize 0 1.0e-4 10 10
timestep 0.001 timestep 0.001
@ -52,7 +51,7 @@ dump 2 all xyz 1000 ${sname}.nve.xyz
compute 1 all property/atom spin eradius compute 1 all property/atom spin eradius
dump 3 all custom 1000 ${sname}.nve.lammpstrj id type x y z c_1[1] c_1[2] c_peatom c_keatom dump 3 all custom 1000 ${sname}.nve.lammpstrj id type x y z c_1[1] c_1[2] c_peatom c_keatom
run 100000 run 10
unfix 1 unfix 1
#unfix 2 #unfix 2

View File

@ -1,5 +1,4 @@
variable sname index Li-dendritic variable sname index Li-dendritic
log ${sname}.min.log
units electron units electron
newton on newton on
@ -7,8 +6,8 @@ boundary p p p
atom_style electron atom_style electron
#read_data data.${sname} read_data data.${sname}
read_restart ${sname}.min.restart2 #read_restart ${sname}.min.restart2
pair_style eff/cut 50.112 pair_style eff/cut 50.112
pair_coeff * * pair_coeff * *

View File

@ -1,5 +1,4 @@
variable sname index Li-dendritic variable sname index Li-dendritic
log ${sname}.min.log
units electron units electron
newton on newton on
@ -29,7 +28,7 @@ compute 1 all property/atom spin eradius
#dump 1 all custom 100 ${sname}.min.lammpstrj id type x y z q c_1[1] c_1[2] #dump 1 all custom 100 ${sname}.min.lammpstrj id type x y z q c_1[1] c_1[2]
#dump 2 all xyz 100 ${sname}.min.xyz #dump 2 all xyz 100 ${sname}.min.xyz
min_modify line quadratic dmax 0.05 min_modify line quadratic dmax 0.05
minimize 0 1.0e-7 1000 2000 minimize 0 1.0e-7 100 100
write_restart ${sname}.min.restart write_restart ${sname}.min.restart
@ -46,7 +45,7 @@ dump 1 all custom 100 ${sname}.nvt.lammpstrj id type x y z c_1[1] c_1
dump 2 all xyz 100 ${sname}.nvt.xyz dump 2 all xyz 100 ${sname}.nvt.xyz
restart 100 ${sname}.nvt.restart1 ${sname}.nvt.restart2 restart 100 ${sname}.nvt.restart1 ${sname}.nvt.restart2
run 10000 run 100
undump 1 undump 1
undump 2 undump 2

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