Merge branch 'lammps:develop' into develop

This commit is contained in:
Dhairya Vyas
2024-09-20 13:57:25 -05:00
committed by GitHub
294 changed files with 11277 additions and 10035 deletions

18
.github/CODEOWNERS vendored
View File

@ -66,6 +66,9 @@ src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk
src/MANYBODY/pair_nb3b_screened.* @flodesani
src/REPLICA/*_grem.* @dstelter92
src/EXTRA-COMMAND/geturl.* @akohlmey
src/EXTRA-COMMAND/group_ndx.* @akohlmey
src/EXTRA-COMMAND/ndx_group.* @akohlmey
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
src/EXTRA-FIX/fix_deform_pressure.* @jtclemm
@ -96,9 +99,10 @@ src/fix.* @sjplimp
src/force.* @sjplimp
src/group.* @sjplimp
src/improper.* @sjplimp
src/info.* @akohlmey
src/kspace.* @sjplimp
src/lmptyp.h @sjplimp
src/library.* @sjplimp
src/library.* @sjplimp @akohlmey
src/main.cpp @sjplimp
src/min_*.* @sjplimp
src/memory.* @sjplimp
@ -106,12 +110,12 @@ src/modify.* @sjplimp @stanmoore1
src/molecule.* @sjplimp
src/my_page.h @sjplimp
src/my_pool_chunk.h @sjplimp
src/npair*.* @sjplimp
src/ntopo*.* @sjplimp
src/nstencil*.* @sjplimp
src/neighbor.* @sjplimp
src/nbin*.* @sjplimp
src/neigh_*.* @sjplimp
src/npair*.* @sjplimp @jtclemm
src/ntopo*.* @sjplimp @jtclemm
src/nstencil*.* @sjplimp @jtclemm
src/neighbor.* @sjplimp @jtclemm
src/nbin*.* @sjplimp @jtclemm
src/neigh_*.* @sjplimp @jtclemm
src/output.* @sjplimp
src/pair.* @sjplimp
src/rcb.* @sjplimp

89
.github/workflows/check-vla.yml vendored Normal file
View File

@ -0,0 +1,89 @@
# GitHub action to build LAMMPS on Linux with gcc and -Werror=vla
name: "Check for Variable Length Arrays"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build with -Werror=vla
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 install -y ccache \
libeigen3-dev \
libgsl-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-vla-ccache-${{ github.sha }}
restore-keys: linux-vla-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 \
-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 -Werror=vla" \
-D DOWNLOAD_POTENTIALS=off \
-D BUILD_MPI=on \
-D BUILD_SHARED_LIBS=off \
-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_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

View File

@ -1,5 +1,5 @@
# GitHub action to build LAMMPS on Windows with Visual C++
name: "Native Windows Compilation and Unit Tests"
# GitHub action to test LAMMPS on Windows with Visual C++
name: "Windows Unit Tests"
on:
push:
@ -11,11 +11,17 @@ on:
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Windows Compilation Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: windows-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
@ -23,36 +29,41 @@ jobs:
with:
fetch-depth: 2
- name: Enable MSVC++
uses: lammps/setup-msvc-dev@v3
with:
arch: x64
- name: Install Ccache
run: |
choco install ccache ninja -y
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: win-unit-ccache-${{ github.sha }}
restore-keys: win-unit-ccache-
- name: Select Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m pip install numpy
python3 -m pip install pyyaml
nuget install MSMPIsdk
nuget install MSMPIDIST
cmake -C cmake/presets/windows.cmake \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_PYTHON=on \
-D WITH_PNG=off \
-D WITH_JPEG=off \
-S cmake -B build \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on \
-D ENABLE_TESTING=on
cmake --build build --config Release --parallel 2
cmake -C cmake\presets\windows.cmake -D CMAKE_CXX_COMPILER=cl -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER=cl -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_Fortran_COMPILER="" -D DOWNLOAD_POTENTIALS=off -D PKG_PYTHON=on -D WITH_PNG=off -D WITH_JPEG=off -S cmake -B build -D BUILD_SHARED_LIBS=on -D ENABLE_TESTING=on -D CMAKE_BUILD_TYPE=Release -G Ninja
cmake --build build
ccache -s
- name: Run LAMMPS executable
shell: bash
run: |
./build/Release/lmp.exe -h
./build/Release/lmp.exe -in bench/in.lj
build\lmp.exe -h
build\lmp.exe -in bench\in.lj
- name: Run Unit Tests
working-directory: build
shell: bash
run: ctest -V -C Release -E FixTimestep:python_move_nve
run: ctest -V -E FixTimestep:python_move_nve

108
.github/workflows/full-regression.yml vendored Normal file
View File

@ -0,0 +1,108 @@
# GitHub action to build LAMMPS on Linux and run regression tests
name: "Full Regression Test"
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build LAMMPS
# restrict to official LAMMPS repository
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
strategy:
max-parallel: 8
matrix:
idx: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Install extra packages
run: |
sudo apt-get install -y ccache ninja-build libeigen3-dev \
libgsl-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-full-ccache-${{ github.sha }}
restore-keys: linux-full-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/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=off \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=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
- name: Run Full Regression Tests
shell: bash
run: |
source linuxenv/bin/activate
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_serial.yaml \
--examples-top-level=examples --analyze --num-workers=8
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_serial.yaml \
--list-input=input-list-${{ matrix.idx }}.txt \
--output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log
tar -cvf full-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: full-regression-test-artifact-${{ matrix.idx }}
path: full-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-full-regresssion-artifact
pattern: full-regression-test-artifact-*

117
.github/workflows/quick-regression.yml vendored Normal file
View File

@ -0,0 +1,117 @@
# GitHub action to build LAMMPS on Linux and run selected regression tests
name: "Quick Regression Test"
on:
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Build LAMMPS
# 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: [ 0, 1, 2, 3 ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Install extra packages
run: |
sudo apt-get install -y ccache ninja-build libeigen3-dev \
libgsl-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-quick-ccache-${{ github.sha }}
restore-keys: linux-quick-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/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=off \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=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
- name: Run Regression Tests for Modified Styles
shell: bash
run: |
source linuxenv/bin/activate
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_quick.yaml \
--examples-top-level=examples \
--quick-reference=tools/regression-tests/reference.yaml \
--quick --quick-branch=origin/develop --quick-max=100 --num-workers=4
if [ -f input-list-${{ matrix.idx }}.txt ]
then \
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_quick.yaml \
--list-input=input-list-${{ matrix.idx }}.txt \
--output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log
fi
tar -cvf quick-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: quick-regression-test-artifact-${{ matrix.idx }}
path: quick-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-quick-regresssion-artifact
pattern: quick-regression-test-artifact-*

37
.github/workflows/style-check.yml vendored Normal file
View File

@ -0,0 +1,37 @@
# GitHub action to run checks from tools/coding_standard
name: "Check for Programming Style Conformance"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Programming Style Conformance
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Tests
working-directory: src
shell: bash
run: |
make check-whitespace
make check-permissions
make check-homepage
make check-errordocs

86
.github/workflows/unittest-linux.yml vendored Normal file
View File

@ -0,0 +1,86 @@
# GitHub action to build LAMMPS on Linux and run standard unit tests
name: "Unittest for Linux /w LAMMPS_BIGBIG"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Linux Unit Test
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 install -y ccache \
libeigen3-dev \
libgsl-dev \
libcurl4-openssl-dev \
mold \
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-unit-ccache-${{ github.sha }}
restore-keys: linux-unit-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/gcc.cmake \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_SIZES=bigbig \
-D DOWNLOAD_POTENTIALS=off \
-D ENABLE_TESTING=on \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=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
- name: Run Tests
working-directory: build
shell: bash
run: ctest -V

View File

@ -11,6 +11,10 @@ on:
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: MacOS Unit Test

View File

@ -12,6 +12,11 @@ endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
# set policy to silence warnings about requiring execute permission for find_program
# we use OLD because the python-config script for the Fedora MinGW cross-compiler requires it currently
if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD)
endif()
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
@ -469,13 +474,13 @@ if(BUILD_OMP)
if(CMAKE_VERSION VERSION_LESS 3.28)
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE} -fopenmp")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
endif()
endif()
@ -510,14 +515,6 @@ if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_T
endif()
endif()
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
# tweak jpeg library names to avoid linker errors with MinGW cross-compilation
set(JPEG_NAMES libjpeg libjpeg-62)
find_package(JPEG QUIET)
@ -575,7 +572,7 @@ else()
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON RHEO)
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON RHEO EXTRA-COMMAND)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -968,6 +965,9 @@ message(STATUS "<<< Compilers and Flags: >>>
C++ Standard: ${CMAKE_CXX_STANDARD}
C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
Defines: ${DEFINES}")
if(CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_CXX_COMPILER_LAUNCHER}")
endif()
get_target_property(OPTIONS lammps COMPILE_OPTIONS)
if(OPTIONS)
message(" Options: ${OPTIONS}")
@ -986,6 +986,9 @@ if(_index GREATER -1)
Type: ${CMAKE_C_COMPILER_ID}
Version: ${CMAKE_C_COMPILER_VERSION}
C Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
if(CMAKE_C_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_C_COMPILER_LAUNCHER}")
endif()
endif()
message(STATUS "<<< Linker flags: >>>")
message(STATUS "Executable name: ${LAMMPS_BINARY}")

View File

@ -4,6 +4,8 @@
option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
if(BUILD_DOC)
option(BUILD_DOC_VENV "Build LAMMPS documentation virtual environment" ON)
mark_as_advanced(BUILD_DOC_VENV)
# Current Sphinx versions require at least Python 3.8
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
@ -18,14 +20,6 @@ if(BUILD_DOC)
find_package(Doxygen 1.8.10 REQUIRED)
file(GLOB DOC_SOURCES CONFIGURE_DEPENDS ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
add_custom_command(
OUTPUT docenv
COMMAND ${VIRTUALENV} docenv
)
set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
set(DOCENV_REQUIREMENTS_FILE ${LAMMPS_DOC_DIR}/utils/requirements.txt)
set(SPHINX_CONFIG_DIR ${LAMMPS_DOC_DIR}/utils/sphinx-config)
set(SPHINX_CONFIG_FILE_TEMPLATE ${SPHINX_CONFIG_DIR}/conf.py.in)
set(SPHINX_STATIC_DIR ${SPHINX_CONFIG_DIR}/_static)
@ -44,14 +38,32 @@ if(BUILD_DOC)
# configure paths in conf.py, since relative paths change when file is copied
configure_file(${SPHINX_CONFIG_FILE_TEMPLATE} ${DOC_BUILD_CONFIG_FILE})
add_custom_command(
OUTPUT ${DOC_BUILD_DIR}/requirements.txt
DEPENDS docenv ${DOCENV_REQUIREMENTS_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${DOCENV_REQUIREMENTS_FILE} ${DOC_BUILD_DIR}/requirements.txt
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade pip
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)
if(BUILD_DOC_VENV)
add_custom_command(
OUTPUT docenv
COMMAND ${VIRTUALENV} docenv
)
set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
set(DOCENV_REQUIREMENTS_FILE ${LAMMPS_DOC_DIR}/utils/requirements.txt)
add_custom_command(
OUTPUT ${DOC_BUILD_DIR}/requirements.txt
DEPENDS docenv ${DOCENV_REQUIREMENTS_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${DOCENV_REQUIREMENTS_FILE} ${DOC_BUILD_DIR}/requirements.txt
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade pip
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)
set(DOCENV_DEPS docenv ${DOC_BUILD_DIR}/requirements.txt)
if(NOT TARGET Sphinx::sphinx-build)
add_executable(Sphinx::sphinx-build IMPORTED GLOBAL)
set_target_properties(Sphinx::sphinx-build PROPERTIES IMPORTED_LOCATION "${DOCENV_BINARY_DIR}/sphinx-build")
endif()
else()
find_package(Sphinx)
endif()
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "b81661c6e6ba06278e6ae37b30b0c492" CACHE STRING "MD5 checksum of MathJax tarball")
@ -97,8 +109,8 @@ if(BUILD_DOC)
endif()
add_custom_command(
OUTPUT html
DEPENDS ${DOC_SOURCES} docenv ${DOC_BUILD_DIR}/requirements.txt ${DOXYGEN_XML_DIR}/index.xml ${BUILD_DOC_CONFIG_FILE}
COMMAND ${DOCENV_BINARY_DIR}/sphinx-build ${SPHINX_EXTRA_OPTS} -b html -c ${DOC_BUILD_DIR} -d ${DOC_BUILD_DIR}/doctrees ${LAMMPS_DOC_DIR}/src ${DOC_BUILD_DIR}/html
DEPENDS ${DOC_SOURCES} ${DOCENV_DEPS} ${DOXYGEN_XML_DIR}/index.xml ${BUILD_DOC_CONFIG_FILE}
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
COMMAND ${CMAKE_COMMAND} -E remove -f ${DOXYGEN_XML_DIR}/run.stamp

View File

@ -0,0 +1,29 @@
# Find sphinx-build
find_program(Sphinx_EXECUTABLE NAMES sphinx-build
PATH_SUFFIXES bin
DOC "Sphinx documenation build executable")
mark_as_advanced(Sphinx_EXECUTABLE)
if(Sphinx_EXECUTABLE)
execute_process(COMMAND ${Sphinx_EXECUTABLE} --version
OUTPUT_VARIABLE sphinx_version
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE _sphinx_version_result)
if(_sphinx_version_result)
message(WARNING "Unable to determine sphinx-build verison: ${_sphinx_version_result}")
else()
string(REGEX REPLACE "sphinx-build ([0-9.]+).*"
"\\1"
Sphinx_VERSION
"${sphinx_version}")
endif()
if(NOT TARGET Sphinx::sphinx-build)
add_executable(Sphinx::sphinx-build IMPORTED GLOBAL)
set_target_properties(Sphinx::sphinx-build PROPERTIES IMPORTED_LOCATION "${Sphinx_EXECUTABLE}")
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sphinx REQUIRED_VARS Sphinx_EXECUTABLE VERSION_VAR Sphinx_VERSION)

View File

@ -0,0 +1,10 @@
# the geturl command needs libcurl
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()

View File

@ -127,7 +127,7 @@ if(PKG_KSPACE)
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package")
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT)
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL NVPL HIPFFT CUFFT MKL_GPU)
set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES})
validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES)
string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS)
@ -137,10 +137,8 @@ if(PKG_KSPACE)
message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
elseif(FFT_KOKKOS STREQUAL "KISS")
message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.")
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
elseif(FFT_KOKKOS STREQUAL "CUFFT")
find_package(CUDAToolkit REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_CUFFT)
target_link_libraries(lammps PRIVATE CUDA::cufft)
endif()
elseif(Kokkos_ENABLE_HIP)
@ -152,10 +150,21 @@ if(PKG_KSPACE)
elseif(FFT_KOKKOS STREQUAL "HIPFFT")
include(DetectHIPInstallation)
find_package(hipfft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_HIPFFT)
target_link_libraries(lammps PRIVATE hip::hipfft)
endif()
elseif(FFT_KOKKOS STREQUAL "MKL_GPU")
if(NOT Kokkos_ENABLE_SYCL)
message(FATAL_ERROR "Using MKL_GPU FFT currently requires the SYCL backend of Kokkos.")
endif()
find_package(MKL REQUIRED)
target_link_libraries(lammps PRIVATE mkl_sycl_dft mkl_intel_ilp64 mkl_tbb_thread mkl_core tbb)
elseif(FFT_KOKKOS STREQUAL "MKL")
find_package(MKL REQUIRED)
elseif(FFT_KOKKOS STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_link_libraries(lammps PRIVATE nvpl::fftw)
endif()
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_${FFT_KOKKOS})
endif()
if(PKG_ML-IAP)

View File

@ -10,7 +10,7 @@ if(${FFTW}_FOUND)
else()
set(FFT "KISS" CACHE STRING "FFT library for KSPACE package")
endif()
set(FFT_VALUES KISS FFTW3 MKL)
set(FFT_VALUES KISS FFTW3 MKL NVPL)
set_property(CACHE FFT PROPERTY STRINGS ${FFT_VALUES})
validate_option(FFT FFT_VALUES)
string(TOUPPER ${FFT} FFT)
@ -41,6 +41,10 @@ elseif(FFT STREQUAL "MKL")
target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS)
endif()
target_link_libraries(lammps PRIVATE MKL::MKL)
elseif(FFT STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_NVPL)
target_link_libraries(lammps PRIVATE nvpl::fftw)
else()
# last option is KISSFFT
target_compile_definitions(lammps PRIVATE -DFFT_KISS)

View File

@ -1,5 +1,11 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
# PACE library support for ML-PACE package
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)

View File

@ -1,5 +1,10 @@
# Plumed2 support for PLUMED package
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
# for supporting multiple concurrent plumed2 installations for debugging and testing
set(PLUMED_SUFFIX "" CACHE STRING "Suffix for Plumed2 library")
mark_as_advanced(PLUMED_SUFFIX)
@ -27,9 +32,9 @@ endif()
# Note: must also adjust check for supported API versions in
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.1/plumed-src-2.9.1.tgz"
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.2/plumed-src-2.9.2.tgz"
CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "c3b2d31479c1e9ce211719d40e9efbd7" CACHE STRING "MD5 checksum of PLUMED tarball")
set(PLUMED_MD5 "04862602a372c1013bdfee2d6d03bace" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)
@ -81,6 +86,9 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
DEPENDS plumed_build
COMMENT "Copying Plumed files"
)
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps INTERFACE LAMMPS::PLUMED)
endif()
else()
@ -155,6 +163,9 @@ else()
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
endif()
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed${PLUMED_SUFFIX})
@ -169,7 +180,9 @@ else()
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PUBLIC LAMMPS::PLUMED)
endif()
endif()
endif()
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)

Binary file not shown.

View File

@ -1,10 +1,10 @@
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
# prefer flang over gfortran, if available
find_program(CLANG_FORTRAN NAMES flang gfortran f95)
find_program(CLANG_FORTRAN NAMES flang-new flang gfortran f95)
set(ENV{OMPI_FC} ${CLANG_FORTRAN})
get_filename_component(_tmp_fc ${CLANG_FORTRAN} NAME)
if (_tmp_fc STREQUAL "flang")
if ((_tmp_fc STREQUAL "flang") OR (_tmp_fc STREQUAL "flang-new"))
set(FC_STD_VERSION "-std=f2018")
set(BUILD_MPI OFF)
else()

View File

@ -0,0 +1,18 @@
# preset that enables KOKKOS and selects SYCL compilation with OpenMP
# enabled as well. Also sets some performance related compiler flags.
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE)
# 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(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)

View File

@ -1,7 +1,7 @@
.TH LAMMPS "1" "27 June 2024" "2024-06-27"
.TH LAMMPS "1" "29 August 2024" "2024-08-29"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator. Version 27 June 2024
\- Molecular Dynamics Simulator. Version 29 August 2024
.SH SYNOPSIS
.B lmp

View File

@ -1,4 +1,4 @@
.TH MSI2LMP "1" "v3.9.10" "2023-03-10"
.TH MSI2LMP "1" "v3.9.11" "2024-09-06"
.SH NAME
.B MSI2LMP
\- Converter for Materials Studio files to LAMMPS
@ -101,7 +101,7 @@ msi2lmp decane -c 0 -f oplsaa
.SH COPYRIGHT
© 2003--2022 Sandia Corporation
© 2003--2024 Sandia Corporation
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as

View File

@ -138,12 +138,27 @@ during development:
The status of this automated testing can be viewed on `https://ci.lammps.org
<https://ci.lammps.org>`_.
The scripts and inputs for integration, run, and regression testing
are maintained in a
`separate repository <https://github.com/lammps/lammps-testing>`_
of the LAMMPS project on GitHub. A few tests are also run as GitHub
Actions and their configuration files are in the ``.github/workflows/``
folder of the LAMMPS git tree.
The scripts and inputs for integration, run, and legacy regression
testing are maintained in a `separate repository
<https://github.com/lammps/lammps-testing>`_ of the LAMMPS project on
GitHub. A few tests are also run as GitHub Actions and their
configuration files are in the ``.github/workflows/`` folder of the
LAMMPS git tree.
Regression tests can also be performed locally with the :ref:`regression
tester tool <regression>`. The tool checks if a given LAMMPS binary run
with selected input examples produces thermo output that is consistent
with the provided log files. The script can be run in one pass over all
available input files, but it can also first create multiple lists of
inputs or folders that can then be run with multiple workers
concurrently to speed things up. Another mode allows to do a quick
check of inputs that contain commands that have changes in the current
checkout branch relative to a git branch. This works similar to the two
pass mode, but will select only shorter runs and no more than 100 inputs
that are chosen randomly. This ensures that this test runs
significantly faster compared to the full test run. These test runs can
also be performed with instrumented LAMMPS binaries (see previous
section).
The unit testing facility is integrated into the CMake build process of
the LAMMPS source code distribution itself. It can be enabled by
@ -630,11 +645,35 @@ The following target are available for both, GNU make and CMake:
GitHub command line interface
-----------------------------
GitHub is developing a `tool for the command line
<https://cli.github.com>`_ that interacts with the GitHub website via a
command called ``gh``. This can be extremely convenient when working
with a Git repository hosted on GitHub (like LAMMPS). It is thus highly
recommended to install it when doing LAMMPS development.
GitHub has developed a `command line tool <https://cli.github.com>`_
to interact with the GitHub website via a command called ``gh``.
This is extremely convenient when working with a Git repository hosted
on GitHub (like LAMMPS). It is thus highly recommended to install it
when doing LAMMPS development. To use ``gh`` you must be within a git
checkout of a repository and you must obtain an authentication token
to connect your checkout with a GitHub user. This is done with the
command: ``gh auth login`` where you then have to follow the prompts.
Here are some examples:
The capabilities of the ``gh`` command is continually expanding, so
please see the documentation at https://cli.github.com/manual/
.. list-table::
:header-rows: 1
:widths: 34 66
* - Command
- Description
* - ``gh pr list``
- List currently open pull requests
* - ``gh pr checks 404``
- Shows the status of all checks for pull request #404
* - ``gh pr view 404``
- Shows the description and recent comments for pull request #404
* - ``gh co 404``
- Check out the branch from pull request #404; set up for pushing changes
* - ``gh issue list``
- List currently open issues
* - ``gh issue view 430 --comments``
- Shows the description and all comments for issue #430
The capabilities of the ``gh`` command are continually expanding, so
for more details please see the documentation at https://cli.github.com/manual/
or use ``gh --help`` or ``gh <command> --help`` for embedded help.

View File

@ -7,6 +7,8 @@ in addition to
.. list-table::
:align: center
:header-rows: 1
:widths: 50 50
:width: 80%
* - CMake build
- Traditional make
@ -115,7 +117,7 @@ GPU package
To build with this package, you must choose options for precision and
which GPU hardware to build for. The GPU package currently supports
three different types of backends: OpenCL, CUDA and HIP.
three different types of back ends: OpenCL, CUDA and HIP.
CMake build
^^^^^^^^^^^
@ -205,7 +207,7 @@ necessary for ``hipcc`` and the linker to work correctly.
.. versionadded:: 3Aug2022
Using the CHIP-SPV implementation of HIP is supported. It allows one to
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
run HIP code on Intel GPUs via the OpenCL or Level Zero back ends. To use
CHIP-SPV, you must set ``-DHIP_USE_DEVICE_SORT=OFF`` in your CMake
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
the use of HIP for Intel GPUs is experimental. You should only use this
@ -751,14 +753,27 @@ This list was last updated for version 4.3.0 of the Kokkos library.
platform-appropriate vendor library: rocFFT on AMD GPUs or cuFFT on
NVIDIA GPUs.
To simplify compilation, five preset files are included in the
For Intel GPUs using SYCL, set these variables:
.. code-block:: bash
-D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
-D Kokkos_ENABLE_SYCL=yes
-D Kokkos_ENABLE_OPENMP=yes
-D FFT_KOKKOS=MKL_GPU
This will enable FFTs on the GPU using the oneMKL library.
To simplify compilation, six preset files are included in the
``cmake/presets`` folder, ``kokkos-serial.cmake``,
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``,
``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable
the KOKKOS package and enable some hardware choices. For GPU
support those preset files must be customized to match the
hardware used. So to compile with CUDA device parallelization with
some common packages enabled, you can do the following:
``kokkos-hip.cmake``, ``kokkos-sycl-nvidia.cmake``, and
``kokkos-sycl-intel.cmake``. They will enable the KOKKOS
package and enable some hardware choices. For GPU support those
preset files must be customized to match the hardware used. So
to compile with CUDA device parallelization with some common
packages enabled, you can do the following:
.. code-block:: bash
@ -830,6 +845,18 @@ This list was last updated for version 4.3.0 of the Kokkos library.
FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional)
FFT_LIB = -lhipfft # link to hipFFT library
For Intel GPUs using SYCL:
.. code-block:: make
KOKKOS_DEVICES = SYCL
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is
# hosting the GPU
# GPUARCH = GPU from list above
FFT_INC = -DFFT_KOKKOS_MKL_GPU # enable use of oneMKL for Intel GPUs (optional)
# link to oneMKL FFT library
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -mkl_core -ltbb
Advanced KOKKOS compilation settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -1517,6 +1544,11 @@ in lib/pace or somewhere else, which must be done before building
LAMMPS with this package. The code for the library can be found
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
Instead of including the ML-PACE package directly into LAMMPS, it
is also possible to skip this step and build the ML-PACE package as
a plugin using the CMake script files in the ``examples/PACKAGE/pace/plugin``
folder and then load this plugin at runtime with the :doc:`plugin command <plugin>`.
.. tabs::
.. tab:: CMake build
@ -1701,6 +1733,11 @@ try a different one, switch to a different build system, consider a
global PLUMED installation or consider downloading PLUMED during the
LAMMPS build.
Instead of including the PLUMED package directly into LAMMPS, it
is also possible to skip this step and build the PLUMED package as
a plugin using the CMake script files in the ``examples/PACKAGE/plumed/plugin``
folder and then load this plugin at runtime with the :doc:`plugin command <plugin>`.
.. tabs::
.. tab:: CMake build

View File

@ -67,10 +67,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: bash
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found,
# else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT,
# default is KISS
-D FFT=value # FFTW3 or MKL or NVPL or KISS,
# default is FFTW3 if found, else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or NVPL or KISS or CUFFT
# or HIPFFT or MKL_GPU, default is KISS
-D FFT_SINGLE=value # yes or no (default), no = double precision
-D FFT_PACK=value # array (default) or pointer or memcpy
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
@ -103,6 +103,8 @@ libraries and better pipelining for packing and communication.
-D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock
# heFFTe back end
-D Heffte_ROOT=path # path to an existing heFFTe installation
-D nvpl_fft_INCLUDE_DIR=path # path to NVPL FFT include files
-D nvpl_fft_LIBRARY_DIR=path # path to NVPL FFT libraries
.. note::
@ -121,9 +123,10 @@ libraries and better pipelining for packing and communication.
.. code-block:: make
FFT_INC = -DFFT_<NAME> # where <NAME> is KISS (default), FFTW3,
# FFTW (same as FFTW3), or MKL
# FFTW (same as FFTW3), NVPL, or MKL
FFT_INC = -DFFT_KOKKOS_<NAME> # where <NAME> is KISS (default), FFTW3,
# FFTW (same as FFTW3), MKL, CUFFT, or HIPFFT
# FFTW (same as FFTW3), NVPL, MKL, CUFFT,
# HIPFFT, or MKL_GPU
FFT_INC = -DFFT_SINGLE # do not specify for double precision
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
@ -141,6 +144,9 @@ libraries and better pipelining for packing and communication.
# cuFFT either precision
FFT_LIB = -lcufft
# MKL_GPU either precision
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -ltbb
# FFTW3 double precision
FFT_LIB = -lfftw3
@ -165,6 +171,10 @@ libraries and better pipelining for packing and communication.
# MKL with automatic runtime selection of interface libs
FFT_LIB = -lmkl_rt
# threaded NVPL FFT
FFT_LIB = -lnvpl_fftw
As with CMake, you do not need to set paths in ``FFT_INC`` or
``FFT_PATH``, if the compiler can find the FFT header and library
files in its default search path. You must specify ``FFT_LIB``
@ -218,10 +228,15 @@ The Intel MKL math library is part of the Intel compiler suite. It
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
above).
The NVIDIA Performance Libraries (NVPL) FFT library is optimized for NVIDIA
Grace Armv9.0 architecture. You can download it from https://docs.nvidia.com/nvpl/
The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and
AMD's HIP installations, respectively. These FFT libraries require the
Kokkos acceleration package to be enabled and the Kokkos back end to be
GPU-resident (i.e., HIP or CUDA).
GPU-resident (i.e., HIP or CUDA). Similarly, GPU offload of FFTs on
Intel GPUs with oneMKL currently requires the Kokkos acceleration
package to be enabled with the SYCL back end.
Performing 3d FFTs in parallel can be time-consuming due to data access
and required communication. This cost can be reduced by performing
@ -492,7 +507,7 @@ during a run.
Support for downloading files
-----------------------------
.. versionadded:: TBD
.. versionadded:: 29Aug2024
The :doc:`geturl command <geturl>` command uses the `the libcurl library
<https://curl.se/libcurl/>`_ to download files. This requires that

View File

@ -171,7 +171,7 @@ instructions to install i-PI from PyPI via pip are provided.
LAMMPS shell
------------
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
The LAMMPS shell has been removed from the LAMMPS distribution. Users
are encouraged to use the :ref:`LAMMPS-GUI <lammps_gui>` tool instead.

View File

@ -283,7 +283,7 @@ in the ``examples/kim/plugin`` folder. No changes to the sources of the
KIM package themselves are needed; only the plugin interface and loader
code needs to be added. This example only supports building with CMake,
but is probably a more typical example. To compile you need to run CMake
with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other
with ``-DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>``. Other
configuration setting are identical to those for compiling LAMMPS.
A second example for a plugin from a package is in the

View File

@ -12,3 +12,4 @@ details are provided for writing code for LAMMPS.
Developer_write_pair
Developer_write_fix
Developer_write_command

View File

@ -0,0 +1,348 @@
Writing a new command style
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Command styles allow to do system manipulations or interfaces to the
operating system.
In the text below, we will discuss the implementation of one example. As
shown on the page for :doc:`writing or extending command styles
<Modify_command>`, in order to implement a new command style, a new class
must be written that is either directly or indirectly derived from the
``Command`` class. There is just one method that must be implemented:
``Command::command()``. In addition, a custom constructor is needed to get
access to the members of the ``LAMMPS`` class like the ``Error`` class to
print out error messages. The ``Command::command()`` method processes the
arguments passed to the command in the input and executes it. Any other
methods would be for the convenience of implementation of the new command.
In general, new command styles should be added to the :ref:`EXTRA-COMMAND
package <PKG-EXTRA-COMMAND>`. If you feel that your contribution should be
added to a different package, please consult with the :doc:`LAMMPS
developers <Intro_authors>` first. The contributed code needs to support
the :doc:`traditional GNU make build process <Build_make>` **and** the
:doc:`CMake build process <Build_cmake>`.
----
Case 1: Implementing the geturl command
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In this section, we will describe the procedure of adding a simple command
style to LAMMPS: the :doc:`geturl command <geturl>` that allows to download
files directly without having to rely on an external program like "wget" or
"curl". The complete implementation can be found in the files
``src/EXTRA-COMMAND/geturl.cpp`` and ``src/EXTRA-COMMAND/geturl.h`` of the
LAMMPS source code.
Interfacing the *libcurl* library
"""""""""""""""""""""""""""""""""
Rather than implementing the various protocols for downloading files, we
rely on an external library: `libcurl library <https:://curl.se/libcurl/>`_.
This requires that the library and its headers are installed. For the
traditional GNU make build system, this simply requires edits to the machine
makefile to add compilation flags like for other libraries. For the CMake
based build system, we need to add some lines to the file
``cmake/Modules/Packages/EXTRA-COMMAND.cmake``:
.. code-block:: cmake
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
The first ``find_package()`` command uses a built-in CMake module to find
an existing *libcurl* installation with development headers and support for
using the HTTP and HTTPS protocols. The "QUIET" flag ensures that there is
no screen output and no error if the search fails. The status of the search
is recorded in the "${CURL_FOUND}" variable. That variable sets the default
of the WITH_CURL option, which toggles whether support for *libcurl* is included
or not.
The second ``find_package()`` uses the "REQUIRED" flag to produce an error
if the WITH_CURL option was set to ``True``, but no suitable *libcurl*
implementation with development support was found. This construct is used
so that the CMake script code inside the ``if(WITH_CURL)`` and ``endif()``
block can be expanded later to download and compile *libcurl* as part of the
LAMMPS build process, if it is not found locally. The
``target_compile_definitions()`` function added the define ``-DLAMMPS_CURL``
to the compilation flags when compiling objects for the LAMMPS library.
This allows to always compile the :doc:`geturl command <geturl>`, but use
pre-processing to compile in the interface to *libcurl* only when it is
present and usable and otherwise stop with an error message about the
unavailability of *libcurl* to execute the functionality of the command.
Header file
"""""""""""
The first segment of any LAMMPS source should be the copyright and
license statement. Note the marker in the first line to indicate to
editors like emacs that this file is a C++ source, even though the .h
extension suggests a C source (this is a convention inherited from the
very beginning of the C++ version of LAMMPS).
.. code-block:: c++
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
Every command style must be registered in LAMMPS by including the following
lines of code in the second part of the header after the copyright
message and before the include guards for the class definition:
.. code-block:: c++
#ifdef COMMAND_CLASS
// clang-format off
CommandStyle(geturl,GetURL);
// clang-format on
#else
This block between ``#ifdef COMMAND_CLASS`` and ``#else`` will be
included by the ``Input`` class in ``input.cpp`` to build a map of
"factory functions" that will create an instance of a Command class
and call its ``command()`` method. The map connects the name of the
command ``geturl`` with the name of the class ``GetURL``. During
compilation, LAMMPS constructs a file ``style_command.h`` that contains
``#include`` statements for all "installed" command styles. Before
including ``style_command.h`` into ``input.cpp``, the ``COMMAND_CLASS``
define is set and the ``CommandStyle(name,class)`` macro defined. The
code of the macro adds the installed command styles to the "factory map"
which enables the ``Input`` to execute the command.
The list of header files to include in ``style_command.h`` is automatically
updated by the build system if there are new files, so the presence of the
new header file in the ``src/EXTRA-COMMAND`` folder and the enabling of the
EXTRA-COMMAND package will trigger LAMMPS to include the new command style
when it is (re-)compiled. The "// clang-format" format comments are needed
so that running :ref:`clang-format <clang-format>` on the file will not
insert unwanted blanks which would break the ``CommandStyle`` macro.
The third part of the header file is the actual class definition of the
``GetURL`` class. This has the custom constructor and the ``command()``
method implemented by this command style. For the constructor there is
nothing to do but to pass the ``lmp`` pointer to the base class. Since the
``command()`` method is labeled "virtual" in the base class, it must be
given the "override" property.
.. code-block:: c++
#ifndef LMP_GETURL_H
#define LMP_GETURL_H
#include "command.h"
namespace LAMMPS_NS {
class GetURL : public Command {
public:
GetURL(class LAMMPS *lmp) : Command(lmp) {};
void command(int, char **) override;
};
} // namespace LAMMPS_NS
#endif
#endif
The "override" property helps to detect unexpected mismatches because
compilation will stop with an error in case the signature of a function
is changed in the base class without also changing it in all derived
classes.
Implementation file
"""""""""""""""""""
We move on to the implementation of the ``GetURL`` class in the
``geturl.cpp`` file. This file also starts with a LAMMPS copyright and
license header. Below that notice is typically the space where comments may
be added with additional information about this specific file, the
author(s), affiliation(s), and email address(es). This way the contributing
author(s) can be easily contacted, when there are questions about the
implementation later. Since the file(s) may be around for a long time, it
is beneficial to use some kind of "permanent" email address, if possible.
.. code-block:: c++
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Axel Kohlmeyer (Temple U),
------------------------------------------------------------------------- */
#include "geturl.h"
#include "comm.h"
#include "error.h"
#if defined(LAMMPS_CURL)
#include <curl/curl.h>
#endif
using namespace LAMMPS_NS;
The second section of the implementation file has various include
statements. The include file for the class header has to come first, then a
couple of LAMMPS classes (sorted alphabetically) followed by the header for
the *libcurl* interface. This is wrapped into an ``#ifdef`` block so that
LAMMPS will compile this file without error when the *libcurl* header is not
available and thus the define not set. The final statement of this segment
imports the ``LAMMPS_NS::`` namespace globally for this file. This way, all
LAMMPS specific functions and classes do not have to be prefixed with
``LAMMPS_NS::``.
The command() function (required)
"""""""""""""""""""""""""""""""""
Since the required custom constructor is trivial and implemented in the
header, there is only one function that must be implemented for a command
style and that is the ``command()`` function.
.. code-block:: c++
void GetURL::command(int narg, char **arg)
{
#if !defined(LAMMPS_CURL)
error->all(FLERR, "LAMMPS has not been compiled with libcurl support");
#else
if (narg < 1) utils::missing_cmd_args(FLERR, "geturl", error);
int verify = 1;
int overwrite = 1;
int verbose = 0;
This first part also has the ``#ifdef`` block depending on the LAMMPS_CURL
define. This way the command will simply print an error, if *libcurl* is
not available but will not fail to compile. Furthermore, it sets the
defaults for the following optional arguments.
.. code-block:: c++
// process arguments
std::string url = arg[0];
// sanity check
if ((url.find(':') == std::string::npos) || (url.find('/') == std::string::npos))
error->all(FLERR, "URL '{}' is not a supported URL", url);
std::string output = url.substr(url.find_last_of('/') + 1);
if (output.empty()) error->all(FLERR, "URL '{}' must end in a file string", url);
This block stores the positional, i.e. non-optional argument of the URL to
be downloaded and adds a couple of sanity checks on the string to make sure it is
a valid URL. Also it derives the default name of the output file from the URL.
.. code-block:: c++
int iarg = 1;
while (iarg < narg) {
if (strcmp(arg[iarg], "output") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl output", error);
output = arg[iarg + 1];
++iarg;
} else if (strcmp(arg[iarg], "overwrite") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl overwrite", error);
overwrite = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else if (strcmp(arg[iarg], "verify") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl verify", error);
verify = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else if (strcmp(arg[iarg], "verbose") == 0) {
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "geturl verbose", error);
verbose = utils::logical(FLERR, arg[iarg + 1], false, lmp);
++iarg;
} else {
error->all(FLERR, "Unknown geturl keyword: {}", arg[iarg]);
}
++iarg;
}
This block parses the optional arguments following the URL and stops with an
error if there are arguments missing or an unknown argument is encountered.
.. code-block:: c++
// only download files from rank 0
if (comm->me != 0) return;
if (!overwrite && platform::file_is_readable(output)) return;
// open output file for writing
FILE *out = fopen(output.c_str(), "wb");
if (!out)
error->all(FLERR, "Cannot open output file {} for writing: {}", output, utils::getsyserror());
Here all MPI ranks other than 0 will return, so that the URL download will
only happen from a single MPI rank. For that rank the output file is opened
for writing using the C library function ``fopen()``.
.. code-block:: c++
// initialize curl and perform download
CURL *curl;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if (curl) {
(void) curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
(void) curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) out);
(void) curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
(void) curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
if (verbose && screen) {
(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
(void) curl_easy_setopt(curl, CURLOPT_STDERR, (void *) screen);
}
if (!verify) {
(void) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
(void) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
}
auto res = curl_easy_perform(curl);
if (res != CURLE_OK) {
long response = 0L;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
error->one(FLERR, "Download of {} failed with: {} {}", output, curl_easy_strerror(res),
response);
}
curl_easy_cleanup(curl);
This block now implements the actual URL download with the selected options
via the "easy" interface of *libcurl*. For the details of what these
function calls do, please have a look at the `*libcurl documentation
<https://curl.se/libcurl/c/allfuncs.html>`_.
.. code-block:: c++
}
curl_global_cleanup();
fclose(out);
#endif
}
Finally, the previously opened file is closed and the command is complete.

View File

@ -160,7 +160,7 @@ message and before the include guards for the class definition:
#endif
This block of between ``#ifdef PAIR_CLASS`` and ``#else`` will be
This block between ``#ifdef PAIR_CLASS`` and ``#else`` will be
included by the ``Force`` class in ``force.cpp`` to build a map of
"factory functions" that will create an instance of these classes and
return a pointer to it. The map connects the name of the pair style,

View File

@ -348,7 +348,7 @@ Some common LAMMPS specific variables
* - ``FFT``
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
* - ``FFT_KOKKOS``
- select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``KISS`` (default)
- select which FFT library to use in Kokkos-enabled styles: ``FFTW3``, ``MKL``, ``HIPFFT``, ``CUFFT``, ``MKL_GPU``, ``KISS`` (default)
* - ``FFT_SINGLE``
- select whether to use single precision FFTs (default: ``off``)
* - ``WITH_JPEG``

View File

@ -19,9 +19,9 @@ to the online LAMMPS documentation for known LAMMPS commands and styles.
Pre-compiled, ready-to-use LAMMPS-GUI executables for Linux x86\_64
(Ubuntu 20.04LTS or later and compatible), macOS (version 11 aka Big
Sur or later), and Windows (version 10 or later) :ref:`are available
<lammps_gui_install>` for download. None-MPI LAMMPS executables for
running LAMMPS from the command line and :doc:`some LAMMPS tools <Tools>`
are also included.
<lammps_gui_install>` for download. Non-MPI LAMMPS executables (as
``lmp``) for running LAMMPS from the command line and :doc:`some
LAMMPS tools <Tools>` compiled executables are also included.
The source code for LAMMPS-GUI is included in the LAMMPS source code
distribution and can be found in the ``tools/lammps-gui`` folder. It
@ -29,40 +29,50 @@ to the online LAMMPS documentation for known LAMMPS commands and styles.
<Build_cmake>`.
LAMMPS-GUI tries to provide an experience similar to what people
traditionally would have running LAMMPS using a command line window
and the console LAMMPS executable but just rolled into a single executable:
traditionally would have running LAMMPS using a command line window and
the console LAMMPS executable but just rolled into a single executable:
- writing & editing LAMMPS input files with a text editor
- run LAMMPS on those input file with selected command line flags
- use or extract data from the created files and visualize it with
either a molecular visualization program or a plotting program
- extract data from the created files and visualize it with and
external software
That procedure is quite effective for people proficient in using the
command line, as that allows them to use tools for the individual steps
that they are most comfortable with. It is often *required* to adopt
this workflow when running LAMMPS simulations on high-performance
that they are most comfortable with. In fact, it is often *required* to
adopt this workflow when running LAMMPS simulations on high-performance
computing facilities.
The main benefit of using LAMMPS-GUI is that many basic tasks can be
done directly from the GUI without switching to a text console window or
using external programs, let alone writing scripts to extract data from
the generated output. It also integrates well with graphical desktop
environments where the `.lmp` filename extension can be registered with
LAMMPS-GUI as the executable to launch when double clicking on such
files. Also, LAMMPS-GUI has support for drag-n-drop, i.e. an input
file can be selected and then moved and dropped on the LAMMPS-GUI
executable, and LAMMPS-GUI will launch and read the file into its
buffer.
done directly from the GUI **without** switching to a text console
window or using external programs, let alone writing scripts to extract
data from the generated output. It also integrates well with graphical
desktop environments where the `.lmp` filename extension can be
registered with LAMMPS-GUI as the executable to launch when double
clicking on such files. Also, LAMMPS-GUI has support for drag-n-drop,
i.e. an input file can be selected and then moved and dropped on the
LAMMPS-GUI executable, and LAMMPS-GUI will launch and read the file into
its buffer. In many cases LAMMPS-GUI will be integrated into the
graphical desktop environment and can be launched like other
applications.
LAMMPS-GUI thus makes it easier for beginners to get started running
simple LAMMPS simulations. It is very suitable for tutorials on LAMMPS
since you only need to learn how to use a single program for most tasks
and thus time can be saved and people can focus on learning LAMMPS.
The tutorials at https://lammpstutorials.github.io/ were specifically
The tutorials at https://lammpstutorials.github.io/ are specifically
updated for use with LAMMPS-GUI.
Another design goal is to keep the barrier low when replacing part of
the functionality of LAMMPS-GUI with external tools.
the functionality of LAMMPS-GUI with external tools. That said, LAMMPS-GUI
has some unique functionality that is not found elsewhere:
- auto-adapting to features available in the integrated LAMMPS library
- interactive visualization using the :doc:`dump image <dump_image>`
command with the option to copy-paste the resulting settings
- automatic slide show generation from dump image out at runtime
- automatic plotting of thermodynamics data at runtime
- inspection of binary restart files
The following text provides a detailed tour of the features and
functionality of LAMMPS-GUI. Suggestions for new features and
@ -134,9 +144,13 @@ When LAMMPS-GUI starts, it shows the main window, labeled *Editor*, with
either an empty buffer or the contents of the file used as argument. In
the latter case it may look like the following:
.. image:: JPG/lammps-gui-main.png
:align: center
:scale: 50%
.. |gui-main1| image:: JPG/lammps-gui-main.png
:width: 48%
.. |gui-main2| image:: JPG/lammps-gui-dark.png
:width: 48%
|gui-main1| |gui-main2|
There is the typical menu bar at the top, then the main editor buffer,
and a status bar at the bottom. The input file contents are shown
@ -156,7 +170,7 @@ and then starts with an empty buffer in the *Editor* window. If arguments
are given LAMMPS will use first command line argument as the file name for
the *Editor* buffer and reads its contents into the buffer, if the file
exists. All further arguments are ignored. Files can also be opened via
the ``File`` menu, the `Ctrl-O` (`Command-O` on macOS) keyboard shortcut
the *File* menu, the `Ctrl-O` (`Command-O` on macOS) keyboard shortcut
or by drag-and-drop of a file from a graphical file manager into the editor
window. If a file extension (e.g. ``.lmp``) has been registered with the
graphical environment to launch LAMMPS-GUI, an existing input file can
@ -174,7 +188,7 @@ Running LAMMPS
^^^^^^^^^^^^^^
From within the LAMMPS-GUI main window LAMMPS can be started either from
the ``Run`` menu using the ``Run LAMMPS from Editor Buffer`` entry, by
the *Run* menu using the *Run LAMMPS from Editor Buffer* entry, by
the keyboard shortcut `Ctrl-Enter` (`Command-Enter` on macOS), or by
clicking on the green "Run" button in the status bar. All of these
operations causes LAMMPS to process the entire input script in the
@ -189,7 +203,7 @@ using the contents of the input buffer for the run (via the
interface), and **not** the original file it was read from. Thus, if
there are unsaved changes in the buffer, they *will* be used. As an
alternative, it is also possible to run LAMMPS by reading the contents
of a file from the ``Run LAMMPS from File`` menu entry or with
of a file from the *Run LAMMPS from File* menu entry or with
`Ctrl-Shift-Enter`. This option may be required in some rare cases
where the input uses some functionality that is not compatible with
running LAMMPS from a string buffer. For consistency, any unsaved
@ -203,7 +217,7 @@ before LAMMPS can be run from a file.
While LAMMPS is running, the contents of the status bar change. On
the left side there is a text indicating that LAMMPS is running, which
also indicates the number of active threads, when thread-parallel
acceleration was selected in the ``Preferences`` dialog. On the right
acceleration was selected in the *Preferences* dialog. On the right
side, a progress bar is shown that displays the estimated progress for
the current :doc:`run <run>` or :doc:`minimize <minimize>` command.
@ -230,8 +244,8 @@ Up to three additional windows may open during a run:
More information on those windows and how to adjust their behavior and
contents is given below.
An active LAMMPS run can be stopped cleanly by using either the ``Stop
LAMMPS`` entry in the ``Run`` menu, the keyboard shortcut `Ctrl-/`
An active LAMMPS run can be stopped cleanly by using either the *Stop
LAMMPS* entry in the *Run* menu, the keyboard shortcut `Ctrl-/`
(`Command-/` on macOS), or by clicking on the red button in the status
bar. This will cause the running LAMMPS process to complete the current
timestep (or iteration for energy minimization) and then complete the
@ -261,7 +275,7 @@ The runs are counted and the run number for the current run is displayed
in the window title. It is possible to change the behavior of
LAMMPS-GUI in the preferences dialog to create a *new* *Output* window
for every run or to not show the current *Output* window. It is also
possible to show or hide the *current* *Output* window from the ``View``
possible to show or hide the *current* *Output* window from the *View*
menu.
The text in the *Output* window is read-only and cannot be modified, but
@ -276,8 +290,6 @@ right mouse button into the *Output* window text area.
:align: center
:scale: 50%
.. versionadded:: 1.6
Should the *Output* window contain embedded YAML format text (see above for a
demonstration), for example from using :doc:`thermo_style yaml
<thermo_style>` or :doc:`thermo_modify line yaml <thermo_modify>`, the
@ -298,18 +310,32 @@ plot of thermodynamic output of the LAMMPS calculation as shown below.
The drop down menu on the top right allows selection of different
properties that are computed and written to thermo output. Only one
property can be shown at a time. The plots are updated with new data as
the run progresses, so they can be used to visually monitor the
evolution of available properties. The window title shows the current
run number that this chart window corresponds to. Same as for the
*Output* window, the chart window is replaced on each new run, but the
behavior can be changed in the preferences dialog.
property can be shown at a time. The plots are updated regularly with
new data as the run progresses, so they can be used to visually monitor
the evolution of available properties. The update interval can be set
in the *Preferences* dialog. By default, the raw data for the selected
property is plotted as a blue graph. As soon as there are a sufficient
number of data points, there will be a second graph shown in red with a
smoothed version of the data. From the drop down menu on the top left,
you can select whether to plot only the raw data, only the smoothed
data or both. The smoothing uses a `Savitzky-Golay convolution filter
<https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter>`_ The
window width (left) and order (right) parameters can be set in the boxes
next to the drop down menu. Default settings are 10 and 4 which means
that the smoothing window includes 10 points each to the left and the
right of the current data point and a fourth order polynomial is fit to
the data in the window.
.. versionadded:: 1.6
You can use the mouse to zoom into the graph (hold the left button and
drag to mark an area) or zoom out (right click) and you can reset the
view with a click to the "lens" button next to the data drop down menu.
Support for YAML export added
The window title shows the current run number that this chart window
corresponds to. Same as for the *Output* window, the chart window is
replaced on each new run, but the behavior can be changed in the
*Preferences* dialog.
From the ``File`` menu on the top left, it is possible to save an image
From the *File* menu on the top left, it is possible to save an image
of the currently displayed plot or export the data in either plain text
columns (for use by plotting tools like `gnuplot
<http://www.gnuplot.info/>`_ or `grace
@ -349,8 +375,6 @@ zoom in or zoom out of the displayed images. The button on the very
left triggers an export of the slide show animation to a movie file,
provided the `FFmpeg program <https://ffmpeg.org/>`_ is installed.
.. versionadded:: 1.6
When clicking on the "garbage can" icon, all image files of the slide
show will be deleted. Since their number can be large for long
simulations, this option enables to safely and quickly clean up the
@ -362,20 +386,20 @@ Variable Info
During a run, it may be of interest to monitor the value of input script
variables, for example to monitor the progress of loops. This can be
done by enabling the "Variables Window" in the ``View`` menu or by using
done by enabling the "Variables Window" in the *View* menu or by using
the `Ctrl-Shift-W` keyboard shortcut. This shows info similar to the
:doc:`info variables <info>` command in a separate window as shown
below.
.. image:: JPG/lammps-gui-variable-info.png
:align: center
:scale: 75%
:scale: 50%
Like for the *Output* and *Charts* windows, its content is continuously
updated during a run. It will show "(none)" if there are no variables
defined. Note that it is also possible to *set* :doc:`index style
variables <variable>`, that would normally be set via command line
flags, via the "Set Variables..." dialog from the ``Run`` menu.
flags, via the "Set Variables..." dialog from the *Run* menu.
LAMMPS-GUI automatically defines the variable "gui_run" to the current
value of the run counter. That way it is possible to automatically
record a separate log for each run attempt by using the command
@ -392,7 +416,7 @@ at the beginning of an input file. That would record logs to files
Snapshot Image Viewer
---------------------
By selecting the ``Create Image`` entry in the ``Run`` menu, or by
By selecting the *Create Image* entry in the *Run* menu, or by
hitting the `Ctrl-I` (`Command-I` on macOS) keyboard shortcut, or by
clicking on the "palette" button in the status bar of the *Editor*
window, LAMMPS-GUI sends a custom :doc:`write_dump image <dump_image>`
@ -413,23 +437,24 @@ instance when using reduced (= 'lj') :doc:`units <units>`, then
LAMMPS-GUI will check the current pair style and if it is a
Lennard-Jones type potential, it will extract the *sigma* parameter
for each atom type and assign atom diameters from those numbers.
For cases where atom diameters are not auto-detected, the *Atom size* field
can be edited and a suitable value set manually. The default value
is inferred from the x-direction lattice spacing.
Otherwise the default sequence of colors of the :doc:`dump image
<dump_image>` command is assigned to the different atom types and the
diameters are all the same.
If elements cannot be detected the default sequence of colors of the
:doc:`dump image <dump_image>` command is assigned to the different atom
types.
.. figure:: JPG/lammps-gui-image.png
:align: center
:scale: 50%
.. |gui-image1| image:: JPG/lammps-gui-image.png
:width: 48%
Visualization of LAMMPS "peptide" example
.. |gui-image2| image:: JPG/lammps-gui-funnel.png
:width: 48%
.. versionchanged:: 1.6
Buttons for toggling shininess and re-centering were added.
|gui-image1| |gui-image2|
The default image size, some default image quality settings, the view
style and some colors can be changed in the ``Preferences`` dialog
style and some colors can be changed in the *Preferences* dialog
window. From the image viewer window further adjustments can be made:
actual image size, high-quality (SSAO) rendering, anti-aliasing, view
style, display of box or axes, zoom factor. The view of the system can
@ -441,14 +466,12 @@ display updated. The small palette icon on the top left is colored
while LAMMPS is running to render the new image; it is grayed out when
LAMMPS is finished. When there are many atoms to render and high
quality images with anti-aliasing are requested, re-rendering may take
several seconds. From the ``File`` menu of the image window, the
several seconds. From the *File* menu of the image window, the
current image can be saved to a file (keyboard shortcut `Ctrl-S`) or
copied to the clipboard (keyboard shortcut `Ctrl-C`) for pasting the
image into another application.
.. versionadded:: 1.6
From the ``File`` menu it is also possible to copy the current
From the *File* menu it is also possible to copy the current
:doc:`dump image <dump_image>` and :doc:`dump_modify <dump_image>`
commands to the clipboard so they can be pasted into a LAMMPS input file
so that the visualization settings of the snapshot image can be repeated
@ -466,10 +489,8 @@ Paste (`Ctrl-V`), Undo (`Ctrl-Z`), Redo (`Ctrl-Shift-Z`), Select All
dialog will pop up asking whether to cancel the exit operation, or to
save or not save the buffer contents to a file.
.. versionadded:: 1.6
The editor has an auto-save mode that can be enabled or disabled in the
``Preferences`` dialog. In auto-save mode, the editor buffer is
*Preferences* dialog. In auto-save mode, the editor buffer is
automatically saved before running LAMMPS or before exiting LAMMPS-GUI.
Context Specific Word Completion
@ -486,7 +507,7 @@ a word have been typed.
The word can then be completed through selecting an entry by scrolling
up and down with the cursor keys and selecting with the 'Enter' key or
by clicking on the entry with the mouse. The automatic completion
pop-up can be disabled in the ``Preferences`` dialog, but the completion
pop-up can be disabled in the *Preferences* dialog, but the completion
can still be requested manually by either hitting the 'Shift-TAB' key or
by right-clicking with the mouse and selecting the option from the
context menu. Most of the completion information is retrieved from the
@ -504,7 +525,7 @@ whitespace padding to commands, type specifiers, IDs and names. This
reformatting is performed manually by hitting the 'Tab' key. It is
also possible to have this done automatically when hitting the 'Enter'
key to start a new line. This feature can be turned on or off in the
``Preferences`` dialog for ``Editor Settings`` with the
*Preferences* dialog for *Editor Settings* with the
"Reformat with 'Enter'" checkbox. The amount of padding for multiple
categories can be adjusted in the same dialog.
@ -531,8 +552,6 @@ context menu that open the corresponding documentation page in the
online LAMMPS documentation in a web browser window. When using the
keyboard, the first of those entries is chosen.
.. versionadded:: 1.6
If the word under the cursor is a file, then additionally the context
menu has an entry to open the file in a read-only text viewer window.
If the file is a LAMMPS restart file, instead the menu entry offers to
@ -550,8 +569,6 @@ will contain a corresponding message.
Inspecting a Restart file
^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 1.6
When LAMMPS-GUI is asked to "Inspect a Restart", it will read the
restart file into a LAMMPS instance and then open three different
windows. The first window is a text viewer with the output of an
@ -566,56 +583,56 @@ for confirmation before continuing, since large restart files
may require large amounts of RAM since the entire system must
be read into RAM. Thus restart file for large simulations that
have been run on an HPC cluster may overload a laptop or local
workstation. The ``Show Details...`` button will display a rough
workstation. The *Show Details...* button will display a rough
estimate of the additional memory required.
Menu
----
The menu bar has entries ``File``, ``Edit``, ``Run``, ``View``, and
``About``. Instead of using the mouse to click on them, the individual
The menu bar has entries *File*, *Edit*, *Run*, *View*, and
*About*. Instead of using the mouse to click on them, the individual
menus can also be activated by hitting the `Alt` key together with the
corresponding underlined letter, that is `Alt-F` activates the
``File`` menu. For the corresponding activated sub-menus, the key
*File* menu. For the corresponding activated sub-menus, the key
corresponding the underlined letters can be used to select entries
instead of using the mouse.
File
^^^^
The ``File`` menu offers the usual options:
The *File* menu offers the usual options:
- ``New`` clears the current buffer and resets the file name to ``*unknown*``
- ``Open`` opens a dialog to select a new file for editing in the *Editor*
- ``View`` opens a dialog to select a file for viewing in a *separate* window (read-only) with support for on-the-fly decompression as explained above.
- ``Inspect restart`` opens a dialog to select a file. If that file is a :doc:`LAMMPS restart <write_restart>` three windows with :ref:`information about the file are opened <inspect_restart>`.
- ``Save`` saves the current file; if the file name is ``*unknown*``
- *New* clears the current buffer and resets the file name to ``*unknown*``
- *Open* opens a dialog to select a new file for editing in the *Editor*
- *View* opens a dialog to select a file for viewing in a *separate* window (read-only) with support for on-the-fly decompression as explained above.
- *Inspect restart* opens a dialog to select a file. If that file is a :doc:`LAMMPS restart <write_restart>` three windows with :ref:`information about the file are opened <inspect_restart>`.
- *Save* saves the current file; if the file name is ``*unknown*``
a dialog will open to select a new file name
- ``Save As`` opens a dialog to select and new file name (and folder, if
- *Save As* opens a dialog to select and new file name (and folder, if
desired) and saves the buffer to it. Writing the buffer to a
different folder will also switch the current working directory to
that folder.
- ``Quit`` exits LAMMPS-GUI. If there are unsaved changes, a dialog will
- *Quit* exits LAMMPS-GUI. If there are unsaved changes, a dialog will
appear to either cancel the operation, or to save, or to not save the
modified buffer.
In addition, up to 5 recent file names will be listed after the ``Open``
In addition, up to 5 recent file names will be listed after the *Open*
entry that allows re-opening recently opened files. This list is stored
when quitting and recovered when starting again.
Edit
^^^^
The ``Edit`` menu offers the usual editor functions like ``Undo``,
``Redo``, ``Cut``, ``Copy``, ``Paste``. It can also open a
``Preferences`` dialog (keyboard shortcut `Ctrl-P`) and allows deletion
of all stored preferences and settings, so they are reset to their
default values.
The *Edit* menu offers the usual editor functions like *Undo*, *Redo*,
*Cut*, *Copy*, *Paste*, and a *Find and Replace* dialog (keyboard
shortcut `Ctrl-F`). It can also open a *Preferences* dialog (keyboard
shortcut `Ctrl-P`) and allows deleting all stored preferences and
settings, so they are reset to their default values.
Run
^^^
The ``Run`` menu has options to start and stop a LAMMPS process. Rather
The *Run* menu has options to start and stop a LAMMPS process. Rather
than calling the LAMMPS executable as a separate executable, the
LAMMPS-GUI is linked to the LAMMPS library and thus can run LAMMPS
internally through the :ref:`LAMMPS C-library interface <lammps_c_api>`
@ -635,36 +652,36 @@ from a string buffer.
The LAMMPS calculations are run in a concurrent thread so that the GUI
can stay responsive and be updated during the run. The GUI can retrieve
data from the running LAMMPS instance and tell it to stop at the next
timestep. The ``Stop LAMMPS`` entry will do this by calling the
timestep. The *Stop LAMMPS* entry will do this by calling the
:cpp:func:`lammps_force_timeout` library function, which is equivalent
to a :doc:`timer timeout 0 <timer>` command.
The ``Set Variables...`` entry opens a dialog box where
The *Set Variables...* entry opens a dialog box where
:doc:`index style variables <variable>` can be set. Those variables
are passed to the LAMMPS instance when it is created and are thus
set *before* a run is started.
.. image:: JPG/lammps-gui-variables.png
:align: center
:scale: 75%
:scale: 50%
The ``Set Variables`` dialog will be pre-populated with entries that
The *Set Variables* dialog will be pre-populated with entries that
are set as index variables in the input and any variables that are
used but not defined, if the built-in parser can detect them. New
rows for additional variables can be added through the ``Add Row``
button and existing rows can be deleted by clicking on the ``X`` icons
rows for additional variables can be added through the *Add Row*
button and existing rows can be deleted by clicking on the *X* icons
on the right.
The ``Create Image`` entry will send a :doc:`dump image <dump_image>`
The *Create Image* entry will send a :doc:`dump image <dump_image>`
command to the LAMMPS instance, read the resulting file, and show it
in an ``Image Viewer`` window.
in an *Image Viewer* window.
The ``View in OVITO`` entry will launch `OVITO <https://ovito.org>`_
The *View in OVITO* entry will launch `OVITO <https://ovito.org>`_
with a :doc:`data file <write_data>` containing the current state of
the system. This option is only available if LAMMPS-GUI can find
the OVITO executable in the system path.
The ``View in VMD`` entry will launch VMD with a :doc:`data file
The *View in VMD* entry will launch VMD with a :doc:`data file
<write_data>` containing the current state of the system. This option
is only available if LAMMPS-GUI can find the VMD executable in the
system path.
@ -672,33 +689,70 @@ system path.
View
^^^^
The ``View`` menu offers to show or hide additional windows with log
The *View* menu offers to show or hide additional windows with log
output, charts, slide show, variables, or snapshot images. The
default settings for their visibility can be changed in the
``Preferences dialog``.
*Preferences* dialog.
About
^^^^^
The ``About`` menu finally offers a couple of dialog windows and an
The *About* menu finally offers a couple of dialog windows and an
option to launch the LAMMPS online documentation in a web browser. The
``About LAMMPS-GUI`` entry displays a dialog with a summary of the
*About LAMMPS-GUI* entry displays a dialog with a summary of the
configuration settings of the LAMMPS library in use and the version
number of LAMMPS-GUI itself. The ``Quick Help`` displays a dialog with
a minimal description of LAMMPS-GUI. The ``LAMMPS-GUI Howto`` entry
number of LAMMPS-GUI itself. The *Quick Help* displays a dialog with
a minimal description of LAMMPS-GUI. The *LAMMPS-GUI Howto* entry
will open this documentation page from the online documentation in a web
browser window. The ``LAMMPS Manual`` entry will open the main page of
browser window. The *LAMMPS Manual* entry will open the main page of
the LAMMPS online documentation in a web browser window.
The ``LAMMPS Tutorial`` entry will open the main page of the set of
The *LAMMPS Tutorial* entry will open the main page of the set of
LAMMPS tutorials authored and maintained by Simon Gravelle at
https://lammpstutorials.github.io/ in a web browser window.
-----
Find and Replace
----------------
.. image:: JPG/lammps-gui-find.png
:align: center
:scale: 33%
The *Find and Replace* dialog allows searching for and replacing
text in the *Editor* window.
The dialog can be opened either from the *Edit* menu or with the
keyboard shortcut `Ctrl-F`. You can enter the text to search for.
Through three check-boxes the search behavior can be adjusted:
- If checked, "Match case" does a case sensitive search; otherwise
the search is case insensitive.
- If checked, "Wrap around" starts searching from the start of the
document, if there is no match found from the current cursor position
until the end of the document; otherwise the search will stop.
- If checked, the "Whole word" setting only finds full word matches
(white space and special characters are word boundaries).
Clicking on the *Next* button will search for the next occurrence of the
search text and select / highlight it. Clicking on the *Replace* button
will replace an already highlighted search text and find the next one.
If no text is selected, or the selected text does not match the
selection string, then the first click on the *Replace* button will
only search and highlight the next occurrence of the search string.
Clicking on the *Replace All* button will replace all occurrences from
the cursor position to the end of the file; if the *Wrap around* box is
checked, then it will replace **all** occurrences in the **entire**
document. Clicking on the *Done* button will dismiss the dialog.
------
Preferences
-----------
The ``Preferences`` dialog allows customization of the behavior and
The *Preferences* dialog allows customization of the behavior and
look of LAMMPS-GUI. The settings are grouped and each group is
displayed within a tab.
@ -745,7 +799,7 @@ General Settings:
otherwise each command will create a new image window.
- *Path to LAMMPS Shared Library File:* this option is only visible
when LAMMPS-GUI was compiled to load the LAMMPS library at run time
instead of being linked to it directly. With the ``Browse..`` button
instead of being linked to it directly. With the *Browse..* button
or by changing the text, a different shared library file with a
different compilation of LAMMPS with different settings or from a
different version can be loaded. After this setting was changed,
@ -755,16 +809,19 @@ General Settings:
log) of the application can be set.
- *Select Text Font:* Opens a font selection dialog where the type and
size for the text editor and log font of the application can be set.
- *GUI update interval:* Allows to set the time interval between GUI and
data updates during a LAMMPS run in milliseconds. The default is to
update the GUI every 10 milliseconds. This is good for many cases.
Set this to 100 milliseconds or more if LAMMPS-GUI consumes too many
resources during a run. For LAMMPS runs that run *very* fast (for
example in tutorial examples), however, data may be missed and through
lowering this interval, this can be corrected. However, this will
make the GUI use more resources, which may be a problem on some
computers with slower CPUs and a small number of CPU cores. This
- *Data update interval:* Allows to set the time interval between data
updates during a LAMMPS run in milliseconds. The default is to update
the data (for charts and output window) every 10 milliseconds. This
is good for many cases. Set this to 100 milliseconds or more if
LAMMPS-GUI consumes too many resources during a run. For LAMMPS runs
that run *very* fast (for example in tutorial examples), however, data
may be missed and through lowering this interval, this can be
corrected. However, this will make the GUI use more resources. This
setting may be changed to a value between 1 and 1000 milliseconds.
- *Charts update interval:* Allows to set the time interval between redrawing
the plots in the *Charts* window in milliseconds. The default is to
redraw the plots every 500 milliseconds. This is just for the drawing,
data collection is managed with the previous setting.
Accelerators:
^^^^^^^^^^^^^
@ -780,7 +837,7 @@ Snapshot Image:
^^^^^^^^^^^^^^^
This tab allows setting defaults for the snapshot images displayed in
the ``Image Viewer`` window, such as its dimensions and the zoom factor
the *Image Viewer* window, such as its dimensions and the zoom factor
applied. The *Antialias* switch will render images with twice the
number of pixels for width and height and then smoothly scale the image
back to the requested size. This produces higher quality images with
@ -824,7 +881,7 @@ available (On macOS use the Command key instead of Ctrl/Control).
.. list-table::
:header-rows: 1
:widths: auto
:widths: 16 19 13 16 13 22
* - Shortcut
- Function
@ -866,32 +923,32 @@ available (On macOS use the Command key instead of Ctrl/Control).
- Quit Application
- Ctrl+A
- Select All
- Ctrl+P
- Preferences
- Ctrl+F
- Find and Replace
* - Ctrl+W
- Close Window
- Ctrl+Shift+H
- Quick Help
- Ctrl+Shift+G
- LAMMPS-GUI Howto
* - Ctrl+Shift+A
- About LAMMPS
- Ctrl+?
- Context Help
- Ctrl+Shift+W
- Show Variables
* - Ctrl+Shift+M
- LAMMPS Manual
- TAB
- Reformat line
- Shift+TAB
- Show Completions
* - Ctrl+Shift+T
- LAMMPS Tutorial
- Ctrl+Shift+Enter
* - Ctrl+Shift+Enter
- Run File
-
-
- Ctrl+Shift+W
- Show Variables
- Ctrl+P
- Preferences
* - Ctrl+Shift+A
- About LAMMPS
- Ctrl+Shift+H
- Quick Help
- Ctrl+Shift+G
- LAMMPS-GUI Howto
* - Ctrl+Shift+M
- LAMMPS Manual
- Ctrl+?
- Context Help
- Ctrl+Shift+T
- LAMMPS Tutorial
Further editing keybindings `are documented with the Qt documentation
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In

View File

@ -39,16 +39,18 @@ lammps.lammps
* interface modeled after the LAMMPS :ref:`C language library interface API <lammps_c_api>`
* requires knowledge of how LAMMPS internally works (C pointers, etc)
* full support for running Python with MPI using `mpi4py <https://mpi4py.readthedocs.io>`_
* no overhead from creating a more Python-like interface
lammps.PyLammps
"""""""""""""""
* higher-level abstraction built on *top* of original :py:class:`ctypes based interface <lammps.lammps>`
* higher-level abstraction built on *top* of the original :py:class:`ctypes based interface <lammps.lammps>`
* manipulation of Python objects
* communication with LAMMPS is hidden from API user
* shorter, more concise Python
* better IPython integration, designed for quick prototyping
* designed for serial execution
* additional overhead from capturing and parsing the LAMMPS screen output
Quick Start
-----------

