Merge branch 'develop' into refactor-testing

This commit is contained in:
Axel Kohlmeyer
2022-10-24 20:07:58 -04:00
3711 changed files with 5155 additions and 4550 deletions

4
README
View File

@ -16,8 +16,8 @@ National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely funding from the DOE. It is an open-source code, distributed freely
under the terms of the GNU Public License (GPL) version 2. under the terms of the GNU Public License (GPL) version 2.
The primary author of the code is Steve Plimpton, who can be emailed The code is maintained by the LAMMPS development team who can be emailed
at sjplimp@sandia.gov. The LAMMPS WWW Site at www.lammps.org has at developers@lammps.org. The LAMMPS WWW Site at www.lammps.org has
more information about the code and its uses. more information about the code and its uses.
The LAMMPS distribution includes the following files and directories: The LAMMPS distribution includes the following files and directories:

View File

@ -727,18 +727,17 @@ list(FIND LANGUAGES "Fortran" _index)
if(_index GREATER -1) if(_index GREATER -1)
target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
endif() endif()
set(LAMMPS_CXX_HEADERS angle.h atom.h bond.h citeme.h comm.h compute.h dihedral.h domain.h error.h fix.h force.h group.h improper.h set(LAMMPS_CXX_HEADERS angle.h atom.h bond.h citeme.h comm.h command.h compute.h dihedral.h domain.h
input.h info.h kspace.h lammps.h lattice.h library.h lmppython.h lmptype.h memory.h modify.h neighbor.h neigh_list.h output.h error.h exceptions.h fix.h force.h group.h improper.h input.h info.h kspace.h lammps.h lattice.h
pair.h pointers.h region.h timer.h universe.h update.h utils.h variable.h) library.h lmppython.h lmptype.h memory.h modify.h neighbor.h neigh_list.h output.h pair.h
if(LAMMPS_EXCEPTIONS) platform.h pointers.h region.h timer.h universe.h update.h utils.h variable.h)
list(APPEND LAMMPS_CXX_HEADERS exceptions.h) set(LAMMPS_FMT_HEADERS core.h format.h)
endif()
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE}) set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION}) set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
set_target_properties(lammps PROPERTIES PREFIX "lib") set_target_properties(lammps PROPERTIES PREFIX "lib")
target_include_directories(lammps PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/lammps>) target_include_directories(lammps PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/lammps>)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/fmt)
foreach(_HEADER ${LAMMPS_CXX_HEADERS}) foreach(_HEADER ${LAMMPS_CXX_HEADERS})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LAMMPS_SOURCE_DIR}/${_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} DEPENDS ${LAMMPS_SOURCE_DIR}/${_HEADER}) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LAMMPS_SOURCE_DIR}/${_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} DEPENDS ${LAMMPS_SOURCE_DIR}/${_HEADER})
add_custom_target(${_HEADER} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER}) add_custom_target(${_HEADER} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER})
@ -747,6 +746,14 @@ foreach(_HEADER ${LAMMPS_CXX_HEADERS})
install(FILES ${LAMMPS_SOURCE_DIR}/${_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) install(FILES ${LAMMPS_SOURCE_DIR}/${_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
endif() endif()
endforeach() endforeach()
foreach(_HEADER ${LAMMPS_FMT_HEADERS})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/fmt/${_HEADER} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LAMMPS_SOURCE_DIR}/fmt/${_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/fmt/${_HEADER} DEPENDS ${LAMMPS_SOURCE_DIR}/fmt/${_HEADER})
add_custom_target(fmt_${_HEADER} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/fmt/${_HEADER})
add_dependencies(lammps fmt_${_HEADER})
if(BUILD_SHARED_LIBS)
install(FILES ${LAMMPS_SOURCE_DIR}/fmt/${_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps/fmt)
endif()
endforeach()
target_include_directories(lammps INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>) target_include_directories(lammps INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>)
add_library(LAMMPS::lammps ALIAS lammps) add_library(LAMMPS::lammps ALIAS lammps)
get_target_property(LAMMPS_DEFINES lammps INTERFACE_COMPILE_DEFINITIONS) get_target_property(LAMMPS_DEFINES lammps INTERFACE_COMPILE_DEFINITIONS)
@ -969,9 +976,6 @@ if(PKG_GPU)
endif() endif()
message(STATUS "GPU precision: ${GPU_PREC}") message(STATUS "GPU precision: ${GPU_PREC}")
endif() endif()
if(PKG_KOKKOS)
message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}")
endif()
if(PKG_KSPACE) if(PKG_KSPACE)
message(STATUS "<<< FFT settings >>> message(STATUS "<<< FFT settings >>>
-- Primary FFT lib: ${FFT}") -- Primary FFT lib: ${FFT}")

View File

@ -1,5 +1,10 @@
# Find clang-format # Find clang-format
find_program(ClangFormat_EXECUTABLE NAMES clang-format find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-15.0
clang-format-14.0
clang-format-13.0
clang-format-12.0
clang-format-11.0
clang-format-10.0 clang-format-10.0
clang-format-9.0 clang-format-9.0
clang-format-8.0 clang-format-8.0
@ -14,19 +19,27 @@ if(ClangFormat_EXECUTABLE)
OUTPUT_VARIABLE clang_format_version OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*")
if(clang_format_version MATCHES "^clang-format version .*") # Arch Linux output:
# Arch Linux
# clang-format version 10.0.0 # clang-format version 10.0.0
#
# Ubuntu 18.04 LTS Output # Ubuntu 18.04 LTS output:
# clang-format version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) # clang-format version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
string(REGEX REPLACE "clang-format version ([0-9.]+).*" #
"\\1" # Ubuntu 20.04 LTS output:
# clang-format version 10.0.0-4ubuntu1
#
# Ubuntu 22.04 LTS output:
# Ubuntu clang-format version 14.0.0-1ubuntu1
#
# Fedora 36 output:
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*"
"\\2"
ClangFormat_VERSION ClangFormat_VERSION
"${clang_format_version}") "${clang_format_version}")
elseif(clang_format_version MATCHES ".*LLVM version .*") elseif(clang_format_version MATCHES ".*LLVM version .*")
# CentOS 7 Output # CentOS 7 output:
# LLVM (http://llvm.org/): # LLVM (http://llvm.org/):
# LLVM version 3.4.2 # LLVM version 3.4.2
# Optimized build. # Optimized build.

View File

@ -22,7 +22,7 @@ endif()
if(Python_EXECUTABLE) if(Python_EXECUTABLE)
get_filename_component(_python_path ${Python_EXECUTABLE} PATH) get_filename_component(_python_path ${Python_EXECUTABLE} PATH)
find_program(Cythonize_EXECUTABLE find_program(Cythonize_EXECUTABLE
NAMES cythonize3 cythonize cythonize.bat NAMES cythonize-${Python_VERSION_MAJOR}.${Python_VERSION_MINOR} cythonize3 cythonize cythonize.bat
HINTS ${_python_path}) HINTS ${_python_path})
endif() endif()

View File

@ -2,7 +2,13 @@
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF) set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
if(PKG_PYTHON) if(PKG_PYTHON)
find_package(Cythonize QUIET) find_package(Cythonize QUIET)
if(Cythonize_FOUND) if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
find_package(Python COMPONENTS NumPy QUIET)
else()
# assume we have NumPy
set(Python_NumPy_FOUND ON)
endif()
if(Cythonize_FOUND AND Python_NumPy_FOUND)
set(MLIAP_ENABLE_PYTHON_DEFAULT ON) set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
endif() endif()
endif() endif()
@ -11,6 +17,9 @@ option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_EN
if(MLIAP_ENABLE_PYTHON) if(MLIAP_ENABLE_PYTHON)
find_package(Cythonize REQUIRED) find_package(Cythonize REQUIRED)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
find_package(Python COMPONENTS NumPy REQUIRED)
endif()
if(NOT PKG_PYTHON) if(NOT PKG_PYTHON)
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP") message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
endif() endif()

View File

@ -1,6 +1,6 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2022.09.27.fix10Oct.tar.gz" CACHE STRING "URL for PACE evaluator library sources") set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2022.10.15.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "766cebcc0e5c4b8430c2f3cd202d9905" CACHE STRING "MD5 checksum of PACE evaluator library tarball") set(PACELIB_MD5 "848ad6a6cc79fa82745927001fb1c9b5" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5) mark_as_advanced(PACELIB_MD5)

View File

@ -47,15 +47,15 @@ if(DOWNLOAD_PLUMED)
endif() endif()
message(STATUS "PLUMED download requested - we will build our own") message(STATUS "PLUMED download requested - we will build our own")
if(PLUMED_MODE STREQUAL "STATIC") if(PLUMED_MODE STREQUAL "STATIC")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumed.a") set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "SHARED") elseif(PLUMED_MODE STREQUAL "SHARED")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "RUNTIME") elseif(PLUMED_MODE STREQUAL "RUNTIME")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a") set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}")
endif() endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.4/plumed-src-2.7.4.tgz" CACHE STRING "URL for PLUMED tarball") set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.1/plumed-src-2.8.1.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "858e0b6aed173748fc85b6bc8a9dcb3e" CACHE STRING "MD5 checksum of PLUMED tarball") set(PLUMED_MD5 "6bfe72ebdae63dc38a9ca27d9b0e08f8" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL) mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5) mark_as_advanced(PLUMED_MD5)
@ -78,12 +78,12 @@ if(DOWNLOAD_PLUMED)
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED) add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
add_dependencies(LAMMPS::PLUMED plumed_build) add_dependencies(LAMMPS::PLUMED plumed_build)
if(PLUMED_MODE STREQUAL "STATIC") if(PLUMED_MODE STREQUAL "STATIC")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumed.a INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}") set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "SHARED") elseif(PLUMED_MODE STREQUAL "SHARED")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}") set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "RUNTIME") elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumedWrapper.a INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}") set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include) set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include) file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
@ -96,7 +96,7 @@ else()
elseif(PLUMED_MODE STREQUAL "SHARED") elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared) include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME") elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime) include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")

View File

@ -1,4 +1,9 @@
find_package(VTK REQUIRED NO_MODULE) find_package(VTK REQUIRED NO_MODULE)
include(${VTK_USE_FILE})
target_compile_definitions(lammps PRIVATE -DLAMMPS_VTK) target_compile_definitions(lammps PRIVATE -DLAMMPS_VTK)
target_link_libraries(lammps PRIVATE ${VTK_LIBRARIES}) if (VTK_MAJOR_VERSION VERSION_LESS 9.0)
include(${VTK_USE_FILE})
target_link_libraries(lammps PRIVATE ${VTK_LIBRARIES})
else()
target_link_libraries(lammps PRIVATE VTK::CommonCore VTK::IOCore VTK::CommonDataModel VTK::IOXML VTK::IOLegacy VTK::IOParallelXML)
vtk_module_autoinit(TARGETS lammps MODULES VTK::CommonCore VTK::IOCore VTK::CommonDataModel VTK::IOXML VTK::IOLegacy VTK::IOParallelXML)
endif()

View File

