Merge branch 'master' into relres-update

This commit is contained in:
Axel Kohlmeyer
2021-02-28 23:20:44 -05:00
1094 changed files with 35622 additions and 20823 deletions

47
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,47 @@
# GitHub action to run static code analysis on C++ and Python code
name: "CodeQL Code Analysis"
on:
push:
branches: [master]
jobs:
analyze:
name: Analyze
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp', 'python']
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Building LAMMPS via CMake
if: ${{ matrix.language == 'cpp' }}
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake
cmake --build . --parallel 2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

34
.github/workflows/unittest-macos.yml vendored Normal file
View File

@ -0,0 +1,34 @@
# GitHub action to build LAMMPS on MacOS and run unit tests
name: "Unittest for MacOS"
on:
push:
branches: [master]
jobs:
build:
name: MacOS Unit Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Building LAMMPS via CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake \
-DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON
cmake --build . --parallel 2
- name: Run Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -V

View File

@ -107,13 +107,15 @@ option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS
QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB
USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REACTION
USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
set(SUFFIX_PACKAGES CORESHELL USER-OMP KOKKOS OPT USER-INTEL GPU)
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF
USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF)
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP)
foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES})
option(PKG_${PKG} "Build ${PKG} Package" OFF)
endforeach()
@ -154,8 +156,7 @@ if(BUILD_MPI)
endif()
endif()
else()
enable_language(C)
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c)
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.cpp)
add_library(mpi_stubs STATIC ${MPI_SOURCES})
set_target_properties(mpi_stubs PROPERTIES OUTPUT_NAME lammps_mpi_stubs${LAMMPS_MACHINE})
target_include_directories(mpi_stubs PUBLIC $<BUILD_INTERFACE:${LAMMPS_SOURCE_DIR}/STUBS>)
@ -650,7 +651,7 @@ install(
if(BUILD_SHARED_LIBS)
if(CMAKE_VERSION VERSION_LESS 3.12)
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
set(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6 3.5)
set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5)
find_package(PythonInterp) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
@ -660,10 +661,10 @@ if(BUILD_SHARED_LIBS)
endif()
if (Python_EXECUTABLE)
add_custom_target(
install-python
${Python_EXECUTABLE} install.py -v ${LAMMPS_SOURCE_DIR}/version.h
install-python ${CMAKE_COMMAND} -E remove_directory build
COMMAND ${Python_EXECUTABLE} install.py -v ${LAMMPS_SOURCE_DIR}/version.h
-p ${LAMMPS_PYTHON_DIR}/lammps
-l ${CMAKE_BINARY_DIR}/liblammps${CMAKE_SHARED_LIBRARY_SUFFIX}
-l ${CMAKE_BINARY_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX}
WORKING_DIRECTORY ${LAMMPS_PYTHON_DIR}
COMMENT "Installing LAMMPS Python module")
else()
@ -776,9 +777,7 @@ if(PKG_GPU)
message(STATUS "<<< GPU package settings >>>
-- GPU API: ${GPU_API}")
if(GPU_API STREQUAL "CUDA")
message(STATUS "GPU architecture: ${GPU_ARCH}")
elseif(GPU_API STREQUAL "OPENCL")
message(STATUS "OpenCL tuning: ${OCL_TUNE}")
message(STATUS "GPU default architecture: ${GPU_ARCH}")
elseif(GPU_API STREQUAL "HIP")
message(STATUS "HIP platform: ${HIP_PLATFORM}")
message(STATUS "HIP architecture: ${HIP_ARCH}")

View File

@ -50,9 +50,9 @@ if(BUILD_DOC)
OUTPUT ${DOC_BUILD_DIR}/requirements.txt
DEPENDS docenv ${DOCENV_REQUIREMENTS_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${DOCENV_REQUIREMENTS_FILE} ${DOC_BUILD_DIR}/requirements.txt
COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade pip
COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip install --use-feature=2020-resolver -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade pip
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)
# download mathjax distribution and unpack to folder "mathjax"

View File

@ -20,10 +20,10 @@ ExternalProject_Add(googletest
-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
BUILD_BYPRODUCTS <BINARY_DIR>/lib/libgtest${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
<BINARY_DIR>/lib/libgmock${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
<BINARY_DIR>/lib/libgtest_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
<BINARY_DIR>/lib/libgmock_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
@ -39,10 +39,10 @@ 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)
set(GTEST_LIBRARY_PATH ${BINARY_DIR}/lib/libgtest${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GMOCK_LIBRARY_PATH ${BINARY_DIR}/lib/libgmock${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GTEST_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/libgtest_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
set(GMOCK_MAIN_LIBRARY_PATH ${BINARY_DIR}/lib/libgmock_main${GTEST_LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
# Prevent GoogleTest from overriding our compiler/linker options
# when building with Visual Studio

View File

@ -0,0 +1,48 @@
message(STATUS "Downloading and building OpenCL loader library")
include(ExternalProject)
set(OPENCL_LOADER_URL "https://download.lammps.org/thirdparty/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
mark_as_advanced(OPENCL_LOADER_URL)
ExternalProject_Add(opencl_loader
URL ${OPENCL_LOADER_URL}
URL_MD5 011cdcbd41030be94f3fced6d763a52a
SOURCE_DIR "${CMAKE_BINARY_DIR}/opencl_loader-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/opencl_loader-build"
CMAKE_ARGS ${CMAKE_REQUEST_PIC} ${CMAKE_EXTRA_OPENCL_LOADER_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>/libOpenCL${CMAKE_STATIC_LIBRARY_SUFFIX}
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
INSTALL_COMMAND ""
TEST_COMMAND "")
ExternalProject_Get_Property(opencl_loader SOURCE_DIR)
set(OPENCL_LOADER_INCLUDE_DIR ${SOURCE_DIR}/inc)
# workaround for CMake 3.10 on ubuntu 18.04
file(MAKE_DIRECTORY ${OPENCL_LOADER_INCLUDE_DIR})
ExternalProject_Get_Property(opencl_loader BINARY_DIR)
set(OPENCL_LOADER_LIBRARY_PATH "${BINARY_DIR}/libOpenCL${CMAKE_STATIC_LIBRARY_SUFFIX}")
find_package(Threads QUIET)
if(NOT WIN32)
set(OPENCL_LOADER_DEP_LIBS "Threads::Threads;${CMAKE_DL_LIBS}")
else()
set(OPENCL_LOADER_DEP_LIBS "cfgmgr32;runtimeobject")
endif()
add_library(OpenCL::OpenCL UNKNOWN IMPORTED)
add_dependencies(OpenCL::OpenCL opencl_loader)
set_target_properties(OpenCL::OpenCL PROPERTIES
IMPORTED_LOCATION ${OPENCL_LOADER_LIBRARY_PATH}
INTERFACE_INCLUDE_DIRECTORIES ${OPENCL_LOADER_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES "${OPENCL_LOADER_DEP_LIBS}")

View File

@ -1,7 +1,9 @@
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
${GPU_SOURCES_DIR}/fix_gpu.h
${GPU_SOURCES_DIR}/fix_gpu.cpp)
${GPU_SOURCES_DIR}/fix_gpu.cpp
${GPU_SOURCES_DIR}/fix_nh_gpu.h
${GPU_SOURCES_DIR}/fix_nh_gpu.cpp)
target_compile_definitions(lammps PRIVATE -DLMP_GPU)
set(GPU_API "opencl" CACHE STRING "API used by GPU package")
@ -36,6 +38,9 @@ if(GPU_API STREQUAL "CUDA")
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
if(CUDA_MPS_SUPPORT)
if(CUDPP_OPT)
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DGPU_CUDA_MPS_SUPPORT=ON")
endif()
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
endif()
@ -98,6 +103,10 @@ if(GPU_API STREQUAL "CUDA")
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
endif()
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
message(WARNING "Unsupported CUDA version. Use at your own risk.")
endif()
@ -136,27 +145,13 @@ if(GPU_API STREQUAL "CUDA")
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
elseif(GPU_API STREQUAL "OPENCL")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
# download and unpack support binaries for compilation of windows binaries.
set(LAMMPS_THIRDPARTY_URL "https://download.lammps.org/thirdparty")
file(DOWNLOAD "${LAMMPS_THIRDPARTY_URL}/opencl-win-devel.tar.gz" "${CMAKE_CURRENT_BINARY_DIR}/opencl-win-devel.tar.gz"
EXPECTED_MD5 2c00364888d5671195598b44c2e0d44d)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf opencl-win-devel.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_library(OpenCL::OpenCL UNKNOWN IMPORTED)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
set_target_properties(OpenCL::OpenCL PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win32/libOpenCL.dll")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set_target_properties(OpenCL::OpenCL PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/lib_win64/libOpenCL.dll")
endif()
set_target_properties(OpenCL::OpenCL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/include")
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ON)
mark_as_advanced(USE_STATIC_OPENCL_LOADER)
if (USE_STATIC_OPENCL_LOADER)
include(OpenCLLoader)
else()
find_package(OpenCL REQUIRED)
endif()
set(OCL_TUNE "generic" CACHE STRING "OpenCL Device Tuning")
set(OCL_TUNE_VALUES intel fermi kepler cypress generic)
set_property(CACHE OCL_TUNE PROPERTY STRINGS ${OCL_TUNE_VALUES})
validate_option(OCL_TUNE OCL_TUNE_VALUES)
string(TOUPPER ${OCL_TUNE} OCL_TUNE)
include(OpenCLUtils)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
@ -200,7 +195,7 @@ elseif(GPU_API STREQUAL "OPENCL")
add_library(gpu STATIC ${GPU_LIB_SOURCES})
target_link_libraries(gpu PRIVATE OpenCL::OpenCL)
target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu)
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT)
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT)
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL)
target_link_libraries(lammps PRIVATE gpu)
@ -208,6 +203,7 @@ elseif(GPU_API STREQUAL "OPENCL")
add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL)
target_link_libraries(ocl_get_devices PRIVATE OpenCL::OpenCL)
add_dependencies(ocl_get_devices OpenCL::OpenCL)
elseif(GPU_API STREQUAL "HIP")
if(NOT DEFINED HIP_PATH)
if(NOT DEFINED ENV{HIP_PATH})
@ -390,13 +386,10 @@ elseif(GPU_API STREQUAL "HIP")
target_link_libraries(lammps PRIVATE gpu)
endif()
# GPU package
FindStyleHeaders(${GPU_SOURCES_DIR} FIX_CLASS fix_ FIX)
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
# detects styles which have GPU version
# detect styles which have a GPU version
RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
RegisterFixStyle(${GPU_SOURCES_DIR}/fix_gpu.h)
get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES)

View File

@ -69,14 +69,14 @@ if(DOWNLOAD_KIM)
BUILD_RPATH "${_rpath_prefix}/kim_build-prefix/lib"
)
else()
if(KIM-API_FOUND AND KIM_API_VERSION VERSION_GREATER_EQUAL 2.2.0)
if(KIM-API_FOUND AND KIM-API_VERSION VERSION_GREATER_EQUAL 2.2.0)
# For kim-api >= 2.2.0
find_package(KIM-API ${KIM-API_MIN_VERSION} CONFIG REQUIRED)
find_package(KIM-API 2.2.0 CONFIG REQUIRED)
target_link_libraries(lammps PRIVATE KIM-API::kim-api)
else()
# For kim-api 2.1.3 (consistent with previous version of this file)
find_package(PkgConfig REQUIRED)
pkg_check_modules(KIM-API REQUIRED IMPORTED_TARGET libkim-api>=KIM-API_MIN_VERSION)
pkg_check_modules(KIM-API REQUIRED IMPORTED_TARGET libkim-api>=${KIM-API_MIN_VERSION})
target_link_libraries(lammps PRIVATE PkgConfig::KIM-API)
endif()
endif()

View File

@ -2,9 +2,8 @@ if(LAMMPS_SIZES STREQUAL BIGBIG)
message(FATAL_ERROR "The MESSAGE Package is not compatible with -DLAMMPS_BIGBIG")
endif()
option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF)
file(GLOB_RECURSE cslib_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.F
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.c
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.cpp)
file(GLOB_RECURSE cslib_SOURCES
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.cpp)
add_library(cslib STATIC ${cslib_SOURCES})
target_compile_definitions(cslib PRIVATE -DLAMMPS_${LAMMPS_SIZES})

View File

@ -1,7 +1,7 @@
# if PYTHON package is included we may also include Python support in MLIAP
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
if(PKG_PYTHON)
find_package(Cythonize)
find_package(Cythonize QUIET)
if(Cythonize_FOUND)
set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
endif()
@ -14,6 +14,15 @@ if(MLIAP_ENABLE_PYTHON)
if(NOT PKG_PYTHON)
message(FATAL_ERROR "Must enable PYTHON package for including Python support in MLIAP")
endif()
if(CMAKE_VERSION VERSION_LESS 3.12)
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in MLIAP requires Python 3.6 or later")
endif()
else()
if(Python_VERSION VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in MLIAP requires Python 3.6 or later")
endif()
endif()
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/MLIAP/mliap_model_python_couple.pyx)

View File

@ -12,7 +12,7 @@ ExternalProject_Add(libyaml
CXX=${CMAKE_CXX_COMPILER}
CC=${CMAKE_C_COMPILER}
--prefix=<INSTALL_DIR> --disable-shared
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}yaml.a
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX}
TEST_COMMAND "")
ExternalProject_Get_Property(libyaml INSTALL_DIR)
@ -23,7 +23,7 @@ set(YAML_LIBRARY_DIR ${INSTALL_DIR}/lib)
file(MAKE_DIRECTORY ${YAML_INCLUDE_DIR})
file(MAKE_DIRECTORY ${YAML_LIBRARY_DIR})
set(YAML_LIBRARY_PATH ${INSTALL_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}yaml.a)
set(YAML_LIBRARY_PATH ${INSTALL_DIR}/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX})
add_library(Yaml::Yaml UNKNOWN IMPORTED)
set_target_properties(Yaml::Yaml PROPERTIES

View File

@ -47,6 +47,8 @@ HAS_PDFLATEX = YES
endif
endif
# override settings for PIP commands
# PIP_OPTIONS = --cert /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt --proxy http://proxy.mydomain.org
#SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())') $(shell test -f $(BUILDDIR)/doxygen/xml/run.stamp && printf -- "-E")
@ -94,7 +96,7 @@ $(SPHINXCONFIG)/conf.py: $(SPHINXCONFIG)/conf.py.in
-e 's,@LAMMPS_PYTHON_DIR@,$(BUILDDIR)/../python,g' \
-e 's,@LAMMPS_DOC_DIR@,$(BUILDDIR),g' $< > $@
html: xmlgen $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all
@(\
@ -118,7 +120,7 @@ html: xmlgen $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@rm -rf html/PDF/.[sg]*
@echo "Build finished. The HTML pages are in doc/html."
spelling: xmlgen $(VENV) $(SPHINXCONFIG)/false_positives.txt
spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \
@ -228,13 +230,13 @@ $(VENV):
@( \
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
. $(VENV)/bin/activate; \
pip install --upgrade pip; \
pip install -r $(BUILDDIR)/utils/requirements.txt; \
pip $(PIP_OPTIONS) install --upgrade pip; \
pip $(PIP_OPTIONS) install -r $(BUILDDIR)/utils/requirements.txt; \
deactivate;\
)
$(MATHJAX):
@git clone --depth 1 https://github.com/mathjax/MathJax.git $@
@git clone --depth 1 git://github.com/mathjax/MathJax.git $@
$(TXT2RST) $(ANCHORCHECK): $(VENV)
@( \

View File

@ -424,6 +424,8 @@ INPUT = @LAMMPS_SOURCE_DIR@/utils.cpp \
@LAMMPS_SOURCE_DIR@/input.h \
@LAMMPS_SOURCE_DIR@/tokenizer.cpp \
@LAMMPS_SOURCE_DIR@/tokenizer.h \
@LAMMPS_SOURCE_DIR@/arg_info.cpp \
@LAMMPS_SOURCE_DIR@/arg_info.h \
@LAMMPS_SOURCE_DIR@/text_file_reader.cpp \
@LAMMPS_SOURCE_DIR@/text_file_reader.h \
@LAMMPS_SOURCE_DIR@/potential_file_reader.cpp \

View File

@ -1,4 +1,4 @@
.TH LAMMPS "24 December 2020" "2020-12-24"
.TH LAMMPS "10 February 2021" "2021-02-10"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.

View File

@ -95,7 +95,7 @@ standard. A more detailed discussion of that is below.
.. note::
The file ``src/STUBS/mpi.c`` provides a CPU timer function
The file ``src/STUBS/mpi.cpp`` provides a CPU timer function
called ``MPI_Wtime()`` that calls ``gettimeofday()``. If your
operating system does not support ``gettimeofday()``, you will
need to insert code to call another timer. Note that the

View File

@ -120,8 +120,6 @@ CMake build
-D GPU_API=value # value = opencl (default) or cuda or hip
-D GPU_PREC=value # precision setting
# value = double or mixed (default) or single
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is sm_50
@ -131,10 +129,12 @@ CMake build
-D HIP_USE_DEVICE_SORT=value # enables GPU sorting
# value = yes (default) or no
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
# enables CUDA Performance Primitives Optimizations
# enables CUDA Performance Primitives Optimizations, must be "no" for CUDA_MPS_SUPPORT=yes
# value = yes (default) or no
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
# value = yes or no (default)
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
# value = yes (default) or no
:code:`GPU_ARCH` settings for different GPU hardware is as follows:
@ -161,6 +161,12 @@ 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 for OpenCL, the default setting is to download, build, and
link with a static OpenCL ICD loader library and standard OpenCL headers. This
way no local OpenCL development headers or library needs to be present and only
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
If you are compiling with HIP, note that before running CMake you will have to
set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` or :code:`CUDA_PATH` are necessary for :code:`hipcc`
@ -219,11 +225,19 @@ Makefile if desired:
* ``CUDA_PRECISION`` = precision (double, mixed, single)
* ``EXTRAMAKE`` = which Makefile.lammps.\* file to copy to Makefile.lammps
The file Makefile.linux_multi is set up to include support for multiple
The file Makefile.cuda is set up to include support for multiple
GPU architectures as supported by the CUDA toolkit in use. This is done
through using the "--gencode " flag, which can be used multiple times and
thus support all GPU architectures supported by your CUDA compiler.
To include CUDA performance primitives set the Makefile variable
``CUDPP_OPT = -DUSE_CUDPP -Icudpp_mini``.
To support the CUDA multiprocessor server you can set the define
``-DCUDA_PROXY``. Please note that in this case you should **not** use
the CUDA performance primitives and thus set the variable ``CUDPP_OPT``
to empty.
If the library build is successful, 3 files should be created:
``lib/gpu/libgpu.a``\ , ``lib/gpu/nvc_get_devices``\ , and
``lib/gpu/Makefile.lammps``\ . The latter has settings that enable LAMMPS
@ -250,18 +264,18 @@ To build with this package, the KIM library with API v2 must be downloaded
and built on your system. It must include the KIM models that you want to
use with LAMMPS.
If you would like to use the :doc:`kim_query <kim_commands>`
If you would like to use the :doc:`kim query <kim_commands>`
command, you also need to have libcurl installed with the matching
development headers and the curl-config tool.
If you would like to use the :doc:`kim_property <kim_commands>`
If you would like to use the :doc:`kim property <kim_commands>`
command, you need to build LAMMPS with the PYTHON package installed
and linked to Python 3.6 or later. See the :ref:`PYTHON package build info <python>`
for more details on this. After successfully building LAMMPS with Python, you
also need to install the kim-property Python package, which can be easily done using
*pip* as ``pip install kim-property``, or from the *conda-forge* channel as
``conda install kim-property`` if LAMMPS is built in Conda. More detailed
information is available at:
also need to install the ``kim-property`` Python package, which can be easily
done using *pip* as ``pip install kim-property``, or from the *conda-forge*
channel as ``conda install kim-property`` if LAMMPS is built in Conda. More
detailed information is available at:
`kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_.
In addition to installing the KIM API, it is also necessary to install the
@ -301,7 +315,7 @@ minutes to hours) to build. Of course you only need to do that once.)
You can download and build the KIM library manually if you prefer;
follow the instructions in ``lib/kim/README``. You can also do
this in one step from the lammps/src dir, using a command like
this in one step from the lammps/src directory, using a command like
these, which simply invoke the ``lib/kim/Install.py`` script with
the specified args.
@ -321,7 +335,7 @@ minutes to hours) to build. Of course you only need to do that once.)
.. code-block:: make
LMP_INC = -DLMP_NO_SSL_CHECK
LMP_INC = -DLMP_NO_SSL_CHECK
Debugging OpenKIM web queries in LAMMPS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -369,10 +383,11 @@ Enabling the extra unit tests have some requirements,
Conda. More detailed information is available at:
`kim-property installation <https://github.com/openkim/kim-property#installing-kim-property>`_.
* It is also necessary to install
``EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000``, and
``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005`` KIM models.
``EAM_Dynamo_MendelevAckland_2007v3_Zr__MO_004835508849_000``,
``EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005``, and
``LennardJones612_UniversalShifted__MO_959249795837_003`` KIM models.
See `Obtaining KIM Models <http://openkim.org/doc/usage/obtaining-models>`_
to learn how to install a pre-build binary of the OpenKIM Repository of
to learn how to install a pre-built binary of the OpenKIM Repository of
Models or see
`Installing KIM Models <https://openkim.org/doc/usage/obtaining-models/#installing_models>`_
to learn how to install the specific KIM models.