View File

@ -51,15 +51,15 @@ lammps.org". General questions about LAMMPS should be posted in the
* - `Jacob R. Gissinger <jg_>`_
- Stevens Institute of Technology
- jgissing at stevens.edu
- reactive molecular dynamics, macromolecular systems, type labels
- reactive molecular dynamics, macro-molecular systems, type labels
* - James Goff
- SNL
- jmgoff at sandia.gov
- machine learned potentials, QEq solvers, Python
* - Megan McCarthy
* - Meg McCarthy
- SNL
- megmcca at sandia.gov
- alloys, microstucture, machine learned potentials
- alloys, micro-structure, machine learned potentials
* - Stan Moore
- SNL
- stamoor at sandia.gov
@ -67,7 +67,7 @@ lammps.org". General questions about LAMMPS should be posted in the
* - `Trung Nguyen <tn_>`_
- U Chicago
- ndactrung at gmail.com
- soft matter, GPU package
- soft matter, GPU package, DIELECTRIC package, regression testing
.. _rb: https://rbberger.github.io/
.. _gc: https://enthalpiste.fr/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -4,6 +4,7 @@ Per-atom properties
This section documents the following functions:
- :cpp:func:`lammps_extract_atom_datatype`
- :cpp:func:`lammps_extract_atom_size`
- :cpp:func:`lammps_extract_atom`
-----------------------
@ -13,6 +14,11 @@ This section documents the following functions:
-----------------------
.. doxygenfunction:: lammps_extract_atom_size
:project: progguide
-----------------------
.. doxygenfunction:: lammps_extract_atom
:project: progguide

