diff --git a/.github/workflows/check-cpp23.yml b/.github/workflows/check-cpp23.yml new file mode 100644 index 0000000000..2cd53f2208 --- /dev/null +++ b/.github/workflows/check-cpp23.yml @@ -0,0 +1,92 @@ +# GitHub action to build LAMMPS on Linux with gcc and C++23 +name: "Check for C++23 Compatibility" + +on: + push: + branches: + - develop + pull_request: + branches: + - develop + + workflow_dispatch: + +jobs: + build: + name: Build with C++23 support enabled + if: ${{ github.repository == 'lammps/lammps' }} + runs-on: ubuntu-latest + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Install extra packages + run: | + sudo apt-get update + sudo apt-get install -y ccache \ + libeigen3-dev \ + libcurl4-openssl-dev \ + mold \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + python3-dev + + - name: Create Build Environment + run: mkdir build + + - name: Set up ccache + uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: linux-cpp23-ccache-${{ github.sha }} + restore-keys: linux-cpp23-ccache- + + - name: Building LAMMPS via CMake + shell: bash + run: | + ccache -z + python3 -m venv linuxenv + source linuxenv/bin/activate + python3 -m pip install numpy + python3 -m pip install pyyaml + cmake -S cmake -B build \ + -C cmake/presets/most.cmake \ + -C cmake/presets/kokkos-openmp.cmake \ + -D CMAKE_CXX_STANDARD=23 \ + -D CMAKE_CXX_COMPILER=g++ \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -D CMAKE_C_COMPILER_LAUNCHER=ccache \ + -D CMAKE_BUILD_TYPE=Debug \ + -D CMAKE_CXX_FLAGS_DEBUG="-Og -g" \ + -D DOWNLOAD_POTENTIALS=off \ + -D BUILD_MPI=on \ + -D BUILD_SHARED_LIBS=on \ + -D BUILD_TOOLS=off \ + -D ENABLE_TESTING=off \ + -D MLIAP_ENABLE_ACE=on \ + -D MLIAP_ENABLE_PYTHON=off \ + -D PKG_AWPMD=on \ + -D PKG_GPU=on \ + -D GPU_API=opencl \ + -D PKG_KOKKOS=on \ + -D PKG_LATBOLTZ=on \ + -D PKG_MDI=on \ + -D PKG_MANIFOLD=on \ + -D PKG_ML-PACE=on \ + -D PKG_ML-RANN=off \ + -D PKG_MOLFILE=on \ + -D PKG_RHEO=on \ + -D PKG_PTM=on \ + -D PKG_PYTHON=on \ + -D PKG_QTB=on \ + -D PKG_SMTBQ=on \ + -G Ninja + cmake --build build + ccache -s diff --git a/.github/workflows/kokkos-regression.yaml b/.github/workflows/kokkos-regression.yaml new file mode 100644 index 0000000000..0756b080b0 --- /dev/null +++ b/.github/workflows/kokkos-regression.yaml @@ -0,0 +1,124 @@ +# GitHub action to build LAMMPS on Linux and run selected regression tests +name: "Kokkos OpenMP Regression Test" + +on: + pull_request: + branches: + - develop + + workflow_dispatch: + +jobs: + build: + name: Build LAMMPS with Kokkos OpenMP + # restrict to official LAMMPS repository + if: ${{ github.repository == 'lammps/lammps' }} + runs-on: ubuntu-latest + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + strategy: + max-parallel: 4 + matrix: + idx: [ 'pair', 'fix', 'compute', 'misc' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 + show-progress: false + + - name: Install extra packages + run: | + sudo apt-get update + sudo apt-get install -y ccache ninja-build libeigen3-dev \ + libcurl4-openssl-dev python3-dev \ + mpi-default-bin mpi-default-dev + + - name: Create Build Environment + run: mkdir build + + - name: Set up ccache + uses: actions/cache@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: linux-kokkos-ccache-${{ github.sha }} + restore-keys: linux-kokkos-ccache- + + - name: Building LAMMPS via CMake + shell: bash + run: | + ccache -z + python3 -m venv linuxenv + source linuxenv/bin/activate + python3 -m pip install --upgrade pip + python3 -m pip install numpy pyyaml junit_xml + cmake -S cmake -B build \ + -C cmake/presets/gcc.cmake \ + -C cmake/presets/basic.cmake \ + -C cmake/presets/kokkos-openmp.cmake \ + -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -D CMAKE_C_COMPILER_LAUNCHER=ccache \ + -D BUILD_SHARED_LIBS=off \ + -D DOWNLOAD_POTENTIALS=off \ + -D PKG_AMOEBA=on \ + -D PKG_ASPHERE=on \ + -D PKG_BROWNIAN=on \ + -D PKG_CLASS2=on \ + -D PKG_COLLOID=on \ + -D PKG_CORESHELL=on \ + -D PKG_DIPOLE=on \ + -D PKG_DPD-BASIC=on \ + -D PKG_EXTRA-COMPUTE=on \ + -D PKG_EXTRA-FIX=on \ + -D PKG_EXTRA-MOLECULE=on \ + -D PKG_EXTRA-PAIR=on \ + -D PKG_GRANULAR=on \ + -D PKG_LEPTON=on \ + -D PKG_MC=on \ + -D PKG_MEAM=on \ + -D PKG_POEMS=on \ + -D PKG_PYTHON=on \ + -D PKG_QEQ=on \ + -D PKG_REAXFF=on \ + -D PKG_REPLICA=on \ + -D PKG_SRD=on \ + -D PKG_VORONOI=on \ + -G Ninja + cmake --build build + ccache -s + + - name: Run Regression Tests for Selected Examples + shell: bash + run: | + source linuxenv/bin/activate + python3 tools/regression-tests/get_kokkos_input.py \ + --examples-top-level=examples \ + --filter-out="balance;fire;gcmc;granregion;mdi;mliap;neb;pace;prd;pour;python;snap" + + python3 tools/regression-tests/run_tests.py \ + --lmp-bin=build/lmp \ + --config-file=tools/regression-tests/config_kokkos_openmp.yaml \ + --list-input=input-list-${{ matrix.idx }}-kk.txt \ + --output-file=output-${{ matrix.idx }}.xml \ + --progress-file=progress-${{ matrix.idx }}.yaml \ + --log-file=run-${{ matrix.idx }}.log \ + --quick-max=100 --verbose + + tar -cvf kokkos-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: kokkos-regression-test-artifact-${{ matrix.idx }} + path: kokkos-regression-test-${{ matrix.idx }}.tar + + merge: + runs-on: ubuntu-latest + needs: build + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: merged-kokkos-regresssion-artifact + pattern: kokkos-regression-test-artifact-* diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1bd387b5b9..8d57e237b3 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -118,7 +118,7 @@ endif() # silence excessive warnings for new Intel Compilers if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") - set(CMAKE_TUNE_DEFAULT "-Wno-tautological-constant-compare -Wno-unused-command-line-argument") + set(CMAKE_TUNE_DEFAULT "-fp-model precise -Wno-tautological-constant-compare -Wno-unused-command-line-argument") endif() # silence excessive warnings for PGI/NVHPC compilers @@ -141,7 +141,7 @@ endif() # silence nvcc warnings if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma") + set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma -Xcudafe --diag_suppress=128") endif() # we require C++11 without extensions. Kokkos requires at least C++17 (currently) @@ -165,6 +165,7 @@ if(MSVC) add_compile_options(/wd4267) add_compile_options(/wd4250) add_compile_options(/EHsc) + add_compile_options(/utf-8) endif() add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() @@ -822,9 +823,15 @@ foreach(_DEF ${LAMMPS_DEFINES}) set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -D${_DEF}") endforeach() if(BUILD_SHARED_LIBS) - install(TARGETS lammps EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS lammps EXPORT LAMMPS_Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) if(NOT BUILD_MPI) - install(TARGETS mpi_stubs EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS mpi_stubs EXPORT LAMMPS_Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/cmake/Modules/Documentation.cmake b/cmake/Modules/Documentation.cmake index 7b8f4a5ba0..dfaf7bdb39 100644 --- a/cmake/Modules/Documentation.cmake +++ b/cmake/Modules/Documentation.cmake @@ -110,6 +110,7 @@ if(BUILD_DOC) add_custom_command( OUTPUT html DEPENDS ${DOC_SOURCES} ${DOCENV_DEPS} ${DOXYGEN_XML_DIR}/index.xml ${BUILD_DOC_CONFIG_FILE} + COMMAND ${Python3_EXECUTABLE} ${LAMMPS_DOC_DIR}/utils/make-globbed-tocs.py -d ${LAMMPS_DOC_DIR}/src COMMAND Sphinx::sphinx-build ${SPHINX_EXTRA_OPTS} -b html -c ${DOC_BUILD_DIR} -d ${DOC_BUILD_DIR}/doctrees ${LAMMPS_DOC_DIR}/src ${DOC_BUILD_DIR}/html COMMAND ${CMAKE_COMMAND} -E create_symlink Manual.html ${DOC_BUILD_DIR}/html/index.html COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src/PDF ${DOC_BUILD_DIR}/html/PDF diff --git a/cmake/Modules/FindVORO.cmake b/cmake/Modules/FindVORO.cmake index 3f0fe98ff1..80bcfcfb53 100644 --- a/cmake/Modules/FindVORO.cmake +++ b/cmake/Modules/FindVORO.cmake @@ -21,9 +21,9 @@ if(VORO_FOUND) set(VORO_LIBRARIES ${VORO_LIBRARY}) set(VORO_INCLUDE_DIRS ${VORO_INCLUDE_DIR}) - if(NOT TARGET VORO::VORO) - add_library(VORO::VORO UNKNOWN IMPORTED) - set_target_properties(VORO::VORO PROPERTIES + if(NOT TARGET VORO::voro++) + add_library(VORO::voro++ UNKNOWN IMPORTED) + set_target_properties(VORO::voro++ PROPERTIES IMPORTED_LOCATION "${VORO_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${VORO_INCLUDE_DIR}") endif() diff --git a/cmake/Modules/Packages/H5MD.cmake b/cmake/Modules/Packages/H5MD.cmake index 6f6922f13e..1e611b94e6 100644 --- a/cmake/Modules/Packages/H5MD.cmake +++ b/cmake/Modules/Packages/H5MD.cmake @@ -3,7 +3,7 @@ enable_language(C) # we don't use the parallel i/o interface. set(HDF5_PREFER_PARALLEL FALSE) -find_package(HDF5 REQUIRED) +find_package(HDF5 COMPONENTS C REQUIRED) # parallel HDF5 will import incompatible MPI headers with a serial build if((NOT BUILD_MPI) AND HDF5_IS_PARALLEL) diff --git a/cmake/Modules/Packages/VORONOI.cmake b/cmake/Modules/Packages/VORONOI.cmake index c010469677..cbc350340f 100644 --- a/cmake/Modules/Packages/VORONOI.cmake +++ b/cmake/Modules/Packages/VORONOI.cmake @@ -54,5 +54,5 @@ else() if(NOT VORO_FOUND) message(FATAL_ERROR "Voro++ library not found. Help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it") endif() - target_link_libraries(lammps PRIVATE VORO::VORO) + target_link_libraries(lammps PRIVATE VORO::voro++) endif() diff --git a/cmake/presets/kokkos-sycl-intel.cmake b/cmake/presets/kokkos-sycl-intel.cmake index 3fc75e4b2d..eba386564d 100644 --- a/cmake/presets/kokkos-sycl-intel.cmake +++ b/cmake/presets/kokkos-sycl-intel.cmake @@ -6,13 +6,24 @@ set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE) set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE) set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE) +set(FFT "MKL" CACHE STRING "" FORCE) +set(FFT_KOKKOS "MKL_GPU" CACHE STRING "" FORCE) + +unset(USE_INTERNAL_LINALG) +unset(USE_INTERNAL_LINALG CACHE) +set(BLAS_VENDOR "Intel10_64_dyn") + # hide deprecation warnings temporarily for stable release set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) set(CMAKE_CXX_COMPILER icpx CACHE STRING "" FORCE) +set(CMAKE_C_COMPILER icx CACHE STRING "" FORCE) +set(CMAKE_Fortran_COMPILER "" CACHE STRING "" FORCE) set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE) # Silence everything set(CMAKE_CXX_FLAGS "-w" CACHE STRING "" FORCE) -set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code -fsycl-max-parallel-link-jobs=32 -fsycl-targets=spir64_gen -Xsycl-target-backend \"-device 12.60.7\" " CACHE STRING "" FORCE) -set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen" CACHE STRING "" FORCE) +#set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code -fsycl-targets=spir64_gen " CACHE STRING "" FORCE) +#set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen" CACHE STRING "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code " CACHE STRING "" FORCE) +set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel " CACHE STRING "" FORCE) diff --git a/cmake/presets/oneapi.cmake b/cmake/presets/oneapi.cmake index 393d1d9b68..d98817e4b0 100644 --- a/cmake/presets/oneapi.cmake +++ b/cmake/presets/oneapi.cmake @@ -3,26 +3,9 @@ set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE) set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE) set(CMAKE_Fortran_COMPILER "ifx" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE) - set(MPI_CXX "icpx" CACHE STRING "" FORCE) set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) -unset(HAVE_OMP_H_INCLUDE CACHE) -set(OpenMP_C "icx" CACHE STRING "" FORCE) -set(OpenMP_C_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE) -set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE) -set(OpenMP_CXX "icpx" CACHE STRING "" FORCE) -set(OpenMP_CXX_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE) -set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE) -set(OpenMP_Fortran_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE) -set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE) +# force using internal BLAS/LAPCK since external ones may not be ABI compatible +set(USE_INTERNAL_LINALG ON CACHE BOOL "" FORCE) diff --git a/doc/.gitignore b/doc/.gitignore index 7c953d2432..28e583fa0b 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -17,3 +17,10 @@ *.el /utils/sphinx-config/_static/mathjax /utils/sphinx-config/_static/polyfill.js +/src/pairs.rst +/src/bonds.rst +/src/angles.rst +/src/dihedrals.rst +/src/impropers.rst +/src/computes.rst +/src/fixes.rst diff --git a/doc/Makefile b/doc/Makefile index f9f8336665..d26e6020a6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -83,7 +83,10 @@ $(SPHINXCONFIG)/conf.py: $(SPHINXCONFIG)/conf.py.in -e 's,@LAMMPS_PYTHON_DIR@,$(BUILDDIR)/../python,g' \ -e 's,@LAMMPS_DOC_DIR@,$(BUILDDIR),g' $< > $@ -html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) +globbed-tocs: + $(PYTHON) $(BUILDDIR)/utils/make-globbed-tocs.py -d $(RSTDIR) + +html: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @$(MAKE) $(MFLAGS) -C graphviz all @(\ @@ -113,7 +116,7 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) @rm -rf html/PDF/.[sg]* @echo "Build finished. The HTML pages are in doc/html." -fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) +fasthtml: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @$(MAKE) $(MFLAGS) -C graphviz all @mkdir -p fasthtml @@ -132,7 +135,7 @@ fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) @rm -rf fasthtml/PDF/.[sg]* @echo "Fast HTML build finished. The HTML pages are in doc/fasthtml." -spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt +spelling: xmlgen globbed-tocs $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @(\ . $(VENV)/bin/activate ; \ @@ -143,7 +146,7 @@ spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives ) @echo "Spell check finished." -epub: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) +epub: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @$(MAKE) $(MFLAGS) -C graphviz all @mkdir -p epub/JPG @@ -166,7 +169,7 @@ mobi: epub @ebook-convert LAMMPS.epub LAMMPS.mobi @echo "Conversion finished. The MOBI manual file is created." -pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) +pdf: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @$(MAKE) $(MFLAGS) -C graphviz all @if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index d9febcc289..232a209613 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -178,6 +178,7 @@ OPT. * :doc:`python/move ` * :doc:`qbmsst ` * :doc:`qeq/comb (o) ` + * :doc:`qeq/ctip ` * :doc:`qeq/dynamic ` * :doc:`qeq/fire ` * :doc:`qeq/point ` diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index dfed8f7485..5f42f53bd5 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -44,7 +44,7 @@ OPT. * :doc:`born/coul/wolf/cs (g) ` * :doc:`born/gauss ` * :doc:`bpm/spring ` - * :doc:`brownian (o) ` + * :doc:`brownian (ko) ` * :doc:`brownian/poly (o) ` * :doc:`buck (giko) ` * :doc:`buck/coul/cut (giko) ` @@ -59,6 +59,7 @@ OPT. * :doc:`comb (o) ` * :doc:`comb3 ` * :doc:`cosine/squared ` + * :doc:`coul/ctip ` * :doc:`coul/cut (gko) ` * :doc:`coul/cut/dielectric ` * :doc:`coul/cut/global (o) ` diff --git a/doc/src/Howto_bioFF.rst b/doc/src/Howto_bioFF.rst index 72dcec2d31..92dd45b9b6 100644 --- a/doc/src/Howto_bioFF.rst +++ b/doc/src/Howto_bioFF.rst @@ -1,5 +1,5 @@ -CHARMM, AMBER, COMPASS, and DREIDING force fields -================================================= +CHARMM, AMBER, COMPASS, DREIDING, and OPLS force fields +======================================================= A compact summary of the concepts, definitions, and properties of force fields with explicit bonded interactions (like the ones discussed @@ -236,6 +236,40 @@ documentation for the formula it computes. * :doc:`special_bonds ` dreiding +OPLS +---- + +OPLS (Optimized Potentials for Liquid Simulations) is a general force +field for atomistic simulation of organic molecules in solvent. It was +developed by the `Jorgensen group +`_ at Purdue University and +later at Yale University. Multiple versions of the OPLS parameters +exist for united atom representations (OPLS-UA) and for all-atom +representations (OPLS-AA). + +This force field is based on atom types mapped to specific functional +groups in organic and biological molecules. Each atom includes a +static, partial atomic charge reflecting the oxidation state of the +element derived from its bonded neighbors :ref:`(Jorgensen) +` and computed based on increments determined by the +atom type of the atoms bond to it. + +The interaction styles listed below compute force field formulas that +are fully or in part consistent with the OPLS style force fields. See +each command's documentation for the formula it computes. Some are only +compatible with a subset of OPLS interactions. + +* :doc:`bond_style ` harmonic +* :doc:`angle_style ` harmonic +* :doc:`dihedral_style ` opls +* :doc:`improper_style ` cvff +* :doc:`improper_style ` fourier +* :doc:`improper_style ` harmonic +* :doc:`pair_style ` lj/cut/coul/cut +* :doc:`pair_style ` lj/cut/coul/long +* :doc:`pair_modify ` geometric +* :doc:`special_bonds ` lj/coul 0.0 0.0 0.5 + ---------- .. _Typelabel2: @@ -266,3 +300,6 @@ documentation for the formula it computes. **(Mayo)** Mayo, Olfason, Goddard III (1990). J Phys Chem, 94, 8897-8909. https://doi.org/10.1021/j100389a010 +.. _howto-Jorgensen: + +**(Jorgensen)** Jorgensen, Tirado-Rives (1988). J Am Chem Soc, 110, 1657-1666. https://doi.org/10.1021/ja00214a001 diff --git a/doc/src/Howto_bpm.rst b/doc/src/Howto_bpm.rst index 86e091fcef..3dee00fc15 100644 --- a/doc/src/Howto_bpm.rst +++ b/doc/src/Howto_bpm.rst @@ -42,7 +42,8 @@ Currently, there are two types of bonds included in the BPM package. The first bond style, :doc:`bond bpm/spring `, only applies pairwise, central body forces. Point particles must have :doc:`bond atom style ` and may be thought of as nodes in a spring -network. Alternatively, the second bond style, :doc:`bond bpm/rotational +network. An optional multibody term can be used to adjust the network's +Poisson's ratio. Alternatively, the second bond style, :doc:`bond bpm/rotational `, resolves tangential forces and torques arising with the shearing, bending, and twisting of the bond due to rotation or displacement of particles. Particles are similar to those used in the @@ -55,8 +56,9 @@ orientation similar to :doc:`fix nve/asphere `. In addition to bond styles, a new pair style :doc:`pair bpm/spring ` was added to accompany the bpm/spring bond -style. This pair style is simply a hookean repulsion with similar -velocity damping as its sister bond style. +style. By default, this pair style is simply a hookean repulsion with +similar velocity damping as its sister bond style, but optional +arguments can be used to modify the force. ---------- diff --git a/doc/src/Howto_chunk.rst b/doc/src/Howto_chunk.rst index f8655b745d..ea000eb22f 100644 --- a/doc/src/Howto_chunk.rst +++ b/doc/src/Howto_chunk.rst @@ -58,28 +58,30 @@ chunk ID for an individual atom can also be static (e.g. a molecule ID), or dynamic (e.g. what spatial bin an atom is in as it moves). Note that this compute allows the per-atom output of other -:doc:`computes `, :doc:`fixes `, and -:doc:`variables ` to be used to define chunk IDs for each -atom. This means you can write your own compute or fix to output a -per-atom quantity to use as chunk ID. See the :doc:`Modify ` -doc pages for info on how to do this. You can also define a :doc:`per-atom variable ` in the input script that uses a formula to -generate a chunk ID for each atom. +:doc:`computes `, :doc:`fixes `, and :doc:`variables +` to be used to define chunk IDs for each atom. This means +you can write your own compute or fix to output a per-atom quantity to +use as chunk ID. See the :doc:`Modify ` doc pages for info on +how to do this. You can also define a :doc:`per-atom variable +` in the input script that uses a formula to generate a chunk +ID for each atom. Fix ave/chunk command: ---------------------- -This fix takes the ID of a :doc:`compute chunk/atom ` command as input. For each chunk, -it then sums one or more specified per-atom values over the atoms in -each chunk. The per-atom values can be any atom property, such as -velocity, force, charge, potential energy, kinetic energy, stress, -etc. Additional keywords are defined for per-chunk properties like -density and temperature. More generally any per-atom value generated -by other :doc:`computes `, :doc:`fixes `, and :doc:`per-atom variables `, can be summed over atoms in each chunk. +This fix takes the ID of a :doc:`compute chunk/atom +` command as input. For each chunk, it then sums +one or more specified per-atom values over the atoms in each chunk. The +per-atom values can be any atom property, such as velocity, force, +charge, potential energy, kinetic energy, stress, etc. Additional +keywords are defined for per-chunk properties like density and +temperature. More generally any per-atom value generated by other +:doc:`computes `, :doc:`fixes `, and :doc:`per-atom +variables `, can be summed over atoms in each chunk. Similar to other averaging fixes, this fix allows the summed per-chunk values to be time-averaged in various ways, and output to a file. The -fix produces a global array as output with one row of values per -chunk. +fix produces a global array as output with one row of values per chunk. Compute \*/chunk commands: -------------------------- @@ -97,17 +99,20 @@ category: * :doc:`compute torque/chunk ` * :doc:`compute vcm/chunk ` -They each take the ID of a :doc:`compute chunk/atom ` command as input. As their names -indicate, they calculate the center-of-mass, radius of gyration, -moments of inertia, mean-squared displacement, temperature, torque, -and velocity of center-of-mass for each chunk of atoms. The :doc:`compute property/chunk ` command can tally the -count of atoms in each chunk and extract other per-chunk properties. +They each take the ID of a :doc:`compute chunk/atom +` command as input. As their names indicate, they +calculate the center-of-mass, radius of gyration, moments of inertia, +mean-squared displacement, temperature, torque, and velocity of +center-of-mass for each chunk of atoms. The :doc:`compute +property/chunk ` command can tally the count of +atoms in each chunk and extract other per-chunk properties. -The reason these various calculations are not part of the :doc:`fix ave/chunk command `, is that each requires a more +The reason these various calculations are not part of the :doc:`fix +ave/chunk command `, is that each requires a more complicated operation than simply summing and averaging over per-atom -values in each chunk. For example, many of them require calculation -of a center of mass, which requires summing mass\*position over the -atoms and then dividing by summed mass. +values in each chunk. For example, many of them require calculation of +a center of mass, which requires summing mass\*position over the atoms +and then dividing by summed mass. All of these computes produce a global vector or global array as output, with one or more values per chunk. The output can be used in @@ -118,9 +123,10 @@ various ways: * As input to the :doc:`fix ave/histo ` command to histogram values across chunks. E.g. a histogram of cluster sizes or molecule diffusion rates. -* As input to special functions of :doc:`equal-style variables `, like sum() and max() and ave(). E.g. to - find the largest cluster or fastest diffusing molecule or average - radius-of-gyration of a set of molecules (chunks). +* As input to special functions of :doc:`equal-style variables + `, like sum() and max() and ave(). E.g. to find the largest + cluster or fastest diffusing molecule or average radius-of-gyration of + a set of molecules (chunks). Other chunk commands: --------------------- @@ -138,9 +144,10 @@ spatially average per-chunk values calculated by a per-chunk compute. The :doc:`compute reduce/chunk ` command reduces a peratom value across the atoms in each chunk to produce a value per -chunk. When used with the :doc:`compute chunk/spread/atom ` command it can -create peratom values that induce a new set of chunks with a second -:doc:`compute chunk/atom ` command. +chunk. When used with the :doc:`compute chunk/spread/atom +` command it can create peratom values that +induce a new set of chunks with a second :doc:`compute chunk/atom +` command. Example calculations with chunks -------------------------------- diff --git a/doc/src/Intro_portability.rst b/doc/src/Intro_portability.rst index 472a2bee88..036529ff9d 100644 --- a/doc/src/Intro_portability.rst +++ b/doc/src/Intro_portability.rst @@ -31,18 +31,19 @@ Operating systems ^^^^^^^^^^^^^^^^^ The primary development platform for LAMMPS is Linux. Thus, the chances -for LAMMPS to compile without problems on Linux machines are the best. +for LAMMPS to compile without problems are the best on Linux machines. Also, compilation and correct execution on macOS and Windows (using -Microsoft Visual C++) is checked automatically for largest part of the -source code. Some (optional) features are not compatible with all +Microsoft Visual C++) is checked automatically for the largest part of +the source code. Some (optional) features are not compatible with all operating systems, either through limitations of the corresponding -LAMMPS source code or through source code or build system -incompatibilities of required libraries. +LAMMPS source code or through incompatibilities of source code or +build system of required external libraries or packages. Executables for Windows may be created natively using either Cygwin or Visual Studio or with a Linux to Windows MinGW cross-compiler. -Additionally, FreeBSD and Solaris have been tested successfully. +Additionally, FreeBSD and Solaris have been tested successfully to +run LAMMPS and produce results consistent with those on Linux. Compilers ^^^^^^^^^ diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 43429feb03..466d4134cb 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -880,7 +880,7 @@ groups of atoms that interact with the remaining atoms as electrolyte. **Authors:** The ELECTRODE package is written and maintained by Ludwig Ahrens-Iwers (TUHH, Hamburg, Germany), Shern Tee (UQ, Brisbane, Australia) and -Robert Meissner (TUHH, Hamburg, Germany). +Robert Meissner (Helmholtz-Zentrum Hereon, Geesthacht and TUHH, Hamburg, Germany). .. versionadded:: 4May2022 diff --git a/doc/src/Run_windows.rst b/doc/src/Run_windows.rst index 0c0a07f4c7..8c2eac2bc6 100644 --- a/doc/src/Run_windows.rst +++ b/doc/src/Run_windows.rst @@ -3,71 +3,70 @@ Running LAMMPS on Windows To run a serial (non-MPI) executable, follow these steps: -* Get a command prompt by going to Start->Run... , - then typing "cmd". -* Move to the directory where you have your input script, +* Install a LAMMPS installer package from https://packages.lammps.org/windows.html +* Open the "Command Prompt" or "Terminal" app. +* Change to the directory where you have your input script, (e.g. by typing: cd "Documents"). -* At the command prompt, type "lmp -in in.file", where - in.file is the name of your LAMMPS input script. +* At the command prompt, type "lmp -in in.file.lmp", where + ``in.file.lmp`` is the name of your LAMMPS input script. Note that the serial executable includes support for multi-threading -parallelization from the styles in the OPENMP packages. To run with -4 threads, you can type this: +parallelization from the styles in the OPENMP and KOKKOS packages. +To run with 4 threads, you can type this: .. code-block:: bash - lmp -in in.lj -pk omp 4 -sf omp + lmp -in in.lj.lmp -pk omp 4 -sf omp + lmp -in in.lj.lmp -k on t 4 -sf kk + +Alternately, you can also install a package with LAMMPS-GUI included and +open the LAMMPS-GUI app (the package includes the command line version +of LAMMPS as well) and open the input file in the GUI and run it from +there. For details on LAMMPS-GUI, see :doc:`Howto_lammps_gui`. ---------- -For the MPI executable, which allows you to run LAMMPS under Windows -in parallel, follow these steps. +For the MS-MPI executables, which allow you to run LAMMPS under Windows +in parallel using MPI rather than multi-threading, follow these steps. -Download and install a compatible MPI library binary package: - -* for 32-bit Windows: `mpich2-1.4.1p1-win-ia32.msi `_ -* for 64-bit Windows: `mpich2-1.4.1p1-win-x86-64.msi `_ - -The LAMMPS Windows installer packages will automatically adjust your -path for the default location of this MPI package. After the -installation of the MPICH2 software, it needs to be integrated into -the system. For this you need to start a Command Prompt in -*Administrator Mode* (right click on the icon and select it). Change -into the MPICH2 installation directory, then into the subdirectory -**bin** and execute **smpd.exe -install**\ . Exit the command window. - -* Get a new, regular command prompt by going to Start->Run... , - then typing "cmd". -* Move to the directory where you have your input file - (e.g. by typing: cd "Documents"). +Download and install the MS-MPI runtime package ``msmpisetup.exe`` from +https://www.microsoft.com/en-us/download/details.aspx?id=105289 (Note +that the ``msmpisdk.msi`` is **only** required for **compilation** of +LAMMPS from source on Windows using Microsoft Visual Studio). After +installation of MS-MPI perform a reboot. Then you can run the executable in serial like in the example above or in parallel using MPI with one of the following commands: .. code-block:: bash - mpiexec -localonly 4 lmp -in in.file - mpiexec -np 4 lmp -in in.file + mpiexec -localonly 4 lmp -in in.file.lmp + mpiexec -np 4 lmp -in in.file.lmp -where in.file is the name of your LAMMPS input script. For the latter -case, you may be prompted to enter the password that you set during -installation of the MPI library software. +where ``in.file.lmp`` is the name of your LAMMPS input script. For the +latter case, you may be prompted to enter the password that you set +during installation of the MPI library software. In this mode, output may not immediately show up on the screen, so if your input script takes a long time to execute, you may need to be patient before the output shows up. -The parallel executable can also run on a single processor by typing -something like this: +Note that the parallel executable also includes OpenMP multi-threading +through both the OPENMP and the KOKKOS package, which can be combined +with MPI using something like: .. code-block:: bash - lmp -in in.lj + mpiexec -localonly 2 lmp -in in.lj.lmp -pk omp 2 -sf omp + mpiexec -localonly 2 lmp -in in.lj.lmp -kokkos on t 2 -sf kk -Note that the parallel executable also includes OpenMP -multi-threading, which can be combined with MPI using something like: - -.. code-block:: bash - - mpiexec -localonly 2 lmp -in in.lj -pk omp 2 -sf omp +------------- +MPI parallelization will work for *all* functionality in LAMMPS and in +many cases the MPI parallelization is more efficient than +multi-threading since LAMMPS was designed from ground up for MPI +parallelization using domain decomposition. Multi-threading is only +available for selected styles and implemented on top of the MPI +parallelization. Multi-threading is most useful for systems with large +load imbalances when using domain decomposition and a smaller number +of threads (<= 8). diff --git a/doc/src/angles.rst b/doc/src/angles.rst deleted file mode 100644 index c940689d4d..0000000000 --- a/doc/src/angles.rst +++ /dev/null @@ -1,8 +0,0 @@ -Angle Styles -############ - -.. toctree:: - :maxdepth: 1 - :glob: - - angle_* diff --git a/doc/src/bond_bpm_spring.rst b/doc/src/bond_bpm_spring.rst index 81582bd5ea..4bc5cd3463 100644 --- a/doc/src/bond_bpm_spring.rst +++ b/doc/src/bond_bpm_spring.rst @@ -10,7 +10,7 @@ Syntax bond_style bpm/spring keyword value attribute1 attribute2 ... -* optional keyword = *overlay/pair* or *store/local* or *smooth* or *break* +* optional keyword = *overlay/pair* or *store/local* or *smooth* or *break* or *volume/factor* .. parsed-literal:: @@ -36,6 +36,9 @@ Syntax *break* value = *yes* or *no* indicates whether bonds break during a run + *volume/factor* value = *yes* or *no* + indicates whether forces include the volumetric contribution + Examples """""""" @@ -44,6 +47,9 @@ Examples bond_style bpm/spring bond_coeff 1 1.0 0.05 0.1 + bond_style bpm/spring volume/factor yes + bond_coeff 1 1.0 0.05 0.1 0.5 + bond_style bpm/spring myfix 1000 time id1 id2 dump 1 all local 1000 dump.broken f_myfix[1] f_myfix[2] f_myfix[3] dump_modify 1 write_header no @@ -97,15 +103,6 @@ approach the critical strain w = 1.0 - \left( \frac{r - r_0}{r_0 \epsilon_c} \right)^8 . -The following coefficients must be defined for each bond type via the -:doc:`bond_coeff ` command as in the example above, or in -the data file or restart files read by the :doc:`read_data -` or :doc:`read_restart ` commands: - -* :math:`k` (force/distance units) -* :math:`\epsilon_c` (unit less) -* :math:`\gamma` (force/velocity units) - If the *normalize* keyword is set to *yes*, the elastic bond force will be normalized by :math:`r_0` such that :math:`k` must be given in force units. @@ -123,6 +120,43 @@ during a simulation run. This will prevent some unnecessary calculation. However, if a bond reaches a strain greater than :math:`\epsilon_c`, it will trigger an error. +.. versionadded:: TBD + +The *volume/factor* keyword toggles whether an additional multibody +contribution is added to he force using the formulation in +:ref:`(Clemmer2) `, + +.. math:: + + \alpha_v \left(\left[\frac{V_i + V_j}{V_{0,i} + V_{0,j}}\right]^{1/3} - \frac{r_{ij}}{r_{0,ij}}\right) + +where :math:`\alpha_v` is a user specified coefficient and :math:`V_i` +and :math:`V_{0,i}` are estimates of the current and local volume +of atom :math:`i`. These volumes are calculated as the sum of current +or initial bond lengths cubed. In 2D, the volume is replaced with an area +calculated using bond lengths squared and the cube root in the above equation +is accordingly replaced with a square root. This approximation assumes bonds +are evenly distributed on a spherical surface and neglects constant prefactors +which are irrelevant since only the ratio of volumes matters. This term may be +used to adjust the Poisson's ratio. + +If a bond is broken (or created), :math:`V_{0,i}` is updated by subtracting +(or adding) that bond's contribution. + +The following coefficients must be defined for each bond type via the +:doc:`bond_coeff ` command as in the example above, or in +the data file or restart files read by the :doc:`read_data +` or :doc:`read_restart ` commands: + +* :math:`k` (force/distance units) +* :math:`\epsilon_c` (unit less) +* :math:`\gamma` (force/velocity units) + +Additionally, if *volume/factor* is set to *yes*, a fourth coefficient +must be provided: + +* :math:`a_v` (force units) + If the *store/local* keyword is used, an internal fix will track bonds that break during the simulation. Whenever a bond breaks, data is processed and transferred to an internal fix labeled *fix_ID*. This allows the @@ -213,7 +247,7 @@ Related commands Default """"""" -The option defaults are *overlay/pair* = *no*, *smooth* = *yes*, *normalize* = *no*, and *break* = *yes* +The option defaults are *overlay/pair* = *no*, *smooth* = *yes*, *normalize* = *no*, *break* = *yes*, and *volume/factor* = *no* ---------- @@ -224,3 +258,7 @@ The option defaults are *overlay/pair* = *no*, *smooth* = *yes*, *normalize* = * .. _Groot4: **(Groot)** Groot and Warren, J Chem Phys, 107, 4423-35 (1997). + +.. _multibody-Clemmer: + +**(Clemmer2)** Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024). diff --git a/doc/src/bonds.rst b/doc/src/bonds.rst deleted file mode 100644 index 4118e153e9..0000000000 --- a/doc/src/bonds.rst +++ /dev/null @@ -1,8 +0,0 @@ -Bond Styles -########### - -.. toctree:: - :maxdepth: 1 - :glob: - - bond_* diff --git a/doc/src/compute_angle_local.rst b/doc/src/compute_angle_local.rst index 126dd309af..d4491c6945 100644 --- a/doc/src/compute_angle_local.rst +++ b/doc/src/compute_angle_local.rst @@ -78,7 +78,7 @@ system and output the statistics in various ways: compute 2 all angle/local eng theta v_cos v_cossq set theta t dump 1 all local 100 tmp.dump c_1[*] c_2[*] - compute 3 all reduce ave c_2[*] + compute 3 all reduce ave c_2[*] inputs local thermo_style custom step temp press c_3[*] fix 10 all ave/histo 10 10 100 -1 1 20 c_2[3] mode vector file tmp.histo diff --git a/doc/src/compute_bond_local.rst b/doc/src/compute_bond_local.rst index 5036358c8c..e070d507b1 100644 --- a/doc/src/compute_bond_local.rst +++ b/doc/src/compute_bond_local.rst @@ -139,7 +139,7 @@ output the statistics in various ways: compute 2 all bond/local engpot dist v_dsq set dist d dump 1 all local 100 tmp.dump c_1[*] c_2[*] - compute 3 all reduce ave c_2[*] + compute 3 all reduce ave c_2[*] inputs local thermo_style custom step temp press c_3[*] fix 10 all ave/histo 10 10 100 0 6 20 c_2[3] mode vector file tmp.histo diff --git a/doc/src/compute_composition_atom.rst b/doc/src/compute_composition_atom.rst index c3e6fb7c60..4b68e7c79e 100644 --- a/doc/src/compute_composition_atom.rst +++ b/doc/src/compute_composition_atom.rst @@ -88,6 +88,10 @@ too frequently. ---------- +.. include:: accel_styles.rst + +---------- + Output info """"""""""" diff --git a/doc/src/compute_dihedral_local.rst b/doc/src/compute_dihedral_local.rst index 291b870373..d809cd39ce 100644 --- a/doc/src/compute_dihedral_local.rst +++ b/doc/src/compute_dihedral_local.rst @@ -76,7 +76,7 @@ angle in the system and output the statistics in various ways: compute 2 all dihedral/local phi v_cos v_cossq set phi p dump 1 all local 100 tmp.dump c_1[*] c_2[*] - compute 3 all reduce ave c_2[*] + compute 3 all reduce ave c_2[*] inputs local thermo_style custom step temp press c_3[*] fix 10 all ave/histo 10 10 100 -1 1 20 c_2[2] mode vector file tmp.histo diff --git a/doc/src/compute_pressure.rst b/doc/src/compute_pressure.rst index 439f701bd4..92dcdb307a 100644 --- a/doc/src/compute_pressure.rst +++ b/doc/src/compute_pressure.rst @@ -125,10 +125,6 @@ where thermo_temp is the ID of a similarly defined compute of style ---------- -.. include:: accel_styles.rst - ----------- - Output info """"""""""" diff --git a/doc/src/compute_reduce.rst b/doc/src/compute_reduce.rst index 9eafe7cd5a..e5c99a478f 100644 --- a/doc/src/compute_reduce.rst +++ b/doc/src/compute_reduce.rst @@ -206,11 +206,13 @@ IDs and the bond stretch will be printed with thermodynamic output. The *inputs* keyword allows selection of whether all the inputs are per-atom or local quantities. As noted above, all the inputs must be -the same kind (per-atom or local). Per-atom is the default setting. -If a compute or fix is specified as an input, it must produce per-atom -or local data to match this setting. If it produces both, e.g. for +the same kind (per-atom or local). Per-atom is the default setting. If +a compute or fix is specified as an input, it must produce per-atom or +local data to match this setting. If it produces both, like for example the :doc:`compute voronoi/atom ` command, then -this keyword selects between them. +this keyword selects between them. If a compute *only* produces local +data, like for example the :doc:`compute bond/local command +`, the setting "inputs local" is *required*. ---------- diff --git a/doc/src/compute_reduce_chunk.rst b/doc/src/compute_reduce_chunk.rst index 8ec19ade66..eeadd50a97 100644 --- a/doc/src/compute_reduce_chunk.rst +++ b/doc/src/compute_reduce_chunk.rst @@ -37,55 +37,57 @@ Description Define a calculation that reduces one or more per-atom vectors into per-chunk values. This can be useful for diagnostic output. Or when -used in conjunction with the :doc:`compute chunk/spread/atom ` command it can be -used to create per-atom values that induce a new set of chunks with a -second :doc:`compute chunk/atom ` command. An -example is given below. +used in conjunction with the :doc:`compute chunk/spread/atom +` command it can be used to create per-atom +values that induce a new set of chunks with a second :doc:`compute +chunk/atom ` command. An example is given below. -In LAMMPS, chunks are collections of atoms defined by a :doc:`compute chunk/atom ` command, which assigns each atom -to a single chunk (or no chunk). The ID for this command is specified -as chunkID. For example, a single chunk could be the atoms in a -molecule or atoms in a spatial bin. See the :doc:`compute chunk/atom ` and :doc:`Howto chunk ` -doc pages for details of how chunks can be defined and examples of how -they can be used to measure properties of a system. +In LAMMPS, chunks are collections of atoms defined by a :doc:`compute +chunk/atom ` command, which assigns each atom to a +single chunk (or no chunk). The ID for this command is specified as +chunkID. For example, a single chunk could be the atoms in a molecule +or atoms in a spatial bin. See the :doc:`compute chunk/atom +` and :doc:`Howto chunk ` doc pages for +details of how chunks can be defined and examples of how they can be +used to measure properties of a system. For each atom, this compute accesses its chunk ID from the specified -*chunkID* compute. The per-atom value from an input contributes -to a per-chunk value corresponding the the chunk ID. +*chunkID* compute. The per-atom value from an input contributes to a +per-chunk value corresponding the chunk ID. The reduction operation is specified by the *mode* setting and is performed over all the per-atom values from the atoms in each chunk. -The *sum* option adds the pre-atom values to a per-chunk total. The -*min* or *max* options find the minimum or maximum value of the -per-atom values for each chunk. +The *sum* option adds the per-atom values to a per-chunk total. The +*min* or *max* options find the minimum or maximum value of the per-atom +values for each chunk. -Note that only atoms in the specified group contribute to the -reduction operation. If the *chunkID* compute returns a 0 for the -chunk ID of an atom (i.e., the atom is not in a chunk defined by the -:doc:`compute chunk/atom ` command), that atom will -also not contribute to the reduction operation. An input that is a -compute or fix may define its own group which affects the quantities -it returns. For example, a compute with return a zero value for atoms -that are not in the group specified for that compute. +Note that only atoms in the specified group contribute to the reduction +operation. If the *chunkID* compute returns a 0 for the chunk ID of an +atom (i.e., the atom is not in a chunk defined by the :doc:`compute +chunk/atom ` command), that atom will also not +contribute to the reduction operation. An input that is a compute or +fix may define its own group which affects the quantities it returns. +For example, a compute will return a zero value for atoms that are not +in the group specified for that compute. Each listed input is operated on independently. Each input can be the -result of a :doc:`compute ` or :doc:`fix ` or the evaluation -of an atom-style :doc:`variable `. +result of a :doc:`compute ` or :doc:`fix ` or the +evaluation of an atom-style :doc:`variable `. -Note that for values from a compute or fix, the bracketed index I can -be specified using a wildcard asterisk with the index to effectively +Note that for values from a compute or fix, the bracketed index I can be +specified using a wildcard asterisk with the index to effectively specify multiple values. This takes the form "\*" or "\*n" or "m\*" or -"m\*n". If :math:`N` is the size of the vector (for *mode* = scalar) or the -number of columns in the array (for *mode* = vector), then an asterisk -with no numeric values means all indices from 1 to :math:`N`. A leading -asterisk means all indices from 1 to n (inclusive). A trailing -asterisk means all indices from n to :math:`N` (inclusive). A middle asterisk -means all indices from m to n (inclusive). +"m\*n". If :math:`N` is the size of the vector (for *mode* = scalar) or +the number of columns in the array (for *mode* = vector), then an +asterisk with no numeric values means all indices from 1 to :math:`N`. +A leading asterisk means all indices from 1 to n (inclusive). A +trailing asterisk means all indices from n to :math:`N` (inclusive). A +middle asterisk means all indices from m to n (inclusive). Using a wildcard is the same as if the individual columns of the array -had been listed one by one. For example, the following two compute reduce/chunk -commands are equivalent, since the -:doc:`compute property/chunk ` command creates a per-atom +had been listed one by one. For example, the following two compute +reduce/chunk commands are equivalent, since the :doc:`compute +property/chunk ` command creates a per-atom array with 3 columns: .. code-block:: LAMMPS @@ -164,13 +166,14 @@ Output info """"""""""" This compute calculates a global vector if a single input value is -specified, otherwise a global array is output. The number of columns -in the array is the number of inputs provided. The length of the -vector or the number of vector elements or array rows = the number of -chunks *Nchunk* as calculated by the specified :doc:`compute chunk/atom ` command. The vector or array can -be accessed by any command that uses global values from a compute as -input. See the :doc:`Howto output ` page for an -overview of LAMMPS output options. +specified, otherwise a global array is output. The number of columns in +the array is the number of inputs provided. The length of the vector or +the number of vector elements or array rows = the number of chunks +*Nchunk* as calculated by the specified :doc:`compute chunk/atom +` command. The vector or array can be accessed by +any command that uses global values from a compute as input. See the +:doc:`Howto output ` page for an overview of LAMMPS output +options. The per-atom values for the vector or each column of the array will be in whatever :doc:`units ` the corresponding input value is in. @@ -183,7 +186,9 @@ Restrictions Related commands """""""""""""""" -:doc:`compute chunk/atom `, :doc:`compute reduce `, :doc:`compute chunk/spread/atom ` +:doc:`compute chunk/atom `, +:doc:`compute reduce `, +:doc:`compute chunk/spread/atom ` Default """"""" diff --git a/doc/src/compute_rheo_property_atom.rst b/doc/src/compute_rheo_property_atom.rst index 2e905b97be..8686a0dec2 100644 --- a/doc/src/compute_rheo_property_atom.rst +++ b/doc/src/compute_rheo_property_atom.rst @@ -81,7 +81,7 @@ includes *xx*, *xy*, *yx*, and *yy*. In 3D, this includes *xx*, *xy*, *xz*, Many properties require their respective fixes, listed below in related commands, be defined. For instance, the *viscosity* attribute is the viscosity of a particle calculated by -:doc:`fix rheo/viscous `. The meaning of less obvious +:doc:`fix rheo/viscosity `. The meaning of less obvious properties is described below. The *phase* property indicates whether the particle is in a fluid state, diff --git a/doc/src/compute_stress_mop.rst b/doc/src/compute_stress_mop.rst index b4779b8bf3..31c81b5df7 100644 --- a/doc/src/compute_stress_mop.rst +++ b/doc/src/compute_stress_mop.rst @@ -129,6 +129,9 @@ package ` doc page on for more info. The method is implemented for orthogonal simulation boxes whose size does not change in time, and axis-aligned planes. +Contributions from bonds, angles, and dihedrals are not compatible +with MPI parallel runs. + The method only works with two-body pair interactions, because it requires the class method ``Pair::single()`` to be implemented, which is not possible for manybody potentials. In particular, compute diff --git a/doc/src/compute_temp_deform.rst b/doc/src/compute_temp_deform.rst index 1c8c2da096..abeb7041cc 100644 --- a/doc/src/compute_temp_deform.rst +++ b/doc/src/compute_temp_deform.rst @@ -128,6 +128,12 @@ See the :doc:`Howto thermostat ` page for a discussion of different ways to compute temperature and perform thermostatting. +---------- + +.. include:: accel_styles.rst + +---------- + Output info """"""""""" diff --git a/doc/src/compute_temp_partial.rst b/doc/src/compute_temp_partial.rst index d98558c159..43691c048e 100644 --- a/doc/src/compute_temp_partial.rst +++ b/doc/src/compute_temp_partial.rst @@ -82,12 +82,6 @@ See the :doc:`Howto thermostat ` page for a discussion of different ways to compute temperature and perform thermostatting. ----------- - -.. include:: accel_styles.rst - ----------- - Output info """"""""""" diff --git a/doc/src/computes.rst b/doc/src/computes.rst deleted file mode 100644 index 8d53b6cf06..0000000000 --- a/doc/src/computes.rst +++ /dev/null @@ -1,8 +0,0 @@ -Computes -######## - -.. toctree:: - :maxdepth: 1 - :glob: - - compute_* diff --git a/doc/src/dihedrals.rst b/doc/src/dihedrals.rst deleted file mode 100644 index f56e323427..0000000000 --- a/doc/src/dihedrals.rst +++ /dev/null @@ -1,8 +0,0 @@ -Dihedral Styles -############### - -.. toctree:: - :maxdepth: 1 - :glob: - - dihedral_* diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 4919c226fd..ee52be224e 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -357,6 +357,7 @@ accelerated styles exist. * :doc:`python/move ` - move particles using a Python function during a simulation run * :doc:`qbmsst ` - quantum bath multi-scale shock technique time integrator * :doc:`qeq/comb ` - charge equilibration for COMB potential +* :doc:`qeq/ctip ` - charge equilibration for CTIP potential * :doc:`qeq/dynamic ` - charge equilibration via dynamic method * :doc:`qeq/fire ` - charge equilibration via FIRE minimizer * :doc:`qeq/point ` - charge equilibration via point method diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index a44ce8e780..1b5282f741 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -322,29 +322,33 @@ all types from 1 to :math:`N`. A leading asterisk means all types from If :doc:`bond_style hybrid ` is used, *bstyle* should be a sub-style name. The bond styles that currently work with fix adapt are: -+---------------------------------------------------+---------------------------+------------+ -| :doc:`class2 ` | r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`fene ` | k,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`fene/expand ` | k,r0,epsilon,sigma,shift | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`fene/nm ` | k,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`gromos ` | k,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`harmonic ` | k,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`harmonic/shift ` | k,r0,r1 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`harmonic/restrain ` | k | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`mm3 ` | k,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`morse ` | r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ -| :doc:`nonlinear ` | epsilon,r0 | type bonds | -+---------------------------------------------------+---------------------------+------------+ ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`class2 ` | k2,k3,k4,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`fene ` | k,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`fene/expand ` | k,r0,epsilon,sigma,shift | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`fene/nm ` | k,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`gaussian ` | alpha,width,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`gromos ` | k,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`harmonic ` | k,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`harmonic/restrain ` | k | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`harmonic/shift ` | k,r0,r1 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`harmonic/shift/cut ` | k,r0,r1 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`mm3 ` | k,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`morse ` | d0,alpha,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ +| :doc:`nonlinear ` | lamda,epsilon,r0 | type bonds | ++-----------------------------------------------------+---------------------------+------------+ ---------- @@ -367,31 +371,37 @@ all types from 1 to :math:`N`. A leading asterisk means all types from If :doc:`angle_style hybrid ` is used, *astyle* should be a sub-style name. The angle styles that currently work with fix adapt are: -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`harmonic ` | k,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`charmm ` | k,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`class2 ` | k2,k3,k4,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`cosine ` | k | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`cosine/periodic ` | k,b,n | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`cosine/squared/restricted ` | k,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`dipole ` | k,gamma0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`fourier ` | k,c0,c1,c2 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`fourier/simple ` | k,c,n | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`mm3 ` | k,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`quartic ` | k2,k3,k4,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ -| :doc:`spica ` | k,theta0 | type angles | -+--------------------------------------------------------------------+-----------------+-------------+ ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`harmonic ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`charmm ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`class2 ` | k2,k3,k4,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`cosine ` | k | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`cosine/delta ` | k | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`cosine/periodic ` | k,b,n | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`cosine/squared ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`cosine/squared/restricted ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`dipole ` | k,gamma0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`fourier ` | k,c0,c1,c2 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`fourier/simple ` | k,c,n | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`gaussian ` | alpha,width,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`mm3 ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`quartic ` | k2,k3,k4,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ +| :doc:`spica ` | k,theta0 | type angles | ++--------------------------------------------------------------------+--------------------+-------------+ Note that internally, theta0 is stored in radians, so the variable this fix uses to reset theta0 needs to generate values in radians. diff --git a/doc/src/fix_addforce.rst b/doc/src/fix_addforce.rst index 68a32695b7..2813270307 100644 --- a/doc/src/fix_addforce.rst +++ b/doc/src/fix_addforce.rst @@ -115,10 +115,6 @@ correctly, the minimization will not converge properly. ---------- -.. include:: accel_styles.rst - ----------- - Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_atom_swap.rst b/doc/src/fix_atom_swap.rst index 48f5b33a74..fd4a2f7245 100644 --- a/doc/src/fix_atom_swap.rst +++ b/doc/src/fix_atom_swap.rst @@ -119,15 +119,14 @@ groups of atoms that have different charges, these charges will not be changed when the atom types change. Since this fix computes total potential energies before and after -proposed swaps, so even complicated potential energy calculations are -OK, including the following: +proposed swaps, even complicated potential energy calculations are +acceptable, including the following: * long-range electrostatics (:math:`k`-space) * many body pair styles -* hybrid pair styles -* eam pair styles +* hybrid pair styles (with restrictions) +* EAM pair styles * triclinic systems -* need to include potential energy contributions from other fixes Some fixes have an associated potential energy. Examples of such fixes include: :doc:`efield `, :doc:`gravity `, @@ -181,6 +180,10 @@ This fix is part of the MC package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. +When this fix is used with a :doc:`hybrid pair style ` +system, only swaps between atom types of the same sub-style (or +combination of sub-styles) are permitted. + This fix cannot be used with systems that do not have per-type masses (e.g. atom style sphere) since the implemented algorithm pre-computes velocity rescaling factors from per-type masses and ignores any per-atom diff --git a/doc/src/fix_aveforce.rst b/doc/src/fix_aveforce.rst index ea535697f4..36f53ef571 100644 --- a/doc/src/fix_aveforce.rst +++ b/doc/src/fix_aveforce.rst @@ -71,10 +71,6 @@ to it. ---------- -.. include:: accel_styles.rst - ----------- - Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_gcmc.rst b/doc/src/fix_gcmc.rst index e6037af586..beb36fbafd 100644 --- a/doc/src/fix_gcmc.rst +++ b/doc/src/fix_gcmc.rst @@ -50,8 +50,8 @@ Syntax *intra_energy* value = intramolecular energy (energy units) *tfac_insert* value = scale up/down temperature of inserted atoms (unitless) *overlap_cutoff* value = maximum pair distance for overlap rejection (distance units) - *max* value = Maximum number of molecules allowed in the system - *min* value = Minimum number of molecules allowed in the system + *max* value = Maximum number of atoms allowed in the fix group (and region) + *min* value = Minimum number of atoms allowed in the fix group (and region) Examples """""""" @@ -380,10 +380,11 @@ an infinite positive energy to all new configurations that place any pair of atoms closer than the specified overlap cutoff distance. The *max* and *min* keywords allow for the restriction of the number of -atoms in the simulation. They automatically reject all insertion or -deletion moves that would take the system beyond the set boundaries. -Should the system already be beyond the boundary, only moves that bring -the system closer to the bounds may be accepted. +atoms in the fix group (and region in case the *region* keyword is +used). They automatically reject all insertion or deletion moves that +would take the system beyond the set boundaries. Should the system +already be beyond the boundary, only moves that bring the system closer +to the bounds may be accepted. The *group* keyword adds all inserted atoms to the :doc:`group ` of the group-ID value. The *grouptype* keyword adds all inserted atoms diff --git a/doc/src/fix_halt.rst b/doc/src/fix_halt.rst index 25331804aa..0bcf2fb5ea 100644 --- a/doc/src/fix_halt.rst +++ b/doc/src/fix_halt.rst @@ -101,7 +101,7 @@ hstyle = bondmax option. .. code-block:: LAMMPS compute bdist all bond/local dist - compute bmax all reduce max c_bdist + compute bmax all reduce max c_bdist inputs local variable bondmax equal c_bmax Thus these two versions of a fix halt command will do the same thing: diff --git a/doc/src/fix_langevin.rst b/doc/src/fix_langevin.rst index e04805427e..30e4c48270 100644 --- a/doc/src/fix_langevin.rst +++ b/doc/src/fix_langevin.rst @@ -231,12 +231,6 @@ the particles. As described below, this energy can then be printed out or added to the potential energy of the system to monitor energy conservation. -.. note:: - - This accumulated energy does NOT include kinetic energy removed - by the *zero* flag. LAMMPS will print a warning when both options are - active. - The keyword *zero* can be used to eliminate drift due to the thermostat. Because the random forces on different atoms are independent, they do not sum exactly to zero. As a result, this fix diff --git a/doc/src/fix_nonaffine_displacement.rst b/doc/src/fix_nonaffine_displacement.rst index fd9830cc48..5fdd3ae772 100644 --- a/doc/src/fix_nonaffine_displacement.rst +++ b/doc/src/fix_nonaffine_displacement.rst @@ -102,7 +102,6 @@ zeroed. The *update* reference style implies the reference state will be updated *nstep* timesteps. The *offset* reference will update the reference state *nstep* timesteps before a multiple of *nevery* timesteps. - ---------- Restart, fix_modify, output, run start/stop, minimize info @@ -129,6 +128,12 @@ This compute is part of the EXTRA-FIX package. It is only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +As this fix depends on a run including specific reference timesteps, it +currently does not update peratom values if used in conjunction with the +:doc:`rerun command ` since it cannot ensure the necessary reference +timesteps are included. + + Related commands """""""""""""""" diff --git a/doc/src/fix_nph_body.rst b/doc/src/fix_nph_body.rst index 9ee0bd7669..4cc6084ad1 100644 --- a/doc/src/fix_nph_body.rst +++ b/doc/src/fix_nph_body.rst @@ -79,8 +79,6 @@ It also means that changing attributes of *thermo_temp* or ---------- -.. include:: accel_styles.rst - Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_npt_body.rst b/doc/src/fix_npt_body.rst index 31ef1653b8..b1a7e56fe4 100644 --- a/doc/src/fix_npt_body.rst +++ b/doc/src/fix_npt_body.rst @@ -103,8 +103,6 @@ remaining thermal degrees of freedom, and the bias is added back in. ---------- -.. include:: accel_styles.rst - Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_nvt_body.rst b/doc/src/fix_nvt_body.rst index 4397159515..c3275a0e00 100644 --- a/doc/src/fix_nvt_body.rst +++ b/doc/src/fix_nvt_body.rst @@ -85,8 +85,6 @@ remaining thermal degrees of freedom, and the bias is added back in. ---------- -.. include:: accel_styles.rst - Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fix_pour.rst b/doc/src/fix_pour.rst index 3b4bb5c723..7986929745 100644 --- a/doc/src/fix_pour.rst +++ b/doc/src/fix_pour.rst @@ -155,6 +155,22 @@ many timesteps until the desired # of particles has been inserted. the :doc:`compute_modify dynamic/dof yes ` command for the temperature compute you are using. +.. admonition:: Implementation Notes + :class: Hint + + The exact insertion procedure depends on many factors (e.g. the range of + diameters inserted or whether molecules are being inserted). However, in + the simplest scenario of monodisperse atoms, the procedure works as + follows. First, the number of timesteps between two insertion events is + calculated as the time for a particle to fall through the insertion region, + accounting for gravity and any region motion. Next, the target number of + particles inserted per event (assuming no failed insertions due to overlaps) + is calculated as the product of the volume fraction and the volume of the + insertion region divided by the volume of a particle (or area in 2D). + Events are repeated until all N particles have been inserted, where + the final event is likely interrupted upon reaching N. Estimates of this + process are printed to the log/screen at the start of a run. + ---------- All other keywords are optional with defaults as shown below. diff --git a/doc/src/fix_qeq.rst b/doc/src/fix_qeq.rst index f353e9a998..fd317666d0 100644 --- a/doc/src/fix_qeq.rst +++ b/doc/src/fix_qeq.rst @@ -1,6 +1,7 @@ .. index:: fix qeq/point .. index:: fix qeq/shielded .. index:: fix qeq/slater +.. index:: fix qeq/ctip .. index:: fix qeq/dynamic .. index:: fix qeq/fire @@ -13,6 +14,9 @@ fix qeq/shielded command fix qeq/slater command ====================== +fix qeq/ctip command +==================== + fix qeq/dynamic command ======================= @@ -27,18 +31,20 @@ Syntax fix ID group-ID style Nevery cutoff tolerance maxiter qfile keyword ... * ID, group-ID are documented in :doc:`fix ` command -* style = *qeq/point* or *qeq/shielded* or *qeq/slater* or *qeq/dynamic* or *qeq/fire* +* style = *qeq/point* or *qeq/shielded* or *qeq/slater* or *qeq/ctip* or *qeq/dynamic* or *qeq/fire* * Nevery = perform charge equilibration every this many steps * cutoff = global cutoff for charge-charge interactions (distance unit) * tolerance = precision to which charges will be equilibrated * maxiter = maximum iterations to perform charge equilibration -* qfile = a filename with QEq parameters or *coul/streitz* or *reaxff* +* qfile = a filename with QEq parameters or *coul/streitz* or *coul/ctip* or *reaxff* * zero or more keyword/value pairs may be appended -* keyword = *alpha* or *qdamp* or *qstep* or *warn* +* keyword = *alpha* or *cdamp* or *maxrepeat* or *qdamp* or *qstep* or *warn* .. parsed-literal:: *alpha* value = Slater type orbital exponent (qeq/slater only) + *cdamp* value = damping parameter for Coulomb interactions (qeq/ctip only) + *maxrepeat* value = number of equilibration cycles allowed to ensure no atoms cross charge bounds (qeq/ctip only) *qdamp* value = damping factor for damped dynamics charge solver (qeq/dynamic and qeq/fire only) *qstep* value = time step size for damped dynamics charge solver (qeq/dynamic and qeq/fire only) *warn* value = do (=yes) or do not (=no) print a warning when the maximum number of iterations is reached @@ -51,6 +57,7 @@ Examples fix 1 all qeq/point 1 10 1.0e-6 200 param.qeq1 fix 1 qeq qeq/shielded 1 8 1.0e-6 100 param.qeq2 fix 1 all qeq/slater 5 10 1.0e-6 100 params alpha 0.2 + fix 1 all qeq/ctip 1 12 1.0e-8 100 coul/ctip cdamp 0.30 maxrepeat 10 fix 1 qeq qeq/dynamic 1 12 1.0e-3 100 my_qeq fix 1 all qeq/fire 1 10 1.0e-3 100 my_qeq qdamp 0.2 qstep 0.1 @@ -103,7 +110,7 @@ equalizes the derivative of energy with respect to charge of all the atoms) by adjusting the partial charge on individual atoms based on interactions with their neighbors within *cutoff*\ . It requires a few parameters in the appropriate units for each atom type which are read -from a file specified by *qfile*\ . The file has the following format +from a file specified by *qfile*\ . The file has the following format: .. parsed-literal:: @@ -112,20 +119,32 @@ from a file specified by *qfile*\ . The file has the following format ... Ntype chi eta gamma zeta qcore +except for fix style *qeq/ctip* where the format is: + +.. parsed-literal:: + + 1 chi eta gamma zeta qcore qmin qmax omega + 2 chi eta gamma zeta qcore qmin qmax omega + ... + Ntype chi eta gamma zeta qcore qmin qmax omega + There have to be parameters given for every atom type. Wildcard entries are possible using the same type range syntax as for "coeff" commands (i.e., n\*m, n\*, \*m, \*). Later entries will overwrite previous ones. -Empty lines or any text following the pound sign (#) are ignored. -Each line starts with the atom type followed by five parameters. -Only a subset of the parameters is used by each QEq style as described -below, thus the others can be set to 0.0 if desired, but all five -entries per line are required. +Empty lines or any text following the pound sign (#) are ignored. Each +line starts with the atom type followed by eight parameters. Only a +subset of the parameters is used by each QEq style as described below, +thus the others can be set to 0.0 if desired, but all eight entries per +line are required. * *chi* = electronegativity in energy units * *eta* = self-Coulomb potential in energy units * *gamma* = shielded Coulomb constant defined by :ref:`ReaxFF force field ` in distance units * *zeta* = Slater type orbital exponent defined by the :ref:`Streitz-Mintmire ` potential in reverse distance units * *qcore* = charge of the nucleus defined by the :ref:`Streitz-Mintmire potential ` potential in charge units +* *qmin* = lower bound on the allowed charge defined by the :ref:`CTIP ` potential in charge units +* *qmax* = upper bound on the allowed charge defined by the :ref:`CTIP ` potential in charge units +* *omega* = penalty parameter used to enforce charge bounds defined by the :ref:`CTIP ` potential in energy units The fix qeq styles will print a warning if the charges are not equilibrated within *tolerance* by *maxiter* steps, unless the @@ -171,6 +190,22 @@ on atoms via the matrix inversion method. A tolerance of 1.0e-6 is usually a good number. Keyword *alpha* can be used to change the Slater type orbital exponent. +.. versionadded:: TBD + +The *qeq/ctip* style describes partial charges on atoms in the same way +as style *qeq/shielded* but also enables the definition of charge +bounds. Only the *chi*, *eta*, *gamma*, *qmin*, *qmax*, and *omega* +parameters from the *qfile* file are used. When using the string +*coul/ctip* as filename, these parameters are extracted directly from an +active *coul/ctip* pair style. This style solves partial charges on +atoms via the matrix inversion method. Keyword *cdamp* can be used to +change the damping parameter used to calculate Coulomb interactions. +Keyword *maxrepeat* can be used to adjust the number of equilibration +cycles allowed to ensure no atoms have crossed the charge bounds. A +value of 10 is usually a good choice. A tolerance between 1.0e-6 and +1.0e-8 is usually a good choice but should be checked in conjunction +with the timestep for adequate energy conservation during dynamic runs. + The *qeq/dynamic* style describes partial charges on atoms as point charges that interact through 1/r, but the extended Lagrangian method is used to solve partial charges on atoms. Only the *chi* and *eta* @@ -186,7 +221,7 @@ minimization algorithm to solve for equilibrium charges. Keyword *qdamp* can be used to change the damping factor, while keyword *qstep* can be used to change the time step size. -Note that *qeq/point*, *qeq/shielded*, and *qeq/slater* describe +Note that *qeq/point*, *qeq/shielded*, *qeq/slater*, and *qeq/ctip* describe different charge models, whereas the matrix inversion method and the extended Lagrangian method (\ *qeq/dynamic* and *qeq/fire*\ ) are different solvers. @@ -266,6 +301,11 @@ Chemistry, 95, 3358-3363 (1991). **(Streitz-Mintmire)** F. H. Streitz, J. W. Mintmire, Physical Review B, 50, 16, 11996 (1994) +.. _CTIP1: + +**(CTIP)** G. Plummer, J. P. Tavenner, M. I. Mendelev, Z. Wu, J. W. Lawson, +in preparation + .. _vanDuin: **(ReaxFF)** A. C. T. van Duin, S. Dasgupta, F. Lorant, W. A. Goddard III, J diff --git a/doc/src/fix_rheo.rst b/doc/src/fix_rheo.rst index 2977662238..eb88ef0536 100644 --- a/doc/src/fix_rheo.rst +++ b/doc/src/fix_rheo.rst @@ -16,8 +16,7 @@ Syntax * kstyle = *quintic* or *RK0* or *RK1* or *RK2* * zmin = minimal number of neighbors for reproducing kernels * zero or more keyword/value pairs may be appended to args -* keyword = *thermal* or *interface/reconstruct* or *surface/detection* or - *shift* or *rho/sum* or *density* or *self/mass* or *speed/sound* +* keyword = *thermal* or *interface/reconstruct* or *surface/detection* or *shift* or *rho/sum* or *density* or *self/mass* or *speed/sound* .. parsed-literal:: diff --git a/doc/src/fix_wall_flow.rst b/doc/src/fix_wall_flow.rst index d498e57c63..ce2f204616 100644 --- a/doc/src/fix_wall_flow.rst +++ b/doc/src/fix_wall_flow.rst @@ -123,6 +123,12 @@ also be potentially mitigated by using more multiple walls. conservative as possible (every timestep if needed). Those are the default settings. +---------- + +.. include:: accel_styles.rst + +---------- + Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/fixes.rst b/doc/src/fixes.rst deleted file mode 100644 index eb0215e310..0000000000 --- a/doc/src/fixes.rst +++ /dev/null @@ -1,8 +0,0 @@ -Fixes -##### - -.. toctree:: - :maxdepth: 1 - :glob: - - fix_* diff --git a/doc/src/group.rst b/doc/src/group.rst index 15ab0c9dc8..a7a29467ff 100644 --- a/doc/src/group.rst +++ b/doc/src/group.rst @@ -162,7 +162,7 @@ potential energy is above the threshold value :math:`-3.0`. compute 1 all pe/atom compute 2 all reduce sum c_1 thermo_style custom step temp pe c_2 - run 0 + run 0 post no variable eatom atom "c_1 > -3.0" group hienergy variable eatom @@ -173,7 +173,7 @@ Note that these lines compute 2 all reduce sum c_1 thermo_style custom step temp pe c_2 - run 0 + run 0 post no are necessary to ensure that the "eatom" variable is current when the group command invokes it. Because the eatom variable computes the diff --git a/doc/src/impropers.rst b/doc/src/impropers.rst deleted file mode 100644 index a6653fde7d..0000000000 --- a/doc/src/impropers.rst +++ /dev/null @@ -1,8 +0,0 @@ -Improper Styles -############### - -.. toctree:: - :maxdepth: 1 - :glob: - - improper_* diff --git a/doc/src/min_style.rst b/doc/src/min_style.rst index b89ae6d398..bbf5236885 100644 --- a/doc/src/min_style.rst +++ b/doc/src/min_style.rst @@ -3,6 +3,8 @@ min_style cg command ==================== +Accelerator Variant: *cg/kk* + min_style hftn command ====================== diff --git a/doc/src/pair_bpm_spring.rst b/doc/src/pair_bpm_spring.rst index 7dfa9bc12c..068efff577 100644 --- a/doc/src/pair_bpm_spring.rst +++ b/doc/src/pair_bpm_spring.rst @@ -8,7 +8,14 @@ Syntax .. code-block:: LAMMPS - pair_style bpm/spring + pair_style bpm/spring keyword value ... + +* optional keyword = *anharmonic* + + .. parsed-literal:: + + *anharmonic* value = *yes* or *no* + whether forces include the anharmonic term Examples """""""" @@ -17,7 +24,8 @@ Examples pair_style bpm/spring pair_coeff * * 1.0 1.0 1.0 - pair_coeff 1 1 1.0 1.0 1.0 + pair_style bpm/spring anharmonic yes + pair_coeff 1 1 1.0 1.0 1.0 50.0 Description """"""""""" @@ -28,12 +36,16 @@ Style *bpm/spring* computes pairwise forces with the formula .. math:: - F = k (r - r_c) + F = k (r - r_c) + k_a (r - r_c)^3 -where :math:`k` is a stiffness and :math:`r_c` is the cutoff length. -An additional damping force is also applied to interacting -particles. The force is proportional to the difference in the -normal velocity of particles +where :math:`k` is a stiffness, :math:`r_c` is the cutoff +length, and :math:`k_a` is an optional anharmonic cubic prefactor +that can be enabled using the *anharmonic* keyword. The anharmonic +term may be useful in scenarios that need to prevent large particle overlap. + +An additional damping force is also applied to interacting particles. +The force is proportional to the difference in the normal velocity of +particles .. math:: @@ -73,6 +85,12 @@ commands, or by mixing as described below: * :math:`r_c` (distance units) * :math:`\gamma` (force/velocity units) +.. versionadded:: TBD + +Additionally, if *anharmonic* is set to *yes*, a fourth coefficient +must be provided: + +* :math:`k_a` (force/distance\^3 units) ---------- @@ -117,4 +135,5 @@ Related commands Default """"""" -none +The option defaults are *anharmonic* = *no* + diff --git a/doc/src/pair_brownian.rst b/doc/src/pair_brownian.rst index 9fec789ba0..a740952a5c 100644 --- a/doc/src/pair_brownian.rst +++ b/doc/src/pair_brownian.rst @@ -1,12 +1,13 @@ .. index:: pair_style brownian .. index:: pair_style brownian/omp +.. index:: pair_style brownian/kk .. index:: pair_style brownian/poly .. index:: pair_style brownian/poly/omp pair_style brownian command =========================== -Accelerator Variants: *brownian/omp* +Accelerator Variants: *brownian/omp*, *brownian/kk* pair_style brownian/poly command ================================ diff --git a/doc/src/pair_coul.rst b/doc/src/pair_coul.rst index e8f09515b0..17e9358754 100644 --- a/doc/src/pair_coul.rst +++ b/doc/src/pair_coul.rst @@ -4,6 +4,7 @@ .. index:: pair_style coul/cut/omp .. index:: pair_style coul/cut/global .. index:: pair_style coul/cut/global/omp +.. index:: pair_style coul/ctip .. index:: pair_style coul/debye .. index:: pair_style coul/debye/gpu .. index:: pair_style coul/debye/kk @@ -38,6 +39,9 @@ pair_style coul/cut/global command Accelerator Variants: *coul/cut/omp* +pair_style coul/ctip command +============================ + pair_style coul/debye command ============================= @@ -79,7 +83,6 @@ pair_style tip4p/long command Accelerator Variants: *tip4p/long/omp* - Syntax """""" @@ -87,6 +90,7 @@ Syntax pair_style coul/cut cutoff pair_style coul/cut/global cutoff + pair_style coul/ctip alpha cutoff pair_style coul/debye kappa cutoff pair_style coul/dsf alpha cutoff pair_style coul/exclude cutoff @@ -116,6 +120,9 @@ Examples pair_coeff * * pair_coeff 2 2 3.5 + pair_style coul/ctip 0.30 12.0 + pair_coeff * * NiO.ctip Ni O + pair_style coul/debye 1.4 3.0 pair_coeff * * pair_coeff 2 2 3.5 @@ -173,6 +180,33 @@ coulomb styles in :doc:`hybrid pair styles `. ---------- +.. versionadded:: TBD + +Style *coul/ctip* computes the Coulomb interactions as described in +:ref:`Plummer `. It uses the the damped shifted model as in +style *coul/dsf* but is further extended to the second derivative of the +potential and incorporates empirical charge shielding meant to +approximate the more expensive Coulomb integrals used in style +*coul/streitz*. More details can be found in the referenced paper. Like +the style *coul/streitz*, style *coul/ctip* is a variable charge +potential and must be hybridized with a short-range potential via the +:doc:`pair_style hybrid/overlay ` command. Charge +equilibration must be performed with the :doc:`fix qeq/ctip ` +command. For example: + +.. code-block:: LAMMPS + + pair_style hybrid/overlay eam/fs coul/ctip 0.30 12.0 + pair_coeff * * eam/fs NiO.eam.fs Ni O + pair_coeff * * coul/ctip NiO.ctip Ni O + fix 1 all qeq/ctip 1 12.0 1.0e-8 100 coul/ctip cdamp 0.30 maxrepeat 10 + +See the examples/ctip directory for an example input script using the +CTIP potential. An Ni-O CTIP and EAM/FS parameterization are included +for use with the example. + +---------- + Style *coul/debye* adds an additional exp() damping factor to the Coulombic term, given by @@ -399,16 +433,18 @@ Restrictions """""""""""" The *coul/long*, *coul/msm*, *coul/streitz*, and *tip4p/long* styles are -part of the KSPACE package. The *coul/cut/global*, *coul/exclude* styles are -part of the EXTRA-PAIR package. The *tip4p/cut* style is part of the MOLECULE -package. A pair style is only enabled if LAMMPS was built with its -corresponding package. See the :doc:`Build package ` -doc page for more info. +part of the KSPACE package. The *coul/cut/global*, *coul/exclude*, and +*coul/ctip* styles are part of the EXTRA-PAIR package. The *tip4p/cut* +style is part of the MOLECULE package. A pair style is only enabled if +LAMMPS was built with its corresponding package. See the +:doc:`Build package ` page for more info. Related commands """""""""""""""" -:doc:`pair_coeff `, :doc:`pair_style, hybrid/overlay `, :doc:`kspace_style ` +:doc:`pair_coeff `, +:doc:`pair_style hybrid/overlay `, +:doc:`kspace_style ` Default """"""" @@ -432,6 +468,11 @@ Phys, 110, 8254 (1999). **(Streitz)** F. H. Streitz, J. W. Mintmire, Phys Rev B, 50, 11996-12003 (1994). +.. _Plummer1: + +**(Plummer)** G. Plummer, J. P. Tavenner, M. I. Mendelev, Z. Wu, J. W. Lawson, +in preparation + .. _Jorgensen3: **(Jorgensen)** Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem diff --git a/doc/src/pair_coul_diel.rst b/doc/src/pair_coul_diel.rst index 77c00c633a..5b5b5f3501 100644 --- a/doc/src/pair_coul_diel.rst +++ b/doc/src/pair_coul_diel.rst @@ -71,6 +71,10 @@ The global cutoff (:math:`r_c`) specified in the pair_style command is used. ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_coul_slater.rst b/doc/src/pair_coul_slater.rst index 7abc1f8b07..7af1ec42c6 100644 --- a/doc/src/pair_coul_slater.rst +++ b/doc/src/pair_coul_slater.rst @@ -77,6 +77,10 @@ The global decay length of the charge (:math:`\lambda`) specified in the pair_st ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_granular.rst b/doc/src/pair_granular.rst index f061331497..e0f15ccd62 100644 --- a/doc/src/pair_granular.rst +++ b/doc/src/pair_granular.rst @@ -741,10 +741,6 @@ atom types. ---------- -.. include:: accel_styles.rst - ----------- - Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_mesodpd.rst b/doc/src/pair_mesodpd.rst index 28a398754f..6674b013ba 100644 --- a/doc/src/pair_mesodpd.rst +++ b/doc/src/pair_mesodpd.rst @@ -287,6 +287,10 @@ concentration profiles of the two chemical species as ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_mie.rst b/doc/src/pair_mie.rst index 6e9eec1f5c..0a0e1d9c32 100644 --- a/doc/src/pair_mie.rst +++ b/doc/src/pair_mie.rst @@ -62,6 +62,10 @@ cutoff specified in the pair_style command is used. ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_sph_heatconduction.rst b/doc/src/pair_sph_heatconduction.rst index e9004cb5a4..33472b64c7 100644 --- a/doc/src/pair_sph_heatconduction.rst +++ b/doc/src/pair_sph_heatconduction.rst @@ -39,6 +39,10 @@ above. ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_sph_lj.rst b/doc/src/pair_sph_lj.rst index 5ac7ab9c6b..4dbccc41de 100644 --- a/doc/src/pair_sph_lj.rst +++ b/doc/src/pair_sph_lj.rst @@ -43,6 +43,10 @@ above. ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_sph_taitwater.rst b/doc/src/pair_sph_taitwater.rst index 79972660c4..f25b69a969 100644 --- a/doc/src/pair_sph_taitwater.rst +++ b/doc/src/pair_sph_taitwater.rst @@ -52,6 +52,10 @@ above. ---------- +.. include:: accel_styles.rst + +---------- + Mixing, shift, table, tail correction, restart, rRESPA info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index 51350c86a4..fc2ed2b9a9 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -151,6 +151,7 @@ accelerated styles exist. * :doc:`comb ` - charge-optimized many-body (COMB) potential * :doc:`comb3 ` - charge-optimized many-body (COMB3) potential * :doc:`cosine/squared ` - Cooke-Kremer-Deserno membrane model potential +* :doc:`coul/ctip ` - Charge Transfer Interatomic (Coulomb) Potential * :doc:`coul/cut ` - cutoff Coulomb potential * :doc:`coul/cut/dielectric ` - * :doc:`coul/cut/global ` - cutoff Coulomb potential diff --git a/doc/src/pairs.rst b/doc/src/pairs.rst deleted file mode 100644 index b764c74cc7..0000000000 --- a/doc/src/pairs.rst +++ /dev/null @@ -1,8 +0,0 @@ -Pair Styles -########### - -.. toctree:: - :maxdepth: 1 - :glob: - - pair_* diff --git a/doc/src/read_dump.rst b/doc/src/read_dump.rst index 59d6cca78d..7f0e5bee42 100644 --- a/doc/src/read_dump.rst +++ b/doc/src/read_dump.rst @@ -115,10 +115,11 @@ to tell LAMMPS how many parallel files exist, via its specified The format of the dump file is selected through the *format* keyword. If specified, it must be the last keyword used, since all remaining -arguments are passed on to the dump reader. The *native* format is -for native LAMMPS dump files, written with a :doc:`dump atom ` -or :doc:`dump custom ` command. The *xyz* format is for generic XYZ -formatted dump files. These formats take no additional values. +arguments are passed on to the dump reader. The *native* format is for +native LAMMPS dump files, written with a :doc:`dump atom ` or +:doc:`dump custom ` command. The *xyz* format is for generic XYZ +formatted dump files (see details below). These formats take no +additional values. The *molfile* format supports reading data through using the `VMD `_ molfile plugin interface. This dump reader format is only available, @@ -230,23 +231,39 @@ will then have a label corresponding to the fix-ID rather than "x" or "xs". The *label* keyword can also be used to specify new column labels for fields *id* and *type*\ . -For dump files in *xyz* format, only the *x*, *y*, and *z* fields are -supported. The dump file does not store atom IDs, so these are -assigned consecutively to the atoms as they appear in the dump file, -starting from 1. Thus you should ensure that order of atoms is -consistent from snapshot to snapshot in the XYZ dump file. See -the :doc:`dump_modify sort ` command if the XYZ dump file -was written by LAMMPS. +For dump files in *xyz* format, only the *type*, *x*, *y*, and *z* +fields are supported. There are many variants of the XYZ file format. +LAMMPS will read the number of atoms from the first line of each frame, +ignore the second (title) line, and then read one line for each atom in the format: + +.. parsed-literal:: + +