View File

@ -20,16 +20,8 @@ the suffix ``.so.0`` (or some other number).
.. note::
Care should be taken to use the same MPI library for the calling code
and the LAMMPS library. The ``library.h`` file includes ``mpi.h``
and uses definitions from it so those need to be available and
consistent. When LAMMPS is compiled with the included STUBS MPI
library, then its ``mpi.h`` file needs to be included. While it is
technically possible to use a full MPI library in the calling code
and link to a serial LAMMPS library compiled with MPI STUBS, it is
recommended to use the *same* MPI library for both, and then use
``MPI_Comm_split()`` in the calling code to pass a suitable
communicator with a subset of MPI ranks to the function creating the
LAMMPS instance.
and the LAMMPS library unless LAMMPS is to be compiled without (real)
MPI support using the include STUBS MPI library.
Link with LAMMPS as a static library
------------------------------------
@ -110,7 +102,7 @@ executable, that are also required to link the LAMMPS executable.
.. code-block:: bash
gcc -c -O -I${HOME}/lammps/src/STUBS -I${HOME}/lammps/src -caller.c
gcc -c -O -I${HOME}/lammps/src -caller.c
g++ -o caller caller.o -L${HOME}/lammps/lib/poems \
-L${HOME}/lammps/src/STUBS -L${HOME}/lammps/src \
-llammps_serial -lpoems -lmpi_stubs
@ -174,7 +166,7 @@ the POEMS package installed becomes:
.. code-block:: bash
gcc -c -O -I${HOME}/lammps/src/STUBS -I${HOME}/lammps/src -caller.c
gcc -c -O -I${HOME}/lammps/src -caller.c
g++ -o caller caller.o -L${HOME}/lammps/src -llammps_serial
Locating liblammps.so at runtime

View File

@ -74,7 +74,11 @@ For the documentation build a python virtual environment is set up in
the folder ``doc/docenv`` and various python packages are installed into
that virtual environment via the ``pip`` tool. For rendering embedded
LaTeX code also the `MathJax <https://www.mathjax.org/>`_ JavaScript
engine needs to be downloaded.
engine needs to be downloaded. If you need to pass additional options
to the pip commands to work (e.g. to use a web proxy or to point to
additional SSL certificates) you can set them via the ``PIP_OPTIONS``
environment variable or uncomment and edit the ``PIP_OPTIONS`` setting
at beginning of the makefile.
The actual translation is then done via ``make`` commands in the doc
folder. The following ``make`` commands are available:
@ -108,7 +112,10 @@ installation of the HTML manual pages into the "install" step when
installing LAMMPS after the CMake build via ``cmake --build . --target
install``. The documentation build is included in the default build
target, but can also be requested independently with
``cmake --build . --target doc``.
``cmake --build . --target doc``. If you need to pass additional options
to the pip commands to work (e.g. to use a web proxy or to point to
additional SSL certificates) you can set them via the ``PIP_OPTIONS``
environment variable.
.. code-block:: bash

View File

@ -60,11 +60,7 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`include <include>`
* :doc:`info <info>`
* :doc:`jump <jump>`
* :doc:`kim_init <kim_commands>`
* :doc:`kim_interactions <kim_commands>`
* :doc:`kim_param <kim_commands>`
* :doc:`kim_property <kim_commands>`
* :doc:`kim_query <kim_commands>`
* :doc:`kim <kim_commands>`
* :doc:`kspace_modify <kspace_modify>`
* :doc:`kspace_style <kspace_style>`
* :doc:`label <label>`

View File