View File

@ -1823,7 +1823,8 @@ Aidan Thompson^3, Gabor Csanyi^2, Christoph Ortner^4, Ralf Drautz^1.
**Install:**
This package has :ref:`specific installation instructions <ml-pace>` on the
:doc:`Build extras <Build_extras>` page.
:doc:`Build extras <Build_extras>` page. This package may also be compiled
as a plugin to avoid licensing conflicts when distributing binaries.
**Supporting info:**
@ -2344,7 +2345,9 @@ and Gareth Tribello.
**Install:**
This package has :ref:`specific installation instructions <plumed>` on the :doc:`Build extras <Build_extras>` page.
This package has :ref:`specific installation instructions <plumed>` on the
:doc:`Build extras <Build_extras>` page. This package may also be compiled
as a plugin to avoid licensing conflicts when distributing binaries.
**Supporting info:**
@ -2642,7 +2645,7 @@ This package has :ref:`specific installation instructions <rheo>` on the :doc:`B
**Authors:** Joel T. Clemmer (Sandia National Labs),
Thomas C. O'Connor (Carnegie Mellon University)
.. versionadded:: TBD
.. versionadded:: 29Aug2024
**Supporting info:**

View File

@ -508,7 +508,7 @@ e.g. the *nfile* and *fileper* keywords. See the
**-restart2info restartfile keyword ...**
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Write out some info about the restart file and and immediately exit.
This is the same operation as if the following 2-line input script were

View File

@ -590,20 +590,31 @@ and the LAMMPS library, via ``-D LAMMPS_SOURCE_DIR=/path/to/lammps/src``.
CMake will try to guess a build folder with the LAMMPS library from that
path, but it can also be set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
Plugin version
""""""""""""""
Rather than linking to the LAMMPS library during compilation, it is also
possible to compile the GUI with a plugin loader that will load
the LAMMPS library dynamically at runtime during the start of the GUI
from a shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
possible to compile the GUI with a plugin loader that will load the
LAMMPS library dynamically at runtime during the start of the GUI from a
shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
``liblammps.dll`` (depending on the operating system). This has the
advantage that the LAMMPS library can be built from updated or modified
LAMMPS source without having to recompile the GUI. The ABI of the
LAMMPS C-library interface is very stable and generally backward
compatible. This feature is enabled by setting
``-D LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
compatible. This feature is enabled by setting ``-D
LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS
distribution.
When compiling LAMMPS-GUI with plugin support, there is an additional
command line flag (``-p <path>`` or ``--pluginpath <path>``) which
allows to override the path to LAMMPS shared library used by the GUI.
This is usually auto-detected on the first run and can be changed in the
LAMMPS-GUI *Preferences* dialog. The command line flag allows to reset
this path to a valid value in case the original setting has become
invalid. An empty path ("") as argument restores the default setting.
Platform notes
^^^^^^^^^^^^^^
@ -671,6 +682,15 @@ folder> --target tgz`` or ``make tgz`` to build a
``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
support libraries.
It is also possible to build a `flatpak bundle
<https://docs.flatpak.org/en/latest/single-file-bundles.html>`_ which is
a way to distribute applications in a way that is compatible with most
Linux distributions. Use the "flatpak" target to trigger a compile
(``cmake --build <build folder> --target flatpak`` or ``make flatpak``).
Please note that this will not build from the local sources but from the
repository and branch listed in the ``org.lammps.lammps-gui.yml``
LAMMPS-GUI source folder.
----------
.. _arc:
@ -1002,7 +1022,7 @@ regression tests with a given LAMMPS binary. The tool launches the
LAMMPS binary with any given input script under one of the `examples`
subdirectories, and compares the thermo output in the generated log file
with those in the provided log file with the same number of processors
ub the same subdirectory. If the differences between the actual and
in the same subdirectory. If the differences between the actual and
reference values are within specified tolerances, the test is considered
passed. For each test batch, that is, a set of example input scripts,
the mpirun command, the LAMMPS command line arguments, and the