@ -38,16 +38,14 @@ endif
# override settings for PIP commands # override settings for PIP commands
# PIP_OPTIONS = --cert /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt --proxy http://proxy.mydomain.org # 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")
# temporarily disable caching so that the hack for the sphinx-tabs extensions to get proper non-html output works # temporarily disable caching so that the hack for the sphinx-tabs extensions to get proper non-html output works
SPHINXEXTRA = -E -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())') SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())')
# grab list of sources from doxygen config file. # grab list of sources from doxygen config file.
# we only want to use explicitly listed files. # we only want to use explicitly listed files.
DOXYFILES = $(shell sed -n -e 's/\#.*$$//' -e '/^ *INPUT \+=/,/^[A-Z_]\+ \+=/p' doxygen/Doxyfile.in | sed -e 's/@LAMMPS_SOURCE_DIR@/..\/src/g' -e 's/\\//g' -e 's/ \+/ /' -e 's/[A-Z_]\+ \+= *\(YES\|NO\|\)//') DOXYFILES = $(shell sed -n -e 's/\#.*$$//' -e '/^ *INPUT \+=/,/^[A-Z_]\+ \+=/p' doxygen/Doxyfile.in | sed -e 's/@LAMMPS_SOURCE_DIR@/..\/src/g' -e 's/\\//g' -e 's/ \+/ /' -e 's/[A-Z_]\+ \+= *\(YES\|NO\|\)//')
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check char_check xmlgen fasthtml .PHONY: help clean-all clean clean-spelling epub mobi html pdf spelling anchor_check style_check char_check xmlgen fasthtml
# ------------------------------------------ # ------------------------------------------
@ -89,6 +87,8 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@$(MAKE) $(MFLAGS) -C graphviz all @$(MAKE) $(MFLAGS) -C graphviz all
@(\ @(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \ . $(VENV)/bin/activate ; env PYTHONWARNINGS= \
sphinx-build -E $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
touch $(RSTDIR)/Fortran.rst ;\
sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\ sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
ln -sf Manual.html html/index.html;\ ln -sf Manual.html html/index.html;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\ rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
@ -114,7 +114,9 @@ fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@mkdir -p fasthtml @mkdir -p fasthtml
@(\ @(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \ . $(VENV)/bin/activate ; env PYTHONWARNINGS= \
sphinx-build -j 4 -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/fasthtml/doctrees $(RSTDIR) fasthtml ;\ sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/fasthtml/doctrees $(RSTDIR) fasthtml ;\
touch $(RSTDIR)/Fortran.rst ;\
sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/fasthtml/doctrees $(RSTDIR) fasthtml ;\
deactivate ;\ deactivate ;\
) )
@rm -rf fasthtml/_sources @rm -rf fasthtml/_sources
@ -144,6 +146,8 @@ epub: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@cp src/JPG/*.* epub/JPG @cp src/JPG/*.* epub/JPG
@(\ @(\
. $(VENV)/bin/activate ;\ . $(VENV)/bin/activate ;\
sphinx-build -E $(SPHINXEXTRA) -b epub -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) epub ;\
touch $(RSTDIR)/Fortran.rst ;\
sphinx-build $(SPHINXEXTRA) -b epub -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) epub ;\ sphinx-build $(SPHINXEXTRA) -b epub -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) epub ;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\ rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
deactivate ;\ deactivate ;\
@ -163,7 +167,9 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi @if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi
@(\ @(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \ . $(VENV)/bin/activate ; env PYTHONWARNINGS= \
sphinx-build $(SPHINXEXTRA) -b latex -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\ sphinx-build -E $(SPHINXEXTRA) -b latex -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
touch $(RSTDIR)/Fortran.rst ;\
sphinx-build $(SPHINXEXTRA) -b latex -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\ rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
echo "############################################" ;\ echo "############################################" ;\
rst_anchor_check src/*.rst ;\ rst_anchor_check src/*.rst ;\

View File

@ -147,6 +147,16 @@ compile and will download and compile a specific recent version of the
`Googletest <https://github.com/google/googletest/>`_ C++ test framework `Googletest <https://github.com/google/googletest/>`_ C++ test framework
for implementing the tests. for implementing the tests.
.. admonition:: Software version requirements for testing
:class: note
The compiler and library version requirements for the testing
framework are more strict than for the main part of LAMMPS. For
example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x
(version 4.8.x) are not sufficient. The CMake configuration will try
to detect compatible versions and either skip incompatible tests or
stop with an error.
After compilation is complete, the unit testing is started in the build After compilation is complete, the unit testing is started in the build
folder using the ``ctest`` command, which is part of the CMake software. folder using the ``ctest`` command, which is part of the CMake software.
The output of this command will be looking something like this:: The output of this command will be looking something like this::

View File

@ -7,7 +7,7 @@ source files provided as a supplement to a publication) that are written
for an older version of LAMMPS and thus need to be updated to be for an older version of LAMMPS and thus need to be updated to be
compatible with the current version of LAMMPS. Due to the active compatible with the current version of LAMMPS. Due to the active
development of LAMMPS it is likely to always be incomplete. Please development of LAMMPS it is likely to always be incomplete. Please
contact developer@lammps.org in case you run across an issue that is not contact developers@lammps.org in case you run across an issue that is not
(yet) listed here. Please also review the latest information about the (yet) listed here. Please also review the latest information about the
LAMMPS :doc:`programming style conventions <Modify_style>`, especially LAMMPS :doc:`programming style conventions <Modify_style>`, especially
if you are considering to submit the updated version for inclusion into if you are considering to submit the updated version for inclusion into

View File

@ -1,11 +1,11 @@
The ``LIBLAMMPS`` Fortran Module The ``LIBLAMMPS`` Fortran Module
******************************** ********************************
The ``LIBLAMMPS`` module provides an interface to call LAMMPS from Fortran. The ``LIBLAMMPS`` module provides an interface to call LAMMPS from
It is based on the LAMMPS C library interface and Fortran. It is based on the LAMMPS C library interface and requires a
requires a Fortran 2003-compatible compiler to be compiled. It is fully Fortran 2003-compatible compiler to be compiled. It is designed
designed to be self-contained and not require any support functions to be self-contained and not require any support functions written in C,
written in C, C++, or Fortran other than those in the C library interface. C++, or Fortran other than those in the C library interface.
While C libraries have a defined binary interface (ABI) and can thus be While C libraries have a defined binary interface (ABI) and can thus be
used from multiple compiler versions from different vendors as long used from multiple compiler versions from different vendors as long
@ -21,11 +21,11 @@ for a simple program using the Fortran interface would be:
mpifort -o testlib.x lammps.f90 testlib.f90 -L. -llammps mpifort -o testlib.x lammps.f90 testlib.f90 -L. -llammps
Please note that the MPI compiler wrapper is only required when the Please note that the MPI compiler wrapper is only required when the
calling the library from an MPI-parallelized program. Otherwise, using the calling the library from an MPI-parallelized program. Otherwise, using
fortran compiler (gfortran, ifort, flang, etc.) will suffice. It may be the plain Fortran compiler (gfortran, ifort, flang, etc.) will suffice.
necessary to link to additional libraries, depending on how LAMMPS was It may be necessary to link to additional libraries, depending on how
configured and whether the LAMMPS library :doc:`was compiled as a static LAMMPS was configured and whether the LAMMPS library :doc:`was compiled
or dynamic library <Build_link>`. as a static or dynamic library <Build_link>`.
If the LAMMPS library itself has been compiled with MPI support, the If the LAMMPS library itself has been compiled with MPI support, the
resulting executable will still be able to run LAMMPS in parallel with resulting executable will still be able to run LAMMPS in parallel with
@ -299,7 +299,7 @@ of the contents of the ``LIBLAMMPS`` Fortran interface to LAMMPS.
``MPI_comm`` derived type to access the integer value of the ``MPI_comm`` derived type to access the integer value of the
communicator, such as in communicator, such as in
.. code-block:: Fortran .. code-block:: fortran
PROGRAM testmpi PROGRAM testmpi
USE LIBLAMMPS USE LIBLAMMPS
@ -446,7 +446,7 @@ Procedures Bound to the lammps Derived Type
represents a properly-initialized LAMMPS instance, the following code will represents a properly-initialized LAMMPS instance, the following code will
extract the periodic box settings into the variable "periodic": extract the periodic box settings into the variable "periodic":
.. code-block:: Fortran .. code-block:: fortran
! code to start up ! code to start up
logical :: periodic(3) logical :: periodic(3)
@ -593,7 +593,7 @@ Procedures Bound to the lammps Derived Type
but you can automatically reallocate it to the correct length after the but you can automatically reallocate it to the correct length after the
function returns, viz., function returns, viz.,
.. code-block :: Fortran .. code-block :: fortran
PROGRAM test PROGRAM test
USE LIBLAMMPS USE LIBLAMMPS
@ -670,7 +670,7 @@ Procedures Bound to the lammps Derived Type
will print the *y*-coordinate of the sixth atom on this processor. will print the *y*-coordinate of the sixth atom on this processor.
Conversely, Conversely,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double), DIMENSION(:,:), POINTER :: x => NULL() REAL(c_double), DIMENSION(:,:), POINTER :: x => NULL()
@ -720,7 +720,7 @@ Procedures Bound to the lammps Derived Type
typical notation in C and C++, but not Fortran), you can create another typical notation in C and C++, but not Fortran), you can create another
pointer and associate it thus: pointer and associate it thus:
.. code-block:: Fortran .. code-block:: fortran
REAL(c_double), DIMENSION(:,:), POINTER :: x, x0 REAL(c_double), DIMENSION(:,:), POINTER :: x, x0
x = lmp%extract_atom("x") x = lmp%extract_atom("x")
@ -752,7 +752,7 @@ Procedures Bound to the lammps Derived Type
For example, For example,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double), DIMENSION(:), POINTER :: COM REAL(c_double), DIMENSION(:), POINTER :: COM
@ -938,7 +938,7 @@ Procedures Bound to the lammps Derived Type
For example, For example,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double) :: dr, dx, dy, dz REAL(c_double) :: dr, dx, dy, dz
@ -960,7 +960,7 @@ Procedures Bound to the lammps Derived Type
appropriate size to match the internal data, and will be appropriate size to match the internal data, and will be
type/kind/rank-checked at the time of the assignment. For example, type/kind/rank-checked at the time of the assignment. For example,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double), DIMENSION(:), POINTER :: r REAL(c_double), DIMENSION(:), POINTER :: r
@ -973,7 +973,7 @@ Procedures Bound to the lammps Derived Type
array computed by :doc:`fix store/state <fix_store_state>` when three array computed by :doc:`fix store/state <fix_store_state>` when three
inputs are specified. Similarly, inputs are specified. Similarly,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double), DIMENSION(:), POINTER :: x REAL(c_double), DIMENSION(:), POINTER :: x
@ -1059,7 +1059,7 @@ Procedures Bound to the lammps Derived Type
For example, For example,
.. code-block:: Fortran .. code-block:: fortran
TYPE(lammps) :: lmp TYPE(lammps) :: lmp
REAL(c_double) :: area REAL(c_double) :: area
@ -1129,7 +1129,7 @@ Procedures Bound to the lammps Derived Type
If you want data from this function to be accessible as a two-dimensional If you want data from this function to be accessible as a two-dimensional
array, you can declare a rank-2 pointer and reassign it, like so: array, you can declare a rank-2 pointer and reassign it, like so:
.. code-block:: Fortran .. code-block:: fortran
USE, INTRINSIC :: ISO_C_BINDING USE, INTRINSIC :: ISO_C_BINDING
USE LIBLAMMPS USE LIBLAMMPS

View File

@ -1736,8 +1736,6 @@ must be installed.
.. versionadded:: 30Jun2020 .. versionadded:: 30Jun2020
.. versionadded:: 30Jun2020
**Supporting info:** **Supporting info:**
* src/ML-IAP: filenames -> commands * src/ML-IAP: filenames -> commands

View File

@ -16,46 +16,47 @@ simulation. An example set of statistics is shown here:
.. parsed-literal:: .. parsed-literal::
Loop time of 2.81192 on 4 procs for 300 steps with 2004 atoms Loop time of 0.942801 on 4 procs for 300 steps with 2004 atoms
Performance: 18.436 ns/day 1.302 hours/ns 106.689 timesteps/s Performance: 54.985 ns/day, 0.436 hours/ns, 318.201 timesteps/s, 637.674 katom-step/s
97.0% CPU use with 4 MPI tasks x no OpenMP threads 195.2% CPU use with 2 MPI tasks x 2 OpenMP threads
MPI task timings breakdown: MPI task timing breakdown:
Section \| min time \| avg time \| max time \|%varavg\| %total Section \| min time \| avg time \| max time \|%varavg\| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair \| 1.9808 \| 2.0134 \| 2.0318 \| 1.4 \| 71.60 Pair \| 0.61419 \| 0.62872 \| 0.64325 \| 1.8 \| 66.69
Bond \| 0.0021894 \| 0.0060319 \| 0.010058 \| 4.7 \| 0.21 Bond \| 0.0028608 \| 0.0028899 \| 0.002919 \| 0.1 \| 0.31
Kspace \| 0.3207 \| 0.3366 \| 0.36616 \| 3.1 \| 11.97 Kspace \| 0.12652 \| 0.14048 \| 0.15444 \| 3.7 \| 14.90
Neigh \| 0.28411 \| 0.28464 \| 0.28516 \| 0.1 \| 10.12 Neigh \| 0.10242 \| 0.10242 \| 0.10242 \| 0.0 \| 10.86
Comm \| 0.075732 \| 0.077018 \| 0.07883 \| 0.4 \| 2.74 Comm \| 0.026753 \| 0.027593 \| 0.028434 \| 0.5 \| 2.93
Output \| 0.00030518 \| 0.00042665 \| 0.00078821 \| 1.0 \| 0.02 Output \| 0.00018341 \| 0.00030942 \| 0.00043542 \| 0.0 \| 0.03
Modify \| 0.086606 \| 0.086631 \| 0.086668 \| 0.0 \| 3.08 Modify \| 0.039117 \| 0.039348 \| 0.039579 \| 0.1 \| 4.17
Other \| \| 0.007178 \| \| \| 0.26 Other \| \| 0.001041 \| \| \| 0.11
Nlocal: 501 ave 508 max 490 min Nlocal: 1002 ave 1006 max 998 min
Histogram: 1 0 0 0 0 0 1 1 0 1 Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 6586.25 ave 6628 max 6548 min Nghost: 8670.5 ave 8691 max 8650 min
Histogram: 1 0 1 0 0 0 1 0 0 1 Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 177007 ave 180562 max 170212 min Neighs: 354010 ave 357257 max 350763 min
Histogram: 1 0 0 0 0 0 0 1 1 1 Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 708028 Total # of neighbors = 708020
Ave neighs/atom = 353.307 Ave neighs/atom = 353.30339
Ave special neighs/atom = 2.34032 Ave special neighs/atom = 2.3403194
Neighbor list builds = 26 Neighbor list builds = 26
Dangerous builds = 0 Dangerous builds = 0
---------- ----------
The first section provides a global loop timing summary. The *loop The first section provides a global loop timing summary. The *loop time*
time* is the total wall-clock time for the simulation to run. The is the total wall-clock time for the simulation to run. The
*Performance* line is provided for convenience to help predict how *Performance* line is provided for convenience to help predict how long
long it will take to run a desired physical simulation. The *CPU use* it will take to run a desired physical simulation and to have numbers
line provides the CPU utilization per MPI task; it should be close to useful for performance comparison between different simulation settings
100% times the number of OpenMP threads (or 1 of not using OpenMP). or system sizes. The *CPU use* line provides the CPU utilization per
Lower numbers correspond to delays due to file I/O or insufficient MPI task; it should be close to 100% times the number of OpenMP threads
thread utilization. (or 1 of not using OpenMP). Lower numbers correspond to delays due to
file I/O or insufficient thread utilization.
---------- ----------

View File

@ -21,7 +21,7 @@ Examples
bond_coeff 5 80.0 1.2 bond_coeff 5 80.0 1.2
bond_coeff * 30.0 1.5 1.0 1.0 bond_coeff * 30.0 1.5 1.0 1.0
bond_coeff 1*4 30.0 1.5 1.0 1.0 bond_coeff 1*4 30.0 1.5 1.0 1.0
bond_coeff 1 harmonic 200.0 1.0 (for bond_style hybrid) bond_coeff 1 harmonic 200.0 1.0 # (for bond_style hybrid)
labelmap bond 5 carbonyl labelmap bond 5 carbonyl
bond_coeff carbonyl 80.0 1.2 bond_coeff carbonyl 80.0 1.2

View File

@ -23,15 +23,16 @@ Description
""""""""""" """""""""""
This command deletes all atoms, restores all settings to their default This command deletes all atoms, restores all settings to their default
values, and frees all memory allocated by LAMMPS. Once a clear values, and frees all memory allocated by LAMMPS. Once a clear command
command has been executed, it is almost as if LAMMPS were starting has been executed, it is almost as if LAMMPS were starting over, with
over, with only the exceptions noted below. This command enables only the exceptions noted below. This command enables multiple jobs to
multiple jobs to be run sequentially from one input script. be run sequentially from one input script.
These settings are not affected by a clear command: the working These settings are not affected by a clear command: the working
directory (:doc:`shell <shell>` command), log file status directory (:doc:`shell <shell>` command), log file status (:doc:`log
(:doc:`log <log>` command), echo status (:doc:`echo <echo>` command), and <log>` command), echo status (:doc:`echo <echo>` command), and input
input script variables (:doc:`variable <variable>` command). script variables except for *atomfile* style variables (:doc:`variable
<variable>` command).
Restrictions Restrictions
"""""""""""" """"""""""""

View File

@ -17,7 +17,7 @@ Syntax
.. parsed-literal:: .. parsed-literal::
*replace* arg = name of per-atom variable *refresh* arg = name of per-atom variable
Examples Examples
"""""""" """"""""

View File

@ -6,7 +6,7 @@ compute rigid/local command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
compute ID group-ID rigid/local rigidID input1 input2 ... compute ID group-ID rigid/local rigidID input1 input2 ...
@ -25,6 +25,9 @@ Syntax
quatw, quati, quatj, quatk, quatw, quati, quatj, quatk,
tqx, tqy, tqz, tqx, tqy, tqz,
inertiax, inertiay, inertiaz inertiax, inertiay, inertiaz
.. parsed-literal::
id = atom ID of atom within body which owns body properties id = atom ID of atom within body which owns body properties
mol = molecule ID used to define body in :doc:`fix rigid/small <fix_rigid>` command mol = molecule ID used to define body in :doc:`fix rigid/small <fix_rigid>` command
mass = total mass of body mass = total mass of body
@ -69,8 +72,8 @@ the atoms owned on a processor. If the atom is not in the specified
the atom within a body that is assigned to store the body information the atom within a body that is assigned to store the body information
it is skipped (only one atom per body is so assigned). If it is the it is skipped (only one atom per body is so assigned). If it is the
assigned atom, then the info for that body is output. This means that assigned atom, then the info for that body is output. This means that
information for N bodies is generated. N may be less than the # of information for :math:`N` bodies is generated. :math:`N` may be less than the
bodies defined by the fix rigid command, if the atoms in some bodies number of bodies defined by the fix rigid command, if the atoms in some bodies
are not in the *group-ID*\ . are not in the *group-ID*\ .
.. note:: .. note::
@ -119,7 +122,7 @@ The image flags for the body can be generated directly using the *ix*,
*iy*, *iz* attributes. For periodic dimensions, they specify which *iy*, *iz* attributes. For periodic dimensions, they specify which
image of the simulation box the COM is considered to be in. An image image of the simulation box the COM is considered to be in. An image
of 0 means it is inside the box as defined. A value of 2 means add 2 of 0 means it is inside the box as defined. A value of 2 means add 2
box lengths to get the true value. A value of -1 means subtract 1 box box lengths to get the true value. A value of :math:`-1` means subtract 1 box
length to get the true value. LAMMPS updates these flags as the rigid length to get the true value. LAMMPS updates these flags as the rigid
body COMs cross periodic boundaries during the simulation. body COMs cross periodic boundaries during the simulation.
@ -141,8 +144,8 @@ The *tqx*, *tqy*, *tqz* attributes are components of the torque acting
on the body around its COM. on the body around its COM.
The *inertiax*, *inertiay*, *inertiaz* attributes are components of The *inertiax*, *inertiay*, *inertiaz* attributes are components of
diagonalized inertia tensor for the body, i.e the 3 moments of inertia diagonalized inertia tensor for the body (i.e., the three moments of inertia
for the body around its principal axes, as computed internally by for the body around its principal axes), as computed internally by
LAMMPS. LAMMPS.
---------- ----------
@ -169,10 +172,10 @@ corresponding attribute is in:
* vx,vy,vz = velocity units * vx,vy,vz = velocity units
* fx,fy,fz = force units * fx,fy,fz = force units
* omegax,omegay,omegaz = radians/time units * omegax,omegay,omegaz = radians/time units
* angmomx,angmomy,angmomz = mass\*distance\^2/time units * angmomx,angmomy,angmomz = mass\*distance\ :math:`^2`\ /time units
* quatw,quati,quatj,quatk = unitless * quatw,quati,quatj,quatk = unitless
* tqx,tqy,tqz = torque units * tqx,tqy,tqz = torque units
* inertiax,inertiay,inertiaz = mass\*distance\^2 units * inertiax,inertiay,inertiaz = mass\*distance\ :math:`^2` units
Restrictions Restrictions
"""""""""""" """"""""""""

View File

@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`compute <compute>` command * ID, group-ID are documented in :doc:`compute <compute>` command
* voronoi/atom = style name of this compute command * voronoi/atom = style name of this compute command
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *only_group* or *surface* or *radius* or *edge_histo* or *edge_threshold* or *face_threshold* or *neighbors* or *peratom* * keyword = *only_group* or *occupation* or *surface* or *radius* or *edge_histo* or *edge_threshold* or *face_threshold* or *neighbors* or *peratom*
.. parsed-literal:: .. parsed-literal::

View File

@ -28,7 +28,7 @@ Syntax
region-ID = create atoms within this region, use NULL for entire simulation box region-ID = create atoms within this region, use NULL for entire simulation box
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *mol* or *basis* or *ratio* or *subset* or *remap* or *var* or *set* or *rotate* or *overlap* or *maxtry* or *units* * keyword = *mol* or *basis* or *ratio* or *subset* or *remap* or *var* or *set* or *radscale* or *meshmode* or *rotate* or *overlap* or *maxtry* or *units*
.. parsed-literal:: .. parsed-literal::

View File

@ -26,6 +26,13 @@ Syntax
* zero or more keywords may be appended * zero or more keywords may be appended
* keyword = *any* or *undo* or *remove* or *special* * keyword = *any* or *undo* or *remove* or *special*
.. parsed-literal::
*any* arg = none = turn off interactions if any atoms are in the group (or on if *undo* is also used)
*undo* arg = none = turn specified bonds on instead of off
*remove* arg = permanently remove bonds that have been turned off
*special* arg = recompute pairwise 1-2, 1-3, and 1-4 lists
Examples Examples
"""""""" """"""""
@ -101,13 +108,13 @@ Several keywords can be appended to the argument list to alter the
default behaviors. default behaviors.
The *any* keyword changes the requirement that all atoms in the bond The *any* keyword changes the requirement that all atoms in the bond
(angle, etc) must be in the specified group in order to turn off the (angle, etc.) must be in the specified group in order to turn off the
interaction. Instead, if any of the atoms in the interaction are in interaction. Instead, if any of the atoms in the interaction are in
the specified group, it will be turned off (or on if the *undo* the specified group, it will be turned off (or on if the *undo*
keyword is used). keyword is used).
The *undo* keyword inverts the delete_bonds command so that the The *undo* keyword inverts the delete_bonds command so that the
specified bonds, angles, etc are turned on if they are currently specified bonds, angles, etc. are turned on if they are currently
turned off. This means a negative value is toggled to positive. For turned off. This means a negative value is toggled to positive. For
example, for style *angle*, if *type* is specified as 2, then all example, for style *angle*, if *type* is specified as 2, then all
angles with current type = :math:`-2` are reset to type = :math:`2`. angles with current type = :math:`-2` are reset to type = :math:`2`.

View File

@ -202,7 +202,7 @@ or multiple smaller files).
to a dump file may be slightly outside the simulation box. to a dump file may be slightly outside the simulation box.
Re-neighbor timesteps will not typically coincide with the Re-neighbor timesteps will not typically coincide with the
timesteps dump snapshots are written. See the :doc:`dump_modify timesteps dump snapshots are written. See the :doc:`dump_modify
pbc <dump_modify>` command if you with to force coordinates to be pbc <dump_modify>` command if you wish to force coordinates to be
strictly inside the simulation box. strictly inside the simulation box.
.. note:: .. note::

View File

@ -31,7 +31,7 @@ Syntax
v_name = per-atom vector calculated by an atom-style variable with name v_name = per-atom vector calculated by an atom-style variable with name
* zero or more keyword/arg pairs may be appended * zero or more keyword/arg pairs may be appended
* keyword = *norm* or *ave* or *bias* or *adof* or *cdof* or *file* or *overwrite* or *title1* or *title2* or *title3* * keyword = *norm* or *ave* or *bias* or *adof* or *cdof* or *file* or *overwrite* or *format* or *title1* or *title2* or *title3*
.. parsed-literal:: .. parsed-literal::

View File

@ -35,7 +35,7 @@ Syntax
v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below) v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below)
* zero or more keyword/arg pairs may be appended * zero or more keyword/arg pairs may be appended
* keyword = *mode* or *file* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3* * keyword = *mode* or *kind* or *file* or *ave* or *start* or *beyond* or *overwrite* or *title1* or *title2* or *title3*
.. parsed-literal:: .. parsed-literal::

View File

@ -28,7 +28,7 @@ Syntax
v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below) v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below)
* zero or more keyword/arg pairs may be appended * zero or more keyword/arg pairs may be appended
* keyword = *mode* or *file* or *ave* or *start* or *off* or *overwrite* or *title1* or *title2* or *title3* * keyword = *mode* or *file* or *ave* or *start* or *off* or *overwrite* or *format* or *title1* or *title2* or *title3*
.. parsed-literal:: .. parsed-literal::

View File

@ -6,17 +6,28 @@ fix bocs command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
fix ID group-ID bocs keyword values ... fix ID group-ID bocs keyword values ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* bocs = style name of this fix command
* two or more keyword/value pairs may be appended
* keyword = *temp* or *cgiso* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop*
.. parsed-literal::
keyword = *temp* or *cgiso* or *analytic* or *linear_spline* or *cubic_spline*
*temp* values = Tstart Tstop Tdamp *temp* values = Tstart Tstop Tdamp
*cgiso* values = Pstart Pstop Pdamp *cgiso* values = Pstart Pstop Pdamp basis_set args
*basis set* basis_set = *analytic* or *linear_spline* or *cubic_spline*
*analytic* values = V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N *analytic* args = V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N
*linear_spline* values = input_filename *linear_spline* args = input_filename
*cubic_spline* values = input_filename *cubic_spline* args = input_filename
*tchain* value = N = length of thermostat chain (1 = single thermostat)
*pchain* value = N = length of thermostat on barostat (0 = no thermostat)
*mtk* value = *yes* or *no* = add MTK adjustment term or not
*tloop* value = M = number of sub-cycles to perform on thermostat
*ploop* value = M = number of sub-cycles to perform on barostat
Examples Examples
"""""""" """"""""
@ -24,25 +35,24 @@ Examples
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20
fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 cubic_spline input_Fv.dat fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 cubic_spline input_Fv.dat
thermo_modify press 1_press thermo_modify press 1_press
Description Description
""""""""""" """""""""""
These commands incorporate a pressure correction as described by These commands incorporate a pressure correction as described by
Dunn and Noid in :ref:`(Dunn1) <bocs-Dunn1>` to the standard MTTK Dunn and Noid :ref:`(Dunn1) <bocs-Dunn1>` to the standard MTK
barostat by Martyna et. al. in :ref:`(Martyna) <bocs-Martyna>` . barostat by Martyna et al. :ref:`(Martyna) <bocs-Martyna>`.
The first half of the command mimics a standard fix npt command: The first half of the command mimics a standard :doc:`fix npt <fix_nh>`
command:
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix 1 all bocs temp Tstart Tstop Tcoupl cgiso Pstart Pstop Pdamp fix 1 all bocs temp Tstart Tstop Tcoupl cgiso Pstart Pstop Pdamp
The two differences are replacing *npt* with *bocs*, and replacing The two differences are replacing *npt* with *bocs*, and replacing
*iso*\ /\ *aniso*\ /\ *etc* with *cgiso*\ . *iso*\ /\ *aniso*\ /\ etc. with *cgiso*\ .
The rest of the command details what form you would like to use for The rest of the command details what form you would like to use for
the pressure correction equation. The choices are: *analytic*, *linear_spline*, the pressure correction equation. The choices are: *analytic*, *linear_spline*,
or *cubic_spline*. or *cubic_spline*.
@ -58,9 +68,9 @@ as a function of volume. The file must be formatted so each line has:
Note both the COMMA and the SPACE separating the volume's Note both the COMMA and the SPACE separating the volume's
value and its corresponding pressure correction. The volumes in the file value and its corresponding pressure correction. The volumes in the file
must be uniformly spaced. Both the volumes and the pressure corrections must be uniformly spaced. Both the volumes and the pressure corrections
should be provided in the proper units, e.g. if you are using *units real*, should be provided in the proper units (e.g., if you are using *units real*,
the volumes should all be in cubic Angstroms, and the pressure corrections the volumes should all be in :math:`\mathrm{\mathring{A}}^3` and the pressure
should all be in atmospheres. Furthermore, the table should start/end at a corrections should all be in atm). Furthermore, the table should start/end at a
volume considerably smaller/larger than you expect your system to sample volume considerably smaller/larger than you expect your system to sample
during the simulation. If the system ever reaches a volume outside of the during the simulation. If the system ever reaches a volume outside of the
range provided, the simulation will stop. range provided, the simulation will stop.
@ -71,9 +81,10 @@ With the *analytic* option, the arguments are as follows:
... analytic V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N ... analytic V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N
Note that *V_avg* and *Coeff_i* should all be in the proper units, e.g. if you 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 are using *units real*, *V_avg* should be in :math:`\mathrm{\mathring{A}^3}`
coefficients should all be in atmospheres \* cubic Angstroms. and the coefficients should all be in
:math:`\mathrm{atm}\cdot\mathrm{\mathring{A}^3}`\ ).
---------- ----------
@ -122,7 +133,7 @@ are written to a file every so often. In order to have LAMMPS report the
modified pressure, you must include the *thermo_modify* command given in modified pressure, you must include the *thermo_modify* command given in
the examples. For the last argument in the command, you should put the examples. For the last argument in the command, you should put
XXXX_press, where XXXX is the ID given to the fix bocs command (in the XXXX_press, where XXXX is the ID given to the fix bocs command (in the
example, the ID of the fix bocs command is 1 ). example, the ID of the fix bocs command is 1).
This fix is part of the BOCS package. It is only enabled if This fix is part of the BOCS package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info. LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
@ -132,7 +143,7 @@ Further information
For more details about the pressure correction and the entire BOCS software For more details about the pressure correction and the entire BOCS software
package, visit the `BOCS package on GitHub <bocsgithub_>`_ and read the release package, visit the `BOCS package on GitHub <bocsgithub_>`_ and read the release
paper by Dunn et. al. :ref:`(Dunn2) <bocs-Dunn2>` . paper by Dunn et al. :ref:`(Dunn2) <bocs-Dunn2>` .
.. _bocsgithub: https://github.com/noid-group/BOCS .. _bocsgithub: https://github.com/noid-group/BOCS

View File

@ -6,7 +6,7 @@ fix bond/break command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
fix ID group-ID bond/break Nevery bondtype Rmax keyword values ... fix ID group-ID bond/break Nevery bondtype Rmax keyword values ...
@ -15,7 +15,7 @@ Syntax
* Nevery = attempt bond breaking every this many steps * Nevery = attempt bond breaking every this many steps
* bondtype = type of bonds to break * bondtype = type of bonds to break
* Rmax = bond longer than Rmax can break (distance units) * Rmax = bond longer than Rmax can break (distance units)
* zero or more keyword/value pairs may be appended to args * zero or more keyword/value pairs may be appended
* keyword = *prob* * keyword = *prob*
.. parsed-literal:: .. parsed-literal::
@ -43,42 +43,42 @@ pair of atoms computed by the :doc:`bond_style <bond_style>` command.
Once the bond is broken it will be permanently deleted, as will all Once the bond is broken it will be permanently deleted, as will all
angle, dihedral, and improper interactions that bond is part of. angle, dihedral, and improper interactions that bond is part of.
This is different than a :doc:`pairwise <pair_style>` bond-order This is different than a :doc:`pair-wise <pair_style>` bond-order
potential such as Tersoff or AIREBO which infers bonds and many-body potential such as Tersoff or AIREBO which infers bonds and many-body
interactions based on the current geometry of a small cluster of atoms interactions based on the current geometry of a small cluster of atoms
and effectively creates and destroys bonds and higher-order many-body and effectively creates and destroys bonds and higher-order many-body
interactions from timestep to timestep as atoms move. interactions from timestep to timestep as atoms move.
A check for possible bond breakage is performed every *Nevery* A check for possible bond breakage is performed every *Nevery*
timesteps. If two bonded atoms I,J are further than a distance *Rmax* timesteps. If two bonded atoms :math:`i` and :math:`j` are farther than the
of each other, if the bond is of type *bondtype*, and if both I and J distance *Rmax* from each other, the bond is of type *bondtype*, and both
are in the specified fix group, then I,J is labeled as a "possible" :math:`i` and :math:`j` are in the specified fix group, then the bond between
bond to break. :math:`i` and :math:`j` is labeled as a "possible" bond to break.
If several bonds involving an atom are stretched, it may have multiple If several bonds involving an atom are stretched, it may have multiple
possible bonds to break. Every atom checks its list of possible bonds possible bonds to break. Every atom checks its list of possible bonds
to break and labels the longest such bond as its "sole" bond to break. to break and labels the longest such bond as its "sole" bond to break.
After this is done, if atom I is bonded to atom J in its sole bond, After this is done, if atom :math:`i` is bonded to atom :math:`j` in its sole
and atom J is bonded to atom I in its sole bond, then the I,J bond is bond, and atom :math:`j` is bonded to atom :math:`j` in its sole bond, then the
"eligible" to be broken. bond between :math:`i` and :math:`j` is "eligible" to be broken.
Note that these rules mean an atom will only be part of at most one Note that these rules mean an atom will only be part of at most one
broken bond on a given timestep. It also means that if atom I chooses broken bond on a given time step. It also means that if atom :math:`i` chooses
atom J as its sole partner, but atom J chooses atom K is its sole atom :math:`j` as its sole partner, but atom :math:`j` chooses atom :math:`k`
partner (due to Rjk > Rij), then this means atom I will not be part of as its sole partner (because :math:`R_{jk} > R_{ij}`), then this means atom
a broken bond on this timestep, even if it has other possible bond :math:`i` will not be part of a broken bond on this time step, even if it has
partners. other possible bond partners.
The *prob* keyword can effect whether an eligible bond is actually The *prob* keyword can effect whether an eligible bond is actually
broken. The *fraction* setting must be a value between 0.0 and 1.0. broken. The *fraction* setting must be a value between 0.0 and 1.0.
A uniform random number between 0.0 and 1.0 is generated and the A uniform random number between 0.0 and 1.0 is generated and the
eligible bond is only broken if the random number < fraction. eligible bond is only broken if the random number is less than *fraction*.
When a bond is broken, data structures within LAMMPS that store bond When a bond is broken, data structures within LAMMPS that store bond
topology are updated to reflect the breakage. Likewise, if the bond topologies are updated to reflect the breakage. Likewise, if the bond
is part of a 3-body (angle) or 4-body (dihedral, improper) is part of a 3-body (angle) or 4-body (dihedral, improper)
interaction, that interaction is removed as well. These changes interaction, that interaction is removed as well. These changes
typically affect pairwise interactions between atoms that used to be typically affect pair-wise interactions between atoms that used to be
part of bonds, angles, etc. part of bonds, angles, etc.
.. note:: .. note::
@ -88,17 +88,17 @@ part of bonds, angles, etc.
becomes two molecules due to the broken bond, all atoms in both new becomes two molecules due to the broken bond, all atoms in both new
molecules retain their original molecule IDs. molecules retain their original molecule IDs.
Computationally, each timestep this fix operates, it loops over all Computationally, each time step this fix is invoked, it loops over all
the bonds in the system and computes distances between pairs of bonded the bonds in the system and computes distances between pairs of bonded
atoms. It also communicates between neighboring processors to atoms. It also communicates between neighboring processors to
coordinate which bonds are broken. Moreover, if any bonds are broken, coordinate which bonds are broken. Moreover, if any bonds are broken,
neighbor lists must be immediately updated on the same timestep. This neighbor lists must be immediately updated on the same time step. This
is to insure that any pairwise interactions that should be turned "on" is to ensure that any pair-wise interactions that should be turned "on"
due to a bond breaking, because they are no longer excluded by the due to a bond breaking, because they are no longer excluded by the
presence of the bond and the settings of the presence of the bond and the settings of the
:doc:`special_bonds <special_bonds>` command, will be immediately :doc:`special_bonds <special_bonds>` command, will be immediately
recognized. All of these operations increase the cost of a timestep. recognized. All of these operations increase the cost of a time step.
Thus you should be cautious about invoking this fix too frequently. Thus, you should be cautious about invoking this fix too frequently.
You can dump out snapshots of the current bond topology via the :doc:`dump local <dump>` command. You can dump out snapshots of the current bond topology via the :doc:`dump local <dump>` command.
@ -107,11 +107,11 @@ You can dump out snapshots of the current bond topology via the :doc:`dump local
Breaking a bond typically alters the energy of a system. You Breaking a bond typically alters the energy of a system. You
should be careful not to choose bond breaking criteria that induce a should be careful not to choose bond breaking criteria that induce a
dramatic change in energy. For example, if you define a very stiff dramatic change in energy. For example, if you define a very stiff
harmonic bond and break it when 2 atoms are separated by a distance harmonic bond and break it when two atoms are separated by a distance
far from the equilibrium bond length, then the 2 atoms will be far from the equilibrium bond length, then the two atoms will be
dramatically released when the bond is broken. More generally, you dramatically released when the bond is broken. More generally, you
may need to thermostat your system to compensate for energy changes may need to thermostat your system to compensate for energy changes
resulting from broken bonds (and angles, dihedrals, impropers). resulting from broken bonds (as well as angles, dihedrals, and impropers).
See the :doc:`Howto <Howto_broken_bonds>` page on broken bonds for more See the :doc:`Howto <Howto_broken_bonds>` page on broken bonds for more
information on related features in LAMMPS. information on related features in LAMMPS.
@ -124,14 +124,14 @@ Restart, fix_modify, output, run start/stop, minimize info
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix. are relevant to this fix.
This fix computes two statistics which it stores in a global vector of This fix computes two statistics, which it stores in a global vector of
length 2, which can be accessed by various :doc:`output commands <Howto_output>`. The vector values calculated by this fix length 2. This vector can be accessed by various :doc:`output commands
are "intensive". <Howto_output>`. The vector values calculated by this fix are "intensive".
These are the 2 quantities: The two quantities in the global vector are
* (1) # of bonds broken on the most recent breakage timestep (1) number of bonds broken on the most recent breakage time step
* (2) cumulative # of bonds broken (2) cumulative number of bonds broken
No parameter of this fix can be used with the *start/stop* keywords of No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`. the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.

View File

@ -10,7 +10,7 @@ fix bond/create/angle command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
fix ID group-ID bond/create Nevery itype jtype Rmin bondtype keyword values ... fix ID group-ID bond/create Nevery itype jtype Rmin bondtype keyword values ...
@ -58,83 +58,84 @@ Description
""""""""""" """""""""""
Create bonds between pairs of atoms as a simulation runs according to Create bonds between pairs of atoms as a simulation runs according to
specified criteria. This can be used to model cross-linking of specified criteria. This can be used to model the cross-linking of
polymers, the formation of a percolation network, etc. In this polymers, the formation of a percolation network, etc. In this
context, a bond means an interaction between a pair of atoms computed context, a bond means an interaction between a pair of atoms computed
by the :doc:`bond_style <bond_style>` command. Once the bond is created by the :doc:`bond_style <bond_style>` command. Once the bond is created
it will be permanently in place. Optionally, the creation of a bond it will be permanently in place. Optionally, the creation of a bond
can also create angle, dihedral, and improper interactions that bond can also create angle, dihedral, and improper interactions that the bond
is part of. See the discussion of the *atype*, *dtype*, and *itype* is part of. See the discussion of the *atype*, *dtype*, and *itype*
keywords below. keywords below.
This is different than a :doc:`pairwise <pair_style>` bond-order This process is different than a :doc:`pair-wise <pair_style>` bond-order
potential such as Tersoff or AIREBO which infers bonds and many-body potential such as Tersoff or AIREBO, which infer bonds and many-body
interactions based on the current geometry of a small cluster of atoms interactions based on the current geometry of a small cluster of atoms
and effectively creates and destroys bonds and higher-order many-body and effectively create and destroy bonds and higher-order many-body
interactions from timestep to timestep as atoms move. interactions from time step to time step as the atoms move.
A check for possible new bonds is performed every *Nevery* timesteps. A check for possible new bonds is performed every *Nevery* time steps.
If two atoms I,J are within a distance *Rmin* of each other, if I is If two atoms :math:`i` and :math:`j` are within a distance *Rmin* of each
of atom type *itype*, if J is of atom type *jtype*, if both I and J other, atom :math:`i` is of type *itype*, atom :math:`j` is of type *jtype*,
are in the specified fix group, if a bond does not already exist and both :math:`i` and :math:`j` are in the specified fix group, then if a bond
between I and J, and if both I and J meet their respective *maxbond* does not already exist between atoms :math:`i` and :math:`j`, and if both
requirement (explained below), then I,J is labeled as a "possible" :math:`i` and :math:`j` meet their respective *maxbond* requirements (explained
bond pair. below), then :math:`i` and :math:`j` are labeled as a "possible" bond pair.
If several atoms are close to an atom, it may have multiple possible If several atoms are close to an atom, it may have multiple possible
bond partners. Every atom checks its list of possible bond partners bond partners. Every atom checks its list of possible bond partners
and labels the closest such partner as its "sole" bond partner. After and labels the closest such partner as its "sole" bond partner. After
this is done, if atom I has atom J as its sole partner, and atom J has this is done, if atom :math:`i` has atom :math:`j` as its sole partner and
atom I as its sole partner, then the I,J bond is "eligible" to be atom :math:`j` has atom :math:`i` as its sole partner, then the
formed. :math:`i,j` bond is "eligible" to be formed.
Note that these rules mean an atom will only be part of at most one Note that these rules mean that an atom will only be part of at most one
created bond on a given timestep. It also means that if atom I created bond on a given time step. It also means that if atom :math:`i`
chooses atom J as its sole partner, but atom J chooses atom K is its chooses atom :math:`j` as its sole partner, but atom :math:`j` chooses atom
sole partner (due to Rjk < Rij), then this means atom I will not form :math:`k` as its sole partner (because :math:`R_{jk} < R_{ij}`), then atom
a bond on this timestep, even if it has other possible bond partners. :math:`i` will not form a bond on this time step, even if it has other possible
bond partners.
It is permissible to have *itype* = *jtype*\ . *Rmin* must be <= the It is permissible to have *itype* = *jtype*\ . *Rmin* must be :math:`\leq` the
pairwise cutoff distance between *itype* and *jtype* atoms, as defined pair-wise cutoff distance between *itype* and *jtype* atoms, as defined
by the :doc:`pair_style <pair_style>` command. by the :doc:`pair_style <pair_style>` command.
The *iparam* and *jparam* keywords can be used to limit the bonding The *iparam* and *jparam* keywords can be used to limit the bonding
functionality of the participating atoms. Each atom keeps track of functionality of the participating atoms. Each atom keeps track of
how many bonds of *bondtype* it already has. If atom I of how many bonds of *bondtype* it already has. If atom :math:`i` of type
itype already has *maxbond* bonds (as set by the *iparam* *itype* already has *maxbond* bonds (as set by the *iparam*
keyword), then it will not form any more. Likewise for atom J. If keyword), then it will not form any more, and likewise for atom :math:`j`.
*maxbond* is set to 0, then there is no limit on the number of bonds If *maxbond* is set to 0, then there is no limit on the number of bonds
that can be formed with that atom. that can be formed with that atom.
The *newtype* value for *iparam* and *jparam* can be used to change The *newtype* value for *iparam* and *jparam* can be used to change
the atom type of atom I or J when it reaches *maxbond* number of bonds the atom type of atom :math:`i` or :math:`j` when it reaches *maxbond* number
of type *bondtype*\ . This means it can now interact in a pairwise of bonds of type *bondtype*\ . This means it can now interact in a pair-wise
fashion with other atoms in a different way by specifying different fashion with other atoms in a different way by specifying different
:doc:`pair_coeff <pair_coeff>` coefficients. If you do not wish the :doc:`pair_coeff <pair_coeff>` coefficients. If you do not wish the
atom type to change, simply specify *newtype* as *itype* or *jtype*\ . atom type to change, simply specify *newtype* as *itype* or *jtype*\ .
The *prob* keyword can also effect whether an eligible bond is The *prob* keyword can also affect whether an eligible bond is
actually created. The *fraction* setting must be a value between 0.0 actually created. The *fraction* setting must be a value between 0.0
and 1.0. A uniform random number between 0.0 and 1.0 is generated and and 1.0. A uniform random number between 0.0 and 1.0 is generated and
the eligible bond is only created if the random number < fraction. the eligible bond is only created if the random number is less than *fraction*.
The *aconstrain* keyword is only available with the fix The *aconstrain* keyword is only available with the fix
bond/create/angle command. It allows to specify a minimal and maximal bond/create/angle command. It allows one to specify minimum and maximum
angle *amin* and *amax* between the two prospective bonding partners and angles *amin* and *amax*, respectively, between the two prospective bonding
a third particle that is already bonded to one of the two partners. partners and a third particle that is already bonded to one of the two
Such a criterion can be important when new angles are defined together partners. Such a criterion can be important when new angles are defined
with the formation of a new bond. Without a restriction on the together with the formation of a new bond. Without a restriction on the
permissible angle, and for stiffer angle potentials, very large energies permissible angle, and for stiffer angle potentials, very large energies
can arise and lead to uncontrolled behavior. can arise and lead to unphysical behavior.
Any bond that is created is assigned a bond type of *bondtype*. Any bond that is created is assigned a bond type of *bondtype*.
When a bond is created, data structures within LAMMPS that store bond When a bond is created, data structures within LAMMPS that store bond
topology are updated to reflect the creation. If the bond is part of topologies are updated to reflect the creation. If the bond is part of
new 3-body (angle) or 4-body (dihedral, improper) interactions, you new 3-body (angle) or 4-body (dihedral, improper) interactions, you
can choose to create new angles, dihedrals, impropers as well, using can choose to create new angles, dihedrals, and impropers as well using
the *atype*, *dtype*, and *itype* keywords. All of these changes the *atype*, *dtype*, and *itype* keywords. All of these changes
typically affect pairwise interactions between atoms that are now part typically affect pair-wise interactions between atoms that are now part
of new bonds, angles, etc. of new bonds, angles, etc.
.. note:: .. note::
@ -165,19 +166,19 @@ of type *angletype*, with parameters assigned by the corresponding
when bonds are created. See the :doc:`read_data <read_data>` or when bonds are created. See the :doc:`read_data <read_data>` or
:doc:`create_box <create_box>` command for more details. Note that a :doc:`create_box <create_box>` command for more details. Note that a
data file with no atoms can be used if you wish to add non-bonded data file with no atoms can be used if you wish to add non-bonded
atoms via the :doc:`create atoms <create_atoms>` command, e.g. for a atoms via the :doc:`create atoms <create_atoms>` command (e.g., for a
percolation simulation. percolation simulation).
.. note:: .. note::
LAMMPS stores and maintains a data structure with a list of the LAMMPS stores and maintains a data structure with a list of the
first, second, and third neighbors of each atom (within the bond topology of first, second, and third neighbors of each atom (within the bond topology of
the system) for use in weighting pairwise interactions for bonded the system) for use in weighting pair-wise interactions for bonded
atoms. Note that adding a single bond always adds a new first neighbor atoms. Note that adding a single bond always adds a new first neighbor
but may also induce \*many\* new second and third neighbors, depending on the but may also induce **many** new second and third neighbors, depending on the
molecular topology of your system. The "extra special per atom" molecular topology of your system. The "extra special per atom"
parameter must typically be set to allow for the new maximum total parameter must typically be set to allow for the new maximum total
size (first + second + third neighbors) of this per-atom list. There are 2 size (first + second + third neighbors) of this per-atom list. There are two
ways to do this. See the :doc:`read_data <read_data>` or ways to do this. See the :doc:`read_data <read_data>` or
:doc:`create_box <create_box>` commands for details. :doc:`create_box <create_box>` commands for details.
@ -186,15 +187,16 @@ of type *angletype*, with parameters assigned by the corresponding
Even if you do not use the *atype*, *dtype*, or *itype* Even if you do not use the *atype*, *dtype*, or *itype*
keywords, the list of topological neighbors is updated for atoms keywords, the list of topological neighbors is updated for atoms
affected by the new bond. This in turn affects which neighbors are affected by the new bond. This in turn affects which neighbors are
considered for pairwise interactions, using the weighting rules set by considered for pair-wise interactions, using the weighting rules set by
the :doc:`special_bonds <special_bonds>` command. Consider a new bond the :doc:`special_bonds <special_bonds>` command. Consider a new bond
created between atoms I,J. If J has a bonded neighbor K, then K created between atoms :math:`i` and :math:`j`. If :math:`j` has a bonded
becomes a second neighbor of I. Even if the *atype* keyword is not used neighbor :math:`k`, then :math:`k` becomes a second neighbor of :math:`i`.
to create angle I-J-K, the pairwise interaction between I and K will Even if the *atype* keyword is not used to create angle :math:`\angle ijk`,
be potentially turned off or weighted by the 1-3 weighting specified the pair-wise interaction between :math:`i` and :math:`k` could potentially
be turned off or weighted by the 1--3 weighting specified
by the :doc:`special_bonds <special_bonds>` command. This is the case by the :doc:`special_bonds <special_bonds>` command. This is the case
even if the "angle yes" option was used with that command. The same even if the "angle yes" option was used with that command. The same
is true for third neighbors (1-4 interactions), the *dtype* keyword, and is true for third neighbors (1--4 interactions), the *dtype* keyword, and
the "dihedral yes" option used with the the "dihedral yes" option used with the
:doc:`special_bonds <special_bonds>` command. :doc:`special_bonds <special_bonds>` command.
@ -203,20 +205,20 @@ define a :doc:`bond_style <bond_style>` and use the
:doc:`bond_coeff <bond_coeff>` command to specify coefficients for the :doc:`bond_coeff <bond_coeff>` command to specify coefficients for the
*bondtype*\ . Similarly, if new atom types are specified by the *bondtype*\ . Similarly, if new atom types are specified by the
*iparam* or *jparam* keywords, they must be within the range of atom *iparam* or *jparam* keywords, they must be within the range of atom
types allowed by the simulation and pairwise coefficients must be types allowed by the simulation and pair-wise coefficients must be
specified for the new types. specified for the new types.
Computationally, each timestep this fix operates, it loops over Computationally, each time step this fix is invoked, it loops over
neighbor lists and computes distances between pairs of atoms in the neighbor lists and computes distances between pairs of atoms in the
list. It also communicates between neighboring processors to list. It also communicates between neighboring processors to
coordinate which bonds are created. Moreover, if any bonds are coordinate which bonds are created. Moreover, if any bonds are
created, neighbor lists must be immediately updated on the same created, neighbor lists must be immediately updated on the same
timestep. This is to insure that any pairwise interactions that time step. This is to ensure that any pair-wise interactions that
should be turned "off" due to a bond creation, because they are now should be turned "off" due to a bond creation, because they are now
excluded by the presence of the bond and the settings of the excluded by the presence of the bond and the settings of the
:doc:`special_bonds <special_bonds>` command, will be immediately :doc:`special_bonds <special_bonds>` command, will be immediately
recognized. All of these operations increase the cost of a timestep. recognized. All of these operations increase the cost of a time step.
Thus you should be cautious about invoking this fix too frequently. Thus, you should be cautious about invoking this fix too frequently.
You can dump out snapshots of the current bond topology via the :doc:`dump local <dump>` command. You can dump out snapshots of the current bond topology via the :doc:`dump local <dump>` command.
@ -225,8 +227,8 @@ You can dump out snapshots of the current bond topology via the :doc:`dump local
Creating a bond typically alters the energy of a system. You Creating a bond typically alters the energy of a system. You
should be careful not to choose bond creation criteria that induce a should be careful not to choose bond creation criteria that induce a
dramatic change in energy. For example, if you define a very stiff dramatic change in energy. For example, if you define a very stiff
harmonic bond and create it when 2 atoms are separated by a distance harmonic bond and create it when two atoms are separated by a distance
far from the equilibrium bond length, then the 2 atoms will oscillate far from the equilibrium bond length, then the two atoms will oscillate
dramatically when the bond is formed. More generally, you may need to dramatically when the bond is formed. More generally, you may need to
thermostat your system to compensate for energy changes resulting from thermostat your system to compensate for energy changes resulting from
created bonds (and angles, dihedrals, impropers). created bonds (and angles, dihedrals, impropers).
@ -245,10 +247,10 @@ length 2, which can be accessed by various :doc:`output commands
<Howto_output>`. The vector values calculated by this fix are <Howto_output>`. The vector values calculated by this fix are
"intensive". "intensive".
These are the 2 quantities: The two quantities in the global vector are
* (1) # of bonds created on the most recent creation timestep (1) number of bonds created on the most recent creation time step
* (2) cumulative # of bonds created (2) cumulative number of bonds created
No parameter of this fix can be used with the *start/stop* keywords of No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`. the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.

View File

@ -6,12 +6,12 @@ fix bond/react command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
fix ID group-ID bond/react common_keyword values ... fix ID group-ID bond/react common_keyword values &
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values &
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values &
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values &
... ...
* ID, group-ID are documented in :doc:`fix <fix>` command. * ID, group-ID are documented in :doc:`fix <fix>` command.
@ -22,11 +22,12 @@ Syntax
.. parsed-literal:: .. parsed-literal::
*stabilization* values = *no* or *yes* *group-ID* *xmax* *stabilization* values = stabilize group_prefix xmax
*no* = no reaction site stabilization (default) stabilize = *yes* or *no*
*yes* = perform reaction site stabilization *yes* = perform reaction site stabilization
*group-ID* = user-assigned prefix for the dynamic group of atoms not currently involved in a reaction *no* = no reaction site stabilization (default)
*xmax* = xmax value that is used by an internally-created :doc:`nve/limit <fix_nve_limit>` integrator group_prefix = user-assigned prefix for the dynamic group of atoms not currently involved in a reaction
xmax = value that is used by an internally-created :doc:`nve/limit <fix_nve_limit>` integrator
*reset_mol_ids* values = *yes* or *no* *reset_mol_ids* values = *yes* or *no*
*yes* = update molecule IDs based on new global topology (default) *yes* = update molecule IDs based on new global topology (default)
*no* = do not update molecule IDs *no* = do not update molecule IDs
@ -51,18 +52,18 @@ Syntax
*max_rxn* value = N *max_rxn* value = N
N = maximum number of reactions allowed to occur N = maximum number of reactions allowed to occur
*stabilize_steps* value = timesteps *stabilize_steps* value = timesteps
timesteps = number of timesteps to apply the internally-created :doc:`nve/limit <fix_nve_limit>` fix to reacting atoms timesteps = number of time steps to apply the internally-created :doc:`nve/limit <fix_nve_limit>` fix to reacting atoms
*custom_charges* value = *no* or *fragmentID* *custom_charges* value = *no* or fragment-ID
no = update all atomic charges (default) *no* = update all atomic charges (default)
fragmentID = ID of molecule fragment whose charges are updated fragment-ID = ID of molecule fragment whose charges are updated
*molecule* value = *off* or *inter* or *intra* *molecule* value = *off* or *inter* or *intra*
off = allow both inter- and intramolecular reactions (default) *off* = allow both inter- and intramolecular reactions (default)
inter = search for reactions between molecules with different IDs *inter* = search for reactions between molecules with different IDs
intra = search for reactions within the same molecule *intra* = search for reactions within the same molecule
*modify_create* keyword values *modify_create* values = keyword arg
*fit* value = *all* or *fragmentID* *fit* arg = *all* or fragment-ID
all = use all eligible atoms for create-atoms fit (default) *all* = use all eligible atoms for create-atoms fit (default)
fragmentID = ID of molecule fragment used for create-atoms fit fragment-ID = ID of molecule fragment used for create-atoms fit
*overlap* value = R *overlap* value = R
R = only insert atom/molecule if further than R from existing particles (distance units) R = only insert atom/molecule if further than R from existing particles (distance units)
@ -99,31 +100,32 @@ other molecules can be identified and deleted. Finally, atoms can be
created and inserted at specific positions relative to the reaction created and inserted at specific positions relative to the reaction
site. site.
Fix bond/react does not use quantum mechanical (eg. fix qmmm) or Fix bond/react does not use quantum mechanical (e.g., :doc:`fix qmmm <fix_qmmm>`) or
pairwise bond-order potential (eg. Tersoff or AIREBO) methods to pairwise bond-order potential (e.g., :doc:`Tersoff <pair_tersoff>` or
:doc:`AIREBO <pair_airebo>`) methods to
determine bonding changes a priori. Rather, it uses a distance-based determine bonding changes a priori. Rather, it uses a distance-based
probabilistic criteria to effect predetermined topology changes in probabilistic criteria to effect predetermined topology changes in
simulations using standard force fields. simulations using standard force fields.
This fix was created to facilitate the dynamic creation of polymeric, This fix was created to facilitate the dynamic creation of polymeric,
amorphous or highly cross-linked systems. A suggested workflow for amorphous or highly cross-linked systems. A suggested workflow for
using this fix is: 1) identify a reaction to be simulated 2) build a using this fix is
molecule template of the reaction site before the reaction has
occurred 3) build a molecule template of the reaction site after the (1) identify a reaction to be simulated
reaction has occurred 4) create a map that relates the (2) build a molecule template of the reaction site before the reaction has occurred
template-atom-IDs of each atom between pre- and post-reaction molecule (3) build a molecule template of the reaction site after the reaction has occurred
templates 5) fill a simulation box with molecules and run a simulation (4) create a map that relates the template-atom-IDs of each atom between pre- and post-reaction molecule templates
with fix bond/react. (5) fill a simulation box with molecules and run a simulation with fix bond/react.
Only one 'fix bond/react' command can be used at a time. Multiple Only one 'fix bond/react' command can be used at a time. Multiple
reactions can be simultaneously applied by specifying multiple *react* reactions can be simultaneously applied by specifying multiple *react*
arguments to a single 'fix bond/react' command. This syntax is arguments to a single 'fix bond/react' command. This syntax is
necessary because the 'common keywords' are applied to all reactions. necessary because the "common" keywords are applied to all reactions.
The *stabilization* keyword enables reaction site stabilization. The *stabilization* keyword enables reaction site stabilization.
Reaction site stabilization is performed by including reacting atoms Reaction site stabilization is performed by including reacting atoms
in an internally-created fix :doc:`nve/limit <fix_nve_limit>` time in an internally-created fix :doc:`nve/limit <fix_nve_limit>` time
integrator for a set number of timesteps given by the integrator for a set number of time steps given by the
*stabilize_steps* keyword. While reacting atoms are being time *stabilize_steps* keyword. While reacting atoms are being time
integrated by the internal nve/limit, they are prevented from being integrated by the internal nve/limit, they are prevented from being
involved in any new reactions. The *xmax* value keyword should involved in any new reactions. The *xmax* value keyword should
@ -133,53 +135,54 @@ during the simulation.
Fix bond/react creates and maintains two important dynamic groups of Fix bond/react creates and maintains two important dynamic groups of
atoms when using the *stabilization* keyword. The first group contains atoms when using the *stabilization* keyword. The first group contains
all atoms currently involved in a reaction; this group is all atoms currently involved in a reaction; this group is
automatically thermostatted by an internally-created automatically time-integrated by an internally-created
:doc:`nve/limit <fix_nve_limit>` integrator. The second group contains :doc:`nve/limit <fix_nve_limit>` integrator. The second group contains
all atoms currently not involved in a reaction. This group should be all atoms currently not involved in a reaction. This group should be
used by a thermostat in order to time integrate the system. The name controlled by a thermostat in order to time integrate the system. The name
of this group of non-reacting atoms is created by appending '_REACT' of this group of non-reacting atoms is created by appending '_REACT'
to the group-ID argument of the *stabilization* keyword, as shown in to the group-ID argument of the *stabilization* keyword, as shown in
the second example above. the second example above.
.. note:: .. note::
When using reaction stabilization, you should generally not have When using reaction stabilization, you should generally **not** have
a separate thermostat which acts on the 'all' group. a separate thermostat that acts on the "all" group.
The group-ID set using the *stabilization* keyword can be an existing The group-ID set using the *stabilization* keyword can be an existing
static group or a previously-unused group-ID. It cannot be specified static group or a previously-unused group-ID. It cannot be specified
as 'all'. If the group-ID is previously unused, the fix bond/react as "all". If the group-ID is previously unused, the fix bond/react
command creates a :doc:`dynamic group <group>` that is initialized to command creates a :doc:`dynamic group <group>` that is initialized to
include all atoms. If the group-ID is that of an existing static include all atoms. If the group-ID is that of an existing static
group, the group is used as the parent group of new, group, the group is used as the parent group of new,
internally-created dynamic group. In both cases, this new dynamic internally-created dynamic group. In both cases, this new dynamic
group is named by appending '_REACT' to the group-ID, e.g. group is named by appending '_REACT' to the group-ID (e.g.,
nvt_grp_REACT. By specifying an existing group, you may thermostat nvt_grp_REACT). By specifying an existing group, you may thermostat
constant-topology parts of your system separately. The dynamic group constant-topology parts of your system separately. The dynamic group
contains only atoms not involved in a reaction at a given timestep, contains only atoms not involved in a reaction at a given time step,
and therefore should be used by a subsequent system-wide time and therefore should be used by a subsequent system-wide time
integrator such as nvt, npt, or nve, as shown in the second example integrator such as :doc:`fix nvt <fix_nh>`, :doc:`fix npt <fix_nh>`, or
above (full examples can be found at examples/PACKAGES/reaction). The time :doc:`fix nve <fix_nve>`, as shown in the second example
above (full examples can be found in examples/PACKAGES/reaction). The time
integration command should be placed after the fix bond/react command integration command should be placed after the fix bond/react command
due to the internal dynamic grouping performed by fix bond/react. due to the internal dynamic grouping performed by fix bond/react.
.. note:: .. note::
If the group-ID is an existing static group, react-group-IDs If the group-ID is an existing static group, react-group-IDs
should also be specified as this static group, or a subset. should also be specified as this static group or a subset.
The *reset_mol_ids* keyword invokes the :doc:`reset_mol_ids <reset_mol_ids>` The *reset_mol_ids* keyword invokes the :doc:`reset_mol_ids <reset_mol_ids>`
command after a reaction occurs, to ensure that molecule IDs are command after a reaction occurs, to ensure that molecule IDs are
consistent with the new bond topology. The group-ID used for consistent with the new bond topology. The group-ID used for
:doc:`reset_mol_ids <reset_mol_ids>` is the group-ID for this fix. :doc:`reset_mol_ids <reset_mol_ids>` is the group-ID for this fix.
Resetting molecule IDs is necessarily a global operation, and so can Resetting molecule IDs is necessarily a global operation, so it can
be slow for very large systems. be slow for very large systems.
The following comments pertain to each *react* argument (in other The following comments pertain to each *react* argument (in other
words, can be customized for each reaction, or reaction step): words, they can be customized for each reaction, or reaction step):
A check for possible new reaction sites is performed every *Nevery* A check for possible new reaction sites is performed every *Nevery*
timesteps. *Nevery* can be specified with an equal-style time steps. *Nevery* can be specified with an equal-style
:doc:`variable <variable>`, whose value is rounded up to the nearest :doc:`variable <variable>`, whose value is rounded up to the nearest
integer. integer.
@ -194,11 +197,11 @@ reaction site is eligible to be modified to match the post-reaction
template. template.
An initiator atom pair will be identified if several conditions are An initiator atom pair will be identified if several conditions are
met. First, a pair of atoms I,J within the specified react-group-ID of met. First, a pair of atoms :math:`i` and :math:`j` within the specified
type itype and jtype must be separated by a distance between *Rmin* react-group-ID of type *itype* and *jtype* must be separated by a distance
and *Rmax*\ . *Rmin* and *Rmax* can be specified with equal-style between *Rmin* and *Rmax*\ . *Rmin* and *Rmax* can be specified with
:doc:`variables <variable>`. For example, these reaction cutoffs can equal-style :doc:`variables <variable>`. For example, these reaction cutoffs
be a function of the reaction conversion using the following commands: can be functions of the reaction conversion using the following commands:
.. code-block:: LAMMPS .. code-block:: LAMMPS
@ -207,23 +210,28 @@ be a function of the reaction conversion using the following commands:
variable rmax equal 3+f_myrxn[1]/100 # arbitrary function of reaction count variable rmax equal 3+f_myrxn[1]/100 # arbitrary function of reaction count
The following criteria are used if multiple candidate initiator atom The following criteria are used if multiple candidate initiator atom
pairs are identified within the cutoff distance: 1) If the initiator pairs are identified within the cutoff distance:
atoms in the pre-reaction template are not 1-2 neighbors (i.e. not
directly bonded) the closest potential partner is chosen. 2) (1) If the initiator atoms in the pre-reaction template are not 1--2
Otherwise, if the initiator atoms in the pre-reaction template are 1-2 neighbors (i.e., not directly bonded) the closest potential partner is
neighbors (i.e. directly bonded) the farthest potential partner is chosen.
chosen. 3) Then, if both an atom I and atom J have each other as their (2) Otherwise, if the initiator atoms in the pre-reaction template are 1--2
initiator partners, these two atoms are identified as the initiator neighbors (i.e. directly bonded) the farthest potential partner is
atom pair of the reaction site. Note that it can be helpful to select chosen.
(3) Then, if both an atom :math:`i` and atom :math:`j` have each other as
initiator partners, these two atoms are identified as the initiator atom
pair of the reaction site.
Note that it can be helpful to select
unique atom types for the initiator atoms: if an initiator atom pair unique atom types for the initiator atoms: if an initiator atom pair
is identified, as described in the previous steps, but does not is identified, as described in the previous steps, but it does not
correspond to the same pair specified in the pre-reaction template, an correspond to the same pair specified in the pre-reaction template, an
otherwise eligible reaction could be prevented from occurring. Once otherwise eligible reaction could be prevented from occurring. Once
this unique initiator atom pair is identified for each reaction, there this unique initiator atom pair is identified for each reaction, there
could be two or more reactions that involve the same atom on the same could be two or more reactions that involve the same atom on the same
timestep. If this is the case, only one such reaction is permitted to time step. If this is the case, only one such reaction is permitted to
occur. This reaction is chosen randomly from all potential reactions occur. This reaction is chosen randomly from all potential reactions
involving the overlapping atom. This capability allows e.g. for involving the overlapping atom. This capability allows, for example,
different reaction pathways to proceed from identical reaction sites different reaction pathways to proceed from identical reaction sites
with user-specified probabilities. with user-specified probabilities.
@ -247,19 +255,19 @@ pre-reaction template atoms should be linked to an initiator atom, via
at least one path that does not involve edge atoms. When the at least one path that does not involve edge atoms. When the
pre-reaction template contains edge atoms, not all atoms, bonds, pre-reaction template contains edge atoms, not all atoms, bonds,
charges, etc. specified in the reaction templates will be updated. charges, etc. specified in the reaction templates will be updated.
Specifically, topology that involves only atoms that are 'too near' to Specifically, topology that involves only atoms that are "too near" to
template edges will not be updated. The definition of 'too near the template edges will not be updated. The definition of "too near the
edge' depends on which interactions are defined in the simulation. If edge" depends on which interactions are defined in the simulation. If
the simulation has defined dihedrals, atoms within two bonds of edge the simulation has defined dihedrals, atoms within two bonds of edge
atoms are considered 'too near the edge.' If the simulation defines atoms are considered "too near the edge." If the simulation defines
angles, but not dihedrals, atoms within one bond of edge atoms are angles, but not dihedrals, atoms within one bond of edge atoms are
considered 'too near the edge.' If just bonds are defined, only edge considered "too near the edge." If just bonds are defined, only edge
atoms are considered 'too near the edge.' atoms are considered "too near the edge."
.. note:: .. note::
Small molecules, i.e. ones that have all their atoms contained Small molecules (i.e., ones that have all their atoms contained
within the reaction templates, never have edge atoms. within the reaction templates) never have edge atoms.
Note that some care must be taken when a building a molecule template Note that some care must be taken when a building a molecule template
for a given simulation. All atom types in the pre-reacted template for a given simulation. All atom types in the pre-reacted template
@ -282,7 +290,7 @@ provided on the :doc:`molecule <molecule>` command page.
.. note:: .. note::
When a reaction occurs, it is possible that the resulting When a reaction occurs, it is possible that the resulting
topology/atom (e.g. special bonds, dihedrals, etc.) exceeds that of topology/atom (e.g., special bonds, dihedrals) exceeds that of
the existing system and reaction templates. As when inserting the existing system and reaction templates. As when inserting
molecules, enough space for this increased topology/atom must be molecules, enough space for this increased topology/atom must be
reserved by using the relevant "extra" keywords to the reserved by using the relevant "extra" keywords to the
@ -292,14 +300,14 @@ 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 A map file has a header and a body. The header of map file the
contains one mandatory keyword and five optional keywords. The contains one mandatory keyword and five optional keywords. The
mandatory keyword is 'equivalences': mandatory keyword is *equivalences*\ :
.. parsed-literal:: .. parsed-literal::
N *equivalences* = # of atoms N in the reaction molecule templates N *equivalences* = # of atoms N in the reaction molecule templates
The optional keywords are 'edgeIDs', 'deleteIDs', 'chiralIDs' and The optional keywords are *edgeIDs*\ , *deleteIDs*\ , *chiralIDs*\ , and
'constraints': *constraints*\ :
.. parsed-literal:: .. parsed-literal::
@ -311,25 +319,25 @@ The optional keywords are 'edgeIDs', 'deleteIDs', 'chiralIDs' and
The body of the map file contains two mandatory sections and five The body of the map file contains two mandatory sections and five
optional sections. The first mandatory section begins with the keyword optional sections. The first mandatory section begins with the keyword
'InitiatorIDs' and lists the two atom IDs of the initiator atom pair "InitiatorIDs" and lists the two atom IDs of the initiator atom pair
in the pre-reacted molecule template. The second mandatory section in the pre-reacted molecule template. The second mandatory section
begins with the keyword 'Equivalences' and lists a one-to-one begins with the keyword "Equivalences" and lists a one-to-one
correspondence between atom IDs of the pre- and post-reacted correspondence between atom IDs of the pre- and post-reacted
templates. The first column is an atom ID of the pre-reacted molecule templates. The first column is an atom ID of the pre-reacted molecule
template, and the second column is the corresponding atom ID of the template, and the second column is the corresponding atom ID of the
post-reacted molecule template. The first optional section begins with post-reacted molecule template. The first optional section begins with
the keyword 'EdgeIDs' and lists the atom IDs of edge atoms in the the keyword "EdgeIDs" and lists the atom IDs of edge atoms in the
pre-reacted molecule template. The second optional section begins with pre-reacted molecule template. The second optional section begins with
the keyword 'DeleteIDs' and lists the atom IDs of pre-reaction the keyword "DeleteIDs" and lists the atom IDs of pre-reaction
template atoms to delete. The third optional section begins with the template atoms to delete. The third optional section begins with the
keyword 'CreateIDs' and lists the atom IDs of the post-reaction keyword "CreateIDs" and lists the atom IDs of the post-reaction
template atoms to create. The fourth optional section begins with the template atoms to create. The fourth optional section begins with the
keyword 'ChiralIDs' lists the atom IDs of chiral atoms whose keyword "ChiralIDs" lists the atom IDs of chiral atoms whose
handedness should be enforced. The fifth optional section begins with handedness should be enforced. The fifth optional section begins with
the keyword 'Constraints' and lists additional criteria that must be the keyword "Constraints" and lists additional criteria that must be
satisfied in order for the reaction to occur. Currently, there are satisfied in order for the reaction to occur. Currently, there are
six types of constraints available, as discussed below: 'distance', six types of constraints available, as discussed below: "distance",
'angle', 'dihedral', 'arrhenius', 'rmsd', and 'custom'. "angle", "dihedral", "arrhenius", "rmsd", and "custom".
A sample map file is given below: A sample map file is given below:
@ -384,18 +392,24 @@ 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 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 can be used to specify which post-reaction atoms are used for the
optimal translation and rotation of the post-reaction template. The optimal translation and rotation of the post-reaction template. The
*fragmentID* value of the *fit* sub-keyword must be the name of a fragment-ID value of the *fit* sub-keyword must be the name of a
molecule fragment defined in the post-reaction :doc:`molecule molecule fragment defined in the post-reaction :doc:`molecule
<molecule>` template, and only atoms in this fragment are used for the <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 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 within a distance :math:`R` of any created atom, including the effect of
periodic boundary conditions if applicable. R is defined by the periodic boundary conditions if applicable. :math:`R` is defined by the
*overlap* sub-keyword. Note that the default value for R is 0.0, which *overlap* sub-keyword. Note that the default value for :math:`R` is 0.0, which
will allow atoms to strongly overlap if you are inserting where other will allow atoms to strongly overlap if you are inserting where other
atoms are present. The velocity of each created atom is initialized in atoms are present. The velocity of each created atom is initialized in
a random direction with a magnitude calculated from the instantaneous a random direction with a magnitude calculated from the instantaneous
temperature of the reaction site. temperature of the reaction site.
.. note::
The 'Coords' section must be included in the post-reaction template
when creating atoms because these coordinates are used to determine
where new atoms are inserted.
The handedness of atoms that are chiral centers can be enforced by The handedness of atoms that are chiral centers can be enforced by
listing their IDs in the ChiralIDs section. A chiral atom must be listing their IDs in the ChiralIDs section. A chiral atom must be
bonded to four atoms with mutually different atom types. This feature bonded to four atoms with mutually different atom types. This feature
@ -406,40 +420,40 @@ and the relative position of the fourth bonded atom determines the
chiral center's handedness. chiral center's handedness.
Any number of additional constraints may be specified in the Any number of additional constraints may be specified in the
Constraints section of the map file. The constraint of type 'distance' Constraints section of the map file. The constraint of type "distance"
has syntax as follows: has syntax as follows:
.. parsed-literal:: .. parsed-literal::
distance *ID1* *ID2* *rmin* *rmax* distance *ID1* *ID2* *rmin* *rmax*
where 'distance' is the required keyword, *ID1* and *ID2* are where "distance" is the required keyword, *ID1* and *ID2* are
pre-reaction atom IDs (or molecule-fragment IDs, see below), and these pre-reaction atom IDs (or molecule-fragment IDs, see below), and these
two atoms must be separated by a distance between *rmin* and *rmax* two atoms must be separated by a distance between *rmin* and *rmax*
for the reaction to occur. for the reaction to occur.
The constraint of type 'angle' has the following syntax: The constraint of type "angle" has the following syntax:
.. parsed-literal:: .. parsed-literal::
angle *ID1* *ID2* *ID3* *amin* *amax* angle *ID1* *ID2* *ID3* *amin* *amax*
where 'angle' is the required keyword, *ID1*, *ID2* and *ID3* are where "angle" is the required keyword, *ID1*, *ID2* and *ID3* are
pre-reaction atom IDs (or molecule-fragment IDs, see below), and these pre-reaction atom IDs (or molecule-fragment IDs, see below), and these
three atoms must form an angle between *amin* and *amax* for the three atoms must form an angle between *amin* and *amax* for the
reaction to occur (where *ID2* is the central atom). Angles must be reaction to occur (where *ID2* is the central atom). Angles must be
specified in degrees. This constraint can be used to enforce a certain specified in degrees. This constraint can be used to enforce a certain
orientation between reacting molecules. orientation between reacting molecules.
The constraint of type 'dihedral' has the following syntax: The constraint of type "dihedral" has the following syntax:
.. parsed-literal:: .. parsed-literal::
dihedral *ID1* *ID2* *ID3* *ID4* *amin* *amax* *amin2* *amax2* dihedral *ID1* *ID2* *ID3* *ID4* *amin* *amax* *amin2* *amax2*
where 'dihedral' is the required keyword, and *ID1*, *ID2*, *ID3* where "dihedral" is the required keyword, and *ID1*, *ID2*, *ID3*
and *ID4* are pre-reaction atom IDs (or molecule-fragment IDs, see and *ID4* are pre-reaction atom IDs (or molecule-fragment IDs, see
below). Dihedral angles are calculated in the interval (-180,180]. below). Dihedral angles are calculated in the interval :math:`(-180^\circ,180^\circ]`.
Refer to the :doc:`dihedral style <dihedral_style>` documentation for Refer to the :doc:`dihedral style <dihedral_style>` documentation for
further details on convention. If *amin* is less than *amax*, these further details on convention. If *amin* is less than *amax*, these
four atoms must form a dihedral angle greater than *amin* **and** less four atoms must form a dihedral angle greater than *amin* **and** less
@ -447,7 +461,7 @@ than *amax* for the reaction to occur. If *amin* is greater than
*amax*, these four atoms must form a dihedral angle greater than *amax*, these four atoms must form a dihedral angle greater than
*amin* **or** less than *amax* for the reaction to occur. Angles must *amin* **or** less than *amax* for the reaction to occur. Angles must
be specified in degrees. Optionally, a second range of permissible be specified in degrees. Optionally, a second range of permissible
angles *amin2*-*amax2* can be specified. angles *amin2* to *amax2* can be specified.
For the 'distance', 'angle', and 'dihedral' constraints (explained For the 'distance', 'angle', and 'dihedral' constraints (explained
above), atom IDs can be replaced by pre-reaction molecule-fragment above), atom IDs can be replaced by pre-reaction molecule-fragment
@ -457,11 +471,11 @@ fragment. The molecule fragment must have been defined in the
:doc:`molecule <molecule>` command for the pre-reaction template. :doc:`molecule <molecule>` command for the pre-reaction template.
The constraint of type 'arrhenius' imposes an additional reaction The constraint of type 'arrhenius' imposes an additional reaction
probability according to the temperature-dependent Arrhenius equation: probability according to the modified Arrhenius equation,
.. math:: .. math::
k = AT^{n}e^{\frac{-E_{a}}{k_{B}T}} k = AT^{n}e^{-E_{a}/k_{B}T}.
The Arrhenius constraint has the following syntax: The Arrhenius constraint has the following syntax:
@ -469,11 +483,11 @@ The Arrhenius constraint has the following syntax:
arrhenius *A* *n* *E_a* *seed* arrhenius *A* *n* *E_a* *seed*
where 'arrhenius' is the required keyword, *A* is the pre-exponential where "arrhenius" is the required keyword, *A* is the pre-exponential
factor, *n* is the exponent of the temperature dependence, :math:`E_a` factor, *n* is the exponent of the temperature dependence, :math:`E_a`
is the activation energy (:doc:`units <units>` of energy), and *seed* is a is the activation energy (:doc:`units <units>` of energy), and *seed* is a
random number seed. The temperature is defined as the instantaneous random number seed. The temperature is defined as the instantaneous
temperature averaged over all atoms in the reaction site, and is temperature averaged over all atoms in the reaction site and is
calculated in the same manner as for example calculated in the same manner as for example
:doc:`compute temp/chunk <compute_temp_chunk>`. Currently, there are no :doc:`compute temp/chunk <compute_temp_chunk>`. Currently, there are no
options for additional temperature averaging or velocity-biased options for additional temperature averaging or velocity-biased
@ -487,7 +501,7 @@ The constraint of type 'rmsd' has the following syntax:
rmsd *RMSDmax* *molfragment* rmsd *RMSDmax* *molfragment*
where 'rmsd' is the required keyword, and *RMSDmax* is the maximum where "rmsd" is the required keyword, and *RMSDmax* is the maximum
root-mean-square deviation between atom positions of the pre-reaction root-mean-square deviation between atom positions of the pre-reaction
template and the local reaction site (distance units), after optimal template and the local reaction site (distance units), after optimal
translation and rotation of the pre-reaction template. Optionally, the translation and rotation of the pre-reaction template. Optionally, the
@ -500,26 +514,26 @@ example, the molecule fragment could consist of only the backbone
atoms of a polymer chain. This constraint can be used to enforce a atoms of a polymer chain. This constraint can be used to enforce a
specific relative position and orientation between reacting molecules. specific relative position and orientation between reacting molecules.
The constraint of type 'custom' has the following syntax: The constraint of type "custom" has the following syntax:
.. parsed-literal:: .. parsed-literal::
custom *varstring* custom *varstring*
where 'custom' is the required keyword, and *varstring* is a where "custom" is the required keyword, and *varstring* is a
variable expression. The expression must be a valid equal-style variable expression. The expression must be a valid equal-style
variable formula that can be read by the :doc:`variable <variable>` command, variable formula that can be read by the :doc:`variable <variable>` command,
after any special reaction functions are evaluated. If the resulting after any special reaction functions are evaluated. If the resulting
expression is zero, the reaction is prevented from occurring; expression is zero, the reaction is prevented from occurring;
otherwise, it is permitted to occur. There are two special reaction otherwise, it is permitted to occur. There are two special reaction
functions available, 'rxnsum' and 'rxnave'. These functions operate functions available, "rxnsum" and "rxnave". These functions operate
over the atoms in a given reaction site, and have one mandatory over the atoms in a given reaction site, and have one mandatory
argument and one optional argument. The mandatory argument is the argument and one optional argument. The mandatory argument is the
identifier for an atom-style variable. The second, optional argument identifier for an atom-style variable. The second, optional argument
is the name of a molecule fragment in the pre-reaction template, and is the name of a molecule fragment in the pre-reaction template, and
can be used to operate over a subset of atoms in the reaction site. can be used to operate over a subset of atoms in the reaction site.
The 'rxnsum' function sums the atom-style variable over the reaction The "rxnsum" function sums the atom-style variable over the reaction
site, while the 'rxnave' returns the average value. For example, a site, while the "rxnave" returns the average value. For example, a
constraint on the total potential energy of atoms involved in the constraint on the total potential energy of atoms involved in the
reaction can be imposed as follows: reaction can be imposed as follows:
@ -535,8 +549,8 @@ reaction can be imposed as follows:
The above example prevents the reaction from occurring unless the The above example prevents the reaction from occurring unless the
total potential energy of the reaction site is above 100. The variable total potential energy of the reaction site is above 100. The variable
expression can be interpreted as the probability of the reaction expression can be interpreted as the probability of the reaction
occurring by using an inequality and the 'random(x,y,z)' function occurring by using an inequality and the :doc:`random(x,y,z) <variable>`
available as an equal-style variable input, similar to the 'arrhenius' function available for equal-style variables, similar to the 'arrhenius'
constraint above. constraint above.
By default, all constraints must be satisfied for the reaction to By default, all constraints must be satisfied for the reaction to
@ -561,40 +575,42 @@ within LAMMPS that store bond topology are updated to reflect the
post-reacted molecule template. All force fields with fixed bonds, post-reacted molecule template. All force fields with fixed bonds,
angles, dihedrals or impropers are supported. angles, dihedrals or impropers are supported.
A few capabilities to note: 1) You may specify as many *react* A few capabilities to note:
arguments as desired. For example, you could break down a complicated
reaction mechanism into several reaction steps, each defined by its (1) You may specify as many *react* arguments as desired. For example, you
own *react* argument. 2) While typically a bond is formed or removed could break down a complicated reaction mechanism into several reaction
between the initiator atoms specified in the pre-reacted molecule steps, each defined by its own *react* argument.
template, this is not required. 3) By reversing the order of the pre- (2) While typically a bond is formed or removed between the initiator atoms
and post- reacted molecule templates in another *react* argument, you specified in the pre-reacted molecule template, this is not required.
can allow for the possibility of one or more reverse reactions. (3) By reversing the order of the pre- and post-reacted molecule templates in
another *react* argument, you can allow for the possibility of one or
more reverse reactions.
The optional keywords deal with the probability of a given reaction The optional keywords deal with the probability of a given reaction
occurring as well as the stable equilibration of each reaction site as occurring as well as the stable equilibration of each reaction site as
it occurs: it occurs.
The *prob* keyword can affect whether or not an eligible reaction The *prob* keyword can affect whether or not an eligible reaction
actually occurs. The fraction setting must be a value between 0.0 and actually occurs. The fraction setting must be a value between 0.0 and
1.0, and can be specified with an equal-style :doc:`variable <variable>`. 1.0, and can be specified with an equal-style :doc:`variable <variable>`.
A uniform random number between 0.0 and 1.0 is generated and the A uniform random number between 0.0 and 1.0 is generated and the
eligible reaction only occurs if the random number is less than the eligible reaction only occurs if the random number is less than the
fraction. Up to N reactions are permitted to occur, as optionally fraction. Up to :math:`N` reactions are permitted to occur, as optionally
specified by the *max_rxn* keyword. specified by the *max_rxn* keyword.
The *stabilize_steps* keyword allows for the specification of how many The *stabilize_steps* keyword allows for the specification of how many
timesteps a reaction site is stabilized before being returned to the time steps a reaction site is stabilized before being returned to the
overall system thermostat. In order to produce the most physical overall system thermostat. In order to produce the most physical
behavior, this 'reaction site equilibration time' should be tuned to behavior, this "reaction site equilibration time" should be tuned to
be as small as possible while retaining stability for a given system be as small as possible while retaining stability for a given system
or reaction step. After a limited number of case studies, this number or reaction step. After a limited number of case studies, this number
has been set to a default of 60 timesteps. Ideally, it should be has been set to a default of 60 time steps. Ideally, it should be
individually tuned for each fix reaction step. Note that in some individually tuned for each fix reaction step. Note that in some
situations, decreasing rather than increasing this parameter will situations, decreasing rather than increasing this parameter will
result in an increase in stability. result in an increase in stability.
The *custom_charges* keyword can be used to specify which atoms' The *custom_charges* keyword can be used to specify which atoms'
atomic charges are updated. When the value is set to 'no', all atomic atomic charges are updated. When the value is set to *no*\ , all atomic
charges are updated to those specified by the post-reaction template charges are updated to those specified by the post-reaction template
(default). Otherwise, the value should be the name of a molecule (default). Otherwise, the value should be the name of a molecule
fragment defined in the pre-reaction molecule template. In this case, fragment defined in the pre-reaction molecule template. In this case,
@ -602,10 +618,10 @@ only the atomic charges of atoms in the molecule fragment are updated.
The *molecule* keyword can be used to force the reaction to be The *molecule* keyword can be used to force the reaction to be
intermolecular, intramolecular or either. When the value is set to intermolecular, intramolecular or either. When the value is set to
'off', molecule IDs are not considered when searching for reactions *off*\ , molecule IDs are not considered when searching for reactions
(default). When the value is set to 'inter', the initiator atoms must (default). When the value is set to *inter*\ , the initiator atoms must
have different molecule IDs in order to be considered for the have different molecule IDs in order to be considered for the
reaction. When the value is set to 'intra', only initiator atoms with reaction. When the value is set to *intra*\ , only initiator atoms with
the same molecule ID are considered for the reaction. the same molecule ID are considered for the reaction.
A few other considerations: A few other considerations:
@ -627,15 +643,15 @@ all currently-reacting atoms:
This command must be added after the fix bond/react command, and This command must be added after the fix bond/react command, and
will apply to all reactions. will apply to all reactions.
Computationally, each timestep this fix operates, it loops over Computationally, each time step this fix is invoked, it loops over
neighbor lists (for bond-forming reactions) and computes distances neighbor lists (for bond-forming reactions) and computes distances
between pairs of atoms in the list. It also communicates between between pairs of atoms in the list. It also communicates between
neighboring processors to coordinate which bonds are created and/or neighboring processors to coordinate which bonds are created and/or
removed. All of these operations increase the cost of a timestep. Thus removed. All of these operations increase the cost of a time step. Thus,
you should be cautious about invoking this fix too frequently. you should be cautious about invoking this fix too frequently.
You can dump out snapshots of the current bond topology via the dump You can dump out snapshots of the current bond topology via the
local command. :doc:`dump local <dump>` command.
---------- ----------
@ -649,20 +665,20 @@ allow for smooth restarts. None of the :doc:`fix_modify <fix_modify>`
options are relevant to this fix. options are relevant to this fix.
This fix computes one statistic for each *react* argument that it This fix computes one statistic for each *react* argument that it
stores in a global vector, of length 'number of react arguments', that stores in a global vector, of length (number of react arguments), that
can be accessed by various :doc:`output commands <Howto_output>`. The can be accessed by various :doc:`output commands <Howto_output>`. The
vector values calculated by this fix are "intensive". vector values calculated by this fix are "intensive".
These is 1 quantity for each react argument: There is one quantity in the global vector for each *react* argument:
* (1) cumulative # of reactions occurred (1) cumulative number of reactions that occurred
No parameter of this fix can be used with the *start/stop* keywords 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>`. of the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
When fix bond/react is 'unfixed', all internally-created groups are When fix bond/react is ":doc:`unfixed <unfix>`", all internally-created
deleted. Therefore, fix bond/react can only be unfixed after unfixing groups are deleted. Therefore, fix bond/react can only be unfixed after
all other fixes that use any group created by fix bond/react. unfixing all other fixes that use any group created by fix bond/react.
Restrictions Restrictions
"""""""""""" """"""""""""
@ -683,7 +699,7 @@ Default
""""""" """""""
The option defaults are stabilization = no, prob = 1.0, stabilize_steps = 60, The option defaults are stabilization = no, prob = 1.0, stabilize_steps = 60,
reset_mol_ids = yes, custom_charges = no, molecule = off, modify_create = no reset_mol_ids = yes, custom_charges = no, molecule = off, modify_create = *fit all*
---------- ----------

View File

@ -14,7 +14,7 @@ fix brownian/asphere command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
fix ID group-ID style_name temp seed keyword args fix ID group-ID style_name temp seed keyword args
@ -27,23 +27,23 @@ Syntax
.. parsed-literal:: .. parsed-literal::
*rng* value = *uniform* or *gaussian* or *none* *rng* value = *uniform* or *gaussian* or *none*
*uniform* = use uniform random number generator *uniform* = use uniform random number generator
*gaussian* = use gaussian random number generator *gaussian* = use gaussian random number generator
*none* = turn off noise *none* = turn off noise
*dipole* value = *mux* and *muy* and *muz* for *brownian/asphere* *dipole* value = *mux* and *muy* and *muz* for *brownian/asphere*
*mux*, *muy*, and *muz* = update orientation of dipole having direction (*mux*,*muy*,*muz*) in body frame of rigid body *mux*, *muy*, and *muz* = update orientation of dipole having direction (*mux*,*muy*,*muz*) in body frame of rigid body
*gamma_r_eigen* values = *gr1* and *gr2* and *gr3* for *brownian/asphere* *gamma_r_eigen* values = *gr1* and *gr2* and *gr3* for *brownian/asphere*
*gr1*, *gr2*, and *gr3* = diagonal entries of body frame rotational friction tensor *gr1*, *gr2*, and *gr3* = diagonal entries of body frame rotational friction tensor
*gamma_r* values = *gr* for *brownian/sphere* *gamma_r* values = *gr* for *brownian/sphere*
*gr* = magnitude of the (isotropic) rotational friction tensor *gr* = magnitude of the (isotropic) rotational friction tensor
*gamma_t_eigen* values = *gt1* and *gt2* and *gt3* for *brownian/asphere* *gamma_t_eigen* values = *gt1* and *gt2* and *gt3* for *brownian/asphere*
*gt1*, *gt2*, and *gt3* = diagonal entries of body frame translational friction tensor *gt1*, *gt2*, and *gt3* = diagonal entries of body frame translational friction tensor
*gamma_t* values = *gt* for *brownian* and *brownian/sphere* *gamma_t* values = *gt* for *brownian* and *brownian/sphere*
*gt* = magnitude of the (isotropic) translational friction tensor *gt* = magnitude of the (isotropic) translational friction tensor
*rotation_temp* values = *T* for *brownian/sphere* and *brownian/asphere* *rotation_temp* values = *T* for *brownian/sphere* and *brownian/asphere*
*T* = rotation temperature, which can be different then *temp* when out of equilibrium *T* = rotation temperature, which can be different then *temp* when out of equilibrium
*planar_rotation* values = None (constrains rotational diffusion to be in xy plane if in 3D) *planar_rotation* values = none (constrains rotational diffusion to be in xy plane if in 3D)
Examples Examples
"""""""" """"""""
@ -71,9 +71,10 @@ positions is
.. math:: .. math::
d\mathbf{r} = \mathbf{\gamma}_t^{-1}\mathbf{F}dt+\sqrt{2k_BT}\mathbf{\gamma}_t^{-1/2}d\mathbf{W}_t, d\mathbf{r} = \boldsymbol{\gamma}_t^{-1}\mathbf{F}dt
+ \sqrt{2k_B T}\boldsymbol{\gamma}_t^{-1/2}d\mathbf{W}_t,
in the lab-frame (i.e. :math:`\mathbf{\gamma}_t` is not diagonal, but in the lab-frame (i.e., :math:`\boldsymbol{\gamma}_t` is not diagonal, but
only depends on orientation and so the noise is still additive). only depends on orientation and so the noise is still additive).
The rotational motion for the spherical and ellipsoidal particles is not The rotational motion for the spherical and ellipsoidal particles is not
@ -92,15 +93,15 @@ updated. This style therefore requires the hybrid atom style
.. math:: .. math::
\mathbf{\mu}(t+dt) = \frac{\mathbf{\mu}(t) + \mathbf{\omega} \times \mathbf{\mu}dt \boldsymbol{\mu}(t+dt) = \frac{\boldsymbol{\mu}(t) + \boldsymbol{\omega} \times \boldsymbol{\mu}dt
}{|\mathbf{\mu}(t) + \mathbf{\omega} \times \mathbf{\mu}|} }{|\boldsymbol{\mu}(t) + \boldsymbol{\omega} \times \boldsymbol{\mu}|}
which correctly reproduces a Boltzmann distribution of orientations and which correctly reproduces a Boltzmann distribution of orientations and
rotational diffusion moments (see :ref:`(Ilie) <Ilie1>`) when rotational diffusion moments (see :ref:`(Ilie) <Ilie1>`) when
.. math:: .. math::
\mathbf{\omega} = \frac{\mathbf{T}}{\gamma_r} + \sqrt{\frac{2 k_B T_{rot}}{\gamma_r}\frac{d\mathbf{W}}{dt}}, \boldsymbol{\omega} = \frac{\mathbf{T}}{\gamma_r} + \sqrt{\frac{2 k_B T_{rot}}{\gamma_r}\frac{d\mathbf{W}}{dt}},
with :math:`d\mathbf{W}` being a random number with zero mean and variance :math:`dt` with :math:`d\mathbf{W}` being a random number with zero mean and variance :math:`dt`
and :math:`T_{rot}` is *rotation_temp*. and :math:`T_{rot}` is *rotation_temp*.
@ -114,19 +115,20 @@ the quaternion
.. math:: .. math::
\mathbf{q}(t+dt) = \frac{\mathbf{q}(t) + d\mathbf{q}}{|\mathbf{q}(t) + d\mathbf{q}|} \mathbf{q}(t+dt) = \frac{\mathbf{q}(t) + d\mathbf{q}}{\lVert\mathbf{q}(t) + d\mathbf{q}\rVert}
which correctly reproduces a Boltzmann distribution of orientations and rotational which correctly reproduces a Boltzmann distribution of orientations and rotational
diffusion moments (see :ref:`(Ilie) <Ilie1>`) when the quaternion step given by diffusion moments [see :ref:`(Ilie) <Ilie1>`] when the quaternion step is given by
.. math:: .. math::
d\mathbf{q} = \mathbf{\Psi}\mathbf{\omega}dt d\mathbf{q} = \boldsymbol{\Psi}\boldsymbol{\omega}dt
where :math:`\mathbf{Psi}` has rows :math:`(-q_1,-q_2,-q_3)`, :math:`(q_0,-q_3,q_2)`, where :math:`\boldsymbol{\Psi}` has rows :math:`(-q_1,-q_2,-q_3)`,
:math:`(q_3,q_0,-q_1)`, and :math:`(-q_2,q_1,q_0)`. :math:`\mathbf{\omega}` is :math:`(q_0,-q_3,q_2)`, :math:`(q_3,q_0,-q_1)`, and :math:`(-q_2,q_1,q_0)`.
evaluated in the body frame of reference where the friction tensor is diagonal. :math:`\boldsymbol{\omega}` is evaluated in the body frame of reference where the
See :ref:`(Delong) <Delong1>` for more details of a similar algorithm. friction tensor is diagonal. See :ref:`(Delong) <Delong1>` for more details of
a similar algorithm.
--------- ---------
@ -136,11 +138,11 @@ See :ref:`(Delong) <Delong1>` for more details of a similar algorithm.
This integrator does not by default assume a relationship between the This integrator does not by default assume a relationship between the
rotational and translational friction tensors, though such a rotational and translational friction tensors, though such a
relationship should exist in the case of no-slip boundary conditions relationship should exist in the case of no-slip boundary conditions
between the particles and the surrounding (implicit) solvent. E.g. in between the particles and the surrounding (implicit) solvent. For example,
the case of spherical particles, the condition in the case of spherical particles, the condition
:math:`\gamma_t=3\gamma_r/\sigma^2` must be explicitly accounted for :math:`\gamma_t=3\gamma_r/\sigma^2` must be explicitly accounted for
by setting *gamma_t* to 3x and *gamma_r* to x (where :math:`\sigma` by setting *gamma_t* to 3x and *gamma_r* to x (where :math:`\sigma`
is the spherical diameter). A similar (though more complex) is the sphere's diameter). A similar (though more complex)
relationship holds for ellipsoids and rod-like particles. The relationship holds for ellipsoids and rod-like particles. The
translational diffusion and rotational diffusion are given by translational diffusion and rotational diffusion are given by
*temp/gamma_t* and *rotation_temp/gamma_r*. *temp/gamma_t* and *rotation_temp/gamma_r*.
@ -150,7 +152,7 @@ See :ref:`(Delong) <Delong1>` for more details of a similar algorithm.
.. note:: .. note::
Temperature computation using the :doc:`compute temp <compute_temp>` Temperature computation using the :doc:`compute temp <compute_temp>`
will not correctly compute temperature of these overdamped dynamics will not correctly compute the temperature of these overdamped dynamics
since we are explicitly neglecting inertial effects. Furthermore, since we are explicitly neglecting inertial effects. Furthermore,
this time integrator does not add the stochastic terms or viscous this time integrator does not add the stochastic terms or viscous
terms to the force and/or torques. Rather, they are just added in to terms to the force and/or torques. Rather, they are just added in to
@ -165,7 +167,7 @@ is generated from a uniform distribution (see
of noise generation as used in :doc:`fix_langevin <fix_langevin>`. of noise generation as used in :doc:`fix_langevin <fix_langevin>`.
If the *rng* keyword is used with the *gaussian* value, then the noise If the *rng* keyword is used with the *gaussian* value, then the noise
is generated from a gaussian distribution. Typically this added is generated from a Gaussian distribution. Typically this added
complexity is unnecessary, and one should be fine using the *uniform* complexity is unnecessary, and one should be fine using the *uniform*
value for reasons argued in :ref:`(Dunweg) <Dunweg7>`. value for reasons argued in :ref:`(Dunweg) <Dunweg7>`.
@ -184,8 +186,8 @@ The *gamma_r_eigen*, and *gamma_t_eigen* keywords are the eigenvalues of
the rotational and viscous damping tensors (having the same units as the rotational and viscous damping tensors (having the same units as
their isotropic counterparts). Required for (and only compatible with) their isotropic counterparts). Required for (and only compatible with)
*brownian/asphere*. For a 2D system, the first two values of *brownian/asphere*. For a 2D system, the first two values of
*gamma_r_eigen* must be inf (only rotation in xy plane), and the third *gamma_r_eigen* must be *inf* (only rotation in *x*\ --\ *y* plane), and the third
value of *gamma_t_eigen* must be inf (only diffusion in xy plane). value of *gamma_t_eigen* must be *inf* (only diffusion in the *x*\ --\ *y* plane).
If the *dipole* keyword is used, then the dipole moments of the particles If the *dipole* keyword is used, then the dipole moments of the particles
are updated as described above. Only compatible with *brownian/asphere* are updated as described above. Only compatible with *brownian/asphere*
@ -196,13 +198,13 @@ will be occur at this prescribed temperature instead of *temp*. Only
compatible with *brownian/sphere* and *brownian/asphere*. compatible with *brownian/sphere* and *brownian/asphere*.
If the *planar_rotation* keyword is used, then rotation is constrained If the *planar_rotation* keyword is used, then rotation is constrained
to the xy plane in a 3D simulation. Only compatible with to the *x*\ -- *y* plane in a 3D simulation. Only compatible with
*brownian/sphere* and *brownian/asphere* in 3D. *brownian/sphere* and *brownian/asphere* in 3D.
---------- ----------
.. note:: .. note::
For style *brownian/asphere*, the components *gamma_t_eigen* =(x,x,x) and For style *brownian/asphere*, the components *gamma_t_eigen* = (x,x,x) and
*gamma_r_eigen* = (y,y,y), the dynamics will replicate those of the *gamma_r_eigen* = (y,y,y), the dynamics will replicate those of the
*brownian/sphere* style with *gamma_t* = x and *gamma_r* = y. *brownian/sphere* style with *gamma_t* = x and *gamma_r* = y.
@ -215,7 +217,6 @@ No information about this fix is written to :doc:`binary restart files
<restart>`. No global or per-atom quantities are stored by this fix for <restart>`. No global or per-atom quantities are stored by this fix for
access by various :doc:`output commands <Howto_output>`. access by various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`. :doc:`energy minimization <minimize>`.

View File

@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* colvars = style name of this fix command * colvars = style name of this fix command
* configfile = the configuration file for the colvars module * configfile = the configuration file for the colvars module
* keyword = *input* or *output* or *seed* or *tstat* * keyword = *input* or *output* or *seed* or *unwrap* or *tstat*
.. parsed-literal:: .. parsed-literal::

View File

@ -17,7 +17,7 @@ Syntax
* M = insert a single atom or molecule every M steps * M = insert a single atom or molecule every M steps
* seed = random # seed (positive integer) * seed = random # seed (positive integer)
* one or more keyword/value pairs may be appended to args * one or more keyword/value pairs may be appended to args
* keyword = *region* or *id* or *global* or *local* or *near* or *gaussian* or *attempt* or *rate* or *vx* or *vy* or *vz* or *mol* or *rigid* or *shake* or *units* * keyword = *region* or *id* or *global* or *local* or *near* or *gaussian* or *attempt* or *rate* or *vx* or *vy* or *vz* or *target* or *mol* or *molfrac* or *rigid* or *shake* or *orient* or *units*
.. parsed-literal:: .. parsed-literal::

View File

@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* imd = style name of this fix command * imd = style name of this fix command
* port = port number on which the fix listens for an IMD client * port = port number on which the fix listens for an IMD client
* keyword = *unwrap* or *fscale* or *trate* * keyword = *unwrap* or *fscale* or *trate* or *nowait*
.. parsed-literal:: .. parsed-literal::

View File

@ -20,7 +20,7 @@ Syntax
* damp = damping parameter (time units) * damp = damping parameter (time units)
* seed = random number seed to use for white noise (positive integer) * seed = random number seed to use for white noise (positive integer)
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *angmom* or *omega* or *scale* or *tally* or *zero* * keyword = *angmom* or *gjf* or *omega* or *scale* or *tally* or *zero*
.. parsed-literal:: .. parsed-literal::

View File

@ -16,7 +16,7 @@ Syntax
* viscosity = the fluid viscosity (units of mass/(time\*length)). * viscosity = the fluid viscosity (units of mass/(time\*length)).
* density = the fluid density. * density = the fluid density.
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *dx* or *dm* or *noise* or *stencil* or *read_restart* or *write_restart* or *zwall_velocity* or *pressurebcx* or *bodyforce* or *D3Q19* or *dumpxdmf* or *dof* or *scaleGamma* or *a0* or *npits* or *wp* or *sw* * keyword = *dx* or *dm* or *noise* or *stencil* or *read_restart* or *write_restart* or *zwall_velocity* or *pressurebcx* or *bodyforce* or *D3Q19* or *dumpxdmf* or *linearInit* or *dof* or *scaleGamma* or *a0* or *npits* or *wp* or *sw*
.. parsed-literal:: .. parsed-literal::
@ -36,6 +36,7 @@ Syntax
N = output the force and torque every N timesteps N = output the force and torque every N timesteps
file = output file name file = output file name
timeI = 1 (use simulation time to index xdmf file), 0 (use output frame number to index xdmf file) timeI = 1 (use simulation time to index xdmf file), 0 (use output frame number to index xdmf file)
*linearInit* values = none = initialize density and velocity using linear interpolation (default is uniform density, no velocities)
*dof* values = dof = specify the number of degrees of freedom for temperature calculation *dof* values = dof = specify the number of degrees of freedom for temperature calculation
*scaleGamma* values = type gammaFactor *scaleGamma* values = type gammaFactor
type = atom type (1-N) type = atom type (1-N)

View File

@ -12,7 +12,7 @@ Syntax
* fix-ID = ID of the fix to modify * fix-ID = ID of the fix to modify
* one or more keyword/value pairs may be appended * one or more keyword/value pairs may be appended
* keyword = *bodyforces* or *colname* or *dynamic/dof* or *energy* or *press* or *respa* or *temp* or *virial* * keyword = *bodyforces* or *colname* or *dynamic/dof* or *energy* or *press* or *respa* or *temp* or *virial*
.. parsed-literal:: .. parsed-literal::

View File

@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* style_name = *npt/cauchy* * style_name = *npt/cauchy*
* one or more keyword/value pairs may be appended * one or more keyword/value pairs may be appended
* keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *fixedpoint* * keyword = *temp* or *iso* or *aniso* or *tri* or *x* or *y* or *z* or *xy* or *yz* or *xz* or *couple* or *tchain* or *pchain* or *mtk* or *tloop* or *ploop* or *nreset* or *drag* or *dilate* or *scalexy* or *scaleyz* or *scalexz* or *flip* or *alpha* or *continue* or *fixedpoint*
.. parsed-literal:: .. parsed-literal::

View File

@ -16,7 +16,7 @@ Syntax
* type = atom type to assign to inserted particles (offset for molecule insertion) * type = atom type to assign to inserted particles (offset for molecule insertion)
* seed = random # seed (positive integer) * seed = random # seed (positive integer)
* one or more keyword/value pairs may be appended to args * one or more keyword/value pairs may be appended to args
* keyword = *region* or *diam* or *vol* or *rate* or *dens* or *vel* or *mol* or *rigid* or *shake* or *ignore* * keyword = *region* or *diam* or *id* or *vol* or *rate* or *dens* or *vel* or *mol* or *molfrac* or *rigid* or *shake* or *ignore*
.. parsed-literal:: .. parsed-literal::

View File

@ -80,7 +80,7 @@ Syntax
groupID1, groupID2, ... = list of N group IDs groupID1, groupID2, ... = list of N group IDs
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *langevin* or *reinit* or *temp* or *iso* or *aniso* or *x* or *y* or *z* or *couple* or *tparam* or *pchain* or *dilate* or *force* or *torque* or *infile* * keyword = *langevin* or *reinit* or *temp* or *iso* or *aniso* or *x* or *y* or *z* or *couple* or *tparam* or *pchain* or *dilate* or *force* or *torque* or *infile* or *gravity*
.. parsed-literal:: .. parsed-literal::
@ -115,6 +115,11 @@ Syntax
xflag,yflag,zflag = off/on if component of center-of-mass torque is active xflag,yflag,zflag = off/on if component of center-of-mass torque is active
*infile* filename *infile* filename
filename = file with per-body values of mass, center-of-mass, moments of inertia filename = file with per-body values of mass, center-of-mass, moments of inertia
*gravity* values = gravity-ID
gravity-ID = ID of fix gravity command to add gravitational forces
..
FIXME These don't seem to be included in the source code
*mol* value = template-ID *mol* value = template-ID
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command

View File

@ -17,7 +17,7 @@ Syntax
* pdim = *x* or *y* or *z* = direction of momentum transfer * pdim = *x* or *y* or *z* = direction of momentum transfer
* Nbin = # of layers in pdim direction (must be even number) * Nbin = # of layers in pdim direction (must be even number)
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *swap* or *target* * keyword = *swap* or *vtarget*
.. parsed-literal:: .. parsed-literal::

View File

@ -70,7 +70,7 @@ Syntax
cutoff = distance from wall at which wall-particle interaction is cut off (distance units) cutoff = distance from wall at which wall-particle interaction is cut off (distance units)
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *units* or *fld* * keyword = *units* or *fld* or *pbc*
.. parsed-literal:: .. parsed-literal::

View File

@ -14,7 +14,7 @@ Syntax
* wall/piston = style name of this fix command * wall/piston = style name of this fix command
* face = *zlo* * face = *zlo*
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *pos* or *vel* or *ramp* or *units* * keyword = *pos* or *vel* or *ramp* or *temp* or *units*
.. parsed-literal:: .. parsed-literal::
@ -32,6 +32,10 @@ Syntax
*lattice* = the wall position is defined in lattice units *lattice* = the wall position is defined in lattice units
*box* = the wall position is defined in simulation box units *box* = the wall position is defined in simulation box units
..
FIXME: There are several "undocumented" key words for this fix: *rough*,
*rampNL1*, *rampNL2*, *rampNL3*, *rampNL4*, and *rampNL5*.
Examples Examples
"""""""" """"""""

View File

@ -11,7 +11,7 @@ Syntax
kspace_modify keyword value ... kspace_modify keyword value ...
* one or more keyword/value pairs may be listed * one or more keyword/value pairs may be listed
* keyword = *collective* or *compute* or *cutoff/adjust* or *diff* or *disp/auto* or *fftbench* or *force/disp/kspace* or *force/disp/real* or *force* or *gewald/disp* or *gewald* or *kmax/ewald* or *mesh* or *minorder* or *mix/disp* or *order/disp* or *order* or *overlap* or *scafacos* or *slab* or *splittol* * keyword = *collective* or *compute* or *cutoff/adjust* or *diff* or *disp/auto* or *fftbench* or *force/disp/kspace* or *force/disp/real* or *force* or *gewald/disp* or *gewald* or *kmax/ewald* or *mesh* or *minorder* or *mix/disp* or *order/disp* or *order* or *overlap* or *scafacos* or *slab* or *splittol* or *wire*
.. parsed-literal:: .. parsed-literal::

View File

@ -6,7 +6,7 @@ mdi command
Syntax Syntax
"""""" """"""
.. parsed-literal:: .. code-block:: LAMMPS
mdi option args mdi option args
@ -19,7 +19,7 @@ Syntax
*elements* args = N_1 N_2 ... N_ntypes *elements* args = N_1 N_2 ... N_ntypes
N_1,N_2,...N_ntypes = atomic number for each of ntypes LAMMPS atom types N_1,N_2,...N_ntypes = atomic number for each of ntypes LAMMPS atom types
*plugin* args = name keyword value keyword value ... *plugin* args = name keyword value keyword value ...
name = name of plugin library, e.g. lammps means a liblammps.so library will be loaded name = name of plugin library (e.g., *lammps* means a liblammps.so library will be loaded)
keyword/value pairs in any order, some are required, some are optional keyword/value pairs in any order, some are required, some are optional
keywords = *mdi* or *infile* or *extra* or *command* keywords = *mdi* or *infile* or *extra* or *command*
*mdi* value = args passed to MDI for driver to operate with plugins (required) *mdi* value = args passed to MDI for driver to operate with plugins (required)
@ -173,8 +173,8 @@ commands, which are described further below.
atom type values are consistent in both codes, then the >TYPES atom type values are consistent in both codes, then the >TYPES
command can be used. If not, the optional *elements* keyword can command can be used. If not, the optional *elements* keyword can
be used to specify what element each LAMMPS atom type corresponds be used to specify what element each LAMMPS atom type corresponds
to. This is specified by the atomic number of the element, e.g. 13 to. This is specified by the atomic number of the element (e.g., 13
for Al. An atomic number must be specified for each of the ntypes for Al). An atomic number must be specified for each of the ntypes
LAMMPS atom types. Ntypes is typically specified via the LAMMPS atom types. Ntypes is typically specified via the
create_box command or in the data file read by the read_data create_box command or in the data file read by the read_data
command. In this has been done, the MDI driver can send an command. In this has been done, the MDI driver can send an
@ -325,15 +325,15 @@ able to initiate and terminate the connection to the engine code.
The only current MDI driver command in LAMMPS is the :doc:`fix mdi/qm The only current MDI driver command in LAMMPS is the :doc:`fix mdi/qm
<fix_mdi_qm>` command. If it is only used once in an input script <fix_mdi_qm>` command. If it is only used once in an input script
then it can initiate and terminate the connection. But if it is being then it can initiate and terminate the connection, but if it is being
issued multiple times, e.g. in a loop that issues a :doc:`clear issued multiple times (e.g., in a loop that issues a :doc:`clear
<clear>` command, then it cannot initiate or terminate the connection <clear>` command), then it cannot initiate or terminate the connection
multiple times. Instead, the *mdi connect* and *mdi exit* commands multiple times. Instead, the *mdi connect* and *mdi exit* commands
should be used outside the loop to initiate or terminate the connection. should be used outside the loop to initiate or terminate the connection.
See the examples/mdi/in.series.driver script for an example of how See the examples/mdi/in.series.driver script for an example of how
this is done. The LOOP in that script is reading a series of data this is done. The LOOP in that script is reading a series of data
file configurations and passing them to an MDI engine (e.g. quantum file configurations and passing them to an MDI engine (e.g., quantum
code) for energy and force evaluation. A *clear* command inside the code) for energy and force evaluation. A *clear* command inside the
loop wipes out the current system so a new one can be defined. This loop wipes out the current system so a new one can be defined. This
operation also destroys all fixes. So the :doc:`fix mdi/qm operation also destroys all fixes. So the :doc:`fix mdi/qm
@ -356,7 +356,7 @@ LAMMPS and MDI units, which the other codes will also perform in their
preferred units. preferred units.
LAMMPS can also be used as an MDI engine in other unit choices it LAMMPS can also be used as an MDI engine in other unit choices it
supports, e.g. *lj*, but then no unit conversion is performed. supports (e.g., *lj*), but then no unit conversion is performed.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -16,12 +16,12 @@ Syntax
keyword = *delay* or *every* or *check* or *once* or *cluster* or *include* or *exclude* or *page* or *one* or *binsize* or *collection/type* or *collection/interval* keyword = *delay* or *every* or *check* or *once* or *cluster* or *include* or *exclude* or *page* or *one* or *binsize* or *collection/type* or *collection/interval*
*delay* value = N *delay* value = N
N = delay building until this many steps since last build N = delay building neighbor lists until this many steps since last build
*every* value = M *every* value = M
M = build neighbor list every this many steps M = consider building neighbor lists every this many steps
*check* value = *yes* or *no* *check* value = *yes* or *no*
*yes* = only build if some atom has moved half the skin distance or more *yes* = only build if at least one atom has moved half the skin distance or more
*no* = always build on 1st step that *every* and *delay* are satisfied *no* = always build on 1st step where *every* and *delay* are conditions are satisfied
*once* value = *yes* or *no* *once* value = *yes* or *no*
*yes* = only build neighbor list once at start of run and never rebuild *yes* = only build neighbor list once at start of run and never rebuild
*no* = rebuild neighbor list according to other settings *no* = rebuild neighbor list according to other settings
@ -71,30 +71,53 @@ Description
""""""""""" """""""""""
This command sets parameters that affect the building and use of This command sets parameters that affect the building and use of
pairwise neighbor lists. Depending on what pair interactions and pairwise neighbor lists. Depending on what pair interactions and other
other commands are defined, a simulation may require one or more commands are defined, a simulation may require one or more neighbor
neighbor lists. lists.
The *every*, *delay*, *check*, and *once* options affect how often The *every*, *delay*, *check*, and *once* options affect how often lists
lists are built as a simulation runs. The *delay* setting means never are built as a simulation runs. The *delay* setting means never build
build new lists until at least N steps after the previous build. The new lists until at least N steps after the previous build. The *every*
*every* setting means build lists every M steps (after the delay has setting means attempt to build lists every M steps (after the delay has
passed). If the *check* setting is *no*, the lists are built on the passed). If the *check* setting is *no*, the lists are built on the
first step that satisfies the *delay* and *every* settings. If the first step that satisfies the *delay* and *every* settings. If the
*check* setting is *yes*, then the *every* and *delay* settings *check* setting is *yes*, then the *every* and *delay* settings
determine when a build may possibly be performed, but an actual build determine when a build may possibly be performed, but an actual build
only occurs if some atom has moved more than half the skin distance only occurs if at least one atom has moved more than half the neighbor
(specified in the :doc:`neighbor <neighbor>` command) since the last skin distance (specified in the :doc:`neighbor <neighbor>` command)
build. since the last neighbor list build.
If the *once* setting is yes, then the neighbor list is only built .. admonition:: Impact of neighbor list settings
once at the beginning of each run, and never rebuilt, except on steps :class: note
when a restart file is written, or steps when a fix forces a rebuild
to occur (e.g. fixes that create or delete atoms, such as :doc:`fix deposit <fix_deposit>` or :doc:`fix evaporate <fix_evaporate>`). The choice of neighbor list settings can have a significant impact on
This setting should only be made if you are certain atoms will not the (parallel) performance of LAMMPS and the correctness of the
move far enough that the neighbor list should be rebuilt, e.g. running simulation results. Since building the neighbor lists is time
a simulation of a cold crystal. Note that it is not that expensive to consuming, doing it less frequently can speed up a calculation. If
check if neighbor lists should be rebuilt. the lists are rebuilt too infrequently, however, interacting pairs
may be missing and thus the resulting pairwise interactions
incorrect. The optimal settings depend on many factors like the
properties of the simulated system (density, geometry, topology,
temperature, pressure), the force field parameters and settings, the
size of the timestep, neighbor list skin distance and more. The
default settings are chosen to be very conservative to guarantee
correctness of the simulation. They depend on the *check* flag
heuristics to reduce the number of neighbor list rebuilds at a minor
expense for executing the check. Determining the correctness of a
specific choice of neighbor list settings is complicated by the fact
that a neighbor list rebuild changes the order in which pairwise
interactions are computed and thus
- due to the limitations of floating-point math - the trajectory.
If the *once* setting is yes, then the neighbor list is only built once
at the beginning of each run, and never rebuilt, except on steps when a
restart file is written, or steps when a fix forces a rebuild to occur
(e.g. fixes that create or delete atoms, such as :doc:`fix deposit
<fix_deposit>` or :doc:`fix evaporate <fix_evaporate>`). This setting
should only be made if you are certain atoms will not move far enough
that the neighbor list should be rebuilt, e.g. running a simulation of a
cold crystal. Note that it is not that expensive to check if neighbor
lists should be rebuilt.
When the rRESPA integrator is used (see the :doc:`run_style <run_style>` When the rRESPA integrator is used (see the :doc:`run_style <run_style>`
command), the *every* and *delay* parameters refer to the longest command), the *every* and *delay* parameters refer to the longest
@ -234,11 +257,11 @@ depend on their atom type.
Restrictions Restrictions
"""""""""""" """"""""""""
If the "delay" setting is non-zero, then it must be a multiple of the If the *delay* setting is non-zero, then it must be a multiple of the
"every" setting. *every* setting.
The molecule/intra and molecule/inter exclude options can only be used The *molecule/intra* and *molecule/inter* exclusion options can only
with atom styles that define molecule IDs. be used with atom styles that define molecule IDs.
The value of the *page* setting must be at least 10x larger than the The value of the *page* setting must be at least 10x larger than the
*one* setting. This insures neighbor pages are not mostly empty *one* setting. This insures neighbor pages are not mostly empty
@ -252,6 +275,6 @@ Related commands
Default Default
""""""" """""""
The option defaults are delay = 10, every = 1, check = yes, once = no, The option defaults are delay = 0, every = 1, check = yes, once = no,
cluster = no, include = all (same as no include option defined), cluster = no, include = all (same as no include option defined),
exclude = none, page = 100000, one = 2000, and binsize = 0.0. exclude = none, page = 100000, one = 2000, and binsize = 0.0.

View File

@ -58,22 +58,26 @@ Examples
.. code-block:: LAMMPS .. code-block:: LAMMPS
pair_style lj/cut/dipole/cut 10.0 pair_style lj/cut/dipole/cut 2.5 5.0
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_coeff 2 3 0.8 1.0 2.5 4.0
pair_style lj/sf/dipole/sf 9.0 pair_style lj/sf/dipole/sf 9.0
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
pair_coeff 2 3 1.0 1.0 2.5 4.0 scale 0.5 pair_coeff 2 3 1.0 1.0 2.5 4.0 scale 0.5
pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_coeff 2 3 0.8 1.0 2.5 4.0
pair_style lj/cut/dipole/long 10.0 pair_style lj/cut/dipole/long 2.5 3.5
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_coeff 2 3 0.8 1.0 3.0
pair_style lj/long/dipole/long long long 3.5 10.0 pair_style lj/long/dipole/long long long 3.5
pair_coeff * * 1.0 1.0 pair_coeff * * 1.0 1.0
pair_coeff 2 3 1.0 1.0 2.5 4.0 pair_coeff 2 3 0.8 1.0
pair_style lj/long/dipole/long cut long 2.5 3.5
pair_coeff * * 1.0 1.0
pair_coeff 2 3 0.8 1.0 3.0
Description Description
""""""""""" """""""""""
@ -254,23 +258,28 @@ long-range LJ interactions, the :doc:`kspace_style ewald/disp
---------- ----------
The following coefficients must be defined for each pair of atoms The following coefficients must be defined for each pair of atoms types
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples via the :doc:`pair_coeff <pair_coeff>` command as in the examples above,
above, or in the data file or restart files read by the or in the data file or restart files read by the :doc:`read_data
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>` <read_data>` or :doc:`read_restart <read_restart>` commands, or by
commands, or by mixing as described below: mixing as described below:
* :math:`\epsilon` (energy units) * :math:`\epsilon` (energy units)
* :math:`\sigma` (distance units) * :math:`\sigma` (distance units)
* cutoff1 (distance units) * cutoff1 (distance units)
* cutoff2 (distance units) * cutoff2 (distance units)
The latter 2 coefficients are optional. If not specified, the global The latter 2 coefficients are optional. If not specified, the global LJ
LJ and Coulombic cutoffs specified in the pair_style command are used. and Coulombic cutoffs specified in the pair_style command are used. If
If only one cutoff is specified, it is used as the cutoff for both LJ only one cutoff is specified, it is used as the cutoff for both LJ and
and Coulombic interactions for this type pair. If both coefficients Coulombic interactions for this type pair. If both coefficients are
are specified, they are used as the LJ and Coulombic cutoffs for this specified, they are used as the LJ and Coulombic cutoffs for this type
type pair. pair. When using a long-rang Coulomb solver, only a global Coulomb
cutoff may be used and only the LJ cutoff may be changed with the
:doc:`pair_coeff <pair_coeff>` command. When using the
*lj/long/dipole/long* pair style with *long* *long* setting, only a
single global cutoff may be provided and no cutoff for the
:doc:`pair_coeff <pair_coeff>` command.
---------- ----------

View File

@ -97,7 +97,7 @@ on particle *i* due to contact with particle *j* is given by:
Where :math:`\delta_{ij} = R_i + R_j - \|\mathbf{r}_{ij}\|` is the particle Where :math:`\delta_{ij} = R_i + R_j - \|\mathbf{r}_{ij}\|` is the particle
overlap, :math:`R_i, R_j` are the particle radii, :math:`\mathbf{r}_{ij} = \mathbf{r}_i - \mathbf{r}_j` is the vector separating the two overlap, :math:`R_i, R_j` are the particle radii, :math:`\mathbf{r}_{ij} = \mathbf{r}_i - \mathbf{r}_j` is the vector separating the two
particle centers (note the i-j ordering so that :math:`F_{ne}` is particle centers (note the i-j ordering so that :math:`\mathbf{F}_{ne}` is
positive for repulsion), and :math:`\mathbf{n} = \frac{\mathbf{r}_{ij}}{\|\mathbf{r}_{ij}\|}`. Therefore, positive for repulsion), and :math:`\mathbf{n} = \frac{\mathbf{r}_{ij}}{\|\mathbf{r}_{ij}\|}`. Therefore,
for *hooke*, the units of the spring constant :math:`k_n` are for *hooke*, the units of the spring constant :math:`k_n` are
*force*\ /\ *distance*, or equivalently *mass*\ /*time\^2*. *force*\ /\ *distance*, or equivalently *mass*\ /*time\^2*.

View File

@ -57,7 +57,7 @@ The format of the list file is as follows:
ID2 = atom ID of second atom ID2 = atom ID of second atom
style = style of interaction style = style of interaction
coeffs = list of coeffs coeffs = list of coeffs
cutoff = cutoff for interaction (optional, except for style *quartic*) cutoff = cutoff for interaction (optional)
The cutoff parameter is optional for all but the *quartic* interactions. The cutoff parameter is optional for all but the *quartic* interactions.
If it is not specified, the global cutoff is used. If it is not specified, the global cutoff is used.
@ -71,7 +71,7 @@ Here is an example file:
15 259 lj126 1.0 1.0 50.0 15 259 lj126 1.0 1.0 50.0
15 603 morse 10.0 1.2 2.0 10.0 # and another comment 15 603 morse 10.0 1.2 2.0 10.0 # and another comment
18 470 harmonic 50.0 1.2 5.0 18 470 harmonic 50.0 1.2 5.0
19 332 quartic 5.0 -1.2 1.2 5.0 19 332 quartic 10.0 5.0 -1.2 1.2
The style *lj126* computes pairwise interactions with the formula The style *lj126* computes pairwise interactions with the formula
@ -100,7 +100,7 @@ The style *harmonic* computes pairwise interactions with the formula
.. math:: .. math::
E = K (r - r_0)^2 E = K (r - r_0)^2 \qquad r < r_c
and the coefficients: and the coefficients:
@ -113,16 +113,14 @@ The style *quartic* computes pairwise interactions with the formula
.. math:: .. math::
E = K (r - r_c)^2 (r - r_c -b_1) (r - r_c - b_2) \qquad r < r_c E = K (r - r_0)^2 (r - r_0 -b_1) (r - r_0 - b_2) \qquad r < r_c
and the coefficients: and the coefficients:
* :math:`K` (energy units) * :math:`K` (energy units)
* :math:`r_0` (distance units)
* :math:`b_1` (distance units) * :math:`b_1` (distance units)
* :math:`b_2` (distance units) * :math:`b_2` (distance units)
* :math:`r_c` (distance units)
Note that the per list entry cutoff :math:`r_c` is **required** for *quartic* interactions.
---------- ----------

View File

@ -104,7 +104,7 @@ requests to compute `gamma`, as shown in example below:
.. code-block:: LAMMPS .. code-block:: LAMMPS
pair_style pace/extrapolation pair_style pace/extrapolation
pair_coeff * * Cu.yaml Cu.asi Cu pair_coeff * * Cu.yaml Cu.asi Cu
fix pace_gamma all pair 10 pace/extrapolation gamma 1 fix pace_gamma all pair 10 pace/extrapolation gamma 1
@ -112,7 +112,6 @@ requests to compute `gamma`, as shown in example below:
compute max_pace_gamma all reduce max f_pace_gamma compute max_pace_gamma all reduce max f_pace_gamma
variable dump_skip equal "c_max_pace_gamma < 5" variable dump_skip equal "c_max_pace_gamma < 5"
dump pace_dump all custom 20 extrapolative_structures.dump id x y z f_pace_gamma dump pace_dump all custom 20 extrapolative_structures.dump id x y z f_pace_gamma
dump_modify pace_dump skip v_dump_skip dump_modify pace_dump skip v_dump_skip

View File

@ -18,7 +18,7 @@ Syntax
* compute-ID = ID of the compute used for event detection * compute-ID = ID of the compute used for event detection
* random_seed = random # seed (positive integer) * random_seed = random # seed (positive integer)
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *min* or *temp* or *vel* * keyword = *min* or *temp* or *vel* or *time*
.. parsed-literal:: .. parsed-literal::

View File

@ -18,18 +18,17 @@ Syntax
*grid* arg = gstyle params ... *grid* arg = gstyle params ...
gstyle = *onelevel* or *twolevel* or *numa* or *custom* gstyle = *onelevel* or *twolevel* or *numa* or *custom*
onelevel params = none *onelevel* params = none
twolevel params = Nc Cx Cy Cz *twolevel* params = Nc Cx Cy Cz
Nc = number of cores per node Nc = number of cores per node
Cx,Cy,Cz = # of cores in each dimension of 3d sub-grid assigned to each node Cx,Cy,Cz = # of cores in each dimension of 3d sub-grid assigned to each node
numa params = none *numa* params = none
custom params = infile *custom* params = infile
infile = file containing grid layout infile = file containing grid layout
*map* arg = *cart* or *cart/reorder* or *xyz* or *xzy* or *yxz* or *yzx* or *zxy* or *zyx* *map* arg = *cart* or *cart/reorder* or *xyz* or *xzy* or *yxz* or *yzx* or *zxy* or *zyx*
cart = use MPI_Cart() methods to map processors to 3d grid with reorder = 0 cart = use MPI_Cart() methods to map processors to 3d grid with reorder = 0
cart/reorder = use MPI_Cart() methods to map processors to 3d grid with reorder = 1 cart/reorder = use MPI_Cart() methods to map processors to 3d grid with reorder = 1
xyz,xzy,yxz,yzx,zxy,zyx = map processors to 3d grid in IJK ordering xyz,xzy,yxz,yzx,zxy,zyx = map processors to 3d grid in IJK ordering
*numa* arg = none
*part* args = Psend Precv cstyle *part* args = Psend Precv cstyle
Psend = partition # (1 to Np) which will send its processor layout Psend = partition # (1 to Np) which will send its processor layout
Precv = partition # (1 to Np) which will recv the processor layout Precv = partition # (1 to Np) which will recv the processor layout

View File

@ -71,8 +71,14 @@ Also see the explanation of the :doc:`-restart command-line switch
This command can be used multiple times to add new atoms and their This command can be used multiple times to add new atoms and their
properties to an existing system by using the *add*, *offset*, and properties to an existing system by using the *add*, *offset*, and
*shift* keywords. See more details below, which includes the use case *shift* keywords. However, it is important to understand that several
for the *extra* keywords. system parameters, like the number of types of different kinds and per
atom settings are **locked in** after the first *read_data* command,
which means that no type ID (including its offset) may have a larger
value when processing additional data files than what is set by the
first data file and the corresponding *read_data* command options. See
more details on this situation below, which includes the use case for
the *extra* keywords.
The *group* keyword adds all the atoms in the data file to the The *group* keyword adds all the atoms in the data file to the
specified group-ID. The group will be created if it does not already specified group-ID. The group will be created if it does not already

View File

@ -101,7 +101,7 @@ Py2 by Pz2, then Px1 must be an integer multiple of Px2, and similarly
for Py1 a multiple of Py2, and Pz1 a multiple of Pz2. for Py1 a multiple of Py2, and Pz1 a multiple of Pz2.
Typically the best way to do this is to let the first partition choose Typically the best way to do this is to let the first partition choose
its onn optimal layout, then require the second partition's layout to its own optimal layout, then require the second partition's layout to
match the integer multiple constraint. See the match the integer multiple constraint. See the
:doc:`processors <processors>` command with its *part* keyword for a way :doc:`processors <processors>` command with its *part* keyword for a way
to control this, e.g. to control this, e.g.

View File

@ -18,7 +18,7 @@ Syntax
* tmax = reciprocal of lowest expected pre-exponential factor (time units) * tmax = reciprocal of lowest expected pre-exponential factor (time units)
* compute-ID = ID of the compute used for event detection * compute-ID = ID of the compute used for event detection
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *min* or *neb* or *min_style* or *neb_style* or *neb_log* * keyword = *min* or *neb* or *neb_style* or *neb_step* or *neb_log*
.. parsed-literal:: .. parsed-literal::

View File

@ -213,6 +213,9 @@ from the list of active variables, and is thus available to be
re-defined in a subsequent variable command. The *delete* style does re-defined in a subsequent variable command. The *delete* style does
the same thing. the same thing.
Variables are **not** deleted by the :doc:`clear <clear>` command with
the exception of atomfile-style variables.
---------- ----------
The :doc:`Commands parse <Commands_parse>` page explains how The :doc:`Commands parse <Commands_parse>` page explains how
@ -265,7 +268,7 @@ the first string is assigned to the variable. Each time a
string is assigned. All processors assign the same string to the string is assigned. All processors assign the same string to the
variable. variable.
*Index* style variables with a single string value can also be set by Index-style variables with a single string value can also be set by
using the :doc:`command-line switch -var <Run_options>`. using the :doc:`command-line switch -var <Run_options>`.
The *loop* style is identical to the *index* style except that the The *loop* style is identical to the *index* style except that the
@ -285,7 +288,7 @@ be one string for each processor partition or "world". LAMMPS can be
run with multiple partitions via the :doc:`-partition command-line run with multiple partitions via the :doc:`-partition command-line
switch <Run_options>`. This variable command assigns one string to switch <Run_options>`. This variable command assigns one string to
each world. All processors in the world are assigned the same string. each world. All processors in the world are assigned the same string.
The next command cannot be used with *equal* style variables, since The next command cannot be used with equal-style variables, since
there is only one value per world. This style of variable is useful there is only one value per world. This style of variable is useful
when you wish to run different simulations on different partitions, or when you wish to run different simulations on different partitions, or
when performing a parallel tempering simulation (see the :doc:`temper when performing a parallel tempering simulation (see the :doc:`temper
@ -303,7 +306,7 @@ string. This continues until all the variable strings are consumed.
Thus, this command can be used to run 50 simulations on 8 processor Thus, this command can be used to run 50 simulations on 8 processor
partitions. The simulations will be run one after the other on partitions. The simulations will be run one after the other on
whatever partition becomes available, until they are all finished. whatever partition becomes available, until they are all finished.
*Universe* style variables are incremented using the files Universe-style variables are incremented using the files
"tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will
see in your directory during such a LAMMPS run. see in your directory during such a LAMMPS run.
@ -341,7 +344,9 @@ variable can be used to adapt the behavior of LAMMPS input scripts via
environment variable settings, or to retrieve information that has environment variable settings, or to retrieve information that has
been previously stored with the :doc:`shell putenv <shell>` command. been previously stored with the :doc:`shell putenv <shell>` command.
Note that because environment variable settings are stored by the Note that because environment variable settings are stored by the
operating systems, they persist beyond a :doc:`clear <clear>` command. operating systems, they persist even if the corresponding *getenv*
style variable is deleted, and also are set for sub-shells executed
by the :doc:`shell <shell>` command.
For the *file* style, a filename is provided which contains a list of For the *file* style, a filename is provided which contains a list of
strings to assign to the variable, one per line. The strings can be strings to assign to the variable, one per line. The strings can be
@ -373,7 +378,9 @@ This means the variable can then be evaluated as many times as desired
and will return those values. There are two ways to cause the next and will return those values. There are two ways to cause the next
set of per-atom values from the file to be read: use the set of per-atom values from the file to be read: use the
:doc:`next <next>` command or the next() function in an atom-style :doc:`next <next>` command or the next() function in an atom-style
variable, as discussed below. variable, as discussed below. Unlike most variable styles
atomfile-style variables are **deleted** during a :doc:`clear <clear>`
command.
The rules for formatting the file are as follows. Each time a set of The rules for formatting the file are as follows. Each time a set of
per-atom values is read, a non-blank line is searched for in the file. per-atom values is read, a non-blank line is searched for in the file.

View File

@ -33,7 +33,7 @@ Syntax
*angular* = zero the angular momentum *angular* = zero the angular momentum
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *dist* or *sum* or *mom* or *rot* or *temp* or *bias* or *loop* or *units* * keyword = *dist* or *sum* or *mom* or *rot* or *temp* or *bias* or *loop* or *rigid* or *units*
.. parsed-literal:: .. parsed-literal::

View File

@ -3,7 +3,7 @@
# #
# Python rewrite of txt2html # Python rewrite of txt2html
# The original txt2html was written in C by Steve Plimpton # The original txt2html was written in C by Steve Plimpton
# (http://www.cs.sandia.gov/cgi-bin/sjplimp/) # (https://sjplimp.github.io/)
# #
# Copyright (C) 2015 Richard Berger # Copyright (C) 2015 Richard Berger
# #

View File

@ -9,8 +9,8 @@ LAMMPS_COMMANDS = ("angle_coeff", "angle_style", "atom_modify", "atom_style",
"displace_atoms", "dump_modify", "dynamical_matrix", "echo", "elif", "else", "displace_atoms", "dump_modify", "dynamical_matrix", "echo", "elif", "else",
"fix_modify", "group2ndx", "hyper", "if", "improper_coeff", "fix_modify", "group2ndx", "hyper", "if", "improper_coeff",
"improper_style", "include", "info", "jump", "kim", "improper_style", "include", "info", "jump", "kim",
"kspace_modify", "kspace_style", "label", "lattice", "kspace_modify", "kspace_style", "label", "labelmap", "lattice", "log",
"log", "mass", "message", "minimize", "min_modify", "min_style", "molecule", "mass", "mdi", "message", "minimize", "min_modify", "min_style", "molecule",
"ndx2group", "neb", "neb/spin", "neighbor", "neigh_modify", "newton", "next", "ndx2group", "neb", "neb/spin", "neighbor", "neigh_modify", "newton", "next",
"package", "pair_coeff", "pair_modify", "pair_style", "pair_write", "package", "pair_coeff", "pair_modify", "pair_style", "pair_write",
"partition", "prd", "print", "processors", "python", "quit", "read_data", "partition", "prd", "print", "processors", "python", "quit", "read_data",

View File

@ -38,7 +38,7 @@ sys.path.append(os.path.join(LAMMPS_DOC_DIR, 'src', '_ext'))
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0' needs_sphinx = '5.2.0'
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@ -53,10 +53,6 @@ extensions = [
'tab_or_note', 'tab_or_note',
'breathe', 'breathe',
] ]
# 2017-12-07: commented out, since this package is broken with Sphinx 16.x
# yet we can no longer use Sphinx 15.x, since that breaks with
# newer version of the multiprocessor module.
# 'sphinxcontrib.images',
images_config = { images_config = {
'default_image_width' : '25%', 'default_image_width' : '25%',
@ -287,7 +283,48 @@ latex_elements = {
# Additional stuff for the LaTeX preamble. # Additional stuff for the LaTeX preamble.
'preamble': r''' 'preamble': r'''
\setcounter{tocdepth}{2} \setcounter{tocdepth}{2}
\renewcommand{\sfdefault}{ptm} % Use Times New Roman font for \textrm
\renewcommand{\sfdefault}{phv} % Use Helvetica font for \textsf
% Set up math fonts to match text fonts
\DeclareSymbolFont{operators} {OT1}{ptm}{m}{n}
\DeclareSymbolFont{bold} {OT1}{ptm}{bx}{n}
\DeclareSymbolFont{italic} {OT1}{ptm}{m}{it}
\DeclareSymbolFont{extraops} {OT1}{ztmcm}{m}{n}
\DeclareSymbolFont{letters} {OML}{ztmcm}{m}{it}
\DeclareSymbolFont{largesymbols}{OMX}{ztmcm}{m}{n}
% symbols (and \mathcal) are taken from computer modern.
% setup mappings
\DeclareSymbolFontAlphabet{\mathrm} {operators}
\DeclareSymbolFontAlphabet{\mathnormal}{letters}
\DeclareMathAlphabet{\mathnormal}{OT1}{ptm}{m}{n}
\DeclareMathAlphabet{\mathrm}{OT1}{ptm}{m}{n}
\DeclareMathAlphabet{\mathbf}{OT1}{ptm}{bx}{n}
\DeclareMathAlphabet{\mathit}{OT1}{ptm}{m}{it}
\DeclareMathAlphabet{\mathtt}{OT1}{pcr}{m}{n}
\SetMathAlphabet\mathit{bold}{OT1}{ptm}{bx}{it}
% declare missing operators
\DeclareMathSymbol{\omicron}{0}{operators}{`\o}
\DeclareMathSymbol{\Gamma}{\mathalpha}{extraops}{"00}
\DeclareMathSymbol{\Delta}{\mathalpha}{extraops}{"01}
\DeclareMathSymbol{\Theta}{\mathalpha}{extraops}{"02}
\DeclareMathSymbol{\Lambda}{\mathalpha}{extraops}{"03}
\DeclareMathSymbol{\Xi}{\mathalpha}{extraops}{"04}
\DeclareMathSymbol{\Pi}{\mathalpha}{extraops}{"05}
\DeclareMathSymbol{\Sigma}{\mathalpha}{extraops}{"06}
\DeclareMathSymbol{\Upsilon}{\mathalpha}{extraops}{"07}
\DeclareMathSymbol{\Phi}{\mathalpha}{extraops}{"08}
\DeclareMathSymbol{\Psi}{\mathalpha}{extraops}{"09}
\DeclareMathSymbol{\Omega}{\mathalpha}{extraops}{"0A}
\renewcommand{\AA}{\mbox{\textrm{\r{A}}}} \renewcommand{\AA}{\mbox{\textrm{\r{A}}}}
% Make ToC number fields wider to accommodate sections with >= 100 subsections
% or >= 10 subsections with >= 10 subsubsections
\makeatletter
\renewcommand*{\sphinxtableofcontentshook}{%
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{3.1em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{4.6em}{4.5em}}
}
\makeatother
''' '''
} }
@ -372,9 +409,9 @@ at Sandia National Laboratories, a US Department of Energy facility,
with funding from the DOE. It is an open-source code, distributed with funding from the DOE. It is an open-source code, distributed
freely under the terms of the GNU Public License (GPL). freely under the terms of the GNU Public License (GPL).
The primary author of the code is Steve Plimpton, who can be emailed The LAMMPS developers can be contacted at developers@lammps.org.
at sjplimp@sandia.gov. The LAMMPS WWW Site at www.lammps.org has The LAMMPS WWW Site at www.lammps.org has more information about
more information about the code and its uses. the code and its uses.
""" """
epub_author = 'The LAMMPS Developers' epub_author = 'The LAMMPS Developers'

View File

@ -2540,7 +2540,6 @@ oneAPI
onelevel onelevel
oneway oneway
onlysalt onlysalt
onn
ons ons
OO OO
Oord Oord
@ -2738,6 +2737,7 @@ Polym
polymorph polymorph
polymorphism polymorphism
Ponder Ponder
Ponte
popen popen
Popoola Popoola
Popov Popov
@ -3692,6 +3692,7 @@ vdw
vdW vdW
vdwl vdwl
vec vec
Vecchio
vectorial vectorial
vectorization vectorization
Vectorization Vectorization

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
www.cs.sandia.gov/~sjplimp/lammps.html https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,6 +1,6 @@
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! www.cs.sandia.gov/~sjplimp/lammps.html ! https://www.lammps.org/, Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories ! LAMMPS development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,6 +1,6 @@
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! www.cs.sandia.gov/~sjplimp/lammps.html ! https://www.lammps.org/, Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories ! LAMMPS development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -3,7 +3,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS Development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -3,7 +3,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS Development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
This software is distributed under the GNU General Public License. This software is distributed under the GNU General Public License.

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
/* -*- c++ -*- ---------------------------------------------------------- /* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories https://www.lammps.org/ Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
! ------------------------------------------------------------------------- ! -------------------------------------------------------------------------
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! https://www.lammps.org/ Sandia National Laboratories ! https://www.lammps.org/ Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov ! LAMMPS Development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
@ -19,8 +19,12 @@
! Karl D. Hammond <hammondkd@missouri.edu> ! Karl D. Hammond <hammondkd@missouri.edu>
! University of Missouri, 2012-2020 ! University of Missouri, 2012-2020
! !
! Contributing authors:
! - Axel Kohlmeyer <akohlmey@gmail.com>, Temple University, 2020-2022
! - Karl D. Hammond <hammondkd@missouri.edu> University of Missouri, 2022
!
! The Fortran module tries to follow the API of the C library interface ! The Fortran module tries to follow the API of the C library interface
! closely, but like the Python wrapper it employs an object-oriented ! closely, but like the Python wrapper, it employs an object-oriented
! approach. To accommodate the object-oriented approach, all exported ! approach. To accommodate the object-oriented approach, all exported
! subroutines and functions have to be implemented in Fortran and ! subroutines and functions have to be implemented in Fortran and
! call the interfaced C-style functions with adapted calling conventions ! call the interfaced C-style functions with adapted calling conventions

View File

@ -184,7 +184,7 @@ class UCL_Device {
_cq.back()=clCreateCommandQueueWithProperties(_context, _cl_device, props, _cq.back()=clCreateCommandQueueWithProperties(_context, _cl_device, props,
&errorv); &errorv);
} else { } else {
cl_queue_properties props[] = {CL_QUEUE_PROPERTIES, 0}; cl_queue_properties props[] = {0};
_cq.back()=clCreateCommandQueueWithProperties(_context, _cl_device, props, _cq.back()=clCreateCommandQueueWithProperties(_context, _cl_device, props,
&errorv); &errorv);
} }

View File

@ -741,6 +741,7 @@ void DeviceT::estimate_gpu_overhead(const int kernel_calls,
} }
gpu_overhead/=10.0; gpu_overhead/=10.0;
gpu_driver_overhead/=10.0; gpu_driver_overhead/=10.0;
gpu->sync();
if (_data_in_estimate>0) { if (_data_in_estimate>0) {
delete [] host_data_in; delete [] host_data_in;
@ -793,6 +794,7 @@ void DeviceT::output_times(UCL_Timer &time_pair, Answer<numtyp,acctyp> &ans,
#ifdef USE_OPENCL #ifdef USE_OPENCL
// Workaround for timing issue on Intel OpenCL // Workaround for timing issue on Intel OpenCL
if (times[0] > 80e6) times[0]=0.0; if (times[0] > 80e6) times[0]=0.0;
if (times[1] > 80e6) times[1]=0.0;
if (times[3] > 80e6) times[3]=0.0; if (times[3] > 80e6) times[3]=0.0;
if (times[5] > 80e6) times[5]=0.0; if (times[5] > 80e6) times[5]=0.0;
#endif #endif
@ -806,9 +808,8 @@ void DeviceT::output_times(UCL_Timer &time_pair, Answer<numtyp,acctyp> &ans,
fprintf(screen,"--------------------------------\n"); fprintf(screen,"--------------------------------\n");
if (time_device() && (times[3] > 0.0)) { if (time_device() && (times[3] > 0.0)) {
if (times[0] > 0.0) if (times[0] > 0.0) fprintf(screen,"Data Transfer: %.4f s.\n",times[0]/_replica_size);
fprintf(screen,"Data Transfer: %.4f s.\n",times[0]/_replica_size); if (times[1] > 0.0) fprintf(screen,"Neighbor copy: %.4f s.\n",times[1]/_replica_size);
fprintf(screen,"Neighbor copy: %.4f s.\n",times[1]/_replica_size);
if (nbor.gpu_nbor() > 0.0) if (nbor.gpu_nbor() > 0.0)
fprintf(screen,"Neighbor build: %.4f s.\n",times[2]/_replica_size); fprintf(screen,"Neighbor build: %.4f s.\n",times[2]/_replica_size);
else else
@ -862,32 +863,34 @@ void DeviceT::output_kspace_times(UCL_Timer &time_in,
double max_mb=mpi_max_bytes/(1024.0*1024.0); double max_mb=mpi_max_bytes/(1024.0*1024.0);
#ifdef USE_OPENCL #ifdef USE_OPENCL
// Workaround for timing issue on Intel OpenCL // Workaround for timing issue on Intel OpenCL
if (times[0] > 80e6) times[0]=0.0;
if (times[1] > 80e6) times[1]=0.0;
if (times[3] > 80e6) times[3]=0.0; if (times[3] > 80e6) times[3]=0.0;
if (times[5] > 80e6) times[5]=0.0;
#endif #endif
if (replica_me()==0) if (replica_me()==0)
if (screen && times[6]>0.0) { if (screen && (times[6] > 0.0)) {
fprintf(screen,"\n\n-------------------------------------"); fprintf(screen,"\n\n-------------------------------------");
fprintf(screen,"--------------------------------\n"); fprintf(screen,"--------------------------------\n");
fprintf(screen," Device Time Info (average) for kspace: "); fprintf(screen," Device Time Info (average) for kspace: ");
fprintf(screen,"\n-------------------------------------"); fprintf(screen,"\n-------------------------------------");
fprintf(screen,"--------------------------------\n"); fprintf(screen,"--------------------------------\n");
if (time_device() && times[3]>0) { if (time_device() && (times[3] > 0.0)) {
fprintf(screen,"Data Out: %.4f s.\n",times[0]/_replica_size); if (times[0] > 0.0) fprintf(screen,"Data Out: %.4f s.\n",times[0]/_replica_size);
fprintf(screen,"Data In: %.4f s.\n",times[1]/_replica_size); if (times[1] > 0.0) fprintf(screen,"Data In: %.4f s.\n",times[1]/_replica_size);
fprintf(screen,"Kernel (map): %.4f s.\n",times[2]/_replica_size); fprintf(screen,"Kernel (map): %.4f s.\n",times[2]/_replica_size);
fprintf(screen,"Kernel (rho): %.4f s.\n",times[3]/_replica_size); fprintf(screen,"Kernel (rho): %.4f s.\n",times[3]/_replica_size);
fprintf(screen,"Force interp: %.4f s.\n",times[4]/_replica_size); fprintf(screen,"Force interp: %.4f s.\n",times[4]/_replica_size);
fprintf(screen,"Total rho: %.4f s.\n", if (times[0] > 0.0)
(times[0]+times[2]+times[3])/_replica_size); fprintf(screen,"Total rho: %.4f s.\n", (times[0]+times[2]+times[3])/_replica_size);
fprintf(screen,"Total interp: %.4f s.\n", if (times[1] > 0.0)
(times[1]+times[4])/_replica_size); fprintf(screen,"Total interp: %.4f s.\n", (times[1]+times[4])/_replica_size);
fprintf(screen,"Force copy: %.4f s.\n",times[5]/_replica_size); if (times[5] > 0.0) fprintf(screen,"Force copy: %.4f s.\n",times[5]/_replica_size);
fprintf(screen,"Total: %.4f s.\n", fprintf(screen,"Total: %.4f s.\n",
(times[0]+times[1]+times[2]+times[3]+times[4]+times[5])/ (times[0]+times[1]+times[2]+times[3]+times[4]+times[5])/_replica_size);
_replica_size);
} }
fprintf(screen,"CPU Poisson: %.4f s.\n",times[6]/_replica_size); fprintf(screen,"CPU Poisson: %.4f s.\n",times[6]/_replica_size);
fprintf(screen,"CPU Data Cast: %.4f s.\n",times[8]/_replica_size); fprintf(screen,"CPU Data Cast: %.4f s.\n",times[8]/_replica_size);

View File

@ -257,7 +257,7 @@ __kernel void k_lj_tip4p_reneigh(
} }
if (i<inum && itype == typeH) { if (i<inum && itype == typeH) {
if (hneigh[i*4+2] != -1) { if (hneigh[i*4+2] != -1) {
int iI, iH; int iI;
iI = atom_mapping(map,tag[i] - 1); iI = atom_mapping(map,tag[i] - 1);
iO = closest_image(i,iI,sametag, x_); iO = closest_image(i,iI,sametag, x_);
numtyp4 iIx; fetch4(iIx,iO,pos_tex); //x_[iI]; numtyp4 iIx; fetch4(iIx,iO,pos_tex); //x_[iI];

View File

@ -1,7 +1,7 @@
! ------------ ---------------------------------------------------------- ! ------------ ----------------------------------------------------------
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! https://www.lammps.org/ Sandia National Laboratories ! https://www.lammps.org/ Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov ! LAMMPS development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
! ------------ ---------------------------------------------------------- ! ------------ ----------------------------------------------------------
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! https://www.lammps.org/ Sandia National Laboratories ! https://www.lammps.org/ Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov ! LAMMPS development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

View File

@ -1,7 +1,7 @@
! ------------ ---------------------------------------------------------- ! ------------ ----------------------------------------------------------
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator ! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
! https://www.lammps.org/ Sandia National Laboratories ! https://www.lammps.org/ Sandia National Laboratories
! Steve Plimpton, sjplimp@sandia.gov ! LAMMPS development team: developers@lammps.org
! !
! Copyright (2003) Sandia Corporation. Under the terms of Contract ! Copyright (2003) Sandia Corporation. Under the terms of Contract
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains ! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains

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