@ -114,7 +114,7 @@ OPT.
* :doc:`nph/eff <fix_nh_eff>`
* :doc:`nph/sphere (o) <fix_nph_sphere>`
* :doc:`nphug <fix_nphug>`
* :doc:`npt (iko) <fix_nh>`
* :doc:`npt (giko) <fix_nh>`
* :doc:`npt/asphere (o) <fix_npt_asphere>`
* :doc:`npt/body <fix_npt_body>`
* :doc:`npt/cauchy <fix_npt_cauchy>`
@ -122,8 +122,8 @@ OPT.
* :doc:`npt/sphere (o) <fix_npt_sphere>`
* :doc:`npt/uef <fix_nh_uef>`
* :doc:`numdiff <fix_numdiff>`
* :doc:`nve (iko) <fix_nve>`
* :doc:`nve/asphere (i) <fix_nve_asphere>`
* :doc:`nve (giko) <fix_nve>`
* :doc:`nve/asphere (gi) <fix_nve_asphere>`
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>`
* :doc:`nve/awpmd <fix_nve_awpmd>`
* :doc:`nve/body <fix_nve_body>`
@ -138,7 +138,7 @@ OPT.
* :doc:`nve/spin <fix_nve_spin>`
* :doc:`nve/tri <fix_nve_tri>`
* :doc:`nvk <fix_nvk>`
* :doc:`nvt (iko) <fix_nh>`
* :doc:`nvt (giko) <fix_nh>`
* :doc:`nvt/asphere (o) <fix_nvt_asphere>`
* :doc:`nvt/body <fix_nvt_body>`
* :doc:`nvt/eff <fix_nh_eff>`

View File

@ -122,7 +122,7 @@ OPT.
* :doc:`lebedeva/z <pair_lebedeva_z>`
* :doc:`lennard/mdf <pair_mdf>`
* :doc:`line/lj <pair_line_lj>`
* :doc:`lj/charmm/coul/charmm (iko) <pair_charmm>`
* :doc:`lj/charmm/coul/charmm (giko) <pair_charmm>`
* :doc:`lj/charmm/coul/charmm/implicit (ko) <pair_charmm>`
* :doc:`lj/charmm/coul/long (gikot) <pair_charmm>`
* :doc:`lj/charmm/coul/long/soft (o) <pair_fep_soft>`

View File

@ -1,11 +1,133 @@
Notes for Developers and Code Maintainers
Notes for developers and code maintainers
-----------------------------------------
This section documents how a few large sections of code with LAMMPS
work at a conceptual level. Comments on code in source files
This section documents how some of the code functionality within
LAMMPS works at a conceptual level. Comments on code in source files
typically document what a variable stores, what a small section of
code does, or what a function does or its input/outputs. The topics
on this page are intended to document code at a higher level.
code does, or what a function does and its input/outputs. The topics
on this page are intended to document code functionality at a higher level.
Fix contributions to instantaneous energy, virial, and cumulative energy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes can calculate contributions to the instantaneous energy and/or
virial of the system, both in a global and peratom sense. Fixes that
perform thermostatting or barostatting can calculate the cumulative
energy they add to or subtract from the system, which is accessed by
the *ecouple* and *econserve* thermodynamic keywords. This subsection
explains how both work and what flags to set in a new fix to enable
this functionality.
Let's start with thermostatting and barostatting fixes. Examples are
the :doc:`fix langevin <fix_langevin>` and :doc:`fix npt <fix_nh>`
commands. Here is what the fix needs to do:
* Set the variable *ecouple_flag* = 1 in the constructor. Also set
*scalar_flag* = 1, *extscalar* = 1, and *global_freq* to a timestep
increment which matches how often the fix is invoked.
* Implement a compute_scalar() method that returns the cumulative
energy added or subtracted by the fix, e.g. by rescaling the
velocity of atoms. The sign convention is that subtracted energy is
positive, added energy is negative. This must be the total energy
added to the entire system, i.e. an "extensive" quantity, not a
per-atom energy. Cumulative means the summed energy since the fix
was instantiated, even across multiple runs. This is because the
energy is used by the *econserve* thermodynamic keyword to check
that the fix is conserving the total energy of the system,
i.e. potential energy + kinetic energy + coupling energy = a
constant.
And here is how the code operates:
* The Modify class makes a list of all fixes that set *ecouple_flag* = 1.
* The :doc:`thermo_style custom <thermo_style>` command defines
*ecouple* and *econserve* keywords.
* These keywords sum the energy contributions from all the
*ecouple_flag* = 1 fixes by invoking the energy_couple() method in
the Modify class, which calls the compute_scalar() method of each
fix in the list.
------------------
Next, here is how a fix contributes to the instantaneous energy and
virial of the system. First, it sets any or all of these flags to a
value of 1 in their constructor:
* *energy_global_flag* to contribute to global energy, example: :doc:`fix indent <fix_indent>`
* *energy_peratom_flag* to contribute to peratom energy, :doc:`fix cmap <fix_cmap>`
* *virial_global_flag* to contribute to global virial, example: :doc:`fix wall <fix_wall>`
* *virial_peratom_flag* to contribute to peratom virial, example: :doc:`fix wall <fix_wall>`
The fix must also do the following:
* For global energy, implement a compute_scalar() method that returns
the energy added or subtracted on this timestep. Here the sign
convention is that added energy is positive, subtracted energy is
negative.
* For peratom energy, invoke the ev_init(eflag,vflag) function each
time the fix is invoked, which initializes per-atom energy storage.
The value of eflag may need to be stored from an earlier call to the
fix during the same timestep. See how the :doc:`fix cmap
<fix_cmap>` command does this in src/MOLECULE/fix_cmap.cpp. When an
energy for one or more atoms is calculated, invoke the ev_tally()
function to tally the contribution to each atom. Both the ev_init()
and ev_tally() methods are in the parent Fix class.
* For global and/or peratom virial, invoke the v_init(vflag) function
each time the fix is invoked, which initializes virial storage.
When forces on one or more atoms are calculated, invoke the
v_tally() function to tally the contribution. Both the v_init() and
v_tally() methods are in the parent Fix class. Note that there are
several variants of v_tally(); choose the one appropriate to your
fix.
.. note::
The ev_init() and ev_tally() methods also account for global and
peratom virial contributions. Thus you do not need to invoke the
v_init() and v_tally() methods, if the fix also calculates peratom
energies.
The fix must also specify whether (by default) to include or exclude
these contributions to the global/peratom energy/virial of the system.
For the fix to include the contributions, set either of both of these
variables in the constructor:
* *thermo_energy* = 1, for global and peratom energy
* *thermo_virial* = 1, for global and peratom virial
Note that these variables are zeroed in fix.cpp. Thus if you don't
set the variables, the contributions will be excluded (by default)
However, the user has ultimate control over whether to include or
exclude the contributions of the fix via the :doc:`fix modify
<fix_modify>` command:
* fix modify *energy yes* to include global and peratom energy contributions
* fix modify *virial yes* to include global and peratom virial contributions
If the fix contributes to any of the global/peratom energy/virial
values for the system, it should be explained on the fix doc page,
along with the default values for the *energy yes/no* and *virial
yes/no* settings of the :doc:`fix modify <fix_modify>` command.
Finally, these 4 contributions are included in the output of 4
computes:
* global energy in :doc:`compute pe <compute_pe>`
* peratom energy in :doc:`compute pe/atom <compute_pe_atom>`
* global virial in :doc:`compute pressure <compute_pressure>`
* peratom virial in :doc:`compute stress/atom <compute_stress_atom>`
These computes invoke a method of the Modify class to include
contributions from fixes that have the corresponding flags set,
e.g. *energy_peratom_flag* and *thermo_energy* for :doc:`compute
pe/atom <compute_pe_atom>`.
Note that each compute has an optional keyword to either include or
exclude all contributions from fixes. Also note that :doc:`compute pe
<compute_pe>` and :doc:`compute pressure <compute_pressure>` are what
is used (by default) by :doc:`thermodynamic output <thermo_style>` to
calculate values for its *pe* and *press* keywords.
KSpace PPPM FFT grids
^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,68 +1,75 @@
Source files
------------
The source files of the LAMMPS code are found in two
directories of the distribution: ``src`` and ``lib``.
Most of the code is C++ but there are small numbers of files
in several other languages.
The source files of the LAMMPS code are found in two directories of the
distribution: ``src`` and ``lib``. Most of the code is written in C++
but there are small a number of files in several other languages like C,
Fortran, Shell script, or Python.
The core of the code is located in the
``src`` folder and its sub-directories.
A sizable number of these files are in the ``src`` directory
itself, but there are plenty of :doc:`packages <Packages>`, which can be
included or excluded when LAMMPS is built. See the :doc:`Include
packages in build <Build_package>` section of the manual for more
information about that part of the build process. LAMMPS currently
supports building with :doc:`conventional makefiles <Build_make>` and
through :doc:`CMake <Build_cmake>` which differ in how packages are
enabled or disabled for a LAMMPS binary. The source files for each
The core of the code is located in the ``src`` folder and its
sub-directories. A sizable number of these files are in the ``src``
directory itself, but there are plenty of :doc:`packages <Packages>`,
which can be included or excluded when LAMMPS is built. See the
:doc:`Include packages in build <Build_package>` section of the manual
for more information about that part of the build process. LAMMPS
currently supports building with :doc:`conventional makefiles
<Build_make>` and through :doc:`CMake <Build_cmake>`. Those procedures
differ in how packages are enabled or disabled for inclusion into a
LAMMPS binary so they cannot be mixed. The source files for each
package are in all-uppercase sub-directories of the ``src`` folder, for
example ``src/MOLECULE`` or ``src/USER-MISC``. The ``src/STUBS``
sub-directory is not a package but contains a dummy MPI library, that is
used when building a serial version of the code. The ``src/MAKE``
directory contains makefiles with settings and flags for a variety of
configuration and machines for the build process with traditional
makefiles.
directory and its sub-directories contain makefiles with settings and
flags for a variety of configuration and machines for the build process
with traditional makefiles.
The ``lib`` directory contains the source code for several supporting
libraries or files with configuration settings to use globally installed
libraries, that are required by some of the optional packages.
Each sub-directory, like ``lib/poems`` or ``lib/gpu``, contains the
source files, some of which are in different languages such as Fortran
or CUDA. These libraries are linked to during a LAMMPS build, if the
corresponding package is installed.
libraries, that are required by some of the optional packages. They may
include python scripts that can transparently download additional source
code on request. Each sub-directory, like ``lib/poems`` or ``lib/gpu``,
contains the source files, some of which are in different languages such
as Fortran or CUDA. These libraries included in the LAMMPS build,
if the corresponding package is installed.
LAMMPS C++ source files almost always come in pairs, such as
``src/run.cpp`` (implementation file) and ``src/run.h`` (header file).
Each pair of files defines a C++
class, for example the :cpp:class:`LAMMPS_NS::Run` class which contains
the code invoked by the :doc:`run <run>` command in a LAMMPS input script.
As this example illustrates, source file and class names often have a
one-to-one correspondence with a command used in a LAMMPS input script.
Some source files and classes do not have a corresponding input script
Each pair of files defines a C++ class, for example the
:cpp:class:`LAMMPS_NS::Run` class which contains the code invoked by the
:doc:`run <run>` command in a LAMMPS input script. As this example
illustrates, source file and class names often have a one-to-one
correspondence with a command used in a LAMMPS input script. Some
source files and classes do not have a corresponding input script
command, e.g. ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force`
class. They are discussed in the next section.
A small number of C++ classes and utility functions are implemented with
only a ``.h`` file. Examples are the Pointer class or the MathVec functions.
The names of all source files are in lower case and may use the
underscore character '_' to separate words. Outside of bundled libraries
which may have different conventions, all C and C++ header files have a
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
``.c`` extension. A small number of C++ classes and utility functions
are implemented with only a ``.h`` file. Examples are the Pointer class
or the MathVec functions.
Class topology
--------------
Though LAMMPS has a lot of source files and classes, its class topology
is relative flat, as outlined in the :ref:`class-topology` figure. Each
name refers to a class and has a pair of associated source files in the
``src`` folder, for example the class :cpp:class:`LAMMPS_NS::Memory`
corresponds to the files ``memory.cpp`` and ``memory.h``, or the class
:cpp:class:`LAMMPS_NS::AtomVec` corresponds to the files
``atom_vec.cpp`` and ``atom_vec.h``. Full lines in the figure represent
compositing: that is the class to the left holds a pointer to an
instance of the class to the right. Dashed lines instead represent
inheritance: the class to the right is derived from the class on the
left. Classes with a red boundary are not instantiated directly, but
they represent the base classes for "styles". Those "styles" make up
the bulk of the LAMMPS code and only a few typical examples are included
in the figure for demonstration purposes.
is not very deep, which can be seen from the :ref:`class-topology`
figure. In that figure, each name refers to a class and has a pair of
associated source files in the ``src`` folder, for example the class
:cpp:class:`LAMMPS_NS::Memory` corresponds to the files ``memory.cpp``
and ``memory.h``, or the class :cpp:class:`LAMMPS_NS::AtomVec`
corresponds to the files ``atom_vec.cpp`` and ``atom_vec.h``. Full
lines in the figure represent compositing: that is the class at the base
of the arrow holds a pointer to an instance of the class at the tip.
Dashed lines instead represent inheritance: the class to the tip of the
arrow is derived from the class at the base. Classes with a red boundary
are not instantiated directly, but they represent the base classes for
"styles". Those "styles" make up the bulk of the LAMMPS code and only
a few representative examples are included in the figure so it remains
readable.
.. _class-topology:
.. figure:: JPG/lammps-classes.png
@ -82,69 +89,76 @@ in the figure for demonstration purposes.
derived classes, which may also hold instances of other classes.
The :cpp:class:`LAMMPS_NS::LAMMPS` class is the topmost class and
represents what is referred to an "instance" of LAMMPS. It is a
composite holding references to instances of other core classes
represents what is generally referred to an "instance" of LAMMPS. It is
a composite holding pointers to instances of other core classes
providing the core functionality of the MD engine in LAMMPS and through
them abstractions of the required operations. The constructor of the
LAMMPS class will instantiate those instances, process the command line
flags, initialize MPI (if not already done) and set up file pointers for
input and output. The destructor will shut everything down and free all
input and output. The destructor will shut everything down and free all
associated memory. Thus code for the standalone LAMMPS executable in
``main.cpp`` simply initializes MPI, instantiates a single instance of
LAMMPS, and passes it the command line flags and input script. It
LAMMPS while passing it the command line flags and input script. It
deletes the LAMMPS instance after the method reading the input returns
and shuts down the MPI environment before it exits the executable.
The :cpp:class:`LAMMPS_NS::Pointers` is not shown in the
:ref:`class-topology` figure, it holds references to members of the
`LAMMPS_NS::LAMMPS`, so that all classes derived from
:cpp:class:`LAMMPS_NS::Pointers` have direct access to those reference.
From the class topology all classes with blue boundary are referenced in
this class and all classes in the second and third columns, that are not
listed as derived classes are instead derived from
:cpp:class:`LAMMPS_NS::Pointers`.
:ref:`class-topology` figure for clarity. It holds references to many
of the members of the `LAMMPS_NS::LAMMPS`, so that all classes derived
from :cpp:class:`LAMMPS_NS::Pointers` have direct access to those
reference. From the class topology all classes with blue boundary are
referenced in the Pointers class and all classes in the second and third
columns, that are not listed as derived classes are instead derived from
:cpp:class:`LAMMPS_NS::Pointers`. To initialize the pointer references
in Pointers, a pointer to the LAMMPS class instance needs to be passed
to the constructor and thus all constructors for classes derived from it
must do so and pass this pointer to the constructor for Pointers.
Since all storage is encapsulated, the LAMMPS class can also be
instantiated multiple times by a calling code, and that can be either
simultaneously or consecutively. When running in parallel with MPI,
care has to be taken, that suitable communicators are used to not
create conflicts between different instances.
Since all storage is supposed to be encapsulated (there are a few
exceptions), the LAMMPS class can also be instantiated multiple times by
a calling code. Outside of the aforementioned exceptions, those LAMMPS
instances can be used alternately. As of the time of this writing
(early 2021) LAMMPS is not yet sufficiently thread-safe for concurrent
execution. When running in parallel with MPI, care has to be taken,
that suitable copies of communicators are used to not create conflicts
between different instances.
The LAMMPS class currently holds instances of 19 classes representing
different core functionalities There are a handful of virtual parent
classes in LAMMPS that define what LAMMPS calls ``styles``. They are
shaded red in the :ref:`class-topology` figure. Each of these are
The LAMMPS class currently (early 2021) holds instances of 19 classes
representing the core functionality. There are a handful of virtual
parent classes in LAMMPS that define what LAMMPS calls ``styles``. They
are shaded red in the :ref:`class-topology` figure. Each of these are
parents of a number of child classes that implement the interface
defined by the parent class. There are two main categories of these
``styles``: some may only have one instance active at a time (e.g. atom,
pair, bond, angle, dihedral, improper, kspace, comm) and there is a
dedicated pointer variable in the composite class that manages them.
dedicated pointer variable for each of them in the composite class.
Setups that require a mix of different such styles have to use a
*hybrid* class that manages and forwards calls to the corresponding
sub-styles for the designated subset of atoms or data. or the composite
class may have lists of class instances, e.g. Modify handles lists of
compute and fix styles, while Output handles dumps class instances.
*hybrid* class that takes the place of the one allowed instance and then
manages and forwards calls to the corresponding sub-styles for the
designated subset of atoms or data. The composite class may also have
lists of class instances, e.g. Modify handles lists of compute and fix
styles, while Output handles a list of dump class instances.
The exception to this scheme are the ``command`` style classes. These
implement specific commands that can be invoked before, after, or between
runs or are commands which launch a simulation. For these an instance
of the class is created, its command() method called and then, after
completion, the class instance deleted. Examples for this are the
create_box, create_atoms, minimize, run, or velocity command styles.
The exception to this scheme are the ``command`` style classes. These
implement specific commands that can be invoked before, after, or in
between runs. For these an instance of the class is created, its
command() method called and then, after completion, the class instance
deleted. Examples for this are the create_box, create_atoms, minimize,
run, or velocity command styles.
For all those ``styles`` certain naming conventions are employed: for
the fix nve command the class is called FixNVE and the files are
the fix nve command the class is called FixNVE and the source files are
``fix_nve.h`` and ``fix_nve.cpp``. Similarly for fix ave/time we have
FixAveTime and ``fix_ave_time.h`` and ``fix_ave_time.cpp``. Style names
FixAveTime and ``fix_ave_time.h`` and ``fix_ave_time.cpp``. Style names
are lower case and without spaces or special characters. A suffix or
multiple appended with a forward slash '/' denotes a variant of the
corresponding class without the suffix. To connect the style name and
the class name, LAMMPS uses macros like the following ATOM\_CLASS,
PAIR\_CLASS, BOND\_CLASS, REGION\_CLASS, FIX\_CLASS, COMPUTE\_CLASS,
or DUMP\_CLASS in the corresponding header file. During compilation
files with the pattern ``style_name.h`` are created that contain include
statements including all headers of all styles of a given type that
are currently active (or "installed).
words are appended with a forward slash '/' which denotes a variant of
the corresponding class without the suffix. To connect the style name
and the class name, LAMMPS uses macros like: ``AtomStyle()``,
``PairStyle()``, ``BondStyle()``, ``RegionStyle()``, and so on in the
corresponding header file. During configuration or compilation files
with the pattern ``style_<name>.h`` are created that consist of a list
of include statements including all headers of all styles of a given
type that are currently active (or "installed).
More details on individual classes in the :ref:`class-topology` are as
@ -152,11 +166,11 @@ follows:
- The Memory class handles allocation of all large vectors and arrays.
- The Error class prints all error and warning messages.
- The Error class prints all (terminal) error and warning messages.
- The Universe class sets up partitions of processors so that multiple
simulations can be run, each on a subset of the processors allocated
for a run, e.g. by the mpirun command.
- The Universe class sets up one or more partitions of processors so
that one or multiple simulations can be run, on the processors
allocated for a run, e.g. by the mpirun command.
- The Input class reads and processes input input strings and files,
stores variables, and invokes :doc:`commands <Commands_all>`.
@ -241,7 +255,8 @@ follows:
.. TODO section on "Spatial decomposition and parallel operations"
.. diagram of 3d processor grid, brick vs. tiled. local vs. ghost
.. atoms, 6-way communication with pack/unpack functions,
.. PBC as part of the communication
.. PBC as part of the communication, forward and reverse communication
.. rendezvous communication, ring communication.
.. TODO section on "Fixes, Computes, and Variables"
.. how and when data is computed and provided and how it is

View File

@ -71,6 +71,9 @@ and parsing files or arguments.
----------
.. doxygenfunction:: strdup
:project: progguide
.. doxygenfunction:: trim
:project: progguide
@ -101,6 +104,9 @@ and parsing files or arguments.
.. doxygenfunction:: strmatch
:project: progguide
.. doxygenfunction:: strfind
:project: progguide
.. doxygenfunction:: is_integer
:project: progguide
@ -292,6 +298,50 @@ This code example should produce the following output:
----------
Argument parsing classes
---------------------------
The purpose of argument parsing classes it to simplify and unify how
arguments of commands in LAMMPS are parsed and to make abstractions of
repetitive tasks.
The :cpp:class:`LAMMPS_NS::ArgInfo` class provides an abstraction
for parsing references to compute or fix styles or variables. These
would start with a "c\_", "f\_", "v\_" followed by the ID or name of
than instance and may be postfixed with one or two array indices
"[<number>]" with numbers > 0.
A typical code segment would look like this:
.. code-block:: C++
:caption: Usage example for ArgInfo class
int nvalues = 0;
for (iarg = 0; iarg < nargnew; iarg++) {
ArgInfo argi(arg[iarg]);
which[nvalues] = argi.get_type();
argindex[nvalues] = argi.get_index1();
ids[nvalues] = argi.copy_name();
if ((which[nvalues] == ArgInfo::UNKNOWN)
|| (which[nvalues] == ArgInfo::NONE)
|| (argi.get_dim() > 1))
error->all(FLERR,"Illegal compute XXX command");
nvalues++;
}
----------
.. doxygenclass:: LAMMPS_NS::ArgInfo
:project: progguide
:members:
----------
File reader classes
-------------------

View File

@ -33,22 +33,19 @@ in its name, e.g. lammps-23Jun18.
----------
You can also download a zip file via the "Clone or download" button on
the `LAMMPS GitHub site <git_>`_. The file name will be lammps-master.zip
which can be unzipped with the following command, to create
a lammps-master dir:
You can also download a compressed tar or zip archives from the
"Assets" sections of the `LAMMPS GitHub releases site <git_>`_.
The file name will be lammps-<version>.zip which can be unzipped
with the following command, to create a lammps-<version> dir:
.. code-block:: bash
$ unzip lammps*.zip
This version is the most up-to-date LAMMPS development version. It
will have the date of the most recent patch release (see the file
src/version.h). But it will also include any new bug-fixes or
features added since the last patch release. They will be included in
the next patch release tarball.
This version corresponds to the selected LAMMPS patch or stable
release.
.. _git: https://github.com/lammps/lammps
.. _git: https://github.com/lammps/lammps/releases
----------

View File

@ -38,17 +38,18 @@ In addition there are DOIs for individual stable releases. Currently there are:
Home page
^^^^^^^^^
The LAMMPS website at `https://lammps.sandia.gov/ <https://lammps.sandia.gov>`_ is the canonical
location for information about LAMMPS and more detailed lists of publications
using LAMMPS and contributing features.
The LAMMPS website at `https://lammps.sandia.gov/
<https://lammps.sandia.gov>`_ is the canonical location for information
about LAMMPS and its features.
Citing contributions
^^^^^^^^^^^^^^^^^^^^
LAMMPS has many features and uses previously published methods and
algorithms or novel features. It also includes potential parameter
filed for specific models. You can look up relevant publications either
in the LAMMPS output to the screen, the ``log.cite`` file (which is
populated with references to relevant papers through embedding them into
the source code) and in the documentation of the :doc:`corresponding commands
LAMMPS has many features and that use either previously published
methods and algorithms or novel features. It also includes potential
parameter filed for specific models. Where available, a reminder about
references for optional features used in a specific run is printed to
the screen and log file. Style and output location can be selected with
the :ref:`-cite command-line switch <cite>`. Additional references are
given in the documentation of the :doc:`corresponding commands
<Commands_all>` or in the :doc:`Howto tutorials <Howto>`.

View File

@ -85,7 +85,7 @@ commands)
* water potentials: TIP3P, TIP4P, SPC
* implicit solvent potentials: hydrodynamic lubrication, Debye
* force-field compatibility with common CHARMM, AMBER, DREIDING, OPLS, GROMACS, COMPASS options
* access to the `OpenKIM Repository <http://openkim.org>`_ of potentials via :doc:`kim_init, kim_interactions, and kim_query <kim_commands>` commands
* access to the `OpenKIM Repository <http://openkim.org>`_ of potentials via :doc:`kim command <kim_commands>`
* hybrid potentials: multiple pair, bond, angle, dihedral, improper potentials can be used in one simulation
* overlaid potentials: superposition of multiple pair potentials

View File

@ -206,16 +206,22 @@ packages in the src directory for examples. If you are uncertain, please ask.
algorithm/science behind the feature itself, or its initial usage, or
its implementation in LAMMPS), you can add the citation to the \*.cpp
source file. See src/USER-EFF/atom_vec_electron.cpp for an example.
A LaTeX citation is stored in a variable at the top of the file and a
single line of code that references the variable is added to the
constructor of the class. Whenever a user invokes your feature from
their input script, this will cause LAMMPS to output the citation to a
log.cite file and prompt the user to examine the file. Note that you
should only use this for a paper you or your group authored.
E.g. adding a cite in the code for a paper by Nose and Hoover if you
write a fix that implements their integrator is not the intended
usage. That kind of citation should just be in the doc page you
provide.
A LaTeX citation is stored in a variable at the top of the file and
a single line of code registering this variable is added to the
constructor of the class. If there is additional functionality (which
may have been added later) described in a different publication,
additional citation descriptions may be added for as long as they
are only registered when the corresponding keyword activating this
functionality is used. With these options it is possible to have
LAMMPS output a specific citation reminder whenever a user invokes
your feature from their input script. Note that you should only use
this for the most relevant paper for a feature and a publication that
you or your group authored. E.g. adding a citation in the code for
a paper by Nose and Hoover if you write a fix that implements their
integrator is not the intended usage. That kind of citation should
just be included in the documentation page you provide describing
your contribution. If you are not sure what the best option would
be, please contact the LAMMPS developers for advice.
Finally, as a general rule-of-thumb, the more clear and
self-explanatory you make your documentation and README files, and the

View File

@ -367,17 +367,19 @@ KIM package
**Contents:**
This package contains a set of commands that serve as a wrapper on the
This package contains a command with a set of sub-commands that serve as a
wrapper on the
`Open Knowledgebase of Interatomic Models (OpenKIM) <https://openkim.org>`_
repository of interatomic models (IMs) enabling compatible ones to be used in
LAMMPS simulations.
This includes :doc:`kim_init <kim_commands>`, and
:doc:`kim_interactions <kim_commands>` commands to select, initialize and
instantiate the IM, a :doc:`kim_query <kim_commands>` command to perform web
This includes :doc:`kim init <kim_commands>`, and
:doc:`kim interactions <kim_commands>` commands to select, initialize and
instantiate the IM, a :doc:`kim query <kim_commands>` command to perform web
queries for material property predictions of OpenKIM IMs, a
:doc:`kim_param <kim_commands>` command to access KIM Model Parameters from
LAMMPS, and a :doc:`kim_property <kim_commands>` command to write material
:doc:`kim param <kim_commands>` command to access KIM Model Parameters from
LAMMPS, and a :doc:`kim property <kim_commands>` command to write material
properties computed in LAMMPS to standard KIM property instance format.
Support for KIM IMs that conform to the
@ -386,8 +388,8 @@ is provided by the :doc:`pair_style kim <pair_kim>` command.
.. note::
The command *pair_style kim* is called by *kim_interactions* and
is not recommended to be directly used in input scripts.
The command *pair_style kim* is called by *kim interactions* and is not
recommended to be directly used in input scripts.
To use this package you must have the KIM API library available on your
system. The KIM API is available for download on the
@ -404,7 +406,7 @@ and is funded by the `National Science Foundation <https://www.nsf.gov/>`_.
API and the *pair_style kim* command. Yaser Afshar (U Minnesota),
Axel Kohlmeyer (Temple U), Ellad Tadmor (U Minnesota), and
Daniel Karls (U Minnesota) contributed to the
:doc:`kim_commands <kim_commands>` interface in close collaboration with
:doc:`kim command <kim_commands>` interface in close collaboration with
Ryan Elliott.
**Install:**
@ -414,7 +416,7 @@ This package has :ref:`specific installation instructions <kim>` on the
**Supporting info:**
* :doc:`kim_commands <kim_commands>`
* :doc:`kim command <kim_commands>`
* :doc:`pair_style kim <pair_kim>`
* src/KIM: filenames -> commands
* src/KIM/README
@ -668,8 +670,8 @@ A general interface for machine-learning interatomic potentials, including PyTor
To use this package, also the :ref:`SNAP package <PKG-SNAP>` package needs
to be installed. To make the *mliappy* model available, also the
:ref:`PYTHON package <PKG-PYTHON>` package needs to be installed, the version of
Python must be 3.6 or later, and the `cython <https://cython.org/>`_ software
:ref:`PYTHON package <PKG-PYTHON>` package needs to be installed, the version
of Python must be 3.6 or later, and the `cython <https://cython.org/>`_ software
must be installed.
**Author:** Aidan Thompson (Sandia), Nicholas Lubbers (LANL).

View File

@ -50,7 +50,7 @@ against invalid accesses.
**Numpy Methods**:
* :py:meth:`numpy.extract_atom() <lammps.numpy_wrapper.extract_atom()>`: extract a per-atom quantity as numpy array
* :py:meth:`numpy.extract_atom() <lammps.numpy_wrapper.numpy_wrapper.extract_atom()>`: extract a per-atom quantity as numpy array
.. tab:: PyLammps/IPyLammps API

View File

@ -0,0 +1,11 @@
Output Readers
==============
.. py:module:: lammps.formats
The Python package contains the :py:mod:`lammps.formats` module, which
provides classes to post-process some of the output files generated by LAMMPS.
.. automodule:: lammps.formats
:members:
:noindex:

View File

@ -13,6 +13,7 @@ together.
Python_module
Python_ext
Python_call
Python_formats
Python_examples
Python_error
Python_trouble

View File

@ -69,7 +69,7 @@ this.
cd build
# configure LAMMPS compilation
cmake -C cmake/presets/minimal.cmake -D BUILD_SHARED_LIBS=on \
cmake -C ../cmake/presets/minimal.cmake -D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on -D PKG_PYTHON=on ../cmake
# compile LAMMPS
@ -97,10 +97,12 @@ this.
For a system-wide installation you need to set
``CMAKE_INSTALL_PREFIX`` to a system folder like ``/usr`` (or
``/usr/local``). The installation step (**not** the
``/usr/local``); the default is ``${HOME}/.local``. The
installation step for a system folder installation (**not** the
configuration/compilation) needs to be done with superuser
privilege, e.g. by using ``sudo cmake --install .``. The
installation folders will then by changed to:
installation folders will then be changed to (assuming ``/usr`` as
prefix):
+------------------------+---------------------------------------------------------+-------------------------------------------------------------+
| File | Location | Notes |

View File

@ -26,6 +26,23 @@ There are multiple Python interface classes in the :py:mod:`lammps` module:
.. _mpi4py_url: https://mpi4py.readthedocs.io
.. admonition:: Version check
:class: note
The :py:mod:`lammps` module stores the version number of the LAMMPS
version it is installed from. When initializing the
:py:class:`lammps <lammps.lammps>` class, this version is checked to
be the same as the result from :py:func:`lammps.version`, the version
of the LAMMPS shared library that the module interfaces to. If the
they are not the same an AttributeError exception is raised since a
mismatch of versions (e.g. due to incorrect use of the
``LD_LIBRARY_PATH`` or ``PYTHONPATH`` environment variables can lead
to crashes or data corruption and otherwise incorrect behavior.
.. automodule:: lammps
:members:
:noindex:
----------
The ``lammps`` class API
@ -44,7 +61,7 @@ functions. Below is a detailed documentation of the API.
.. autoclass:: lammps.lammps
:members:
.. autoclass:: lammps.numpy::numpy_wrapper
.. autoclass:: lammps.numpy_wrapper::numpy_wrapper
:members:
----------
@ -117,8 +134,8 @@ Style Constants
to request from computes or fixes. See :cpp:enum:`_LMP_STYLE_CONST`
for the equivalent constants in the C library interface. Used in
:py:func:`lammps.extract_compute`, :py:func:`lammps.extract_fix`, and their NumPy variants
:py:func:`lammps.numpy.extract_compute() <lammps.numpy.numpy_wrapper.extract_compute>` and
:py:func:`lammps.numpy.extract_fix() <lammps.numpy.numpy_wrapper.extract_fix>`.
:py:func:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.numpy_wrapper.extract_compute>` and
:py:func:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.numpy_wrapper.extract_fix>`.
.. _py_type_constants:
@ -132,8 +149,8 @@ Type Constants
to request from computes or fixes. See :cpp:enum:`_LMP_TYPE_CONST`
for the equivalent constants in the C library interface. Used in
:py:func:`lammps.extract_compute`, :py:func:`lammps.extract_fix`, and their NumPy variants
:py:func:`lammps.numpy.extract_compute() <lammps.numpy.numpy_wrapper.extract_compute>` and
:py:func:`lammps.numpy.extract_fix() <lammps.numpy.numpy_wrapper.extract_fix>`.
:py:func:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.numpy_wrapper.extract_compute>` and
:py:func:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.numpy_wrapper.extract_fix>`.
.. _py_vartype_constants:
@ -153,6 +170,6 @@ Classes representing internal objects
:members:
:no-undoc-members:
.. autoclass:: lammps.numpy::NumPyNeighList
.. autoclass:: lammps.numpy_wrapper::NumPyNeighList
:members:
:no-undoc-members:

View File

@ -14,5 +14,5 @@ Neighbor list access
**NumPy Methods:**
* :py:meth:`lammps.numpy.get_neighlist() <lammps.numpy_wrapper.get_neighlist()>`: Get neighbor list for given index, which uses NumPy arrays for its element neighbor arrays
* :py:meth:`lammps.numpy.get_neighlist_element_neighbors() <lammps.numpy_wrapper.get_neighlist_element_neighbors()>`: Get element in neighbor list and its neighbors (as numpy array)
* :py:meth:`lammps.numpy.get_neighlist() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist()>`: Get neighbor list for given index, which uses NumPy arrays for its element neighbor arrays
* :py:meth:`lammps.numpy.get_neighlist_element_neighbors() <lammps.numpy_wrapper.numpy_wrapper.get_neighlist_element_neighbors()>`: Get element in neighbor list and its neighbors (as numpy array)

View File

@ -36,9 +36,9 @@ computes, fixes, or variables in LAMMPS using the :py:mod:`lammps` module.
Python subscripting. The values will be zero for atoms not in the
specified group.
:py:meth:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.extract_compute()>`,
:py:meth:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.extract_fix()>`, and
:py:meth:`lammps.numpy.extract_variable() <lammps.numpy_wrapper.extract_variable()>` are
:py:meth:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.numpy_wrapper.extract_compute()>`,
:py:meth:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.numpy_wrapper.extract_fix()>`, and
:py:meth:`lammps.numpy.extract_variable() <lammps.numpy_wrapper.numpy_wrapper.extract_variable()>` are
equivalent NumPy implementations that return NumPy arrays instead of ``ctypes`` pointers.
The :py:meth:`lammps.set_variable() <lammps.lammps.set_variable()>` method sets an
@ -54,9 +54,9 @@ computes, fixes, or variables in LAMMPS using the :py:mod:`lammps` module.
**NumPy Methods**:
* :py:meth:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.extract_compute()>`: extract value(s) from a compute, return arrays as numpy arrays
* :py:meth:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.extract_fix()>`: extract value(s) from a fix, return arrays as numpy arrays
* :py:meth:`lammps.numpy.extract_variable() <lammps.numpy_wrapper.extract_variable()>`: extract value(s) from a variable, return arrays as numpy arrays
* :py:meth:`lammps.numpy.extract_compute() <lammps.numpy_wrapper.numpy_wrapper.extract_compute()>`: extract value(s) from a compute, return arrays as numpy arrays
* :py:meth:`lammps.numpy.extract_fix() <lammps.numpy_wrapper.numpy_wrapper.extract_fix()>`: extract value(s) from a fix, return arrays as numpy arrays
* :py:meth:`lammps.numpy.extract_variable() <lammps.numpy_wrapper.numpy_wrapper.extract_variable()>`: extract value(s) from a variable, return arrays as numpy arrays
.. tab:: PyLammps/IPyLammps API

View File

@ -11,6 +11,7 @@ letter abbreviation can be used:
* :ref:`-k or -kokkos <run-kokkos>`
* :ref:`-l or -log <log>`
* :ref:`-m or -mpicolor <mpicolor>`
* :ref:`-c or -cite <cite>`
* :ref:`-nc or -nocite <nocite>`
* :ref:`-pk or -package <package>`
* :ref:`-p or -partition <partition>`
@ -220,14 +221,31 @@ links with from the lib/message directory. See the
----------
.. _cite:
**-cite style or file name**
Select how and where to output a reminder about citing contributions
to the LAMMPS code that were used during the run. Available styles are
"both", "none", "screen", or "log". Any flag will be considered a file
name to write the detailed citation info to. Default is the "log" style
where there is a short summary in the screen output and detailed citations
in BibTeX format in the logfile. The option "both" selects the detailed
output for both, "none", the short output for both, and "screen" will
write the detailed info to the screen and the short version to the log
file. If a dedicated citation info file is requested, the screen and
log file output will be in the short format (same as with "none").
See the :doc:`citation page <Intro_citing>` for more details on
how to correctly reference and cite LAMMPS.
----------
.. _nocite:
**-nocite**
Disable writing the log.cite file which is normally written to list
references for specific cite-able features used during a LAMMPS run.
See the `citation page <https://lammps.sandia.gov/cite.html>`_ for more
details.
Disable generating a citation reminder (see above) at all.
----------

View File

@ -1,11 +1,14 @@
GPU package
===========
The GPU package was developed by Mike Brown while at SNL and ORNL
and his collaborators, particularly Trung Nguyen (now at Northwestern).
It provides GPU versions of many pair styles and for parts of the
:doc:`kspace_style pppm <kspace_style>` for long-range Coulombics.
It has the following general features:
The GPU package was developed by Mike Brown while at SNL and ORNL (now
at Intel Corp.) and his collaborators, particularly Trung Nguyen (now at
Northwestern). Support for AMD GPUs via HIP was added by Vsevolod Nikolskiy
and coworkers at HSE University.
The GPU package provides GPU versions of many pair styles and for
parts of the :doc:`kspace_style pppm <kspace_style>` for long-range
Coulombics. It has the following general features:
* It is designed to exploit common GPU hardware configurations where one
or more GPUs are coupled to many cores of one or more multi-core CPUs,
@ -24,8 +27,9 @@ It has the following general features:
force vectors.
* LAMMPS-specific code is in the GPU package. It makes calls to a
generic GPU library in the lib/gpu directory. This library provides
NVIDIA support as well as more general OpenCL support, so that the
same functionality is supported on a variety of hardware.
either Nvidia support, AMD support, or more general OpenCL support
(for Nvidia GPUs, AMD GPUs, Intel GPUs, and multi-core CPUs).
so that the same functionality is supported on a variety of hardware.
**Required hardware/software:**
@ -45,12 +49,23 @@ to have the OpenCL headers and the (vendor neutral) OpenCL library installed.
In OpenCL mode, the acceleration depends on having an `OpenCL Installable Client Driver (ICD) <https://www.khronos.org/news/permalink/opencl-installable-client-driver-icd-loader>`_
installed. There can be multiple of them for the same or different hardware
(GPUs, CPUs, Accelerators) installed at the same time. OpenCL refers to those
as 'platforms'. The GPU library will select the **first** suitable platform,
but this can be overridden using the device option of the :doc:`package <package>`
as 'platforms'. The GPU library will try to auto-select the best suitable platform,
but this can be overridden using the platform option of the :doc:`package <package>`
command. run lammps/lib/gpu/ocl_get_devices to get a list of available
platforms and devices with a suitable ICD available.
To compute and use this package in HIP mode, you have to have the AMD ROCm
To compile and use this package for Intel GPUs, OpenCL or the Intel oneAPI
HPC Toolkit can be installed using linux package managers. The latter also
provides optimized C++, MPI, and many other libraries and tools. See:
* https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit/download.html
If you do not have a discrete GPU card installed, this package can still provide
significant speedups on some CPUs that include integrated GPUs. Additionally, for
many macs, OpenCL is already included with the OS and Makefiles are available
in the lib/gpu directory.
To compile and use this package in HIP mode, you have to have the AMD ROCm
software installed. Versions of ROCm older than 3.5 are currently deprecated
by AMD.
@ -75,10 +90,20 @@ automatically if you create more MPI tasks/node than there are
GPUs/mode. E.g. with 8 MPI tasks/node and 2 GPUs, each GPU will be
shared by 4 MPI tasks.
The GPU package also has limited support for OpenMP for both
multi-threading and vectorization of routines that are run on the CPUs.
This requires that the GPU library and LAMMPS are built with flags to
enable OpenMP support (e.g. -fopenmp). Some styles for time integration
are also available in the GPU package. These run completely on the CPUs
in full double precision, but exploit multi-threading and vectorization
for faster performance.
Use the "-sf gpu" :doc:`command-line switch <Run_options>`, which will
automatically append "gpu" to styles that support it. Use the "-pk
gpu Ng" :doc:`command-line switch <Run_options>` to set Ng = # of
GPUs/node to use.
GPUs/node to use. If Ng is 0, the number is selected automatically as
the number of matching GPUs that have the highest number of compute
cores.
.. code-block:: bash
@ -87,8 +112,8 @@ GPUs/node to use.
mpirun -np 48 -ppn 12 lmp_machine -sf gpu -pk gpu 2 -in in.script # ditto on 4 16-core nodes
Note that if the "-sf gpu" switch is used, it also issues a default
:doc:`package gpu 1 <package>` command, which sets the number of
GPUs/node to 1.
:doc:`package gpu 0 <package>` command, which will result in
automatic selection of the number of GPUs to use.
Using the "-pk" switch explicitly allows for setting of the number of
GPUs/node to use and additional options. Its syntax is the same as
@ -138,6 +163,13 @@ Likewise, you should experiment with the precision setting for the GPU
library to see if single or mixed precision will give accurate
results, since they will typically be faster.
MPI parallelism typically outperforms OpenMP parallelism, but in some
cases using fewer MPI tasks and multiple OpenMP threads with the GPU
package can give better performance. 3-body potentials can often perform
better with multiple OMP threads because the inter-process communication
is higher for these styles with the GPU package in order to allow
deterministic results.
**Guidelines for best performance:**
* Using multiple MPI tasks per GPU will often give the best performance,
@ -161,6 +193,12 @@ results, since they will typically be faster.
:doc:`angle <angle_style>`, :doc:`dihedral <dihedral_style>`,
:doc:`improper <improper_style>`, and :doc:`long-range <kspace_style>`
calculations will not be included in the "Pair" time.
* Since only part of the pppm kspace style is GPU accelerated, it
may be faster to only use GPU acceleration for Pair styles with
long-range electrostatics. See the "pair/only" keyword of the
package command for a shortcut to do that. The work between kspace
on the CPU and non-bonded interactions on the GPU can be balanced
through adjusting the coulomb cutoff without loss of accuracy.
* When the *mode* setting for the package gpu command is force/neigh,
the time for neighbor list calculations on the GPU will be added into
the "Pair" time, not the "Neigh" time. An additional breakdown of the

View File

@ -16,7 +16,7 @@ These are the accelerator packages currently in LAMMPS, either as
standard or user packages:
+-----------------------------------------+-------------------------------------------------------+
| :doc:`GPU Package <Speed_gpu>` | for NVIDIA GPUs as well as OpenCL support |
| :doc:`GPU Package <Speed_gpu>` | for GPUs via CUDA, OpenCL, or ROCm HIP |
+-----------------------------------------+-------------------------------------------------------+
| :doc:`USER-INTEL Package <Speed_intel>` | for Intel CPUs and Intel Xeon Phi |
+-----------------------------------------+-------------------------------------------------------+
@ -43,7 +43,7 @@ three kinds of hardware, via the listed packages:
+-----------------+-----------------------------------------------------------------------------------------------------------------------------+
| Many-core CPUs | :doc:`USER-INTEL <Speed_intel>`, :doc:`KOKKOS <Speed_kokkos>`, :doc:`USER-OMP <Speed_omp>`, :doc:`OPT <Speed_opt>` packages |
+-----------------+-----------------------------------------------------------------------------------------------------------------------------+
| NVIDIA/AMD GPUs | :doc:`GPU <Speed_gpu>`, :doc:`KOKKOS <Speed_kokkos>` packages |
| GPUs | :doc:`GPU <Speed_gpu>`, :doc:`KOKKOS <Speed_kokkos>` packages |
+-----------------+-----------------------------------------------------------------------------------------------------------------------------+
| Intel Phi/AVX | :doc:`USER-INTEL <Speed_intel>`, :doc:`KOKKOS <Speed_kokkos>` packages |
+-----------------+-----------------------------------------------------------------------------------------------------------------------------+
@ -154,8 +154,8 @@ Here is a brief summary of what the various packages provide. Details
are in the individual accelerator sections.
* Styles with a "gpu" suffix are part of the GPU package and can be run
on NVIDIA or AMD GPUs. The speed-up on a GPU depends on a variety of
factors, discussed in the accelerator sections.
on Intel, NVIDIA, or AMD GPUs. The speed-up on a GPU depends on a
variety of factors, discussed in the accelerator sections.
* Styles with an "intel" suffix are part of the USER-INTEL
package. These styles support vectorized single and mixed precision
calculations, in addition to full double precision. In extreme cases,

View File

@ -46,11 +46,12 @@ the compute command was issued. The value of the displacement will be
.. note::
Initial coordinates are stored in "unwrapped" form, by using the
image flags associated with each atom. See the :doc:`dump custom <dump>` command for a discussion of "unwrapped" coordinates.
See the Atoms section of the :doc:`read_data <read_data>` command for a
discussion of image flags and how they are set for each atom. You can
reset the image flags (e.g. to 0) before invoking this compute by
using the :doc:`set image <set>` command.
image flags associated with each atom. See the :doc:`dump custom
<dump>` command for a discussion of "unwrapped" coordinates. See
the Atoms section of the :doc:`read_data <read_data>` command for a
discussion of image flags and how they are set for each atom. You
can reset the image flags (e.g. to 0) before invoking this compute
by using the :doc:`set image <set>` command.
.. note::

View File

@ -122,8 +122,11 @@ Output info
This compute calculates a global scalar (the pressure) and a global
vector of length 6 (pressure tensor), which can be accessed by indices
1-6. These values can be used by any command that uses global scalar
or vector values from a compute as input. See the :doc:`Howto output <Howto_output>` doc page for an overview of LAMMPS output
options.
or vector values from a compute as input. See the :doc:`Howto output
<Howto_output>` doc page for an overview of LAMMPS output options.
The ordering of values in the symmetric pressure tensor is as follows:
pxx, pyy, pzz, pxy, pxz, pyz.
The scalar and vector values calculated by this compute are
"intensive". The scalar and vector values will be in pressure

View File

@ -30,7 +30,7 @@ Examples
.. code-block:: LAMMPS
compute 1 all reduce/chunk/atom mychunk min c_cluster
compute 1 all reduce/chunk mychunk min c_cluster
Description
"""""""""""

View File

@ -216,6 +216,11 @@ an identical manner to compute *stress/atom*. See the :doc:`Howto
output <Howto_output>` doc page for an overview of LAMMPS output
options.
The ordering of the 6 columns for *stress/atom* is as follows: xx, yy,
zz, xy, xz, yz. The ordering of the 9 columns for
*centroid/stress/atom* is as follows: xx, yy, zz, xy, xz, yz, yx, zx,
zy.
The per-atom array values will be in pressure\*volume :doc:`units
<units>` as discussed above.

View File

@ -153,7 +153,7 @@ temp/chunk calculation to a file is to use the :doc:`fix ave/time <fix_ave_time>
compute cc1 all chunk/atom molecule
compute myChunk all temp/chunk cc1 temp
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
fix 1 all ave/time 100 1 100 c_myChunk[1] file tmp.out mode vector
----------

View File

@ -125,6 +125,16 @@ cannot appear in the neighbor list, to avoid creation of duplicate
bonds. The neighbor list for all atom type pairs must also extend to
a distance that encompasses the *rmax* for new bonds to create.
.. note::
If you want to create bonds between pairs of 1-3 or 1-4 atoms in
the current bond topology, then you need to use :doc:`special_bonds
lj 0 1 1 <special_bonds>` to insure those pairs appear in the
neighbor list. They will not appear with the default special_bonds
settings which are zero for 1-2, 1-3, and 1-4 atoms. 1-3 or 1-4
atoms are those which are 2 hops or 3 hops apart in the bond
topology.
An additional requirement for this style is that your system must be
ready to perform a simulation. This means, for example, that all
:doc:`pair_style <pair_style>` coefficients be set via the

View File

@ -118,32 +118,38 @@ converge properly.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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" inferred by the added force to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. This is a fictitious quantity but is
needed so that the :doc:`minimize <minimize>` command can include the
forces added by this fix in a consistent manner. I.e. there is a
decrease in potential energy when atoms move in the direction of the
added force.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy inferred by the added force to
the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`. Note that this
energy is a fictitious quantity but is needed so that the
:doc:`minimize <minimize>` command can include the forces added by
this fix in a consistent manner. I.e. there is a decrease in
potential energy when atoms move in the direction of the added force.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to the added forces on atoms to the
system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial no*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces on atoms to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix is adding its forces. Default is the outermost
level.
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
This fix computes a global scalar and a global 3-vector of forces,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar is the potential energy discussed above. The vector is the
total force on the group of atoms before the forces on individual
atoms are changed by the fix. The scalar and vector values calculated
by this fix are "extensive".
which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar is the potential energy discussed above.
The vector is the total force on the group of atoms before the forces
on individual atoms are changed by the fix. The scalar and vector
values calculated by this fix are "extensive".
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.

View File

@ -55,13 +55,15 @@ 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" inferred by the added forces to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. This is a fictitious quantity but is
needed so that the :doc:`minimize <minimize>` command can include the
forces added by this fix in a consistent manner. I.e. there is a
decrease in potential energy when atoms move in the direction of the
added forces.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential "energy" inferred by the added torques
to the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`. Note that this
is a fictitious quantity but is needed so that the :doc:`minimize
<minimize>` command can include the forces added by this fix in a
consistent manner. I.e. there is a decrease in potential energy when
atoms move in the direction of the added forces.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by
this fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
@ -78,16 +80,28 @@ No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.
The forces due to this fix are imposed during an energy minimization,
invoked by the :doc:`minimize <minimize>` command. You should not
specify force components with a variable that has time-dependence for
use with a minimizer, since the minimizer increments the timestep as
the iteration count during the minimization.
invoked by the :doc:`minimize <minimize>` command.
.. note::
If you want the fictitious potential energy associated with the
added forces to be included in the total potential energy of the
system (the quantity being minimized), you MUST enable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
.. note::
You should not specify force components with a variable that has
time-dependence for use with a minimizer, since the minimizer
increments the timestep as the iteration count during the
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.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
Related commands
""""""""""""""""

View File

@ -122,10 +122,22 @@ 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>` options relevant to this
fix are listed below. No global scalar or vector or per-atom quantities
are stored by this fix for access by various :doc:`output commands
<Howto_output>`. No parameter of this fix can be used with the
<restart>`.
The :doc:`fix_modify <fix_modify>` *energy* option is not supported by
this fix, but this fix does add the kinetic energy imparted to atoms
by the momentum coupling mode of the AtC package to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`.
Additional :doc:`fix_modify <fix_modify>` options relevant to this
fix are listed below.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the energy
discussed in the previous paragraph. The scalar value is "extensive".
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>`.
@ -145,10 +157,10 @@ one, e.g. nve, nvt, etc. In addition, currently:
Related commands
""""""""""""""""
After specifying this fix in your input script, several other
:doc:`fix_modify <fix_modify>` commands are used to setup the problem,
e.g. define the finite element mesh and prescribe initial and boundary
conditions.
After specifying this fix in your input script, several
:doc:`fix_modify AtC <fix_modify>` commands are used to setup the
problem, e.g. define the finite element mesh and prescribe initial and
boundary conditions. Each of these options has its own doc page.
*fix_modify* commands for setup:
@ -240,7 +252,8 @@ miscellaneous *fix_modify* commands:
* :doc:`fix_modify AtC remove_species <atc_remove_species>`
* :doc:`fix_modify AtC remove_molecule <atc_remove_molecule>`
Note: a set of example input files with the attendant material files are included in the ``examples/USER/atc`` folders.
Note: a set of example input files with the attendant material files
are included in the ``examples/USER/atc`` folders.
Default
"""""""
@ -252,30 +265,52 @@ For detailed exposition of the theory and algorithms please see:
.. _Wagner:
**(Wagner)** Wagner, GJ; Jones, RE; Templeton, JA; Parks, MA, "An atomistic-to-continuum coupling method for heat transfer in solids." Special Issue of Computer Methods and Applied Mechanics (2008) 197:3351.
**(Wagner)** Wagner, GJ; Jones, RE; Templeton, JA; Parks, MA, "An
atomistic-to-continuum coupling method for heat transfer in solids."
Special Issue of Computer Methods and Applied Mechanics (2008)
197:3351.
.. _Zimmeman2004:
**(Zimmerman2004)** Zimmerman, JA; Webb, EB; Hoyt, JJ;. Jones, RE; Klein, PA; Bammann, DJ, "Calculation of stress in atomistic simulation." Special Issue of Modelling and Simulation in Materials Science and Engineering (2004), 12:S319.
**(Zimmerman2004)** Zimmerman, JA; Webb, EB; Hoyt, JJ;. Jones, RE;
Klein, PA; Bammann, DJ, "Calculation of stress in atomistic
simulation." Special Issue of Modelling and Simulation in Materials
Science and Engineering (2004), 12:S319.
.. _Zimmerman2010:
**(Zimmerman2010)** Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364.
**(Zimmerman2010)** Zimmerman, JA; Jones, RE; Templeton, JA, "A
material frame approach for evaluating continuum variables in
atomistic simulations." Journal of Computational Physics (2010),
229:2364.
.. _Templeton2010:
**(Templeton2010)** Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007.
**(Templeton2010)** Templeton, JA; Jones, RE; Wagner, GJ, "Application
of a field-based method to spatially varying thermal transport
problems in molecular dynamics." Modelling and Simulation in
Materials Science and Engineering (2010), 18:085007.
.. _Jones:
**(Jones)** Jones, RE; Templeton, JA; Wagner, GJ; Olmsted, D; Modine, JA, "Electron transport enhanced molecular dynamics for metals and semi-metals." International Journal for Numerical Methods in Engineering (2010), 83:940.
**(Jones)** Jones, RE; Templeton, JA; Wagner, GJ; Olmsted, D; Modine,
JA, "Electron transport enhanced molecular dynamics for metals and
semi-metals." International Journal for Numerical Methods in
Engineering (2010), 83:940.
.. _Templeton2011:
**(Templeton2011)** Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736.
**(Templeton2011)** Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA;
Wong, BM, "A long-range electric field solver for molecular dynamics
based on atomistic-to-continuum modeling." Journal of Chemical Theory
and Computation (2011), 7:1736.
.. _Mandadapu:
**(Mandadapu)** Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115.
**(Mandadapu)** Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization
as a field variable from molecular dynamics simulations." Journal of
Chemical Physics (2013), 139:054115.
Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation.
Please refer to the standard finite element (FE) texts, e.g. T.J.R
Hughes " The finite element method ", Dover 2003, for the basics of FE
simulation.

View File

@ -75,6 +75,39 @@ Note that *V_avg* and *Coeff_i* should all be in the proper units, e.g. if you
are using *units real*\ , *V_avg* should be in cubic angstroms, and the
coefficients should all be in atmospheres \* cubic angstroms.
----------
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the cumulative global energy change to :doc:`binary
restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the fix continues in an uninterrupted
fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a temperature :doc:`compute <compute>`
you have defined to this fix which will be used in its thermostatting
procedure, as described above. For consistency, the group used by
this fix and by the compute should be the same.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the
:doc:`run <run>` command for details of how to do this.
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -41,7 +41,7 @@ Syntax
* template-ID(post-reacted) = ID of a molecule template containing post-reaction topology
* map_file = name of file specifying corresponding atom-IDs in the pre- and post-reacted templates
* zero or more individual keyword/value pairs may be appended to each react argument
* individual_keyword = *prob* or *max_rxn* or *stabilize_steps* or *custom_charges*
* individual_keyword = *prob* or *max_rxn* or *stabilize_steps* or *custom_charges* or *molecule* or *modify_create*
.. parsed-literal::
@ -59,6 +59,12 @@ Syntax
off = allow both inter- and intramolecular reactions (default)
inter = search for reactions between molecules with different IDs
intra = search for reactions within the same molecule
*modify_create* keyword values
*fit* value = *all* or *fragmentID*
all = use all eligible atoms for create-atoms fit (default)
fragmentID = ID of molecule fragment used for create-atoms fit
*overlap* value = R
R = only insert atom/molecule if further than R from existing particles (distance units)
Examples
""""""""
@ -89,7 +95,9 @@ documentation. Topology changes are defined in pre- and post-reaction
molecule templates and can include creation and deletion of bonds,
angles, dihedrals, impropers, bond types, angle types, dihedral types,
atom types, or atomic charges. In addition, reaction by-products or
other molecules can be identified and deleted.
other molecules can be identified and deleted. Finally, atoms can be
created and inserted at specific positions relative to the reaction
site.
Fix bond/react does not use quantum mechanical (eg. fix qmmm) or
pairwise bond-order potential (eg. Tersoff or AIREBO) methods to
@ -262,14 +270,14 @@ command page.
The post-reacted molecule template contains a sample of the reaction
site and its surrounding topology after the reaction has occurred. It
must contain the same number of atoms as the pre-reacted template. A
one-to-one correspondence between the atom IDs in the pre- and
post-reacted templates is specified in the map file as described
below. Note that during a reaction, an atom, bond, etc. type may
change to one that was previously not present in the simulation. These
new types must also be defined during the setup of a given simulation.
A discussion of correctly handling this is also provided on the
:doc:`molecule <molecule>` command page.
must contain the same number of atoms as the pre-reacted template
(unless there are created atoms). A one-to-one correspondence between
the atom IDs in the pre- and post-reacted templates is specified in
the map file as described below. Note that during a reaction, an atom,
bond, etc. type may change to one that was previously not present in
the simulation. These new types must also be defined during the setup
of a given simulation. A discussion of correctly handling this is also
provided on the :doc:`molecule <molecule>` command page.
.. note::
@ -283,7 +291,7 @@ A discussion of correctly handling this is also provided on the
The map file is a text document with the following format:
A map file has a header and a body. The header of map file the
contains one mandatory keyword and four optional keywords. The
contains one mandatory keyword and five optional keywords. The
mandatory keyword is 'equivalences':
.. parsed-literal::
@ -296,11 +304,12 @@ The optional keywords are 'edgeIDs', 'deleteIDs', 'chiralIDs' and
.. parsed-literal::
N *edgeIDs* = # of edge atoms N in the pre-reacted molecule template
N *deleteIDs* = # of atoms N that are specified for deletion
N *chiralIDs* = # of specified chiral centers N
N *constraints* = # of specified reaction constraints N
N *deleteIDs* = # of atoms N that are deleted
N *createIDs* = # of atoms N that are created
N *chiralIDs* = # of chiral centers N
N *constraints* = # of reaction constraints N
The body of the map file contains two mandatory sections and four
The body of the map file contains two mandatory sections and five
optional sections. The first mandatory section begins with the keyword
'InitiatorIDs' and lists the two atom IDs of the initiator atom pair
in the pre-reacted molecule template. The second mandatory section
@ -313,8 +322,10 @@ the keyword 'EdgeIDs' and lists the atom IDs of edge atoms in the
pre-reacted molecule template. The second optional section begins with
the keyword 'DeleteIDs' and lists the atom IDs of pre-reaction
template atoms to delete. The third optional section begins with the
keyword 'CreateIDs' and lists the atom IDs of the post-reaction
template atoms to create. The fourth optional section begins with the
keyword 'ChiralIDs' lists the atom IDs of chiral atoms whose
handedness should be enforced. The fourth optional section begins with
handedness should be enforced. The fifth optional section begins with
the keyword 'Constraints' and lists additional criteria that must be
satisfied in order for the reaction to occur. Currently, there are
five types of constraints available, as discussed below: 'distance',
@ -353,6 +364,38 @@ A sample map file is given below:
----------
A user-specified set of atoms can be deleted by listing their
pre-reaction template IDs in the DeleteIDs section. A deleted atom
must still be included in the post-reaction molecule template, in
which it cannot be bonded to an atom that is not deleted. In addition
to deleting unwanted reaction by-products, this feature can be used to
remove specific topologies, such as small rings, that may be otherwise
indistinguishable.
Atoms can be created by listing their post-reaction template IDs in
the CreateIDs section. A created atom should not be included in the
pre-reaction template. The inserted positions of created atoms are
determined by the coordinates of the post-reaction template, after
optimal translation and rotation of the post-reaction template to the
reaction site (using a fit with atoms that are neither created nor
deleted). The *modify_create* keyword can be used to modify the
default behavior when creating atoms. The *modify_create* keyword has
two sub-keywords, *fit* and *overlap*. One or more of the sub-keywords
may be used after the *modify_create* keyword. The *fit* sub-keyword
can be used to specify which post-reaction atoms are used for the
optimal translation and rotation of the post-reaction template. The
*fragmentID* value of the *fit* sub-keyword must be the name of a
molecule fragment defined in the post-reaction :doc:`molecule
<molecule>` template, and only atoms in this fragment are used for the
fit. Atoms are created only if no current atom in the simulation is
within a distance R of any created atom, including the effect of
periodic boundary conditions if applicable. R is defined by the
*overlap* sub-keyword. Note that the default value for R is 0.0, which
will allow atoms to strongly overlap if you are inserting where other
atoms are present. The velocity of each created atom is initialized in
a random direction with a magnitude calculated from the instantaneous
temperature of the reaction site.
The handedness of atoms that are chiral centers can be enforced by
listing their IDs in the ChiralIDs section. A chiral atom must be
bonded to four atoms with mutually different atom types. This feature
@ -528,15 +571,6 @@ the same molecule ID are considered for the reaction.
A few other considerations:
Many reactions result in one or more atoms that are considered
unwanted by-products. Therefore, bond/react provides the option to
delete a user-specified set of atoms. These pre-reaction atoms are
identified in the map file. A deleted atom must still be included in
the post-reaction molecule template, in which it cannot be bonded to
an atom that is not deleted. In addition to deleting unwanted reaction
by-products, this feature can be used to remove specific topologies,
such as small rings, that may be otherwise indistinguishable.
Optionally, you can enforce additional behaviors on reacting atoms.
For example, it may be beneficial to force reacting atoms to remain at
a certain temperature. For this, you can use the internally-created
@ -610,14 +644,14 @@ Default
"""""""
The option defaults are stabilization = no, prob = 1.0, stabilize_steps = 60,
reset_mol_ids = yes, custom_charges = no, molecule = off
reset_mol_ids = yes, custom_charges = no, molecule = off, modify_create = no
----------
.. _Gissinger:
**(Gissinger)** Gissinger, Jensen and Wise, Polymer, 128, 211-217 (2017).
**(Gissinger2017)** Gissinger, Jensen and Wise, Polymer, 128, 211-217 (2017).
.. _Gissinger2020:
**(Gissinger)** Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).
**(Gissinger2020)** Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).

View File

@ -47,14 +47,15 @@ for running *ab initio* MD with quantum forces.
The group associated with this fix is ignored.
The protocol and :doc:`units <units>` for message format and content
that LAMMPS exchanges with the server code is defined on the :doc:`server md <server_md>` doc page.
that LAMMPS exchanges with the server code is defined on the
:doc:`server md <server_md>` doc page.
Note that when using LAMMPS as an MD client, your LAMMPS input script
should not normally contain force field commands, like a
:doc:`pair_style <pair_style>`, :doc:`bond_style <bond_style>`, or
:doc:`kspace_style <kspace_style>` command. However it is possible for
a server code to only compute a portion of the full force-field, while
LAMMPS computes the remaining part. Your LAMMPS script can also
:doc:`kspace_style <kspace_style>` command. However it is possible
for a server code to only compute a portion of the full force-field,
while LAMMPS computes the remaining part. Your LAMMPS script can also
specify boundary conditions or force constraints in the usual way,
which will be added to the per-atom forces returned by the server
code.
@ -69,16 +70,21 @@ LAMMPS and another code in tandem to perform a coupled simulation.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 computed by the server application to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy set by the server application to
the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy yes <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the server application's contribution to the system's
virial as part of :doc:`thermodynamic output <thermo_style>`. The
default is *virial yes*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution computed by the server application to
the global pressure of the system via the :doc:`compute pressure
<compute_pressure>` command. This can be accessed by
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
@ -86,13 +92,16 @@ energy discussed above. The scalar value calculated by this fix is
"extensive".
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>`.
the :doc:`run <run>` command.
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the MESSAGE package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
A script that uses this command must also use the
:doc:`message <message>` command to setup and shut down the messaging

View File

@ -29,11 +29,12 @@ Description
This command enables CMAP cross-terms to be added to simulations which
use the CHARMM force field. These are relevant for any CHARMM model
of a peptide or protein sequences that is 3 or more amino-acid
residues long; see :ref:`(Buck) <Buck>` and :ref:`(Brooks) <Brooks2>` for details,
including the analytic energy expressions for CMAP interactions. The
CMAP cross-terms add additional potential energy contributions to pairs
of overlapping phi-psi dihedrals of amino-acids, which are important
to properly represent their conformational behavior.
residues long; see :ref:`(Buck) <Buck>` and :ref:`(Brooks) <Brooks2>`
for details, including the analytic energy expressions for CMAP
interactions. The CMAP cross-terms add additional potential energy
contributions to pairs of overlapping phi-psi dihedrals of
amino-acids, which are important to properly represent their
conformational behavior.
The examples/cmap directory has a sample input script and data file
for a small peptide, that illustrates use of the fix cmap command.
@ -93,19 +94,27 @@ the note below about how to include the CMAP energy when performing an
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the list of CMAP cross-terms to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>` command
This fix writes the list of CMAP cross-terms to :doc:`binary restart
files <restart>`. See the :doc:`read_restart <read_restart>` command
for info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the potential "energy" of the CMAP interactions system's
potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy of the CMAP interactions to both
the global potential energy and peratom potential energies of the
system as part of :doc:`thermodynamic output <thermo_style>` or
output by the :doc:`compute pe/atom <compute_pe_atom>` command. The
default setting for this fix is :doc:`fix_modify energy yes
<fix_modify>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to the interaction between atoms to
the system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial yes*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the CMAP interactions to both
the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
@ -121,8 +130,8 @@ invoked by the :doc:`minimize <minimize>` command.
.. note::
If you want the potential energy associated with the CMAP terms
forces to be included in the total potential energy of the system (the
quantity being minimized), you MUST enable the
forces to be included in the total potential energy of the system
(the quantity being minimized), you MUST not disable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
Restrictions

View File

@ -35,12 +35,12 @@ Examples
Description
"""""""""""
This fix interfaces LAMMPS to the collective variables "Colvars"
library, which allows to calculate potentials of mean force
(PMFs) for any set of colvars, using different sampling methods:
currently implemented are the Adaptive Biasing Force (ABF) method,
metadynamics, Steered Molecular Dynamics (SMD) and Umbrella Sampling
(US) via a flexible harmonic restraint bias.
This fix interfaces LAMMPS to the collective variables (Colvars)
library, which allows to calculate potentials of mean force (PMFs) for
any set of colvars, using different sampling methods: currently
implemented are the Adaptive Biasing Force (ABF) method, metadynamics,
Steered Molecular Dynamics (SMD) and Umbrella Sampling (US) via a
flexible harmonic restraint bias.
This documentation describes only the fix colvars command itself and
LAMMPS specific parts of the code. The full documentation of the
@ -98,9 +98,11 @@ This fix writes the current status of the colvars module into
mode status file that is written by the colvars module itself and the
kind of information in both files is identical.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change from the biasing force added by the fix
to the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy change from the biasing force added by
Colvars to the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`.
The *fix_modify configfile <config file>* option allows to add settings
from an additional config file to the colvars module. This option can
@ -113,15 +115,16 @@ in a pair of double quotes ("), or can span multiple lines when bracketed
by a pair of triple double quotes (""", like python embedded documentation).
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive".
:doc:`output commands <Howto_output>`. The scalar is the Colvars
energy mentioned above. The scalar value calculated by this fix is
"extensive".
Restrictions
""""""""""""
This fix is part of the USER-COLVARS 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.
There can only be one colvars fix active at a time. Since the interface
communicates only the minimum amount of information and colvars module

View File

@ -100,9 +100,9 @@ minimize the orientation of dipoles in an applied electric field.
The *energy* keyword specifies the name of an atom-style
:doc:`variable <variable>` which is used to compute the energy of each
atom as function of its position. Like variables used for *ex*\ , *ey*\ ,
*ez*\ , the energy variable is specified as v_name, where name is the
variable name.
atom as function of its position. Like variables used for *ex*\ ,
*ey*\ , *ez*\ , the energy variable is specified as v_name, where name
is the variable name.
Note that when the *energy* keyword is used during an energy
minimization, you must insure that the formula defined for the
@ -117,31 +117,38 @@ minimization will not converge properly.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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" inferred by the added force due to
the electric field to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`. This is a fictitious
quantity but is needed so that the :doc:`minimize <minimize>` command
can include the forces added by this fix in a consistent manner.
I.e. there is a decrease in potential energy when atoms move in the
direction of the added force due to the electric field.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy inferred by the added force due
to the electric field to the global potential energy of the system as
part of :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify energy no <fix_modify>`.
Note that this energy is a fictitious quantity but is needed so that
the :doc:`minimize <minimize>` command can include the forces added by
this fix in a consistent manner. I.e. there is a decrease in
potential energy when atoms move in the direction of the added force
due to the electric field.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to the added forces on atoms to the
system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial no*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces on atoms to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix adding its forces. Default is the outermost level.
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix adding its forces. Default is the
outermost level.
This fix computes a global scalar and a global 3-vector of forces,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar is the potential energy discussed above. The vector is the
total force added to the group of atoms. The scalar and vector values
calculated by this fix are "extensive".
which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar is the potential energy discussed above.
The vector is the total force added to the group of atoms. The scalar
and vector values calculated by this fix are "extensive".
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.

View File

@ -84,7 +84,8 @@ code `Quest <quest_>`_.
If mode is *pf/array* then the fix simply stores force values in an
array. The fix adds these forces to each atom in the group, once
every *Napply* steps, similar to the way the :doc:`fix addforce <fix_addforce>` command works.
every *Napply* steps, similar to the way the :doc:`fix addforce
<fix_addforce>` command works.
The name of the public force array provided by the FixExternal
class is
@ -150,19 +151,27 @@ of properties that the caller code may want to communicate to LAMMPS
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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" set by the external driver to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. This is a fictitious quantity but is
needed so that the :doc:`minimize <minimize>` command can include the
forces added by this fix in a consistent manner. I.e. there is a
decrease in potential energy when atoms move in the direction of the
added force.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy set by the external driver to
both the global potential energy and peratom potential energies of the
system as part of :doc:`thermodynamic output <thermo_style>` or output
by the :doc:`compute pe/atom <compute_pe_atom>` command. The default
setting for this fix is :doc:`fix_modify energy yes <fix_modify>`.
Note that this energy may be a fictitious quantity but it is needed so
that the :doc:`minimize <minimize>` command can include the forces
added by this fix in a consistent manner. I.e. there is a decrease in
potential energy when atoms move in the direction of the added force.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to the interactions computed by the
external program to the system's virial as part of :doc:`thermodynamic output <thermo_style>`. The default is *virial yes*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution computed by the external program to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
@ -178,7 +187,7 @@ invoked by the :doc:`minimize <minimize>` command.
If you want the fictitious potential energy associated with the
added forces to be included in the total potential energy of the
system (the quantity being minimized), you MUST enable the
system (the quantity being minimized), you MUST not disable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
Restrictions

View File

@ -76,28 +76,31 @@ Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The instantaneous values of the extended variables are written to
:doc:`binary restart files <restart>`. Because the state of the random
number generator is not saved in restart files, this means you cannot
do "exact" restarts with this fix, where the simulation continues on
the same as if no restart had taken place. However, in a statistical
sense, a restarted simulation should produce the same behavior.
Note however that you should use a different seed each time you
restart, otherwise the same sequence of random numbers will be used
each time, which might lead to stochastic synchronization and
:doc:`binary restart files <restart>`. Because the state of the
random number generator is not saved in restart files, this means you
cannot do "exact" restarts with this fix, where the simulation
continues on the same as if no restart had taken place. However, in a
statistical sense, a restarted simulation should produce the same
behavior. Note however that you should use a different seed each time
you restart, otherwise the same sequence of random numbers will be
used each time, which might lead to stochastic synchronization and
subtle artifacts in the sampling.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the
:doc:`run <run>` command for details of how to do this.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Langevin thermostatting to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive".
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -55,17 +55,22 @@ momentum.
GD applies an external fluctuating gravitational field that acts as a
driving force to keep the system away from equilibrium. To maintain
steady state, a profile-unbiased thermostat must be implemented to
dissipate the heat that is added by the driving force. :doc:`Compute temp/profile <compute_temp_profile>` can be used to implement a
dissipate the heat that is added by the driving force. :doc:`Compute
temp/profile <compute_temp_profile>` can be used to implement a
profile-unbiased thermostat.
A common use of this fix is to compute a pressure drop across a pipe,
pore, or membrane. The pressure profile can be computed in LAMMPS with
:doc:`compute stress/atom <compute_stress_atom>` and :doc:`fix ave/chunk <fix_ave_chunk>`, or with the hardy method in :doc:`fix atc <fix_atc>`. Note that the simple :doc:`compute stress/atom <compute_stress_atom>` method is only accurate away
from inhomogeneities in the fluid, such as fixed wall atoms. Further,
the computed pressure profile must be corrected for the acceleration
:doc:`compute stress/atom <compute_stress_atom>` and :doc:`fix
ave/chunk <fix_ave_chunk>`, or with the hardy method in :doc:`fix atc
<fix_atc>`. Note that the simple :doc:`compute stress/atom
<compute_stress_atom>` method is only accurate away from
inhomogeneities in the fluid, such as fixed wall atoms. Further, the
computed pressure profile must be corrected for the acceleration
applied by GD before computing a pressure drop or comparing it to
other methods, such as the pump method :ref:`(Zhu) <Zhu>`. The pressure
correction is discussed and described in :ref:`(Strong) <Strong>`.
other methods, such as the pump method :ref:`(Zhu) <Zhu>`. The
pressure correction is discussed and described in :ref:`(Strong)
<Strong>`.
For a complete example including the considerations discussed
above, see the examples/USER/flow_gauss directory.
@ -102,14 +107,15 @@ computed by the fix will return zero.
of wall atoms fixed, such as :doc:`fix spring/self <fix_spring_self>`.
If this fix is used in a simulation with the :doc:`rRESPA <run_style>`
integrator, the applied acceleration must be computed and applied at the same
rRESPA level as the interactions between the flowing fluid and the obstacle.
The rRESPA level at which the acceleration is applied can be changed using
the :doc:`fix_modify <fix_modify>` *respa* option discussed below. If the
flowing fluid and the obstacle interact through multiple interactions that are
computed at different rRESPA levels, then there must be a separate flow/gauss
fix for each level. For example, if the flowing fluid and obstacle interact
through pairwise and long-range Coulomb interactions, which are computed at
integrator, the applied acceleration must be computed and applied at
the same rRESPA level as the interactions between the flowing fluid
and the obstacle. The rRESPA level at which the acceleration is
applied can be changed using the :doc:`fix_modify <fix_modify>`
*respa* option discussed below. If the flowing fluid and the obstacle
interact through multiple interactions that are computed at different
rRESPA levels, then there must be a separate flow/gauss fix for each
level. For example, if the flowing fluid and obstacle interact through
pairwise and long-range Coulomb interactions, which are computed at
rRESPA levels 3 and 4, respectively, then there must be two separate
flow/gauss fixes, one that specifies *fix_modify respa 3* and one with
*fix_modify respa 4*.
@ -119,38 +125,49 @@ flow/gauss fixes, one that specifies *fix_modify respa 3* and one with
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
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.
No information about this fix is written to :doc:`binary restart files
<restart>`.
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 subtract the work done from the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy added by the fix to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows the user to set at which level of the :doc:`rRESPA <run_style>`
integrator the fix computes and adds the external acceleration. Default is the
outermost level.
fix. This allows the user to set at which level of the :doc:`rRESPA
<run_style>` integrator the fix computes and adds the external
acceleration. Default is the outermost level.
This fix computes a global scalar and a global 3-vector of forces,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar is the negative of the work done on the system, see above
discussion. The vector is the total force that this fix applied to
the group of atoms on the current timestep. The scalar and vector
values calculated by this fix are "extensive".
which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar is the negative of the work done on the
system, see the discussion above. It is only calculated if the
*energy* keyword is enabled or :doc:`fix_modify energy yes
<fix_modify>` is set.
The vector is the total force that this fix applied to the group of
atoms on the current timestep. The scalar and vector values
calculated by this fix are "extensive".
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
""""""""""""
none
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 addforce <fix_addforce>`, :doc:`compute temp/profile <compute_temp_profile>`, :doc:`velocity <velocity>`
:doc:`fix addforce <fix_addforce>`,
:doc:`compute temp/profile <compute_temp_profile>`,
:doc:`velocity <velocity>`
Default
"""""""

View File

@ -398,12 +398,13 @@ adds all inserted atoms of the specified type to the
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the fix to :doc:`binary restart files <restart>`. This includes information about the random
number generator seed, the next timestep for MC exchanges, the number
of MC step attempts and successes etc. See
the :doc:`read_restart <read_restart>` command for info on how to
re-specify a fix in an input script that reads a restart file, so that
the operation of the fix continues in an uninterrupted fashion.
This fix writes the state of the fix to :doc:`binary restart files
<restart>`. This includes information about the random number
generator seed, the next timestep for MC exchanges, the number of MC
step attempts and successes etc. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
.. note::
@ -411,8 +412,8 @@ the operation of the fix continues in an uninterrupted fashion.
after reading the restart with :doc:`reset_timestep <reset_timestep>`.
The fix will try to detect it and stop with an error.
None of the :doc:`fix_modify <fix_modify>` options are relevant to this
fix.
None of the :doc:`fix_modify <fix_modify>` options are relevant to
this fix.
This fix computes a global vector of length 8, which can be accessed
by various :doc:`output commands <Howto_output>`. The vector values are
@ -430,7 +431,8 @@ the following global cumulative quantities:
The vector values calculated by this fix are "extensive".
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>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -103,28 +103,31 @@ Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The instantaneous values of the extended variables are written to
:doc:`binary restart files <restart>`. Because the state of the random
number generator is not saved in restart files, this means you cannot
do "exact" restarts with this fix, where the simulation continues on
the same as if no restart had taken place. However, in a statistical
sense, a restarted simulation should produce the same behavior.
Note however that you should use a different seed each time you
restart, otherwise the same sequence of random numbers will be used
each time, which might lead to stochastic synchronization and
:doc:`binary restart files <restart>`. Because the state of the
random number generator is not saved in restart files, this means you
cannot do "exact" restarts with this fix, where the simulation
continues on the same as if no restart had taken place. However, in a
statistical sense, a restarted simulation should produce the same
behavior. Note however that you should use a different seed each time
you restart, otherwise the same sequence of random numbers will be
used each time, which might lead to stochastic synchronization and
subtle artifacts in the sampling.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the
:doc:`run <run>` command for details of how to do this.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Langevin thermostatting to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive".
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -103,23 +103,27 @@ 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 gravitational potential energy of the system to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the gravitational potential energy of the system to
the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix is adding its forces. Default is the outermost level.
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. This scalar is the gravitational
potential energy of the particles in the defined field, namely mass \*
(g dot x) for each particles, where x and mass are the particles
position and mass, and g is the gravitational field. The scalar value
calculated by this fix is "extensive".
:doc:`output commands <Howto_output>`. This scalar is the
gravitational potential energy of the particles in the defined field,
namely mass \* (g dot x) for each particles, where x and mass are the
particles position and mass, and g is the gravitational field. The
scalar value calculated by this fix is "extensive".
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>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -200,16 +200,20 @@ algorithm.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 energy of the bias potential to the system's
potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy of the bias potential to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy no <fix_modify>`.
This fix computes a global scalar and global vector of length 12, which
can be accessed by various :doc:`output commands <Howto_output>`. The
scalar is the magnitude of the bias potential (energy units) applied on
the current timestep. The vector stores the following quantities:
This fix computes a global scalar and global vector of length 12,
which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar is the magnitude of the bias potential
(energy units) applied on the current timestep. The vector stores the
following quantities:
* 1 = boost factor on this step (unitless)
* 2 = max strain :math:`E_{ij}` of any bond on this step (absolute value, unitless)
@ -253,7 +257,8 @@ The scalar and vector values calculated by this fix are all
"intensive".
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>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -370,15 +370,17 @@ 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 energy of the bias potential to the system's potential
energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy of the bias potential to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy no <fix_modify>`.
This fix computes a global scalar and global vector of length 28,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar is the magnitude of the bias potential (energy units)
applied on the current timestep, summed over all biased bonds. The
vector stores the following quantities:
which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar is the magnitude of the bias potential
(energy units) applied on the current timestep, summed over all biased
bonds. The vector stores the following quantities:
* 1 = average boost for all bonds on this step (unitless)
* 2 = # of biased bonds on this step
@ -510,8 +512,8 @@ Value 27 computes the average boost for biased bonds only on this step.
Value 28 is the count of bonds with an absolute value of strain >= q
on this step.
The scalar and vector values calculated by this fix are all
"intensive".
The scalar value is an "extensive" quantity since it grows with the
system size; the vector values are all "intensive".
This fix also computes a local vector of length the number of bonds
currently in the system. The value for each bond is its :math:`C_{ij}`
@ -524,7 +526,8 @@ close to 1.0, which indicates a good choice of :math:`V^{max}`.
The local values calculated by this fix are unitless.
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>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -179,20 +179,25 @@ contains *xlat*\ , *ylat*\ , *zlat* keywords of the
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 energy of interaction between atoms and the indenter to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. The energy of each particle interacting
with the indenter is K/3 (r - R)\^3.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy of interaction between atoms and the
indenter to the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`. The energy of
each particle interacting with the indenter is K/3 (r - R)\^3.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix is adding its forces. Default is the outermost level.
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
This fix computes a global scalar energy and a global 3-vector of
forces (on the indenter), which can be accessed by various :doc:`output commands <Howto_output>`. The scalar and vector values calculated
by this fix are "extensive".
forces (on the indenter), which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar and vector values
calculated by this fix are "extensive".
The forces due to this fix are imposed during an energy minimization,
invoked by the :doc:`minimize <minimize>` command. Note that if you
@ -204,10 +209,10 @@ check if you have done this.
.. note::
If you want the atom/indenter interaction energy to be included
in the total potential energy of the system (the quantity being
minimized), you must enable the :doc:`fix_modify <fix_modify>` *energy*
option for this fix.
If you want the atom/indenter interaction energy to be included in
the total potential energy of the system (the quantity being
minimized), you must enable the :doc:`fix_modify <fix_modify>`
*energy* option for this fix.
Restrictions
""""""""""""

View File

@ -230,7 +230,7 @@ conservation.
.. note::
this accumulated energy does NOT include kinetic energy removed
This accumulated energy does NOT include kinetic energy removed
by the *zero* flag. LAMMPS will print a warning when both options are
active.
@ -244,7 +244,8 @@ to zero by subtracting off an equal part of it from each atom in the
group. As a result, the center-of-mass of a system with zero initial
momentum will not drift over time.
The keyword *gjf* can be used to run the :ref:`Gronbech-Jensen/Farago <Gronbech-Jensen>` time-discretization of the Langevin model. As
The keyword *gjf* can be used to run the :ref:`Gronbech-Jensen/Farago
<Gronbech-Jensen>` time-discretization of the Langevin model. As
described in the papers cited below, the purpose of this method is to
enable longer timesteps to be used (up to the numerical stability
limit of the integrator), while still producing the correct Boltzmann
@ -252,19 +253,20 @@ distribution of atom positions.
The current implementation provides the user with the option to output
the velocity in one of two forms: *vfull* or *vhalf*\ , which replaces
the outdated option *yes*\ . The *gjf* option *vfull* outputs the on-site
velocity given in :ref:`Gronbech-Jensen/Farago <Gronbech-Jensen>`; this velocity
is shown to be systematically lower than the target temperature by a small
amount, which grows quadratically with the timestep.
The *gjf* option *vhalf* outputs the 2GJ half-step velocity given in
:ref:`Gronbech Jensen/Gronbech-Jensen <2Gronbech-Jensen>`; for linear systems,
this velocity is shown to not have any statistical errors for any stable time step.
An overview of statistically correct Boltzmann and Maxwell-Boltzmann
sampling of true on-site and true half-step velocities is given in
:ref:`Gronbech-Jensen <1Gronbech-Jensen>`.
Regardless of the choice of output velocity, the sampling of the configurational
distribution of atom positions is the same, and linearly consistent with the
target temperature.
the outdated option *yes*\ . The *gjf* option *vfull* outputs the
on-site velocity given in :ref:`Gronbech-Jensen/Farago
<Gronbech-Jensen>`; this velocity is shown to be systematically lower
than the target temperature by a small amount, which grows
quadratically with the timestep. The *gjf* option *vhalf* outputs the
2GJ half-step velocity given in :ref:`Gronbech Jensen/Gronbech-Jensen
<2Gronbech-Jensen>`; for linear systems, this velocity is shown to not
have any statistical errors for any stable time step. An overview of
statistically correct Boltzmann and Maxwell-Boltzmann sampling of true
on-site and true half-step velocities is given in
:ref:`Gronbech-Jensen <1Gronbech-Jensen>`. Regardless of the choice
of output velocity, the sampling of the configurational distribution
of atom positions is the same, and linearly consistent with the target
temperature.
----------
@ -287,16 +289,18 @@ you have defined to this fix which will be used in its thermostatting
procedure, as described above. For consistency, the group used by
this fix and by the compute should be the same.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Langevin thermostatting to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. Note that use of this option requires
setting the *tally* keyword to *yes*\ .
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*\ , but only if the *tally* keyword to set to
*yes*\ . See the :doc:`thermo_style <thermo_style>` doc page for
details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive". Note that calculation of this quantity requires
setting the *tally* keyword to *yes*\ .
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
Note that calculation of this quantity also requires setting the
*tally* keyword to *yes*\ .
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the

View File

@ -81,16 +81,18 @@ you have defined to this fix which will be used in its thermostatting
procedure, as described above. For consistency, the group used by
this fix and by the compute should be the same.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Langevin thermostatting to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`. Note that use of this option requires
setting the *tally* keyword to *yes*\ .
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*\ , but only if the *tally* keyword to set to
*yes*\ . See the :doc:`thermo_style <thermo_style>` doc page for
details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive". Note that calculation of this quantity requires
setting the *tally* keyword to *yes*\ .
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
Note that calculation of this quantity also requires setting the
*tally* keyword to *yes*\ .
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the

View File

@ -107,16 +107,27 @@ larger system sizes and longer time scales
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 computed by LATTE to the system's
potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy computed by LATTE to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy yes <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the LATTE DFTB contribution to the system's virial as part
of :doc:`thermodynamic output <thermo_style>`. The default is *virial
yes*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution compute by LATTE to the global
pressure of the system via the :doc:`compute pressure
<compute_pressure>` command. This can be accessed by
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify virial yes <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution computed by LATTE to the global
pressure of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
@ -127,20 +138,22 @@ No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.
The DFTB forces computed by LATTE via this fix are imposed during an
energy minimization, invoked by the :doc:`minimize <minimize>` command.
energy minimization, invoked by the :doc:`minimize <minimize>`
command.
.. note::
If you want the potential energy associated with the DFTB
forces to be included in the total potential energy of the system (the
quantity being minimized), you MUST enable the
quantity being minimized), you MUST not disable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
Restrictions
""""""""""""
This fix is part of the LATTE package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
You must use metal units, as set by the :doc:`units <units>` command to
use this fix.

View File

@ -50,7 +50,8 @@ This fix is based on the :doc:`fix rigid <fix_rigid>` command, and was
created to be used in place of that fix, to integrate the equations of
motion of spherical rigid bodies when a lattice-Boltzmann fluid is
present with a user-specified value of the force-coupling constant.
The fix uses the integration algorithm described in :ref:`Mackay et al. <Mackay>` to update the positions, velocities, and orientations of
The fix uses the integration algorithm described in :ref:`Mackay et
al. <Mackay>` to update the positions, velocities, and orientations of
a set of spherical rigid bodies experiencing velocity dependent
hydrodynamic forces. The spherical bodies are assumed to rotate as
solid, uniform density spheres, with moments of inertia calculated
@ -88,9 +89,18 @@ Restart, fix_modify, output, run start/stop, minimize info
No information about the *rigid* and *rigid/nve* fixes are written to
:doc:`binary restart files <restart>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces on atoms to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
Similar to the :doc:`fix rigid <fix_rigid>` command: The rigid fix
computes a global scalar which can be accessed by various :doc:`output commands <Howto_output>`. The scalar value calculated by these
fixes is "intensive". The scalar is the current temperature of the
computes a global scalar which can be accessed by various :doc:`output
commands <Howto_output>`. The scalar value calculated by these fixes
is "intensive". The scalar is the current temperature of the
collection of rigid bodies. This is averaged over all rigid bodies
and their translational and rotational degrees of freedom. The
translational energy of a rigid body is 1/2 m v\^2, where m = total
@ -130,7 +140,8 @@ Restrictions
""""""""""""
This fix is part of the USER-LB package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
Can only be used if a lattice-Boltzmann fluid has been created via the
:doc:`fix lb/fluid <fix_lb_fluid>` command, and must come after this

View File

@ -59,43 +59,58 @@ define their own compute by default, as described in their
documentation. Thus this option allows the user to override the
default method for computing P.
The *energy* keyword can be used with fixes that support it.
*energy yes* adds a contribution to the potential energy of the
system. The fix's global and per-atom
energy is included in the calculation performed by the :doc:`compute pe <compute_pe>` or :doc:`compute pe/atom <compute_pe_atom>`
commands. See the :doc:`thermo_style <thermo_style>` command for info
on how potential energy is output. For fixes that tally a global
energy, it can be printed by using the keyword f_ID in the
thermo_style custom command, where ID is the fix-ID of the appropriate
fix.
The *energy* keyword can be used with fixes that support it, which is
explained at the bottom of their doc page. *Energy yes* will add a
contribution to the potential energy of the system. More
specifically, the fix's global or per-atom energy is included in the
calculation performed by the :doc:`compute pe <compute_pe>` or
:doc:`compute pe/atom <compute_pe_atom>` commands. The former is what
is used the :doc:`thermo_style <thermo_style>` command for output of
any quantity that includes the global potential energy of the system.
Note that the :doc:`compute pe <compute_pe>` and :doc:`compute pe/atom
<compute_pe_atom>` commands also have an option to include or exclude
the contribution from fixes. For fixes that tally a global energy, it
can also be printed with thermodynamic output by using the keyword
f_ID in the thermo_style custom command, where ID is the fix-ID of the
appropriate fix.
.. note::
You must also specify the *energy yes* setting for a fix if you
are using it when performing an :doc:`energy minimization <minimize>`
and if you want the energy and forces it produces to be part of the
optimization criteria.
The *virial* keyword can be used with fixes that support it.
*virial yes* adds a contribution to the virial of the
system. The fix's global and per-atom
virial is included in the calculation performed by the :doc:`compute pressure <compute_pressure>` or
:doc:`compute stress/atom <compute_stress_atom>`
commands. See the :doc:`thermo_style <thermo_style>` command for info
on how pressure is output.
If you are performing an :doc:`energy minimization <minimize>` with
one of these fixes and want the energy and forces it produces to be
part of the optimization criteria, you must specify the *energy
yes* setting.
.. note::
You must specify the *virial yes* setting for a fix if you
are doing :doc:`box relaxation <fix_box_relax>` and
if you want virial contribution of the fix to be part of the
relaxation criteria, although this seems unlikely.
For most fixes that support the *energy* keyword, the default
setting is *no*. For a few it is *yes*, when a user would expect
that to be the case. The doc page of each fix gives the default.
The *virial* keyword can be used with fixes that support it, which is
explained at the bottom of their doc page. *Virial yes* will add a
contribution to the virial of the system. More specifically, the
fix's global or per-atom virial is included in the calculation
performed by the :doc:`compute pressure <compute_pressure>` or
:doc:`compute stress/atom <compute_stress_atom>` commands. The former
is what is used the :doc:`thermo_style <thermo_style>` command for
output of any quantity that includes the global pressure of the
system. Note that the :doc:`compute pressure <compute_pressure>` and
:doc:`compute stress/atom <compute_stress_atom>` commands also have an
option to include or exclude the contribution from fixes.
.. note::
This option is only supported by fixes that explicitly say
so. For some of these (e.g. the :doc:`fix shake <fix_shake>` command)
the default setting is *virial yes*\ , for others it is *virial no*\ .
If you are performing an :doc:`energy minimization <minimize>` with
:doc:`box relaxation <fix_box_relax>` and one of these fixes and
want the virial contribution of the fix to be part of the
optimization criteria, you must specify the *virial yes* setting.
.. note::
For most fixes that support the *virial* keyword, the default
setting is *no*. For a few it is *yes*, when a user would expect
that to be the case. The doc page of each fix gives the default.
For fixes that set or modify forces, it may be possible to select at
which :doc:`r-RESPA <run_style>` level the fix operates via the *respa*
@ -112,13 +127,15 @@ The *dynamic/dof* keyword determines whether the number of atoms N in
the fix group and their associated degrees of freedom are re-computed
each time a temperature is computed. Only fix styles that calculate
their own internal temperature use this option. Currently this is
only the :doc:`fix rigid/nvt/small <fix_rigid>` and :doc:`fix rigid/npt/small <fix_rigid>` commands for the purpose of
only the :doc:`fix rigid/nvt/small <fix_rigid>` and :doc:`fix
rigid/npt/small <fix_rigid>` commands for the purpose of
thermostatting rigid body translation and rotation. By default, N and
their DOF are assumed to be constant. If you are adding atoms or
molecules to the system (see the :doc:`fix pour <fix_pour>`, :doc:`fix deposit <fix_deposit>`, and :doc:`fix gcmc <fix_gcmc>` commands) or
molecules to the system (see the :doc:`fix pour <fix_pour>`, :doc:`fix
deposit <fix_deposit>`, and :doc:`fix gcmc <fix_gcmc>` commands) or
expect atoms or molecules to be lost (e.g. due to exiting the
simulation box or via :doc:`fix evaporate <fix_evaporate>`), then
this option should be used to insure the temperature is correctly
simulation box or via :doc:`fix evaporate <fix_evaporate>`), then this
option should be used to insure the temperature is correctly
normalized.
.. note::

View File

@ -131,20 +131,29 @@ command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
The progress of the MSST can be monitored by printing the global
scalar and global vector quantities computed by the fix.
The scalar is the cumulative energy change due to the fix. This is
also the energy added to the potential energy by the
:doc:`fix_modify <fix_modify>` *energy* command. With this command, the
thermo keyword *etotal* prints the conserved quantity of the MSST
dynamic equations. This can be used to test if the MD timestep is
sufficiently small for accurate integration of the dynamic
equations. See also :doc:`thermo_style <thermo_style>` command.
As mentioned above, the scalar is the cumulative energy change due to
the fix. By monitoring the thermodynamic *econserve* output, this can
be used to test if the MD timestep is sufficiently small for accurate
integration of the dynamic equations.
The global vector contains four values in this order:
The global vector contains four values in the following order. The
vector values output by this fix are "intensive".
[\ *dhugoniot*\ , *drayleigh*\ , *lagrangian_speed*, *lagrangian_position*]
[\ *dhugoniot*\ , *drayleigh*\ , *lagrangian_speed*,
*lagrangian_position*]
1. *dhugoniot* is the departure from the Hugoniot (temperature units).
2. *drayleigh* is the departure from the Rayleigh line (pressure units).
@ -157,17 +166,11 @@ headers, the following LAMMPS commands are suggested:
.. code-block:: LAMMPS
fix msst all msst z
fix_modify msst energy yes
variable dhug equal f_msst[1]
variable dray equal f_msst[2]
variable lgr_vel equal f_msst[3]
variable lgr_pos equal f_msst[4]
thermo_style custom step temp ke pe lz pzz etotal v_dhug v_dray v_lgr_vel v_lgr_pos f_msst
These fixes compute a global scalar and a global vector of 4
quantities, which can be accessed by various :doc:`output commands
<Howto_output>`. The scalar values calculated by this fix are
"extensive"; the vector values are "intensive".
thermo_style custom step temp ke pe lz pzz econserve v_dhug v_dray v_lgr_vel v_lgr_pos f_msst
Restrictions
""""""""""""

View File

@ -1,8 +1,10 @@
.. index:: fix nvt
.. index:: fix nvt/gpu
.. index:: fix nvt/intel
.. index:: fix nvt/kk
.. index:: fix nvt/omp
.. index:: fix npt
.. index:: fix npt/gpu
.. index:: fix npt/intel
.. index:: fix npt/kk
.. index:: fix npt/omp
@ -13,12 +15,12 @@
fix nvt command
===============
Accelerator Variants: *nvt/intel*, *nvt/kk*, *nvt/omp*
Accelerator Variants: *nvt/gpu*, *nvt/intel*, *nvt/kk*, *nvt/omp*
fix npt command
===============
Accelerator Variants: *npt/intel*, *npt/kk*, *npt/omp*
Accelerator Variants: *npt/gpu*, *npt/intel*, *npt/kk*, *npt/omp*
fix nph command
===============
@ -594,17 +596,20 @@ compute temperature on a subset of atoms.
specified by the *press* keyword will be unaffected by the *temp*
setting.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by these
fixes to add the energy change induced by Nose/Hoover thermostatting
and barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by these fixes, via
either thermostatting and/or barostatting, is included in the
:doc:`thermodynamic output <thermo_style>` keywords *ecouple* and
*econserve*. See the :doc:`thermo_style <thermo_style>` doc page for
details.
These fixes compute a global scalar and a global vector of quantities,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar value calculated by these fixes is "extensive"; the vector
values are "intensive".
These fixes compute a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
The scalar is the cumulative energy change due to the fix.
These fixes compute also compute a global vector of quantities, which
can be accessed by various :doc:`output commands <Howto_output>`. The
vector values are "intensive".
The vector stores internal Nose/Hoover thermostat and barostat
variables. The number and meaning of the vector values depends on

View File

@ -87,7 +87,8 @@ It also means that changing attributes of *thermo_temp* or
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover barostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
This fix writes the state of the Nose/Hoover barostat to :doc:`binary
restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
@ -101,9 +102,10 @@ consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover barostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nph <fix_nh>` command.

View File

@ -84,7 +84,8 @@ It also means that changing attributes of *thermo_temp* or
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover barostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
This fix writes the state of the Nose/Hoover barostat to :doc:`binary
restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
@ -98,9 +99,10 @@ consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover barostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nph <fix_nh>` command.

View File

@ -100,7 +100,8 @@ It also means that changing attributes of *thermo_temp* or
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover barostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
This fix writes the state of the Nose/Hoover barostat to :doc:`binary
restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
@ -114,9 +115,10 @@ consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover barostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nph <fix_nh>` command.

View File

@ -168,43 +168,47 @@ specified, then the instantaneous value in the system at the start of
the simulation is used.
The :doc:`fix_modify <fix_modify>` *temp* and *press* options are
supported by these fixes. You can use them to assign a
:doc:`compute <compute>` you have defined to this fix which will be used
in its thermostatting or barostatting procedure, as described above.
If you do this, note that the kinetic energy derived from the compute
supported by this fix. You can use them to assign a :doc:`compute
<compute>` you have defined to this fix which will be used in its
thermostatting or barostatting procedure, as described above. If you
do this, note that the kinetic energy derived from the compute
temperature should be consistent with the virial term computed using
all atoms for the pressure. LAMMPS will warn you if you choose to
compute temperature on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by these
fixes to add the energy change induced by Nose/Hoover thermostatting
and barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`. Either way, this energy is \*not\*
included in the definition of internal energy E when calculating the value
of Delta in the above equation.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details. Note that this energy is \*not\* included in
the definition of internal energy E when calculating the value of
Delta in the above equation.
These fixes compute a global scalar and a global vector of quantities,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar value calculated by these fixes is "extensive"; the vector
values are "intensive".
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
The scalar is the cumulative energy change due to the fix.
This fix also computes a global vector of quantities, which can be
accessed by various :doc:`output commands <Howto_output>`. The scalar
The vector values are "intensive".
The vector stores three quantities unique to this fix (:math:`\Delta`, Us, and up),
followed by all the internal Nose/Hoover thermostat and barostat
variables defined for :doc:`fix npt <fix_nh>`. Delta is the deviation
of the temperature from the target temperature, given by the above equation.
Us and up are the shock and particle velocity corresponding to a steady
shock calculated from the RH conditions. They have units of distance/time.
The vector stores three quantities unique to this fix (:math:`\Delta`,
Us, and up), followed by all the internal Nose/Hoover thermostat and
barostat variables defined for :doc:`fix npt <fix_nh>`. Delta is the
deviation of the temperature from the target temperature, given by the
above equation. Us and up are the shock and particle velocity
corresponding to a steady shock calculated from the RH
conditions. They have units of distance/time.
Restrictions
""""""""""""
This fix style is part of the SHOCK 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.
All the usual restrictions for :doc:`fix npt <fix_nh>` apply,
plus the additional ones mentioned above.
All the usual restrictions for :doc:`fix npt <fix_nh>` apply, plus the
additional ones mentioned above.
Related commands
""""""""""""""""

View File

@ -124,10 +124,10 @@ consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting and
barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix npt <fix_nh>` command.

View File

@ -45,7 +45,8 @@ can also have a bias velocity removed from them before thermostatting
takes place; see the description below.
Additional parameters affecting the thermostat and barostat are
specified by keywords and values documented with the :doc:`fix npt <fix_nh>` command. See, for example, discussion of the *temp*\ ,
specified by keywords and values documented with the :doc:`fix npt
<fix_nh>` command. See, for example, discussion of the *temp*\ ,
*iso*\ , *aniso*\ , and *dilate* keywords.
The particles in the fix group are the only ones whose velocities and
@ -121,10 +122,10 @@ consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting and
barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix npt <fix_nh>` command.

View File

@ -487,27 +487,31 @@ compute temperature on a subset of atoms.
.. note::
If both the *temp* and *press* keywords are used in a single
thermo_modify command (or in two separate commands), then the order in
which the keywords are specified is important. Note that a :doc:`pressure compute <compute_pressure>` defines its own temperature compute as
an argument when it is specified. The *temp* keyword will override
this (for the pressure compute being used by fix npt), but only if the
*temp* keyword comes after the *press* keyword. If the *temp* keyword
comes before the *press* keyword, then the new pressure compute
specified by the *press* keyword will be unaffected by the *temp*
setting.
thermo_modify command (or in two separate commands), then the order
in which the keywords are specified is important. Note that a
:doc:`pressure compute <compute_pressure>` defines its own
temperature compute as an argument when it is specified. The
*temp* keyword will override this (for the pressure compute being
used by fix npt), but only if the *temp* keyword comes after the
*press* keyword. If the *temp* keyword comes before the *press*
keyword, then the new pressure compute specified by the *press*
keyword will be unaffected by the *temp* setting.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting
and barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix, due to
thermostatting and/or barostatting, is included in the
:doc:`thermodynamic output <thermo_style>` keywords *ecouple* and
*econserve*. See the :doc:`thermo_style <thermo_style>` doc page for
details.
This fix computes a global scalar and a global vector of quantities,
which can be accessed by various :doc:`output commands <Howto_output>`.
The scalar value calculated by this fix is "extensive"; the vector
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
This fix also computes a global vector of quantities, which can be
accessed by various :doc:`output commands <Howto_output>`. Rhe vector
values are "intensive".
The scalar is the cumulative energy change due to the fix.
The vector stores internal Nose/Hoover thermostat and barostat
variables. The number and meaning of the vector values depends on
which fix is used and the settings for keywords *tchain* and *pchain*\ ,

View File

@ -93,13 +93,14 @@ IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID
since pressure is computed for the entire system.
Note that these are NOT the computes used by thermodynamic output (see
the :doc:`thermo_style <thermo_style>` command) with ID = *thermo_temp*
and *thermo_press*. This means you can change the attributes of this
fix's temperature or pressure via the
:doc:`compute_modify <compute_modify>` command or print this temperature
or pressure during thermodynamic output via the :doc:`thermo_style custom <thermo_style>` command using the appropriate compute-ID.
It also means that changing attributes of *thermo_temp* or
*thermo_press* will have no effect on this fix.
the :doc:`thermo_style <thermo_style>` command) with ID =
*thermo_temp* and *thermo_press*. This means you can change the
attributes of this fix's temperature or pressure via the
:doc:`compute_modify <compute_modify>` command or print this
temperature or pressure during thermodynamic output via the
:doc:`thermo_style custom <thermo_style>` command using the
appropriate compute-ID. It also means that changing attributes of
*thermo_temp* or *thermo_press* will have no effect on this fix.
Like other fixes that perform thermostatting, this fix can be used
with :doc:`compute commands <compute>` that calculate a temperature
@ -129,18 +130,18 @@ a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* and *press* options are
supported by this fix. You can use them to assign a
:doc:`compute <compute>` you have defined to this fix which will be used
in its thermostatting or barostatting procedure. If you do this, note
that the kinetic energy derived from the compute temperature should be
supported by this fix. You can use them to assign a :doc:`compute
<compute>` you have defined to this fix which will be used in its
thermostatting or barostatting procedure. If you do this, note that
the kinetic energy derived from the compute temperature should be
consistent with the virial term computed using all atoms for the
pressure. LAMMPS will warn you if you choose to compute temperature
on a subset of atoms.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting and
barostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix npt <fix_nh>` command.

View File

@ -1,4 +1,5 @@
.. index:: fix nve
.. index:: fix nve/gpu
.. index:: fix nve/intel
.. index:: fix nve/kk
.. index:: fix nve/omp
@ -6,7 +7,7 @@
fix nve command
===============
Accelerator Variants: *nve/intel*, *nve/kk*, *nve/omp*
Accelerator Variants: *nve/gpu*, *nve/intel*, *nve/kk*, *nve/omp*
Syntax
""""""

View File

@ -1,10 +1,11 @@
.. index:: fix nve/asphere
.. index:: fix nve/asphere/gpu
.. index:: fix nve/asphere/intel
fix nve/asphere command
=======================
Accelerator Variants: *nve/asphere/intel*
Accelerator Variants: *nve/asphere/gpu*, *nve/asphere/intel*
Syntax
""""""

View File

@ -92,19 +92,21 @@ thermal degrees of freedom, and the bias is added back in.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover thermostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
This fix writes the state of the Nose/Hoover thermostat to
:doc:`binary restart files <restart>`. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a :doc:`compute <compute>` you have
defined to this fix which will be used in its thermostatting
procedure.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nvt <fix_nh>` command.

View File

@ -89,19 +89,21 @@ thermal degrees of freedom, and the bias is added back in.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover thermostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
This fix writes the state of the Nose/Hoover thermostat to
:doc:`binary restart files <restart>`. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a :doc:`compute <compute>` you have
defined to this fix which will be used in its thermostatting
procedure.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nvt <fix_nh>` command.

View File

@ -122,19 +122,21 @@ thermal degrees of freedom, and the bias is added back in.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover thermostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
This fix writes the state of the Nose/Hoover thermostat to
:doc:`binary restart files <restart>`. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a :doc:`compute <compute>` you have
defined to this fix which will be used in its thermostatting
procedure.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nvt <fix_nh>` command.

View File

@ -41,19 +41,21 @@ velocity.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover thermostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
This fix writes the state of the Nose/Hoover thermostat to
:doc:`binary restart files <restart>`. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a :doc:`compute <compute>` you have
defined to this fix which will be used in its thermostatting
procedure.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nvt/eff <fix_nh_eff>` command.

View File

@ -106,19 +106,21 @@ thermal degrees of freedom, and the bias is added back in.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the state of the Nose/Hoover thermostat to :doc:`binary restart files <restart>`. See the :doc:`read_restart <read_restart>`
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.
This fix writes the state of the Nose/Hoover thermostat to
:doc:`binary restart files <restart>`. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* option is supported by this
fix. You can use it to assign a :doc:`compute <compute>` you have
defined to this fix which will be used in its thermostatting
procedure.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change induced by Nose/Hoover thermostatting to
the system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes the same global scalar and global vector of
quantities as does the :doc:`fix nvt <fix_nh>` command.

View File

@ -144,16 +144,20 @@ writing the orientation files is given in :ref:`(Wicaksono2) <Wicaksono2>`
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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
:doc:`thermodynamic output <thermo_style>`.
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 global potential energy of the
system as part of :doc:`thermodynamic output <thermo_style>`. The
default setting for this fix is :doc:`fix_modify energy no
<fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by these
fixes. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator a fix is adding its forces. Default is the outermost level.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by
these fixes. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator a fix is adding its forces. Default is the
outermost level.
This fix calculates a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
@ -166,13 +170,16 @@ order parameter Xi and normalized order parameter (0 to 1) for each
atom. The per-atom values can be accessed on any timestep.
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>`.
the :doc:`run <run>` command.
This fix is not invoked during :doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the 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.
was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
This fix should only be used with fcc or bcc lattices.

View File

@ -26,22 +26,24 @@ Examples
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
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::
@ -60,60 +62,69 @@ atom j is given by the following formulas
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.
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>`.
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>`.
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 global potential energy of the
system as part of :doc:`thermodynamic output <thermo_style>`. The
default setting for this fix is :doc:`fix_modify energy no
<fix_modify>`.
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.
This fix calculates a per-atom array with 2 columns, which can be
accessed by indices 1-1 by any command that uses per-atom values from
a fix as input. See the :doc:`Howto output <Howto_output>` doc page
for an overview of LAMMPS output options.
The first column is the order parameter for each atom; the second is
the thermal masking value for each atom. Both are described above.
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.
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

View File

@ -66,7 +66,8 @@ plumed fix in the LAMMPS input.
The *plumedfile* keyword allows the user to specify the name of the
PLUMED input file. Instructions as to what should be included in a
plumed input file can be found in the `documentation for PLUMED <plumeddocs_>`_
plumed input file can be found in the `documentation for PLUMED
<plumeddocs_>`_
The *outfile* keyword allows the user to specify the name of a file in
which to output the PLUMED log. This log file normally just repeats the
@ -78,31 +79,45 @@ be specified by the user in the PLUMED input file.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
When performing a restart of a calculation that involves PLUMED you must
include a RESTART command in the PLUMED input file as detailed in the
`PLUMED documentation <plumeddocs_>`_. When the restart command is found in
the PLUMED input PLUMED will append to the files that were generated in
the run that was performed previously. No part of the PLUMED restart
data is included in the LAMMPS restart files. Furthermore, any history
dependent bias potentials that were accumulated in previous calculations
will be read in when the RESTART command is included in the PLUMED
input.
When performing a restart of a calculation that involves PLUMED you
must include a RESTART command in the PLUMED input file as detailed in
the `PLUMED documentation <plumeddocs_>`_. When the restart command
is found in the PLUMED input PLUMED will append to the files that were
generated in the run that was performed previously. No part of the
PLUMED restart data is included in the LAMMPS restart files.
Furthermore, any history dependent bias potentials that were
accumulated in previous calculations will be read in when the RESTART
command is included in the PLUMED input.
The :doc:`fix_modify <fix_modify>` *energy* option is not supported by
this fix.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy change from the biasing force added by
PLUMED to the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy yes <fix_modify>`.
Nothing is computed by this fix that can be accessed by any of the
:doc:`output commands <Howto_output>` within LAMMPS. All the quantities
of interest can be output by commands that are native to PLUMED,
however.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution from the biasing force to the global
pressure of the system via the :doc:`compute pressure
<compute_pressure>` command. This can be accessed by
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the PLUMED
energy mentioned above. The scalar value calculated by this fix is
"extensive".
Note that other quantities of interest can be output by commands that
are native to PLUMED.
Restrictions
""""""""""""
This fix is part of the USER-PLUMED 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.
There can only be one plumed fix active at a time.
There can only be one fix plumed command active at a time.
Related commands
""""""""""""""""

View File

@ -39,14 +39,15 @@ useful for treating a large biomolecule as a collection of connected,
coarse-grained particles.
The coupling, associated motion constraints, and time integration is
performed by the software package `Parallelizable Open source Efficient Multibody Software (POEMS)` which computes the
constrained rigid-body motion of articulated (jointed) multibody
systems :ref:`(Anderson) <Anderson>`. POEMS was written and is distributed
by Prof Kurt Anderson, his graduate student Rudranarayan Mukherjee,
and other members of his group at Rensselaer Polytechnic Institute
(RPI). Rudranarayan developed the LAMMPS/POEMS interface. For
copyright information on POEMS and other details, please refer to the
documents in the poems directory distributed with LAMMPS.
performed by the software package `Parallelizable Open source
Efficient Multibody Software (POEMS)` which computes the constrained
rigid-body motion of articulated (jointed) multibody systems
:ref:`(Anderson) <Anderson>`. POEMS was written and is distributed by
Prof Kurt Anderson, his graduate student Rudranarayan Mukherjee, and
other members of his group at Rensselaer Polytechnic Institute (RPI).
Rudranarayan developed the LAMMPS/POEMS interface. For copyright
information on POEMS and other details, please refer to the documents
in the poems directory distributed with LAMMPS.
This fix updates the positions and velocities of the rigid atoms with
a constant-energy time integration, so you should not update the same
@ -107,7 +108,16 @@ off, and there is only a single fix poems defined.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
No information about this fix is written to :doc:`binary restart files
<restart>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces and torques
on atoms to both the global pressure and per-atom stress of the system
via the :doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *bodyforces* option is supported by
this fix style to set whether per-body forces and torques are computed
@ -115,16 +125,18 @@ early or late in a timestep, i.e. at the post-force stage or at the
final-integrate stage, respectively.
No global or per-atom quantities are stored by this fix for access by
various :doc:`output commands <Howto_output>`. No parameter of this fix
can be used with the *start/stop* keywords of the :doc:`run <run>`
command. This fix is not invoked during :doc:`energy minimization <minimize>`.
various :doc:`output commands <Howto_output>`. No parameter of this
fix can be used with the *start/stop* keywords of the :doc:`run <run>`
command. This fix is not invoked during :doc:`energy minimization
<minimize>`.
Restrictions
""""""""""""
This fix is part of the :ref:`POEMS <PKG-POEMS>` package. It is only enabled if LAMMPS
was built with that package, which also requires the POEMS library be
built and linked with LAMMPS. See the :doc:`Build package <Build_package>` doc page for more info.
This fix is part of the :ref:`POEMS <PKG-POEMS>` package. It is only
enabled if LAMMPS was built with that package, which also requires the
POEMS library be built and linked with LAMMPS. See the :doc:`Build
package <Build_package>` doc page for more info.
Related commands
""""""""""""""""

View File

@ -42,11 +42,12 @@ Examples
Description
"""""""""""
This fix applies a precession torque to each magnetic spin in the group.
This fix applies a precession torque to each magnetic spin in the
group.
Style *zeeman* is used for the simulation of the interaction
between the magnetic spins in the defined group and an external
magnetic field:
Style *zeeman* is used for the simulation of the interaction between
the magnetic spins in the defined group and an external magnetic
field:
.. math::
@ -62,17 +63,17 @@ with:
The field value in Tesla is multiplied by the gyromagnetic
ratio, :math:`g \cdot \mu_B/\hbar`, converting it into a precession frequency in
rad.THz (in metal units and with :math:`\mu_B = 5.788\cdot 10^{-5}` eV/T).
rad.THz (in metal units and with :math:`\mu_B = 5.788\cdot 10^{-5}`
eV/T).
As a comparison, the figure below displays the simulation of a
single spin (of norm :math:`\mu_i = 1.0`) submitted to an external
magnetic field of :math:`\vert B_{ext}\vert = 10.0\; \mathrm{Tesla}` (and oriented along the z
axis).
The upper plot shows the average magnetization along the
external magnetic field axis and the lower plot the Zeeman
energy, both as a function of temperature.
The reference result is provided by the plot of the Langevin
function for the same parameters.
As a comparison, the figure below displays the simulation of a single
spin (of norm :math:`\mu_i = 1.0`) submitted to an external magnetic
field of :math:`\vert B_{ext}\vert = 10.0\; \mathrm{Tesla}` (and
oriented along the z axis). The upper plot shows the average
magnetization along the external magnetic field axis and the lower
plot the Zeeman energy, both as a function of temperature. The
reference result is provided by the plot of the Langevin function for
the same parameters.
.. image:: JPG/zeeman_langevin.jpg
:align: center
@ -88,10 +89,12 @@ for the magnetic spins in the defined group:
.. math::
H_{aniso} = -\sum_{{ i}=1}^{N} K_{an}(\mathbf{r}_{i})\, \left( \vec{s}_{i} \cdot \vec{n}_{i} \right)^2
H_{aniso} = -\sum_{{ i}=1}^{N} K_{an}(\mathbf{r}_{i})\, \left(
\vec{s}_{i} \cdot \vec{n}_{i} \right)^2
with :math:`n` defining the direction of the anisotropy, and :math:`K` (in eV) its intensity.
If :math:`K > 0`, an easy axis is defined, and if :math:`K < 0`, an easy plane is defined.
with :math:`n` defining the direction of the anisotropy, and :math:`K`
(in eV) its intensity. If :math:`K > 0`, an easy axis is defined, and
if :math:`K < 0`, an easy plane is defined.
Style *cubic* is used to simulate a cubic anisotropy, with three
possible easy axis for the magnetic spins in the defined group:
@ -110,17 +113,17 @@ possible easy axis for the magnetic spins in the defined group:
\left(\vec{s}_{i} \cdot \vec{n_2} \right)^2
\left(\vec{s}_{i} \cdot \vec{n_3} \right)^2
with :math:`K_1` and :math:`K_{2c}` (in eV) the intensity coefficients and
:math:`\vec{n}_1`, :math:`\vec{n}_2` and :math:`\vec{n}_3` defining the three anisotropic directions
defined by the command (from *n1x* to *n3z*).
For :math:`\vec{n}_1 = (1 0 0)`, :math:`\vec{n}_2 = (0 1 0)`, and :math:`\vec{n}_3 = (0 0 1)`, :math:`K_1 < 0` defines an
with :math:`K_1` and :math:`K_{2c}` (in eV) the intensity coefficients
and :math:`\vec{n}_1`, :math:`\vec{n}_2` and :math:`\vec{n}_3`
defining the three anisotropic directions defined by the command (from
*n1x* to *n3z*). For :math:`\vec{n}_1 = (1 0 0)`, :math:`\vec{n}_2 =
(0 1 0)`, and :math:`\vec{n}_3 = (0 0 1)`, :math:`K_1 < 0` defines an
iron type anisotropy (easy axis along the :math:`(0 0 1)`-type cube
edges), and :math:`K_1 > 0` defines a nickel type anisotropy (easy axis
along the :math:`(1 1 1)`-type cube diagonals).
:math:`K_2^c > 0` also defines easy axis along the :math:`(1 1 1)`-type cube
diagonals.
See chapter 2 of :ref:`(Skomski) <Skomski1>` for more details on cubic
anisotropies.
edges), and :math:`K_1 > 0` defines a nickel type anisotropy (easy
axis along the :math:`(1 1 1)`-type cube diagonals). :math:`K_2^c >
0` also defines easy axis along the :math:`(1 1 1)`-type cube
diagonals. See chapter 2 of :ref:`(Skomski) <Skomski1>` for more
details on cubic anisotropies.
In all cases, the choice of :math:`(x y z)` only imposes the vector
directions for the forces. Only the direction of the vector is
@ -134,32 +137,35 @@ Those styles can be combined within one single command line.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
By default, the energy associated to this fix is not added to the potential
energy of the system.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this fix
to add this magnetic potential energy to the potential energy of the system,
No information about this fix is written to :doc:`binary restart files
<restart>`.
.. code-block:: LAMMPS
fix 1 all precession/spin zeeman 1.0 0.0 0.0 1.0
fix_modify 1 energy yes
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy associated with the spin precession
torque to the global potential energy of the system as part of
:doc:`thermodynamic output <thermo_style>`. The default setting for
this fix is :doc:`fix_modify energy no <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`.
:doc:`output commands <Howto_output>`. The scalar is the potential
energy (in energy units) discussed in the previous paragraph. The
scalar value is an "extensive" quantity.
No information about this fix is written to :doc:`binary restart files <restart>`.
No information about this fix is written to :doc:`binary restart files
<restart>`.
Restrictions
""""""""""""
The *precession/spin* style is part of the SPIN package. This style
is only enabled if LAMMPS was built with this package, and if the
atom_style "spin" was declared. See the :doc:`Build package <Build_package>` doc page for more info.
atom_style "spin" was declared. See the :doc:`Build package
<Build_package>` doc page for more info.
The *precession/spin* style can only be declared once. If more
than one precession type (for example combining an anisotropy and a Zeeman interactions)
has to be declared, they have to be chained in the same command
line (as shown in the examples above).
The *precession/spin* style can only be declared once. If more than
one precession type (for example combining an anisotropy and a Zeeman
interactions) has to be declared, they have to be chained in the same
command line (as shown in the examples above).
Related commands
""""""""""""""""

View File

@ -152,13 +152,30 @@ Because the state of the random number generator is not written to
"exactly" in an uninterrupted fashion. However, in a statistical
sense, a restarted simulation should produce similar behaviors of the
system as if it is not interrupted. To achieve such a restart, one
should write explicitly the same value for *q*\ , *mu*\ , *damp*\ , *f_max*,
*N_f*, *eta*\ , and *beta* and set *tscale* = 0 if the system is
compressed during the first run.
should write explicitly the same value for *q*\ , *mu*\ , *damp*\ ,
*f_max*, *N_f*, *eta*\ , and *beta* and set *tscale* = 0 if the system
is compressed during the first run.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
The progress of the QBMSST can be monitored by printing the global
scalar and global vector quantities computed by the fix. The global
vector contains five values in this order:
scalar and global vector quantities computed by the fix.
As mentioned above, the scalar is the cumulative energy change due to
the fix. By monitoring the thermodynamic *econserve* output, this can
be used to test if the MD timestep is sufficiently small for accurate
integration of the dynamic equations.
The global vector contains five values in the following order. The
vector values output by this fix are "intensive".
[\ *dhugoniot*\ , *drayleigh*\ , *lagrangian_speed*, *lagrangian_position*,
*quantum_temperature*]
@ -170,29 +187,21 @@ vector contains five values in this order:
5. *quantum_temperature* is the temperature of the quantum thermal bath :math:`T^{qm}`.
To print these quantities to the log file with descriptive column
headers, the following LAMMPS commands are suggested. Here the
:doc:`fix_modify <fix_modify>` energy command is also enabled to allow
the thermo keyword *etotal* to print the quantity :math:`E^{tot}`. See
also the :doc:`thermo_style <thermo_style>` command.
headers, the following LAMMPS commands are suggested.
.. parsed-literal::
fix fix_id all msst z
fix_modify fix_id energy yes
variable dhug equal f_fix_id[1]
variable dray equal f_fix_id[2]
variable lgr_vel equal f_fix_id[3]
variable lgr_pos equal f_fix_id[4]
variable T_qm equal f_fix_id[5]
thermo_style custom step temp ke pe lz pzz etotal v_dhug v_dray v_lgr_vel v_lgr_pos v_T_qm f_fix_id
thermo_style custom step temp ke pe lz pzz econserve v_dhug v_dray v_lgr_vel v_lgr_pos v_T_qm f_fix_id
The global scalar under the entry f_fix_id is the quantity of thermo
energy as an extra part of :math:`E^{tot}`. This global scalar and the
vector of 5 quantities can be accessed by various :doc:`output commands <Howto_output>`.
It is worth noting that the temp keyword
under the :doc:`thermo_style <thermo_style>` command print the
instantaneous classical temperature :math:`T^{cl}` as described
in the command :doc:`fix qtb <fix_qtb>`.
It is worth noting that the temp keyword for the :doc:`thermo_style
<thermo_style>` command prints the instantaneous classical temperature
:math:`T^{cl}` as described by the :doc:`fix qtb <fix_qtb>` command.
----------
@ -200,7 +209,8 @@ Restrictions
""""""""""""
This fix style is part of the USER-QTB 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.
All cell dimensions must be periodic. This fix can not be used with a
triclinic cell. The QBMSST fix has been tested only for the group-ID

View File

@ -219,15 +219,19 @@ current dihedral angle :math:`\phi` is equal to :math:`\phi_0`.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 associated with this fix to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy associated with this fix to the
global potential energy of the system as part of :doc:`thermodynamic
output <thermo_style>` The default setting for this fix is
:doc:`fix_modify energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix is adding its forces. Default is the outermost level.
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
.. note::

View File

@ -45,11 +45,34 @@ temperatures :ref:`(Pedersen) <Pedersen>`.
An example of using the interface pinning method is located in the
*examples/USER/misc/rhok* directory.
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 calculated by the fix to the
global potential energy of the system as part of :doc:`thermodynamic
output <thermo_style>`. The default setting for this fix is
:doc:`fix_modify energy no <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
energy discussed in the preceding paragraph. The scalar stored by
this fix is "extensive".
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
""""""""""""
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.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
Related commands
""""""""""""""""

View File

@ -752,25 +752,17 @@ rigid/nvt.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about the 4 NVE rigid styles is written to :doc:`binary restart files <restart>`. The exception is if the *infile* or
*mol* keyword is used, in which case an auxiliary file is written out
with rigid body information each time a restart file is written, as
No information about the 4 NVE rigid styles is written to :doc:`binary
restart files <restart>`. The exception is if the *infile* or *mol*
keyword is used, in which case an auxiliary file is written out with
rigid body information each time a restart file is written, as
explained above for the *infile* keyword. For the 2 NVT rigid styles,
the state of the Nose/Hoover thermostat is written to :doc:`binary restart files <restart>`. Ditto for the 4 NPT and NPH rigid styles, and
the state of the Nose/Hoover barostat. See the
:doc:`read_restart <read_restart>` command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by the 6
NVT, NPT, NPH rigid styles to add the energy change induced by the
thermostatting to the system's potential energy as part of
:doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to keeping the objects rigid to the
system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial yes*
the state of the Nose/Hoover thermostat is written to :doc:`binary
restart files <restart>`. Ditto for the 4 NPT and NPH rigid styles,
and the state of the Nose/Hoover barostat. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *temp* and *press* options are
supported by the 4 NPT and NPH rigid styles to change the computes
@ -783,6 +775,12 @@ all rigid styles to set whether per-body forces and torques are
computed early or late in a timestep, i.e. at the post-force stage or
at the final-integrate stage or the timestep, respectively.
The cumulative energy change in the system imposed by the 6 NVT, NPT,
NPH rigid fixes, via either thermostatting and/or barostatting, is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
The 2 NVE rigid fixes compute a global scalar which can be accessed by
various :doc:`output commands <Howto_output>`. The scalar value
calculated by these fixes is "intensive". The scalar is the current
@ -798,13 +796,22 @@ are removed from this calculation, but only for the *rigid* and
The 6 NVT, NPT, NPH rigid fixes compute a global scalar which can be
accessed by various :doc:`output commands <Howto_output>`. The scalar
value calculated by these fixes is "extensive". The scalar is the
cumulative energy change due to the thermostatting and barostatting
the fix performs.
is the same cumulative energy change due to these fixes described
above. The scalar value calculated by this fix is "extensive".
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
these fixes to add the contribution due to the added forces on atoms
to both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
All of the *rigid* styles (not the *rigid/small* styles) compute a
global array of values which can be accessed by various :doc:`output commands <Howto_output>`. Similar information about the bodies
defined by the *rigid/small* styles can be accessed via the :doc:`compute rigid/local <compute_rigid_local>` command.
global array of values which can be accessed by various :doc:`output
commands <Howto_output>`. Similar information about the bodies
defined by the *rigid/small* styles can be accessed via the
:doc:`compute rigid/local <compute_rigid_local>` command.
The number of rows in the array is equal to the number of rigid
bodies. The number of columns is 15. Thus for each rigid body, 15

View File

@ -191,22 +191,29 @@ LAMMPS closely follows (:ref:`Andersen (1983) <Andersen3>`).
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to keeping the constraints to the
system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial yes*
No information about these fixes is written to :doc:`binary restart
files <restart>`.
No information about these fixes is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
are relevant to these fixes. No global or per-atom quantities are
stored by these fixes for access by various :doc:`output commands <Howto_output>`. No parameter of these fixes can be used
with the *start/stop* keywords of the :doc:`run <run>` command. These
fixes are not invoked during :doc:`energy minimization <minimize>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
these fixes to add the contribution due to the added forces on atoms
to both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial yes <fix_modify>`.
No global or per-atom quantities are stored by these fixes for access
by various :doc:`output commands <Howto_output>`. No parameter of
these fixes can be used with the *start/stop* keywords of the
:doc:`run <run>` command. These fixes are not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""
These fixes are part of the RIGID package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
For computational efficiency, there can only be one shake or rattle
fix defined in a simulation.

View File

@ -48,10 +48,12 @@ Description
"""""""""""
This fix implements several options of steered MD (SMD) as reviewed in
:ref:`(Izrailev) <Izrailev>`, which allows to induce conformational changes
in systems and to compute the potential of mean force (PMF) along the
assumed reaction coordinate :ref:`(Park) <Park>` based on Jarzynski's
equality :ref:`(Jarzynski) <Jarzynski>`. This fix borrows a lot from :doc:`fix spring <fix_spring>` and :doc:`fix setforce <fix_setforce>`.
:ref:`(Izrailev) <Izrailev>`, which allows to induce conformational
changes in systems and to compute the potential of mean force (PMF)
along the assumed reaction coordinate :ref:`(Park) <Park>` based on
Jarzynski's equality :ref:`(Jarzynski) <Jarzynski>`. This fix borrows
a lot from :doc:`fix spring <fix_spring>` and :doc:`fix setforce
<fix_setforce>`.
You can apply a moving spring force to a group of atoms (\ *tether*
style) or between two groups of atoms (\ *couple* style). The spring
@ -108,30 +110,36 @@ See the :doc:`read_restart <read_restart>` command for info on how to
re-specify a fix in an input script that reads a restart file, so that
the operation of the fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by this
fix to add the contribution due to the added forces on atoms to the
system's virial as part of :doc:`thermodynamic output <thermo_style>`.
The default is *virial no*
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution due to the added forces on atoms to
both the global pressure and per-atom stress of the system via the
:doc:`compute pressure <compute_pressure>` and :doc:`compute
stress/atom <compute_stress_atom>` commands. The former can be
accessed by :doc:`thermodynamic output <thermo_style>`. The default
setting for this fix is :doc:`fix_modify virial no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by
this fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`
integrator the fix is adding its forces. Default is the outermost level.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA
<run_style>` integrator the fix is adding its forces. Default is the
outermost level.
This fix computes a vector list of 7 quantities, which can be accessed
by various :doc:`output commands <Howto_output>`. The quantities in the
vector are in this order: the x-, y-, and z-component of the pulling
force, the total force in direction of the pull, the equilibrium
distance of the spring, the distance between the two reference points,
and finally the accumulated PMF (the sum of pulling forces times
displacement).
by various :doc:`output commands <Howto_output>`. The quantities in
the vector are in this order: the x-, y-, and z-component of the
pulling force, the total force in direction of the pull, the
equilibrium distance of the spring, the distance between the two
reference points, and finally the accumulated PMF (the sum of pulling
forces times displacement).
The force is the total force on the group of atoms by the spring. In
the case of the *couple* style, it is the force on the fix group
(group-ID) or the negative of the force on the second group (group-ID2).
The vector values calculated by this fix are "extensive".
(group-ID) or the negative of the force on the second group
(group-ID2). The vector values calculated by this fix are
"extensive".
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>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -100,11 +100,14 @@ last example holds the ion a distance 5 away from the pore axis
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`.
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 energy stored in the spring to the system's potential
energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy stored in the spring to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`

View File

@ -62,9 +62,11 @@ will define the same number of chunks. The restart data is only applied
when the number of chunks matches. Otherwise the center of mass
coordinates are recomputed.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy stored in all the springs to the system's potential
energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy stored in all the springs to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`

View File

@ -44,15 +44,18 @@ plane, respectively.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
This fix writes the original coordinates of tethered atoms to :doc:`binary restart files <restart>`, so that the spring effect will be the
same in a restarted simulation. See the
:doc:`read_restart <read_restart>` command for info on how to re-specify
a fix in an input script that reads a restart file, so that the
operation of the fix continues in an uninterrupted fashion.
This fix writes the original coordinates of tethered atoms to
:doc:`binary restart files <restart>`, so that the spring effect will
be the same in a restarted simulation. See the :doc:`read_restart
<read_restart>` command for info on how to re-specify a fix in an
input script that reads a restart file, so that the operation of the
fix continues in an uninterrupted fashion.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy stored in the per-atom springs to the system's
potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the energy stored in the per-atom springs to the
global potential energy of the system as part of :doc:`thermodynamic
output <thermo_style>`. The default setting for this fix is
:doc:`fix_modify energy no <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *respa* option is supported by
this fix. This allows to set at which level of the :doc:`r-RESPA <run_style>`

View File

@ -132,14 +132,15 @@ you have defined to this fix which will be used in its thermostatting
procedure, as described above. For consistency, the group used by
this fix and by the compute should be the same.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by this
fix to add the energy change implied by a velocity rescaling to the
system's potential energy as part of :doc:`thermodynamic output <thermo_style>`.
The cumulative energy change in the system imposed by this fix is
included in the :doc:`thermodynamic output <thermo_style>` keywords
*ecouple* and *econserve*. See the :doc:`thermo_style <thermo_style>`
doc page for details.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the cumulative
energy change due to this fix. The scalar value calculated by this
fix is "extensive".
:doc:`output commands <Howto_output>`. The scalar is the same
cumulative energy change due to this fix described in the previous
paragraph. The scalar value calculated by this fix is "extensive".
This fix can ramp its target temperature over multiple runs, using the
*start* and *stop* keywords of the :doc:`run <run>` command. See the

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