View File

@ -38,7 +38,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
The *rheo/shell* bond style is designed to work with
:doc:`fix rheo/oxidation <fix_rheo_oxidation>` which creates candidate

View File

@ -59,11 +59,12 @@ may also contribute to the virial term.
A symmetric pressure tensor, stored as a 6-element vector, is also
calculated by this compute. The six components of the vector are
ordered :math:`xx,` :math:`yy,` :math:`zz,` :math:`xy,` :math:`xz,` :math:`yz.`
The equation for the :math:`(I,J)` components (where :math:`I` and :math:`J`
are :math:`x`, :math:`y`, or :math:`z`) is similar to the above formula,
except that the first term uses components of the kinetic energy tensor and the
second term uses components of the virial tensor:
ordered :math:`xx,` :math:`yy,` :math:`zz,` :math:`xy,` :math:`xz,`
:math:`yz.` The equation for the :math:`(I,J)` components (where
:math:`I` and :math:`J` are :math:`x`, :math:`y`, or :math:`z`) is
similar to the above formula, except that the first term uses
components related to the kinetic energy tensor and the second term
uses components of the virial tensor:
.. math::
@ -75,8 +76,8 @@ calculated. This includes a kinetic energy (temperature) term and the
virial as the sum of pair, bond, angle, dihedral, improper, kspace
(long-range), and fix contributions to the force on each atom. If any
extra keywords are listed, then only those components are summed to
compute temperature or ke and/or the virial. The *virial* keyword
means include all terms except the kinetic energy *ke*\ .
compute temperature or ke and/or the virial. The *virial* keyword means
include all terms except the kinetic energy *ke*\ .
The *pair/hybrid* keyword means to only include contribution
from a sub-style in a *hybrid* or *hybrid/overlay* pair style.
@ -86,26 +87,31 @@ system, including for many-body potentials and accounting for the
effects of periodic boundary conditions are discussed in
:ref:`(Thompson) <Thompson1>`.
The temperature and kinetic energy tensor is not calculated by this
The temperature and kinetic energy tensor are not calculated by this
compute, but rather by the temperature compute specified with the
command. If the kinetic energy is not included in the pressure, than
the temperature compute is not used and can be specified as NULL.
Normally the temperature compute used by compute pressure should
calculate the temperature of all atoms for consistency with the virial
term, but any compute style that calculates temperature can be used
(e.g., one that excludes frozen atoms or other degrees of freedom).
command. See the doc pages for individual compute temp variants for an
explanation of how they calculate temperature and a symmetric tensor
(6-element vector) whose components are twice that of the traditional KE
tensor. That tensor is what appears in the pressure tensor formula
above.
If the kinetic energy is not included in the pressure, than the
temperature compute is not used and can be specified as NULL. Normally
the temperature compute used by compute pressure should calculate the
temperature of all atoms for consistency with the virial term, but any
compute style that calculates temperature can be used (e.g., one that
excludes frozen atoms or other degrees of freedom).
Note that if desired the specified temperature compute can be one that
subtracts off a bias to calculate a temperature using only the thermal
velocity of the atoms (e.g., by subtracting a background streaming
velocity).
See the doc pages for individual :doc:`compute commands <compute>` to determine
which ones include a bias.
velocity). See the doc pages for individual :doc:`compute commands
<compute>` to determine which ones include a bias.
Also note that the :math:`N` in the first formula above is really
degrees-of-freedom divided by :math:`d` = dimensionality, where the DOF value
is calculated by the temperature compute.
See the various :doc:`compute temperature <compute>` styles for details.
degrees-of-freedom divided by :math:`d` = dimensionality, where the
DOF value is calculated by the temperature compute. See the various
:doc:`compute temperature <compute>` styles for details.
A compute of this style with the ID of thermo_press is created when
LAMMPS starts up, as if this command were in the input script:
@ -136,9 +142,8 @@ The ordering of values in the symmetric pressure tensor is as follows:
:math:`p_{xx},` :math:`p_{yy},` :math:`p_{zz},` :math:`p_{xy},`
:math:`p_{xz},` :math:`p_{yz}.`
The scalar and vector values calculated by this compute are
"intensive". The scalar and vector values will be in pressure
:doc:`units <units>`.
The scalar and vector values calculated by this compute are "intensive".
The scalar and vector values will be in pressure :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -55,7 +55,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Define a computation that stores atom attributes specific to the RHEO
package for each atom in the group. This is useful so that the values

View File

@ -48,13 +48,17 @@ the group, :math:`N_\mathrm{fix DOFs}` is the number of degrees of
freedom removed by fix commands (see below), :math:`k_B` is the
Boltzmann constant, and :math:`T` is the resulting computed temperature.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as the
above expression for :math:`E_\mathrm{kin}`, except that :math:`v_i^2` is
replaced by :math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on.
The six components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
@ -94,16 +98,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length six (KE tensor), which can be accessed by indices
1--6. These values can be used by any command that uses global scalar
or vector values from a compute as input. See the :doc:`Howto output
<Howto_output>` page for an overview of LAMMPS output options.
vector of length six (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -41,8 +41,8 @@ translational and rotational kinetic energy. This differs from the
usual :doc:`compute temp <compute_temp>` command, which assumes point
particles with only translational kinetic energy.
Only finite-size particles (aspherical or spherical) can be included
in the group. For 3d finite-size particles, each has six degrees of
Only finite-size particles (aspherical or spherical) can be included in
the group. For 3d finite-size particles, each has six degrees of
freedom (three translational, three rotational). For 2d finite-size
particles, each has three degrees of freedom (two translational, one
rotational).
@ -70,25 +70,39 @@ axis. It will also be the case for biaxial ellipsoids when exactly two
of the semiaxes have the same length and the corresponding relative well
depths are equal.
The translational kinetic energy is computed the same as is described
by the :doc:`compute temp <compute_temp>` command. The rotational
kinetic energy is computed as :math:`\frac12 I \omega^2`, where :math:`I` is
the inertia tensor for the aspherical particle and :math:`\omega` is its
The translational kinetic energy is computed the same as is described by
the :doc:`compute temp <compute_temp>` command. The rotational kinetic
energy is computed as :math:`\frac12 I \omega^2`, where :math:`I` is the
inertia tensor for the aspherical particle and :math:`\omega` is its
angular velocity, which is computed from its angular momentum.
.. note::
For :doc:`2d models <dimension>`, particles are treated as
ellipsoids, not ellipses, meaning their moments of inertia will be the
same as in 3d.
ellipsoids, not ellipses, meaning their moments of inertia will be
the same as in 3d.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute. The formula for the components of the
tensor is the same as the above formula, except that :math:`v^2` and
:math:`\omega^2` are replaced by :math:`v_x v_y` and :math:`\omega_x \omega_y`
for the :math:`xy` component, and the appropriate elements of the moment of
inertia tensor are used. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
:math:`\omega^2` are replaced by :math:`v_x v_y` and :math:`\omega_x
\omega_y` for the :math:`xy` component, and the appropriate elements of
the moment of inertia tensor are used. The six components of the vector
are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for the
components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y`
and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on.
And the appropriate elements of the moment of inertia tensor are used.
Note that because it lacks the 1/2 factor, these tensor components are
twice those of the traditional kinetic energy tensor. The six
components of the vector are ordered :math:`xx`, :math:`yy`, :math:`zz`,
:math:`xy`, :math:`xz`, :math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic/dof* option of
@ -131,27 +145,26 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
vector of length 6 (symmetric tensor), which can be accessed by indices
1--6. These values can be used by any command that uses global scalar
or vector values from a compute as input. See the :doc:`Howto output
<Howto_output>` page for an overview of LAMMPS output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value calculated by this compute is "intensive". The vector
values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""
This compute is part of the ASPHERE 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.
This compute requires that atoms store angular momentum and a
quaternion as defined by the :doc:`atom_style ellipsoid <atom_style>`
command.
This compute requires that atoms store angular momentum and a quaternion
as defined by the :doc:`atom_style ellipsoid <atom_style>` command.
All particles in the group must be finite-size. They cannot be point
particles, but they can be aspherical or spherical as defined by their

View File

@ -62,12 +62,17 @@ kinetic energy is computed as :math:`\frac12 I \omega^2`, where :math:`I`
is the moment of inertia tensor for the aspherical particle and :math:`\omega`
is its angular velocity, which is computed from its angular momentum.
A kinetic energy tensor, stored as a 6-element vector, is also calculated by
this compute. The formula for the components of the tensor is the same as the
above formula, except that :math:`v^2` and :math:`\omega^2` are
replaced by :math:`v_x v_y` and :math:`\omega_x \omega_y` for the
math:`xy` component, and the appropriate elements of the inertia tensor are
used. The six components of the vector are ordered :math:`xx`, :math:`yy`,
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y`
and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on.
And the appropriate elements of the moment of inertia tensor are used.
Note that because it lacks the 1/2 factor, these tensor components are
twice those of the traditional kinetic energy tensor. The six
components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
The number of atoms contributing to the temperature is assumed to be
@ -111,17 +116,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`.
The vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -85,12 +85,14 @@ By default, *adof* = 2 or 3 = dimensionality of system, as set via the
:doc:`dimension <dimension>` command, and *cdof* = 0.0.
This gives the usual formula for temperature.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by
:math:`v_x v_y` for the :math:`xy` component, and so on.
The six components of the vector are ordered :math:`xx`, :math:`yy`,
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute. The formula for the components of the tensor is the
same as the above expression for :math:`E_\mathrm{kin}`, except that
the 1/2 factor is NOT included and the :math:`v_i^2` is replaced by
:math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on. Note
that because it lacks the 1/2 factor, these tensor components are
twice those of the traditional kinetic energy tensor. The six
components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
Note that the number of atoms contributing to the temperature is
@ -227,10 +229,10 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
This compute also optionally calculates a global array, if one or more
@ -245,9 +247,9 @@ page for an overview of LAMMPS output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive". The array values are "intensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`. The array values
will be in temperature :doc:`units <units>` for the *temp* value, and in
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`. The array values will be
in temperature :doc:`units <units>` for the *temp* value, and in
energy :doc:`units <units>` for the *kecom* and *internal* values.
Restrictions

View File

@ -44,12 +44,17 @@ where KE is the total kinetic energy of the group of atoms (sum of
simulation, :math:`N` is number of atoms in the group, :math:`k_B` is
the Boltzmann constant, and :math:`T` is the absolute temperature.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y`
for the :math:`xy` component, and so on. The six components of the vector are
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
@ -81,17 +86,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`.
The vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values is in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -31,27 +31,27 @@ on the center-of-mass velocity of atom pairs that are bonded to each
other. This compute is designed to be used with the adiabatic
core/shell model of :ref:`(Mitchell and Fincham) <MitchellFincham1>`.
See the :doc:`Howto coreshell <Howto_coreshell>` page for an overview of
the model as implemented in LAMMPS. Specifically, this compute
enables correct temperature calculation and thermostatting of
core/shell pairs where it is desirable for the internal degrees of
freedom of the core/shell pairs to not be influenced by a thermostat.
A compute of this style can be used by any command that computes a
temperature via :doc:`fix_modify <fix_modify>`
(e.g., :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
the model as implemented in LAMMPS. Specifically, this compute enables
correct temperature calculation and thermostatting of core/shell pairs
where it is desirable for the internal degrees of freedom of the
core/shell pairs to not be influenced by a thermostat. A compute of
this style can be used by any command that computes a temperature via
:doc:`fix_modify <fix_modify>` (e.g., :doc:`fix temp/rescale
<fix_temp_rescale>`, :doc:`fix npt <fix_nh>`).
Note that this compute does not require all ions to be polarized,
hence defined as core/shell pairs. One can mix core/shell pairs and
ions without a satellite particle if desired. The compute will
consider the non-polarized ions according to the physical system.
Note that this compute does not require all ions to be polarized, hence
defined as core/shell pairs. One can mix core/shell pairs and ions
without a satellite particle if desired. The compute will consider the
non-polarized ions according to the physical system.
For this compute, core and shell particles are specified by two
respective group IDs, which can be defined using the
:doc:`group <group>` command. The number of atoms in the two groups
must be the same and there should be one bond defined between a pair
of atoms in the two groups. Non-polarized ions which might also be
included in the treated system should not be included into either of
these groups, they are taken into account by the *group-ID* (second
argument) of the compute.
respective group IDs, which can be defined using the :doc:`group
<group>` command. The number of atoms in the two groups must be the
same and there should be one bond defined between a pair of atoms in the
two groups. Non-polarized ions which might also be included in the
treated system should not be included into either of these groups, they
are taken into account by the *group-ID* (second argument) of the
compute.
The temperature is calculated by the formula
@ -60,52 +60,56 @@ The temperature is calculated by the formula
\text{KE} = \frac{\text{dim}}{2} N k_B T,
where KE is the total kinetic energy of the group of atoms (sum of
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the simulation,
:math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann
constant, and :math:`T` is the absolute temperature. Note that
the velocity of each core or shell atom used in the KE calculation is
the velocity of the center-of-mass (COM) of the core/shell pair the
atom is part of.
:math:`\frac12 m v^2`), dim = 2 or 3 is the dimensionality of the
simulation, :math:`N` is the number of atoms in the group, :math:`k_B`
is the Boltzmann constant, and :math:`T` is the absolute temperature.
Note that the velocity of each core or shell atom used in the KE
calculation is the velocity of the center-of-mass (COM) of the
core/shell pair the atom is part of.
A kinetic energy tensor, stored as a six-element vector, is also calculated by
this compute for use in the computation of a pressure tensor. The formula for
the components of the tensor is the same as the above formula, except that
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and so
on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`. In contrast to the temperature,
the velocity of each core or shell atom is taken individually.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for the
components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
The change this fix makes to core/shell atom velocities is essentially
computing the temperature after a "bias" has been removed from the velocity of
the atoms. This "bias" is the velocity of the atom relative to the
center-of-mass velocity of the core/shell pair. If this compute is used with a
fix command that performs thermostatting then this bias will be subtracted from
each atom, thermostatting of the remaining center-of-mass velocity will be
performed, and the bias will be added back in. This means the thermostatting
will effectively be performed on the core/shell pairs, instead of on the
individual core and shell atoms. Thermostatting fixes that work in this way
include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`,
:doc:`fix temp/berendsen <fix_temp_berendsen>`, and
:doc:`fix langevin <fix_langevin>`.
computing the temperature after a "bias" has been removed from the
velocity of the atoms. This "bias" is the velocity of the atom relative
to the center-of-mass velocity of the core/shell pair. If this compute
is used with a fix command that performs thermostatting then this bias
will be subtracted from each atom, thermostatting of the remaining
center-of-mass velocity will be performed, and the bias will be added
back in. This means the thermostatting will effectively be performed on
the core/shell pairs, instead of on the individual core and shell atoms.
Thermostatting fixes that work in this way include :doc:`fix nvt
<fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix
temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin
<fix_langevin>`.
The internal energy of core/shell pairs can be calculated by the
:doc:`compute temp/chunk <compute_temp_chunk>` command, if chunks are defined
as core/shell pairs. See the :doc:`Howto coreshell <Howto_coreshell>` doc
page for more discussion on how to do this.
:doc:`compute temp/chunk <compute_temp_chunk>` command, if chunks are
defined as core/shell pairs. See the :doc:`Howto coreshell
<Howto_coreshell>` doc page for more discussion on how to do this.
Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
vector of length 6 (symmetric tensor), which can be accessed by indices
1--6. These values can be used by any command that uses global scalar
or vector values from a compute as input.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value calculated by this compute is "intensive". The vector
values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -73,12 +73,16 @@ simulation, :math:`N` is the number of atoms in the group, :math:`k_B`
is the Boltzmann constant, and :math:`T` is the temperature. Note that
:math:`v` in the kinetic energy formula is the atom's velocity.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
the :math:`xy` component, and so on. The six components of the vector are
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
@ -128,17 +132,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`.
The vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -29,17 +29,20 @@ model, after subtracting out a streaming velocity induced by the
simulation box changing size and/or shape, for example in a
non-equilibrium MD (NEMD) simulation. The size/shape change is
induced by use of the :doc:`fix deform <fix_deform>` command. A
compute of this style is created by the
:doc:`fix nvt/sllod/eff <fix_nvt_sllod_eff>` command to compute the thermal
temperature of atoms for thermostatting purposes. A compute of this
style can also be used by any command that computes a temperature
(e.g., :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt/eff <fix_nh_eff>`).
compute of this style is created by the :doc:`fix nvt/sllod/eff
<fix_nvt_sllod_eff>` command to compute the thermal temperature of
atoms for thermostatting purposes. A compute of this style can also
be used by any command that computes a temperature (e.g.,
:doc:`thermo_modify <thermo_modify>`, :doc:`fix npt/eff
<fix_nh_eff>`).
The calculation performed by this compute is exactly like that
described by the :doc:`compute temp/deform <compute_temp_deform>`
command, except that the formula for the temperature includes the
radial electron velocity contributions, as discussed by the :doc:`compute temp/eff <compute_temp_eff>` command. Note that only the
translational degrees of freedom for each nuclei or electron are
command, except that the formulas for the temperature (scalar) and
diagonal components of the symmetric tensor (vector) include the
radial electron velocity contributions, as discussed by the
:doc:`compute temp/eff <compute_temp_eff>` command. Note that only
the translational degrees of freedom for each nuclei or electron are
affected by the streaming velocity adjustment. The radial velocity
component of the electrons is not affected.
@ -47,17 +50,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -44,12 +44,16 @@ constant, and :math:`T` = temperature. The calculation of KE excludes the
is 0. The dim parameter is adjusted to give the correct number of
degrees of freedom.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the calculation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
the :math:`xy` component, and so on. The six components of the vector are
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
@ -88,17 +92,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -97,21 +97,27 @@ center-of-mass velocity across the group in directions where streaming velocity
is *not* subtracted. This can be altered using the *extra* option of the
:doc:`compute_modify <compute_modify>` command.
If the *out* keyword is used with a *tensor* value, which is the default,
a kinetic energy tensor, stored as a six-element vector, is also calculated by
this compute for use in the computation of a pressure tensor. The formula for
the components of the tensor is the same as the above formula, except that
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
If the *out* keyword is used with a *tensor* value, which is the
default, then a symmetric tensor, stored as a six-element vector, is
also calculated by this compute for use in the computation of a
pressure tensor by the :doc:`compute pressue <compute_pressure>`
command. The formula for the components of the tensor is the same as
the above expression for :math:`E_\mathrm{kin}`, except that the 1/2
factor is NOT included and the :math:`v_i^2` is replaced by
:math:`v_{i,x} v_{i,y}` for the :math:`xy` component, and so on. Note
that because it lacks the 1/2 factor, these tensor components are
twice those of the traditional kinetic energy tensor. The six
components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
If the *out* keyword is used with a *bin* value, the count of atoms and
computed temperature for each bin are stored for output, as an array of values,
as described below. The temperature of each bin is calculated as described
above, where the bias velocity is subtracted and only the remaining thermal
velocity of atoms in the bin contributes to the temperature. See the note
below for how the temperature is normalized by the degrees-of-freedom of atoms
in the bin.
If the *out* keyword is used with a *bin* value, the count of atoms
and computed temperature for each bin are stored for output, as an
array of values, as described below. The temperature of each bin is
calculated as described above, where the bias velocity is subtracted
and only the remaining thermal velocity of atoms in the bin
contributes to the temperature. See the note below for how the
temperature is normalized by the degrees-of-freedom of atoms in the
bin.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
@ -166,16 +172,17 @@ Output info
This compute calculates a global scalar (the temperature). Depending
on the setting of the *out* keyword, it also calculates a global
vector or array. For *out* = *tensor*, it calculates a vector of
length 6 (KE tensor), which can be accessed by indices 1--6. For *out*
= *bin* it calculates a global array which has 2 columns and :math:`N` rows,
where :math:`N` is the number of bins. The first column contains the number
of atoms in that bin. The second contains the temperature of that
bin, calculated as described above. The ordering of rows in the array
is as follows. Bins in :math:`x` vary fastest, then :math:`y`, then
:math:`z`. Thus for a :math:`10\times 10\times 10` 3d array of bins, there
will be 1000 rows. The bin with indices :math:`(i_x,i_y,i_z) = (2,3,4)` would
map to row :math:`M = 10^2(i_z-1) + 10(i_y-1) + i_x = 322`, where the rows are
numbered from 1 to 1000 and the bin indices are numbered from 1 to 10 in each
length 6 (symmetric tensor), which can be accessed by indices 1--6.
For *out* = *bin* it calculates a global array which has 2 columns and
:math:`N` rows, where :math:`N` is the number of bins. The first
column contains the number of atoms in that bin. The second contains
the temperature of that bin, calculated as described above. The
ordering of rows in the array is as follows. Bins in :math:`x` vary
fastest, then :math:`y`, then :math:`z`. Thus for a :math:`10\times
10\times 10` 3d array of bins, there will be 1000 rows. The bin with
indices :math:`(i_x,i_y,i_z) = (2,3,4)` would map to row :math:`M =
10^2(i_z-1) + 10(i_y-1) + i_x = 322`, where the rows are numbered from
1 to 1000 and the bin indices are numbered from 1 to 10 in each
dimension.
These values can be used by any command that uses global scalar or
@ -186,9 +193,9 @@ options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive". The array values are "intensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`. The first column
of array values are counts; the values in the second column will be in
The scalar value us in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`. The first column of array
values are counts; the values in the second column will be in
temperature :doc:`units <units>`.
Restrictions
@ -203,7 +210,10 @@ will be for most thermostats.
Related commands
""""""""""""""""
:doc:`compute temp <compute_temp>`, :doc:`compute temp/ramp <compute_temp_ramp>`, :doc:`compute temp/deform <compute_temp_deform>`, :doc:`compute pressure <compute_pressure>`
:doc:`compute temp <compute_temp>`,
:doc:`compute temp/ramp <compute_temp_ramp>`,
:doc:`compute temp/deform <compute_temp_deform>`,
:doc:`compute pressure <compute_pressure>`
Default
"""""""

View File

@ -63,12 +63,17 @@ command (e.g., :math:`\AA` for units = real or metal). A
velocity in lattice spacings per unit time). The :doc:`lattice <lattice>`
command must have been previously used to define the lattice spacing.
A kinetic energy tensor, stored as a six-element vector, is also calculated by
this compute for use in the computation of a pressure tensor. The formula for
the components of the tensor is the same as the above formula, except that
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be constant
for the duration of the run; use the *dynamic* option of the
@ -100,17 +105,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""
@ -119,7 +124,10 @@ Restrictions
Related commands
""""""""""""""""
:doc:`compute temp <compute_temp>`, :doc:`compute temp/profie <compute_temp_profile>`, :doc:`compute temp/deform <compute_temp_deform>`, :doc:`compute pressure <compute_pressure>`
:doc:`compute temp <compute_temp>`,
:doc:`compute temp/profile <compute_temp_profile>`,
:doc:`compute temp/deform <compute_temp_deform>`,
:doc:`compute pressure <compute_pressure>`
Default
"""""""

View File

@ -49,12 +49,17 @@ where KE = is the total kinetic energy of the group of atoms (sum of
:math:`N` is the number of atoms in both the group and region, :math:`k_B` is
the Boltzmann constant, and :math:`T` temperature.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y`
for the :math:`xy` component, and so on. The six components of the vector are
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is calculated each
time the temperature is evaluated since it is assumed atoms can
@ -78,12 +83,13 @@ will operate only on atoms that are currently in the geometric region.
Unlike other compute styles that calculate temperature, this compute
does not subtract out degrees-of-freedom due to fixes that constrain
motion, such as :doc:`fix shake <fix_shake>` and :doc:`fix rigid <fix_rigid>`. This is because those degrees of freedom
(e.g., a constrained bond) could apply to sets of atoms that straddle
the region boundary, and hence the concept is somewhat ill-defined.
If needed the number of subtracted degrees of freedom can be set
explicitly using the *extra* option of the
:doc:`compute_modify <compute_modify>` command.
motion, such as :doc:`fix shake <fix_shake>` and :doc:`fix rigid
<fix_rigid>`. This is because those degrees of freedom (e.g., a
constrained bond) could apply to sets of atoms that straddle the
region boundary, and hence the concept is somewhat ill-defined. If
needed the number of subtracted degrees of freedom can be set
explicitly using the *extra* option of the :doc:`compute_modify
<compute_modify>` command.
See the :doc:`Howto thermostat <Howto_thermostat>` page for a
discussion of different ways to compute temperature and perform
@ -93,17 +99,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`.
The vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -32,32 +32,33 @@ temperature (e.g., :doc:`thermo_modify <thermo_modify>`).
The operation of this compute is exactly like that described by the
:doc:`compute temp/region <compute_temp_region>` command, except that
the formula for the temperature itself includes the radial electron
velocity contributions, as discussed by the
:doc:`compute temp/eff <compute_temp_eff>` command.
the formulas for the temperature (scalar) and diagonal components of
the symmetric tensor (vector) include the radial electron velocity
contributions, as discussed by the :doc:`compute temp/eff
<compute_temp_eff>` command.
Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""
This compute is part of the EFF package. It is only enabled if
LAMMPS was built with that package.
See the :doc:`Build package <Build_package>` page for more info.
This compute is part of the EFF package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Related commands
""""""""""""""""

View File

@ -43,12 +43,17 @@ where KE is the total kinetic energy of the group of atoms (sum of
:math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann
constant, and :math:`T` is the absolute temperature.
A kinetic energy tensor, stored as a six-element vector, is also calculated by
this compute for use in the computation of a pressure tensor. The formula for
the components of the tensor is the same as the above formula, except that
:math:`v^2` is replaced by :math:`v_x v_y` for the :math:`xy` component, and
so on. The six components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
@ -80,17 +85,16 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1-6.
These values can be used by any command that uses global scalar or
vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS output
options.
vector of length 6 (symmetric tensor), which can be accessed by
indices 1-6. These values can be used by any command that uses global
scalar or vector values from a compute as input. See the :doc:`Howto
output <Howto_output>` page for an overview of LAMMPS output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -77,6 +77,18 @@ tensor is the same as the above formulas, except that :math:`v^2` and
vector are ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`,
:math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` and :math:`\omega^2` are replaced by :math:`v_x v_y`
and :math:`\omega_x \omega_y` for the :math:`xy` component, and so on.
Note that because it lacks the 1/2 factor, these tensor components are
twice those of the traditional kinetic energy tensor. The six
components of the vector are ordered :math:`xx`, :math:`yy`,
:math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
:doc:`compute_modify <compute_modify>` command if this is not the case.
@ -117,17 +129,17 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 6 (KE tensor), which can be accessed by indices 1--6.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS
vector of length 6 (symmetric tensor), which can be accessed by
indices 1--6. These values can be used by any command that uses
global scalar or vector values from a compute as input. See the
:doc:`Howto output <Howto_output>` page for an overview of LAMMPS
output options.
The scalar value calculated by this compute is "intensive". The
vector values are "extensive".
The scalar value will be in temperature :doc:`units <units>`. The
vector values will be in energy :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The vector
values are in energy :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -86,12 +86,17 @@ where KE is the total kinetic energy of the group of atoms (sum of
:math:`N` is the number of atoms in the group, :math:`k_B` is the Boltzmann
constant, and :math:`T` is the absolute temperature.
A kinetic energy tensor, stored as a six-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that :math:`v^2` is replaced by :math:`v_x v_y` for
the :math:`xy` component, and so on. The six components of the vector are
ordered :math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`, :math:`yz`.
A symmetric tensor, stored as a six-element vector, is also calculated
by this compute for use in the computation of a pressure tensor by the
:doc:`compute pressue <compute_pressure>` command. The formula for
the components of the tensor is the same as the above expression for
:math:`E_\mathrm{kin}`, except that the 1/2 factor is NOT included and
the :math:`v_i^2` is replaced by :math:`v_{i,x} v_{i,y}` for the
:math:`xy` component, and so on. Note that because it lacks the 1/2
factor, these tensor components are twice those of the traditional
kinetic energy tensor. The six components of the vector are ordered
:math:`xx`, :math:`yy`, :math:`zz`, :math:`xy`, :math:`xz`,
:math:`yz`.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
@ -126,21 +131,21 @@ Output info
"""""""""""
This compute calculates a global scalar (the temperature) and a global
vector of length 7, which can be accessed by indices 1--7.
The first six elements of the vector are the KE tensor,
and the seventh is the cosine-shaped velocity amplitude :math:`V`,
which can be used to calculate the reciprocal viscosity, as shown in the example.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output options.
vector of length 7, which can be accessed by indices 1--7. The first
six elements of the vector are those of the symmetric tensor discussed
above. The seventh is the cosine-shaped velocity amplitude :math:`V`,
which can be used to calculate the reciprocal viscosity, as shown in
the example. These values can be used by any command that uses global
scalar or vector values from a compute as input. See the :doc:`Howto
output <Howto_output>` page for an overview of LAMMPS output options.
The scalar value calculated by this compute is "intensive". The
first six elements of vector values are "extensive",
and the seventh element of vector values is "intensive".
The scalar value will be in temperature :doc:`units <units>`.
The first six elements of vector values will be in energy :doc:`units <units>`.
The seventh element of vector value will be in velocity :doc:`units <units>`.
The scalar value is in temperature :doc:`units <units>`. The first
six elements of vector values are in energy :doc:`units <units>`. The
seventh element of vector value us in velocity :doc:`units <units>`.
Restrictions
""""""""""""

View File

@ -319,25 +319,28 @@ all types from 1 to :math:`N`. A leading asterisk means all types from
:math:`N` (inclusive). A middle asterisk means all types from m to n
(inclusive).
Currently *bond* does not support bond_style hybrid nor bond_style
hybrid/overlay as bond styles. The bond styles that currently work
with fix_adapt are
If :doc:`bond_style hybrid <bond_hybrid>` is used, *bstyle* should be a
sub-style name. The bond styles that currently work with fix adapt are:
+------------------------------------+------------+------------+
| :doc:`class2 <bond_class2>` | r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`fene <bond_fene>` | k,r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`fene/nm <bond_fene>` | k,r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`gromos <bond_gromos>` | k,r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`harmonic <bond_harmonic>` | k,r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`morse <bond_morse>` | r0 | type bonds |
+------------------------------------+------------+------------+
| :doc:`nonlinear <bond_nonlinear>` | epsilon,r0 | type bonds |
+------------------------------------+------------+------------+
+---------------------------------------------------+------------+------------+
| :doc:`class2 <bond_class2>` | r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`fene <bond_fene>` | k,r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`fene/nm <bond_fene>` | k,r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`gromos <bond_gromos>` | k,r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`harmonic <bond_harmonic>` | k,r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`harmonic/shift <bond_harmonic_shift>` | k,r0,r1 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`harmonic/restrain <bond_harmonic_restrain>` | k | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`morse <bond_morse>` | r0 | type bonds |
+---------------------------------------------------+------------+------------+
| :doc:`nonlinear <bond_nonlinear>` | epsilon,r0 | type bonds |
+---------------------------------------------------+------------+------------+
----------
@ -357,9 +360,8 @@ all types from 1 to :math:`N`. A leading asterisk means all types from
:math:`N` (inclusive). A middle asterisk means all types from m to n
(inclusive).
Currently *angle* does not support angle_style hybrid nor angle_style
hybrid/overlay as angle styles. The angle styles that currently work
with fix_adapt are
If :doc:`angle_style hybrid <angle_hybrid>` is used, *astyle* should be a
sub-style name. The angle styles that currently work with fix adapt are:
+------------------------------------+----------+-------------+
| :doc:`harmonic <angle_harmonic>` | k,theta0 | type angles |

View File

@ -785,3 +785,7 @@ reset_mol_ids = yes, custom_charges = no, molecule = off, modify_create = *fit a
.. _Gissinger2020:
**(Gissinger2020)** Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).
.. _Gissinger2024:
**(Gissinger2024)** Gissinger, Jensen and Wise, Computer Physics Communications, 304, 109287 (2024).

View File

@ -247,7 +247,7 @@ defined by the :doc:`atom_style sph <atom_style>` command.
All particles in the group must be mesoscopic SPH/SDPD particles.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
This fix is incompatible with deformation controls that remap velocity,
for instance the *remap v* option of :doc:`fix deform <fix_deform>`.

View File

@ -97,7 +97,7 @@ These fixes are part of the DPD-MESO package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
This fix is incompatible with deformation controls that remap velocity,
for instance the *remap v* option of :doc:`fix deform <fix_deform>`.

View File

@ -44,7 +44,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Perform time integration for RHEO particles, updating positions, velocities,
and densities. For an overview of other features available in the RHEO package,

View File

@ -27,7 +27,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
This fix dynamically creates bonds on the surface of fluids to
represent physical processes such as oxidation. It is intended

View File

@ -33,7 +33,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
This fix defines a pressure equation of state for RHEO particles. One can
define different equations of state for different atom types. An equation

View File

@ -48,7 +48,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
This fix performs time integration of temperature for atom style rheo/thermal.
In addition, it defines multiple thermal properties of particles and handles

View File

@ -38,7 +38,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
This fix defines a viscosity for RHEO particles. One can define different
viscosities for different atom types, but a viscosity must be specified for

View File

@ -353,7 +353,7 @@ defined by the :doc:`atom_style sph <atom_style>` command.
All particles in the group must be mesoscopic SPH/SDPD particles.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
This fix is incompatible with deformation controls that remap velocity,
for instance the *remap v* option of :doc:`fix deform <fix_deform>`.

View File

@ -137,7 +137,7 @@ constrained (within a fudge factor of MASSDELTA specified in
both bonds in the angle are constrained then the angle will also be
constrained if its type is in the list.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
The types may be given as type labels *only* if there is no atom, bond,
or angle type label named *b*, *a*, *t*, or *m* defined in the

View File

@ -53,7 +53,7 @@ Restrictions
This fix is part of the MACHDYN package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
This fix is incompatible with deformation controls that remap velocity,
for instance the *remap v* option of :doc:`fix deform <fix_deform>`.

View File

@ -61,7 +61,7 @@ Restrictions
This fix is part of the MACHDYN package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
This fix is incompatible with deformation controls that remap velocity,
for instance the *remap v* option of :doc:`fix deform <fix_deform>`.

View File

@ -32,7 +32,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Download a file from an URL to the local disk. This is implemented with
the `libcurl library <https:://curl.se/libcurl/>`_ which supports a

View File

@ -51,7 +51,7 @@ index file. When specifying group IDs, only those groups will be
written to the index file. In order to follow the Gromacs conventions,
the group *all* will be renamed to *System* in the index file.
The *ndx2group* command will create of update group definitions from
The *ndx2group* command will create or update group definitions from
those stored in an index file. Without specifying any group IDs, all
groups except *System* will be read from the index file and the
corresponding groups recreated. If a group of the same name already

View File

@ -159,7 +159,7 @@ sample scenarios where this is useful:
* When one or more rigid bodies are specified, interactions within each
body can be turned off to save needless computation. See the :doc:`fix rigid <fix_rigid>` command for more details.
.. versionchanged:: TBD
.. versionchanged:: 29Aug2024
Support for type labels was added.

View File

@ -18,28 +18,27 @@ Syntax
.. code-block:: LAMMPS
pair_style style N inner_distance_cutoff outer_distance_cutoff angle_cutof
pair_style style N inner_distance_cutoff outer_distance_cutoff angle_cutoff
* style = *hbond/dreiding/lj* or *hbond/dreiding/morse*
* n = cosine angle periodicity
* N = power of cosine of angle theta (integer)
* inner_distance_cutoff = global inner cutoff for Donor-Acceptor interactions (distance units)
* outer_distance_cutoff = global cutoff for Donor-Acceptor interactions (distance units)
* angle_cutoff = global angle cutoff for Acceptor-Hydrogen-Donor
* interactions (degrees)
* angle_cutoff = global angle cutoff for Acceptor-Hydrogen-Donor interactions (degrees)
Examples
""""""""
.. code-block:: LAMMPS
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 9.0 11.0 90
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/lj 4 9.0 11.0 90.0
pair_coeff 1 2 hbond/dreiding/lj 3 i 9.5 2.75 4 9.0 11.0 90.0
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/morse 2 9.0 11.0 90
pair_coeff 1 2 hbond/dreiding/morse 3 i 3.88 1.7241379 2.9 2 9 11 90
pair_style hybrid/overlay lj/cut 10.0 hbond/dreiding/morse 2 9.0 11.0 90.0
pair_coeff 1 2 hbond/dreiding/morse 3 i 3.88 1.7241379 2.9 2 9.0 11.0 90.0
labelmap atom 1 C 2 O 3 H
pair_coeff C O hbond/dreiding/morse H i 3.88 1.7241379 2.9 2 9 11 90
pair_coeff C O hbond/dreiding/morse H i 3.88 1.7241379 2.9 2 9.0 11.0 90.0
Description
"""""""""""
@ -65,7 +64,8 @@ force field, given by:
where :math:`r_{\rm in}` is the inner spline distance cutoff,
:math:`r_{\rm out}` is the outer distance cutoff, :math:`\theta_c` is
the angle cutoff, and *n* is the cosine periodicity.
the angle cutoff, and :math:`n` is the power of the cosine of the angle
:math:`\theta`.
Here, *r* is the radial distance between the donor (D) and acceptor
(A) atoms and :math:`\theta` is the bond angle between the acceptor, the
@ -217,7 +217,8 @@ These pair styles do not support the :doc:`pair_modify <pair_modify>`
tail option for adding long-range tail corrections to energy and
pressure.
These pair styles do not write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands need to be
These pair styles do not write their information to :doc:`binary restart
files <restart>`, so pair_style and pair_coeff commands need to be
re-specified in an input script that reads a restart file.
These pair styles can only be used via the *pair* keyword of the

View File

@ -31,7 +31,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Pair style *rheo* computes pressure and viscous forces between particles
in the :doc:`rheo package <Howto_rheo>`. If thermal evolution is turned

View File

@ -21,7 +21,7 @@ Examples
Description
"""""""""""
.. versionadded:: TBD
.. versionadded:: 29Aug2024
Style *rheo/solid* is effectively a copy of pair style
:doc:`bpm/spring <pair_bpm_spring>` except it only applies forces

View File

@ -18,13 +18,13 @@ Syntax
*delete* = no args
*block* args = xlo xhi ylo yhi zlo zhi
xlo,xhi,ylo,yhi,zlo,zhi = bounds of block in all dimensions (distance units)
xlo,xhi,ylo,yhi,zlo,zhi can be a variable
xlo,xhi,ylo,yhi,zlo,zhi can be a variable (see below)
*cone* args = dim c1 c2 radlo radhi lo hi
dim = *x* or *y* or *z* = axis of cone
c1,c2 = coords of cone axis in other 2 dimensions (distance units)
radlo,radhi = cone radii at lo and hi end (distance units)
lo,hi = bounds of cone in dim (distance units)
c1,c2,radlo,radhi,lo,hi can be a variable (see below)
c1,c2,radlo,radhi,lo,hi can be a variable (see below)
*cylinder* args = dim c1 c2 radius lo hi
dim = *x* or *y* or *z* = axis of cylinder
c1,c2 = coords of cylinder axis in other 2 dimensions (distance units)
@ -38,6 +38,7 @@ Syntax
*plane* args = px py pz nx ny nz
px,py,pz = point on the plane (distance units)
nx,ny,nz = direction normal to plane (distance units)
px,py,pz can be a variable (see below)
*prism* args = xlo xhi ylo yhi zlo zhi xy xz yz
xlo,xhi,ylo,yhi,zlo,zhi = bounds of untilted prism (distance units)
xy = distance to tilt y in x direction (distance units)
@ -166,7 +167,7 @@ extending in the y-direction from -5.0 to the upper box boundary.
.. versionadded:: 4May2022
For style *ellipsoid*, an axis-aligned ellipsoid is defined. The
For style *ellipsoid*, an axis-aligned ellipsoid is defined. The
ellipsoid has its center at (x,y,z) and is defined by 3 axis-aligned
vectors given by A = (a,0,0); B = (0,b,0); C = (0,0,c). Note that
although the ellipsoid is specified as axis-aligned it can be rotated
@ -206,9 +207,10 @@ parameters a,b,c for style *ellipsoid*, can each be specified as an
equal-style :doc:`variable <variable>`. Likewise, for style *sphere*
and *ellipsoid* the x-, y-, and z- coordinates of the center of the
sphere/ellipsoid can be specified as an equal-style variable. And for
style *cylinder* the two center positions c1 and c2 for the location
of the cylinder axes can be specified as a equal-style variable. For style *cone*
all properties can be defined via equal-style variables.
style *cylinder* the two center positions c1 and c2 for the location of
the cylinder axes can be specified as a equal-style variable. For style
*cone* all properties can be defined via equal-style variables. For
style *plane* the point can be defined via equal-style variables.
If the value is a variable, it should be specified as v_name, where
name is the variable name. In this case, the variable will be

View File

@ -1042,7 +1042,7 @@ label2type(), but returns 1 if the type label has been assigned,
otherwise it returns 0. This function can be used to check if a
particular type label already exists in the simulation.
.. versionadded:: TBD
.. versionadded:: 29Aug2024
The is_timeout() function returns 1 when the :doc:`timer timeout
<timer>` has expired otherwise it returns 0. This function can be used

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 KiB

View File

@ -416,7 +416,7 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = "_static/lammps-logo-large.jpg"
latex_logo = "_static/lammps-logo-large.png"
latex_toplevel_sectioning = 'part'

View File

@ -141,6 +141,7 @@ arg
arge
args
argv
Armv
arrhenius
Arun
arXiv
@ -215,7 +216,6 @@ ba
Babadi
Babaei
backcolor
backends
Baczewski
Bagchi
Bagi
@ -407,6 +407,7 @@ Bybee
bz
Cadarache
cadetblue
Caen
Cagin
calc
calibrationfunctions
@ -1538,6 +1539,7 @@ idx
ie
ielement
ieni
ifdef
ifdefs
iff
ifort
@ -1705,6 +1707,7 @@ jec
Jeffers
jewett
Jewett
jgissing
ji
Jiang
Jiao
@ -2723,6 +2726,7 @@ OMP
oneAPI
onebody
onelevel
oneMKL
oneway
onlysalt
ons
@ -3550,6 +3554,7 @@ Steinhauser
Stepaniants
stepwise
Stesmans
stevens
stiffnesses
Stillinger
stk
@ -4127,6 +4132,7 @@ Xiaowang
Xie
xk
xlat
xlattice
xlo
xmax
Xmax
@ -4178,6 +4184,7 @@ yflag
yhi
yi
ylat
ylattice
ylo
ylz
ymax
@ -4226,6 +4233,7 @@ Ziegenhain
zincblende
zj
Zj
zlattice
zlim
zlo
Zm

View File

@ -41,7 +41,6 @@
#include <stdlib.h>
liblammpsplugin_t *liblammpsplugin_load(const char *lib)
{
liblammpsplugin_t *lmp;
@ -106,6 +105,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
ADDSYM(map_atom);
ADDSYM(extract_atom_datatype);
ADDSYM(extract_atom_size);
ADDSYM(extract_atom);
ADDSYM(extract_compute);
@ -191,6 +191,9 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
ADDSYM(is_running);
ADDSYM(force_timeout);
// symbol not present
if (!lmp->config_has_exceptions) return NULL;
lmp->has_exceptions = lmp->config_has_exceptions();
if (lmp->has_exceptions) {
ADDSYM(has_error);

View File

@ -151,6 +151,7 @@ struct _liblammpsplugin {
int (*map_atom)(void *, const void *);
int (*extract_atom_datatype)(void *, const char *);
int (*extract_atom_size)(void *, const char *, int);
void *(*extract_atom)(void *, const char *);
void *(*extract_compute)(void *, const char *, int, int);

View File

@ -5,7 +5,7 @@
cmake_minimum_required(VERSION 3.16)
project(paceplugin VERSION 1.0 LANGUAGES CXX)
project(paceplugin VERSION 1.1 LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(CheckIncludeFileCXX)
@ -15,7 +15,11 @@ include(ML-PACE)
##########################
# building the plugins
add_library(paceplugin MODULE paceplugin.cpp ${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp)
add_library(paceplugin MODULE paceplugin.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/pair_pace_extrapolation.cpp
${LAMMPS_SOURCE_DIR}/ML-PACE/compute_pace.cpp)
target_link_libraries(paceplugin PRIVATE pace)
target_link_libraries(paceplugin PRIVATE lammps)
target_include_directories(paceplugin PRIVATE ${LAMMPS_SOURCE_DIR}/ML-PACE)

View File

@ -3,6 +3,8 @@
#include "version.h"
#include "pair_pace.h"
#include "pair_pace_extrapolation.h"
#include "compute_pace.h"
using namespace LAMMPS_NS;
@ -11,6 +13,16 @@ static Pair *pair_pace_creator(LAMMPS *lmp)
return new PairPACE(lmp);
}
static Pair *pair_pace_extrapolation_creator(LAMMPS *lmp)
{
return new PairPACEExtrapolation(lmp);
}
static Compute *compute_pace_creator(LAMMPS *lmp, int argc, char **argv)
{
return new ComputePACE(lmp, argc, argv);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_t plugin;
@ -25,4 +37,24 @@ extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
// register pace/extrapolation pair style
plugin.version = LAMMPS_VERSION;
plugin.style = "pair";
plugin.name = "pace/extrapolation";
plugin.info = "PACE plugin extrapolation pair style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_pace_extrapolation_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
// register pace compute style
plugin.version = LAMMPS_VERSION;
plugin.style = "compute";
plugin.name = "pace";
plugin.info = "PACE plugin compute style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v2 = (lammpsplugin_factory2 *) &compute_pace_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
}

View File

@ -39,7 +39,7 @@ InstallDir "$LOCALAPPDATA\${PACEPLUGIN}"
ShowInstDetails show
ShowUninstDetails show
SetCompressor lzma
SetCompressor zlib
!define MUI_ABORTWARNING

View File

@ -0,0 +1,59 @@
# -*- CMake -*- build system for plugin examples.
# The is meant to be used as a template for plugins that are
# distributed independent from the LAMMPS package.
##########################################
cmake_minimum_required(VERSION 3.16)
project(plumedplugin VERSION 1.0 LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(CheckIncludeFileCXX)
include(LAMMPSInterfacePlugin)
include(PLUMED)
##########################
# building the plugins
add_library(plumedplugin MODULE plumedplugin.cpp ${LAMMPS_SOURCE_DIR}/PLUMED/fix_plumed.cpp)
target_link_libraries(plumedplugin PRIVATE LAMMPS::PLUMED)
target_link_libraries(plumedplugin PRIVATE lammps)
target_include_directories(plumedplugin PRIVATE ${LAMMPS_SOURCE_DIR}/PLUMED)
set_target_properties(plumedplugin PROPERTIES PREFIX "" SUFFIX ".so")
# MacOS seems to need this
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# tell CMake to export all symbols to a .dll on Windows with special case for MinGW cross-compilers
set_target_properties(plumedplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
if(CMAKE_CROSSCOMPILING)
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
endif()
get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION)
find_program(MAKENSIS_PATH makensis)
if(MAKENSIS_PATH)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/lammps.ico
${CMAKE_SOURCE_DIR}/lammps-text-logo-wide.bmp ${CMAKE_SOURCE_DIR}/plumedplugin.nsis
${CMAKE_BINARY_DIR})
if(BUILD_MPI)
if(USE_MSMPI)
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI plumedplugin.nsis
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}-MSMPI.exe)
else()
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI plumedplugin.nsis
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}-MPI.exe)
endif()
else()
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} plumedplugin.nsis
COMMAND ${CMAKE_COMMAND} -E echo ${PWD}
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}.exe)
endif()
endif()
else()
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-rdynamic")
endif()

View File

@ -0,0 +1 @@
../../../../cmake/Modules/LAMMPSInterfacePlugin.cmake

View File

@ -0,0 +1 @@
../../../../cmake/Modules/Packages/PLUMED.cmake

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