Merge branch 'develop' into atom-style-var-with-python
This commit is contained in:
8
.github/release_steps.md
vendored
8
.github/release_steps.md
vendored
@ -104,8 +104,8 @@ with a future release) from the `lammps-static` folder.
|
|||||||
rm -rf release-packages
|
rm -rf release-packages
|
||||||
mkdir release-packages
|
mkdir release-packages
|
||||||
cd release-packages
|
cd release-packages
|
||||||
wget https://download.lammps.org/static/fedora41_musl.sif
|
wget https://download.lammps.org/static/fedora41_musl_mingw.sif
|
||||||
apptainer shell fedora41_musl.sif
|
apptainer shell fedora41_musl_mingw.sif
|
||||||
git clone -b release --depth 10 https://github.com/lammps/lammps.git lammps-release
|
git clone -b release --depth 10 https://github.com/lammps/lammps.git lammps-release
|
||||||
cmake -S lammps-release/cmake -B build-release -G Ninja -D CMAKE_INSTALL_PREFIX=$PWD/lammps-static -D CMAKE_TOOLCHAIN_FILE=/usr/musl/share/cmake/linux-musl.cmake -C lammps-release/cmake/presets/most.cmake -C lammps-release/cmake/presets/kokkos-openmp.cmake -D DOWNLOAD_POTENTIALS=OFF -D BUILD_MPI=OFF -D BUILD_TESTING=OFF -D CMAKE_BUILD_TYPE=Release -D PKG_ATC=ON -D PKG_AWPMD=ON -D PKG_MANIFOLD=ON -D PKG_MESONT=ON -D PKG_MGPT=ON -D PKG_ML-PACE=ON -D PKG_ML-RANN=ON -D PKG_MOLFILE=ON -D PKG_PTM=ON -D PKG_QTB=ON -D PKG_SMTBQ=ON
|
cmake -S lammps-release/cmake -B build-release -G Ninja -D CMAKE_INSTALL_PREFIX=$PWD/lammps-static -D CMAKE_TOOLCHAIN_FILE=/usr/musl/share/cmake/linux-musl.cmake -C lammps-release/cmake/presets/most.cmake -C lammps-release/cmake/presets/kokkos-openmp.cmake -D DOWNLOAD_POTENTIALS=OFF -D BUILD_MPI=OFF -D BUILD_TESTING=OFF -D CMAKE_BUILD_TYPE=Release -D PKG_ATC=ON -D PKG_AWPMD=ON -D PKG_MANIFOLD=ON -D PKG_MESONT=ON -D PKG_MGPT=ON -D PKG_ML-PACE=ON -D PKG_ML-RANN=ON -D PKG_MOLFILE=ON -D PKG_PTM=ON -D PKG_QTB=ON -D PKG_SMTBQ=ON
|
||||||
cmake --build build-release --target all
|
cmake --build build-release --target all
|
||||||
@ -204,7 +204,7 @@ cd ..
|
|||||||
rm -r release-packages
|
rm -r release-packages
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Build Multi-arch App-bundle for macOS
|
#### Build Multi-arch App-bundle with GUI for macOS
|
||||||
|
|
||||||
Building app-bundles for macOS is not as easily automated and portable
|
Building app-bundles for macOS is not as easily automated and portable
|
||||||
as some of the other steps. It requires a machine actually running
|
as some of the other steps. It requires a machine actually running
|
||||||
@ -251,7 +251,7 @@ attached to the GitHub release page.
|
|||||||
|
|
||||||
We are currently building the application images on macOS 12 (aka Monterey).
|
We are currently building the application images on macOS 12 (aka Monterey).
|
||||||
|
|
||||||
#### Build Linux x86_64 binary tarball on Ubuntu 20.04LTS
|
#### Build Linux x86_64 binary tarball with GUI on Ubuntu 20.04LTS
|
||||||
|
|
||||||
While the flatpak Linux version uses portable runtime libraries provided
|
While the flatpak Linux version uses portable runtime libraries provided
|
||||||
by the flatpak environment, we also build regular Linux executables that
|
by the flatpak environment, we also build regular Linux executables that
|
||||||
|
|||||||
19
.github/workflows/check-cpp23.yml
vendored
19
.github/workflows/check-cpp23.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
# GitHub action to build LAMMPS on Linux with gcc and C++23
|
# GitHub action to build LAMMPS on Linux with gcc or clang and C++23
|
||||||
name: "Check for C++23 Compatibility"
|
name: "Check for C++23 Compatibility"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -11,11 +11,19 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{github.event_name == 'pull_request'}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build with C++23 support enabled
|
name: Build with C++23 support enabled
|
||||||
if: ${{ github.repository == 'lammps/lammps' }}
|
if: ${{ github.repository == 'lammps/lammps' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
max-parallel: 2
|
||||||
|
matrix:
|
||||||
|
idx: [ gcc, clang ]
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
|
||||||
@ -29,8 +37,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y ccache \
|
sudo apt-get install -y ccache \
|
||||||
libeigen3-dev \
|
clang \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
|
libeigen3-dev \
|
||||||
|
libfftw3-dev \
|
||||||
|
libomp-dev \
|
||||||
mold \
|
mold \
|
||||||
mpi-default-bin \
|
mpi-default-bin \
|
||||||
mpi-default-dev \
|
mpi-default-dev \
|
||||||
@ -58,14 +69,14 @@ jobs:
|
|||||||
cmake -S cmake -B build \
|
cmake -S cmake -B build \
|
||||||
-C cmake/presets/most.cmake \
|
-C cmake/presets/most.cmake \
|
||||||
-C cmake/presets/kokkos-openmp.cmake \
|
-C cmake/presets/kokkos-openmp.cmake \
|
||||||
|
-C cmake/presets/${{ matrix.idx }}.cmake \
|
||||||
-D CMAKE_CXX_STANDARD=23 \
|
-D CMAKE_CXX_STANDARD=23 \
|
||||||
-D CMAKE_CXX_COMPILER=g++ \
|
|
||||||
-D CMAKE_C_COMPILER=gcc \
|
|
||||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
-D CMAKE_BUILD_TYPE=Debug \
|
-D CMAKE_BUILD_TYPE=Debug \
|
||||||
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g" \
|
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g" \
|
||||||
-D DOWNLOAD_POTENTIALS=off \
|
-D DOWNLOAD_POTENTIALS=off \
|
||||||
|
-D FFT=KISS \
|
||||||
-D BUILD_MPI=on \
|
-D BUILD_MPI=on \
|
||||||
-D BUILD_SHARED_LIBS=on \
|
-D BUILD_SHARED_LIBS=on \
|
||||||
-D BUILD_TOOLS=off \
|
-D BUILD_TOOLS=off \
|
||||||
|
|||||||
@ -7,6 +7,10 @@ if(CMAKE_VERSION VERSION_LESS 3.20)
|
|||||||
message(WARNING "LAMMPS is planning to require at least CMake version 3.20 by Summer 2025. Please upgrade!")
|
message(WARNING "LAMMPS is planning to require at least CMake version 3.20 by Summer 2025. Please upgrade!")
|
||||||
endif()
|
endif()
|
||||||
########################################
|
########################################
|
||||||
|
# initialize version variables with project command
|
||||||
|
if(POLICY CMP0048)
|
||||||
|
cmake_policy(SET CMP0048 NEW)
|
||||||
|
endif()
|
||||||
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
||||||
if(POLICY CMP0074)
|
if(POLICY CMP0074)
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
@ -27,7 +31,10 @@ endif()
|
|||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
project(lammps CXX)
|
project(lammps
|
||||||
|
DESCRIPTION "The LAMMPS Molecular Dynamics Simulator"
|
||||||
|
HOMEPAGE_URL "https://www.lammps.org"
|
||||||
|
LANGUAGES CXX C)
|
||||||
set(SOVERSION 0)
|
set(SOVERSION 0)
|
||||||
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
@ -196,6 +203,10 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
|
|||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# do not include the (obsolete) MPI C++ bindings which makes for leaner object files
|
||||||
|
# and avoids namespace conflicts. Put this early to increase its visbility.
|
||||||
|
set(MPI_CXX_SKIP_MPICXX TRUE CACHE BOOL "Skip MPI C++ Bindings" FORCE)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# User input options #
|
# User input options #
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -379,7 +390,6 @@ if(PKG_ADIOS)
|
|||||||
# The search for ADIOS2 must come before MPI because
|
# The search for ADIOS2 must come before MPI because
|
||||||
# it includes its own MPI search with the latest FindMPI.cmake
|
# it includes its own MPI search with the latest FindMPI.cmake
|
||||||
# script that defines the MPI::MPI_C target
|
# script that defines the MPI::MPI_C target
|
||||||
enable_language(C)
|
|
||||||
find_package(ADIOS2 REQUIRED)
|
find_package(ADIOS2 REQUIRED)
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
if(NOT ADIOS2_HAVE_MPI)
|
if(NOT ADIOS2_HAVE_MPI)
|
||||||
@ -394,21 +404,18 @@ if(PKG_ADIOS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
find_package(MPI QUIET)
|
find_package(MPI QUIET COMPONENTS CXX)
|
||||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||||
else()
|
else()
|
||||||
option(BUILD_MPI "Build MPI version" OFF)
|
option(BUILD_MPI "Build MPI version" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
# do not include the (obsolete) MPI C++ bindings which makes
|
|
||||||
# for leaner object files and avoids namespace conflicts
|
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
|
||||||
# We use a non-standard procedure to cross-compile with MPI on Windows
|
# We use a non-standard procedure to cross-compile with MPI on Windows
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||||
include(MPI4WIN)
|
include(MPI4WIN)
|
||||||
else()
|
else()
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED COMPONENTS CXX)
|
||||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||||
if(LAMMPS_LONGLONG_TO_LONG)
|
if(LAMMPS_LONGLONG_TO_LONG)
|
||||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_LONGLONG_TO_LONG)
|
target_compile_definitions(lammps PRIVATE -DLAMMPS_LONGLONG_TO_LONG)
|
||||||
@ -535,7 +542,6 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_STANDARD GREATER_EQUA
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR PKG_RHEO OR BUILD_TOOLS)
|
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR PKG_RHEO OR BUILD_TOOLS)
|
||||||
enable_language(C)
|
|
||||||
if (NOT USE_INTERNAL_LINALG)
|
if (NOT USE_INTERNAL_LINALG)
|
||||||
find_package(LAPACK)
|
find_package(LAPACK)
|
||||||
find_package(BLAS)
|
find_package(BLAS)
|
||||||
|
|||||||
@ -62,6 +62,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
|
# skip over obsolete MPI-2 C++ bindings
|
||||||
|
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# helper functions from LAMMPSUtils.cmake
|
# helper functions from LAMMPSUtils.cmake
|
||||||
function(validate_option name values)
|
function(validate_option name values)
|
||||||
@ -128,8 +131,7 @@ endif()
|
|||||||
################################################################################
|
################################################################################
|
||||||
# MPI configuration
|
# MPI configuration
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
find_package(MPI QUIET COMPONENTS CXX)
|
||||||
find_package(MPI QUIET)
|
|
||||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||||
else()
|
else()
|
||||||
option(BUILD_MPI "Build MPI version" OFF)
|
option(BUILD_MPI "Build MPI version" OFF)
|
||||||
@ -141,9 +143,6 @@ if(BUILD_MPI)
|
|||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||||
# We use a non-standard procedure to cross-compile with MPI on Windows
|
# We use a non-standard procedure to cross-compile with MPI on Windows
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||||
# Download and configure MinGW compatible MPICH development files for Windows
|
|
||||||
option(USE_MSMPI "Use Microsoft's MS-MPI SDK instead of MPICH2-1.4.1" OFF)
|
|
||||||
if(USE_MSMPI)
|
|
||||||
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
||||||
@ -167,52 +166,15 @@ if(BUILD_MPI)
|
|||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
set_target_properties(MPI::MPI_CXX PROPERTIES
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
# set variables for status reporting at the end of CMake run
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
||||||
else()
|
else()
|
||||||
# Download and configure custom MPICH files for Windows
|
find_package(MPI REQUIRED COMPONENTS CXX)
|
||||||
message(STATUS "Downloading and configuring MPICH-1.4.1 for Windows")
|
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" CACHE STRING "URL for MPICH2 (win64) tarball")
|
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "4939fdb59d13182fd5dd65211e469f14" CACHE STRING "MD5 checksum of MPICH2 (win64) tarball")
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
|
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN64_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
else()
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN32_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN32_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
|
||||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
|
||||||
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmpi.a"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
find_package(MPI REQUIRED)
|
|
||||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||||
if(LAMMPS_LONGLONG_TO_LONG)
|
if(LAMMPS_LONGLONG_TO_LONG)
|
||||||
target_compile_definitions(lammps INTERFACE -DLAMMPS_LONGLONG_TO_LONG)
|
target_compile_definitions(lammps INTERFACE -DLAMMPS_LONGLONG_TO_LONG)
|
||||||
|
|||||||
@ -75,13 +75,25 @@ function(get_lammps_version version_header variable)
|
|||||||
list(FIND MONTHS "${month}" month)
|
list(FIND MONTHS "${month}" month)
|
||||||
string(LENGTH ${day} day_length)
|
string(LENGTH ${day} day_length)
|
||||||
string(LENGTH ${month} month_length)
|
string(LENGTH ${month} month_length)
|
||||||
if(day_length EQUAL 1)
|
# no leading zero needed for new version string with dots
|
||||||
set(day "0${day}")
|
# if(day_length EQUAL 1)
|
||||||
|
# set(day "0${day}")
|
||||||
|
# endif()
|
||||||
|
# if(month_length EQUAL 1)
|
||||||
|
# set(month "0${month}")
|
||||||
|
#endif()
|
||||||
|
file(STRINGS ${version_header} line REGEX LAMMPS_UPDATE)
|
||||||
|
string(REGEX REPLACE "#define LAMMPS_UPDATE \"Update ([0-9]+)\"" "\\1" tweak "${line}")
|
||||||
|
if (line MATCHES "#define LAMMPS_UPDATE \"(Maintenance|Development)\"")
|
||||||
|
set(tweak "99")
|
||||||
endif()
|
endif()
|
||||||
if(month_length EQUAL 1)
|
if(NOT tweak)
|
||||||
set(month "0${month}")
|
set(tweak "0")
|
||||||
endif()
|
endif()
|
||||||
set(${variable} "${year}${month}${day}" PARENT_SCOPE)
|
# new version string with dots
|
||||||
|
set(${variable} "${year}.${month}.${day}.${tweak}" PARENT_SCOPE)
|
||||||
|
# old version string without dots
|
||||||
|
# set(${variable} "${year}${month}${day}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(check_for_autogen_files source_dir)
|
function(check_for_autogen_files source_dir)
|
||||||
|
|||||||
@ -1,74 +1,31 @@
|
|||||||
# Download and configure MinGW compatible MPICH development files for Windows
|
# set-up MS-MPI library for Windows with MinGW compatibility
|
||||||
option(USE_MSMPI "Use Microsoft's MS-MPI SDK instead of MPICH2-1.4.1" OFF)
|
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
||||||
|
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
||||||
|
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
||||||
|
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
|
||||||
|
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
|
||||||
|
|
||||||
if(USE_MSMPI)
|
include(ExternalProject)
|
||||||
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
|
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
ExternalProject_Add(mpi4win_build
|
ExternalProject_Add(mpi4win_build
|
||||||
URL ${MPICH2_WIN64_DEVEL_URL}
|
URL ${MPICH2_WIN64_DEVEL_URL}
|
||||||
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
|
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmsmpi.a)
|
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmsmpi.a)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Only x86 64-bit builds are supported with MS-MPI")
|
message(FATAL_ERROR "Only x86 64-bit builds are supported with MS-MPI")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
||||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
||||||
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
|
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
|
||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
set_target_properties(MPI::MPI_CXX PROPERTIES
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
# set variables for status reporting at the end of CMake run
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
||||||
else()
|
|
||||||
message(STATUS "Downloading and configuring MPICH2-1.4.1 for Windows cross-compilation")
|
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" CACHE STRING "URL for MPICH2 (win64) tarball")
|
|
||||||
set(MPICH2_WIN32_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win32-devel.tar.gz" CACHE STRING "URL for MPICH2 (win32) tarball")
|
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "4939fdb59d13182fd5dd65211e469f14" CACHE STRING "MD5 checksum of MPICH2 (win64) tarball")
|
|
||||||
set(MPICH2_WIN32_DEVEL_MD5 "a61d153500dce44e21b755ee7257e031" CACHE STRING "MD5 checksum of MPICH2 (win32) tarball")
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
|
|
||||||
mark_as_advanced(MPICH2_WIN32_DEVEL_URL)
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
|
|
||||||
mark_as_advanced(MPICH2_WIN32_DEVEL_MD5)
|
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN64_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
else()
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN32_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN32_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
|
||||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
|
||||||
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmpi.a"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")
|
|
||||||
endif()
|
|
||||||
|
|||||||
@ -27,7 +27,6 @@ if(BUILD_OMP)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
target_compile_definitions(colvars PUBLIC -DCOLVARS_MPI)
|
|
||||||
target_link_libraries(colvars PUBLIC MPI::MPI_CXX)
|
target_link_libraries(colvars PUBLIC MPI::MPI_CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
||||||
target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR)
|
target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR -DLAMMPS_${LAMMPS_SIZES})
|
||||||
target_link_libraries(nvc_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
target_link_libraries(nvc_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||||
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
|
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ else()
|
|||||||
target_link_libraries(gpu PRIVATE mpi_stubs)
|
target_link_libraries(gpu PRIVATE mpi_stubs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(gpu PRIVATE -DLAMMPS_${LAMMPS_SIZES})
|
|
||||||
set_target_properties(gpu PROPERTIES OUTPUT_NAME lammps_gpu${LAMMPS_MACHINE})
|
set_target_properties(gpu PROPERTIES OUTPUT_NAME lammps_gpu${LAMMPS_MACHINE})
|
||||||
|
target_compile_definitions(gpu PRIVATE -DLAMMPS_${LAMMPS_SIZES})
|
||||||
target_sources(lammps PRIVATE ${GPU_SOURCES})
|
target_sources(lammps PRIVATE ${GPU_SOURCES})
|
||||||
target_include_directories(lammps PRIVATE ${GPU_SOURCES_DIR})
|
target_include_directories(lammps PRIVATE ${GPU_SOURCES_DIR})
|
||||||
|
|||||||
@ -21,11 +21,11 @@ if(ENABLE_TESTING)
|
|||||||
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
|
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if((CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
|
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04))
|
||||||
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
|
|
||||||
OR ((CMAKE_LINUX_DISTRO STREQUAL "Fedora") AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
OR ((CMAKE_LINUX_DISTRO STREQUAL "Fedora") AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
|
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
|
||||||
|
check_cxx_compiler_flag(--ld-path=${CMAKE_LINKER} HAVE_LD_PATH_FLAG)
|
||||||
check_cxx_compiler_flag(-fuse-ld=mold HAVE_MOLD_LINKER_FLAG)
|
check_cxx_compiler_flag(-fuse-ld=mold HAVE_MOLD_LINKER_FLAG)
|
||||||
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
|
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
|
||||||
check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
|
check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
|
||||||
@ -50,6 +50,17 @@ if(ENABLE_TESTING)
|
|||||||
if(NOT "${CMAKE_CUSTOM_LINKER}" STREQUAL "default")
|
if(NOT "${CMAKE_CUSTOM_LINKER}" STREQUAL "default")
|
||||||
target_link_options(lammps PUBLIC -fuse-ld=${CMAKE_CUSTOM_LINKER})
|
target_link_options(lammps PUBLIC -fuse-ld=${CMAKE_CUSTOM_LINKER})
|
||||||
endif()
|
endif()
|
||||||
|
if(HAVE_LD_PATH_FLAG)
|
||||||
|
if("${CMAKE_CUSTOM_LINKER}" STREQUAL "mold")
|
||||||
|
target_link_options(lammps PUBLIC --ld-path=${HAVE_MOLD_LINKER_BIN})
|
||||||
|
elseif("${CMAKE_CUSTOM_LINKER}" STREQUAL "lld")
|
||||||
|
target_link_options(lammps PUBLIC --ld-path=${HAVE_LLD_LINKER_BIN})
|
||||||
|
elseif("${CMAKE_CUSTOM_LINKER}" STREQUAL "gold")
|
||||||
|
target_link_options(lammps PUBLIC --ld-path=${HAVE_GOLD_LINKER_BIN})
|
||||||
|
elseif("${CMAKE_CUSTOM_LINKER}" STREQUAL "bfd")
|
||||||
|
target_link_options(lammps PUBLIC --ld-path=${HAVE_BFD_LINKER_BIN})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -19,12 +19,19 @@ set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
|||||||
|
|
||||||
set(MPI_CXX "hipcc" CACHE STRING "" FORCE)
|
set(MPI_CXX "hipcc" CACHE STRING "" FORCE)
|
||||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||||
|
set(MPI_C "hipcc" CACHE STRING "" FORCE)
|
||||||
|
set(MPI_C_COMPILER "mpicc" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
# change as needed. This is for Fedora Linux 41 and 42
|
||||||
|
set(_libomp_root "/usr/lib/clang/18")
|
||||||
|
# we need to explicitly specify the include dir, since hipcc will
|
||||||
|
# compile each file twice and doesn't find omp.h the second time
|
||||||
|
|
||||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||||
set(OpenMP_C "hipcc" CACHE STRING "" FORCE)
|
set(OpenMP_C "hipcc" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
set(OpenMP_C_FLAGS "-fopenmp=libomp -I${_libomp_root}/include" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_CXX "hipcc" CACHE STRING "" FORCE)
|
set(OpenMP_CXX "hipcc" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
set(OpenMP_CXX_FLAGS "-fopenmp=libomp -I${_libomp_root}/include" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||||
set(OpenMP_omp_LIBRARY "libomp.so" CACHE PATH "" FORCE)
|
set(OpenMP_omp_LIBRARY "libomp.so" CACHE PATH "" FORCE)
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# preset that enables KOKKOS and selects HIP compilation with OpenMP
|
# preset that enables KOKKOS and selects HIP compilation withOUT OpenMP.
|
||||||
# enabled as well. Also sets some performance related compiler flags.
|
# Kokkos OpenMP is not compatible with the second pass of hipcc.
|
||||||
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
|
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
|
||||||
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
||||||
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
|
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "" FORCE)
|
||||||
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
|
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
|
||||||
set(Kokkos_ENABLE_HIP ON CACHE BOOL "" FORCE)
|
set(Kokkos_ENABLE_HIP ON CACHE BOOL "" FORCE)
|
||||||
set(Kokkos_ARCH_VEGA90A on CACHE BOOL "" FORCE)
|
set(Kokkos_ARCH_VEGA90A on CACHE BOOL "" FORCE)
|
||||||
@ -11,11 +11,11 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
|||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -munsafe-fp-atomics" CACHE STRING "" FORCE)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -munsafe-fp-atomics" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
# If KSPACE is also enabled, use CUFFT for FFTs
|
# If KSPACE is also enabled, use HIPFFT for FFTs
|
||||||
set(FFT_KOKKOS "HIPFFT" CACHE STRING "" FORCE)
|
set(FFT_KOKKOS "HIPFFT" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
# hide deprecation warnings temporarily for stable release
|
# hide deprecation warnings temporarily for stable release
|
||||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
#set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# these flags are needed to build with Cray MPICH on OLCF Crusher
|
# these flags are needed to build with Cray MPICH on OLCF Crusher
|
||||||
#-D CMAKE_CXX_FLAGS="-I/${MPICH_DIR}/include"
|
#-D CMAKE_CXX_FLAGS="-I/${MPICH_DIR}/include"
|
||||||
|
|||||||
@ -29,6 +29,7 @@ OPT.
|
|||||||
* :doc:`ave/grid <fix_ave_grid>`
|
* :doc:`ave/grid <fix_ave_grid>`
|
||||||
* :doc:`ave/histo <fix_ave_histo>`
|
* :doc:`ave/histo <fix_ave_histo>`
|
||||||
* :doc:`ave/histo/weight <fix_ave_histo>`
|
* :doc:`ave/histo/weight <fix_ave_histo>`
|
||||||
|
* :doc:`ave/moments <fix_ave_moments>`
|
||||||
* :doc:`ave/time <fix_ave_time>`
|
* :doc:`ave/time <fix_ave_time>`
|
||||||
* :doc:`aveforce <fix_aveforce>`
|
* :doc:`aveforce <fix_aveforce>`
|
||||||
* :doc:`balance <fix_balance>`
|
* :doc:`balance <fix_balance>`
|
||||||
@ -218,6 +219,7 @@ OPT.
|
|||||||
* :doc:`rigid/small (o) <fix_rigid>`
|
* :doc:`rigid/small (o) <fix_rigid>`
|
||||||
* :doc:`rx (k) <fix_rx>`
|
* :doc:`rx (k) <fix_rx>`
|
||||||
* :doc:`saed/vtk <fix_saed_vtk>`
|
* :doc:`saed/vtk <fix_saed_vtk>`
|
||||||
|
* :doc:`set <fix_set>`
|
||||||
* :doc:`setforce (k) <fix_setforce>`
|
* :doc:`setforce (k) <fix_setforce>`
|
||||||
* :doc:`setforce/spin <fix_setforce>`
|
* :doc:`setforce/spin <fix_setforce>`
|
||||||
* :doc:`sgcmc <fix_sgcmc>`
|
* :doc:`sgcmc <fix_sgcmc>`
|
||||||
|
|||||||
@ -29,6 +29,7 @@ Available topics in mostly chronological order are:
|
|||||||
- `Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments`_
|
- `Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments`_
|
||||||
- `Use Output::get_dump_by_id() instead of Output::find_dump()`_
|
- `Use Output::get_dump_by_id() instead of Output::find_dump()`_
|
||||||
- `Refactored grid communication using Grid3d/Grid2d classes instead of GridComm`_
|
- `Refactored grid communication using Grid3d/Grid2d classes instead of GridComm`_
|
||||||
|
- `FLERR as first argument to minimum image functions in Domain class`_
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -610,3 +611,47 @@ KSpace solvers which use distributed FFT grids:
|
|||||||
- ``src/KSPACE/pppm.cpp``
|
- ``src/KSPACE/pppm.cpp``
|
||||||
|
|
||||||
This change is **required** or else the code will not compile.
|
This change is **required** or else the code will not compile.
|
||||||
|
|
||||||
|
FLERR as first argument to minimum image functions in Domain class
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: TBD
|
||||||
|
|
||||||
|
The ``Domain::minimum_image()`` and ``Domain::minimum_image_big()``
|
||||||
|
functions were changed to take the ``FLERR`` macros as first argument.
|
||||||
|
This way the error message indicates *where* the function was called
|
||||||
|
instead of pointing to the implementation of the function. Example:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: c++
|
||||||
|
|
||||||
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
|
domain->minimum_image(delx1, dely1, delz1);
|
||||||
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
|
domain->minimum_image_big(delx2, dely2, delz2);
|
||||||
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: c++
|
||||||
|
|
||||||
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
|
domain->minimum_image_big(FLERR, delx2, dely2, delz2);
|
||||||
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
|
This change is **required** or else the code will not compile.
|
||||||
|
|||||||
@ -75,15 +75,34 @@ section below for examples where this has been done.
|
|||||||
**Differences between the GPU and KOKKOS packages:**
|
**Differences between the GPU and KOKKOS packages:**
|
||||||
|
|
||||||
* The GPU package accelerates only pair force, neighbor list, and (parts
|
* The GPU package accelerates only pair force, neighbor list, and (parts
|
||||||
of) PPPM calculations. The KOKKOS package attempts to run most of the
|
of) PPPM calculations (and runs the remaining force computations on
|
||||||
|
the CPU concurrently). The KOKKOS package attempts to run most of the
|
||||||
calculation on the GPU, but can transparently support non-accelerated
|
calculation on the GPU, but can transparently support non-accelerated
|
||||||
code (with a performance penalty due to having data transfers between
|
code (with a performance penalty due to having data transfers between
|
||||||
host and GPU).
|
host and GPU).
|
||||||
|
* The list of which styles are accelerated by the GPU or KOKKOS package
|
||||||
|
differs with some overlap.
|
||||||
* The GPU package requires neighbor lists to be built on the CPU when using
|
* The GPU package requires neighbor lists to be built on the CPU when using
|
||||||
hybrid pair styles, exclusion lists, or a triclinic simulation box.
|
hybrid pair styles, exclusion lists, or a triclinic simulation box.
|
||||||
* The GPU package can be compiled for CUDA, HIP, or OpenCL and thus supports
|
* The GPU package benefits from running multiple MPI processes (2-8) per
|
||||||
NVIDIA, AMD, and Intel GPUs well. On NVIDIA hardware, using CUDA is
|
GPU to parallelize the non-GPU accelerated styles. The KOKKOS package
|
||||||
typically resulting in equal or better performance over OpenCL.
|
usually not, especially when all parts of the calculation have KOKKOS
|
||||||
* OpenCL in the GPU package does theoretically also support Intel CPUs or
|
support.
|
||||||
Intel Xeon Phi, but the native support for those in KOKKOS (or INTEL)
|
* The GPU package can be compiled for CUDA, HIP, or OpenCL and thus
|
||||||
is superior.
|
supports NVIDIA, AMD, and Intel GPUs well. On NVIDIA or AMD hardware,
|
||||||
|
using native CUDA or HIP compilation, respectively, with either GPU or
|
||||||
|
KOKKOS results in equal or better performance over OpenCL.
|
||||||
|
* OpenCL in the GPU package supports NVIDIA, AMD, and Intel GPUs at the
|
||||||
|
*same time* and with the *same executable*. KOKKOS currently does not
|
||||||
|
support OpenCL.
|
||||||
|
* The GPU package supports single precision floating point, mixed
|
||||||
|
precision floating point, and double precision floating point math on
|
||||||
|
the GPU. This must be chosen at compile time. KOKKOS currently only
|
||||||
|
supports double precision floating point math. Using single or mixed
|
||||||
|
precision (recommended) results in significantly improved performance
|
||||||
|
on consumer GPUs for some loss in accuracy (which is rather small with
|
||||||
|
mixed precision). Single and mixed precision support for KOKKOS is in
|
||||||
|
development (no ETA yet).
|
||||||
|
* Some pair styles (for example :doc:`snap <pair_snap>`, :doc:`mliap
|
||||||
|
<pair_mliap>` or :doc:`reaxff <pair_reaxff>` in the KOKKOS package have
|
||||||
|
seen extensive optimizations and specializations for GPUs and CPUs.
|
||||||
|
|||||||
@ -1,16 +1,218 @@
|
|||||||
Measuring performance
|
Measuring performance
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Before trying to make your simulation run faster, you should
|
Factors that influence performance
|
||||||
understand how it currently performs and where the bottlenecks are.
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The best way to do this is run the your system (actual number of
|
Before trying to make your simulation run faster, you should understand
|
||||||
atoms) for a modest number of timesteps (say 100 steps) on several
|
how it currently performs and where the bottlenecks are. We generally
|
||||||
different processor counts, including a single processor if possible.
|
distinguish between serial performance (how fast can a single process do
|
||||||
Do this for an equilibrium version of your system, so that the
|
the calculations?) and parallel efficiency (how much faster does a
|
||||||
100-step timings are representative of a much longer run. There is
|
calculation get by using more processes?). There are many factors
|
||||||
typically no need to run for 1000s of timesteps to get accurate
|
affecting either and below are some lists discussing some commonly
|
||||||
timings; you can simply extrapolate from short runs.
|
known but also some less known factors.
|
||||||
|
|
||||||
|
Factors affecting serial performance (in no specific order):
|
||||||
|
|
||||||
|
* CPU hardware: clock rate, cache sizes, CPU architecture (instructions
|
||||||
|
per clock, vectorization support, fused multiply-add support and more)
|
||||||
|
* RAM speed and number of channels that the CPU can use to access RAM
|
||||||
|
* Cooling: CPUs can change the CPU clock based on thermal load, thus the
|
||||||
|
degree of cooling can affect the speed of a CPU. Sometimes even the
|
||||||
|
temperature of neighboring compute nodes in a cluster can make a
|
||||||
|
difference.
|
||||||
|
* Compiler optimization: most of LAMMPS is written to be easy to modify
|
||||||
|
and thus compiler optimization can speed up calculations. However, too
|
||||||
|
aggressive compiler optimization can produce incorrect results or
|
||||||
|
crashes (during compilation or at runtime).
|
||||||
|
* Source code improvements: styles in the OPT, OPENMP, and INTEL package
|
||||||
|
can be faster than their base implementation due to improved data
|
||||||
|
access patterns, cache efficiency, or vectorization. Compiler optimization
|
||||||
|
is required to take full advantage of these.
|
||||||
|
* Number and kind of fixes, computes, or variables used during a simulation,
|
||||||
|
especially if they result in collective communication operations
|
||||||
|
* Pair style cutoffs and system density: calculations get slower the more
|
||||||
|
neighbors are in the neighbor list and thus for which interactions need
|
||||||
|
to be computed. Force fields with pair styles that compute interactions
|
||||||
|
between triples or quadruples of atoms or that use embedding energies or
|
||||||
|
charge equilibration will need to walk the neighbor lists multiple times.
|
||||||
|
* Neighbor list settings: tradeoff between neighbor list skin (larger
|
||||||
|
skin = more neighbors, more distances to compute before applying the
|
||||||
|
cutoff) and frequency of neighbor list builds (larger skin = fewer
|
||||||
|
neighbor list builds).
|
||||||
|
* Proximity of per-atom data in physical memory that for atoms that are
|
||||||
|
close in space improves cache efficiency (thus LAMMPS will by default
|
||||||
|
sort atoms in local storage accordingly)
|
||||||
|
* Using r-RESPA multi-timestepping or a SHAKE or RATTLE fix to constrain
|
||||||
|
bonds with higher-frequency vibrations may allow a larger (outer) timestep
|
||||||
|
and thus fewer force evaluations (usually the most time consuming step in
|
||||||
|
MD) for the same simulated time (with some tradeoff in accuracy).
|
||||||
|
|
||||||
|
Factors affecting parallel efficiency (in no specific order):
|
||||||
|
|
||||||
|
* Bandwidth and latency of communication between processes. This can vary a
|
||||||
|
lot between processes on the same CPU or physical node and processes
|
||||||
|
on different physical nodes and there vary between different
|
||||||
|
communication technologies (like Ethernet or InfiniBand or other
|
||||||
|
high-speed interconnects)
|
||||||
|
* Frequency and complexity of communication patterns required
|
||||||
|
* Number of "work units" (usually correlated with the number of atoms
|
||||||
|
and choice of force field) per MPI-process required for one time step
|
||||||
|
(if this number becomes too small, the cost of communication becomes
|
||||||
|
dominant).
|
||||||
|
* Choice of parallelization method (MPI-only, OpenMP-only, MPI+OpenMP,
|
||||||
|
MPI+GPU, MPI+GPU+OpenMP)
|
||||||
|
* Algorithmic complexity of the chosen force field (pair-wise vs. many-body
|
||||||
|
potential, Ewald vs. PPPM vs. (compensated or smoothed) cutoff-Coulomb)
|
||||||
|
* Communication cutoff: a larger cutoff results in more ghost atoms and
|
||||||
|
thus more data that needs to be communicated
|
||||||
|
* Frequency of neighbor list builds: during a neighbor list build the
|
||||||
|
domain decomposition is updated and the list of ghost atoms rebuilt
|
||||||
|
which requires multiple global communication steps
|
||||||
|
* FFT-grid settings and number of MPI processes for kspace style PPPM:
|
||||||
|
PPPM uses parallel 3d FFTs which will drop much faster in parallel
|
||||||
|
efficiency with respect to the number of MPI processes than other
|
||||||
|
parts of the force computation. Thus using MPI+OpenMP parallelization
|
||||||
|
or :doc:`run style verlet/split <run_style>` can improve parallel
|
||||||
|
efficiency by limiting the number of MPI processes used for the FFTs.
|
||||||
|
* Load (im-)balance: LAMMPS' domain decomposition assumes that atoms are
|
||||||
|
evenly distributed across the entire simulation box. If there are
|
||||||
|
areas of vacuum, this may lead to different amounts of work for
|
||||||
|
different MPI processes. Using the :doc:`processors command
|
||||||
|
<processors>` to change the spatial decomposition, or MPI+OpenMP
|
||||||
|
parallelization instead of only-MPI to have larger sub-domains, or the
|
||||||
|
(fix) balance command (without or with switching to communication style
|
||||||
|
tiled) to change the sub-domain volumes are all methods that
|
||||||
|
can help to avoid load imbalances.
|
||||||
|
|
||||||
|
Examples comparing serial performance
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Before looking at your own input deck(s), you should get some reference
|
||||||
|
data from a known input so that you know what kind of performance you
|
||||||
|
should expect from your input. For the following we therefore use the
|
||||||
|
``in.rhodo.scaled`` input file and ``data.rhodo`` data file from the
|
||||||
|
``bench`` folder. This is a system of 32000 atoms using the CHARMM force
|
||||||
|
field and long-range electrostatics running for 100 MD steps. The
|
||||||
|
performance data is printed at the end of a run and only measures the
|
||||||
|
performance during propagation and excludes the setup phase.
|
||||||
|
|
||||||
|
Running with a single MPI process on an AMD Ryzen Threadripper PRO
|
||||||
|
9985WX CPU (64 cores, 128 threads, base clock: 3.2GHz, max. clock
|
||||||
|
5.4GHz, L1/L2/L3 cache 5MB/64MB/256MB, 8 DDR5-6400 memory channels) one
|
||||||
|
gets the following performance report:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
Performance: 1.232 ns/day, 19.476 hours/ns, 7.131 timesteps/s, 228.197 katom-step/s
|
||||||
|
99.2% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
The %CPU value should be at 100% or very close. Lower values would
|
||||||
|
be an indication that there are *other* processes also using the same
|
||||||
|
CPU core and thus invalidating the performance data. The katom-step/s
|
||||||
|
value is best suited for comparisons, since it is fairly independent
|
||||||
|
from the system size. The `in.rhodo.scaled` input can be easily made
|
||||||
|
larger through replication in the three dimensions by settings variables
|
||||||
|
"x", "y", "z" to values other than 1 from the command line with the
|
||||||
|
"-var" flag. Example:
|
||||||
|
|
||||||
|
- 32000 atoms: 228.8 katom-step/s
|
||||||
|
- 64000 atoms: 231.6 katom-step/s
|
||||||
|
- 128000 atoms: 231.1 katom-step/s
|
||||||
|
- 256000 atoms: 226.4 katom-step/s
|
||||||
|
- 864000 atoms: 229.6 katom-step/s
|
||||||
|
|
||||||
|
Comparing to an AMD Ryzen 7 7840HS CPU (8 cores, 16 threads, base clock
|
||||||
|
3.8GHz, max. clock 5.1GHz, L1/L2/L3 cache 512kB/8MB/16MB, 2 DDR5-5600
|
||||||
|
memory channels), we get similar single core performance (~220
|
||||||
|
katom-step/s vs. ~230 katom-step/s) due to the similar clock and
|
||||||
|
architecture:
|
||||||
|
|
||||||
|
- 32000 atoms: 219.8 katom-step/s
|
||||||
|
- 64000 atoms: 222.5 katom-step/s
|
||||||
|
- 128000 atoms: 216.8 katom-step/s
|
||||||
|
- 256000 atoms: 221.0 katom-step/s
|
||||||
|
- 864000 atoms: 221.1 katom-step/s
|
||||||
|
|
||||||
|
Switching to an older Intel Xeon E5-2650 v4 CPU (12 cores, 12 threads,
|
||||||
|
base clock 2.2GHz, max. clock 2.9GHz, L1/L2/L3 cache (64kB/256kB/30MB, 4
|
||||||
|
DDR4-2400 memory channels) leads to a lower performance of approximately
|
||||||
|
109 katom-step/s due to differences in architecture and clock. In all
|
||||||
|
cases, when looking at multiple runs, the katom-step/s property
|
||||||
|
fluctuates by approximately 1% around the average.
|
||||||
|
|
||||||
|
From here on we are looking at the performance for the 256000 atom system only
|
||||||
|
and change several settings incrementally:
|
||||||
|
|
||||||
|
#. No compiler optimization GCC (-Og -g): 183.8 katom-step/s
|
||||||
|
#. Moderate optimization with debug info GCC (-O2 -g): 231.1 katom-step/s
|
||||||
|
#. Full compiler optimization GCC (-DNDEBUG -O3): 236.0 katom-step/s
|
||||||
|
#. Aggressive compiler optimization GCC (-O3 -ffast-math -march=native): 239.9 katom-step/s
|
||||||
|
#. Source code optimization in OPENMP package (1 thread): 266.7 katom-step/s
|
||||||
|
#. Use *fix nvt* instead of *fix npt* (compute virial only every 50 steps): 272.9 katom-step/s
|
||||||
|
#. Increase pair style cutoff by 2 :math:`\AA`: 181.2 katom-step/s
|
||||||
|
#. Use tight PPPM convergence (1.0e-6 instead of 1.0e-4): 161.9 katom-step/s
|
||||||
|
#. Use Ewald summation instead of PPPM (at 1.0e-4 convergence): 19.9 katom-step/s
|
||||||
|
|
||||||
|
The numbers show that gains from aggressive compiler optimizations are
|
||||||
|
rather small in LAMMPS, the data access optimizations in the OPENMP (and
|
||||||
|
OPT) packages are more prominent. On the other side, using more
|
||||||
|
accurate force field settings causes, not unexpectedly, a significant
|
||||||
|
slowdown (to about half the speed). Finally, using regular Ewald
|
||||||
|
summation causes a massive slowdown due to the bad algorithmic scaling
|
||||||
|
with system size.
|
||||||
|
|
||||||
|
Examples comparing parallel performance
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The parallel performance usually goes on top of the serial performance.
|
||||||
|
Using twice as many processors should increase the performance metric
|
||||||
|
by up to a factor of two. With the number of processors *N* and the
|
||||||
|
serial performance :math:`p_1` and the performance for *N* processors
|
||||||
|
:math:`p_N` we can define a *parallel efficiency* in percent as follows:
|
||||||
|
|
||||||
|
.. math::
|
||||||
|
|
||||||
|
P_{eff} = \frac{p_N}{p_1 \cdot N} \cdot 100\%
|
||||||
|
|
||||||
|
For the AMD Ryzen Threadripper PRO 9985WX CPU and the serial
|
||||||
|
simulation settings of point 6. from above, we get the following
|
||||||
|
parallel efficiency data for the 256000 atom system:
|
||||||
|
|
||||||
|
- 1 MPI task: 273.6 katom-step/s, :math:`P_{eff} = 100\%`
|
||||||
|
- 2 MPI tasks: 530.6 katom-step/s, :math:`P_{eff} = 97\%`
|
||||||
|
- 4 MPI tasks: 1.021 Matom-step/s, :math:`P_{eff} = 93\%`
|
||||||
|
- 8 MPI tasks: 1.837 Matom-step/s, :math:`P_{eff} = 84\%`
|
||||||
|
- 16 MPI tasks: 3.574 Matom-step/s, :math:`P_{eff} = 82\%`
|
||||||
|
- 32 MPI tasks: 6.479 Matom-step/s, :math:`P_{eff} = 74\%`
|
||||||
|
- 64 MPI tasks: 9.032 Matom-step/s, :math:`P_{eff} = 52\%`
|
||||||
|
- 128 MPI tasks: 12.03 Matom-step/s, :math:`P_{eff} = 34\%`
|
||||||
|
|
||||||
|
The 128 MPI tasks run uses CPU cores from hyper-threading.
|
||||||
|
|
||||||
|
For a small system with only 32000 atoms the parallel efficiency
|
||||||
|
drops off earlier when the number of work units is too small relative
|
||||||
|
to the communication overhead:
|
||||||
|
|
||||||
|
- 1 MPI task: 270.8 katom-step/s, :math:`P_{eff} = 100\%`
|
||||||
|
- 2 MPI tasks: 529.3 katom-step/s, :math:`P_{eff} = 98\%`
|
||||||
|
- 4 MPI tasks: 989.8 katom-step/s, :math:`P_{eff} = 91\%`
|
||||||
|
- 8 MPI tasks: 1.832 Matom-step/s, :math:`P_{eff} = 85\%`
|
||||||
|
- 16 MPI tasks: 3.463 Matom-step/s, :math:`P_{eff} = 80\%`
|
||||||
|
- 32 MPI tasks: 5.970 Matom-step/s, :math:`P_{eff} = 69\%`
|
||||||
|
- 64 MPI tasks: 7.477 Matom-step/s, :math:`P_{eff} = 42\%`
|
||||||
|
- 128 MPI tasks: 8.069 Matom-step/s, :math:`P_{eff} = 23\%`
|
||||||
|
|
||||||
|
Measuring performance of your input deck
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The best way to do this is run the your system (actual number of atoms)
|
||||||
|
for a modest number of timesteps (say 100 steps) on several different
|
||||||
|
processor counts, including a single processor if possible. Do this for
|
||||||
|
an equilibrium version of your system, so that the 100-step timings are
|
||||||
|
representative of a much longer run. There is typically no need to run
|
||||||
|
for 1000s of timesteps to get accurate timings; you can simply
|
||||||
|
extrapolate from short runs.
|
||||||
|
|
||||||
For the set of runs, look at the timing data printed to the screen and
|
For the set of runs, look at the timing data printed to the screen and
|
||||||
log file at the end of each LAMMPS run. The
|
log file at the end of each LAMMPS run. The
|
||||||
@ -28,12 +230,15 @@ breakdown and relative percentages. For example, trying different
|
|||||||
options for speeding up the long-range solvers will have little impact
|
options for speeding up the long-range solvers will have little impact
|
||||||
if they only consume 10% of the run time. If the pairwise time is
|
if they only consume 10% of the run time. If the pairwise time is
|
||||||
dominating, you may want to look at GPU or OMP versions of the pair
|
dominating, you may want to look at GPU or OMP versions of the pair
|
||||||
style, as discussed below. Comparing how the percentages change as
|
style, as discussed below. Comparing how the percentages change as you
|
||||||
you increase the processor count gives you a sense of how different
|
increase the processor count gives you a sense of how different
|
||||||
operations within the timestep are scaling. Note that if you are
|
operations within the timestep are scaling. If you are using PPPM as
|
||||||
running with a Kspace solver, there is additional output on the
|
Kspace solver, you can turn on an additional output with
|
||||||
breakdown of the Kspace time. For PPPM, this includes the fraction
|
:doc:`kspace_modify fftbench yes <kspace_modify>` which measures the
|
||||||
spent on FFTs, which can be communication intensive.
|
time spent during PPPM on the 3d FFTs, which can be communication
|
||||||
|
intensive for larger processor counts. This provides an indication
|
||||||
|
whether it is worth trying out alternatives to the default FFT settings
|
||||||
|
for additional performance.
|
||||||
|
|
||||||
Another important detail in the timing info are the histograms of
|
Another important detail in the timing info are the histograms of
|
||||||
atoms counts and neighbor counts. If these vary widely across
|
atoms counts and neighbor counts. If these vary widely across
|
||||||
|
|||||||
@ -208,6 +208,7 @@ accelerated styles exist.
|
|||||||
* :doc:`ave/grid <fix_ave_grid>` - compute per-grid time-averaged quantities
|
* :doc:`ave/grid <fix_ave_grid>` - compute per-grid time-averaged quantities
|
||||||
* :doc:`ave/histo <fix_ave_histo>` - compute/output time-averaged histograms
|
* :doc:`ave/histo <fix_ave_histo>` - compute/output time-averaged histograms
|
||||||
* :doc:`ave/histo/weight <fix_ave_histo>` - weighted version of fix ave/histo
|
* :doc:`ave/histo/weight <fix_ave_histo>` - weighted version of fix ave/histo
|
||||||
|
* :doc:`ave/moments <fix_ave_moments>` - compute moments of scalar quantities
|
||||||
* :doc:`ave/time <fix_ave_time>` - compute/output global time-averaged quantities
|
* :doc:`ave/time <fix_ave_time>` - compute/output global time-averaged quantities
|
||||||
* :doc:`aveforce <fix_aveforce>` - add an averaged force to each atom
|
* :doc:`aveforce <fix_aveforce>` - add an averaged force to each atom
|
||||||
* :doc:`balance <fix_balance>` - perform dynamic load-balancing
|
* :doc:`balance <fix_balance>` - perform dynamic load-balancing
|
||||||
@ -397,6 +398,7 @@ accelerated styles exist.
|
|||||||
* :doc:`rigid/small <fix_rigid>` - constrain many small clusters of atoms to move as a rigid body with NVE integration
|
* :doc:`rigid/small <fix_rigid>` - constrain many small clusters of atoms to move as a rigid body with NVE integration
|
||||||
* :doc:`rx <fix_rx>` - solve reaction kinetic ODEs for a defined reaction set
|
* :doc:`rx <fix_rx>` - solve reaction kinetic ODEs for a defined reaction set
|
||||||
* :doc:`saed/vtk <fix_saed_vtk>` - time-average the intensities from :doc:`compute saed <compute_saed>`
|
* :doc:`saed/vtk <fix_saed_vtk>` - time-average the intensities from :doc:`compute saed <compute_saed>`
|
||||||
|
* :doc:`set <fix_set>` - reset an atom property via an atom-style variable every N steps
|
||||||
* :doc:`setforce <fix_setforce>` - set the force on each atom
|
* :doc:`setforce <fix_setforce>` - set the force on each atom
|
||||||
* :doc:`setforce/spin <fix_setforce>` - set magnetic precession vectors on each atom
|
* :doc:`setforce/spin <fix_setforce>` - set magnetic precession vectors on each atom
|
||||||
* :doc:`sgcmc <fix_sgcmc>` - fix for hybrid semi-grand canonical MD/MC simulations
|
* :doc:`sgcmc <fix_sgcmc>` - fix for hybrid semi-grand canonical MD/MC simulations
|
||||||
|
|||||||
@ -82,10 +82,9 @@ specified values may represent calculations performed by computes and
|
|||||||
fixes which store their own "group" definitions.
|
fixes which store their own "group" definitions.
|
||||||
|
|
||||||
Each listed value can be the result of a compute or fix or the
|
Each listed value can be the result of a compute or fix or the
|
||||||
evaluation of an equal-style or vector-style variable. For
|
evaluation of an equal-style or vector-style variable. The specified
|
||||||
vector-style variables, the specified indices can include a wildcard
|
indices can include a wildcard string. See the
|
||||||
character. See the :doc:`fix ave/correlate <fix_ave_correlate>` page
|
:doc:`fix ave/correlate <fix_ave_correlate>` page for details on that.
|
||||||
for details.
|
|
||||||
|
|
||||||
The *Nevery* and *Nfreq* arguments specify on what time steps the input
|
The *Nevery* and *Nfreq* arguments specify on what time steps the input
|
||||||
values will be used to calculate correlation data and the frequency
|
values will be used to calculate correlation data and the frequency
|
||||||
|
|||||||
296
doc/src/fix_ave_moments.rst
Normal file
296
doc/src/fix_ave_moments.rst
Normal file
@ -0,0 +1,296 @@
|
|||||||
|
.. index:: fix ave/moments
|
||||||
|
|
||||||
|
fix ave/moments command
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
""""""
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
fix ID group-ID ave/moments Nevery Nrepeat Nfreq value1 value2 ... moment1 moment2 ... keyword args ...
|
||||||
|
|
||||||
|
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||||
|
* ave/moments = style name of this fix command
|
||||||
|
* Nevery = use input values every this many time steps
|
||||||
|
* Nrepeat = # of times to use input values for calculating averages
|
||||||
|
* Nfreq = calculate averages every this many time steps
|
||||||
|
* one or more input variables can be listed
|
||||||
|
* value = v_name
|
||||||
|
|
||||||
|
.. parsed-literal::
|
||||||
|
|
||||||
|
c_ID = global scalar calculated by a compute with ID
|
||||||
|
c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
|
||||||
|
f_ID = global scalar calculated by a fix with ID
|
||||||
|
f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
|
||||||
|
v_name = value calculated by an equal-style variable with name
|
||||||
|
v_name[I] = value calculated by a vector-style variable with name, I can include wildcard (see below)
|
||||||
|
|
||||||
|
* one or more moments to compute can be listed
|
||||||
|
* moment = *mean* or *stddev* or *variance* or *skew* or *kurtosis*, see exact definitions below.
|
||||||
|
* zero or more keyword/arg pairs may be appended
|
||||||
|
* keyword = *start* or *history*
|
||||||
|
|
||||||
|
.. parsed-literal::
|
||||||
|
|
||||||
|
*start* args = Nstart
|
||||||
|
Nstart = invoke first after this time step
|
||||||
|
*history* args = Nrecent
|
||||||
|
Nrecent = keep a history of up to Nrecent outputs
|
||||||
|
|
||||||
|
Examples
|
||||||
|
""""""""
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
fix 1 all ave/moments 1 1000 100 v_volume mean stddev
|
||||||
|
fix 1 all ave/moments 1 200 1000 v_volume variance kurtosis history 10
|
||||||
|
|
||||||
|
Description
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
.. versionadded:: TBD
|
||||||
|
|
||||||
|
Using one or more values as input, calculate the moments of the underlying
|
||||||
|
(population) distributions based on samples collected every few time
|
||||||
|
steps over a time step window. The definitions of the moments calculated
|
||||||
|
are given below.
|
||||||
|
|
||||||
|
The group specified with this command is ignored. However, note that
|
||||||
|
specified values may represent calculations performed by computes and
|
||||||
|
fixes which store their own "group" definitions.
|
||||||
|
|
||||||
|
Each listed value can be the result of a :doc:`compute <compute>` or
|
||||||
|
:doc:`fix <fix>` or the evaluation of an equal-style or vector-style
|
||||||
|
:doc:`variable <variable>`. In each case, the compute, fix, or variable
|
||||||
|
must produce a global quantity, not a per-atom or local quantity.
|
||||||
|
If you wish to spatial- or time-average or histogram per-atom
|
||||||
|
quantities from a compute, fix, or variable, then see the :doc:`fix
|
||||||
|
ave/chunk <fix_ave_chunk>`, :doc:`fix ave/atom <fix_ave_atom>`, or
|
||||||
|
:doc:`fix ave/histo <fix_ave_histo>` commands. If you wish to sum a
|
||||||
|
per-atom quantity into a single global quantity, see the :doc:`compute
|
||||||
|
reduce <compute_reduce>` command.
|
||||||
|
|
||||||
|
Many :doc:`computes <compute>` and :doc:`fixes <fix>` produce global
|
||||||
|
quantities. See their doc pages for details. :doc:`Variables <variable>`
|
||||||
|
of style *equal* and *vector* are the only ones that can be used with
|
||||||
|
this fix. Variables of style *atom* cannot be used, since they produce
|
||||||
|
per-atom values.
|
||||||
|
|
||||||
|
The input values must all be scalars or vectors with a bracketed term
|
||||||
|
appended, indicating the :math:`I^\text{th}` value of the vector is
|
||||||
|
used.
|
||||||
|
|
||||||
|
The result of this fix can be accessed as a vector, containing the
|
||||||
|
interleaved moments of each input in order. If M moments are requested,
|
||||||
|
then the moments of input 1 will be the first M values in the vector
|
||||||
|
output by this fix. The moments of input 2 will the next M values, etc.
|
||||||
|
If there are N values, the vector length will be N*M.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
For input values from a compute or fix or variable, the bracketed index
|
||||||
|
I can be specified using a wildcard asterisk with the index to
|
||||||
|
effectively specify multiple values. This takes the form "\*" or "\*n"
|
||||||
|
or "m\*" or "m\*n". If :math:`N` is the size of the vector, then an
|
||||||
|
asterisk with no numeric values means all indices from 1 to :math:`N`.
|
||||||
|
A leading asterisk means all indices from 1 to n (inclusive). A
|
||||||
|
trailing asterisk means all indices from n to :math:`N` (inclusive). A
|
||||||
|
middle asterisk means all indices from m to n (inclusive).
|
||||||
|
|
||||||
|
Using a wildcard is the same as if the individual elements of the vector
|
||||||
|
or cells of the array had been listed one by one. For examples, see the
|
||||||
|
description of this capability in :doc:`fix ave/time <fix_ave_time>`.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
The :math:`N_\text{every}`, :math:`N_\text{repeat}`, and
|
||||||
|
:math:`N_\text{freq}` arguments specify on what time steps the input
|
||||||
|
values will be used in order to contribute to the average. The final
|
||||||
|
statistics are generated on time steps that are a multiple of
|
||||||
|
:math:`N_\text{freq}`\ . The average is over a window of up to
|
||||||
|
:math:`N_\text{repeat}` quantities, computed in the preceding portion of
|
||||||
|
the simulation once every :math:`N_\text{every}` time steps.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Contrary to most fix ave/* commands, it is not required that Nevery *
|
||||||
|
Nrepeat <= Nfreq. This is to allow the user to choose the time
|
||||||
|
window and number of samples contributing to the output at each
|
||||||
|
Nfreq interval.
|
||||||
|
|
||||||
|
For example, if :math:`N_\text{freq}=100` and :math:`N_\text{repeat}=5`
|
||||||
|
(and :math:`N_\text{every}=1`), then on step 100 values from time steps
|
||||||
|
96, 97, 98, 99, and 100 will be used. The fix does not compute its
|
||||||
|
inputs on steps that are not required. If :math:`N_\text{freq}=5`,
|
||||||
|
:math:`N_\text{repeat}=8` and :math:`N_\text{every}=1`, then values
|
||||||
|
will first be calculated on step 5 from steps 1-5, on step 10 from 3-10,
|
||||||
|
on step 15 from 8-15 and so on, forming a rolling average over
|
||||||
|
timesteps that span a time window larger than Nfreq.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
If a value begins with "c\_", a compute ID must follow which has been
|
||||||
|
previously defined in the input script. If no bracketed term is
|
||||||
|
appended, the global scalar calculated by the compute is used. If a
|
||||||
|
bracketed term is appended, the Ith element of the global vector
|
||||||
|
calculated by the compute is used. See the discussion above for how I
|
||||||
|
can be specified with a wildcard asterisk to effectively specify
|
||||||
|
multiple values.
|
||||||
|
|
||||||
|
If a value begins with "f\_", a fix ID must follow which has been
|
||||||
|
previously defined in the input script. If no bracketed term is
|
||||||
|
appended, the global scalar calculated by the fix is used. If a
|
||||||
|
bracketed term is appended, the Ith element of the global vector
|
||||||
|
calculated by the fix is used. See the discussion above for how I can
|
||||||
|
be specified with a wildcard asterisk to effectively specify multiple
|
||||||
|
values.
|
||||||
|
|
||||||
|
Note that some fixes only produce their values on certain time steps,
|
||||||
|
which must be compatible with *Nevery*, else an error will result.
|
||||||
|
Users can also write code for their own fix styles and :doc:`add them to
|
||||||
|
LAMMPS <Modify>`.
|
||||||
|
|
||||||
|
If a value begins with "v\_", a variable name must follow which has been
|
||||||
|
previously defined in the input script. Only equal-style or vector-style
|
||||||
|
variables can be used, which both produce global values. Vector-style
|
||||||
|
variables require a bracketed term to specify the Ith element of the
|
||||||
|
vector calculated by the variable.
|
||||||
|
|
||||||
|
Note that variables of style *equal* and *vector* define a formula which
|
||||||
|
can reference individual atom properties or thermodynamic keywords, or
|
||||||
|
they can invoke other computes, fixes, or variables when they are
|
||||||
|
evaluated, so this is a very general means of specifying quantities to
|
||||||
|
time average.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
The moments are output in the order requested in the arguments following
|
||||||
|
the last input. Any number and order of moments can be specified,
|
||||||
|
although it does not make much sense to specify the same moment multiple
|
||||||
|
times. All moments are computed using a correction of the sample estimators
|
||||||
|
used to obtain unbiased cumulants :math:`k_{1..4}` (see :ref:`(Cramer)
|
||||||
|
<Cramer1>`). The correction for variance is the standard Bessel
|
||||||
|
correction. For other moments, see :ref:`(Joanes)<Joanes1>`.
|
||||||
|
|
||||||
|
For *mean*, the arithmetic mean :math:`\bar{x} = \frac{1}{n}
|
||||||
|
\sum_{i=1}^{n} x_i` is calculated.
|
||||||
|
|
||||||
|
For *variance*, the Bessel-corrected sample variance :math:`var = k_2 =
|
||||||
|
\frac{1}{n - 1} \sum_{i=1}^{n} (x_i - \bar{x})^2` is calculated.
|
||||||
|
|
||||||
|
For *stddev*, the Bessel-corrected sample standard deviation
|
||||||
|
:math:`stddev = \sqrt{k_2}` is calculated.
|
||||||
|
|
||||||
|
For *skew*, the adjusted Fisher--Pearson standardized moment :math:`G_1
|
||||||
|
= \frac{k_3}{k_2^{3/2}} = \frac{k_3}{stddev^3}` is calculated.
|
||||||
|
|
||||||
|
For *kurtosis*, the adjusted Fisher--Pearson standardized moment
|
||||||
|
:math:`G_2 = \frac{k_4}{k_2^2}` is calculated.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
Fix invocation and output can be modified by optional keywords.
|
||||||
|
|
||||||
|
The *start* keyword specifies that the first computation should be no
|
||||||
|
earlier than the step number given (but will still occur on a multiple
|
||||||
|
of *Nfreq*). The default is step 0. Often input values can be 0.0 at
|
||||||
|
time 0, so setting *start* to a larger value can avoid including a 0.0
|
||||||
|
in a longer series.
|
||||||
|
|
||||||
|
The *history* keyword stores the Nrecent most recent outputs on Nfreq
|
||||||
|
timesteps, so they can be accessed as global outputs of the fix. Nrecent
|
||||||
|
must be >= 1. The default is 1, meaning only the most recent output is
|
||||||
|
accessible. For example, if history 10 is specified and Nfreq = 1000,
|
||||||
|
then on timestep 20000, the Nfreq outputs from steps 20000, 19000, ...
|
||||||
|
11000 are available for access. See below for details on how to access
|
||||||
|
the history values.
|
||||||
|
|
||||||
|
For example, this will store the outputs of the previous 10 Nfreq
|
||||||
|
time steps, i.e. a window of 10000 time steps:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
fix 1 all ave/moments 1 200 1000 v_volume mean history 10
|
||||||
|
|
||||||
|
The previous results can be accessed as values in a global array output
|
||||||
|
by this fix. Each column of the array is the vector output of the N-th
|
||||||
|
preceding Nfreq timestep. For example, assuming a single moment is
|
||||||
|
calculated, the most recent result corresponding to the third input
|
||||||
|
value would be accessed as "f_name[3][1]", "f_name[3][4]" is the 4th
|
||||||
|
most recent and so on. The current vector output is always the first
|
||||||
|
column of the array, corresponding to the most recent result.
|
||||||
|
|
||||||
|
To illustrate the utility of keeping output history, consider using
|
||||||
|
this fix in conjunction with :doc:`fix halt <fix_halt>` to stop a run
|
||||||
|
automatically if a quantity is converged to within some desired tolerance:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
variable target equal etot
|
||||||
|
fix aveg all ave/moments 1 200 1000 v_target mean stddev history 10
|
||||||
|
variable stopcond equal "abs(f_aveg[1]-f_aveg[1][10])<f_aveg[2]"
|
||||||
|
fix fhalt all halt 1000 v_stopcond == 1
|
||||||
|
|
||||||
|
In this example, every 1000 time steps, the average and standard
|
||||||
|
deviation of the total energy over the previous 200 time steps are
|
||||||
|
calculated. If the difference between the most recent and 10-th most
|
||||||
|
recent average is lower than the most recent standard deviation, the run
|
||||||
|
is stopped.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
Restart, fix_modify, output, run start/stop, minimize info
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
No information about this fix is written to :doc:`binary restart files
|
||||||
|
<restart>`.
|
||||||
|
|
||||||
|
This fix produces a global vector and global array which can be accessed
|
||||||
|
by various :doc:`output commands <Howto_output>`. The values can be
|
||||||
|
accessed on any time step, but may not be current.
|
||||||
|
|
||||||
|
A global vector is produced with the # of elements = number of moments *
|
||||||
|
number of inputs. The moments are output in the order given in the fix
|
||||||
|
definition. An array is produced having # of rows = length of vector
|
||||||
|
output (with an ordering which matches the vector) and # of columns =
|
||||||
|
value of *history*. There is always at least one column.
|
||||||
|
|
||||||
|
Each element of the global vector or array can be either "intensive" or
|
||||||
|
"extensive", depending on whether the values contributing to the element
|
||||||
|
are "intensive" or "extensive". If a compute or fix provides the value
|
||||||
|
being time averaged, then the compute or fix determines whether the value
|
||||||
|
is intensive or extensive; see the page for that compute or fix for
|
||||||
|
further info. Values produced by a variable are treated as intensive.
|
||||||
|
|
||||||
|
No parameter of this fix can be used with the *start/stop* keywords of
|
||||||
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
:doc:`energy minimization <minimize>`.
|
||||||
|
|
||||||
|
Restrictions
|
||||||
|
""""""""""""
|
||||||
|
|
||||||
|
This compute is part of the EXTRA-FIX package. It is only enabled if
|
||||||
|
LAMMPS was built with that package. See the :doc:`Build package
|
||||||
|
<Build_package>` page for more info.
|
||||||
|
|
||||||
|
Related commands
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
:doc:`fix ave/time <fix_ave_time>`,
|
||||||
|
|
||||||
|
Default
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
The option defaults are history = 1, start = 0.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. _Cramer1:
|
||||||
|
|
||||||
|
**(Cramer)** Cramer, Mathematical Methods of Statistics, Princeton University Press (1946).
|
||||||
|
|
||||||
|
.. _Joanes1:
|
||||||
|
|
||||||
|
**(Joanes)** Joanes, Gill, The Statistician, 47, 183--189 (1998).
|
||||||
173
doc/src/fix_set.rst
Normal file
173
doc/src/fix_set.rst
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
.. index:: fix set
|
||||||
|
|
||||||
|
fix set command
|
||||||
|
===============
|
||||||
|
|
||||||
|
Syntax
|
||||||
|
""""""
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
fix ID group-ID set Nfreq rnflag set-args
|
||||||
|
|
||||||
|
* ID, group-ID are documented in :doc:`fix <fix>` command
|
||||||
|
* set = style name of this fix command
|
||||||
|
* Nfreq = reset per-atom properties every this many timesteps
|
||||||
|
* rnflag = 1 to reneighbor on next timestep, 0 to not
|
||||||
|
* set-args = identical to args for the :doc:`set <set>` command
|
||||||
|
|
||||||
|
Examples
|
||||||
|
""""""""
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
fix 10 all set 1 0 group all i_dump v_new
|
||||||
|
fix 10 all set 1 0 group all i_dump v_turnoff
|
||||||
|
|
||||||
|
Description
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
Reset one or more properties of one or more atoms once every *Nfreq*
|
||||||
|
steps during a simulation.
|
||||||
|
|
||||||
|
If the *rnflag* for reneighboring is set to 1, then a reneighboring
|
||||||
|
will be triggered on the next timestep (since the fix set operation
|
||||||
|
occurs at the end of the current timestep). This is important to do
|
||||||
|
if this command changes per-atom properties that need to be
|
||||||
|
communicated to ghost atoms. If this is not the case, an *rnflag*
|
||||||
|
setting of 0 can be used; reneighboring will only be triggered on
|
||||||
|
subsequent timesteps by the usual neighbor list criteria; see the
|
||||||
|
:doc:`neigh_modify command <neigh_modify>`.
|
||||||
|
|
||||||
|
Here are two examples where an *rnflag* setting of 1 are needed. If a
|
||||||
|
custom per-atom property is changed and the :doc:`fix property/atom
|
||||||
|
<fix_property_atom>` command to create the property used the *ghost
|
||||||
|
yes* keyword. Or if per-atom charges are changed, all pair styles
|
||||||
|
which compute Coulombic interactions require charge values for ghost
|
||||||
|
atoms. In both these examples, the re-neighboring will trigger the
|
||||||
|
changes in the owned atom properties to be immediately communicated to
|
||||||
|
ghost atoms.
|
||||||
|
|
||||||
|
The arguments following *Nfreq* and *rnflag* are identical to those
|
||||||
|
allowed for the :doc:`set <set>` command, as in the examples above and
|
||||||
|
below.
|
||||||
|
|
||||||
|
Note that the group-ID setting for this command is ignored. The
|
||||||
|
syntax for the :doc:`set <set>` arguments allows selection of which
|
||||||
|
atoms have their properties reset.
|
||||||
|
|
||||||
|
This command can only be used to reset an atom property using a
|
||||||
|
per-atom variable. This option in allowed by many, but not all, of
|
||||||
|
the keyword/value pairs supported by the :doc:`set <set>` command.
|
||||||
|
The reason for this restriction is that if a per-atom variable is not
|
||||||
|
used, this command will typically not change atom properties during
|
||||||
|
the simulation.
|
||||||
|
|
||||||
|
The :doc:`set <set>` command can be used with similar syntax to this
|
||||||
|
command to reset atom properties once before or between simulations.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
Here is an example of input script commands which will output atoms
|
||||||
|
into a dump file only when their x-velocity crosses a threshold value
|
||||||
|
*vthresh* for the first time. Their position and x-velocity will then
|
||||||
|
be output every step for *twindow* timesteps.
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
variable vthresh equal 2 # threshold velocity
|
||||||
|
variable twindow equal 10 # dump for this many steps
|
||||||
|
#
|
||||||
|
# define custom property i_dump to store timestep threshold is crossed
|
||||||
|
#
|
||||||
|
fix 2 all property/atom i_dump
|
||||||
|
set group all i_dump -1
|
||||||
|
#
|
||||||
|
# fix set command checks for threshold crossings every step
|
||||||
|
# resets i_dump from -1 to current timestep when crossing occurs
|
||||||
|
#
|
||||||
|
variable start atom "vx > v_vthresh && i_dump == -1"
|
||||||
|
variable new atom ternary(v_start,step,i_dump)
|
||||||
|
fix 3 all set 1 0 group all i_dump v_new
|
||||||
|
#
|
||||||
|
# dump command with thresh which enforces twindow
|
||||||
|
#
|
||||||
|
dump 1 all custom 1 tmp.dump id x y vx i_dump
|
||||||
|
variable dumpflag atom "i_dump >= 0 && (step-i_dump) < v_twindow"
|
||||||
|
dump_modify 1 thresh v_dumpflag == 1
|
||||||
|
#
|
||||||
|
# run the simulation
|
||||||
|
# final dump with all atom IDs which crossed threshold on which timestep
|
||||||
|
#
|
||||||
|
run 1000
|
||||||
|
write_dump all custom tmp.dump.final id i_dump modify thresh i_dump >= 0
|
||||||
|
|
||||||
|
The tmp.dump.final file lists which atoms crossed the velocity
|
||||||
|
threshold. This command will print the *twindow* timesteps when a
|
||||||
|
specific atom ID (104 in this case) was output in the tmp.dump file:
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
% grep "^104 " tmp.dump
|
||||||
|
|
||||||
|
If these commands are used instead of the above, then an atom can
|
||||||
|
cross the velocity threshold multiple times, and will be output for
|
||||||
|
*twindow* timesteps each time. However the write_dump command is no
|
||||||
|
longer useful.
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
variable vthresh equal 2 # threshold velocity
|
||||||
|
variable twindow equal 10 # dump for this many steps
|
||||||
|
#
|
||||||
|
# define custom property i_dump to store timestep threshold is crossed
|
||||||
|
#
|
||||||
|
fix 2 all property/atom i_dump
|
||||||
|
set group all i_dump -1
|
||||||
|
#
|
||||||
|
# fix set command checks for threshold crossings every step
|
||||||
|
# resets i_dump from -1 to current timestep when crossing occurs
|
||||||
|
#
|
||||||
|
variable start atom "vx > v_vthresh && i_dump == -1"
|
||||||
|
variable turnon atom ternary(v_start,step,i_dump)
|
||||||
|
variable stop atom "v_turnon >= 0 && (step-v_turnon) < v_twindow"
|
||||||
|
variable turnoff atom ternary(v_stop,v_turnon,-1)
|
||||||
|
fix 3 all set 1 0 group all i_dump v_turnoff
|
||||||
|
#
|
||||||
|
# dump command with thresh which enforces twindow
|
||||||
|
#
|
||||||
|
dump 1 all custom 1 tmp.dump id x y vx i_dump
|
||||||
|
variable dumpflag atom "i_dump >= 0 && (step-i_dump) < v_twindow"
|
||||||
|
dump_modify 1 thresh v_dumpflag == 1
|
||||||
|
#
|
||||||
|
# run the simulation
|
||||||
|
#
|
||||||
|
run 1000
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
Restart, fix_modify, output, run start/stop, minimize info
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
No information about this fix is written to :doc:`binary restart files
|
||||||
|
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
|
||||||
|
relevant to this fix. No global or per-atom quantities are stored by
|
||||||
|
this fix for access by various :doc:`output commands <Howto_output>`.
|
||||||
|
No parameter of this fix can be used with the *start/stop* keywords of
|
||||||
|
the :doc:`run <run>` command. This fix is not invoked during
|
||||||
|
:doc:`energy minimization <minimize>`.
|
||||||
|
|
||||||
|
Restrictions
|
||||||
|
""""""""""""
|
||||||
|
|
||||||
|
none
|
||||||
|
|
||||||
|
Related commands
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
:doc:`set <set>`
|
||||||
|
|
||||||
|
Default
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
none
|
||||||
@ -100,6 +100,56 @@ first is assigned to intra-molecular interactions (i.e. both atoms
|
|||||||
have the same molecule ID), the second to inter-molecular interactions
|
have the same molecule ID), the second to inter-molecular interactions
|
||||||
(i.e. interacting atoms have different molecule IDs).
|
(i.e. interacting atoms have different molecule IDs).
|
||||||
|
|
||||||
|
.. admonition:: When **NOT** to use a hybrid pair style
|
||||||
|
:class: warning
|
||||||
|
|
||||||
|
Using pair style *hybrid* can be very tempting to use if you need a
|
||||||
|
**many-body potential** supporting a mix of elements for which you
|
||||||
|
cannot find a potential file that covers *all* of them. Regardless
|
||||||
|
of how this is set up, there will be *errors*. The major use case
|
||||||
|
where the error is *small*, is when the many-body sub-styles are used
|
||||||
|
on different objects (for example a slab and a liquid, a metal and a
|
||||||
|
nano-machining work piece). In that case the *mixed* terms
|
||||||
|
**should** be provided by a pair-wise additive potential (like
|
||||||
|
Lennard-Jones or Morse) to avoid unexpected behavior and reduce
|
||||||
|
errors. LAMMPS cannot easily check for this condition and thus will
|
||||||
|
accept good and bad choices alike.
|
||||||
|
|
||||||
|
Outside of this, we *strongly* recommend *against* using pair style
|
||||||
|
hybrid with many-body potentials for the following reasons:
|
||||||
|
|
||||||
|
1. When trying to combine EAM or MEAM potentials, there is a *large*
|
||||||
|
error in the embedding term, since it is computed separately for
|
||||||
|
each sub-style only.
|
||||||
|
|
||||||
|
2. When trying to combine many-body potentials like Stillinger-Weber,
|
||||||
|
Tersoff, AIREBO, Vashishta, or similar, you have to understand
|
||||||
|
that the potential of a sub-style cannot be applied in a pair-wise
|
||||||
|
fashion but will need to be applied to multiples of atoms
|
||||||
|
(e.g. a Tersoff potential of elements A and B includes the
|
||||||
|
interactions A-A, B-B, A-B, A-A-A, A-A-B, A-B-B, A-B-A, B-A-A,
|
||||||
|
B-A-B, B-B-A, B-B-B; AIREBO also considers all quadruples of
|
||||||
|
atom elements).
|
||||||
|
|
||||||
|
3. When one of the sub-styles uses charge-equilibration (= QEq; like
|
||||||
|
in ReaxFF or COMB) you have inconsistent QEq behavior because
|
||||||
|
either you try to apply QEq to *all* atoms but then you are
|
||||||
|
missing the QEq parameters for the non-QEq pair style (and it
|
||||||
|
would be inconsistent to apply QEq for pair styles that are not
|
||||||
|
parameterized for QEq) or else you would have either no charges or
|
||||||
|
fixed charges interacting with the QEq which also leads to
|
||||||
|
inconsistent behavior between two sub-styles. When attempting to
|
||||||
|
use multiple ReaxFF instances to combine different potential
|
||||||
|
files, you might be able to work around the QEq limitations, but
|
||||||
|
point 2. still applies.
|
||||||
|
|
||||||
|
We understand that it is frustrating to not be able to run simulations
|
||||||
|
due to lack of available potential files, but that does not justify
|
||||||
|
combining potentials in a broken way via pair style hybrid. This is
|
||||||
|
not what the hybrid pair styles are designed for.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Here are two examples of hybrid simulations. The *hybrid* style could
|
Here are two examples of hybrid simulations. The *hybrid* style could
|
||||||
be used for a simulation of a metal droplet on a LJ surface. The metal
|
be used for a simulation of a metal droplet on a LJ surface. The metal
|
||||||
atoms interact with each other via an *eam* potential, the surface atoms
|
atoms interact with each other via an *eam* potential, the surface atoms
|
||||||
@ -374,12 +424,11 @@ selected sub-style.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. note::
|
Even though the command name "pair_style" would suggest that these are
|
||||||
|
pair-wise interactions, several of the potentials defined via the
|
||||||
Several of the potentials defined via the pair_style command in
|
pair_style command in LAMMPS are really many-body potentials, such as
|
||||||
LAMMPS are really many-body potentials, such as Tersoff, AIREBO, MEAM,
|
Tersoff, AIREBO, MEAM, ReaxFF, etc. The way to think about using these
|
||||||
ReaxFF, etc. The way to think about using these potentials in a
|
potentials in a hybrid setting is as follows.
|
||||||
hybrid setting is as follows.
|
|
||||||
|
|
||||||
A subset of atom types is assigned to the many-body potential with a
|
A subset of atom types is assigned to the many-body potential with a
|
||||||
single :doc:`pair_coeff <pair_coeff>` command, using "\* \*" to include
|
single :doc:`pair_coeff <pair_coeff>` command, using "\* \*" to include
|
||||||
|
|||||||
@ -103,14 +103,16 @@ must be done.
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If your input script changes the system between 2 runs, then the
|
If your input script "changes" the system between 2 runs, then the
|
||||||
initial setup must be performed to ensure the change is recognized by
|
initial setup typically needs to be performed to ensure the change
|
||||||
all parts of the code that are affected. Examples are adding a
|
is recognized by all parts of the code that are affected. Examples
|
||||||
:doc:`fix <fix>` or :doc:`dump <dump>` or :doc:`compute <compute>`, changing
|
are adding a :doc:`fix <fix>` or :doc:`dump <dump>` or
|
||||||
a :doc:`neighbor <neigh_modify>` list parameter, or writing restart file
|
:doc:`compute <compute>`, changing a :doc:`neighbor <neigh_modify>`
|
||||||
which can migrate atoms between processors. LAMMPS has no easy way to
|
list parameter, using the :doc:`set <set>` command, or writing a
|
||||||
check if this has happened, but it is an error to use the *pre no*
|
restart file via the :doc:`write_restart <write_restart>` command,
|
||||||
option in this case.
|
which can migrate atoms between processors. LAMMPS has no easy way
|
||||||
|
to check if this has happened, but it is an error to use the *pre
|
||||||
|
no* option in these cases.
|
||||||
|
|
||||||
If *post* is specified as "no", the full timing summary is skipped;
|
If *post* is specified as "no", the full timing summary is skipped;
|
||||||
only a one-line summary timing is printed.
|
only a one-line summary timing is printed.
|
||||||
|
|||||||
791
doc/src/set.rst
791
doc/src/set.rst
@ -22,21 +22,110 @@ Syntax
|
|||||||
for style = *region*, ID = a region ID
|
for style = *region*, ID = a region ID
|
||||||
|
|
||||||
* one or more keyword/value pairs may be appended
|
* one or more keyword/value pairs may be appended
|
||||||
* keyword = *type* or *type/fraction* or *type/ratio* or *type/subset*
|
|
||||||
or *mol* or *x* or *y* or *z* or *vx* or *vy* or *vz* or *charge* or
|
* keyword = *angle* or *angmom* or *bond* or *cc* or *charge* or
|
||||||
*dipole* or *dipole/random* or *quat* or *spin/atom* or *spin/atom/random* or
|
*density* or *density/disc* or *diameter* or *dihedral* or *dipole*
|
||||||
*spin/electron* or *radius/electron* or
|
or *dipole/random* or *dpd/theta* or *edpd/cv* or *edpd/temp* or
|
||||||
*quat* or *quat/random* or *diameter* or *shape* or *length* or *tri* or
|
*epsilon* or *image* or *improper* or *length* or *mass* or *mol* or
|
||||||
*theta* or *theta/random* or *angmom* or *omega* or
|
*omega* or *quat* or *quat/random* or *radius/electron* or *shape* or
|
||||||
*mass* or *density* or *density/disc* or *temperature* or
|
*smd/contact/radius* or *smd/mass/density* or *sph/cv* or *sph/e* or
|
||||||
*volume* or *image* or *bond* or *angle* or *dihedral* or
|
*sph/rho* or *spin/atom* or *spin/atom/random* or *spin/electron* or
|
||||||
*improper* or *sph/e* or *sph/cv* or *sph/rho* or
|
*temperature* or *theta* or *theta/random* or *tri* or *type* or
|
||||||
*smd/contact/radius* or *smd/mass/density* or *dpd/theta* or
|
*type/fraction* or *type/ratio* or *type/subset* or *volume* or *vx*
|
||||||
*edpd/temp* or *edpd/cv* or *cc* or *epsilon* or
|
or *vy* or *vz* or *x* or *y* or *z* or *i_name* or *d_name* or
|
||||||
*i_name* or *d_name* or *i2_name* or *d2_name*
|
*i2_name* or *d2_name*
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
|
*angle* value = numeric angle type or angle type label, for all angles between selected atoms
|
||||||
|
*angmom* values = Lx Ly Lz
|
||||||
|
Lx,Ly,Lz = components of angular momentum vector (distance-mass-velocity units)
|
||||||
|
any of Lx,Ly,Lz can be an atom-style variable (see below)
|
||||||
|
*bond* value = numeric bond type or bond type label, for all bonds between selected atoms
|
||||||
|
*cc* values = index cc
|
||||||
|
index = index of a chemical species (1 to Nspecies)
|
||||||
|
cc = chemical concentration of tDPD particles for a species (mole/volume units)
|
||||||
|
cc can be an atom-style variable (see below)
|
||||||
|
*charge* value = atomic charge (charge units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*density* value = particle density for a sphere or ellipsoid (mass/distance\^3 units), or for a triangle (mass/distance\^2 units) or line (mass/distance units) particle
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*density/disc* value = particle density for a 2d disc or ellipse (mass/distance\^2 units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*diameter* value = diameter of spherical particle (distance units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*dihedral* value = numeric dihedral type or dihedral type label, for all dihedrals between selected atoms
|
||||||
|
*dipole* values = x y z
|
||||||
|
x,y,z = orientation of dipole moment vector
|
||||||
|
any of x,y,z can be an atom-style variable (see below)
|
||||||
|
*dipole/random* values = seed Dlen
|
||||||
|
seed = random # seed (positive integer) for dipole moment orientations
|
||||||
|
Dlen = magnitude of dipole moment (dipole units)
|
||||||
|
*dpd/theta* value = internal temperature of DPD particles (temperature units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
value can be NULL which sets internal temp of each particle to KE temp
|
||||||
|
*edpd/cv* value = volumetric heat capacity of eDPD particles (energy/temperature/volume units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*edpd/temp* value = temperature of eDPD particles (temperature units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*epsilon* value = dielectric constant of the medium where the atoms reside
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*image* values = nx ny nz
|
||||||
|
nx,ny,nz = which periodic image of the simulation box the atom is in
|
||||||
|
any of nx,ny,nz can be an atom-style variable (see below)
|
||||||
|
*improper* value = numeric improper type or improper type label, for all impropers between selected atoms
|
||||||
|
*length* value = len
|
||||||
|
len = length of line segment (distance units)
|
||||||
|
len can be an atom-style variable (see below)
|
||||||
|
*mass* value = per-atom mass (mass units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*mol* value = molecule ID
|
||||||
|
the moleclue ID can be an atom-style variable (see below)
|
||||||
|
*omega* values = Wx Wy Wz
|
||||||
|
Wx,Wy,Wz = components of angular velocity vector (radians/time units)
|
||||||
|
any of Wx,Wy,Wz can be an atom-style variable (see below)
|
||||||
|
*quat* values = a b c theta
|
||||||
|
a,b,c = unit vector to rotate particle around via right-hand rule
|
||||||
|
theta = rotation angle (degrees)
|
||||||
|
any of a,b,c,theta values can be an atom-style variable (see below)
|
||||||
|
*quat/random* value = seed
|
||||||
|
seed = random # seed (positive integer) for quaternion orientations
|
||||||
|
*radius/electron* value = eradius
|
||||||
|
eradius = electron radius (or fixed-core radius) (distance units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*shape* values = Sx Sy Sz
|
||||||
|
Sx,Sy,Sz = 3 diameters of ellipsoid (distance units)
|
||||||
|
any of Sx,Sy,Sz can be an atom-style variable (see below)
|
||||||
|
*smd/contact/radius* value = radius for short range interactions, i.e. contact and friction
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*smd/mass/density* value = set particle mass based on volume by providing a mass density
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*sph/cv* value = heat capacity of SPH particles (need units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*sph/e* value = energy of SPH particles (need units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*sph/rho* value = density of SPH particles (need units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*spin/atom* values = g x y z
|
||||||
|
g = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
||||||
|
x,y,z = orientation of magnetic spin vector
|
||||||
|
any of x,y,z can be an atom-style variable (see below)
|
||||||
|
*spin/atom/random* values = seed Dlen
|
||||||
|
seed = random # seed (positive integer) for magnetic spin orientations
|
||||||
|
Dlen = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
||||||
|
*spin/electron* value = espin
|
||||||
|
espin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*temperature* value = temperature for finite-size particles (temperature units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*theta* value = angle (degrees)
|
||||||
|
angle = orientation of line segment with respect to x-axis
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
*theta/random* value = seed
|
||||||
|
seed = random # seed (positive integer) for line segment orienations
|
||||||
|
*tri* value = side
|
||||||
|
side = side length of equilateral triangle (distance units)
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
*type* value = numeric atom type or type label
|
*type* value = numeric atom type or type label
|
||||||
value can be an atom-style variable (see below)
|
value can be an atom-style variable (see below)
|
||||||
*type/fraction* values = type fraction seed
|
*type/fraction* values = type fraction seed
|
||||||
@ -51,104 +140,22 @@ Syntax
|
|||||||
type = numeric atom type or type label
|
type = numeric atom type or type label
|
||||||
Nsubset = exact number of selected atoms to set to new atom type
|
Nsubset = exact number of selected atoms to set to new atom type
|
||||||
seed = random # seed (positive integer)
|
seed = random # seed (positive integer)
|
||||||
*mol* value = molecule ID
|
*volume* value = particle volume for Peridynamic particle (distance\^3 units)
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*x*,\ *y*,\ *z* value = atom coordinate (distance units)
|
|
||||||
value can be an atom-style variable (see below)
|
value can be an atom-style variable (see below)
|
||||||
*vx*,\ *vy*,\ *vz* value = atom velocity (velocity units)
|
*vx*,\ *vy*,\ *vz* value = atom velocity (velocity units)
|
||||||
value can be an atom-style variable (see below)
|
value can be an atom-style variable (see below)
|
||||||
*charge* value = atomic charge (charge units)
|
*x*,\ *y*,\ *z* value = atom coordinate (distance units)
|
||||||
value can be an atom-style variable (see below)
|
value can be an atom-style variable (see below)
|
||||||
*dipole* values = x y z
|
|
||||||
x,y,z = orientation of dipole moment vector
|
|
||||||
any of x,y,z can be an atom-style variable (see below)
|
|
||||||
*dipole/random* value = seed Dlen
|
|
||||||
seed = random # seed (positive integer) for dipole moment orientations
|
|
||||||
Dlen = magnitude of dipole moment (dipole units)
|
|
||||||
*spin/atom* values = g x y z
|
|
||||||
g = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
|
||||||
x,y,z = orientation of magnetic spin vector
|
|
||||||
any of x,y,z can be an atom-style variable (see below)
|
|
||||||
*spin/atom/random* value = seed Dlen
|
|
||||||
seed = random # seed (positive integer) for magnetic spin orientations
|
|
||||||
Dlen = magnitude of magnetic spin vector (in Bohr magneton's unit)
|
|
||||||
*radius/electron* values = eradius
|
|
||||||
eradius = electron radius (or fixed-core radius) (distance units)
|
|
||||||
*spin/electron* value = espin
|
|
||||||
espin = electron spin (+1/-1), 0 = nuclei, 2 = fixed-core, 3 = pseudo-cores (i.e. ECP)
|
|
||||||
*quat* values = a b c theta
|
|
||||||
a,b,c = unit vector to rotate particle around via right-hand rule
|
|
||||||
theta = rotation angle (degrees)
|
|
||||||
any of a,b,c,theta can be an atom-style variable (see below)
|
|
||||||
*quat/random* value = seed
|
|
||||||
seed = random # seed (positive integer) for quaternion orientations
|
|
||||||
*diameter* value = diameter of spherical particle (distance units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*shape* value = Sx Sy Sz
|
|
||||||
Sx,Sy,Sz = 3 diameters of ellipsoid (distance units)
|
|
||||||
*length* value = len
|
|
||||||
len = length of line segment (distance units)
|
|
||||||
len can be an atom-style variable (see below)
|
|
||||||
*tri* value = side
|
|
||||||
side = side length of equilateral triangle (distance units)
|
|
||||||
side can be an atom-style variable (see below)
|
|
||||||
*theta* value = angle (degrees)
|
|
||||||
angle = orientation of line segment with respect to x-axis
|
|
||||||
angle can be an atom-style variable (see below)
|
|
||||||
*theta/random* value = seed
|
|
||||||
seed = random # seed (positive integer) for line segment orienations
|
|
||||||
*angmom* values = Lx Ly Lz
|
|
||||||
Lx,Ly,Lz = components of angular momentum vector (distance-mass-velocity units)
|
|
||||||
any of Lx,Ly,Lz can be an atom-style variable (see below)
|
|
||||||
*omega* values = Wx Wy Wz
|
|
||||||
Wx,Wy,Wz = components of angular velocity vector (radians/time units)
|
|
||||||
any of wx,wy,wz can be an atom-style variable (see below)
|
|
||||||
*mass* value = per-atom mass (mass units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*density* value = particle density for a sphere or ellipsoid (mass/distance\^3 units), or for a triangle (mass/distance\^2 units) or line (mass/distance units) particle
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*density/disc* value = particle density for a 2d disc or ellipse (mass/distance\^2 units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*temperature* value = temperature for finite-size particles (temperature units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*volume* value = particle volume for Peridynamic particle (distance\^3 units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*image* nx ny nz
|
|
||||||
nx,ny,nz = which periodic image of the simulation box the atom is in
|
|
||||||
any of nx,ny,nz can be an atom-style variable (see below)
|
|
||||||
*bond* value = numeric bond type or bond type label, for all bonds between selected atoms
|
|
||||||
*angle* value = numeric angle type or angle type label, for all angles between selected atoms
|
|
||||||
*dihedral* value = numeric dihedral type or dihedral type label, for all dihedrals between selected atoms
|
|
||||||
*improper* value = numeric improper type or improper type label, for all impropers between selected atoms
|
|
||||||
*rheo/rho* value = density of RHEO particles (mass/distance\^3)
|
|
||||||
*rheo/status* value = status or phase of RHEO particles (unitless)
|
|
||||||
*sph/e* value = energy of SPH particles (need units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*sph/cv* value = heat capacity of SPH particles (need units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*sph/rho* value = density of SPH particles (need units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*smd/contact/radius* = radius for short range interactions, i.e. contact and friction
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*smd/mass/density* = set particle mass based on volume by providing a mass density
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*dpd/theta* value = internal temperature of DPD particles (temperature units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
value can be NULL which sets internal temp of each particle to KE temp
|
|
||||||
*edpd/temp* value = temperature of eDPD particles (temperature units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*edpd/cv* value = volumetric heat capacity of eDPD particles (energy/temperature/volume units)
|
|
||||||
value can be an atom-style variable (see below)
|
|
||||||
*cc* values = index cc
|
|
||||||
index = index of a chemical species (1 to Nspecies)
|
|
||||||
cc = chemical concentration of tDPD particles for a species (mole/volume units)
|
|
||||||
*epsilon* value = dielectric constant of the medium where the atoms reside
|
|
||||||
*i_name* value = custom integer vector with name
|
*i_name* value = custom integer vector with name
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
*d_name* value = custom floating-point vector with name
|
*d_name* value = custom floating-point vector with name
|
||||||
*i2_name* value = column of a custom integer array with name
|
value can be an atom-style variable (see below)
|
||||||
|
*i2_name* value = custom integer array with name
|
||||||
column specified as i2_name[N] where N is 1 to Ncol
|
column specified as i2_name[N] where N is 1 to Ncol
|
||||||
*d2_name* value = column of a custom floating-point array with name
|
value can be an atom-style variable (see below)
|
||||||
|
*d2_name* value = custom floating-point array with name
|
||||||
column specified as d2_name[N] where N is 1 to Ncol
|
column specified as d2_name[N] where N is 1 to Ncol
|
||||||
|
value can be an atom-style variable (see below)
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
@ -177,22 +184,26 @@ Description
|
|||||||
|
|
||||||
Set one or more properties of one or more atoms. Since atom
|
Set one or more properties of one or more atoms. Since atom
|
||||||
properties are initially assigned by the :doc:`read_data <read_data>`,
|
properties are initially assigned by the :doc:`read_data <read_data>`,
|
||||||
:doc:`read_restart <read_restart>` or :doc:`create_atoms <create_atoms>`
|
:doc:`read_restart <read_restart>` or :doc:`create_atoms
|
||||||
commands, this command changes those assignments. This can be useful
|
<create_atoms>` commands, this command changes those assignments.
|
||||||
for overriding the default values assigned by the
|
This can be useful for overriding the default values assigned by the
|
||||||
:doc:`create_atoms <create_atoms>` command (e.g. charge = 0.0). It can
|
:doc:`create_atoms <create_atoms>` command (e.g. charge = 0.0). It
|
||||||
be useful for altering pairwise and molecular force interactions,
|
can be useful for altering pairwise and molecular force interactions,
|
||||||
since force-field coefficients are defined in terms of types. It can
|
since force-field coefficients are defined in terms of types. It can
|
||||||
be used to change the labeling of atoms by atom type or molecule ID
|
be used to change the labeling of atoms by atom type or molecule ID
|
||||||
when they are output in :doc:`dump <dump>` files. It can also be useful
|
when they are output in :doc:`dump <dump>` files. It can also be
|
||||||
for debugging purposes; i.e. positioning an atom at a precise location
|
useful for debugging purposes; i.e. positioning an atom at a precise
|
||||||
to compute subsequent forces or energy.
|
location to compute subsequent forces or energy.
|
||||||
|
|
||||||
Note that the *style* and *ID* arguments determine which atoms have
|
Note that the *style* and *ID* arguments determine which atoms have
|
||||||
their properties reset. The remaining keywords specify which
|
their properties reset. The remaining keywords specify which
|
||||||
properties to reset and what the new values are. Some strings like
|
properties to reset and what the new values are. Some strings like
|
||||||
*type* or *mol* can be used as a style and/or a keyword.
|
*type* or *mol* can be used as a style and/or a keyword.
|
||||||
|
|
||||||
|
The :doc:`fix set <fix_set>` command can be used with similar syntax
|
||||||
|
to this command to reset atom properties once every *N* steps during a
|
||||||
|
simulation using via atom-style variables.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
This section describes how to select which atoms to change
|
This section describes how to select which atoms to change
|
||||||
@ -211,8 +222,8 @@ can be specified, e.g. "C". The style *mol* selects all the atoms in
|
|||||||
a range of molecule IDs.
|
a range of molecule IDs.
|
||||||
|
|
||||||
In each of the range cases, the range can be specified as a single
|
In each of the range cases, the range can be specified as a single
|
||||||
numeric value, or a wildcard asterisk can be used to specify a range
|
numeric value, or with a wildcard asterisk to specify a range of
|
||||||
of values. This takes the form "\*" or "\*n" or "n\*" or "m\*n". For
|
values. This takes the form "\*" or "\*n" or "n\*" or "m\*n". For
|
||||||
example, for the style *type*, if N = the number of atom types, then
|
example, for the style *type*, if N = the number of atom types, then
|
||||||
an asterisk with no numeric values means all types from 1 to N. A
|
an asterisk with no numeric values means all types from 1 to N. A
|
||||||
leading asterisk means all types from 1 to n (inclusive). A trailing
|
leading asterisk means all types from 1 to n (inclusive). A trailing
|
||||||
@ -222,25 +233,25 @@ means all types from m to n (inclusive). For all the styles except
|
|||||||
|
|
||||||
The style *group* selects all the atoms in the specified group. The
|
The style *group* selects all the atoms in the specified group. The
|
||||||
style *region* selects all the atoms in the specified geometric
|
style *region* selects all the atoms in the specified geometric
|
||||||
region. See the :doc:`group <group>` and :doc:`region <region>` commands
|
region. See the :doc:`group <group>` and :doc:`region <region>`
|
||||||
for details of how to specify a group or region.
|
commands for details of how to specify a group or region.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
This section describes the keyword options for which properties to
|
The next section describes the keyword options for which properties to
|
||||||
change, for the selected atoms.
|
change, for the selected atoms.
|
||||||
|
|
||||||
Note that except where explicitly prohibited below, all of the
|
Note that except where explicitly prohibited below, all of the
|
||||||
keywords allow an :doc:`atom-style or atomfile-style variable
|
keywords allow an :doc:`atom-style or atomfile-style variable
|
||||||
<variable>` to be used as the specified value(s). If the value is a
|
<variable>` to be used as the specified value(s). If the value is a
|
||||||
variable, it should be specified as v_name, where name is the
|
variable, it should be specified as v_name, where name is the variable
|
||||||
variable name. In this case, the variable will be evaluated, and its
|
name. In this case, the variable will be evaluated, and its resulting
|
||||||
resulting per-atom value used to determine the value assigned to each
|
per-atom value used to determine the value assigned to each selected
|
||||||
selected atom. Note that the per-atom value from the variable will be
|
atom. Note that the per-atom value from the variable will be ignored
|
||||||
ignored for atoms that are not selected via the *style* and *ID*
|
for atoms that are not selected via the *style* and *ID* settings
|
||||||
settings explained above. A simple way to use per-atom values from
|
explained above. A simple way to use per-atom values from the
|
||||||
the variable to reset a property for all atoms is to use style *atom*
|
variable to reset a property for all atoms is to use style *atom* with
|
||||||
with *ID* = "\*"; this selects all atom IDs.
|
*ID* = "\*"; this selects all atom IDs.
|
||||||
|
|
||||||
Atom-style variables can specify formulas with various mathematical
|
Atom-style variables can specify formulas with various mathematical
|
||||||
functions, and include :doc:`thermo_style <thermo_style>` command
|
functions, and include :doc:`thermo_style <thermo_style>` command
|
||||||
@ -256,52 +267,110 @@ from a file.
|
|||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Atom-style and atomfile-style variables return floating point
|
Atom-style and atomfile-style variables return floating point
|
||||||
per-atom values. If the values are assigned to an integer variable,
|
per-atom values. If the values are assigned to an integer
|
||||||
such as the molecule ID, then the floating point value is truncated to
|
variable, such as the molecule ID, then the floating point value is
|
||||||
its integer portion, e.g. a value of 2.6 would become 2.
|
truncated to its integer portion, e.g. a value of 2.6 would
|
||||||
|
become 2.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
.. versionchanged:: 28Mar2023
|
.. versionchanged:: 28Mar2023
|
||||||
|
|
||||||
Support for type labels was added for setting atom, bond, angle,
|
Support for type labels was added for setting angle types
|
||||||
dihedral, and improper types
|
|
||||||
|
|
||||||
Keyword *type* sets the atom type for all selected atoms. A specified
|
Keyword *angle* sets the angle type of all angles of selected atoms to
|
||||||
value can be either a numeric atom type or an atom type label. When
|
the specified value. The value can be a numeric type from 1 to
|
||||||
using a numeric type, the specified value must be from 1 to ntypes,
|
nangletypes. Or it can be a angle type label. See the :doc:`Howto
|
||||||
where ntypes was set by the :doc:`create_box <create_box>` command or
|
type labels <Howto_type_labels>` doc page for the allowed syntax of
|
||||||
the *atom types* field in the header of the data file read by the
|
type labels and a general discussion of how type labels can be used.
|
||||||
:doc:`read_data <read_data>` command. When using a type label it must
|
All atoms in a particular angle must be selected atoms in order for
|
||||||
have been defined previously. See the :doc:`Howto type labels
|
the change to be made. The value of nangletypes was set by the *angle
|
||||||
<Howto_type_labels>` doc page for the allowed syntax of type labels
|
types* field in the header of the data file read by the
|
||||||
and a general discussion of how type labels can be used.
|
:doc:`read_data <read_data>` command. This keyword does NOT allow use
|
||||||
|
of an atom-style variable.
|
||||||
|
|
||||||
Keyword *type/fraction* sets the atom type for a fraction of the selected
|
Keyword *angmom* sets the angular momentum of selected atoms. The
|
||||||
atoms. The actual number of atoms changed is not guaranteed
|
particles must be ellipsoids as defined by the :doc:`atom_style
|
||||||
to be exactly the specified fraction (0 <= *fraction* <= 1), but
|
ellipsoid <atom_style>` command or triangles as defined by the
|
||||||
should be statistically close. Random numbers are used in such a way
|
:doc:`atom_style tri <atom_style>` command. The angular momentum
|
||||||
that a particular atom is changed or not changed, regardless of how
|
vector of the particles is set to the 3 specified components.
|
||||||
many processors are being used. This keyword does not allow use of an
|
|
||||||
atom-style variable.
|
|
||||||
|
|
||||||
Keywords *type/ratio* and *type/subset* also set the atom type for a
|
.. versionchanged:: 28Mar2023
|
||||||
fraction of the selected atoms. The actual number of atoms changed
|
|
||||||
will be exactly the requested number. For *type/ratio* the specified
|
|
||||||
fraction (0 <= *fraction* <= 1) determines the number. For
|
|
||||||
*type/subset*, the specified *Nsubset* is the number. An iterative
|
|
||||||
algorithm is used which ensures the correct number of atoms are
|
|
||||||
selected, in a perfectly random fashion. Which atoms are selected
|
|
||||||
will change with the number of processors used. These keywords do not
|
|
||||||
allow use of an atom-style variable.
|
|
||||||
|
|
||||||
Keyword *mol* sets the molecule ID for all selected atoms. The
|
Support for type labels was added for setting bond types
|
||||||
:doc:`atom style <atom_style>` being used must support the use of
|
|
||||||
molecule IDs.
|
|
||||||
|
|
||||||
Keywords *x*, *y*, *z*, and *charge* set the coordinates or
|
Keyword *bond* sets the bond type of all bonds of selected atoms to
|
||||||
charge of all selected atoms. For *charge*, the :doc:`atom style
|
the specified value. The value can be a numeric type from 1 to
|
||||||
<atom_style>` being used must support the use of atomic
|
nbondtypes. Or it can be a bond type label. See the :doc:`Howto type
|
||||||
charge. Keywords *vx*, *vy*, and *vz* set the velocities of all
|
labels <Howto_type_labels>` doc page for the allowed syntax of type
|
||||||
selected atoms.
|
labels and a general discussion of how type labels can be used. All
|
||||||
|
atoms in a particular bond must be selected atoms in order for the
|
||||||
|
change to be made. The value of nbondtypes was set by the *bond
|
||||||
|
types* field in the header of the data file read by the
|
||||||
|
:doc:`read_data <read_data>` command. This keyword does NOT allow use
|
||||||
|
of an atom-style variable.
|
||||||
|
|
||||||
|
Keyword *cc* sets the chemical concentration of a tDPD particle for a
|
||||||
|
specified species as defined by the DPD-MESO package. Currently, only
|
||||||
|
:doc:`atom_style tdpd <atom_style>` defines particles with this
|
||||||
|
attribute. An integer for "index" selects a chemical species (1 to
|
||||||
|
Nspecies) where Nspecies is set by the atom_style command. The value
|
||||||
|
for the chemical concentration must be >= 0.0.
|
||||||
|
|
||||||
|
Keyword *charge* set the charge of all selected atoms. The :doc:`atom
|
||||||
|
style <atom_style>` being used must support the use of atomic charge.
|
||||||
|
|
||||||
|
Keyword *density* or *density/disc* also sets the mass of all selected
|
||||||
|
particles, but in a different way. The particles must have a per-atom
|
||||||
|
mass attribute, as defined by the :doc:`atom_style <atom_style>`
|
||||||
|
command. If the atom has a radius attribute (see :doc:`atom_style
|
||||||
|
sphere <atom_style>`) and its radius is non-zero, its mass is set from
|
||||||
|
the density and particle volume for 3d systems (the input density is
|
||||||
|
assumed to be in mass/distance\^3 units). For 2d, the default is for
|
||||||
|
LAMMPS to model particles with a radius attribute as spheres.
|
||||||
|
However, if the *density/disc* keyword is used, then they can be
|
||||||
|
modeled as 2d discs (circles). Their mass is set from the density and
|
||||||
|
particle area (the input density is assumed to be in mass/distance\^2
|
||||||
|
units).
|
||||||
|
|
||||||
|
If the atom has a shape attribute (see :doc:`atom_style ellipsoid
|
||||||
|
<atom_style>`) and its 3 shape parameters are non-zero, then its mass
|
||||||
|
is set from the density and particle volume (the input density is
|
||||||
|
assumed to be in mass/distance\^3 units). The *density/disc* keyword
|
||||||
|
has no effect; it does not (yet) treat 3d ellipsoids as 2d ellipses.
|
||||||
|
|
||||||
|
If the atom has a length attribute (see :doc:`atom_style line
|
||||||
|
<atom_style>`) and its length is non-zero, then its mass is set from
|
||||||
|
the density and line segment length (the input density is assumed to
|
||||||
|
be in mass/distance units). If the atom has an area attribute (see
|
||||||
|
:doc:`atom_style tri <atom_style>`) and its area is non-zero, then its
|
||||||
|
mass is set from the density and triangle area (the input density is
|
||||||
|
assumed to be in mass/distance\^2 units).
|
||||||
|
|
||||||
|
If none of these cases are valid, then the mass is set to the density
|
||||||
|
value directly (the input density is assumed to be in mass units).
|
||||||
|
|
||||||
|
Keyword *diameter* sets the size of the selected atoms. The particles
|
||||||
|
must be finite-size spheres as defined by the :doc:`atom_style sphere
|
||||||
|
<atom_style>` command. The diameter of a particle can be set to 0.0,
|
||||||
|
which means they will be treated as point particles. Note that this
|
||||||
|
command does not adjust the particle mass, even if it was defined with
|
||||||
|
a density, e.g. via the :doc:`read_data <read_data>` command.
|
||||||
|
|
||||||
|
.. versionchanged:: 28Mar2023
|
||||||
|
|
||||||
|
Support for type labels was added for setting dihedral types
|
||||||
|
|
||||||
|
Keyword *dihedral* sets the dihedral type of all dihedrals of selected
|
||||||
|
atoms to the specified value. The value can be a numeric type from 1
|
||||||
|
to ndihedraltypes. Or it can be a dihedral type label. See the
|
||||||
|
:doc:`Howto type labels <Howto_type_labels>` doc page for the allowed
|
||||||
|
syntax of type labels and a general discussion of how type labels can
|
||||||
|
be used. All atoms in a particular dihedral must be selected atoms in
|
||||||
|
order for the change to be made. The value of ndihedraltypes was set
|
||||||
|
by the *dihedral types* field in the header of the data file read by
|
||||||
|
the :doc:`read_data <read_data>` command. This keyword does NOT allow
|
||||||
|
use of an atom-style variable.
|
||||||
|
|
||||||
Keyword *dipole* uses the specified x,y,z values as components of a
|
Keyword *dipole* uses the specified x,y,z values as components of a
|
||||||
vector to set as the orientation of the dipole moment vectors of the
|
vector to set as the orientation of the dipole moment vectors of the
|
||||||
@ -313,40 +382,106 @@ moment vectors for the selected atoms and sets the magnitude of each
|
|||||||
to the specified *Dlen* value. For 2d systems, the z component of the
|
to the specified *Dlen* value. For 2d systems, the z component of the
|
||||||
orientation is set to 0.0. Random numbers are used in such a way that
|
orientation is set to 0.0. Random numbers are used in such a way that
|
||||||
the orientation of a particular atom is the same, regardless of how
|
the orientation of a particular atom is the same, regardless of how
|
||||||
many processors are being used. This keyword does not allow use of an
|
many processors are being used. This keyword does NOT allow use of an
|
||||||
atom-style variable.
|
atom-style variable.
|
||||||
|
|
||||||
.. versionchanged:: 15Sep2022
|
Keyword *dpd/theta* sets the internal temperature of a DPD particle as
|
||||||
|
defined by the DPD-REACT package. If the specified value is a number
|
||||||
|
it must be >= 0.0. If the specified value is NULL, then the kinetic
|
||||||
|
temperature Tkin of each particle is computed as 3/2 k Tkin = KE = 1/2
|
||||||
|
m v\^2 = 1/2 m (vx\*vx+vy\*vy+vz\*vz). Each particle's internal
|
||||||
|
temperature is set to Tkin. If the specified value is an atom-style
|
||||||
|
variable, then the variable is evaluated for each particle. If a
|
||||||
|
value >= 0.0, the internal temperature is set to that value. If it is
|
||||||
|
< 0.0, the computation of Tkin is performed and the internal
|
||||||
|
temperature is set to that value.
|
||||||
|
|
||||||
Keyword *spin/atom* uses the specified g value to set the magnitude of the
|
Keywords *edpd/temp* and *edpd/cv* set the temperature and volumetric
|
||||||
magnetic spin vectors, and the x,y,z values as components of a vector
|
heat capacity of an eDPD particle as defined by the DPD-MESO package.
|
||||||
to set as the orientation of the magnetic spin vectors of the selected
|
Currently, only :doc:`atom_style edpd <atom_style>` defines particles
|
||||||
atoms. This keyword was previously called *spin*.
|
with these attributes. The values for the temperature and heat
|
||||||
|
capacity must be positive.
|
||||||
|
|
||||||
.. versionchanged:: 15Sep2022
|
Keyword *epsilon* sets the dielectric constant of a particle to be
|
||||||
|
that of the medium where the particle resides as defined by the
|
||||||
|
DIELECTRIC package. Currently, only :doc:`atom_style dielectric
|
||||||
|
<atom_style>` defines particles with this attribute. The value for the
|
||||||
|
dielectric constant must be >= 0.0. Note that the set command with
|
||||||
|
this keyword will rescale the particle charge accordingly so that the
|
||||||
|
real charge (e.g., as read from a data file) stays intact. To change
|
||||||
|
the real charges, one needs to use the set command with the *charge*
|
||||||
|
keyword. Care must be taken to ensure that the real and scaled charges
|
||||||
|
and the dielectric constants are consistent.
|
||||||
|
|
||||||
Keyword *spin/atom/random* randomizes the orientation of the magnetic spin
|
Keyword *image* sets which image of the simulation box the atom is
|
||||||
vectors for the selected atoms and sets the magnitude of each to the
|
considered to be in. An image of 0 means it is inside the box as
|
||||||
specified *Dlen* value. This keyword was previously called *spin/random*.
|
defined. A value of 2 means add 2 box lengths to get the true value.
|
||||||
|
A value of -1 means subtract 1 box length to get the true value.
|
||||||
|
LAMMPS updates these flags as atoms cross periodic boundaries during
|
||||||
|
the simulation. The flags can be output with atom snapshots via the
|
||||||
|
:doc:`dump <dump>` command. If a value of NULL is specified for any
|
||||||
|
of nx,ny,nz, then the current image value for that dimension is
|
||||||
|
unchanged. For non-periodic dimensions only a value of 0 can be
|
||||||
|
specified. This command can be useful after a system has been
|
||||||
|
equilibrated and atoms have diffused one or more box lengths in
|
||||||
|
various directions. This command can then reset the image values for
|
||||||
|
atoms so that they are effectively inside the simulation box, e.g if a
|
||||||
|
diffusion coefficient is about to be measured via the :doc:`compute
|
||||||
|
msd <compute_msd>` command. Care should be taken not to reset the
|
||||||
|
image flags of two atoms in a bond to the same value if the bond
|
||||||
|
straddles a periodic boundary (rather they should be different by +/-
|
||||||
|
1). This will not affect the dynamics of a simulation, but may mess
|
||||||
|
up analysis of the trajectories if a LAMMPS diagnostic or your own
|
||||||
|
analysis relies on the image flags to unwrap a molecule which
|
||||||
|
straddles the periodic box.
|
||||||
|
|
||||||
.. versionadded:: 15Sep2022
|
.. versionchanged:: 28Mar2023
|
||||||
|
|
||||||
Keyword *radius/electron* uses the specified value to set the radius of
|
Support for type labels was added for setting improper types
|
||||||
electrons or fixed cores.
|
|
||||||
|
|
||||||
.. versionadded:: 15Sep2022
|
Keyword *improper* sets the improper type of all impropers of selected
|
||||||
|
atoms to the specified value. The value can be a numeric type from 1
|
||||||
|
to nimpropertypes. Or it can be a improper type label. See the
|
||||||
|
:doc:`Howto type labels <Howto_type_labels>` doc page for the allowed
|
||||||
|
syntax of type labels and a general discussion of how type labels can
|
||||||
|
be used. All atoms in a particular improper must be selected atoms in
|
||||||
|
order for the change to be made. The value of nimpropertypes was set
|
||||||
|
by the *improper types* field in the header of the data file read by
|
||||||
|
the :doc:`read_data <read_data>` command. This keyword does NOT allow
|
||||||
|
use of an atom-style variable.
|
||||||
|
|
||||||
Keyword *spin/electron* sets the spin of an electron (+/- 1) or indicates
|
Keyword *length* sets the length of selected atoms. The particles
|
||||||
nuclei (=0), fixed-cores (=2), or pseudo-cores (= 3).
|
must be line segments as defined by the :doc:`atom_style line
|
||||||
|
<atom_style>` command. If the specified value is non-zero the line
|
||||||
|
segment is (re)set to a length = the specified value, centered around
|
||||||
|
the particle position, with an orientation along the x-axis. If the
|
||||||
|
specified value is 0.0, the particle will become a point particle.
|
||||||
|
Note that this command does not adjust the particle mass, even if it
|
||||||
|
was defined with a density, e.g. via the :doc:`read_data <read_data>`
|
||||||
|
command.
|
||||||
|
|
||||||
|
Keyword *mass* sets the mass of all selected particles. The particles
|
||||||
|
must have a per-atom mass attribute, as defined by the
|
||||||
|
:doc:`atom_style <atom_style>` command. See the "mass" command for
|
||||||
|
how to set mass values on a per-type basis.
|
||||||
|
|
||||||
|
Keyword *mol* sets the molecule ID for all selected atoms. The
|
||||||
|
:doc:`atom style <atom_style>` being used must support the use of
|
||||||
|
molecule IDs.
|
||||||
|
|
||||||
|
Keyword *omega* sets the angular velocity of selected atoms. The
|
||||||
|
particles must be spheres as defined by the :doc:`atom_style sphere
|
||||||
|
<atom_style>` command. The angular velocity vector of the particles
|
||||||
|
is set to the 3 specified components.
|
||||||
|
|
||||||
Keyword *quat* uses the specified values to create a quaternion
|
Keyword *quat* uses the specified values to create a quaternion
|
||||||
(4-vector) that represents the orientation of the selected atoms. The
|
(4-vector) that represents the orientation of the selected atoms. The
|
||||||
particles must define a quaternion for their orientation
|
particles must define a quaternion for their orientation
|
||||||
(e.g. ellipsoids, triangles, body particles) as defined by the
|
(e.g. ellipsoids, triangles, body particles) as defined by the
|
||||||
:doc:`atom_style <atom_style>` command. Note that particles defined by
|
:doc:`atom_style <atom_style>` command. Note that particles defined
|
||||||
:doc:`atom_style ellipsoid <atom_style>` have 3 shape parameters. The 3
|
by :doc:`atom_style ellipsoid <atom_style>` have 3 shape parameters.
|
||||||
values must be non-zero for each particle set by this command. They
|
The 3 values must be non-zero for each particle set by this command.
|
||||||
are used to specify the aspect ratios of an ellipsoidal particle,
|
They are used to specify the aspect ratios of an ellipsoidal particle,
|
||||||
which is oriented by default with its x-axis along the simulation
|
which is oriented by default with its x-axis along the simulation
|
||||||
box's x-axis, and similarly for y and z. If this body is rotated (via
|
box's x-axis, and similarly for y and z. If this body is rotated (via
|
||||||
the right-hand rule) by an angle theta around a unit rotation vector
|
the right-hand rule) by an angle theta around a unit rotation vector
|
||||||
@ -360,51 +495,77 @@ ignored, since a rotation vector of (0,0,1) is the only valid choice.
|
|||||||
Keyword *quat/random* randomizes the orientation of the quaternion for
|
Keyword *quat/random* randomizes the orientation of the quaternion for
|
||||||
the selected atoms. The particles must define a quaternion for their
|
the selected atoms. The particles must define a quaternion for their
|
||||||
orientation (e.g. ellipsoids, triangles, body particles) as defined by
|
orientation (e.g. ellipsoids, triangles, body particles) as defined by
|
||||||
the :doc:`atom_style <atom_style>` command. Random numbers are used in
|
the :doc:`atom_style <atom_style>` command. Random numbers are used
|
||||||
such a way that the orientation of a particular atom is the same,
|
in such a way that the orientation of a particular atom is the same,
|
||||||
regardless of how many processors are being used. For 2d systems,
|
regardless of how many processors are being used. For 2d systems,
|
||||||
only orientations in the xy plane are generated. As with keyword
|
only orientations in the xy plane are generated. As with keyword
|
||||||
*quat*, for ellipsoidal particles, the 3 shape values must be non-zero
|
*quat*, for ellipsoidal particles, the 3 shape values must be non-zero
|
||||||
for each particle set by this command. This keyword does not allow
|
for each particle set by this command. This keyword does NOT allow
|
||||||
use of an atom-style variable.
|
use of an atom-style variable.
|
||||||
|
|
||||||
Keyword *diameter* sets the size of the selected atoms. The particles
|
.. versionadded:: 15Sep2022
|
||||||
must be finite-size spheres as defined by the :doc:`atom_style sphere
|
|
||||||
<atom_style>` command. The diameter of a particle can be set to 0.0,
|
Keyword *radius/electron* uses the specified value to set the radius
|
||||||
which means they will be treated as point particles. Note that this
|
of electrons or fixed cores.
|
||||||
command does not adjust the particle mass, even if it was defined with
|
|
||||||
a density, e.g. via the :doc:`read_data <read_data>` command.
|
|
||||||
|
|
||||||
Keyword *shape* sets the size and shape of the selected atoms. The
|
Keyword *shape* sets the size and shape of the selected atoms. The
|
||||||
particles must be ellipsoids as defined by the :doc:`atom_style
|
particles must be ellipsoids as defined by the :doc:`atom_style
|
||||||
ellipsoid <atom_style>` command. The *Sx*, *Sy*, *Sz* settings
|
ellipsoid <atom_style>` command. The *Sx*, *Sy*, *Sz* settings are
|
||||||
are the 3 diameters of the ellipsoid in each direction. All 3 can be
|
the 3 diameters of the ellipsoid in each direction. All 3 can be set
|
||||||
set to the same value, which means the ellipsoid is effectively a
|
to the same value, which means the ellipsoid is effectively a sphere.
|
||||||
sphere. They can also all be set to 0.0 which means the particle will
|
They can also all be set to 0.0 which means the particle will be
|
||||||
be treated as a point particle. Note that this command does not
|
treated as a point particle. Note that this command does not adjust
|
||||||
adjust the particle mass, even if it was defined with a density,
|
the particle mass, even if it was defined with a density, e.g. via the
|
||||||
e.g. via the :doc:`read_data <read_data>` command.
|
:doc:`read_data <read_data>` command.
|
||||||
|
|
||||||
Keyword *length* sets the length of selected atoms. The particles
|
Keyword *smd/contact/radius* only applies to simulations with the
|
||||||
must be line segments as defined by the :doc:`atom_style line
|
Smooth Mach Dynamics package MACHDYN. Itsets an interaction radius
|
||||||
<atom_style>` command. If the specified value is non-zero the line
|
for computing short-range interactions, e.g. repulsive forces to
|
||||||
segment is (re)set to a length = the specified value, centered around
|
prevent different individual physical bodies from penetrating each
|
||||||
the particle position, with an orientation along the x-axis. If the
|
other. Note that the SPH smoothing kernel diameter used for computing
|
||||||
specified value is 0.0, the particle will become a point particle.
|
long range, nonlocal interactions, is set using the *diameter*
|
||||||
Note that this command does not adjust the particle mass, even if it
|
keyword.
|
||||||
was defined with a density, e.g. via the :doc:`read_data <read_data>`
|
|
||||||
command.
|
|
||||||
|
|
||||||
Keyword *tri* sets the size of selected atoms. The particles must be
|
Keyword *smd/mass/density* sets the mass of all selected particles,
|
||||||
triangles as defined by the :doc:`atom_style tri <atom_style>` command.
|
but it is only applicable to the Smooth Mach Dynamics package MACHDYN.
|
||||||
If the specified value is non-zero the triangle is (re)set to be an
|
It assumes that the particle volume has already been correctly set and
|
||||||
equilateral triangle in the xy plane with side length = the specified
|
calculates particle mass from the provided mass density value.
|
||||||
value, with a centroid at the particle position, with its base
|
|
||||||
parallel to the x axis, and the y-axis running from the center of the
|
Keywords *sph/cv*, *sph/e*, and *sph/rho* set the heat capacity,
|
||||||
base to the top point of the triangle. If the specified value is 0.0,
|
energy, and density of smoothed particle hydrodynamics (SPH)
|
||||||
the particle will become a point particle. Note that this command
|
particles. See `this PDF guide <PDF/SPH_LAMMPS_userguide.pdf>`_ to
|
||||||
does not adjust the particle mass, even if it was defined with a
|
using SPH in LAMMPS.
|
||||||
density, e.g. via the :doc:`read_data <read_data>` command.
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Note that the SPH PDF guide file has not been updated for many
|
||||||
|
years and thus does not reflect the current *syntax* of the SPH
|
||||||
|
package commands. For that, please refer to the LAMMPS manual.
|
||||||
|
|
||||||
|
.. versionchanged:: 15Sep2022
|
||||||
|
|
||||||
|
Keyword *spin/atom* uses the specified g value to set the magnitude of
|
||||||
|
the magnetic spin vectors, and the x,y,z values as components of a
|
||||||
|
vector to set as the orientation of the magnetic spin vectors of the
|
||||||
|
selected atoms. This keyword was previously called *spin*.
|
||||||
|
|
||||||
|
.. versionchanged:: 15Sep2022
|
||||||
|
|
||||||
|
Keyword *spin/atom/random* randomizes the orientation of the magnetic
|
||||||
|
spin vectors for the selected atoms and sets the magnitude of each to
|
||||||
|
the specified *Dlen* value. This keyword does NOT allow use of an
|
||||||
|
atom-style variable. This keyword was previously called
|
||||||
|
*spin/random*.
|
||||||
|
|
||||||
|
.. versionadded:: 15Sep2022
|
||||||
|
|
||||||
|
Keyword *spin/electron* sets the spin of an electron (+/- 1) or
|
||||||
|
indicates nuclei (=0), fixed-cores (=2), or pseudo-cores (= 3).
|
||||||
|
|
||||||
|
Keyword *temperature* sets the temperature of a finite-size particle.
|
||||||
|
Currently, only the GRANULAR package supports this attribute. The
|
||||||
|
temperature must be added using an instance of :doc:`fix property/atom
|
||||||
|
<fix_property_atom>` The values for the temperature must be positive.
|
||||||
|
|
||||||
Keyword *theta* sets the orientation of selected atoms. The particles
|
Keyword *theta* sets the orientation of selected atoms. The particles
|
||||||
must be line segments as defined by the :doc:`atom_style line
|
must be line segments as defined by the :doc:`atom_style line
|
||||||
@ -413,169 +574,71 @@ orientation angle of the line segments with respect to the x axis.
|
|||||||
|
|
||||||
Keyword *theta/random* randomizes the orientation of theta for the
|
Keyword *theta/random* randomizes the orientation of theta for the
|
||||||
selected atoms. The particles must be line segments as defined by the
|
selected atoms. The particles must be line segments as defined by the
|
||||||
:doc:`atom_style line <atom_style>` command. Random numbers are used in
|
:doc:`atom_style line <atom_style>` command. Random numbers are used
|
||||||
such a way that the orientation of a particular atom is the same,
|
in such a way that the orientation of a particular atom is the same,
|
||||||
regardless of how many processors are being used. This keyword does
|
regardless of how many processors are being used. This keyword does
|
||||||
not allow use of an atom-style variable.
|
NOT allow use of an atom-style variable.
|
||||||
|
|
||||||
Keyword *angmom* sets the angular momentum of selected atoms. The
|
Keyword *tri* sets the size of selected atoms. The particles must be
|
||||||
particles must be ellipsoids as defined by the :doc:`atom_style
|
triangles as defined by the :doc:`atom_style tri <atom_style>`
|
||||||
ellipsoid <atom_style>` command or triangles as defined by the
|
command. If the specified value is non-zero the triangle is (re)set
|
||||||
:doc:`atom_style tri <atom_style>` command. The angular momentum
|
to be an equilateral triangle in the xy plane with side length = the
|
||||||
vector of the particles is set to the 3 specified components.
|
specified value, with a centroid at the particle position, with its
|
||||||
|
base parallel to the x axis, and the y-axis running from the center of
|
||||||
|
the base to the top point of the triangle. If the specified value is
|
||||||
|
0.0, the particle will become a point particle. Note that this
|
||||||
|
command does not adjust the particle mass, even if it was defined with
|
||||||
|
a density, e.g. via the :doc:`read_data <read_data>` command.
|
||||||
|
|
||||||
Keyword *omega* sets the angular velocity of selected atoms. The
|
.. versionchanged:: 28Mar2023
|
||||||
particles must be spheres as defined by the :doc:`atom_style sphere
|
|
||||||
<atom_style>` command. The angular velocity vector of the particles is
|
|
||||||
set to the 3 specified components.
|
|
||||||
|
|
||||||
Keyword *mass* sets the mass of all selected particles. The particles
|
Support for type labels was added for setting atom types
|
||||||
must have a per-atom mass attribute, as defined by the :doc:`atom_style
|
|
||||||
<atom_style>` command. See the "mass" command for how to set mass
|
|
||||||
values on a per-type basis.
|
|
||||||
|
|
||||||
Keyword *density* or *density/disc* also sets the mass of all selected
|
Keyword *type* sets the atom type for all selected atoms. A specified
|
||||||
particles, but in a different way. The particles must have a per-atom
|
value can be either a numeric atom type or an atom type label. When
|
||||||
mass attribute, as defined by the :doc:`atom_style <atom_style>`
|
using a numeric type, the specified value must be from 1 to ntypes,
|
||||||
command. If the atom has a radius attribute (see :doc:`atom_style
|
where ntypes was set by the :doc:`create_box <create_box>` command or
|
||||||
sphere <atom_style>`) and its radius is non-zero, its mass is set from
|
the *atom types* field in the header of the data file read by the
|
||||||
the density and particle volume for 3d systems (the input density is
|
:doc:`read_data <read_data>` command. When using a type label it must
|
||||||
assumed to be in mass/distance\^3 units). For 2d, the default is for
|
have been defined previously. See the :doc:`Howto type labels
|
||||||
LAMMPS to model particles with a radius attribute as spheres. However,
|
|
||||||
if the *density/disc* keyword is used, then they can be modeled as 2d
|
|
||||||
discs (circles). Their mass is set from the density and particle area
|
|
||||||
(the input density is assumed to be in mass/distance\^2 units).
|
|
||||||
|
|
||||||
If the atom has a shape attribute (see :doc:`atom_style ellipsoid
|
|
||||||
<atom_style>`) and its 3 shape parameters are non-zero, then its mass is
|
|
||||||
set from the density and particle volume (the input density is assumed
|
|
||||||
to be in mass/distance\^3 units). The *density/disc* keyword has no
|
|
||||||
effect; it does not (yet) treat 3d ellipsoids as 2d ellipses.
|
|
||||||
|
|
||||||
If the atom has a length attribute (see :doc:`atom_style line
|
|
||||||
<atom_style>`) and its length is non-zero, then its mass is set from the
|
|
||||||
density and line segment length (the input density is assumed to be in
|
|
||||||
mass/distance units). If the atom has an area attribute (see
|
|
||||||
:doc:`atom_style tri <atom_style>`) and its area is non-zero, then its
|
|
||||||
mass is set from the density and triangle area (the input density is
|
|
||||||
assumed to be in mass/distance\^2 units).
|
|
||||||
|
|
||||||
If none of these cases are valid, then the mass is set to the density
|
|
||||||
value directly (the input density is assumed to be in mass units).
|
|
||||||
|
|
||||||
Keyword *temperature* sets the temperature of a finite-size particle.
|
|
||||||
Currently, only the GRANULAR package supports this attribute. The
|
|
||||||
temperature must be added using an instance of
|
|
||||||
:doc:`fix property/atom <fix_property_atom>` The values for the
|
|
||||||
temperature must be positive.
|
|
||||||
|
|
||||||
Keyword *volume* sets the volume of all selected particles. Currently,
|
|
||||||
only the :doc:`atom_style peri <atom_style>` command defines particles
|
|
||||||
with a volume attribute. Note that this command does not adjust the
|
|
||||||
particle mass.
|
|
||||||
|
|
||||||
Keyword *image* sets which image of the simulation box the atom is
|
|
||||||
considered to be in. An image of 0 means it is inside the box as
|
|
||||||
defined. A value of 2 means add 2 box lengths to get the true value. A
|
|
||||||
value of -1 means subtract 1 box length to get the true value. LAMMPS
|
|
||||||
updates these flags as atoms cross periodic boundaries during the
|
|
||||||
simulation. The flags can be output with atom snapshots via the
|
|
||||||
:doc:`dump <dump>` command. If a value of NULL is specified for any of
|
|
||||||
nx,ny,nz, then the current image value for that dimension is unchanged.
|
|
||||||
For non-periodic dimensions only a value of 0 can be specified. This
|
|
||||||
command can be useful after a system has been equilibrated and atoms
|
|
||||||
have diffused one or more box lengths in various directions. This
|
|
||||||
command can then reset the image values for atoms so that they are
|
|
||||||
effectively inside the simulation box, e.g if a diffusion coefficient is
|
|
||||||
about to be measured via the :doc:`compute msd <compute_msd>` command.
|
|
||||||
Care should be taken not to reset the image flags of two atoms in a bond
|
|
||||||
to the same value if the bond straddles a periodic boundary (rather they
|
|
||||||
should be different by +/- 1). This will not affect the dynamics of a
|
|
||||||
simulation, but may mess up analysis of the trajectories if a LAMMPS
|
|
||||||
diagnostic or your own analysis relies on the image flags to unwrap a
|
|
||||||
molecule which straddles the periodic box.
|
|
||||||
|
|
||||||
Keywords *bond*, *angle*, *dihedral*, and *improper*, set the bond
|
|
||||||
type (angle type, etc) of all bonds (angles, etc) of selected atoms to
|
|
||||||
the specified value. The value can be a numeric type from 1 to
|
|
||||||
nbondtypes (nangletypes, etc). Or it can be a type label (bond type
|
|
||||||
label, angle type label, etc). See the :doc:`Howto type labels
|
|
||||||
<Howto_type_labels>` doc page for the allowed syntax of type labels
|
<Howto_type_labels>` doc page for the allowed syntax of type labels
|
||||||
and a general discussion of how type labels can be used. All atoms in
|
and a general discussion of how type labels can be used.
|
||||||
a particular bond (angle, etc) must be selected atoms in order for the
|
|
||||||
change to be made. The value of nbondtypes (nangletypes, etc) was set
|
|
||||||
by the *bond types* (\ *angle types*, etc) field in the header of the
|
|
||||||
data file read by the :doc:`read_data <read_data>` command. These
|
|
||||||
keywords do not allow use of an atom-style variable.
|
|
||||||
|
|
||||||
Keywords *rheo/rho* and *rheo/status* set the density and the status of
|
Keyword *type/fraction* sets the atom type for a fraction of the
|
||||||
rheo particles. In particular, one can only set the phase in the status
|
selected atoms. The actual number of atoms changed is not guaranteed
|
||||||
as described by the :doc:`RHEO howto page <Howto_rheo>`.
|
to be exactly the specified fraction (0 <= *fraction* <= 1), but
|
||||||
|
should be statistically close. Random numbers are used in such a way
|
||||||
|
that a particular atom is changed or not changed, regardless of how
|
||||||
|
many processors are being used. This keyword does NOT allow use of an
|
||||||
|
atom-style variable.
|
||||||
|
|
||||||
Keywords *sph/e*, *sph/cv*, and *sph/rho* set the energy, heat capacity,
|
Keywords *type/ratio* and *type/subset* also set the atom type for a
|
||||||
and density of smoothed particle hydrodynamics (SPH) particles. See
|
fraction of the selected atoms. The actual number of atoms changed
|
||||||
`this PDF guide <PDF/SPH_LAMMPS_userguide.pdf>`_ to using SPH in LAMMPS.
|
will be exactly the requested number. For *type/ratio* the specified
|
||||||
|
fraction (0 <= *fraction* <= 1) determines the number. For
|
||||||
|
*type/subset*, the specified *Nsubset* is the number. An iterative
|
||||||
|
algorithm is used which ensures the correct number of atoms are
|
||||||
|
selected, in a perfectly random fashion. Which atoms are selected
|
||||||
|
will change with the number of processors used. These keywords do not
|
||||||
|
allow use of an atom-style variable.
|
||||||
|
|
||||||
.. note::
|
Keyword *volume* sets the volume of all selected particles.
|
||||||
|
Currently, only the :doc:`atom_style peri <atom_style>` command
|
||||||
|
defines particles with a volume attribute. Note that this command
|
||||||
|
does not adjust the particle mass.
|
||||||
|
|
||||||
Please note that the SPH PDF guide file has not been updated for
|
Keywords *vx*, *vy*, and *vz* set the velocities of all selected
|
||||||
many years and thus does not reflect the current *syntax* of the
|
atoms.
|
||||||
SPH package commands. For that please refer to the LAMMPS manual.
|
|
||||||
|
|
||||||
Keyword *smd/mass/density* sets the mass of all selected particles, but
|
Keywords *x*, *y*, *z* set the coordinates of all selected atoms.
|
||||||
it is only applicable to the Smooth Mach Dynamics package MACHDYN. It
|
|
||||||
assumes that the particle volume has already been correctly set and
|
|
||||||
calculates particle mass from the provided mass density value.
|
|
||||||
|
|
||||||
Keyword *smd/contact/radius* only applies to simulations with the Smooth
|
|
||||||
Mach Dynamics package MACHDYN. Itsets an interaction radius for
|
|
||||||
computing short-range interactions, e.g. repulsive forces to prevent
|
|
||||||
different individual physical bodies from penetrating each other. Note
|
|
||||||
that the SPH smoothing kernel diameter used for computing long range,
|
|
||||||
nonlocal interactions, is set using the *diameter* keyword.
|
|
||||||
|
|
||||||
Keyword *dpd/theta* sets the internal temperature of a DPD particle as
|
|
||||||
defined by the DPD-REACT package. If the specified value is a number it
|
|
||||||
must be >= 0.0. If the specified value is NULL, then the kinetic
|
|
||||||
temperature Tkin of each particle is computed as 3/2 k Tkin = KE = 1/2 m
|
|
||||||
v\^2 = 1/2 m (vx\*vx+vy\*vy+vz\*vz). Each particle's internal
|
|
||||||
temperature is set to Tkin. If the specified value is an atom-style
|
|
||||||
variable, then the variable is evaluated for each particle. If a value
|
|
||||||
>= 0.0, the internal temperature is set to that value. If it is < 0.0,
|
|
||||||
the computation of Tkin is performed and the internal temperature is set
|
|
||||||
to that value.
|
|
||||||
|
|
||||||
Keywords *edpd/temp* and *edpd/cv* set the temperature and volumetric
|
|
||||||
heat capacity of an eDPD particle as defined by the DPD-MESO package.
|
|
||||||
Currently, only :doc:`atom_style edpd <atom_style>` defines particles
|
|
||||||
with these attributes. The values for the temperature and heat capacity
|
|
||||||
must be positive.
|
|
||||||
|
|
||||||
Keyword *cc* sets the chemical concentration of a tDPD particle for a
|
|
||||||
specified species as defined by the DPD-MESO package. Currently, only
|
|
||||||
:doc:`atom_style tdpd <atom_style>` defines particles with this
|
|
||||||
attribute. An integer for "index" selects a chemical species (1 to
|
|
||||||
Nspecies) where Nspecies is set by the atom_style command. The value for
|
|
||||||
the chemical concentration must be >= 0.0.
|
|
||||||
|
|
||||||
Keyword *epsilon* sets the dielectric constant of a particle, precisely
|
|
||||||
of the medium where the particle resides as defined by the DIELECTRIC
|
|
||||||
package. Currently, only :doc:`atom_style dielectric <atom_style>`
|
|
||||||
defines particles with this attribute. The value for the dielectric
|
|
||||||
constant must be >= 0.0. Note that the set command with this keyword
|
|
||||||
will rescale the particle charge accordingly so that the real charge
|
|
||||||
(e.g., as read from a data file) stays intact. To change the real
|
|
||||||
charges, one needs to use the set command with the *charge*
|
|
||||||
keyword. Care must be taken to ensure that the real and scaled charges,
|
|
||||||
and dielectric constants are consistent.
|
|
||||||
|
|
||||||
Keywords *i_name*, *d_name*, *i2_name*, *d2_name* refer to custom
|
Keywords *i_name*, *d_name*, *i2_name*, *d2_name* refer to custom
|
||||||
per-atom integer and floating-point vectors or arrays that have been
|
per-atom integer and floating-point vectors or arrays that have been
|
||||||
added via the :doc:`fix property/atom <fix_property_atom>` command.
|
added via the :doc:`fix property/atom <fix_property_atom>` command.
|
||||||
When that command is used specific names are given to each attribute
|
When that command is used specific names are given to each attribute
|
||||||
which are the "name" portion of these keywords. For arrays *i2_name*
|
which are the "name" portion of these keywords. For arrays *i2_name*
|
||||||
and *d2_name*, the column of the array must also be included following
|
and *d2_name*, the column of the array to set must also be included
|
||||||
the name in brackets: e.g. d2_xyz[2], i2_mySpin[3].
|
following the name in brackets: e.g. d2_xyz[2] or i2_mySpin[3].
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
@ -584,7 +647,7 @@ You cannot set an atom attribute (e.g. *mol* or *q* or *volume*\ ) if
|
|||||||
the :doc:`atom_style <atom_style>` does not have that attribute.
|
the :doc:`atom_style <atom_style>` does not have that attribute.
|
||||||
|
|
||||||
This command requires inter-processor communication to coordinate the
|
This command requires inter-processor communication to coordinate the
|
||||||
setting of bond types (angle types, etc). This means that your system
|
setting of bond types (angle types, etc). This means that the system
|
||||||
must be ready to perform a simulation before using one of these
|
must be ready to perform a simulation before using one of these
|
||||||
keywords (force fields set, atom mass set, etc). This is not
|
keywords (force fields set, atom mass set, etc). This is not
|
||||||
necessary for other keywords.
|
necessary for other keywords.
|
||||||
@ -599,7 +662,7 @@ Related commands
|
|||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
:doc:`create_box <create_box>`, :doc:`create_atoms <create_atoms>`,
|
:doc:`create_box <create_box>`, :doc:`create_atoms <create_atoms>`,
|
||||||
:doc:`read_data <read_data>`
|
:doc:`read_data <read_data>`, :doc:`fix set <fix_set>`
|
||||||
|
|
||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|||||||
@ -82,6 +82,7 @@ Alessandro
|
|||||||
Alexey
|
Alexey
|
||||||
ali
|
ali
|
||||||
aliceblue
|
aliceblue
|
||||||
|
aliphatic
|
||||||
Allera
|
Allera
|
||||||
Allinger
|
Allinger
|
||||||
allocatable
|
allocatable
|
||||||
@ -630,6 +631,7 @@ cp
|
|||||||
cpp
|
cpp
|
||||||
cpu
|
cpu
|
||||||
cradius
|
cradius
|
||||||
|
Cramer
|
||||||
createatoms
|
createatoms
|
||||||
createAtoms
|
createAtoms
|
||||||
CreateIDs
|
CreateIDs
|
||||||
@ -670,6 +672,7 @@ cuFFT
|
|||||||
CuH
|
CuH
|
||||||
Cui
|
Cui
|
||||||
Cummins
|
Cummins
|
||||||
|
cumulants
|
||||||
Cundall
|
Cundall
|
||||||
cundall
|
cundall
|
||||||
Curk
|
Curk
|
||||||
@ -1174,6 +1177,7 @@ Fermionic
|
|||||||
Ferrand
|
Ferrand
|
||||||
fexternal
|
fexternal
|
||||||
Fexternal
|
Fexternal
|
||||||
|
ffast
|
||||||
ffield
|
ffield
|
||||||
ffl
|
ffl
|
||||||
fflush
|
fflush
|
||||||
@ -1770,6 +1774,7 @@ jik
|
|||||||
JIK
|
JIK
|
||||||
jku
|
jku
|
||||||
jN
|
jN
|
||||||
|
Joanes
|
||||||
Joannopoulos
|
Joannopoulos
|
||||||
Jochim
|
Jochim
|
||||||
Jonsson
|
Jonsson
|
||||||
@ -1814,6 +1819,7 @@ Karniadakis
|
|||||||
Karplus
|
Karplus
|
||||||
Karttunen
|
Karttunen
|
||||||
kate
|
kate
|
||||||
|
katom
|
||||||
Katsnelson
|
Katsnelson
|
||||||
Katsura
|
Katsura
|
||||||
Kaufmann
|
Kaufmann
|
||||||
@ -2192,6 +2198,7 @@ Materias
|
|||||||
mathbf
|
mathbf
|
||||||
mathjax
|
mathjax
|
||||||
matlab
|
matlab
|
||||||
|
Matom
|
||||||
Matous
|
Matous
|
||||||
matplotlib
|
matplotlib
|
||||||
Matsubara
|
Matsubara
|
||||||
@ -2701,6 +2708,7 @@ Nprocs
|
|||||||
npt
|
npt
|
||||||
nr
|
nr
|
||||||
Nr
|
Nr
|
||||||
|
Nrecent
|
||||||
Nrecompute
|
Nrecompute
|
||||||
Nrepeat
|
Nrepeat
|
||||||
nreset
|
nreset
|
||||||
@ -2779,6 +2787,7 @@ ocl
|
|||||||
octahedral
|
octahedral
|
||||||
octants
|
octants
|
||||||
Odegard
|
Odegard
|
||||||
|
Og
|
||||||
Ohara
|
Ohara
|
||||||
O'Hearn
|
O'Hearn
|
||||||
ohenrich
|
ohenrich
|
||||||
@ -3361,6 +3370,7 @@ Rmin
|
|||||||
RMS
|
RMS
|
||||||
rmsd
|
rmsd
|
||||||
rnage
|
rnage
|
||||||
|
rnflag
|
||||||
rng
|
rng
|
||||||
rNEMD
|
rNEMD
|
||||||
ro
|
ro
|
||||||
@ -3416,6 +3426,7 @@ ry
|
|||||||
Ryckaert
|
Ryckaert
|
||||||
Rycroft
|
Rycroft
|
||||||
Rydbergs
|
Rydbergs
|
||||||
|
Ryzen
|
||||||
rz
|
rz
|
||||||
Rz
|
Rz
|
||||||
Sabry
|
Sabry
|
||||||
@ -3835,6 +3846,7 @@ Thiaville
|
|||||||
Thibaudeau
|
Thibaudeau
|
||||||
Thijsse
|
Thijsse
|
||||||
Thirumalai
|
Thirumalai
|
||||||
|
Threadripper
|
||||||
threebody
|
threebody
|
||||||
thrid
|
thrid
|
||||||
ThunderX
|
ThunderX
|
||||||
|
|||||||
@ -27,10 +27,7 @@ if(MSVC)
|
|||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED COMPONENTS C)
|
||||||
# do not include the (obsolete) MPI C++ bindings which makes
|
|
||||||
# for leaner object files and avoids namespace conflicts
|
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
|
|||||||
@ -25,10 +25,10 @@ if(MSVC)
|
|||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(MPI QUIET)
|
|
||||||
# do not include the (obsolete) MPI C++ bindings which makes
|
# do not include the (obsolete) MPI C++ bindings which makes
|
||||||
# for leaner object files and avoids namespace conflicts
|
# for leaner object files and avoids namespace conflicts
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||||
|
find_package(MPI QUIET COMPONENTS C CXX)
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
|
|||||||
35
examples/PACKAGES/moments/in.converge
Normal file
35
examples/PACKAGES/moments/in.converge
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Detect convergence in a simulation using the relative change in
|
||||||
|
# moments. This demonstrates the "history" option.
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
|
||||||
|
# compute mean and stddev over the preceding 5000 steps, every 20 steps
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 10 500 200 v_toteng mean stddev history 5
|
||||||
|
|
||||||
|
# Convergence criterion: stddev is smaller than threshold and was previously larger
|
||||||
|
# This avoids issues with system oscillations in the order of the averaging window
|
||||||
|
# that would otherwise lead to "nodes" in the stddev.
|
||||||
|
variable conv equal "(f_2[2] < 2.0) && (f_2[2][1] < f_2[2][5])"
|
||||||
|
fix 3 all halt 100 v_conv == 1
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*][1] f_2[*][5] v_conv
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
|
||||||
27
examples/PACKAGES/moments/in.simple
Normal file
27
examples/PACKAGES/moments/in.simple
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Perform a simple simulation and output the moments of the total energy
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 5 200 100 v_toteng mean stddev variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*]
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
|
||||||
28
examples/PACKAGES/moments/in.valtest
Normal file
28
examples/PACKAGES/moments/in.valtest
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Output raw and computed data. This can be used to perform the moment
|
||||||
|
# calculation in some external tool and validate our results
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 1 10 10 v_toteng mean variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step etotal f_2[*]
|
||||||
|
thermo_modify format float %14.8f
|
||||||
|
|
||||||
|
thermo 1
|
||||||
|
run 100
|
||||||
171
examples/PACKAGES/moments/log.02May2025.converge.g++.1
Normal file
171
examples/PACKAGES/moments/log.02May2025.converge.g++.1
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.001 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 10 500 200 v_toteng mean stddev history 5
|
||||||
|
|
||||||
|
variable conv equal "(f_2[2] < 2) && (f_2[2][1] < f_2[2][5])"
|
||||||
|
fix 3 all halt 1000 v_conv == 1
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*][1] f_2[*][5] v_conv
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.484 | 3.484 | 3.484 Mbytes
|
||||||
|
Step Temp Press TotEng f_2[1][1] f_2[2][1] f_2[1][5] f_2[2][5] v_conv
|
||||||
|
0 1000 -107410.22 -2884.9159 0 0 0 0 0
|
||||||
|
100 512.04214 -124.66263 -2928.6 0 0 0 0 0
|
||||||
|
200 479.34328 -136.26635 -2931.3905 -2928.6251 2.1584834 0 0 0
|
||||||
|
300 480.05298 128.92946 -2933.9233 -2928.6251 2.1584834 0 0 0
|
||||||
|
400 471.83641 -29.253334 -2936.8631 -2931.3742 3.3668783 0 0 0
|
||||||
|
500 456.96309 -274.69336 -2939.9081 -2931.3742 3.3668783 0 0 0
|
||||||
|
600 450.32413 14.606227 -2942.973 -2934.277 5.0681849 0 0 0
|
||||||
|
700 431.71192 -45.641261 -2946.006 -2934.277 5.0681849 0 0 0
|
||||||
|
800 436.4217 589.91981 -2948.8885 -2937.2386 6.823233 0 0 0
|
||||||
|
900 407.84688 -3728.1499 -2951.6643 -2937.2386 6.823233 0 0 0
|
||||||
|
1000 401.69178 6695.3653 -2954.2959 -2940.1463 8.4728269 -2928.6251 2.1584834 0
|
||||||
|
1100 370.87469 -2294.843 -2956.9413 -2940.1463 8.4728269 -2928.6251 2.1584834 0
|
||||||
|
1200 375.15562 704.6568 -2959.3841 -2942.9613 10.001542 -2931.3742 3.3668783 0
|
||||||
|
1300 371.09077 -493.04016 -2961.6803 -2942.9613 10.001542 -2931.3742 3.3668783 0
|
||||||
|
1400 365.88512 490.98174 -2963.8365 -2945.6475 11.378724 -2934.277 5.0681849 0
|
||||||
|
1500 358.42655 -218.94911 -2965.8652 -2945.6475 11.378724 -2934.277 5.0681849 0
|
||||||
|
1600 329.08402 56.411923 -2967.7662 -2948.1844 12.597017 -2937.2386 6.823233 0
|
||||||
|
1700 317.74207 1192.918 -2969.557 -2948.1844 12.597017 -2937.2386 6.823233 0
|
||||||
|
1800 331.98966 -2205.7213 -2971.1465 -2950.559 13.653575 -2940.1463 8.4728269 0
|
||||||
|
1900 330.96814 1401.3066 -2972.6923 -2950.559 13.653575 -2940.1463 8.4728269 0
|
||||||
|
2000 315.41816 -909.41909 -2974.0785 -2952.7764 14.568194 -2942.9613 10.001542 0
|
||||||
|
2100 320.4269 1226.2006 -2975.3676 -2952.7764 14.568194 -2942.9613 10.001542 0
|
||||||
|
2200 302.88235 -1238.8052 -2976.5099 -2954.8327 15.341787 -2945.6475 11.378724 0
|
||||||
|
2300 300.4349 2667.202 -2977.5329 -2954.8327 15.341787 -2945.6475 11.378724 0
|
||||||
|
2400 292.94691 -5532.1854 -2978.3724 -2956.7266 15.978754 -2948.1844 12.597017 0
|
||||||
|
2500 286.12064 4647.3841 -2979.2217 -2956.7266 15.978754 -2948.1844 12.597017 0
|
||||||
|
2600 290.74305 -1950.526 -2979.9142 -2958.4592 16.485773 -2950.559 13.653575 0
|
||||||
|
2700 281.51347 937.60472 -2980.4808 -2958.4592 16.485773 -2950.559 13.653575 0
|
||||||
|
2800 279.71836 -801.62498 -2980.8899 -2960.032 16.869365 -2952.7764 14.568194 0
|
||||||
|
2900 277.41241 609.21495 -2981.1721 -2960.032 16.869365 -2952.7764 14.568194 0
|
||||||
|
3000 281.31161 -760.27203 -2981.3003 -2961.4399 17.128547 -2954.8327 15.341787 0
|
||||||
|
3100 284.72904 315.53038 -2981.297 -2961.4399 17.128547 -2954.8327 15.341787 0
|
||||||
|
3200 278.39445 516.25074 -2981.1224 -2962.6768 17.263037 -2956.7266 15.978754 0
|
||||||
|
3300 294.46998 -655.06212 -2980.8266 -2962.6768 17.263037 -2956.7266 15.978754 0
|
||||||
|
3400 290.04647 788.30424 -2980.3963 -2963.7417 17.280979 -2958.4592 16.485773 0
|
||||||
|
3500 283.218 -844.33188 -2979.8504 -2963.7417 17.280979 -2958.4592 16.485773 0
|
||||||
|
3600 288.76031 1339.2734 -2979.2382 -2964.6345 17.192698 -2960.032 16.869365 0
|
||||||
|
3700 289.44519 -3015.7161 -2978.5394 -2964.6345 17.192698 -2960.032 16.869365 0
|
||||||
|
3800 309.04206 5579.3265 -2977.8282 -2965.3649 17.01845 -2961.4399 17.128547 0
|
||||||
|
3900 309.34588 -4255.5213 -2977.1281 -2965.3649 17.01845 -2961.4399 17.128547 0
|
||||||
|
4000 305.79444 2358.1383 -2976.5251 -2965.9537 16.784519 -2962.6768 17.263037 0
|
||||||
|
4100 309.12957 -1401.6484 -2975.9173 -2965.9537 16.784519 -2962.6768 17.263037 0
|
||||||
|
4200 309.41928 1180.4111 -2975.3857 -2966.4277 16.516135 -2963.7417 17.280979 0
|
||||||
|
4300 299.88949 -1549.6591 -2974.927 -2966.4277 16.516135 -2963.7417 17.280979 0
|
||||||
|
4400 319.09918 1937.7006 -2974.5598 -2966.8138 16.232551 -2964.6345 17.192698 0
|
||||||
|
4500 326.48719 -1489.2073 -2974.311 -2966.8138 16.232551 -2964.6345 17.192698 0
|
||||||
|
4600 310.93392 37.586899 -2974.1959 -2967.1394 15.948448 -2965.3649 17.01845 0
|
||||||
|
4700 314.28994 317.12347 -2974.1763 -2967.1394 15.948448 -2965.3649 17.01845 0
|
||||||
|
4800 309.88756 -698.72705 -2974.2892 -2967.4334 15.675606 -2965.9537 16.784519 0
|
||||||
|
4900 309.53444 962.42921 -2974.5261 -2967.4334 15.675606 -2965.9537 16.784519 0
|
||||||
|
5000 316.06666 -1869.3275 -2974.8492 -2967.7182 15.421633 -2966.4277 16.516135 0
|
||||||
|
5100 304.82485 4042.6797 -2975.2715 -2967.7182 15.421633 -2966.4277 16.516135 0
|
||||||
|
5200 307.75342 -5058.4814 -2975.7195 -2969.5853 13.236776 -2966.8138 16.232551 0
|
||||||
|
5300 298.83511 3096.4566 -2976.3329 -2969.5853 13.236776 -2966.8138 16.232551 0
|
||||||
|
5400 296.85413 -1929.1654 -2976.8797 -2971.2747 11.121537 -2967.1394 15.948448 0
|
||||||
|
5500 295.88343 1449.3005 -2977.4488 -2971.2747 11.121537 -2967.1394 15.948448 0
|
||||||
|
5600 305.59328 -1504.0321 -2977.9573 -2972.77 9.1579616 -2967.4334 15.675606 0
|
||||||
|
5700 293.40683 2579.0134 -2978.4364 -2972.77 9.1579616 -2967.4334 15.675606 0
|
||||||
|
5800 297.93644 -2742.705 -2978.8276 -2974.0625 7.4101102 -2967.7182 15.421633 0
|
||||||
|
5900 290.39408 1189.4042 -2979.2224 -2974.0625 7.4101102 -2967.7182 15.421633 0
|
||||||
|
6000 293.73148 -232.54292 -2979.503 -2975.1594 5.8959922 -2969.5853 13.236776 0
|
||||||
|
6100 292.04933 -168.30971 -2979.6898 -2975.1594 5.8959922 -2969.5853 13.236776 0
|
||||||
|
6200 299.23747 839.17828 -2979.7883 -2976.0647 4.6378408 -2971.2747 11.121537 0
|
||||||
|
6300 294.92201 -1597.9426 -2979.7975 -2976.0647 4.6378408 -2971.2747 11.121537 0
|
||||||
|
6400 291.7185 3411.2916 -2979.6978 -2976.7848 3.643826 -2972.77 9.1579616 0
|
||||||
|
6500 285.34227 -4280.7968 -2979.4874 -2976.7848 3.643826 -2972.77 9.1579616 0
|
||||||
|
6600 295.53838 2138.7496 -2979.2799 -2977.3265 2.9178925 -2974.0625 7.4101102 0
|
||||||
|
6700 288.54718 -1818.7662 -2978.9379 -2977.3265 2.9178925 -2974.0625 7.4101102 0
|
||||||
|
6800 290.41342 2175.3559 -2978.543 -2977.7009 2.4532223 -2975.1594 5.8959922 0
|
||||||
|
6900 296.34456 -4782.08 -2978.0362 -2977.7009 2.4532223 -2975.1594 5.8959922 0
|
||||||
|
7000 303.74314 5905.219 -2977.577 -2977.9137 2.2279716 -2976.0647 4.6378408 0
|
||||||
|
7100 303.90284 -3291.7627 -2977.1308 -2977.9137 2.2279716 -2976.0647 4.6378408 0
|
||||||
|
7200 296.13966 2209.574 -2976.7001 -2977.9829 2.1708943 -2976.7848 3.643826 0
|
||||||
|
7300 295.79694 -1609.1898 -2976.2816 -2977.9829 2.1708943 -2976.7848 3.643826 0
|
||||||
|
7400 306.53289 988.50902 -2975.8992 -2977.931 2.1935882 -2977.3265 2.9178925 0
|
||||||
|
7500 303.89992 -631.22838 -2975.5597 -2977.931 2.1935882 -2977.3265 2.9178925 0
|
||||||
|
7600 303.83684 -348.48744 -2975.3074 -2977.7831 2.2226664 -2977.7009 2.4532223 0
|
||||||
|
7700 309.67313 1350.9414 -2975.1279 -2977.7831 2.2226664 -2977.7009 2.4532223 0
|
||||||
|
7800 309.74314 -1182.8905 -2975.0174 -2977.5683 2.2106484 -2977.9137 2.2279716 0
|
||||||
|
7900 309.42429 999.08033 -2975.0089 -2977.5683 2.2106484 -2977.9137 2.2279716 0
|
||||||
|
8000 315.51872 -1337.8894 -2975.0791 -2977.3233 2.1379295 -2977.9829 2.1708943 0
|
||||||
|
8100 314.80533 2392.3424 -2975.25 -2977.3233 2.1379295 -2977.9829 2.1708943 0
|
||||||
|
8200 303.80236 -3224.5976 -2975.4744 -2977.0851 2.0176342 -2977.931 2.1935882 0
|
||||||
|
8300 295.0505 3296.6912 -2975.8196 -2977.0851 2.0176342 -2977.931 2.1935882 0
|
||||||
|
8400 302.4154 -3314.5096 -2976.1586 -2976.8877 1.883051 -2977.7831 2.2226664 1
|
||||||
|
8500 300.95491 2971.1291 -2976.5859 -2976.8877 1.883051 -2977.7831 2.2226664 1
|
||||||
|
8600 301.68919 -2297.6673 -2976.9953 -2976.7596 1.785401 -2977.5683 2.2106484 1
|
||||||
|
8700 291.21002 1477.5703 -2977.4323 -2976.7596 1.785401 -2977.5683 2.2106484 1
|
||||||
|
8800 305.87126 -1085.459 -2977.8247 -2976.7169 1.7541517 -2977.3233 2.1379295 1
|
||||||
|
8900 296.17567 777.95805 -2978.2081 -2976.7169 1.7541517 -2977.3233 2.1379295 1
|
||||||
|
Fix halt condition for fix-id 3 met on step 9000 with value 1 (src/fix_halt.cpp:310)
|
||||||
|
9000 295.71917 -425.00708 -2978.5264 -2976.7595 1.7755885 -2977.0851 2.0176342 1
|
||||||
|
Loop time of 42.1758 on 1 procs for 9000 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 36.874 ns/day, 0.651 hours/ns, 213.393 timesteps/s, 184.371 katom-step/s
|
||||||
|
99.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 41.126 | 41.126 | 41.126 | 0.0 | 97.51
|
||||||
|
Neigh | 0.0078787 | 0.0078787 | 0.0078787 | 0.0 | 0.02
|
||||||
|
Comm | 0.26508 | 0.26508 | 0.26508 | 0.0 | 0.63
|
||||||
|
Output | 0.0096224 | 0.0096224 | 0.0096224 | 0.0 | 0.02
|
||||||
|
Modify | 0.65597 | 0.65597 | 0.65597 | 0.0 | 1.56
|
||||||
|
Other | | 0.1108 | | | 0.26
|
||||||
|
|
||||||
|
Nlocal: 864 ave 864 max 864 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 3767 ave 3767 max 3767 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 96746 ave 96746 max 96746 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 96746
|
||||||
|
Ave neighs/atom = 111.97454
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:42
|
||||||
171
examples/PACKAGES/moments/log.02May2025.converge.g++.4
Normal file
171
examples/PACKAGES/moments/log.02May2025.converge.g++.4
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.001 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 10 500 200 v_toteng mean stddev history 5
|
||||||
|
|
||||||
|
variable conv equal "(f_2[2] < 2) && (f_2[2][1] < f_2[2][5])"
|
||||||
|
fix 3 all halt 1000 v_conv == 1
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*][1] f_2[*][5] v_conv
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.42 | 3.42 | 3.42 Mbytes
|
||||||
|
Step Temp Press TotEng f_2[1][1] f_2[2][1] f_2[1][5] f_2[2][5] v_conv
|
||||||
|
0 1000 -107410.22 -2884.9159 0 0 0 0 0
|
||||||
|
100 492.38014 -134.33622 -2928.6874 0 0 0 0 0
|
||||||
|
200 484.82396 -214.26318 -2931.4603 -2928.6979 2.1805063 0 0 0
|
||||||
|
300 476.69743 15.78678 -2934.0022 -2928.6979 2.1805063 0 0 0
|
||||||
|
400 482.51415 141.67184 -2936.9347 -2931.4437 3.3715811 0 0 0
|
||||||
|
500 455.45411 2.4424602 -2939.9649 -2931.4437 3.3715811 0 0 0
|
||||||
|
600 455.20054 -6.8170934 -2943.0454 -2934.339 5.0598781 0 0 0
|
||||||
|
700 429.81168 -75.812923 -2946.0438 -2934.339 5.0598781 0 0 0
|
||||||
|
800 428.22097 604.18705 -2948.9285 -2937.2965 6.813037 0 0 0
|
||||||
|
900 399.10914 -3622.6904 -2951.7252 -2937.2965 6.813037 0 0 0
|
||||||
|
1000 394.62543 7905.9041 -2954.2925 -2940.2044 8.4668749 -2928.6979 2.1805063 0
|
||||||
|
1100 404.27007 -2565.5508 -2956.9736 -2940.2044 8.4668749 -2928.6979 2.1805063 0
|
||||||
|
1200 368.47178 741.43707 -2959.4264 -2943.0151 9.9914785 -2931.4437 3.3715811 0
|
||||||
|
1300 360.91266 -267.08372 -2961.69 -2943.0151 9.9914785 -2931.4437 3.3715811 0
|
||||||
|
1400 356.74405 158.09093 -2963.8501 -2945.696 11.36357 -2934.339 5.0598781 0
|
||||||
|
1500 335.45696 -71.007783 -2965.8817 -2945.696 11.36357 -2934.339 5.0598781 0
|
||||||
|
1600 331.01199 -454.90004 -2967.7708 -2948.2278 12.577884 -2937.2965 6.813037 0
|
||||||
|
1700 329.223 2428.4284 -2969.5452 -2948.2278 12.577884 -2937.2965 6.813037 0
|
||||||
|
1800 327.61481 -4757.648 -2971.1105 -2950.5985 13.632251 -2940.2044 8.4668749 0
|
||||||
|
1900 318.18741 2226.7765 -2972.6906 -2950.5985 13.632251 -2940.2044 8.4668749 0
|
||||||
|
2000 308.79313 -1089.8603 -2974.0899 -2952.8123 14.545164 -2943.0151 9.9914785 0
|
||||||
|
2100 303.32047 757.53534 -2975.3597 -2952.8123 14.545164 -2943.0151 9.9914785 0
|
||||||
|
2200 307.41102 -837.97246 -2976.4966 -2954.8654 15.317558 -2945.696 11.36357 0
|
||||||
|
2300 303.01088 1618.29 -2977.5454 -2954.8654 15.317558 -2945.696 11.36357 0
|
||||||
|
2400 297.59385 -3233.8282 -2978.4064 -2956.7565 15.953758 -2948.2278 12.577884 0
|
||||||
|
2500 288.72232 5209.2099 -2979.1999 -2956.7565 15.953758 -2948.2278 12.577884 0
|
||||||
|
2600 298.92201 -2193.618 -2979.8873 -2958.4845 16.457635 -2950.5985 13.632251 0
|
||||||
|
2700 282.61818 765.88178 -2980.4563 -2958.4845 16.457635 -2950.5985 13.632251 0
|
||||||
|
2800 273.63104 -389.49749 -2980.8636 -2960.0533 16.839029 -2952.8123 14.545164 0
|
||||||
|
2900 274.12166 -9.2552992 -2981.1421 -2960.0533 16.839029 -2952.8123 14.545164 0
|
||||||
|
3000 279.43592 212.25445 -2981.2716 -2961.4578 17.096628 -2954.8654 15.317558 0
|
||||||
|
3100 291.10071 -1139.205 -2981.2475 -2961.4578 17.096628 -2954.8654 15.317558 0
|
||||||
|
3200 281.53171 3124.6411 -2981.0818 -2962.6921 17.230604 -2956.7565 15.953758 0
|
||||||
|
3300 277.0223 -2795.9494 -2980.7825 -2962.6921 17.230604 -2956.7565 15.953758 0
|
||||||
|
3400 284.8443 1587.8876 -2980.3701 -2963.754 17.247489 -2958.4845 16.457635 0
|
||||||
|
3500 281.19 -1143.0785 -2979.8374 -2963.754 17.247489 -2958.4845 16.457635 0
|
||||||
|
3600 296.58287 1156.4706 -2979.2182 -2964.645 17.159411 -2960.0533 16.839029 0
|
||||||
|
3700 297.24517 -1888.4993 -2978.5352 -2964.645 17.159411 -2960.0533 16.839029 0
|
||||||
|
3800 290.81586 3843.3483 -2977.8509 -2965.3746 16.985916 -2961.4578 17.096628 0
|
||||||
|
3900 300.39456 -5584.8386 -2977.0837 -2965.3746 16.985916 -2961.4578 17.096628 0
|
||||||
|
4000 306.15811 3310.0105 -2976.5086 -2965.9619 16.752214 -2962.6921 17.230604 0
|
||||||
|
4100 295.907 -1475.0458 -2975.9096 -2965.9619 16.752214 -2962.6921 17.230604 0
|
||||||
|
4200 322.70162 933.76586 -2975.3867 -2966.4348 16.484219 -2963.754 17.247489 0
|
||||||
|
4300 306.69631 -512.7048 -2974.9324 -2966.4348 16.484219 -2963.754 17.247489 0
|
||||||
|
4400 309.23776 226.77219 -2974.5791 -2966.8208 16.201471 -2964.645 17.159411 0
|
||||||
|
4500 313.15783 508.29785 -2974.3263 -2966.8208 16.201471 -2964.645 17.159411 0
|
||||||
|
4600 316.26151 -2043.7571 -2974.1697 -2967.1463 15.918137 -2965.3746 16.985916 0
|
||||||
|
4700 312.27329 1831.682 -2974.1732 -2967.1463 15.918137 -2965.3746 16.985916 0
|
||||||
|
4800 307.61066 -1476.0019 -2974.2885 -2967.4397 15.645834 -2965.9619 16.752214 0
|
||||||
|
4900 305.73489 1303.4848 -2974.5506 -2967.4397 15.645834 -2965.9619 16.752214 0
|
||||||
|
5000 309.3774 -1574.6812 -2974.8687 -2967.7249 15.392787 -2966.4348 16.484219 0
|
||||||
|
5100 304.8602 2679.7476 -2975.3082 -2967.7249 15.392787 -2966.4348 16.484219 0
|
||||||
|
5200 297.54226 -5008.0905 -2975.7443 -2969.5904 13.211657 -2966.8208 16.201471 0
|
||||||
|
5300 306.18872 4840.4175 -2976.324 -2969.5904 13.211657 -2966.8208 16.201471 0
|
||||||
|
5400 299.57661 -2513.1706 -2976.8842 -2971.2774 11.099846 -2967.1463 15.918137 0
|
||||||
|
5500 302.30844 1301.3525 -2977.4539 -2971.2774 11.099846 -2967.1463 15.918137 0
|
||||||
|
5600 302.11038 -760.79712 -2977.9764 -2972.7712 9.1381778 -2967.4397 15.645834 0
|
||||||
|
5700 294.49825 718.67318 -2978.4584 -2972.7712 9.1381778 -2967.4397 15.645834 0
|
||||||
|
5800 305.97636 -478.64224 -2978.8638 -2974.0628 7.3929182 -2967.7249 15.392787 0
|
||||||
|
5900 291.93868 -419.74179 -2979.2292 -2974.0628 7.3929182 -2967.7249 15.392787 0
|
||||||
|
6000 289.50667 859.85085 -2979.5018 -2975.1575 5.8837236 -2969.5904 13.211657 0
|
||||||
|
6100 305.70118 -933.35917 -2979.6877 -2975.1575 5.8837236 -2969.5904 13.211657 0
|
||||||
|
6200 284.37805 1526.0707 -2979.806 -2976.062 4.6281363 -2971.2774 11.099846 0
|
||||||
|
6300 291.08863 -2156.6708 -2979.8064 -2976.062 4.6281363 -2971.2774 11.099846 0
|
||||||
|
6400 295.99073 2819.8245 -2979.7378 -2976.7827 3.6358684 -2972.7712 9.1381778 0
|
||||||
|
6500 298.06769 -3396.3504 -2979.5428 -2976.7827 3.6358684 -2972.7712 9.1381778 0
|
||||||
|
6600 301.78514 5496.6525 -2979.2768 -2977.3261 2.9112079 -2974.0628 7.3929182 0
|
||||||
|
6700 290.80665 -5229.4989 -2978.9177 -2977.3261 2.9112079 -2974.0628 7.3929182 0
|
||||||
|
6800 296.75761 2401.7807 -2978.5996 -2977.7014 2.4473856 -2975.1575 5.8837236 0
|
||||||
|
6900 295.77553 -1521.6269 -2978.1619 -2977.7014 2.4473856 -2975.1575 5.8837236 0
|
||||||
|
7000 303.59015 1530.7255 -2977.7097 -2977.9176 2.2219164 -2976.062 4.6281363 0
|
||||||
|
7100 297.51038 -3016.4426 -2977.2025 -2977.9176 2.2219164 -2976.062 4.6281363 0
|
||||||
|
7200 293.53789 2705.9808 -2976.7651 -2977.9894 2.1638143 -2976.7827 3.6358684 0
|
||||||
|
7300 301.78809 -1042.1076 -2976.3388 -2977.9894 2.1638143 -2976.7827 3.6358684 0
|
||||||
|
7400 307.50053 214.56923 -2975.9581 -2977.9394 2.1852009 -2977.3261 2.9112079 0
|
||||||
|
7500 301.98985 281.86495 -2975.6146 -2977.9394 2.1852009 -2977.3261 2.9112079 0
|
||||||
|
7600 318.37347 -1145.7795 -2975.3473 -2977.7949 2.2136707 -2977.7014 2.4473856 0
|
||||||
|
7700 314.94512 4536.9887 -2975.1351 -2977.7949 2.2136707 -2977.7014 2.4473856 0
|
||||||
|
7800 312.91485 -2980.6408 -2975.0156 -2977.5818 2.2038198 -2977.9176 2.2219164 0
|
||||||
|
7900 310.06854 2244.3877 -2975.0094 -2977.5818 2.2038198 -2977.9176 2.2219164 0
|
||||||
|
8000 308.55007 -2427.1464 -2975.0491 -2977.3378 2.1348358 -2977.9894 2.1638143 0
|
||||||
|
8100 323.02796 3187.4728 -2975.2081 -2977.3378 2.1348358 -2977.9894 2.1638143 0
|
||||||
|
8200 327.05029 -6447.7875 -2975.3162 -2977.0986 2.0196599 -2977.9394 2.1852009 0
|
||||||
|
8300 311.194 4273.1174 -2975.7217 -2977.0986 2.0196599 -2977.9394 2.1852009 0
|
||||||
|
8400 290.61931 -2301.019 -2976.0963 -2976.8989 1.8918948 -2977.7949 2.2136707 1
|
||||||
|
8500 314.00559 1966.1297 -2976.5206 -2976.8989 1.8918948 -2977.7949 2.2136707 1
|
||||||
|
8600 288.26541 -1608.4524 -2976.9304 -2976.7685 1.7971228 -2977.5818 2.2038198 1
|
||||||
|
8700 298.92083 1353.9988 -2977.355 -2976.7685 1.7971228 -2977.5818 2.2038198 1
|
||||||
|
8800 299.97274 -638.68301 -2977.766 -2976.722 1.7650747 -2977.3378 2.1348358 1
|
||||||
|
8900 300.66443 -279.62514 -2978.1476 -2976.722 1.7650747 -2977.3378 2.1348358 1
|
||||||
|
Fix halt condition for fix-id 3 met on step 9000 with value 1 (src/fix_halt.cpp:310)
|
||||||
|
9000 290.44715 489.06352 -2978.4892 -2976.7631 1.7846181 -2977.0986 2.0196599 1
|
||||||
|
Loop time of 14.7347 on 4 procs for 9000 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 105.547 ns/day, 0.227 hours/ns, 610.804 timesteps/s, 527.735 katom-step/s
|
||||||
|
92.8% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 10.565 | 11.474 | 12.015 | 16.1 | 77.87
|
||||||
|
Neigh | 0.0020313 | 0.0020966 | 0.002163 | 0.1 | 0.01
|
||||||
|
Comm | 2.008 | 2.5374 | 3.4278 | 33.5 | 17.22
|
||||||
|
Output | 0.0030284 | 0.0036299 | 0.0051776 | 1.5 | 0.02
|
||||||
|
Modify | 0.42442 | 0.43307 | 0.44329 | 1.0 | 2.94
|
||||||
|
Other | | 0.2849 | | | 1.93
|
||||||
|
|
||||||
|
Nlocal: 216 ave 224 max 204 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 2 0 1
|
||||||
|
Nghost: 2147 ave 2159 max 2139 min
|
||||||
|
Histogram: 1 0 0 2 0 0 0 0 0 1
|
||||||
|
Neighs: 24185.8 ave 26045 max 21309 min
|
||||||
|
Histogram: 1 0 0 0 0 1 0 0 0 2
|
||||||
|
|
||||||
|
Total # of neighbors = 96743
|
||||||
|
Ave neighs/atom = 111.97106
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:14
|
||||||
177
examples/PACKAGES/moments/log.02May2025.simple.g++.1
Normal file
177
examples/PACKAGES/moments/log.02May2025.simple.g++.1
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.001 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 5 200 100 v_toteng mean stddev variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*]
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.484 | 3.484 | 3.484 Mbytes
|
||||||
|
Step Temp Press TotEng f_2[1] f_2[2] f_2[3] f_2[4] f_2[5]
|
||||||
|
0 1000 -107410.22 -2884.9159 0 0 0 0 0
|
||||||
|
100 512.04214 -124.66263 -2928.6 -2927.1688 1.6797138 2.8214386 2.5218138 6.164012
|
||||||
|
200 479.34328 -136.26635 -2931.3905 -2928.6374 1.9791406 3.9169976 1.3377745 3.2426285
|
||||||
|
300 480.05298 128.92946 -2933.9233 -2929.9825 2.5401119 6.4521682 0.66415393 0.77130236
|
||||||
|
400 471.83641 -29.253334 -2936.8631 -2931.346 3.2640831 10.654239 0.29075579 -0.26904542
|
||||||
|
500 456.96309 -274.69336 -2939.9081 -2932.7721 4.1077082 16.873267 0.094954709 -0.72240572
|
||||||
|
600 450.32413 14.606227 -2942.973 -2934.2328 4.9928765 24.928816 0.0090731063 -0.93757177
|
||||||
|
700 431.71192 -45.641261 -2946.006 -2935.7111 5.8871117 34.658084 -0.024573652 -1.0540107
|
||||||
|
800 436.4217 589.91981 -2948.8885 -2937.1871 6.762411 45.730202 -0.028553126 -1.1275153
|
||||||
|
900 407.84688 -3728.1499 -2951.6643 -2938.652 7.6129868 57.957569 -0.020186137 -1.172618
|
||||||
|
1000 401.69178 6695.3653 -2954.2959 -2940.0921 8.423174 70.949861 -0.0018224075 -1.2051609
|
||||||
|
1100 370.87469 -2294.843 -2956.9413 -2942.9469 8.384346 70.297257 0.016964628 -1.2643199
|
||||||
|
1200 375.15562 704.6568 -2959.3841 -2945.7589 8.3201293 69.224551 0.070500644 -1.2400262
|
||||||
|
1300 371.09077 -493.04016 -2961.6803 -2948.5516 8.1425118 66.300499 0.11183042 -1.2099873
|
||||||
|
1400 365.88512 490.98174 -2963.8365 -2951.2897 7.8673969 61.895934 0.13639588 -1.198071
|
||||||
|
1500 358.42655 -218.94911 -2965.8652 -2953.9337 7.5491659 56.989906 0.15564307 -1.1896984
|
||||||
|
1600 329.08402 56.411923 -2967.7662 -2956.467 7.2016413 51.863637 0.17198437 -1.186472
|
||||||
|
1700 317.74207 1192.918 -2969.557 -2958.8765 6.8379658 46.757776 0.19041811 -1.1812241
|
||||||
|
1800 331.98966 -2205.7213 -2971.1465 -2961.1601 6.4614065 41.749774 0.20925197 -1.1714131
|
||||||
|
1900 330.96814 1401.3066 -2972.6923 -2963.3191 6.0867317 37.048302 0.22552163 -1.1523125
|
||||||
|
2000 315.41816 -909.41909 -2974.0785 -2965.3567 5.7020261 32.513101 0.2328316 -1.1454375
|
||||||
|
2100 320.4269 1226.2006 -2975.3676 -2967.2609 5.3260556 28.366869 0.24130517 -1.1432352
|
||||||
|
2200 302.88235 -1238.8052 -2976.5099 -2969.0355 4.9584282 24.58601 0.25200271 -1.141699
|
||||||
|
2300 300.4349 2667.202 -2977.5329 -2970.6815 4.5986371 21.147463 0.26764984 -1.1380521
|
||||||
|
2400 292.94691 -5532.1854 -2978.3724 -2972.201 4.2403749 17.980779 0.28797864 -1.1357902
|
||||||
|
2500 286.12064 4647.3841 -2979.2217 -2973.5946 3.8875889 15.113348 0.31556585 -1.1249025
|
||||||
|
2600 290.74305 -1950.526 -2979.9142 -2974.8686 3.5422986 12.547879 0.34719546 -1.0987558
|
||||||
|
2700 281.51347 937.60472 -2980.4808 -2976.0235 3.1955646 10.211633 0.38268676 -1.0664838
|
||||||
|
2800 279.71836 -801.62498 -2980.8899 -2977.0588 2.844105 8.0889331 0.41930147 -1.0460672
|
||||||
|
2900 277.41241 609.21495 -2981.1721 -2977.9673 2.4956133 6.2280855 0.47337432 -1.0140054
|
||||||
|
3000 281.31161 -760.27203 -2981.3003 -2978.7489 2.1466012 4.6078967 0.55325134 -0.95161956
|
||||||
|
3100 284.72904 315.53038 -2981.297 -2979.4023 1.7929581 3.2146986 0.66481771 -0.84726207
|
||||||
|
3200 278.39445 516.25074 -2981.1224 -2979.9226 1.4369984 2.0649644 0.82583409 -0.63830994
|
||||||
|
3300 294.46998 -655.06212 -2980.8266 -2980.3134 1.0905211 1.1892364 1.0357766 -0.22841943
|
||||||
|
3400 290.04647 788.30424 -2980.3963 -2980.5732 0.77030961 0.59337689 1.1867647 0.34447355
|
||||||
|
3500 283.218 -844.33188 -2979.8504 -2980.6995 0.54590076 0.29800764 0.78163948 -0.42619888
|
||||||
|
3600 288.76031 1339.2734 -2979.2382 -2980.6921 0.56032295 0.31396181 0.83603869 -0.30853278
|
||||||
|
3700 289.44519 -3015.7161 -2978.5394 -2980.5581 0.77708069 0.60385439 1.0796997 -0.022962365
|
||||||
|
3800 309.04206 5579.3265 -2977.8282 -2980.3052 1.0531468 1.1091181 0.890018 -0.56034495
|
||||||
|
3900 309.34588 -4255.5213 -2977.1281 -2979.9487 1.3153981 1.7302721 0.65242676 -0.95498589
|
||||||
|
4000 305.79444 2358.1383 -2976.5251 -2979.5068 1.5325477 2.3487025 0.44420123 -1.1839975
|
||||||
|
4100 309.12957 -1401.6484 -2975.9173 -2978.9985 1.6923829 2.86416 0.26850538 -1.3006942
|
||||||
|
4200 309.41928 1180.4111 -2975.3857 -2978.4446 1.7941259 3.2188877 0.11443933 -1.3365167
|
||||||
|
4300 299.88949 -1549.6591 -2974.927 -2977.8616 1.8268192 3.3372683 -0.018659059 -1.3293426
|
||||||
|
4400 319.09918 1937.7006 -2974.5598 -2977.273 1.7942266 3.219249 -0.13743367 -1.2958767
|
||||||
|
4500 326.48719 -1489.2073 -2974.311 -2976.7017 1.7042328 2.9044096 -0.25309558 -1.2385503
|
||||||
|
4600 310.93392 37.586899 -2974.1959 -2976.1697 1.5590672 2.4306905 -0.3757949 -1.1641151
|
||||||
|
4700 314.28994 317.12347 -2974.1763 -2975.6978 1.3661244 1.8662958 -0.51792367 -1.0609001
|
||||||
|
4800 309.88756 -698.72705 -2974.2892 -2975.3021 1.1422822 1.3048085 -0.69587053 -0.87319738
|
||||||
|
4900 309.53444 962.42921 -2974.5261 -2974.9944 0.89961859 0.80931361 -0.91892105 -0.49661907
|
||||||
|
5000 316.06666 -1869.3275 -2974.8492 -2974.7804 0.65817496 0.43319428 -1.0974595 0.048447651
|
||||||
|
5100 304.82485 4042.6797 -2975.2715 -2974.6661 0.47073268 0.22158926 -0.82059377 -0.31531887
|
||||||
|
5200 307.75342 -5058.4814 -2975.7195 -2974.6547 0.44733518 0.20010876 -0.68956594 -0.65171579
|
||||||
|
5300 298.83511 3096.4566 -2976.3329 -2974.7467 0.60599527 0.36723026 -1.0652601 0.032591262
|
||||||
|
5400 296.85413 -1929.1654 -2976.8797 -2974.9367 0.82832935 0.68612952 -0.91576774 -0.50322222
|
||||||
|
5500 295.88343 1449.3005 -2977.4488 -2975.215 1.044317 1.090598 -0.67574925 -0.92510515
|
||||||
|
5600 305.59328 -1504.0321 -2977.9573 -2975.5653 1.2243609 1.4990595 -0.46160433 -1.1708115
|
||||||
|
5700 293.40683 2579.0134 -2978.4364 -2975.97 1.3577316 1.843435 -0.27746111 -1.2993802
|
||||||
|
5800 297.93644 -2742.705 -2978.8276 -2976.411 1.4332742 2.054275 -0.11245859 -1.3584974
|
||||||
|
5900 290.39408 1189.4042 -2979.2224 -2976.8733 1.4576633 2.1247823 0.030209056 -1.3466833
|
||||||
|
6000 293.73148 -232.54292 -2979.503 -2977.3408 1.4300816 2.0451335 0.15663025 -1.2965878
|
||||||
|
6100 292.04933 -168.30971 -2979.6898 -2977.7936 1.3523929 1.8289665 0.28027258 -1.2214523
|
||||||
|
6200 299.23747 839.17828 -2979.7883 -2978.2154 1.2284868 1.5091798 0.40149929 -1.1382373
|
||||||
|
6300 294.92201 -1597.9426 -2979.7975 -2978.589 1.072002 1.1491883 0.53769821 -1.0262094
|
||||||
|
6400 291.7185 3411.2916 -2979.6978 -2978.9013 0.89165749 0.79505308 0.70748196 -0.83601078
|
||||||
|
6500 285.34227 -4280.7968 -2979.4874 -2979.1407 0.69727552 0.48619315 0.91500724 -0.4890805
|
||||||
|
6600 295.53838 2138.7496 -2979.2799 -2979.3084 0.50938648 0.25947459 1.0827149 -0.0043801382
|
||||||
|
6700 288.54718 -1818.7662 -2978.9379 -2979.3979 0.3658125 0.13381879 0.85573626 -0.20104653
|
||||||
|
6800 290.41342 2175.3559 -2978.543 -2979.4085 0.34439248 0.11860618 0.70989241 -0.55138716
|
||||||
|
6900 296.34456 -4782.08 -2978.0362 -2979.3362 0.47081063 0.22166265 1.1051059 0.16381282
|
||||||
|
7000 303.74314 5905.219 -2977.577 -2979.182 0.65635739 0.43080502 0.97456755 -0.34269231
|
||||||
|
7100 303.90284 -3291.7627 -2977.1308 -2978.9595 0.83412944 0.69577192 0.71973637 -0.85687335
|
||||||
|
7200 296.13966 2209.574 -2976.7001 -2978.6767 0.98885368 0.97783159 0.50554418 -1.124705
|
||||||
|
7300 295.79694 -1609.1898 -2976.2816 -2978.3446 1.1093729 1.2307082 0.32952142 -1.2657581
|
||||||
|
7400 306.53289 988.50902 -2975.8992 -2977.977 1.1910167 1.4185209 0.17936365 -1.331845
|
||||||
|
7500 303.89992 -631.22838 -2975.5597 -2977.5901 1.2352698 1.5258915 0.033110856 -1.3362459
|
||||||
|
7600 303.83684 -348.48744 -2975.3074 -2977.1915 1.2312686 1.5160224 -0.094817417 -1.3063491
|
||||||
|
7700 309.67313 1350.9414 -2975.1279 -2976.7984 1.1829266 1.3993154 -0.21343083 -1.2573517
|
||||||
|
7800 309.74314 -1182.8905 -2975.0174 -2976.4294 1.0913021 1.1909402 -0.3401118 -1.198459
|
||||||
|
7900 309.42429 999.08033 -2975.0089 -2976.0995 0.96393318 0.92916717 -0.48456322 -1.1149956
|
||||||
|
8000 315.51872 -1337.8894 -2975.0791 -2975.822 0.81535467 0.66480324 -0.67906685 -0.90499956
|
||||||
|
8100 314.80533 2392.3424 -2975.25 -2975.6019 0.64582022 0.41708376 -0.90521871 -0.5328796
|
||||||
|
8200 303.80236 -3224.5976 -2975.4744 -2975.4481 0.47449379 0.22514436 -1.0884377 -0.00018150871
|
||||||
|
8300 295.0505 3296.6912 -2975.8196 -2975.3667 0.34164698 0.11672266 -0.83269043 -0.31809119
|
||||||
|
8400 302.4154 -3314.5096 -2976.1586 -2975.3606 0.32904826 0.10827276 -0.73500255 -0.57861735
|
||||||
|
8500 300.95491 2971.1291 -2976.5859 -2975.4288 0.44584452 0.19877734 -1.0760301 0.014924509
|
||||||
|
8600 301.68919 -2297.6673 -2976.9953 -2975.5682 0.60852433 0.37030186 -0.91802963 -0.5143582
|
||||||
|
8700 291.21002 1477.5703 -2977.4323 -2975.7733 0.76843347 0.59048999 -0.68059043 -0.92051715
|
||||||
|
8800 305.87126 -1085.459 -2977.8247 -2976.0327 0.90672273 0.82214612 -0.47413162 -1.1492716
|
||||||
|
8900 296.17567 777.95805 -2978.2081 -2976.3349 1.0129061 1.0259789 -0.29734681 -1.271416
|
||||||
|
9000 295.71917 -425.00708 -2978.5264 -2976.6672 1.0786137 1.1634075 -0.14055755 -1.3302079
|
||||||
|
9100 296.85578 -533.46289 -2978.8197 -2977.0152 1.1000855 1.2101882 0.0045950751 -1.3434868
|
||||||
|
9200 293.949 605.27065 -2979.0349 -2977.3702 1.0854405 1.1781811 0.123965 -1.3093197
|
||||||
|
9300 289.11704 -896.44753 -2979.1981 -2977.7166 1.0353526 1.071955 0.23898813 -1.2558296
|
||||||
|
9400 285.34521 1181.7542 -2979.2879 -2978.0404 0.95298596 0.90818224 0.36461645 -1.1736585
|
||||||
|
9500 296.17714 -2503.9848 -2979.2668 -2978.3301 0.8407037 0.70678272 0.50841734 -1.0540275
|
||||||
|
9600 296.43744 4912.6395 -2979.1829 -2978.5736 0.70352404 0.49494608 0.68312042 -0.86335848
|
||||||
|
9700 288.63317 -3935.8902 -2979.0381 -2978.7635 0.55322477 0.30605764 0.88509388 -0.54108379
|
||||||
|
9800 296.27133 1365.4106 -2978.8723 -2978.8969 0.40665162 0.16536554 1.0460992 -0.092552905
|
||||||
|
9900 299.37628 -1267.2668 -2978.5934 -2978.9673 0.29467695 0.086834506 0.80391757 -0.38307943
|
||||||
|
10000 296.60645 1950.1018 -2978.2725 -2978.9739 0.28169006 0.079349287 0.70171659 -0.62026504
|
||||||
|
Loop time of 47.4814 on 1 procs for 10000 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 36.393 ns/day, 0.659 hours/ns, 210.609 timesteps/s, 181.966 katom-step/s
|
||||||
|
99.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 46.299 | 46.299 | 46.299 | 0.0 | 97.51
|
||||||
|
Neigh | 0.010908 | 0.010908 | 0.010908 | 0.0 | 0.02
|
||||||
|
Comm | 0.29643 | 0.29643 | 0.29643 | 0.0 | 0.62
|
||||||
|
Output | 0.0090682 | 0.0090682 | 0.0090682 | 0.0 | 0.02
|
||||||
|
Modify | 0.7406 | 0.7406 | 0.7406 | 0.0 | 1.56
|
||||||
|
Other | | 0.1254 | | | 0.26
|
||||||
|
|
||||||
|
Nlocal: 864 ave 864 max 864 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 3767 ave 3767 max 3767 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 96746 ave 96746 max 96746 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 96746
|
||||||
|
Ave neighs/atom = 111.97454
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:47
|
||||||
177
examples/PACKAGES/moments/log.02May2025.simple.g++.4
Normal file
177
examples/PACKAGES/moments/log.02May2025.simple.g++.4
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.010 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 5 200 100 v_toteng mean stddev variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step temp press etotal f_2[*]
|
||||||
|
|
||||||
|
thermo 100
|
||||||
|
run 10000
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.42 | 3.42 | 3.42 Mbytes
|
||||||
|
Step Temp Press TotEng f_2[1] f_2[2] f_2[3] f_2[4] f_2[5]
|
||||||
|
0 1000 -107410.22 -2884.9159 0 0 0 0 0
|
||||||
|
100 492.38014 -134.33622 -2928.6874 -2927.2291 1.7092959 2.9216925 2.5081594 6.099781
|
||||||
|
200 484.82396 -214.26318 -2931.4603 -2928.71 2.0003214 4.0012857 1.3645049 3.3103886
|
||||||
|
300 476.69743 15.78678 -2934.0022 -2930.0515 2.5470901 6.4876682 0.6954232 0.86102766
|
||||||
|
400 482.51415 141.67184 -2936.9347 -2931.4152 3.2681043 10.680505 0.30641098 -0.22337036
|
||||||
|
500 455.45411 2.4424602 -2939.9649 -2932.8397 4.1076295 16.87262 0.10483325 -0.6997127
|
||||||
|
600 455.20054 -6.8170934 -2943.0454 -2934.2947 4.9842257 24.842506 0.018003661 -0.92490336
|
||||||
|
700 429.81168 -75.812923 -2946.0438 -2935.7704 5.8766819 34.53539 -0.019539731 -1.0444564
|
||||||
|
800 428.22097 604.18705 -2948.9285 -2937.2449 6.7522047 45.592268 -0.026384526 -1.1194924
|
||||||
|
900 399.10914 -3622.6904 -2951.7252 -2938.7094 7.6043904 57.826753 -0.019997758 -1.1658244
|
||||||
|
1000 394.62543 7905.9041 -2954.2925 -2940.15 8.4168551 70.84345 -0.0026187371 -1.2004009
|
||||||
|
1100 404.27007 -2565.5508 -2956.9736 -2943.0009 8.3722389 70.094384 0.015852037 -1.2665587
|
||||||
|
1200 368.47178 741.43707 -2959.4264 -2945.8091 8.3127243 69.101386 0.069744698 -1.2412651
|
||||||
|
1300 360.91266 -267.08372 -2961.69 -2948.5981 8.1334656 66.153263 0.1116445 -1.2129213
|
||||||
|
1400 356.74405 158.09093 -2963.8501 -2951.3302 7.8574973 61.740264 0.13825232 -1.1999727
|
||||||
|
1500 335.45696 -71.007783 -2965.8817 -2953.9689 7.5384846 56.82875 0.15915227 -1.1877331
|
||||||
|
1600 331.01199 -454.90004 -2967.7708 -2956.5 7.1862592 51.642321 0.17403957 -1.1840985
|
||||||
|
1700 329.223 2428.4284 -2969.5452 -2958.9073 6.8228029 46.55064 0.19027454 -1.1778276
|
||||||
|
1800 327.61481 -4757.648 -2971.1105 -2961.1863 6.4445074 41.531675 0.20819854 -1.1712539
|
||||||
|
1900 318.18741 2226.7765 -2972.6906 -2963.3396 6.0703365 36.848986 0.22378928 -1.1556732
|
||||||
|
2000 308.79313 -1089.8603 -2974.0899 -2965.3712 5.6913723 32.391718 0.23279863 -1.1445916
|
||||||
|
2100 303.32047 757.53534 -2975.3597 -2967.2741 5.3153102 28.252523 0.23857925 -1.1465858
|
||||||
|
2200 307.41102 -837.97246 -2976.4966 -2969.0433 4.9515105 24.517456 0.25216298 -1.1426077
|
||||||
|
2300 303.01088 1618.29 -2977.5454 -2970.6862 4.593227 21.097734 0.26914071 -1.1356519
|
||||||
|
2400 297.59385 -3233.8282 -2978.4064 -2972.2049 4.235209 17.936995 0.28804295 -1.1332908
|
||||||
|
2500 288.72232 5209.2099 -2979.1999 -2973.5963 3.8804647 15.058006 0.31533205 -1.1258312
|
||||||
|
2600 298.92201 -2193.618 -2979.8873 -2974.8649 3.5301507 12.461964 0.34927897 -1.1048024
|
||||||
|
2700 282.61818 765.88178 -2980.4563 -2976.0148 3.1852407 10.145758 0.3879755 -1.0655899
|
||||||
|
2800 273.63104 -389.49749 -2980.8636 -2977.0468 2.8322558 8.021673 0.4259426 -1.0370247
|
||||||
|
2900 274.12166 -9.2552992 -2981.1421 -2977.9525 2.4816703 6.1586877 0.47721359 -1.0061337
|
||||||
|
3000 279.43592 212.25445 -2981.2716 -2978.7309 2.1328425 4.5490171 0.5532015 -0.94983292
|
||||||
|
3100 291.10071 -1139.205 -2981.2475 -2979.3812 1.7828537 3.1785674 0.66452451 -0.83906914
|
||||||
|
3200 281.53171 3124.6411 -2981.0818 -2979.9003 1.4287164 2.0412304 0.81952022 -0.6386061
|
||||||
|
3300 277.0223 -2795.9494 -2980.7825 -2980.287 1.0830229 1.1729385 1.0186688 -0.26502454
|
||||||
|
3400 284.8443 1587.8876 -2980.3701 -2980.5435 0.76893619 0.59126286 1.1646672 0.27529682
|
||||||
|
3500 281.19 -1143.0785 -2979.8374 -2980.6693 0.54860209 0.30096426 0.79069857 -0.36626891
|
||||||
|
3600 296.58287 1156.4706 -2979.2182 -2980.6646 0.55745952 0.31076112 0.81914175 -0.31895116
|
||||||
|
3700 297.24517 -1888.4993 -2978.5352 -2980.5318 0.77195451 0.59591377 1.0713124 -0.027796216
|
||||||
|
3800 290.81586 3843.3483 -2977.8509 -2980.2819 1.0444771 1.0909324 0.88270245 -0.57339499
|
||||||
|
3900 300.39456 -5584.8386 -2977.0837 -2979.9273 1.3073719 1.7092212 0.65444496 -0.94023014
|
||||||
|
4000 306.15811 3310.0105 -2976.5086 -2979.4859 1.5269967 2.3317191 0.45120199 -1.1665402
|
||||||
|
4100 295.907 -1475.0458 -2975.9096 -2978.9779 1.6878413 2.8488082 0.27738537 -1.2909517
|
||||||
|
4200 322.70162 933.76586 -2975.3867 -2978.425 1.7872637 3.1943116 0.12322364 -1.3421568
|
||||||
|
4300 306.69631 -512.7048 -2974.9324 -2977.8465 1.8221493 3.3202281 -0.016769435 -1.3380921
|
||||||
|
4400 309.23776 226.77219 -2974.5791 -2977.2621 1.788532 3.1988469 -0.14279249 -1.3044784
|
||||||
|
4500 313.15783 508.29785 -2974.3263 -2976.6947 1.6959722 2.8763217 -0.26351575 -1.2425552
|
||||||
|
4600 316.26151 -2043.7571 -2974.1697 -2976.1635 1.5525328 2.4103582 -0.38443906 -1.156175
|
||||||
|
4700 312.27329 1831.682 -2974.1732 -2975.6917 1.3614048 1.8534231 -0.52504872 -1.0383081
|
||||||
|
4800 307.61066 -1476.0019 -2974.2885 -2975.296 1.1354139 1.2891647 -0.69734331 -0.84719677
|
||||||
|
4900 305.73489 1303.4848 -2974.5506 -2974.9905 0.8913743 0.79454814 -0.90609876 -0.50216921
|
||||||
|
5000 309.3774 -1574.6812 -2974.8687 -2974.7812 0.65272109 0.42604482 -1.0613188 0.00291608
|
||||||
|
5100 304.8602 2679.7476 -2975.3082 -2974.6718 0.4727141 0.22345862 -0.75321909 -0.42028824
|
||||||
|
5200 297.54226 -5008.0905 -2975.7443 -2974.6646 0.45797515 0.20974124 -0.66557441 -0.64583954
|
||||||
|
5300 306.18872 4840.4175 -2976.324 -2974.7575 0.61348896 0.3763687 -1.0084709 -0.10258503
|
||||||
|
5400 299.57661 -2513.1706 -2976.8842 -2974.9472 0.83376011 0.69515592 -0.88189118 -0.55222188
|
||||||
|
5500 302.30844 1301.3525 -2977.4539 -2975.2244 1.0486412 1.0996484 -0.65075151 -0.94687541
|
||||||
|
5600 302.11038 -760.79712 -2977.9764 -2975.5765 1.2259535 1.502962 -0.44510538 -1.1709493
|
||||||
|
5700 294.49825 718.67318 -2978.4584 -2975.9844 1.357155 1.8418697 -0.27309672 -1.2848748
|
||||||
|
5800 305.97636 -478.64224 -2978.8638 -2976.429 1.4331646 2.0539608 -0.1197893 -1.3417863
|
||||||
|
5900 291.93868 -419.74179 -2979.2292 -2976.8905 1.4535887 2.1129201 0.024018983 -1.349863
|
||||||
|
6000 289.50667 859.85085 -2979.5018 -2977.3557 1.4249736 2.0305497 0.15271261 -1.3095465
|
||||||
|
6100 305.70118 -933.35917 -2979.6877 -2977.8064 1.3480601 1.8172659 0.27785119 -1.2402584
|
||||||
|
6200 284.37805 1526.0707 -2979.806 -2978.2265 1.2296781 1.5121082 0.40681415 -1.1355005
|
||||||
|
6300 291.08863 -2156.6708 -2979.8064 -2978.6017 1.0733214 1.1520189 0.54137333 -1.0156432
|
||||||
|
6400 295.99073 2819.8245 -2979.7378 -2978.9165 0.8941904 0.79957647 0.7073501 -0.82385123
|
||||||
|
6500 298.06769 -3396.3504 -2979.5428 -2979.1626 0.70228297 0.49320137 0.91043588 -0.48653641
|
||||||
|
6600 301.78514 5496.6525 -2979.2768 -2979.3329 0.51276653 0.26292952 1.0681056 -0.036293782
|
||||||
|
6700 290.80665 -5229.4989 -2978.9177 -2979.4217 0.36990055 0.13682642 0.81466085 -0.37332419
|
||||||
|
6800 296.75761 2401.7807 -2978.5996 -2979.4338 0.34589164 0.11964103 0.65253856 -0.7737558
|
||||||
|
6900 295.77553 -1521.6269 -2978.1619 -2979.3685 0.46007271 0.21166689 1.0427138 -0.013014477
|
||||||
|
7000 303.59015 1530.7255 -2977.7097 -2979.225 0.63320287 0.40094588 0.93012255 -0.45527217
|
||||||
|
7100 297.51038 -3016.4426 -2977.2025 -2979.0103 0.81101521 0.65774567 0.7114444 -0.84465178
|
||||||
|
7200 293.53789 2705.9808 -2976.7651 -2978.7294 0.97512025 0.95085951 0.52979295 -1.0479526
|
||||||
|
7300 301.78809 -1042.1076 -2976.3388 -2978.3998 1.1024575 1.2154126 0.35564664 -1.2137023
|
||||||
|
7400 307.50053 214.56923 -2975.9581 -2978.0341 1.188001 1.4113463 0.20025025 -1.3077784
|
||||||
|
7500 301.98985 281.86495 -2975.6146 -2977.6451 1.2301918 1.5133718 0.063886193 -1.3465506
|
||||||
|
7600 318.37347 -1145.7795 -2975.3473 -2977.2486 1.2295055 1.5116837 -0.066939137 -1.3475567
|
||||||
|
7700 314.94512 4536.9887 -2975.1351 -2976.8564 1.1948121 1.427576 -0.19450637 -1.2864658
|
||||||
|
7800 312.91485 -2980.6408 -2975.0156 -2976.4828 1.1134406 1.2397499 -0.32749726 -1.207718
|
||||||
|
7900 310.06854 2244.3877 -2975.0094 -2976.1462 0.99080702 0.98169854 -0.48336959 -1.0840695
|
||||||
|
8000 308.55007 -2427.1464 -2975.0491 -2975.8566 0.83800849 0.70225823 -0.65822117 -0.89212512
|
||||||
|
8100 323.02796 3187.4728 -2975.2081 -2975.6251 0.66510054 0.44235872 -0.84857729 -0.62984027
|
||||||
|
8200 327.05029 -6447.7875 -2975.3162 -2975.4608 0.49730291 0.24731018 -1.0534735 -0.14095413
|
||||||
|
8300 311.194 4273.1174 -2975.7217 -2975.3642 0.35491458 0.12596436 -0.95967595 -0.04445204
|
||||||
|
8400 290.61931 -2301.019 -2976.0963 -2975.3446 0.31530296 0.09941596 -0.69056625 -0.72257435
|
||||||
|
8500 314.00559 1966.1297 -2976.5206 -2975.3995 0.41659574 0.17355201 -1.1134124 0.18107632
|
||||||
|
8600 288.26541 -1608.4524 -2976.9304 -2975.526 0.57968749 0.33603759 -1.0014591 -0.34698354
|
||||||
|
8700 298.92083 1353.9988 -2977.355 -2975.7203 0.74176087 0.55020919 -0.74109062 -0.86227705
|
||||||
|
8800 299.97274 -638.68301 -2977.766 -2975.9682 0.87950613 0.77353104 -0.50839929 -1.1555064
|
||||||
|
8900 300.66443 -279.62514 -2978.1476 -2976.262 0.99526406 0.99055054 -0.33059914 -1.261881
|
||||||
|
9000 290.44715 489.06352 -2978.4892 -2976.5918 1.0763797 1.1585932 -0.17871557 -1.3082755
|
||||||
|
9100 289.06733 -1063.4482 -2978.784 -2976.943 1.1174524 1.2486999 -0.037767225 -1.3120851
|
||||||
|
9200 297.63931 2664.6535 -2979.0202 -2977.3033 1.1127042 1.2381106 0.090936095 -1.2913777
|
||||||
|
9300 297.9983 -4684.428 -2979.1316 -2977.6563 1.0596342 1.1228247 0.20756305 -1.2867214
|
||||||
|
9400 285.14009 2779.1548 -2979.2804 -2977.9868 0.98034602 0.96107833 0.33668495 -1.2294268
|
||||||
|
9500 284.11569 -2437.5003 -2979.2918 -2978.2852 0.87286876 0.76189987 0.48407552 -1.1274969
|
||||||
|
9600 291.97193 2772.1396 -2979.2473 -2978.5402 0.74294711 0.55197041 0.67450455 -0.91152584
|
||||||
|
9700 292.59563 -3615.4496 -2979.0801 -2978.7442 0.59448857 0.35341666 0.91630006 -0.47180257
|
||||||
|
9800 296.1785 4869.2744 -2978.8849 -2978.891 0.43463281 0.18890568 1.1020846 0.093881572
|
||||||
|
9900 298.44745 -3587.7391 -2978.5978 -2978.9712 0.30680426 0.094128854 0.8532075 -0.19634913
|
||||||
|
10000 297.99863 1312.5643 -2978.3205 -2978.9854 0.27829395 0.077447522 0.60818263 -0.79004935
|
||||||
|
Loop time of 15.3108 on 4 procs for 10000 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 112.862 ns/day, 0.213 hours/ns, 653.136 timesteps/s, 564.309 katom-step/s
|
||||||
|
92.4% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 11.428 | 12.158 | 12.621 | 13.0 | 79.41
|
||||||
|
Neigh | 0.0019158 | 0.0020708 | 0.002163 | 0.2 | 0.01
|
||||||
|
Comm | 1.936 | 2.3948 | 3.0967 | 28.3 | 15.64
|
||||||
|
Output | 0.0026067 | 0.0037308 | 0.0066123 | 2.7 | 0.02
|
||||||
|
Modify | 0.44688 | 0.45929 | 0.47131 | 1.6 | 3.00
|
||||||
|
Other | | 0.2928 | | | 1.91
|
||||||
|
|
||||||
|
Nlocal: 216 ave 224 max 204 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 2 0 1
|
||||||
|
Nghost: 2147 ave 2159 max 2139 min
|
||||||
|
Histogram: 1 0 0 2 0 0 0 0 0 1
|
||||||
|
Neighs: 24185.8 ave 26045 max 21309 min
|
||||||
|
Histogram: 1 0 0 0 0 1 0 0 0 2
|
||||||
|
|
||||||
|
Total # of neighbors = 96743
|
||||||
|
Ave neighs/atom = 111.97106
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:15
|
||||||
178
examples/PACKAGES/moments/log.02May2025.valtest.g++.1
Normal file
178
examples/PACKAGES/moments/log.02May2025.valtest.g++.1
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.001 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 1 10 10 v_toteng mean variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step etotal f_2[*]
|
||||||
|
thermo_modify format float %14.8f
|
||||||
|
|
||||||
|
thermo 1
|
||||||
|
run 100
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.484 | 3.484 | 3.484 Mbytes
|
||||||
|
Step TotEng f_2[1] f_2[2] f_2[3] f_2[4]
|
||||||
|
0 -2884.91592826 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
1 -2888.74461907 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
2 -2898.78491936 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
3 -2910.70619667 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
4 -2919.41734302 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
5 -2923.24980175 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
6 -2923.79800148 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
7 -2922.97580252 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
8 -2921.95601941 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
9 -2921.45319499 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
10 -2921.81460149 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
11 -2923.00059466 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
12 -2924.63075671 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
13 -2926.18037946 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
14 -2927.22356281 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
15 -2927.62053073 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
16 -2927.49949128 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
17 -2927.12292174 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
18 -2926.73637250 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
19 -2926.49482990 -2915.29004998 148.32538381 1.60272422 1.50844200
|
||||||
|
20 -2926.44714720 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
21 -2926.56102718 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
22 -2926.76734347 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
23 -2926.98403044 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
24 -2927.15193693 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
25 -2927.24498540 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
26 -2927.26914121 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
27 -2927.25021402 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
28 -2927.21637817 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
29 -2927.19085616 -2926.29565870 2.07215006 1.62317861 2.37019300
|
||||||
|
30 -2927.18360687 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
31 -2927.19243579 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
32 -2927.20805612 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
33 -2927.22285606 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
34 -2927.23274852 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
35 -2927.23953263 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
36 -2927.24805761 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
37 -2927.26215638 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
38 -2927.28298252 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
39 -2927.31025065 -2927.08195198 0.05722486 1.54894969 1.44984748
|
||||||
|
40 -2927.33874897 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
41 -2927.36224413 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
42 -2927.37729800 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
43 -2927.38671916 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
44 -2927.39115082 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
45 -2927.39614318 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
46 -2927.40444730 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
47 -2927.41888601 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
48 -2927.43954388 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
49 -2927.46210058 -2927.25378252 0.00209108 -0.65432756 -0.21113798
|
||||||
|
50 -2927.48270024 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
51 -2927.49822500 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
52 -2927.50765361 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
53 -2927.51223225 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
54 -2927.51510653 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
55 -2927.52035921 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
56 -2927.53170012 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
57 -2927.54910408 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
58 -2927.57357292 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
59 -2927.60356966 -2927.41212333 0.00148630 -0.72914987 -0.39161968
|
||||||
|
60 -2927.63344447 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
61 -2927.66186165 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
62 -2927.68810360 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
63 -2927.71163480 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
64 -2927.73036225 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
65 -2927.74726656 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
66 -2927.76525638 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
67 -2927.78432762 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
68 -2927.80305095 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
69 -2927.82406714 -2927.54449679 0.00204640 -1.06571776 0.04430271
|
||||||
|
70 -2927.84622122 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
71 -2927.86886493 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
72 -2927.89150302 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
73 -2927.91480122 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
74 -2927.93739399 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
75 -2927.96075707 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
76 -2927.98525702 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
77 -2928.00918972 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
78 -2928.03266453 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
79 -2928.05673430 -2927.75621522 0.00356092 0.06232090 -0.94076248
|
||||||
|
80 -2928.08120268 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
81 -2928.10618717 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
82 -2928.13191751 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
83 -2928.15675025 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
84 -2928.18178044 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
85 -2928.20538210 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
86 -2928.22991006 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
87 -2928.25238345 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
88 -2928.27490378 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
89 -2928.29697980 -2927.97383685 0.00511363 -0.03242365 -1.20956903
|
||||||
|
90 -2928.31902032 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
91 -2928.34079951 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
92 -2928.36448072 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
93 -2928.38918869 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
94 -2928.41578734 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
95 -2928.44466633 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
96 -2928.47414034 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
97 -2928.50507273 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
98 -2928.53751007 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
99 -2928.56947939 -2928.21552149 0.00511983 0.08421866 -1.19120544
|
||||||
|
100 -2928.60000318 -2928.46411283 0.00779929 -0.14908790 -1.24292534
|
||||||
|
Loop time of 0.579661 on 1 procs for 100 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 29.811 ns/day, 0.805 hours/ns, 172.515 timesteps/s, 149.053 katom-step/s
|
||||||
|
96.3% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.54316 | 0.54316 | 0.54316 | 0.0 | 93.70
|
||||||
|
Neigh | 0.0041212 | 0.0041212 | 0.0041212 | 0.0 | 0.71
|
||||||
|
Comm | 0.0034702 | 0.0034702 | 0.0034702 | 0.0 | 0.60
|
||||||
|
Output | 0.014085 | 0.014085 | 0.014085 | 0.0 | 2.43
|
||||||
|
Modify | 0.01321 | 0.01321 | 0.01321 | 0.0 | 2.28
|
||||||
|
Other | | 0.001612 | | | 0.28
|
||||||
|
|
||||||
|
Nlocal: 864 ave 864 max 864 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 3767 ave 3767 max 3767 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 96746 ave 96746 max 96746 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 96746
|
||||||
|
Ave neighs/atom = 111.97454
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:00
|
||||||
178
examples/PACKAGES/moments/log.02May2025.valtest.g++.4
Normal file
178
examples/PACKAGES/moments/log.02May2025.valtest.g++.4
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_4Feb2025-645-gba166d42e1-modified)
|
||||||
|
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# create pure copper system
|
||||||
|
units metal
|
||||||
|
lattice fcc 3.75
|
||||||
|
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||||
|
region box block 0 6 0 6 0 6
|
||||||
|
create_box 2 box
|
||||||
|
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
|
||||||
|
timestep 0.002
|
||||||
|
create_atoms 1 box
|
||||||
|
Created 864 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||||
|
create_atoms CPU = 0.001 seconds
|
||||||
|
|
||||||
|
pair_style eam/alloy
|
||||||
|
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||||
|
|
||||||
|
# Initialize to a high temperature, then cool in npt ensemble
|
||||||
|
velocity all create 1000.0 6567345
|
||||||
|
fix 1 all npt temp 300.0 300.0 $(500*dt) iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 $(100*dt)
|
||||||
|
fix 1 all npt temp 300.0 300.0 1 iso 0.0 0.0 0.2000000000000000111
|
||||||
|
|
||||||
|
variable toteng equal "etotal"
|
||||||
|
fix 2 all ave/moments 1 10 10 v_toteng mean variance skew kurtosis
|
||||||
|
|
||||||
|
thermo_style custom step etotal f_2[*]
|
||||||
|
thermo_modify format float %14.8f
|
||||||
|
|
||||||
|
thermo 1
|
||||||
|
run 100
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 8.6825
|
||||||
|
ghost atom cutoff = 8.6825
|
||||||
|
binsize = 4.34125, bins = 6 6 6
|
||||||
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||||
|
(1) pair eam/alloy, perpetual
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: half/bin/atomonly/newton
|
||||||
|
stencil: half/bin/3d
|
||||||
|
bin: standard
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 3.42 | 3.42 | 3.42 Mbytes
|
||||||
|
Step TotEng f_2[1] f_2[2] f_2[3] f_2[4]
|
||||||
|
0 -2884.91592826 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
1 -2888.74473521 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
2 -2898.78463435 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
3 -2910.70366466 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
4 -2919.40999553 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
5 -2923.23570887 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
6 -2923.77707961 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
7 -2922.94386730 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
8 -2921.92251474 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
9 -2921.42476103 0.00000000 0.00000000 0.00000000 0.00000000
|
||||||
|
10 -2921.79501042 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
11 -2922.99498349 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
12 -2924.64023395 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
13 -2926.19980790 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
14 -2927.25022454 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
15 -2927.64953875 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
16 -2927.52804735 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
17 -2927.14916045 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
18 -2926.76078244 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
19 -2926.51878380 -2915.27419717 148.08574615 1.60354430 1.51194865
|
||||||
|
20 -2926.47129883 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
21 -2926.59030835 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
22 -2926.80121221 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
23 -2927.02526150 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
24 -2927.20079704 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
25 -2927.30192483 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
26 -2927.33194351 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
27 -2927.31647527 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
28 -2927.28391864 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
29 -2927.25821953 -2926.31628615 2.10313655 1.62594474 2.38000930
|
||||||
|
30 -2927.25085808 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
31 -2927.25723201 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
32 -2927.27197789 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
33 -2927.28667044 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
34 -2927.29879455 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
35 -2927.30701891 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
36 -2927.31785921 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
37 -2927.33272014 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
38 -2927.35282056 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
39 -2927.37849130 -2927.13609190 0.06387000 1.52055179 1.31247839
|
||||||
|
40 -2927.40448350 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
41 -2927.42423249 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
42 -2927.43769919 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
43 -2927.44493813 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
44 -2927.44923137 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
45 -2927.45439729 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
46 -2927.46365674 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
47 -2927.48173952 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
48 -2927.50371663 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
49 -2927.52750629 -2927.32080685 0.00219675 -0.52051260 -0.50322958
|
||||||
|
50 -2927.54872274 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
51 -2927.56277664 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
52 -2927.57050508 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
53 -2927.57241043 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
54 -2927.57517748 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
55 -2927.58161786 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
56 -2927.59393740 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
57 -2927.61367876 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
58 -2927.64096296 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
59 -2927.67356621 -2927.47358404 0.00168128 -0.79883601 -0.48497973
|
||||||
|
60 -2927.70625176 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
61 -2927.73673853 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
62 -2927.76292153 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
63 -2927.78541405 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
64 -2927.80292853 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
65 -2927.81988675 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
66 -2927.83680256 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
67 -2927.85379296 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
68 -2927.87418119 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
69 -2927.89451588 -2927.60908846 0.00241645 -1.10903745 0.07175615
|
||||||
|
70 -2927.91602570 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
71 -2927.93874793 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
72 -2927.96195498 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
73 -2927.98521535 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
74 -2928.01060565 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
75 -2928.03584561 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
76 -2928.06090892 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
77 -2928.08509438 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
78 -2928.11095399 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
79 -2928.13711339 -2927.82832077 0.00334657 0.04700770 -0.91589129
|
||||||
|
80 -2928.16413424 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
81 -2928.19005959 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
82 -2928.21654649 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
83 -2928.24249986 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
84 -2928.26861892 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
85 -2928.29480718 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
86 -2928.32144325 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
87 -2928.34727619 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
88 -2928.37131285 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
89 -2928.39531126 -2928.04905744 0.00575008 -0.05409710 -1.19501222
|
||||||
|
90 -2928.41739503 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
91 -2928.43978811 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
92 -2928.46316822 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
93 -2928.48654219 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
94 -2928.51132482 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
95 -2928.53938009 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
96 -2928.56852408 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
97 -2928.59814410 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
98 -2928.62787940 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
99 -2928.65853178 -2928.30652706 0.00595440 0.06693205 -1.24851322
|
||||||
|
100 -2928.68735978 -2928.55806426 0.00711607 -0.13829819 -1.25519738
|
||||||
|
Loop time of 0.327437 on 4 procs for 100 steps with 864 atoms
|
||||||
|
|
||||||
|
Performance: 52.774 ns/day, 0.455 hours/ns, 305.402 timesteps/s, 263.868 katom-step/s
|
||||||
|
91.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0.27213 | 0.27259 | 0.27312 | 0.1 | 83.25
|
||||||
|
Neigh | 0.00096945 | 0.0015991 | 0.0022533 | 1.5 | 0.49
|
||||||
|
Comm | 0.026726 | 0.027088 | 0.027516 | 0.2 | 8.27
|
||||||
|
Output | 0.0029839 | 0.0048706 | 0.0097487 | 4.0 | 1.49
|
||||||
|
Modify | 0.012374 | 0.016834 | 0.018623 | 2.0 | 5.14
|
||||||
|
Other | | 0.004455 | | | 1.36
|
||||||
|
|
||||||
|
Nlocal: 216 ave 224 max 204 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 2 0 1
|
||||||
|
Nghost: 2147 ave 2159 max 2139 min
|
||||||
|
Histogram: 1 0 0 2 0 0 0 0 0 1
|
||||||
|
Neighs: 24185.8 ave 26045 max 21309 min
|
||||||
|
Histogram: 1 0 0 0 0 1 0 0 0 2
|
||||||
|
|
||||||
|
Total # of neighbors = 96743
|
||||||
|
Ave neighs/atom = 111.97106
|
||||||
|
Neighbor list builds = 1
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
Total wall time: 0:00:00
|
||||||
1
examples/PACKAGES/neighbor-swap/MoCoNiVFeAlCr_2nn.meam
Symbolic link
1
examples/PACKAGES/neighbor-swap/MoCoNiVFeAlCr_2nn.meam
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../potentials/MoCoNiVFeAlCr_2nn.meam
|
||||||
46
examples/PACKAGES/neighbor-swap/in.KMC_pulse_center
Normal file
46
examples/PACKAGES/neighbor-swap/in.KMC_pulse_center
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
create_atoms 1 region whole
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
|
||||||
|
region puck block INF INF 7 9 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124 loop geom
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
|
||||||
|
#write_data pulse_center.data
|
||||||
47
examples/PACKAGES/neighbor-swap/in.KMC_pulse_edge
Normal file
47
examples/PACKAGES/neighbor-swap/in.KMC_pulse_edge
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
create_atoms 1 region whole
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
|
||||||
|
region puck block INF INF INF 2 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124 loop geom
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
|
||||||
|
#write_data pulse_end.data
|
||||||
1
examples/PACKAGES/neighbor-swap/library_2nn.meam
Symbolic link
1
examples/PACKAGES/neighbor-swap/library_2nn.meam
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../potentials/library_2nn.meam
|
||||||
@ -0,0 +1,154 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-384-g88bc7dc720-modified)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
Lattice spacing in x,y,z = 3.762 3.762 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
Created orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
create_atoms 1 region whole
|
||||||
|
Created 4 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
create_atoms CPU = 0.000 seconds
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
Replication is creating a 6x16x6 = 576 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (22.572 60.192 22.572)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
2304 atoms
|
||||||
|
replicate CPU = 0.000 seconds
|
||||||
|
|
||||||
|
region puck block INF INF 7 9 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
Setting atom values ...
|
||||||
|
360 settings made for type
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
Reading MEAM library file library_2nn.meam with DATE: 2024-08-08
|
||||||
|
Reading MEAM potential file MoCoNiVFeAlCr_2nn.meam with DATE: 2024-08-08
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
WARNING: No fixes with time integration, atoms won't move
|
||||||
|
For more information see https://docs.lammps.org/err0028 (src/verlet.cpp:60)
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 6.8
|
||||||
|
ghost atom cutoff = 6.8
|
||||||
|
binsize = 3.4, bins = 7 18 7
|
||||||
|
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||||
|
(1) pair meam, perpetual
|
||||||
|
attributes: full, newton on
|
||||||
|
pair build: full/bin/atomonly
|
||||||
|
stencil: full/bin/3d
|
||||||
|
bin: standard
|
||||||
|
(2) pair meam, perpetual, half/full from (1)
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: halffull/newton
|
||||||
|
stencil: none
|
||||||
|
bin: none
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 13.32 | 13.32 | 13.32 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -9674.3728 0 -9674.3728 -212400.94
|
||||||
|
Loop time of 1.202e-06 on 1 procs for 0 steps with 2304 atoms
|
||||||
|
|
||||||
|
0.0% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Other | | 1.202e-06 | | |100.00
|
||||||
|
|
||||||
|
Nlocal: 2304 ave 2304 max 2304 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 4735 ave 4735 max 4735 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 99072 ave 99072 max 99072 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 198144 ave 198144 max 198144 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 198144
|
||||||
|
Ave neighs/atom = 86
|
||||||
|
Neighbor list builds = 0
|
||||||
|
Dangerous builds = 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 13.32 | 13.32 | 13.32 Mbytes
|
||||||
|
Step Temp Press Pxx Pyy Pzz Lx Ly Lz Volume PotEng f_mc[1] f_mc[2]
|
||||||
|
0 2400 -187517.52 -187403.07 -187750.14 -187399.35 22.572 60.192 22.572 30667.534 -9674.3728 0 0
|
||||||
|
100 1664.9956 14000 14280.682 15095.077 12624.241 21.635315 57.726568 21.64791 27036.778 -9592.8978 24 22
|
||||||
|
200 1560.0093 -5452.2434 -5749.5816 -2957.4228 -7649.7258 21.734212 58.085959 21.724853 27426.596 -9562.8822 48 45
|
||||||
|
300 1586.4553 2030.9253 2776.4677 775.50538 2540.803 21.678654 58.101753 21.654423 27275.215 -9571.1308 72 66
|
||||||
|
400 1603.6896 -223.16773 156.17673 -478.47929 -347.20061 21.701021 58.098904 21.657752 27306.213 -9576.4456 96 90
|
||||||
|
500 1618.236 -925.51874 -1640.9078 451.6228 -1587.2713 21.718334 58.042685 21.666081 27312.054 -9581.2045 120 110
|
||||||
|
600 1581.9995 290.10126 1359.1314 1407.5434 -1896.371 21.679813 58.086147 21.692118 27316.815 -9570.4803 144 132
|
||||||
|
700 1568.3261 1387.3472 938.81523 2159.3686 1063.8577 21.685928 58.075626 21.67273 27295.153 -9566.2914 168 155
|
||||||
|
800 1607.1531 46.792964 -453.90265 -1533.3908 2127.6723 21.685188 58.202356 21.628338 27297.753 -9577.7848 192 177
|
||||||
|
900 1573.4747 -84.225488 548.90935 -1356.7479 555.16208 21.69634 58.150052 21.651847 27316.908 -9567.7039 216 196
|
||||||
|
1000 1609.2136 1215.0833 764.08936 3301.0811 -419.92053 21.683731 58.000401 21.68726 27275.31 -9578.2843 240 219
|
||||||
|
Loop time of 31.6263 on 1 procs for 1000 steps with 2304 atoms
|
||||||
|
|
||||||
|
Performance: 5.464 ns/day, 4.393 hours/ns, 31.619 timesteps/s, 72.851 katom-step/s
|
||||||
|
99.2% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 28.487 | 28.487 | 28.487 | 0.0 | 90.07
|
||||||
|
Neigh | 0.22789 | 0.22789 | 0.22789 | 0.0 | 0.72
|
||||||
|
Comm | 0.010808 | 0.010808 | 0.010808 | 0.0 | 0.03
|
||||||
|
Output | 0.00033526 | 0.00033526 | 0.00033526 | 0.0 | 0.00
|
||||||
|
Modify | 2.8963 | 2.8963 | 2.8963 | 0.0 | 9.16
|
||||||
|
Other | | 0.003905 | | | 0.01
|
||||||
|
|
||||||
|
Nlocal: 2304 ave 2304 max 2304 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 4750 ave 4750 max 4750 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 130023 ave 130023 max 130023 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 260046 ave 260046 max 260046 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 260046
|
||||||
|
Ave neighs/atom = 112.86719
|
||||||
|
Neighbor list builds = 65
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
#write_data pulse_center.data
|
||||||
|
Total wall time: 0:00:31
|
||||||
@ -0,0 +1,154 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-384-g88bc7dc720-modified)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
Lattice spacing in x,y,z = 3.762 3.762 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
Created orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
create_atoms 1 region whole
|
||||||
|
Created 4 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
create_atoms CPU = 0.000 seconds
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
Replication is creating a 6x16x6 = 576 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (22.572 60.192 22.572)
|
||||||
|
1 by 4 by 1 MPI processor grid
|
||||||
|
2304 atoms
|
||||||
|
replicate CPU = 0.000 seconds
|
||||||
|
|
||||||
|
region puck block INF INF 7 9 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
Setting atom values ...
|
||||||
|
360 settings made for type
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
Reading MEAM library file library_2nn.meam with DATE: 2024-08-08
|
||||||
|
Reading MEAM potential file MoCoNiVFeAlCr_2nn.meam with DATE: 2024-08-08
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
WARNING: No fixes with time integration, atoms won't move
|
||||||
|
For more information see https://docs.lammps.org/err0028 (src/verlet.cpp:60)
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 6.8
|
||||||
|
ghost atom cutoff = 6.8
|
||||||
|
binsize = 3.4, bins = 7 18 7
|
||||||
|
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||||
|
(1) pair meam, perpetual
|
||||||
|
attributes: full, newton on
|
||||||
|
pair build: full/bin/atomonly
|
||||||
|
stencil: full/bin/3d
|
||||||
|
bin: standard
|
||||||
|
(2) pair meam, perpetual, half/full from (1)
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: halffull/newton
|
||||||
|
stencil: none
|
||||||
|
bin: none
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 9.636 | 9.636 | 9.636 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -9674.3728 0 -9674.3728 -212400.94
|
||||||
|
Loop time of 1.422e-06 on 4 procs for 0 steps with 2304 atoms
|
||||||
|
|
||||||
|
35.2% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Other | | 1.422e-06 | | |100.00
|
||||||
|
|
||||||
|
Nlocal: 576 ave 576 max 576 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 2131 ave 2131 max 2131 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 24768 ave 24768 max 24768 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 49536 ave 49536 max 49536 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 198144
|
||||||
|
Ave neighs/atom = 86
|
||||||
|
Neighbor list builds = 0
|
||||||
|
Dangerous builds = 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 9.636 | 9.636 | 9.636 Mbytes
|
||||||
|
Step Temp Press Pxx Pyy Pzz Lx Ly Lz Volume PotEng f_mc[1] f_mc[2]
|
||||||
|
0 2400 -187517.52 -187403.09 -187750.05 -187399.42 22.572 60.192 22.572 30667.534 -9674.3728 0 0
|
||||||
|
100 1668.8754 13300.763 12419.304 15568.772 11914.212 21.636248 57.724775 21.647685 27036.823 -9594.7526 24 23
|
||||||
|
200 1584.9699 -5686.0414 -4741.8496 -5914.7681 -6401.5064 21.729384 58.060532 21.730736 27415.923 -9571.0639 48 46
|
||||||
|
300 1582.0473 2806.2983 3413.4122 2716.0124 2289.4702 21.6679 58.033587 21.694744 27280.402 -9570.5549 72 69
|
||||||
|
400 1582.5825 845.29268 -849.61221 2123.5339 1261.9563 21.676298 58.14253 21.656418 27293.905 -9570.7948 96 93
|
||||||
|
500 1591.7285 -501.17955 1151.9743 -1719.3712 -936.14174 21.696367 58.157211 21.648308 27315.839 -9573.5089 120 116
|
||||||
|
600 1610.708 -821.74669 -1002.4957 291.88502 -1754.6294 21.730338 58.008213 21.661226 27304.8 -9579.5573 144 138
|
||||||
|
700 1598.5176 -590.00633 -1844.42 408.97706 -334.57602 21.712908 57.96131 21.698129 27307.281 -9575.8973 168 162
|
||||||
|
800 1584.3478 330.16711 666.88818 74.698331 248.91482 21.650908 58.045055 21.719838 27295.933 -9571.9268 192 186
|
||||||
|
900 1557.9946 1471.1207 2124.6512 1526.9937 761.71731 21.645578 58.156083 21.681637 27293.323 -9564.4385 216 207
|
||||||
|
1000 1582.5312 379.57005 -602.96446 2696.737 -955.06238 21.655418 58.231248 21.649581 27300.598 -9571.9879 240 227
|
||||||
|
Loop time of 9.1632 on 4 procs for 1000 steps with 2304 atoms
|
||||||
|
|
||||||
|
Performance: 18.858 ns/day, 1.273 hours/ns, 109.132 timesteps/s, 251.440 katom-step/s
|
||||||
|
98.5% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 7.867 | 7.9923 | 8.1311 | 4.3 | 87.22
|
||||||
|
Neigh | 0.054997 | 0.057518 | 0.060145 | 1.0 | 0.63
|
||||||
|
Comm | 0.017529 | 0.14801 | 0.27408 | 29.5 | 1.62
|
||||||
|
Output | 0.00015963 | 0.00017216 | 0.00020869 | 0.0 | 0.00
|
||||||
|
Modify | 0.95227 | 0.96325 | 0.9917 | 1.7 | 10.51
|
||||||
|
Other | | 0.001983 | | | 0.02
|
||||||
|
|
||||||
|
Nlocal: 576 ave 609 max 540 min
|
||||||
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||||
|
Nghost: 2161.5 ave 2173 max 2151 min
|
||||||
|
Histogram: 1 0 1 0 0 0 1 0 0 1
|
||||||
|
Neighs: 32450.2 ave 35422 max 29271 min
|
||||||
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||||
|
FullNghs: 64900.5 ave 70800 max 58684 min
|
||||||
|
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||||
|
|
||||||
|
Total # of neighbors = 259602
|
||||||
|
Ave neighs/atom = 112.67448
|
||||||
|
Neighbor list builds = 62
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
#write_data pulse_center.data
|
||||||
|
Total wall time: 0:00:09
|
||||||
155
examples/PACKAGES/neighbor-swap/log.22May22.KMC_pulse_edge.g++.1
Normal file
155
examples/PACKAGES/neighbor-swap/log.22May22.KMC_pulse_edge.g++.1
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-384-g88bc7dc720-modified)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
Lattice spacing in x,y,z = 3.762 3.762 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
Created orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
create_atoms 1 region whole
|
||||||
|
Created 4 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
create_atoms CPU = 0.000 seconds
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
Replication is creating a 6x16x6 = 576 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (22.572 60.192 22.572)
|
||||||
|
1 by 1 by 1 MPI processor grid
|
||||||
|
2304 atoms
|
||||||
|
replicate CPU = 0.000 seconds
|
||||||
|
|
||||||
|
region puck block INF INF INF 2 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
Setting atom values ...
|
||||||
|
360 settings made for type
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
Reading MEAM library file library_2nn.meam with DATE: 2024-08-08
|
||||||
|
Reading MEAM potential file MoCoNiVFeAlCr_2nn.meam with DATE: 2024-08-08
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
WARNING: No fixes with time integration, atoms won't move
|
||||||
|
For more information see https://docs.lammps.org/err0028 (src/verlet.cpp:60)
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 6.8
|
||||||
|
ghost atom cutoff = 6.8
|
||||||
|
binsize = 3.4, bins = 7 18 7
|
||||||
|
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||||
|
(1) pair meam, perpetual
|
||||||
|
attributes: full, newton on
|
||||||
|
pair build: full/bin/atomonly
|
||||||
|
stencil: full/bin/3d
|
||||||
|
bin: standard
|
||||||
|
(2) pair meam, perpetual, half/full from (1)
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: halffull/newton
|
||||||
|
stencil: none
|
||||||
|
bin: none
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 13.32 | 13.32 | 13.32 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -9674.3728 0 -9674.3728 -212400.94
|
||||||
|
Loop time of 1.232e-06 on 1 procs for 0 steps with 2304 atoms
|
||||||
|
|
||||||
|
81.2% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Other | | 1.232e-06 | | |100.00
|
||||||
|
|
||||||
|
Nlocal: 2304 ave 2304 max 2304 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 4735 ave 4735 max 4735 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 99072 ave 99072 max 99072 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 198144 ave 198144 max 198144 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 198144
|
||||||
|
Ave neighs/atom = 86
|
||||||
|
Neighbor list builds = 0
|
||||||
|
Dangerous builds = 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124 loop geom
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 13.32 | 13.32 | 13.32 Mbytes
|
||||||
|
Step Temp Press Pxx Pyy Pzz Lx Ly Lz Volume PotEng f_mc[1] f_mc[2]
|
||||||
|
0 2400 -187517.52 -187464.47 -188202.62 -186885.48 22.572 60.192 22.572 30667.534 -9674.3728 0 0
|
||||||
|
100 1665.6154 14281.316 14426.547 14555.867 13861.534 21.637238 57.719793 21.637281 27022.733 -9594.4303 24 24
|
||||||
|
200 1603.3309 -7325.7341 -8878.1524 -5333.0485 -7766.0015 21.710246 58.122827 21.725933 27415.106 -9577.4545 48 48
|
||||||
|
300 1603.2974 207.19165 1983.4565 -1841.9518 480.07024 21.678227 58.079126 21.674033 27288.745 -9577.6391 72 69
|
||||||
|
400 1600.1515 810.95054 1087.969 802.04946 542.83316 21.683731 58.045848 21.678505 27285.662 -9576.6508 96 92
|
||||||
|
500 1629.8313 -2808.1005 -3197.9357 310.89931 -5537.265 21.683924 58.090375 21.697076 27330.229 -9585.5435 120 113
|
||||||
|
600 1598.8232 -67.845623 -1573.0718 -1526.7607 2896.2957 21.70213 58.12191 21.653853 27313.504 -9576.4147 144 137
|
||||||
|
700 1607.2185 154.66718 -1777.2469 2566.4705 -325.22208 21.712408 57.971553 21.678708 27287.033 -9579.1772 168 158
|
||||||
|
800 1582.559 -891.23631 -632.46037 -636.88203 -1404.3665 21.671936 58.127004 21.678224 27308.594 -9571.6663 192 180
|
||||||
|
900 1586.7172 -617.17083 -2495.5378 -2302.8766 2946.9018 21.658489 58.181921 21.668968 27305.771 -9572.9641 216 204
|
||||||
|
1000 1607.563 -389.8113 810.4908 298.84287 -2278.7676 21.624573 58.076745 21.724272 27283.183 -9579.5034 240 227
|
||||||
|
Loop time of 31.7733 on 1 procs for 1000 steps with 2304 atoms
|
||||||
|
|
||||||
|
Performance: 5.439 ns/day, 4.413 hours/ns, 31.473 timesteps/s, 72.514 katom-step/s
|
||||||
|
99.2% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 28.604 | 28.604 | 28.604 | 0.0 | 90.02
|
||||||
|
Neigh | 0.21293 | 0.21293 | 0.21293 | 0.0 | 0.67
|
||||||
|
Comm | 0.010645 | 0.010645 | 0.010645 | 0.0 | 0.03
|
||||||
|
Output | 0.00033194 | 0.00033194 | 0.00033194 | 0.0 | 0.00
|
||||||
|
Modify | 2.9411 | 2.9411 | 2.9411 | 0.0 | 9.26
|
||||||
|
Other | | 0.00448 | | | 0.01
|
||||||
|
|
||||||
|
Nlocal: 2304 ave 2304 max 2304 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 4748 ave 4748 max 4748 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 130301 ave 130301 max 130301 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 260602 ave 260602 max 260602 min
|
||||||
|
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 260602
|
||||||
|
Ave neighs/atom = 113.10851
|
||||||
|
Neighbor list builds = 62
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
#write_data pulse_end.data
|
||||||
|
Total wall time: 0:00:31
|
||||||
155
examples/PACKAGES/neighbor-swap/log.22May22.KMC_pulse_edge.g++.4
Normal file
155
examples/PACKAGES/neighbor-swap/log.22May22.KMC_pulse_edge.g++.4
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-384-g88bc7dc720-modified)
|
||||||
|
using 1 OpenMP thread(s) per MPI task
|
||||||
|
# May 2025
|
||||||
|
# Test script for MD-KMC accelerated diffusion testing in LAMMPS
|
||||||
|
# Created by Jacob Tavenner, Baylor University
|
||||||
|
|
||||||
|
# Initiation -------------------------------------
|
||||||
|
units metal
|
||||||
|
dimension 3
|
||||||
|
boundary p p p
|
||||||
|
atom_style atomic
|
||||||
|
|
||||||
|
|
||||||
|
# Atom Definition --------------------------------
|
||||||
|
lattice fcc 3.762
|
||||||
|
Lattice spacing in x,y,z = 3.762 3.762 3.762
|
||||||
|
region whole block 0 1 0 1 0 1
|
||||||
|
create_box 2 whole
|
||||||
|
Created orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
1 by 2 by 2 MPI processor grid
|
||||||
|
create_atoms 1 region whole
|
||||||
|
Created 4 atoms
|
||||||
|
using lattice units in orthogonal box = (0 0 0) to (3.762 3.762 3.762)
|
||||||
|
create_atoms CPU = 0.000 seconds
|
||||||
|
|
||||||
|
replicate 6 16 6
|
||||||
|
Replication is creating a 6x16x6 = 576 times larger system...
|
||||||
|
orthogonal box = (0 0 0) to (22.572 60.192 22.572)
|
||||||
|
1 by 4 by 1 MPI processor grid
|
||||||
|
2304 atoms
|
||||||
|
replicate CPU = 0.000 seconds
|
||||||
|
|
||||||
|
region puck block INF INF INF 2 INF INF
|
||||||
|
set region puck type 2
|
||||||
|
Setting atom values ...
|
||||||
|
360 settings made for type
|
||||||
|
|
||||||
|
# Force Fields -----------------------------------
|
||||||
|
pair_style meam
|
||||||
|
pair_coeff * * library_2nn.meam Mo Co Ni V Fe Al Cr MoCoNiVFeAlCr_2nn.meam Ni Cr
|
||||||
|
Reading MEAM library file library_2nn.meam with DATE: 2024-08-08
|
||||||
|
Reading MEAM potential file MoCoNiVFeAlCr_2nn.meam with DATE: 2024-08-08
|
||||||
|
|
||||||
|
# Settings ---------------------------------------
|
||||||
|
timestep 0.002
|
||||||
|
thermo 100
|
||||||
|
|
||||||
|
# Computations -----------------------------------
|
||||||
|
compute voroN all voronoi/atom neighbors yes
|
||||||
|
|
||||||
|
run 0
|
||||||
|
WARNING: No fixes with time integration, atoms won't move
|
||||||
|
For more information see https://docs.lammps.org/err0028 (src/verlet.cpp:60)
|
||||||
|
Neighbor list info ...
|
||||||
|
update: every = 1 steps, delay = 0 steps, check = yes
|
||||||
|
max neighbors/atom: 2000, page size: 100000
|
||||||
|
master list distance cutoff = 6.8
|
||||||
|
ghost atom cutoff = 6.8
|
||||||
|
binsize = 3.4, bins = 7 18 7
|
||||||
|
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||||
|
(1) pair meam, perpetual
|
||||||
|
attributes: full, newton on
|
||||||
|
pair build: full/bin/atomonly
|
||||||
|
stencil: full/bin/3d
|
||||||
|
bin: standard
|
||||||
|
(2) pair meam, perpetual, half/full from (1)
|
||||||
|
attributes: half, newton on
|
||||||
|
pair build: halffull/newton
|
||||||
|
stencil: none
|
||||||
|
bin: none
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 9.636 | 9.636 | 9.636 Mbytes
|
||||||
|
Step Temp E_pair E_mol TotEng Press
|
||||||
|
0 0 -9674.3728 0 -9674.3728 -212400.94
|
||||||
|
Loop time of 1.53e-06 on 4 procs for 0 steps with 2304 atoms
|
||||||
|
|
||||||
|
65.4% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||||
|
Other | | 1.53e-06 | | |100.00
|
||||||
|
|
||||||
|
Nlocal: 576 ave 576 max 576 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Nghost: 2131 ave 2131 max 2131 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
Neighs: 24768 ave 24768 max 24768 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
FullNghs: 49536 ave 49536 max 49536 min
|
||||||
|
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||||
|
|
||||||
|
Total # of neighbors = 198144
|
||||||
|
Ave neighs/atom = 86
|
||||||
|
Neighbor list builds = 0
|
||||||
|
Dangerous builds = 0
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe
|
||||||
|
|
||||||
|
# Execution --------------------------------------
|
||||||
|
|
||||||
|
velocity all create 2400 908124 loop geom
|
||||||
|
fix temp all npt temp 1000 1000 1000 aniso 0 0 1
|
||||||
|
fix mc all neighbor/swap 50 12 1340723 1000 3 voroN diff 2
|
||||||
|
thermo_style custom step temp press pxx pyy pzz lx ly lz vol pe f_mc[*]
|
||||||
|
#dump dump2 all custom 5000 dump.edge-3_Ni-Cr.* id type x y z c_eng c_csym
|
||||||
|
|
||||||
|
run 1000
|
||||||
|
Per MPI rank memory allocation (min/avg/max) = 9.636 | 9.636 | 9.636 Mbytes
|
||||||
|
Step Temp Press Pxx Pyy Pzz Lx Ly Lz Volume PotEng f_mc[1] f_mc[2]
|
||||||
|
0 2400 -187517.52 -187464.47 -188202.62 -186885.48 22.572 60.192 22.572 30667.534 -9674.3728 0 0
|
||||||
|
100 1665.569 14271.813 14638.855 14316.569 13860.016 21.63675 57.721065 21.637799 27023.366 -9594.291 24 24
|
||||||
|
200 1598.6479 -6990.8349 -8574.1986 -5033.6147 -7364.6916 21.708963 58.123129 21.724821 27412.223 -9575.7322 48 47
|
||||||
|
300 1604.388 456.43285 1926.408 -1214.1721 657.0626 21.673369 58.090421 21.671716 27285.018 -9577.698 72 70
|
||||||
|
400 1601.1591 1303.6721 703.88473 1137.6607 2069.471 21.684004 58.049595 21.671161 27278.522 -9576.4811 96 94
|
||||||
|
500 1623.6044 -2243.2478 -2084.532 320.87709 -4966.0885 21.686171 58.097101 21.695911 27334.758 -9583.1878 120 118
|
||||||
|
600 1587.2041 421.60034 190.88741 -328.76599 1402.6796 21.712439 58.086039 21.655927 27312.229 -9572.559 144 141
|
||||||
|
700 1591.2923 32.327829 -2893.2353 1839.7574 1150.4614 21.719102 57.999862 21.666164 27292.974 -9573.9009 168 165
|
||||||
|
800 1580.8587 -105.51079 654.26389 -160.04168 -810.75457 21.670225 58.109245 21.684683 27306.229 -9570.6482 192 186
|
||||||
|
900 1570.7648 1290.088 1252.3689 255.62548 2362.2695 21.68101 58.100507 21.658755 27283.051 -9567.9864 216 209
|
||||||
|
1000 1598.1483 -125.35291 -3626.5479 3404.789 -154.29983 21.720146 57.952942 21.686111 27297.313 -9576.2975 240 231
|
||||||
|
Loop time of 9.17241 on 4 procs for 1000 steps with 2304 atoms
|
||||||
|
|
||||||
|
Performance: 18.839 ns/day, 1.274 hours/ns, 109.023 timesteps/s, 251.188 katom-step/s
|
||||||
|
98.1% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||||
|
|
||||||
|
MPI task timing breakdown:
|
||||||
|
Section | min time | avg time | max time |%varavg| %total
|
||||||
|
---------------------------------------------------------------
|
||||||
|
Pair | 7.7477 | 8.0143 | 8.1344 | 5.5 | 87.37
|
||||||
|
Neigh | 0.050543 | 0.056882 | 0.05986 | 1.6 | 0.62
|
||||||
|
Comm | 0.069784 | 0.16898 | 0.40996 | 34.2 | 1.84
|
||||||
|
Output | 0.00015612 | 0.0001707 | 0.00021249 | 0.0 | 0.00
|
||||||
|
Modify | 0.90628 | 0.93003 | 0.96157 | 2.2 | 10.14
|
||||||
|
Other | | 0.002053 | | | 0.02
|
||||||
|
|
||||||
|
Nlocal: 576 ave 614 max 505 min
|
||||||
|
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||||
|
Nghost: 2165.75 ave 2204 max 2132 min
|
||||||
|
Histogram: 1 0 0 0 2 0 0 0 0 1
|
||||||
|
Neighs: 32430.8 ave 35552 max 26564 min
|
||||||
|
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||||
|
FullNghs: 64861.5 ave 71111 max 53164 min
|
||||||
|
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||||
|
|
||||||
|
Total # of neighbors = 259446
|
||||||
|
Ave neighs/atom = 112.60677
|
||||||
|
Neighbor list builds = 62
|
||||||
|
Dangerous builds = 0
|
||||||
|
|
||||||
|
#write_data pulse_end.data
|
||||||
|
Total wall time: 0:00:09
|
||||||
@ -33,23 +33,19 @@ endif()
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# MPI configuration
|
# MPI configuration
|
||||||
|
# do not include the (obsolete) MPI C++ bindings which makes
|
||||||
|
# for leaner object files and avoids namespace conflicts
|
||||||
|
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
find_package(MPI QUIET COMPONENTS CXX)
|
||||||
find_package(MPI QUIET)
|
|
||||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||||
else()
|
else()
|
||||||
option(BUILD_MPI "Build MPI version" OFF)
|
option(BUILD_MPI "Build MPI version" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_MPI)
|
if(BUILD_MPI)
|
||||||
# do not include the (obsolete) MPI C++ bindings which makes
|
|
||||||
# for leaner object files and avoids namespace conflicts
|
|
||||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
|
||||||
# We use a non-standard procedure to cross-compile with MPI on Windows
|
# We use a non-standard procedure to cross-compile with MPI on Windows
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||||
# Download and configure MinGW compatible MPICH development files for Windows
|
|
||||||
option(USE_MSMPI "Use Microsoft's MS-MPI SDK instead of MPICH2-1.4.1" OFF)
|
|
||||||
if(USE_MSMPI)
|
|
||||||
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
message(STATUS "Downloading and configuring MS-MPI 10.1 for Windows cross-compilation")
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/msmpi-win64-devel.tar.gz" CACHE STRING "URL for MS-MPI (win64) tarball")
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
set(MPICH2_WIN64_DEVEL_MD5 "86314daf1bffb809f1fcbefb8a547490" CACHE STRING "MD5 checksum of MS-MPI (win64) tarball")
|
||||||
@ -73,50 +69,13 @@ if(BUILD_MPI)
|
|||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
set_target_properties(MPI::MPI_CXX PROPERTIES
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmsmpi.a"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
# set variables for status reporting at the end of CMake run
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX=1")
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmsmpi.a")
|
||||||
else()
|
|
||||||
# Download and configure custom MPICH files for Windows
|
|
||||||
message(STATUS "Downloading and configuring MPICH-1.4.1 for Windows")
|
|
||||||
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" CACHE STRING "URL for MPICH2 (win64) tarball")
|
|
||||||
set(MPICH2_WIN64_DEVEL_MD5 "4939fdb59d13182fd5dd65211e469f14" CACHE STRING "MD5 checksum of MPICH2 (win64) tarball")
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
|
|
||||||
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
|
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN64_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
else()
|
|
||||||
ExternalProject_Add(mpi4win_build
|
|
||||||
URL ${MPICH2_WIN32_DEVEL_URL}
|
|
||||||
URL_MD5 ${MPICH2_WIN32_DEVEL_MD5}
|
|
||||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
|
||||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
|
||||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
|
||||||
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(MPI::MPI_CXX PROPERTIES
|
|
||||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmpi.a"
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
add_dependencies(MPI::MPI_CXX mpi4win_build)
|
|
||||||
|
|
||||||
# set variables for status reporting at the end of CMake run
|
|
||||||
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
|
|
||||||
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
|
|
||||||
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED)
|
||||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||||
|
|||||||
@ -561,7 +561,7 @@ bool LammpsInterface::region_bounds(const char * regionName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LammpsInterface::minimum_image(double & dx, double & dy, double & dz) const {
|
void LammpsInterface::minimum_image(double & dx, double & dy, double & dz) const {
|
||||||
lammps_->domain->minimum_image(dx,dy,dz);
|
lammps_->domain->minimum_image(FLERR,dx,dy,dz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LammpsInterface::closest_image(const double * const xi, const double * const xj, double * const xjImage) const {
|
void LammpsInterface::closest_image(const double * const xi, const double * const xj, double * const xjImage) const {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ int EAMT::init(const int ntypes, double host_cutforcesq, int **host_type2rhor,
|
|||||||
if (onetype>0)
|
if (onetype>0)
|
||||||
onetype=-1;
|
onetype=-1;
|
||||||
else if (onetype==0)
|
else if (onetype==0)
|
||||||
onetype=i*max_shared_types+i;
|
onetype=i;
|
||||||
}
|
}
|
||||||
if (onetype<0) onetype=0;
|
if (onetype<0) onetype=0;
|
||||||
#endif
|
#endif
|
||||||
@ -109,7 +109,7 @@ int EAMT::init(const int ntypes, double host_cutforcesq, int **host_type2rhor,
|
|||||||
int lj_types=ntypes;
|
int lj_types=ntypes;
|
||||||
shared_types=false;
|
shared_types=false;
|
||||||
|
|
||||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types*max_shared_types) {
|
||||||
lj_types=max_shared_types;
|
lj_types=max_shared_types;
|
||||||
shared_types=true;
|
shared_types=true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,35 @@
|
|||||||
--- src/Makefile.orig 2020-05-03 03:50:23.501557199 -0400
|
--- Makefile.orig 2025-06-04 12:16:01.056286325 -0400
|
||||||
+++ src/Makefile 2020-05-03 03:53:32.147681674 -0400
|
+++ Makefile 2025-06-04 12:18:47.454879006 -0400
|
||||||
|
@@ -11,8 +11,7 @@
|
||||||
|
|
||||||
|
# Build all of the executable files
|
||||||
|
all:
|
||||||
|
- $(MAKE) -C src
|
||||||
|
- $(MAKE) -C examples
|
||||||
|
+ $(MAKE) -C src depend libvoro++.a
|
||||||
|
|
||||||
|
# Build the help files (with Doxygen)
|
||||||
|
help:
|
||||||
|
@@ -24,16 +23,12 @@
|
||||||
|
$(MAKE) -C examples clean
|
||||||
|
|
||||||
|
# Install the executable, man page, and shared library
|
||||||
|
-install:
|
||||||
|
- $(MAKE) -C src
|
||||||
|
- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/bin
|
||||||
|
+install: all
|
||||||
|
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/lib
|
||||||
|
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/man
|
||||||
|
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/man/man1
|
||||||
|
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include
|
||||||
|
$(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include/voro++
|
||||||
|
- $(INSTALL) $(IFLAGS_EXEC) src/voro++ $(PREFIX)/bin
|
||||||
|
- $(INSTALL) $(IFLAGS) man/voro++.1 $(PREFIX)/man/man1
|
||||||
|
$(INSTALL) $(IFLAGS) src/libvoro++.a $(PREFIX)/lib
|
||||||
|
$(INSTALL) $(IFLAGS) src/voro++.hh $(PREFIX)/include/voro++
|
||||||
|
$(INSTALL) $(IFLAGS) src/c_loops.hh $(PREFIX)/include/voro++
|
||||||
|
--- src/Makefile.orig 2013-10-17 13:54:13.000000000 -0400
|
||||||
|
+++ src/Makefile 2025-06-04 12:16:47.293104880 -0400
|
||||||
@@ -10,10 +10,10 @@
|
@@ -10,10 +10,10 @@
|
||||||
# List of the common source files
|
# List of the common source files
|
||||||
objs=cell.o common.o container.o unitcell.o v_compute.o c_loops.o \
|
objs=cell.o common.o container.o unitcell.o v_compute.o c_loops.o \
|
||||||
|
|||||||
@ -834,13 +834,13 @@ double AngleAmoeba::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -352,7 +352,7 @@ double BondBPM::equilibrium_distance(int /*i*/)
|
|||||||
delx = x[i][0] - x[j][0];
|
delx = x[i][0] - x[j][0];
|
||||||
dely = x[i][1] - x[j][1];
|
dely = x[i][1] - x[j][1];
|
||||||
delz = x[i][2] - x[j][2];
|
delz = x[i][2] - x[j][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
|
|
||||||
r = sqrt(delx * delx + dely * dely + delz * delz);
|
r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
if (r > r0_max_estimate) r0_max_estimate = r;
|
if (r > r0_max_estimate) r0_max_estimate = r;
|
||||||
|
|||||||
@ -177,7 +177,7 @@ void BondBPMRotational::store_data()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get closest image in case bonded with ghost
|
// Get closest image in case bonded with ghost
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
r = sqrt(delx * delx + dely * dely + delz * delz);
|
r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
rinv = 1.0 / r;
|
rinv = 1.0 / r;
|
||||||
|
|
||||||
|
|||||||
@ -140,7 +140,7 @@ void BondBPMSpring::store_data()
|
|||||||
delz = x[i][2] - x[j][2];
|
delz = x[i][2] - x[j][2];
|
||||||
|
|
||||||
// Get closest image in case bonded with ghost
|
// Get closest image in case bonded with ghost
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
r = sqrt(delx * delx + dely * dely + delz * delz);
|
r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
|
|
||||||
fix_bond_history->update_atom_value(i, m, 0, r);
|
fix_bond_history->update_atom_value(i, m, 0, r);
|
||||||
|
|||||||
@ -148,7 +148,7 @@ void BondBPMSpringPlastic::store_data()
|
|||||||
delz = x[i][2] - x[j][2];
|
delz = x[i][2] - x[j][2];
|
||||||
|
|
||||||
// Get closest image in case bonded with ghost
|
// Get closest image in case bonded with ghost
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
r = sqrt(delx * delx + dely * dely + delz * delz);
|
r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
|
|
||||||
fix_bond_history->update_atom_value(i, m, 0, r);
|
fix_bond_history->update_atom_value(i, m, 0, r);
|
||||||
|
|||||||
@ -458,13 +458,13 @@ double AngleSPICA::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
@ -479,7 +479,7 @@ double AngleSPICA::single(int type, int i1, int i2, int i3)
|
|||||||
double delx3 = x[i1][0] - x[i3][0];
|
double delx3 = x[i1][0] - x[i3][0];
|
||||||
double dely3 = x[i1][1] - x[i3][1];
|
double dely3 = x[i1][1] - x[i3][1];
|
||||||
double delz3 = x[i1][2] - x[i3][2];
|
double delz3 = x[i1][2] - x[i3][2];
|
||||||
domain->minimum_image(delx3,dely3,delz3);
|
domain->minimum_image(FLERR, delx3,dely3,delz3);
|
||||||
|
|
||||||
const int type1 = atom->type[i1];
|
const int type1 = atom->type[i1];
|
||||||
const int type3 = atom->type[i3];
|
const int type3 = atom->type[i3];
|
||||||
|
|||||||
@ -436,13 +436,13 @@ double AngleClass2::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ cvm::rvector colvarproxy_lammps::position_distance(cvm::atom_pos const &pos1,
|
|||||||
double xtmp = pos2.x - pos1.x;
|
double xtmp = pos2.x - pos1.x;
|
||||||
double ytmp = pos2.y - pos1.y;
|
double ytmp = pos2.y - pos1.y;
|
||||||
double ztmp = pos2.z - pos1.z;
|
double ztmp = pos2.z - pos1.z;
|
||||||
_lmp->domain->minimum_image_big(xtmp,ytmp,ztmp);
|
_lmp->domain->minimum_image_big(FLERR, xtmp,ytmp,ztmp);
|
||||||
return {xtmp, ytmp, ztmp};
|
return {xtmp, ytmp, ztmp};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -652,7 +652,7 @@ void FixPolarizeFunctional::calculate_Rww_cutoff()
|
|||||||
double delx = xtmp - x[k][0];
|
double delx = xtmp - x[k][0];
|
||||||
double dely = ytmp - x[k][1];
|
double dely = ytmp - x[k][1];
|
||||||
double delz = ztmp - x[k][2];
|
double delz = ztmp - x[k][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
int mk = tag2mat[tag[k]];
|
int mk = tag2mat[tag[k]];
|
||||||
|
|
||||||
// G1ww[mi][mk] = calculate_greens_ewald(delx, dely, delz);
|
// G1ww[mi][mk] = calculate_greens_ewald(delx, dely, delz);
|
||||||
@ -861,7 +861,7 @@ void FixPolarizeFunctional::calculate_qiRqw_cutoff()
|
|||||||
delx = xtmp - x[k][0];
|
delx = xtmp - x[k][0];
|
||||||
dely = ytmp - x[k][1];
|
dely = ytmp - x[k][1];
|
||||||
delz = ztmp - x[k][2];
|
delz = ztmp - x[k][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
r = sqrt(delx * delx + dely * dely + delz * delz);
|
r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
|
|
||||||
int mk = tag2mat[tag[k]];
|
int mk = tag2mat[tag[k]];
|
||||||
@ -902,7 +902,7 @@ void FixPolarizeFunctional::calculate_qiRqw_cutoff()
|
|||||||
delx = x[i][0] - xtmp;
|
delx = x[i][0] - xtmp;
|
||||||
dely = x[i][1] - ytmp;
|
dely = x[i][1] - ytmp;
|
||||||
delz = x[i][2] - ztmp;
|
delz = x[i][2] - ztmp;
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
|
|
||||||
int mi = tag2mat_ions[tag[i]]; //ion_idx[i];
|
int mi = tag2mat_ions[tag[i]]; //ion_idx[i];
|
||||||
|
|
||||||
|
|||||||
@ -251,7 +251,7 @@ double AngleDipole::single(int type, int iRef, int iDip, int /*iDummy*/)
|
|||||||
double dely = x[iRef][1] - x[iDip][1];
|
double dely = x[iRef][1] - x[iDip][1];
|
||||||
double delz = x[iRef][2] - x[iDip][2];
|
double delz = x[iRef][2] - x[iDip][2];
|
||||||
|
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
|
|
||||||
double r = sqrt(delx * delx + dely * dely + delz * delz);
|
double r = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
if (r < SMALL) return 0.0;
|
if (r < SMALL) return 0.0;
|
||||||
|
|||||||
@ -764,7 +764,7 @@ void ComputeBornMatrix::compute_bonds()
|
|||||||
dx = x[atom2][0] - x[atom1][0];
|
dx = x[atom2][0] - x[atom1][0];
|
||||||
dy = x[atom2][1] - x[atom1][1];
|
dy = x[atom2][1] - x[atom1][1];
|
||||||
dz = x[atom2][2] - x[atom1][2];
|
dz = x[atom2][2] - x[atom1][2];
|
||||||
domain->minimum_image(dx, dy, dz);
|
domain->minimum_image(FLERR, dx, dy, dz);
|
||||||
rsq = dx * dx + dy * dy + dz * dz;
|
rsq = dx * dx + dy * dy + dz * dz;
|
||||||
rij[0] = dx;
|
rij[0] = dx;
|
||||||
rij[1] = dy;
|
rij[1] = dy;
|
||||||
@ -870,7 +870,7 @@ void ComputeBornMatrix::compute_angles()
|
|||||||
delx1 = x[atom1][0] - x[atom2][0];
|
delx1 = x[atom1][0] - x[atom2][0];
|
||||||
dely1 = x[atom1][1] - x[atom2][1];
|
dely1 = x[atom1][1] - x[atom2][1];
|
||||||
delz1 = x[atom1][2] - x[atom2][2];
|
delz1 = x[atom1][2] - x[atom2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
del1[0] = delx1;
|
del1[0] = delx1;
|
||||||
del1[1] = dely1;
|
del1[1] = dely1;
|
||||||
del1[2] = delz1;
|
del1[2] = delz1;
|
||||||
@ -882,7 +882,7 @@ void ComputeBornMatrix::compute_angles()
|
|||||||
delx2 = x[atom3][0] - x[atom2][0];
|
delx2 = x[atom3][0] - x[atom2][0];
|
||||||
dely2 = x[atom3][1] - x[atom2][1];
|
dely2 = x[atom3][1] - x[atom2][1];
|
||||||
delz2 = x[atom3][2] - x[atom2][2];
|
delz2 = x[atom3][2] - x[atom2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
del2[0] = delx2;
|
del2[0] = delx2;
|
||||||
del2[1] = dely2;
|
del2[1] = dely2;
|
||||||
del2[2] = delz2;
|
del2[2] = delz2;
|
||||||
@ -1046,7 +1046,7 @@ void ComputeBornMatrix::compute_dihedrals()
|
|||||||
vb1x = x[atom2][0] - x[atom1][0];
|
vb1x = x[atom2][0] - x[atom1][0];
|
||||||
vb1y = x[atom2][1] - x[atom1][1];
|
vb1y = x[atom2][1] - x[atom1][1];
|
||||||
vb1z = x[atom2][2] - x[atom1][2];
|
vb1z = x[atom2][2] - x[atom1][2];
|
||||||
domain->minimum_image(vb1x, vb1y, vb1z);
|
domain->minimum_image(FLERR, vb1x, vb1y, vb1z);
|
||||||
b1[0] = vb1x;
|
b1[0] = vb1x;
|
||||||
b1[1] = vb1y;
|
b1[1] = vb1y;
|
||||||
b1[2] = vb1z;
|
b1[2] = vb1z;
|
||||||
@ -1055,7 +1055,7 @@ void ComputeBornMatrix::compute_dihedrals()
|
|||||||
vb2x = x[atom3][0] - x[atom2][0];
|
vb2x = x[atom3][0] - x[atom2][0];
|
||||||
vb2y = x[atom3][1] - x[atom2][1];
|
vb2y = x[atom3][1] - x[atom2][1];
|
||||||
vb2z = x[atom3][2] - x[atom2][2];
|
vb2z = x[atom3][2] - x[atom2][2];
|
||||||
domain->minimum_image(vb2x, vb2y, vb2z);
|
domain->minimum_image(FLERR, vb2x, vb2y, vb2z);
|
||||||
b2[0] = vb2x;
|
b2[0] = vb2x;
|
||||||
b2[1] = vb2y;
|
b2[1] = vb2y;
|
||||||
b2[2] = vb2z;
|
b2[2] = vb2z;
|
||||||
@ -1064,7 +1064,7 @@ void ComputeBornMatrix::compute_dihedrals()
|
|||||||
vb3x = x[atom4][0] - x[atom3][0];
|
vb3x = x[atom4][0] - x[atom3][0];
|
||||||
vb3y = x[atom4][1] - x[atom3][1];
|
vb3y = x[atom4][1] - x[atom3][1];
|
||||||
vb3z = x[atom4][2] - x[atom3][2];
|
vb3z = x[atom4][2] - x[atom3][2];
|
||||||
domain->minimum_image(vb3x, vb3y, vb3z);
|
domain->minimum_image(FLERR, vb3x, vb3y, vb3z);
|
||||||
b3[0] = vb3x;
|
b3[0] = vb3x;
|
||||||
b3[1] = vb3y;
|
b3[1] = vb3y;
|
||||||
b3[2] = vb3z;
|
b3[2] = vb3z;
|
||||||
|
|||||||
@ -480,7 +480,7 @@ void ComputeStressCartesian::compute_pressure(double fpair, double xi, double yi
|
|||||||
tmp1[dir1] = (bin1 + 1) * bin_width1 - xi;
|
tmp1[dir1] = (bin1 + 1) * bin_width1 - xi;
|
||||||
else
|
else
|
||||||
tmp1[dir1] = bin1 * bin_width1 - xi;
|
tmp1[dir1] = bin1 * bin_width1 - xi;
|
||||||
domain->minimum_image(tmp1[0],tmp1[1],tmp1[2]);
|
domain->minimum_image(FLERR, tmp1[0],tmp1[1],tmp1[2]);
|
||||||
l1 = tmp1[dir1] / rij1;
|
l1 = tmp1[dir1] / rij1;
|
||||||
|
|
||||||
double l2;
|
double l2;
|
||||||
@ -489,7 +489,7 @@ void ComputeStressCartesian::compute_pressure(double fpair, double xi, double yi
|
|||||||
tmp2[dir2] = (bin2 + 1) * bin_width2 - yi;
|
tmp2[dir2] = (bin2 + 1) * bin_width2 - yi;
|
||||||
else
|
else
|
||||||
tmp2[dir2] = bin2 * bin_width2 - yi;
|
tmp2[dir2] = bin2 * bin_width2 - yi;
|
||||||
domain->minimum_image(tmp2[0],tmp2[1],tmp2[2]);
|
domain->minimum_image(FLERR, tmp2[0],tmp2[1],tmp2[2]);
|
||||||
l2 = tmp2[dir2] / rij2;
|
l2 = tmp2[dir2] / rij2;
|
||||||
|
|
||||||
if ((dims == 1 || l1 < l2 || l2 < lb + SMALL) && l1 <= 1.0 && l1 > lb) {
|
if ((dims == 1 || l1 < l2 || l2 < lb + SMALL) && l1 <= 1.0 && l1 > lb) {
|
||||||
|
|||||||
@ -82,7 +82,7 @@ ComputeStressMop::ComputeStressMop(LAMMPS *lmp, int narg, char **arg) : Compute(
|
|||||||
error->warning(FLERR, "The specified initial plane lies outside of the simulation box");
|
error->warning(FLERR, "The specified initial plane lies outside of the simulation box");
|
||||||
double dx[3] = {0.0, 0.0, 0.0};
|
double dx[3] = {0.0, 0.0, 0.0};
|
||||||
dx[dir] = pos - 0.5 * (domain->boxhi[dir] + domain->boxlo[dir]);
|
dx[dir] = pos - 0.5 * (domain->boxhi[dir] + domain->boxlo[dir]);
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
pos = 0.5 * (domain->boxhi[dir] + domain->boxlo[dir]) + dx[dir];
|
pos = 0.5 * (domain->boxhi[dir] + domain->boxlo[dir]) + dx[dir];
|
||||||
|
|
||||||
if ((pos > domain->boxhi[dir]) || (pos < domain->boxlo[dir]))
|
if ((pos > domain->boxhi[dir]) || (pos < domain->boxlo[dir]))
|
||||||
@ -478,7 +478,7 @@ void ComputeStressMop::compute_pairs()
|
|||||||
|
|
||||||
// minimum image of xi with respect to the plane
|
// minimum image of xi with respect to the plane
|
||||||
xi[dir] -= pos;
|
xi[dir] -= pos;
|
||||||
domain->minimum_image(xi[0], xi[1], xi[2]);
|
domain->minimum_image(FLERR, xi[0], xi[1], xi[2]);
|
||||||
xi[dir] += pos;
|
xi[dir] += pos;
|
||||||
|
|
||||||
//velocities at t
|
//velocities at t
|
||||||
@ -601,7 +601,7 @@ void ComputeStressMop::compute_bonds()
|
|||||||
dx[1] = x[atom1][1];
|
dx[1] = x[atom1][1];
|
||||||
dx[2] = x[atom1][2];
|
dx[2] = x[atom1][2];
|
||||||
dx[dir] -= pos;
|
dx[dir] -= pos;
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_bond_1[0] = dx[0];
|
x_bond_1[0] = dx[0];
|
||||||
x_bond_1[1] = dx[1];
|
x_bond_1[1] = dx[1];
|
||||||
x_bond_1[2] = dx[2];
|
x_bond_1[2] = dx[2];
|
||||||
@ -612,7 +612,7 @@ void ComputeStressMop::compute_bonds()
|
|||||||
dx[0] = x[atom2][0] - x_bond_1[0];
|
dx[0] = x[atom2][0] - x_bond_1[0];
|
||||||
dx[1] = x[atom2][1] - x_bond_1[1];
|
dx[1] = x[atom2][1] - x_bond_1[1];
|
||||||
dx[2] = x[atom2][2] - x_bond_1[2];
|
dx[2] = x[atom2][2] - x_bond_1[2];
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_bond_2[0] = x_bond_1[0] + dx[0];
|
x_bond_2[0] = x_bond_1[0] + dx[0];
|
||||||
x_bond_2[1] = x_bond_1[1] + dx[1];
|
x_bond_2[1] = x_bond_1[1] + dx[1];
|
||||||
x_bond_2[2] = x_bond_1[2] + dx[2];
|
x_bond_2[2] = x_bond_1[2] + dx[2];
|
||||||
@ -728,7 +728,7 @@ void ComputeStressMop::compute_angles()
|
|||||||
dx[1] = x[atom1][1];
|
dx[1] = x[atom1][1];
|
||||||
dx[2] = x[atom1][2];
|
dx[2] = x[atom1][2];
|
||||||
dx[dir] -= pos;
|
dx[dir] -= pos;
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_angle_left[0] = dx[0];
|
x_angle_left[0] = dx[0];
|
||||||
x_angle_left[1] = dx[1];
|
x_angle_left[1] = dx[1];
|
||||||
x_angle_left[2] = dx[2];
|
x_angle_left[2] = dx[2];
|
||||||
@ -739,7 +739,7 @@ void ComputeStressMop::compute_angles()
|
|||||||
dx_left[0] = x[atom2][0] - x_angle_left[0];
|
dx_left[0] = x[atom2][0] - x_angle_left[0];
|
||||||
dx_left[1] = x[atom2][1] - x_angle_left[1];
|
dx_left[1] = x[atom2][1] - x_angle_left[1];
|
||||||
dx_left[2] = x[atom2][2] - x_angle_left[2];
|
dx_left[2] = x[atom2][2] - x_angle_left[2];
|
||||||
domain->minimum_image(dx_left[0], dx_left[1], dx_left[2]);
|
domain->minimum_image(FLERR, dx_left[0], dx_left[1], dx_left[2]);
|
||||||
x_angle_middle[0] = x_angle_left[0] + dx_left[0];
|
x_angle_middle[0] = x_angle_left[0] + dx_left[0];
|
||||||
x_angle_middle[1] = x_angle_left[1] + dx_left[1];
|
x_angle_middle[1] = x_angle_left[1] + dx_left[1];
|
||||||
x_angle_middle[2] = x_angle_left[2] + dx_left[2];
|
x_angle_middle[2] = x_angle_left[2] + dx_left[2];
|
||||||
@ -749,7 +749,7 @@ void ComputeStressMop::compute_angles()
|
|||||||
dx_right[0] = x[atom3][0] - x_angle_middle[0];
|
dx_right[0] = x[atom3][0] - x_angle_middle[0];
|
||||||
dx_right[1] = x[atom3][1] - x_angle_middle[1];
|
dx_right[1] = x[atom3][1] - x_angle_middle[1];
|
||||||
dx_right[2] = x[atom3][2] - x_angle_middle[2];
|
dx_right[2] = x[atom3][2] - x_angle_middle[2];
|
||||||
domain->minimum_image(dx_right[0], dx_right[1], dx_right[2]);
|
domain->minimum_image(FLERR, dx_right[0], dx_right[1], dx_right[2]);
|
||||||
x_angle_right[0] = x_angle_middle[0] + dx_right[0];
|
x_angle_right[0] = x_angle_middle[0] + dx_right[0];
|
||||||
x_angle_right[1] = x_angle_middle[1] + dx_right[1];
|
x_angle_right[1] = x_angle_middle[1] + dx_right[1];
|
||||||
x_angle_right[2] = x_angle_middle[2] + dx_right[2];
|
x_angle_right[2] = x_angle_middle[2] + dx_right[2];
|
||||||
@ -920,14 +920,14 @@ void ComputeStressMop::compute_dihedrals()
|
|||||||
x_atom_1[1] = x[atom1][1];
|
x_atom_1[1] = x[atom1][1];
|
||||||
x_atom_1[2] = x[atom1][2];
|
x_atom_1[2] = x[atom1][2];
|
||||||
x_atom_1[dir] -= pos;
|
x_atom_1[dir] -= pos;
|
||||||
domain->minimum_image(x_atom_1[0], x_atom_1[1], x_atom_1[2]);
|
domain->minimum_image(FLERR, x_atom_1[0], x_atom_1[1], x_atom_1[2]);
|
||||||
x_atom_1[dir] += pos;
|
x_atom_1[dir] += pos;
|
||||||
|
|
||||||
// minimum image of atom2 with respect to atom1
|
// minimum image of atom2 with respect to atom1
|
||||||
diffx[0] = x[atom2][0] - x_atom_1[0];
|
diffx[0] = x[atom2][0] - x_atom_1[0];
|
||||||
diffx[1] = x[atom2][1] - x_atom_1[1];
|
diffx[1] = x[atom2][1] - x_atom_1[1];
|
||||||
diffx[2] = x[atom2][2] - x_atom_1[2];
|
diffx[2] = x[atom2][2] - x_atom_1[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_2[0] = x_atom_1[0] + diffx[0];
|
x_atom_2[0] = x_atom_1[0] + diffx[0];
|
||||||
x_atom_2[1] = x_atom_1[1] + diffx[1];
|
x_atom_2[1] = x_atom_1[1] + diffx[1];
|
||||||
x_atom_2[2] = x_atom_1[2] + diffx[2];
|
x_atom_2[2] = x_atom_1[2] + diffx[2];
|
||||||
@ -936,7 +936,7 @@ void ComputeStressMop::compute_dihedrals()
|
|||||||
diffx[0] = x[atom3][0] - x_atom_2[0];
|
diffx[0] = x[atom3][0] - x_atom_2[0];
|
||||||
diffx[1] = x[atom3][1] - x_atom_2[1];
|
diffx[1] = x[atom3][1] - x_atom_2[1];
|
||||||
diffx[2] = x[atom3][2] - x_atom_2[2];
|
diffx[2] = x[atom3][2] - x_atom_2[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_3[0] = x_atom_2[0] + diffx[0];
|
x_atom_3[0] = x_atom_2[0] + diffx[0];
|
||||||
x_atom_3[1] = x_atom_2[1] + diffx[1];
|
x_atom_3[1] = x_atom_2[1] + diffx[1];
|
||||||
x_atom_3[2] = x_atom_2[2] + diffx[2];
|
x_atom_3[2] = x_atom_2[2] + diffx[2];
|
||||||
@ -945,7 +945,7 @@ void ComputeStressMop::compute_dihedrals()
|
|||||||
diffx[0] = x[atom4][0] - x_atom_3[0];
|
diffx[0] = x[atom4][0] - x_atom_3[0];
|
||||||
diffx[1] = x[atom4][1] - x_atom_3[1];
|
diffx[1] = x[atom4][1] - x_atom_3[1];
|
||||||
diffx[2] = x[atom4][2] - x_atom_3[2];
|
diffx[2] = x[atom4][2] - x_atom_3[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_4[0] = x_atom_3[0] + diffx[0];
|
x_atom_4[0] = x_atom_3[0] + diffx[0];
|
||||||
x_atom_4[1] = x_atom_3[1] + diffx[1];
|
x_atom_4[1] = x_atom_3[1] + diffx[1];
|
||||||
x_atom_4[2] = x_atom_3[2] + diffx[2];
|
x_atom_4[2] = x_atom_3[2] + diffx[2];
|
||||||
|
|||||||
@ -537,14 +537,14 @@ void ComputeStressMopProfile::compute_pairs()
|
|||||||
|
|
||||||
// minimum image of xi with respect to the plane
|
// minimum image of xi with respect to the plane
|
||||||
xi[dir] -= pos;
|
xi[dir] -= pos;
|
||||||
domain->minimum_image(xi[0], xi[1], xi[2]);
|
domain->minimum_image(FLERR, xi[0], xi[1], xi[2]);
|
||||||
xi[dir] += pos;
|
xi[dir] += pos;
|
||||||
|
|
||||||
// minimum image of xj with respect to xi
|
// minimum image of xj with respect to xi
|
||||||
xj[0] -= xi[0];
|
xj[0] -= xi[0];
|
||||||
xj[1] -= xi[1];
|
xj[1] -= xi[1];
|
||||||
xj[2] -= xi[2];
|
xj[2] -= xi[2];
|
||||||
domain->minimum_image(xi[0], xi[1], xi[2]);
|
domain->minimum_image(FLERR, xj[0], xj[1], xj[2]);
|
||||||
xj[0] += xi[0];
|
xj[0] += xi[0];
|
||||||
xj[1] += xi[1];
|
xj[1] += xi[1];
|
||||||
xj[2] += xi[2];
|
xj[2] += xi[2];
|
||||||
@ -649,7 +649,7 @@ void ComputeStressMopProfile::compute_bonds()
|
|||||||
dx[1] = x[atom1][1];
|
dx[1] = x[atom1][1];
|
||||||
dx[2] = x[atom1][2];
|
dx[2] = x[atom1][2];
|
||||||
dx[dir] -= pos;
|
dx[dir] -= pos;
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_bond_1[0] = dx[0];
|
x_bond_1[0] = dx[0];
|
||||||
x_bond_1[1] = dx[1];
|
x_bond_1[1] = dx[1];
|
||||||
x_bond_1[2] = dx[2];
|
x_bond_1[2] = dx[2];
|
||||||
@ -660,7 +660,7 @@ void ComputeStressMopProfile::compute_bonds()
|
|||||||
dx[0] = x[atom2][0] - x_bond_1[0];
|
dx[0] = x[atom2][0] - x_bond_1[0];
|
||||||
dx[1] = x[atom2][1] - x_bond_1[1];
|
dx[1] = x[atom2][1] - x_bond_1[1];
|
||||||
dx[2] = x[atom2][2] - x_bond_1[2];
|
dx[2] = x[atom2][2] - x_bond_1[2];
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_bond_2[0] = x_bond_1[0] + dx[0];
|
x_bond_2[0] = x_bond_1[0] + dx[0];
|
||||||
x_bond_2[1] = x_bond_1[1] + dx[1];
|
x_bond_2[1] = x_bond_1[1] + dx[1];
|
||||||
x_bond_2[2] = x_bond_1[2] + dx[2];
|
x_bond_2[2] = x_bond_1[2] + dx[2];
|
||||||
@ -783,7 +783,7 @@ void ComputeStressMopProfile::compute_angles()
|
|||||||
dx[1] = x[atom1][1];
|
dx[1] = x[atom1][1];
|
||||||
dx[2] = x[atom1][2];
|
dx[2] = x[atom1][2];
|
||||||
dx[dir] -= pos;
|
dx[dir] -= pos;
|
||||||
domain->minimum_image(dx[0], dx[1], dx[2]);
|
domain->minimum_image(FLERR, dx[0], dx[1], dx[2]);
|
||||||
x_angle_left[0] = dx[0];
|
x_angle_left[0] = dx[0];
|
||||||
x_angle_left[1] = dx[1];
|
x_angle_left[1] = dx[1];
|
||||||
x_angle_left[2] = dx[2];
|
x_angle_left[2] = dx[2];
|
||||||
@ -793,7 +793,7 @@ void ComputeStressMopProfile::compute_angles()
|
|||||||
dx_left[0] = x[atom2][0] - x_angle_left[0];
|
dx_left[0] = x[atom2][0] - x_angle_left[0];
|
||||||
dx_left[1] = x[atom2][1] - x_angle_left[1];
|
dx_left[1] = x[atom2][1] - x_angle_left[1];
|
||||||
dx_left[2] = x[atom2][2] - x_angle_left[2];
|
dx_left[2] = x[atom2][2] - x_angle_left[2];
|
||||||
domain->minimum_image(dx_left[0], dx_left[1], dx_left[2]);
|
domain->minimum_image(FLERR, dx_left[0], dx_left[1], dx_left[2]);
|
||||||
x_angle_middle[0] = x_angle_left[0] + dx_left[0];
|
x_angle_middle[0] = x_angle_left[0] + dx_left[0];
|
||||||
x_angle_middle[1] = x_angle_left[1] + dx_left[1];
|
x_angle_middle[1] = x_angle_left[1] + dx_left[1];
|
||||||
x_angle_middle[2] = x_angle_left[2] + dx_left[2];
|
x_angle_middle[2] = x_angle_left[2] + dx_left[2];
|
||||||
@ -802,7 +802,7 @@ void ComputeStressMopProfile::compute_angles()
|
|||||||
dx_right[0] = x[atom3][0] - x_angle_middle[0];
|
dx_right[0] = x[atom3][0] - x_angle_middle[0];
|
||||||
dx_right[1] = x[atom3][1] - x_angle_middle[1];
|
dx_right[1] = x[atom3][1] - x_angle_middle[1];
|
||||||
dx_right[2] = x[atom3][2] - x_angle_middle[2];
|
dx_right[2] = x[atom3][2] - x_angle_middle[2];
|
||||||
domain->minimum_image(dx_right[0], dx_right[1], dx_right[2]);
|
domain->minimum_image(FLERR, dx_right[0], dx_right[1], dx_right[2]);
|
||||||
x_angle_right[0] = x_angle_middle[0] + dx_right[0];
|
x_angle_right[0] = x_angle_middle[0] + dx_right[0];
|
||||||
x_angle_right[1] = x_angle_middle[1] + dx_right[1];
|
x_angle_right[1] = x_angle_middle[1] + dx_right[1];
|
||||||
x_angle_right[2] = x_angle_middle[2] + dx_right[2];
|
x_angle_right[2] = x_angle_middle[2] + dx_right[2];
|
||||||
@ -971,14 +971,14 @@ void ComputeStressMopProfile::compute_dihedrals()
|
|||||||
x_atom_1[1] = x[atom1][1];
|
x_atom_1[1] = x[atom1][1];
|
||||||
x_atom_1[2] = x[atom1][2];
|
x_atom_1[2] = x[atom1][2];
|
||||||
x_atom_1[dir] -= pos;
|
x_atom_1[dir] -= pos;
|
||||||
domain->minimum_image(x_atom_1[0], x_atom_1[1], x_atom_1[2]);
|
domain->minimum_image(FLERR, x_atom_1[0], x_atom_1[1], x_atom_1[2]);
|
||||||
x_atom_1[dir] += pos;
|
x_atom_1[dir] += pos;
|
||||||
|
|
||||||
// minimum image of atom2 with respect to atom1
|
// minimum image of atom2 with respect to atom1
|
||||||
diffx[0] = x[atom2][0] - x_atom_1[0];
|
diffx[0] = x[atom2][0] - x_atom_1[0];
|
||||||
diffx[1] = x[atom2][1] - x_atom_1[1];
|
diffx[1] = x[atom2][1] - x_atom_1[1];
|
||||||
diffx[2] = x[atom2][2] - x_atom_1[2];
|
diffx[2] = x[atom2][2] - x_atom_1[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_2[0] = x_atom_1[0] + diffx[0];
|
x_atom_2[0] = x_atom_1[0] + diffx[0];
|
||||||
x_atom_2[1] = x_atom_1[1] + diffx[1];
|
x_atom_2[1] = x_atom_1[1] + diffx[1];
|
||||||
x_atom_2[2] = x_atom_1[2] + diffx[2];
|
x_atom_2[2] = x_atom_1[2] + diffx[2];
|
||||||
@ -987,7 +987,7 @@ void ComputeStressMopProfile::compute_dihedrals()
|
|||||||
diffx[0] = x[atom3][0] - x_atom_2[0];
|
diffx[0] = x[atom3][0] - x_atom_2[0];
|
||||||
diffx[1] = x[atom3][1] - x_atom_2[1];
|
diffx[1] = x[atom3][1] - x_atom_2[1];
|
||||||
diffx[2] = x[atom3][2] - x_atom_2[2];
|
diffx[2] = x[atom3][2] - x_atom_2[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_3[0] = x_atom_2[0] + diffx[0];
|
x_atom_3[0] = x_atom_2[0] + diffx[0];
|
||||||
x_atom_3[1] = x_atom_2[1] + diffx[1];
|
x_atom_3[1] = x_atom_2[1] + diffx[1];
|
||||||
x_atom_3[2] = x_atom_2[2] + diffx[2];
|
x_atom_3[2] = x_atom_2[2] + diffx[2];
|
||||||
@ -996,7 +996,7 @@ void ComputeStressMopProfile::compute_dihedrals()
|
|||||||
diffx[0] = x[atom4][0] - x_atom_3[0];
|
diffx[0] = x[atom4][0] - x_atom_3[0];
|
||||||
diffx[1] = x[atom4][1] - x_atom_3[1];
|
diffx[1] = x[atom4][1] - x_atom_3[1];
|
||||||
diffx[2] = x[atom4][2] - x_atom_3[2];
|
diffx[2] = x[atom4][2] - x_atom_3[2];
|
||||||
domain->minimum_image(diffx[0], diffx[1], diffx[2]);
|
domain->minimum_image(FLERR, diffx[0], diffx[1], diffx[2]);
|
||||||
x_atom_4[0] = x_atom_3[0] + diffx[0];
|
x_atom_4[0] = x_atom_3[0] + diffx[0];
|
||||||
x_atom_4[1] = x_atom_3[1] + diffx[1];
|
x_atom_4[1] = x_atom_3[1] + diffx[1];
|
||||||
x_atom_4[2] = x_atom_3[2] + diffx[2];
|
x_atom_4[2] = x_atom_3[2] + diffx[2];
|
||||||
|
|||||||
636
src/EXTRA-FIX/fix_ave_moments.cpp
Normal file
636
src/EXTRA-FIX/fix_ave_moments.cpp
Normal file
@ -0,0 +1,636 @@
|
|||||||
|
// clang-format off
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
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 author: Sebastian Huetter (OvGU)
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#include "fix_ave_moments.h"
|
||||||
|
|
||||||
|
#include "arg_info.h"
|
||||||
|
#include "compute.h"
|
||||||
|
#include "error.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "math_special.h"
|
||||||
|
#include "memory.h"
|
||||||
|
#include "modify.h"
|
||||||
|
#include "update.h"
|
||||||
|
#include "variable.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
using namespace LAMMPS_NS;
|
||||||
|
using namespace FixConst;
|
||||||
|
using MathSpecial::square;
|
||||||
|
using MathSpecial::cube;
|
||||||
|
|
||||||
|
enum { MEAN, STDDEV, VARIANCE, SKEW, KURTOSIS };
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
FixAveMoments::FixAveMoments(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
Fix(lmp, narg, arg), nvalues(0), result_list(nullptr), window_list(nullptr)
|
||||||
|
{
|
||||||
|
// this fix's data is always accessible (but might be meaningless)
|
||||||
|
global_freq = 1;
|
||||||
|
dynamic_group_allow = 1;
|
||||||
|
time_depend = 1;
|
||||||
|
|
||||||
|
// EXAMPLE:
|
||||||
|
// fix ID group-ID ave/moments Nevery Nrepeat Nfreq value1 ... valueN moment1 ... momentM keyword value ...
|
||||||
|
|
||||||
|
// the first six arguments are fixed & need at least one input and moment
|
||||||
|
const int nfixedargs = 6;
|
||||||
|
if (narg < nfixedargs + 2) utils::missing_cmd_args(FLERR, "fix ave/moments", error);
|
||||||
|
|
||||||
|
nevery = utils::inumeric(FLERR,arg[3],false,lmp);
|
||||||
|
nrepeat = utils::inumeric(FLERR,arg[4],false,lmp);
|
||||||
|
nfreq = utils::inumeric(FLERR,arg[5],false,lmp);
|
||||||
|
|
||||||
|
// scan values to count them
|
||||||
|
|
||||||
|
nvalues = 0;
|
||||||
|
// first input name is position after the fixed args
|
||||||
|
int iarg = nfixedargs;
|
||||||
|
while (iarg < narg) {
|
||||||
|
if (utils::strmatch(arg[iarg],"^[cfv]_")) {
|
||||||
|
nvalues++;
|
||||||
|
iarg++;
|
||||||
|
} else break;
|
||||||
|
}
|
||||||
|
if (nvalues == 0)
|
||||||
|
error->all(FLERR, nfixedargs,
|
||||||
|
"No values from computes, fixes, or variables used in fix ave/moments command");
|
||||||
|
|
||||||
|
// next, the moments
|
||||||
|
iarg = consume_moments(iarg, narg, arg);
|
||||||
|
if (moments.empty())
|
||||||
|
error->all(FLERR, nfixedargs,
|
||||||
|
"No values from computes, fixes, or variables used in fix ave/moments command");
|
||||||
|
|
||||||
|
// parse optional keywords which must follow the data
|
||||||
|
|
||||||
|
options(iarg,narg,arg);
|
||||||
|
|
||||||
|
// expand args if any have wildcard character "*"
|
||||||
|
// this can reset nvalues
|
||||||
|
|
||||||
|
int expand = 0;
|
||||||
|
char **earg;
|
||||||
|
int *amap = nullptr;
|
||||||
|
nvalues = utils::expand_args(FLERR, nvalues, &arg[nfixedargs], /* mode=scalar */ 0, earg, lmp, &amap);
|
||||||
|
|
||||||
|
if (earg != &arg[nfixedargs]) expand = 1;
|
||||||
|
arg = earg;
|
||||||
|
|
||||||
|
// parse values
|
||||||
|
|
||||||
|
values.clear();
|
||||||
|
for (int i = 0; i < nvalues; i++) {
|
||||||
|
ArgInfo argi(arg[i]);
|
||||||
|
|
||||||
|
value_t val;
|
||||||
|
val.keyword = arg[i];
|
||||||
|
val.which = argi.get_type();
|
||||||
|
|
||||||
|
val.argindex = argi.get_index1();
|
||||||
|
val.iarg = (expand ? amap[i] : i) + nfixedargs;
|
||||||
|
val.varlen = 0;
|
||||||
|
val.id = argi.get_name();
|
||||||
|
val.val.c = nullptr;
|
||||||
|
|
||||||
|
if ((val.which == ArgInfo::NONE) || (val.which == ArgInfo::UNKNOWN) || (argi.get_dim() > 1))
|
||||||
|
error->all(FLERR, val.iarg, "Invalid fix ave/moments argument: {}", arg[i]);
|
||||||
|
|
||||||
|
values.push_back(std::move(val));
|
||||||
|
}
|
||||||
|
if (nvalues != (int)values.size())
|
||||||
|
error->all(FLERR, Error::NOPOINTER,
|
||||||
|
"Could not parse value data consistently for fix ave/moments");
|
||||||
|
|
||||||
|
// setup and error check
|
||||||
|
// for fix inputs, check that fix frequency is acceptable
|
||||||
|
|
||||||
|
if (nevery <= 0) error->all(FLERR, 3, "Illegal fix ave/moments nevery value: {}", nevery);
|
||||||
|
if (nrepeat <= 0) error->all(FLERR, 4, "Illegal fix ave/moments nrepeat value: {}", nrepeat);
|
||||||
|
if (nfreq <= 0) error->all(FLERR, 5, "Illegal fix ave/moments nfreq value: {}", nfreq);
|
||||||
|
|
||||||
|
for (auto &val : values) {
|
||||||
|
switch (val.which) {
|
||||||
|
case ArgInfo::COMPUTE:
|
||||||
|
val.val.c = modify->get_compute_by_id(val.id);
|
||||||
|
if (!val.val.c)
|
||||||
|
error->all(FLERR, val.iarg, "Compute ID {} for fix ave/moments does not exist", val.id);
|
||||||
|
if (val.argindex == 0 && (val.val.c->scalar_flag == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments compute {} does not calculate a scalar", val.id);
|
||||||
|
if (val.argindex && (val.val.c->vector_flag == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments compute {} does not calculate a vector", val.id);
|
||||||
|
if (val.argindex && (val.argindex > val.val.c->size_vector) &&
|
||||||
|
(val.val.c->size_vector_variable == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments compute {} vector is accessed out-of-range{}",
|
||||||
|
val.id, utils::errorurl(20));
|
||||||
|
if (val.argindex && val.val.c->size_vector_variable) val.varlen = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::FIX:
|
||||||
|
val.val.f = modify->get_fix_by_id(val.id);
|
||||||
|
if (!val.val.f) error->all(FLERR,"Fix ID {} for fix ave/moments does not exist", val.id);
|
||||||
|
if ((val.argindex == 0) && (val.val.f->scalar_flag == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments fix {} does not calculate a scalar", val.id);
|
||||||
|
if (val.argindex && (val.val.f->vector_flag == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments fix {} does not calculate a vector", val.id);
|
||||||
|
if (val.argindex && (val.val.f->size_vector_variable))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments fix {} vector cannot be variable length", val.id);
|
||||||
|
if (val.argindex && (val.argindex > val.val.f->size_vector))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments fix {} vector is accessed out-of-range{}",
|
||||||
|
val.id, utils::errorurl(20));
|
||||||
|
if (nevery % val.val.f->global_freq)
|
||||||
|
error->all(FLERR, val.iarg, "Fix {} for fix ave/moments not computed at compatible time{}",
|
||||||
|
val.id, utils::errorurl(7));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::VARIABLE:
|
||||||
|
int ivariable = input->variable->find(val.id.c_str());
|
||||||
|
if (ivariable < 0)
|
||||||
|
error->all(FLERR, val.iarg, "Variable name {} for fix ave/moments does not exist", val.id);
|
||||||
|
if ((val.argindex == 0) && (input->variable->equalstyle(ivariable) == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments variable {} is not equal-style variable", val.id);
|
||||||
|
if ((val.argindex) && (input->variable->vectorstyle(ivariable) == 0))
|
||||||
|
error->all(FLERR, val.iarg, "Fix ave/moments variable {} is not vector-style variable",
|
||||||
|
val.id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if wildcard expansion occurred, free earg memory from expand_args()
|
||||||
|
// wait to do this until after file comment lines are printed
|
||||||
|
|
||||||
|
if (expand) {
|
||||||
|
for (int i = 0; i < nvalues; i++) delete[] earg[i];
|
||||||
|
memory->sfree(earg);
|
||||||
|
memory->sfree(amap);
|
||||||
|
}
|
||||||
|
|
||||||
|
// allocate memory for averaging
|
||||||
|
|
||||||
|
window_list = nullptr;
|
||||||
|
result_list = nullptr;
|
||||||
|
|
||||||
|
// one window of nvalues columns and nrepeat rows (=all scalars of one value are consecutive)
|
||||||
|
memory->create(window_list, nvalues, nrepeat, "ave/moments:window_list");
|
||||||
|
for (int i = 0; i < nvalues; i++)
|
||||||
|
for (int j = 0; j < nrepeat; j++)
|
||||||
|
window_list[i][j] = 0.0;
|
||||||
|
|
||||||
|
// this fix produces a global vector and array
|
||||||
|
|
||||||
|
vector_flag = 1;
|
||||||
|
size_vector = nvalues * moments.size();
|
||||||
|
array_flag = 1;
|
||||||
|
size_array_rows = size_vector;
|
||||||
|
size_array_cols = nhistory;
|
||||||
|
|
||||||
|
// produce nmoments outputs per value with nhistory depth
|
||||||
|
memory->create(result_list, nhistory, size_vector, "ave/moments:result_list");
|
||||||
|
for (int i = 0; i < nhistory; i++)
|
||||||
|
for (int j = 0; j < size_vector; j++)
|
||||||
|
result_list[i][j] = 0.0;
|
||||||
|
|
||||||
|
// intensive/extensive flags set by compute,fix,variable that produces value
|
||||||
|
|
||||||
|
extvector = -1;
|
||||||
|
extarray = -2;
|
||||||
|
extlist = new int[size_vector];
|
||||||
|
int extvalue = 0;
|
||||||
|
int i = 0;
|
||||||
|
for (auto &val : values) {
|
||||||
|
switch (val.which) {
|
||||||
|
case ArgInfo::COMPUTE:
|
||||||
|
if (val.argindex == 0) extvalue = val.val.c->extscalar;
|
||||||
|
else if (val.val.f->extvector >= 0) extvalue = val.val.c->extvector;
|
||||||
|
else extvalue = val.val.c->extlist[val.argindex-1];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::FIX:
|
||||||
|
if (val.argindex == 0) extvalue = val.val.f->extscalar;
|
||||||
|
else if (val.val.f->extvector >= 0) extvalue = val.val.f->extvector;
|
||||||
|
else extvalue = val.val.f->extlist[val.argindex-1];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::VARIABLE:
|
||||||
|
extvalue = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (extvalue == -1)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Fix ave/moments cannot set output array "
|
||||||
|
"intensive/extensive from these inputs");
|
||||||
|
if (extarray < -1) extarray = extvalue;
|
||||||
|
else if (extvalue != extarray)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Fix ave/moments cannot set output array "
|
||||||
|
"intensive/extensive from these inputs");
|
||||||
|
for (int j=0; j < (int)moments.size(); j++)
|
||||||
|
extlist[i + j] = extvalue;
|
||||||
|
i += moments.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
// initializations
|
||||||
|
|
||||||
|
iwindow = window_filled = 0;
|
||||||
|
iresult = 0;
|
||||||
|
|
||||||
|
// nvalid = next step on which end_of_step does something
|
||||||
|
// add nvalid to all computes that store invocation times
|
||||||
|
// since don't know a priori which are invoked by this fix
|
||||||
|
// once in end_of_step() can set timestep for ones actually invoked
|
||||||
|
|
||||||
|
nvalid_comp_next = -1;
|
||||||
|
nvalid = -1;
|
||||||
|
setnextvalid();
|
||||||
|
modify->addstep_compute_all(nvalid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
FixAveMoments::~FixAveMoments()
|
||||||
|
{
|
||||||
|
values.clear();
|
||||||
|
moments.clear();
|
||||||
|
delete[] extlist;
|
||||||
|
|
||||||
|
memory->destroy(window_list);
|
||||||
|
memory->destroy(result_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int FixAveMoments::setmask()
|
||||||
|
{
|
||||||
|
int mask = 0;
|
||||||
|
mask |= END_OF_STEP;
|
||||||
|
return mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::init()
|
||||||
|
{
|
||||||
|
// update indices/pointers for all computes,fixes,variables
|
||||||
|
|
||||||
|
for (auto &val : values) {
|
||||||
|
switch (val.which) {
|
||||||
|
case ArgInfo::COMPUTE:
|
||||||
|
val.val.c = modify->get_compute_by_id(val.id);
|
||||||
|
if (!val.val.c)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for fix ave/moments does not exist",
|
||||||
|
val.id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::FIX:
|
||||||
|
val.val.f = modify->get_fix_by_id(val.id);
|
||||||
|
if (!val.val.f)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for fix ave/moments does not exist", val.id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::VARIABLE:
|
||||||
|
val.val.v = input->variable->find(val.id.c_str());
|
||||||
|
if (val.val.v < 0)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Variable name {} for fix ave/moments does not exist",
|
||||||
|
val.id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// need to reset nvalid if nvalid < ntimestep b/c minimize was performed
|
||||||
|
|
||||||
|
if (nvalid < update->ntimestep) {
|
||||||
|
setnextvalid();
|
||||||
|
modify->addstep_compute_all(nvalid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
only does something if nvalid = current timestep
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::setup(int /*vflag*/)
|
||||||
|
{
|
||||||
|
end_of_step();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::end_of_step()
|
||||||
|
{
|
||||||
|
// skip if not step which requires doing something
|
||||||
|
|
||||||
|
bigint ntimestep = update->ntimestep;
|
||||||
|
if (ntimestep != nvalid) return;
|
||||||
|
|
||||||
|
// always take new values
|
||||||
|
append_values();
|
||||||
|
|
||||||
|
// if window boundary reached, do a compute, otherwise just schedule next take
|
||||||
|
if (ntimestep == nvalid_comp_next) {
|
||||||
|
update_results();
|
||||||
|
setnextvalid();
|
||||||
|
} else {
|
||||||
|
nvalid += nevery;
|
||||||
|
}
|
||||||
|
|
||||||
|
modify->addstep_compute(nvalid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
return scalar value
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
double FixAveMoments::compute_scalar()
|
||||||
|
{
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
return Ith vector value
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
double FixAveMoments::compute_vector(int i)
|
||||||
|
{
|
||||||
|
return compute_array(i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
return I,J array value
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
double FixAveMoments::compute_array(int i, int j)
|
||||||
|
{
|
||||||
|
if (i >= size_vector) return 0.0;
|
||||||
|
if (j >= nhistory) return 0.0;
|
||||||
|
// locate the j'th previous result in the ring buffer, relative to the
|
||||||
|
// row before iresult (the current insert cursor)
|
||||||
|
int row = (iresult - 1 - j + nhistory) % nhistory;
|
||||||
|
return result_list[row][i];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
parse moment names
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int FixAveMoments::consume_moments(int iarg, int narg, char **arg)
|
||||||
|
{
|
||||||
|
moments.clear();
|
||||||
|
|
||||||
|
while (iarg < narg) {
|
||||||
|
if (strcmp(arg[iarg],"mean") == 0)
|
||||||
|
moments.push_back(MEAN);
|
||||||
|
else if (strcmp(arg[iarg],"stddev") == 0)
|
||||||
|
moments.push_back(STDDEV);
|
||||||
|
else if (strcmp(arg[iarg],"variance") == 0)
|
||||||
|
moments.push_back(VARIANCE);
|
||||||
|
else if (strcmp(arg[iarg],"skew") == 0)
|
||||||
|
moments.push_back(SKEW);
|
||||||
|
else if (strcmp(arg[iarg],"kurtosis") == 0)
|
||||||
|
moments.push_back(KURTOSIS);
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
iarg++;
|
||||||
|
}
|
||||||
|
return iarg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
parse optional args
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::options(int iarg, int narg, char **arg)
|
||||||
|
{
|
||||||
|
// option defaults
|
||||||
|
|
||||||
|
nhistory = 1;
|
||||||
|
startstep = 0;
|
||||||
|
|
||||||
|
// optional args
|
||||||
|
|
||||||
|
while (iarg < narg) {
|
||||||
|
if (strcmp(arg[iarg],"history") == 0) {
|
||||||
|
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix ave/moments history", error);
|
||||||
|
nhistory = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||||
|
if (nhistory <= 0)
|
||||||
|
error->all(FLERR, iarg+2, "Illegal ave/moments history argument {}; must be > 0",
|
||||||
|
nhistory);
|
||||||
|
iarg += 2;
|
||||||
|
} else if (strcmp(arg[iarg],"start") == 0) {
|
||||||
|
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix ave/moments start", error);
|
||||||
|
startstep = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||||
|
iarg += 2;
|
||||||
|
} else error->all(FLERR,"Unknown fix ave/moments keyword {}", arg[iarg]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
return next timestep no earlier than `after`, rounded to next
|
||||||
|
multiple of freq
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
bigint next_after(const bigint ts, const bigint after, const int freq)
|
||||||
|
{
|
||||||
|
if (ts >= after) return ts;
|
||||||
|
return ts + ((after - ts) / freq + 1) * freq;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
calculate nvalid = next step on which end_of_step does something
|
||||||
|
this is either a step to take data
|
||||||
|
or a step to take and compute the values (nfreq multiple)
|
||||||
|
startstep is lower bound on nfreq multiple
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::setnextvalid()
|
||||||
|
{
|
||||||
|
bigint ntimestep = update->ntimestep;
|
||||||
|
|
||||||
|
if (nvalid_comp_next > ntimestep) {
|
||||||
|
// next window end boundary is still in the future, just increment
|
||||||
|
nvalid = ntimestep + nevery;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get next window end first
|
||||||
|
bigint next_comp = (ntimestep/nfreq)*nfreq + nfreq;
|
||||||
|
nvalid_comp_next = next_after(next_comp, startstep, nfreq);
|
||||||
|
|
||||||
|
// from there, calculate the first time we have to take a value
|
||||||
|
bigint ntake = nvalid_comp_next - static_cast<bigint>(nrepeat-1)*nevery;
|
||||||
|
nvalid = next_after(ntake, ntimestep, nevery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::get_values(std::vector<double>& scalars)
|
||||||
|
{
|
||||||
|
// accumulate results of computes,fixes,variables to local copy
|
||||||
|
int i = 0;
|
||||||
|
double scalar = 0.0;
|
||||||
|
for (auto &val : values) {
|
||||||
|
switch (val.which) {
|
||||||
|
case ArgInfo::COMPUTE:
|
||||||
|
// invoke compute if not previously invoked
|
||||||
|
// ensure no out-of-range access to variable-length compute vector
|
||||||
|
if (val.argindex == 0) {
|
||||||
|
if (!(val.val.c->invoked_flag & Compute::INVOKED_SCALAR)) {
|
||||||
|
val.val.c->compute_scalar();
|
||||||
|
val.val.c->invoked_flag |= Compute::INVOKED_SCALAR;
|
||||||
|
}
|
||||||
|
scalar = val.val.c->scalar;
|
||||||
|
} else {
|
||||||
|
if (!(val.val.c->invoked_flag & Compute::INVOKED_VECTOR)) {
|
||||||
|
val.val.c->compute_vector();
|
||||||
|
val.val.c->invoked_flag |= Compute::INVOKED_VECTOR;
|
||||||
|
}
|
||||||
|
if (val.varlen && (val.val.c->size_vector < val.argindex)) scalar = 0.0;
|
||||||
|
else scalar = val.val.c->vector[val.argindex-1];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::FIX:
|
||||||
|
// access fix fields, guaranteed to be ready
|
||||||
|
if (val.argindex == 0)
|
||||||
|
scalar = val.val.f->compute_scalar();
|
||||||
|
else
|
||||||
|
scalar = val.val.f->compute_vector(val.argindex-1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArgInfo::VARIABLE:
|
||||||
|
// evaluate equal-style or vector-style variable
|
||||||
|
// if index exceeds vector length, use a zero value
|
||||||
|
// this can be useful if vector length is not known a priori
|
||||||
|
if (val.argindex == 0)
|
||||||
|
scalar = input->variable->compute_equal(val.val.v);
|
||||||
|
else {
|
||||||
|
double *varvec;
|
||||||
|
int nvec = input->variable->compute_vector(val.val.v,&varvec);
|
||||||
|
if (val.argindex > nvec) scalar = 0.0;
|
||||||
|
else scalar = varvec[val.argindex-1];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
scalars[i] = scalar;
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void FixAveMoments::append_values()
|
||||||
|
{
|
||||||
|
// accumulate results of computes,fixes,variables to local copy
|
||||||
|
// compute/fix/variable may invoke computes so wrap with clear/add
|
||||||
|
|
||||||
|
modify->clearstep_compute();
|
||||||
|
|
||||||
|
std::vector<double> scalars(nvalues);
|
||||||
|
get_values(scalars);
|
||||||
|
|
||||||
|
// transpose for faster access later
|
||||||
|
for (int i=0; i<nvalues; i++) {
|
||||||
|
window_list[i][iwindow] = scalars[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++iwindow >= nrepeat) {
|
||||||
|
window_filled = 1;
|
||||||
|
iwindow = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FixAveMoments::update_results()
|
||||||
|
{
|
||||||
|
const int count = window_filled ? nrepeat : iwindow;
|
||||||
|
// Delay until we can safely do all moments. Avoids branching in the hot loop.
|
||||||
|
if (count<3) return;
|
||||||
|
|
||||||
|
double *result = result_list[iresult];
|
||||||
|
|
||||||
|
// zero out previous values
|
||||||
|
|
||||||
|
for (int i = 0; i < size_vector; i++)
|
||||||
|
result[i] = 0.0;
|
||||||
|
|
||||||
|
const double inv_n = 1.0 / count;
|
||||||
|
const double fk2 = (double)count / (count - 1);
|
||||||
|
const double fk3 = square((double)count) / ((count - 1) * (count - 2));
|
||||||
|
const double np1_nm3 = (count+1.0)/(count-3.0);
|
||||||
|
const double _3_nm1_nm3 = 3.0 * (count-1.0)/(count-3.0);
|
||||||
|
|
||||||
|
// Each value is a series that can be processed individually
|
||||||
|
for (int i = 0; i < nvalues; i++) {
|
||||||
|
const double* series = window_list[i];
|
||||||
|
|
||||||
|
// first pass: mean
|
||||||
|
double mean = 0.0;
|
||||||
|
for (int j = 0; j<count; j++)
|
||||||
|
mean += series[j] * inv_n;
|
||||||
|
|
||||||
|
// second pass: calculate biased sample moments
|
||||||
|
double m2 = 0.0;
|
||||||
|
double m3 = 0.0;
|
||||||
|
double m4 = 0.0;
|
||||||
|
for (int j = 0; j<count; j++) {
|
||||||
|
const double dx = series[j] - mean;
|
||||||
|
double y = square(dx) * inv_n;
|
||||||
|
m2 += y;
|
||||||
|
y *= dx;
|
||||||
|
m3 += y;
|
||||||
|
y *= dx;
|
||||||
|
m4 += y;
|
||||||
|
}
|
||||||
|
// obtain unbiased cumulants as defined by Cramér and
|
||||||
|
// reported i.e. in https://doi.org/10.1111/1467-9884.00122
|
||||||
|
const double k2 = fk2 * m2;
|
||||||
|
const double k3 = fk3 * m3;
|
||||||
|
const double k4 = fk3 * (np1_nm3 * m4 - _3_nm1_nm3 * square(m2));
|
||||||
|
// corrected sample standard deviation
|
||||||
|
const double stddev = sqrt(k2);
|
||||||
|
// adjusted Fisher-Pearson standardized moment coefficient G1
|
||||||
|
const double G1 = k3 / cube(stddev);
|
||||||
|
// adjusted Fisher-Pearson standardized moment coefficient G2 (from unbiased cumulant)
|
||||||
|
const double G2 = k4 / square(k2);
|
||||||
|
|
||||||
|
// map to result array, starting at value interleave offset
|
||||||
|
double* rfirst = &result[i * moments.size()];
|
||||||
|
for (int j = 0; j < (int)moments.size(); j++) {
|
||||||
|
switch(moments[j]) {
|
||||||
|
case MEAN:
|
||||||
|
rfirst[j] = mean;
|
||||||
|
break;
|
||||||
|
case STDDEV:
|
||||||
|
rfirst[j] = stddev;
|
||||||
|
break;
|
||||||
|
case VARIANCE:
|
||||||
|
rfirst[j] = k2;
|
||||||
|
break;
|
||||||
|
case SKEW:
|
||||||
|
rfirst[j] = G1;
|
||||||
|
break;
|
||||||
|
case KURTOSIS:
|
||||||
|
rfirst[j] = G2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++iresult >= nhistory)
|
||||||
|
iresult = 0;
|
||||||
|
}
|
||||||
78
src/EXTRA-FIX/fix_ave_moments.h
Normal file
78
src/EXTRA-FIX/fix_ave_moments.h
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/* -*- 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.
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifdef FIX_CLASS
|
||||||
|
// clang-format off
|
||||||
|
FixStyle(ave/moments,FixAveMoments);
|
||||||
|
// clang-format on
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_FIX_AVE_MOMENTS_H
|
||||||
|
#define LMP_FIX_AVE_MOMENTS_H
|
||||||
|
|
||||||
|
#include "fix.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class FixAveMoments : public Fix {
|
||||||
|
public:
|
||||||
|
FixAveMoments(class LAMMPS *, int, char **);
|
||||||
|
~FixAveMoments() override;
|
||||||
|
int setmask() override;
|
||||||
|
void init() override;
|
||||||
|
void setup(int) override;
|
||||||
|
void end_of_step() override;
|
||||||
|
double compute_scalar() override;
|
||||||
|
double compute_vector(int) override;
|
||||||
|
double compute_array(int, int) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct value_t {
|
||||||
|
int which; // type of data: COMPUTE, FIX, VARIABLE
|
||||||
|
int argindex; // 1-based index if data is vector, else 0
|
||||||
|
int iarg; // argument index in original argument list
|
||||||
|
int varlen; // 1 if value is from variable-length compute
|
||||||
|
std::string id; // compute/fix/variable ID
|
||||||
|
std::string keyword; // column keyword in output
|
||||||
|
union {
|
||||||
|
class Compute *c;
|
||||||
|
class Fix *f;
|
||||||
|
int v;
|
||||||
|
} val;
|
||||||
|
};
|
||||||
|
std::vector<value_t> values;
|
||||||
|
std::vector<int> moments;
|
||||||
|
|
||||||
|
int nrepeat, nfreq;
|
||||||
|
int nvalues;
|
||||||
|
bigint nvalid, nvalid_comp_next;
|
||||||
|
|
||||||
|
int startstep;
|
||||||
|
|
||||||
|
int nhistory, iresult;
|
||||||
|
double **result_list;
|
||||||
|
|
||||||
|
int iwindow, window_filled;
|
||||||
|
double **window_list;
|
||||||
|
|
||||||
|
int consume_moments(int iarg, int narg, char **arg);
|
||||||
|
void options(int, int, char **);
|
||||||
|
void setnextvalid();
|
||||||
|
|
||||||
|
void get_values(std::vector<double>& scalars);
|
||||||
|
void append_values();
|
||||||
|
void update_results();
|
||||||
|
};
|
||||||
|
} // namespace LAMMPS_NS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
@ -114,7 +114,7 @@ void FixDrag::post_force(int /*vflag*/)
|
|||||||
if (!xflag) dx = 0.0;
|
if (!xflag) dx = 0.0;
|
||||||
if (!yflag) dy = 0.0;
|
if (!yflag) dy = 0.0;
|
||||||
if (!zflag) dz = 0.0;
|
if (!zflag) dz = 0.0;
|
||||||
domain->minimum_image(dx,dy,dz);
|
domain->minimum_image(FLERR, dx,dy,dz);
|
||||||
r = sqrt(dx*dx + dy*dy + dz*dz);
|
r = sqrt(dx*dx + dy*dy + dz*dz);
|
||||||
if (r > delta) {
|
if (r > delta) {
|
||||||
prefactor = f_mag/r;
|
prefactor = f_mag/r;
|
||||||
|
|||||||
@ -547,17 +547,17 @@ void FixFilterCorotate::pre_neighbor()
|
|||||||
del1[0] = x[atom1][0]-x[oxy][0];
|
del1[0] = x[atom1][0]-x[oxy][0];
|
||||||
del1[1] = x[atom1][1]-x[oxy][1];
|
del1[1] = x[atom1][1]-x[oxy][1];
|
||||||
del1[2] = x[atom1][2]-x[oxy][2];
|
del1[2] = x[atom1][2]-x[oxy][2];
|
||||||
domain->minimum_image(del1);
|
domain->minimum_image(FLERR, del1);
|
||||||
|
|
||||||
del2[0] = x[atom2][0]-x[atom1][0];
|
del2[0] = x[atom2][0]-x[atom1][0];
|
||||||
del2[1] = x[atom2][1]-x[atom1][1];
|
del2[1] = x[atom2][1]-x[atom1][1];
|
||||||
del2[2] = x[atom2][2]-x[atom1][2];
|
del2[2] = x[atom2][2]-x[atom1][2];
|
||||||
domain->minimum_image(del2);
|
domain->minimum_image(FLERR, del2);
|
||||||
|
|
||||||
del3[0] = x[atom3][0]-x[atom1][0];
|
del3[0] = x[atom3][0]-x[atom1][0];
|
||||||
del3[1] = x[atom3][1]-x[atom1][1];
|
del3[1] = x[atom3][1]-x[atom1][1];
|
||||||
del3[2] = x[atom3][2]-x[atom1][2];
|
del3[2] = x[atom3][2]-x[atom1][2];
|
||||||
domain->minimum_image(del3);
|
domain->minimum_image(FLERR, del3);
|
||||||
|
|
||||||
double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]);
|
double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]);
|
||||||
double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]);
|
double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]);
|
||||||
@ -620,17 +620,17 @@ void FixFilterCorotate::pre_neighbor()
|
|||||||
del1[0] = x[atom1][0]-x[oxy][0];
|
del1[0] = x[atom1][0]-x[oxy][0];
|
||||||
del1[1] = x[atom1][1]-x[oxy][1];
|
del1[1] = x[atom1][1]-x[oxy][1];
|
||||||
del1[2] = x[atom1][2]-x[oxy][2];
|
del1[2] = x[atom1][2]-x[oxy][2];
|
||||||
domain->minimum_image(del1);
|
domain->minimum_image(FLERR, del1);
|
||||||
|
|
||||||
del2[0] = x[atom2][0]-x[atom1][0];
|
del2[0] = x[atom2][0]-x[atom1][0];
|
||||||
del2[1] = x[atom2][1]-x[atom1][1];
|
del2[1] = x[atom2][1]-x[atom1][1];
|
||||||
del2[2] = x[atom2][2]-x[atom1][2];
|
del2[2] = x[atom2][2]-x[atom1][2];
|
||||||
domain->minimum_image(del2);
|
domain->minimum_image(FLERR, del2);
|
||||||
|
|
||||||
del3[0] = x[atom3][0]-x[atom1][0];
|
del3[0] = x[atom3][0]-x[atom1][0];
|
||||||
del3[1] = x[atom3][1]-x[atom1][1];
|
del3[1] = x[atom3][1]-x[atom1][1];
|
||||||
del3[2] = x[atom3][2]-x[atom1][2];
|
del3[2] = x[atom3][2]-x[atom1][2];
|
||||||
domain->minimum_image(del3);
|
domain->minimum_image(FLERR, del3);
|
||||||
|
|
||||||
double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]);
|
double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]);
|
||||||
double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]);
|
double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]);
|
||||||
@ -1414,7 +1414,7 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list)
|
|||||||
del[i][0] = x[list_cluster[i]][0] - x[list_cluster[0]][0];
|
del[i][0] = x[list_cluster[i]][0] - x[list_cluster[0]][0];
|
||||||
del[i][1] = x[list_cluster[i]][1] - x[list_cluster[0]][1];
|
del[i][1] = x[list_cluster[i]][1] - x[list_cluster[0]][1];
|
||||||
del[i][2] = x[list_cluster[i]][2] - x[list_cluster[0]][2];
|
del[i][2] = x[list_cluster[i]][2] - x[list_cluster[0]][2];
|
||||||
domain->minimum_image(del[i]);
|
domain->minimum_image(FLERR, del[i]);
|
||||||
r[i] = 1.0/sqrt(del[i][0]*del[i][0]+del[i][1]*del[i][1]+
|
r[i] = 1.0/sqrt(del[i][0]*del[i][0]+del[i][1]*del[i][1]+
|
||||||
del[i][2]*del[i][2]);
|
del[i][2]*del[i][2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -261,7 +261,7 @@ void FixPAFI::post_force(int /*vflag*/)
|
|||||||
deviation[0] = x[i][0]-path[i][0]; // x-path
|
deviation[0] = x[i][0]-path[i][0]; // x-path
|
||||||
deviation[1] = x[i][1]-path[i][1]; // x-path
|
deviation[1] = x[i][1]-path[i][1]; // x-path
|
||||||
deviation[2] = x[i][2]-path[i][2]; // x-path
|
deviation[2] = x[i][2]-path[i][2]; // x-path
|
||||||
domain->minimum_image(deviation);
|
domain->minimum_image(FLERR, deviation);
|
||||||
|
|
||||||
proj[3] += path[i][6]*deviation[0]; // (x-path).dn/nn = psi
|
proj[3] += path[i][6]*deviation[0]; // (x-path).dn/nn = psi
|
||||||
proj[3] += path[i][7]*deviation[1]; // (x-path).dn/nn = psi
|
proj[3] += path[i][7]*deviation[1]; // (x-path).dn/nn = psi
|
||||||
@ -424,7 +424,7 @@ void FixPAFI::min_post_force(int /*vflag*/)
|
|||||||
deviation[0] = x[i][0]-path[i][0]; // x-path
|
deviation[0] = x[i][0]-path[i][0]; // x-path
|
||||||
deviation[1] = x[i][1]-path[i][1]; // x-path
|
deviation[1] = x[i][1]-path[i][1]; // x-path
|
||||||
deviation[2] = x[i][2]-path[i][2]; // x-path
|
deviation[2] = x[i][2]-path[i][2]; // x-path
|
||||||
domain->minimum_image(deviation);
|
domain->minimum_image(FLERR, deviation);
|
||||||
|
|
||||||
proj[3] += path[i][6]*deviation[0]; // (x-path).dn/nn = psi
|
proj[3] += path[i][6]*deviation[0]; // (x-path).dn/nn = psi
|
||||||
proj[3] += path[i][7]*deviation[1]; // (x-path).dn/nn = psi
|
proj[3] += path[i][7]*deviation[1]; // (x-path).dn/nn = psi
|
||||||
|
|||||||
@ -155,13 +155,13 @@ double AngleCosineDelta::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
@ -185,13 +185,13 @@ void AngleCosineDelta::born_matrix(int type, int i1, int i2, int i3, double &du,
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -284,13 +284,13 @@ double AngleCosinePeriodic::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
@ -311,13 +311,13 @@ void AngleCosinePeriodic::born_matrix(int type, int i1, int i2, int i3, double &
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -258,13 +258,13 @@ double AngleCosineShift::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -297,13 +297,13 @@ double AngleCosineShiftExp::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -242,13 +242,13 @@ double AngleCosineSquaredRestricted::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
@ -272,13 +272,13 @@ void AngleCosineSquaredRestricted::born_matrix(int type, int i1, int i2, int i3,
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -263,13 +263,13 @@ double AngleFourier::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
@ -291,13 +291,13 @@ void AngleFourier::born_matrix(int type, int i1, int i2, int i3, double &du, dou
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -269,13 +269,13 @@ double AngleFourierSimple::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
@ -297,13 +297,13 @@ void AngleFourierSimple::born_matrix(int type, int i1, int i2, int i3, double &d
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -325,13 +325,13 @@ double AngleGaussian::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -260,13 +260,13 @@ double AngleMWLC::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
@ -289,12 +289,12 @@ void AngleMWLC::born_matrix(int type, int i1, int i2, int i3, double &du, double
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
c /= sqrt((delx1 * delx1 + dely1 * dely1 + delz1 * delz1) *
|
c /= sqrt((delx1 * delx1 + dely1 * dely1 + delz1 * delz1) *
|
||||||
|
|||||||
@ -269,13 +269,13 @@ double AngleQuartic::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
@ -299,13 +299,13 @@ void AngleQuartic::born_matrix(int type, int i1, int i2, int i3, double &du, dou
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ void BondHarmonicRestrain::compute(int eflag, int vflag)
|
|||||||
delx = x0[i1][0] - x0[i2][0];
|
delx = x0[i1][0] - x0[i2][0];
|
||||||
dely = x0[i1][1] - x0[i2][1];
|
dely = x0[i1][1] - x0[i2][1];
|
||||||
delz = x0[i1][2] - x0[i2][2];
|
delz = x0[i1][2] - x0[i2][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
rsq = delx * delx + dely * dely + delz * delz;
|
rsq = delx * delx + dely * dely + delz * delz;
|
||||||
r0 = sqrt(rsq);
|
r0 = sqrt(rsq);
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ double BondHarmonicRestrain::single(int type, double rsq, int i, int j, double &
|
|||||||
double delx = x0[i][0] - x0[j][0];
|
double delx = x0[i][0] - x0[j][0];
|
||||||
double dely = x0[i][1] - x0[j][1];
|
double dely = x0[i][1] - x0[j][1];
|
||||||
double delz = x0[i][2] - x0[j][2];
|
double delz = x0[i][2] - x0[j][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
double r0 = sqrt(delx * delx + dely * dely + delz * delz);
|
double r0 = sqrt(delx * delx + dely * dely + delz * delz);
|
||||||
|
|
||||||
double r = sqrt(rsq);
|
double r = sqrt(rsq);
|
||||||
|
|||||||
@ -110,9 +110,9 @@ static double Phi(double const *x1, //array holding x,y,z coords atom 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Consider periodic boundary conditions:
|
//Consider periodic boundary conditions:
|
||||||
domain->minimum_image(vb12[0], vb12[1], vb12[2]);
|
domain->minimum_image(FLERR, vb12[0], vb12[1], vb12[2]);
|
||||||
domain->minimum_image(vb23[0], vb23[1], vb23[2]);
|
domain->minimum_image(FLERR, vb23[0], vb23[1], vb23[2]);
|
||||||
domain->minimum_image(vb34[0], vb34[1], vb34[2]);
|
domain->minimum_image(FLERR, vb34[0], vb34[1], vb34[2]);
|
||||||
|
|
||||||
//--- Compute the normal to the planes formed by atoms 1,2,3 and 2,3,4 ---
|
//--- Compute the normal to the planes formed by atoms 1,2,3 and 2,3,4 ---
|
||||||
|
|
||||||
|
|||||||
@ -94,31 +94,31 @@ void ImproperDistance::compute(int eflag, int vflag)
|
|||||||
xab = x[i2][0] - x[i1][0];
|
xab = x[i2][0] - x[i1][0];
|
||||||
yab = x[i2][1] - x[i1][1];
|
yab = x[i2][1] - x[i1][1];
|
||||||
zab = x[i2][2] - x[i1][2];
|
zab = x[i2][2] - x[i1][2];
|
||||||
domain->minimum_image(xab,yab,zab);
|
domain->minimum_image(FLERR, xab,yab,zab);
|
||||||
|
|
||||||
// bond 1->3
|
// bond 1->3
|
||||||
xac = x[i3][0] - x[i1][0];
|
xac = x[i3][0] - x[i1][0];
|
||||||
yac = x[i3][1] - x[i1][1];
|
yac = x[i3][1] - x[i1][1];
|
||||||
zac = x[i3][2] - x[i1][2];
|
zac = x[i3][2] - x[i1][2];
|
||||||
domain->minimum_image(xac,yac,zac);
|
domain->minimum_image(FLERR, xac,yac,zac);
|
||||||
|
|
||||||
// bond 1->4
|
// bond 1->4
|
||||||
xad = x[i4][0] - x[i1][0];
|
xad = x[i4][0] - x[i1][0];
|
||||||
yad = x[i4][1] - x[i1][1];
|
yad = x[i4][1] - x[i1][1];
|
||||||
zad = x[i4][2] - x[i1][2];
|
zad = x[i4][2] - x[i1][2];
|
||||||
domain->minimum_image(xad,yad,zad);
|
domain->minimum_image(FLERR, xad,yad,zad);
|
||||||
|
|
||||||
// bond 2-3
|
// bond 2-3
|
||||||
xbc = x[i3][0] - x[i2][0];
|
xbc = x[i3][0] - x[i2][0];
|
||||||
ybc = x[i3][1] - x[i2][1];
|
ybc = x[i3][1] - x[i2][1];
|
||||||
zbc = x[i3][2] - x[i2][2];
|
zbc = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(xbc,ybc,zbc);
|
domain->minimum_image(FLERR, xbc,ybc,zbc);
|
||||||
|
|
||||||
// bond 2-4
|
// bond 2-4
|
||||||
xbd = x[i4][0] - x[i2][0];
|
xbd = x[i4][0] - x[i2][0];
|
||||||
ybd = x[i4][1] - x[i2][1];
|
ybd = x[i4][1] - x[i2][1];
|
||||||
zbd = x[i4][2] - x[i2][2];
|
zbd = x[i4][2] - x[i2][2];
|
||||||
domain->minimum_image(xbd,ybd,zbd);
|
domain->minimum_image(FLERR, xbd,ybd,zbd);
|
||||||
|
|
||||||
xna = ybc*zbd - zbc*ybd;
|
xna = ybc*zbd - zbc*ybd;
|
||||||
yna = -(xbc*zbd - zbc*xbd);
|
yna = -(xbc*zbd - zbc*xbd);
|
||||||
|
|||||||
@ -540,7 +540,7 @@ void FixPour::pre_exchange()
|
|||||||
delx = coords[m][0] - xnear[i][0];
|
delx = coords[m][0] - xnear[i][0];
|
||||||
dely = coords[m][1] - xnear[i][1];
|
dely = coords[m][1] - xnear[i][1];
|
||||||
delz = coords[m][2] - xnear[i][2];
|
delz = coords[m][2] - xnear[i][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
rsq = delx * delx + dely * dely + delz * delz;
|
rsq = delx * delx + dely * dely + delz * delz;
|
||||||
radsum = coords[m][3] + xnear[i][3];
|
radsum = coords[m][3] + xnear[i][3];
|
||||||
if (rsq <= radsum * radsum) break;
|
if (rsq <= radsum * radsum) break;
|
||||||
@ -781,7 +781,7 @@ int FixPour::overlap(int i)
|
|||||||
double delx = x[0] - xc;
|
double delx = x[0] - xc;
|
||||||
double dely = x[1] - yc;
|
double dely = x[1] - yc;
|
||||||
double delz = 0.0;
|
double delz = 0.0;
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
double rsq = delx * delx + dely * dely;
|
double rsq = delx * delx + dely * dely;
|
||||||
double r = rc + delta;
|
double r = rc + delta;
|
||||||
if (rsq > r * r) return 0;
|
if (rsq > r * r) return 0;
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void FixMinimizeKokkos::reset_coords()
|
|||||||
double dx = dx0;
|
double dx = dx0;
|
||||||
double dy = dy0;
|
double dy = dy0;
|
||||||
double dz = dz0;
|
double dz = dz0;
|
||||||
// domain->minimum_image(dx,dy,dz);
|
// domain->minimum_image(FLERR, dx,dy,dz);
|
||||||
{
|
{
|
||||||
if (triclinic == 0) {
|
if (triclinic == 0) {
|
||||||
if (xperiodic) {
|
if (xperiodic) {
|
||||||
@ -175,7 +175,7 @@ void FixMinimizeKokkos::reset_coords()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end domain->minimum_image(dx,dy,dz);
|
} // end domain->minimum_image(FLERR, dx,dy,dz);
|
||||||
if (dx != dx0) l_x0[n] = l_x(i,0) - dx;
|
if (dx != dx0) l_x0[n] = l_x(i,0) - dx;
|
||||||
if (dy != dy0) l_x0[n+1] = l_x(i,1) - dy;
|
if (dy != dy0) l_x0[n+1] = l_x(i,1) - dy;
|
||||||
if (dz != dz0) l_x0[n+2] = l_x(i,2) - dz;
|
if (dz != dz0) l_x0[n+2] = l_x(i,2) - dz;
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class MLIAPModelPythonKokkos : public MLIAPModelPython, public MLIAPModelKokkos<
|
|||||||
public:
|
public:
|
||||||
MLIAPModelPythonKokkos(LAMMPS *, char * = nullptr);
|
MLIAPModelPythonKokkos(LAMMPS *, char * = nullptr);
|
||||||
~MLIAPModelPythonKokkos();
|
~MLIAPModelPythonKokkos();
|
||||||
void read_coeffs(char *fname);
|
void read_coeffs(char *fname) override;
|
||||||
|
|
||||||
void compute_gradients(class MLIAPData *) override;
|
void compute_gradients(class MLIAPData *) override;
|
||||||
void compute_gradgrads(class MLIAPData *) override;
|
void compute_gradgrads(class MLIAPData *) override;
|
||||||
|
|||||||
@ -37,15 +37,9 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// prototype repeated from base class implementation
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
struct ACEALImpl {
|
struct ACEALImpl {
|
||||||
ACEALImpl() : basis_set(nullptr), ace(nullptr) {}
|
|
||||||
|
|
||||||
~ACEALImpl() {
|
|
||||||
delete basis_set;
|
|
||||||
delete ace;
|
|
||||||
}
|
|
||||||
|
|
||||||
ACEBBasisSet *basis_set;
|
ACEBBasisSet *basis_set;
|
||||||
ACEBEvaluator *ace;
|
ACEBEvaluator *ace;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -38,14 +38,9 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
// prototype repeated from base class implementation
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
struct ACEImpl {
|
struct ACEImpl {
|
||||||
ACEImpl() : basis_set(nullptr), ace(nullptr) {}
|
|
||||||
~ACEImpl()
|
|
||||||
{
|
|
||||||
delete basis_set;
|
|
||||||
delete ace;
|
|
||||||
}
|
|
||||||
ACECTildeBasisSet *basis_set;
|
ACECTildeBasisSet *basis_set;
|
||||||
ACERecursiveEvaluator *ace;
|
ACERecursiveEvaluator *ace;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -395,13 +395,13 @@ double AngleLepton::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -508,9 +508,9 @@ double DihedralLepton::get_phi(double const *x1, //array holding x,y,z coords
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Consider periodic boundary conditions:
|
//Consider periodic boundary conditions:
|
||||||
domain->minimum_image(vb12[0], vb12[1], vb12[2]);
|
domain->minimum_image(FLERR, vb12[0], vb12[1], vb12[2]);
|
||||||
domain->minimum_image(vb23[0], vb23[1], vb23[2]);
|
domain->minimum_image(FLERR, vb23[0], vb23[1], vb23[2]);
|
||||||
domain->minimum_image(vb34[0], vb34[1], vb34[2]);
|
domain->minimum_image(FLERR, vb34[0], vb34[1], vb34[2]);
|
||||||
|
|
||||||
//--- Compute the normal to the planes formed by atoms 1,2,3 and 2,3,4 ---
|
//--- Compute the normal to the planes formed by atoms 1,2,3 and 2,3,4 ---
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ void PairHertz::compute(int eflag, int vflag) {
|
|||||||
dely0 = x0[j][1] - x0[i][1];
|
dely0 = x0[j][1] - x0[i][1];
|
||||||
delz0 = x0[j][2] - x0[i][2];
|
delz0 = x0[j][2] - x0[i][2];
|
||||||
if (periodic) {
|
if (periodic) {
|
||||||
domain->minimum_image(delx0, dely0, delz0);
|
domain->minimum_image(FLERR, delx0, dely0, delz0);
|
||||||
}
|
}
|
||||||
rSq0 = delx0 * delx0 + dely0 * dely0 + delz0 * delz0; // initial distance
|
rSq0 = delx0 * delx0 + dely0 * dely0 + delz0 * delz0; // initial distance
|
||||||
sphCut = sph_radius[i] + sph_radius[j];
|
sphCut = sph_radius[i] + sph_radius[j];
|
||||||
|
|||||||
@ -220,7 +220,7 @@ void PairTlsph::PreCompute() {
|
|||||||
dx = xj - xi;
|
dx = xj - xi;
|
||||||
|
|
||||||
if (periodic)
|
if (periodic)
|
||||||
domain->minimum_image(dx0(0), dx0(1), dx0(2));
|
domain->minimum_image(FLERR, dx0(0), dx0(1), dx0(2));
|
||||||
|
|
||||||
r0Sq = dx0.squaredNorm();
|
r0Sq = dx0.squaredNorm();
|
||||||
h = irad + radius[j];
|
h = irad + radius[j];
|
||||||
@ -488,7 +488,7 @@ void PairTlsph::ComputeForces(int eflag, int vflag) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (periodic)
|
if (periodic)
|
||||||
domain->minimum_image(dx0(0), dx0(1), dx0(2));
|
domain->minimum_image(FLERR, dx0(0), dx0(1), dx0(2));
|
||||||
|
|
||||||
// check that distance between i and j (in the reference config) is less than cutoff
|
// check that distance between i and j (in the reference config) is less than cutoff
|
||||||
dx0 = x0j - x0i;
|
dx0 = x0j - x0i;
|
||||||
|
|||||||
@ -154,7 +154,7 @@ void PairTriSurf::compute(int eflag, int vflag) {
|
|||||||
x4(2) = x[particle][2];
|
x4(2) = x[particle][2];
|
||||||
dx = x_center - x4; //
|
dx = x_center - x4; //
|
||||||
if (periodic) {
|
if (periodic) {
|
||||||
domain->minimum_image(dx(0), dx(1), dx(2));
|
domain->minimum_image(FLERR, dx(0), dx(1), dx(2));
|
||||||
}
|
}
|
||||||
rsq = dx.squaredNorm();
|
rsq = dx.squaredNorm();
|
||||||
|
|
||||||
|
|||||||
@ -723,7 +723,7 @@ double FixBondSwap::dist_rsq(int i, int j)
|
|||||||
double delx = x[i][0] - x[j][0];
|
double delx = x[i][0] - x[j][0];
|
||||||
double dely = x[i][1] - x[j][1];
|
double dely = x[i][1] - x[j][1];
|
||||||
double delz = x[i][2] - x[j][2];
|
double delz = x[i][2] - x[j][2];
|
||||||
domain->minimum_image(delx,dely,delz);
|
domain->minimum_image(FLERR, delx,dely,delz);
|
||||||
return (delx*delx + dely*dely + delz*delz);
|
return (delx*delx + dely*dely + delz*delz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#include "angle.h"
|
#include "angle.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "bond.h"
|
#include "bond.h"
|
||||||
|
#include "citeme.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "compute.h"
|
#include "compute.h"
|
||||||
#include "compute_voronoi_atom.h"
|
#include "compute_voronoi_atom.h"
|
||||||
@ -31,6 +32,7 @@
|
|||||||
#include "group.h"
|
#include "group.h"
|
||||||
#include "improper.h"
|
#include "improper.h"
|
||||||
#include "kspace.h"
|
#include "kspace.h"
|
||||||
|
#include "math_extra.h"
|
||||||
#include "math_special.h"
|
#include "math_special.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
@ -40,15 +42,17 @@
|
|||||||
#include "region.h"
|
#include "region.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
#include <cctype>
|
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
using MathExtra::distsq3;
|
||||||
|
using MathSpecial::square;
|
||||||
|
|
||||||
static const char cite_fix_neighbor_swap_c[] =
|
static const char cite_fix_neighbor_swap[] =
|
||||||
"fix neighbor/swap command: doi:10.1016/j.commatsci.2022.111929\n\n"
|
"fix neighbor/swap command: doi:10.1016/j.commatsci.2022.111929\n\n"
|
||||||
"@Article{Tavenner2023111929,\n"
|
"@Article{Tavenner2023111929,\n"
|
||||||
" author = {Jacob P. Tavenner and Mikhail I. Mendelev and John W. Lawson},\n"
|
" author = {Jacob P. Tavenner and Mikhail I. Mendelev and John W. Lawson},\n"
|
||||||
@ -58,15 +62,17 @@ static const char cite_fix_neighbor_swap_c[] =
|
|||||||
" year = {2023},\n"
|
" year = {2023},\n"
|
||||||
" volume = {218},\n"
|
" volume = {218},\n"
|
||||||
" pages = {111929}\n"
|
" pages = {111929}\n"
|
||||||
" url = {https://www.sciencedirect.com/science/article/pii/S0927025622006401}\n"
|
" url = {https://dx.doi.org/10.1016/j.commatsci.2022.111929}\n"
|
||||||
"}\n\n";
|
"}\n\n";
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixNeighborSwap::FixNeighborSwap(LAMMPS *lmp, int narg, char **arg) :
|
FixNeighborSwap::FixNeighborSwap(LAMMPS *lmp, int narg, char **arg) :
|
||||||
Fix(lmp, narg, arg), region(nullptr), idregion(nullptr), type_list(nullptr), qtype(nullptr),
|
Fix(lmp, narg, arg), region(nullptr), idregion(nullptr), type_list(nullptr), rate_list(nullptr),
|
||||||
c_voro(nullptr), voro_neighbor_list(nullptr), sqrt_mass_ratio(nullptr),
|
qtype(nullptr), sqrt_mass_ratio(nullptr), voro_neighbor_list(nullptr),
|
||||||
local_swap_iatom_list(nullptr), random_equal(nullptr), c_pe(nullptr)
|
local_swap_iatom_list(nullptr), local_swap_neighbor_list(nullptr),
|
||||||
|
local_swap_type_list(nullptr), local_swap_probability(nullptr), random_equal(nullptr),
|
||||||
|
id_voro(nullptr), c_voro(nullptr), c_pe(nullptr)
|
||||||
{
|
{
|
||||||
if (narg < 10) utils::missing_cmd_args(FLERR, "fix neighbor/swap", error);
|
if (narg < 10) utils::missing_cmd_args(FLERR, "fix neighbor/swap", error);
|
||||||
|
|
||||||
@ -79,37 +85,49 @@ FixNeighborSwap::FixNeighborSwap(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
restart_global = 1;
|
restart_global = 1;
|
||||||
time_depend = 1;
|
time_depend = 1;
|
||||||
|
|
||||||
|
ke_flag = 1;
|
||||||
|
diff_flag = 0;
|
||||||
|
rates_flag = 0;
|
||||||
|
nswaptypes = 0;
|
||||||
|
|
||||||
|
if (lmp->citeme) lmp->citeme->add(cite_fix_neighbor_swap);
|
||||||
|
|
||||||
// required args
|
// required args
|
||||||
|
|
||||||
nevery = utils::inumeric(FLERR, arg[3], false, lmp);
|
nevery = utils::inumeric(FLERR, arg[3], false, lmp);
|
||||||
ncycles = utils::inumeric(FLERR, arg[4], false, lmp);
|
ncycles = utils::inumeric(FLERR, arg[4], false, lmp);
|
||||||
seed = utils::inumeric(FLERR, arg[5], false, lmp);
|
seed = utils::inumeric(FLERR, arg[5], false, lmp);
|
||||||
double temperature = utils::numeric(FLERR, arg[6], false, lmp);
|
double temperature = utils::numeric(FLERR, arg[6], false, lmp);
|
||||||
r_0 = utils::inumeric(FLERR, arg[7], false, lmp);
|
double r_0 = utils::inumeric(FLERR, arg[7], false, lmp);
|
||||||
|
|
||||||
|
if (nevery <= 0)
|
||||||
|
error->all(FLERR, 3, "Illegal fix neighbor/swap command nevery value: {}", nevery);
|
||||||
|
if (ncycles < 0)
|
||||||
|
error->all(FLERR, 4, "Illegal fix neighbor/swap command ncycles value: {}", ncycles);
|
||||||
|
if (seed <= 0) error->all(FLERR, 5, "Illegal fix neighbor/swap command seed value: {}", seed);
|
||||||
|
if (temperature <= 0.0)
|
||||||
|
error->all(FLERR, 6, "Illegal fix neighbor/swap command temperature value: {}", temperature);
|
||||||
|
if (r_0 <= 0.0) error->all(FLERR, 7, "Illegal fix neighbor/swap command R0 value: {}", r_0);
|
||||||
|
|
||||||
// Voro compute check
|
// Voro compute check
|
||||||
|
|
||||||
int icompute = modify->find_compute(utils::strdup(arg[8]));
|
id_voro = utils::strdup(arg[8]);
|
||||||
if (icompute < 0) error->all(FLERR, "Could not find neighbor compute ID");
|
c_voro = modify->get_compute_by_id(id_voro);
|
||||||
c_voro = modify->compute[icompute];
|
if (!c_voro) error->all(FLERR, 8, "Could not find compute voronoi ID {}", id_voro);
|
||||||
if (c_voro->local_flag == 0)
|
if (c_voro->local_flag == 0)
|
||||||
error->all(FLERR, "Neighbor compute does not compute local info");
|
error->all(FLERR, 8, "Voronoi compute {} does not compute local info", id_voro);
|
||||||
if (c_voro->size_local_cols != 3)
|
if (c_voro->size_local_cols != 3)
|
||||||
error->all(FLERR, "Neighbor compute does not give i, j, size as expected");
|
error->all(FLERR, 8, "Voronoi compute {} does not compute i, j, sizes as expected", id_voro);
|
||||||
|
|
||||||
if (nevery <= 0) error->all(FLERR, "Illegal fix neighbor/swap command nevery value");
|
|
||||||
if (ncycles < 0) error->all(FLERR, "Illegal fix neighbor/swap command ncycles value");
|
|
||||||
if (seed <= 0) error->all(FLERR, "Illegal fix neighbor/swap command seed value");
|
|
||||||
if (temperature <= 0.0) error->all(FLERR, "Illegal fix neighbor/swap command temperature value");
|
|
||||||
|
|
||||||
beta = 1.0 / (force->boltz * temperature);
|
beta = 1.0 / (force->boltz * temperature);
|
||||||
|
inv_r_0 = 1.0 / r_0;
|
||||||
|
|
||||||
memory->create(type_list, atom->ntypes, "neighbor/swap:type_list");
|
memory->create(type_list, atom->ntypes, "neighbor/swap:type_list");
|
||||||
memory->create(rate_list, atom->ntypes, "neighbor/swap:rate_list");
|
memory->create(rate_list, atom->ntypes, "neighbor/swap:rate_list");
|
||||||
|
|
||||||
// read options from end of input line
|
// read options from end of input line
|
||||||
|
|
||||||
options(narg - 8, &arg[8]);
|
options(narg - 9, &arg[9]);
|
||||||
|
|
||||||
// random number generator, same for all procs
|
// random number generator, same for all procs
|
||||||
|
|
||||||
@ -126,11 +144,6 @@ FixNeighborSwap::FixNeighborSwap(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
nswap_successes = 0.0;
|
nswap_successes = 0.0;
|
||||||
|
|
||||||
atom_swap_nmax = 0;
|
atom_swap_nmax = 0;
|
||||||
voro_neighbor_list = nullptr;
|
|
||||||
local_swap_iatom_list = nullptr;
|
|
||||||
local_swap_neighbor_list = nullptr;
|
|
||||||
local_swap_probability = nullptr;
|
|
||||||
local_swap_type_list = nullptr;
|
|
||||||
|
|
||||||
// set comm size needed by this Fix
|
// set comm size needed by this Fix
|
||||||
|
|
||||||
@ -153,6 +166,7 @@ FixNeighborSwap::~FixNeighborSwap()
|
|||||||
memory->destroy(local_swap_probability);
|
memory->destroy(local_swap_probability);
|
||||||
memory->destroy(local_swap_type_list);
|
memory->destroy(local_swap_type_list);
|
||||||
delete[] idregion;
|
delete[] idregion;
|
||||||
|
delete[] id_voro;
|
||||||
delete random_equal;
|
delete random_equal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,62 +174,85 @@ FixNeighborSwap::~FixNeighborSwap()
|
|||||||
parse optional parameters at end of input line
|
parse optional parameters at end of input line
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
static const std::unordered_set<std::string> known_keywords = {"region", "ke", "types", "diff",
|
||||||
|
"rates"};
|
||||||
|
static bool is_keyword(const std::string &arg)
|
||||||
|
{
|
||||||
|
return known_keywords.find(arg) != known_keywords.end();
|
||||||
|
}
|
||||||
|
|
||||||
void FixNeighborSwap::options(int narg, char **arg)
|
void FixNeighborSwap::options(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg < 0) error->all(FLERR, "Illegal fix neighbor/swap command\n");
|
if (narg < 0) utils::missing_cmd_args(FLERR, "fix neighbor/swap", error);
|
||||||
|
|
||||||
ke_flag = 1;
|
|
||||||
diff_flag = 0;
|
|
||||||
rates_flag = 0;
|
|
||||||
nswaptypes = 0;
|
|
||||||
|
|
||||||
|
int ioffset = 9; // first 9 arguments are fixed and handled in constructor
|
||||||
int iarg = 0;
|
int iarg = 0;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (strcmp(arg[iarg], "region") == 0) {
|
if (strcmp(arg[iarg], "region") == 0) {
|
||||||
if (iarg + 2 > narg) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix neighbor/swap region", error);
|
||||||
region = domain->get_region_by_id(arg[iarg + 1]);
|
delete[] idregion;
|
||||||
if (!region) error->all(FLERR, "Region ID for fix neighbor/swap does not exist");
|
|
||||||
idregion = utils::strdup(arg[iarg + 1]);
|
idregion = utils::strdup(arg[iarg + 1]);
|
||||||
|
region = domain->get_region_by_id(idregion);
|
||||||
|
if (!region)
|
||||||
|
error->all(FLERR, iarg + 1 + ioffset, "Region ID {} for fix neighbor/swap does not exist",
|
||||||
|
idregion);
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg], "ke") == 0) {
|
} else if (strcmp(arg[iarg], "ke") == 0) {
|
||||||
if (iarg + 2 > narg) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix neighbor/swap ke", error);
|
||||||
ke_flag = utils::logical(FLERR, arg[iarg + 1], false, lmp);
|
ke_flag = utils::logical(FLERR, arg[iarg + 1], false, lmp);
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg], "types") == 0) {
|
} else if (strcmp(arg[iarg], "types") == 0) {
|
||||||
if (iarg + 3 > narg) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (iarg + 3 > narg) utils::missing_cmd_args(FLERR, "fix neighbor/swap types", error);
|
||||||
if (diff_flag != 0) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (diff_flag)
|
||||||
|
error->all(FLERR, iarg + ioffset, "Cannot use 'diff' and 'types' keywords together");
|
||||||
iarg++;
|
iarg++;
|
||||||
nswaptypes = 0;
|
nswaptypes = 0;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (isalpha(arg[iarg][0])) break;
|
if (is_keyword(arg[iarg])) break;
|
||||||
if (nswaptypes >= atom->ntypes) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (nswaptypes >= atom->ntypes)
|
||||||
type_list[nswaptypes] = utils::numeric(FLERR, arg[iarg], false, lmp);
|
error->all(FLERR, iarg + ioffset, "Too many arguments to fix neighbor/swap types");
|
||||||
|
type_list[nswaptypes] = utils::expand_type_int(FLERR, arg[iarg], Atom::ATOM, lmp);
|
||||||
nswaptypes++;
|
nswaptypes++;
|
||||||
iarg++;
|
iarg++;
|
||||||
}
|
}
|
||||||
} else if (strcmp(arg[iarg], "diff") == 0) {
|
} else if (strcmp(arg[iarg], "diff") == 0) {
|
||||||
if (iarg + 2 > narg) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "fix neighbor/swap diff", error);
|
||||||
if (nswaptypes != 0) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (diff_flag) error->all(FLERR, iarg + ioffset, "Cannot use 'diff' keyword multiple times");
|
||||||
|
if (nswaptypes != 0)
|
||||||
|
error->all(FLERR, iarg + ioffset, "Cannot use 'diff' and 'types' keywords together");
|
||||||
type_list[nswaptypes] = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
|
type_list[nswaptypes] = utils::numeric(FLERR, arg[iarg + 1], false, lmp);
|
||||||
diff_flag = 1;
|
diff_flag = 1;
|
||||||
nswaptypes++;
|
nswaptypes++;
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg], "rates") == 0) {
|
} else if (strcmp(arg[iarg], "rates") == 0) {
|
||||||
if (iarg + atom->ntypes >= narg) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (iarg + atom->ntypes >= narg)
|
||||||
|
utils::missing_cmd_args(FLERR, "fix neighbor/swap rates", error);
|
||||||
iarg++;
|
iarg++;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (isalpha(arg[iarg][0])) break;
|
if (is_keyword(arg[iarg])) break;
|
||||||
if (i >= atom->ntypes) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (i >= atom->ntypes) error->all(FLERR, "Too many values for fix neighbor/swap rates");
|
||||||
rate_list[i] = utils::numeric(FLERR, arg[iarg], false, lmp);
|
rate_list[i] = utils::numeric(FLERR, arg[iarg], false, lmp);
|
||||||
i++;
|
i++;
|
||||||
iarg++;
|
iarg++;
|
||||||
}
|
}
|
||||||
rates_flag = 1;
|
rates_flag = 1;
|
||||||
if (i != atom->ntypes) error->all(FLERR, "Illegal fix neighbor/swap command");
|
if (i != atom->ntypes)
|
||||||
} else
|
error->all(FLERR, "Fix neighbor/swap rates keyword must have exactly {} arguments",
|
||||||
error->all(FLERR, "Illegal fix neighbor/swap command");
|
atom->ntypes);
|
||||||
|
} else {
|
||||||
|
error->all(FLERR, "Unknown fix neighbor/swap keyword: {}", arg[iarg]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// checks
|
||||||
|
if (!nswaptypes && !diff_flag)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
|
"Must specify at either 'types' or 'diff' keyword with fix neighbor/swap");
|
||||||
|
|
||||||
|
if (nswaptypes < 2 && !diff_flag)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
|
"Must specify at least 2 atom types in fix neighbor/swap 'types' keyword");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -232,23 +269,26 @@ int FixNeighborSwap::setmask()
|
|||||||
void FixNeighborSwap::init()
|
void FixNeighborSwap::init()
|
||||||
{
|
{
|
||||||
c_pe = modify->get_compute_by_id("thermo_pe");
|
c_pe = modify->get_compute_by_id("thermo_pe");
|
||||||
|
if (!c_pe) error->all(FLERR, Error::NOLASTLINE, "Could not find 'thermo_pe' compute");
|
||||||
|
|
||||||
int *type = atom->type;
|
c_voro = modify->get_compute_by_id(id_voro);
|
||||||
|
if (!c_voro)
|
||||||
if (nswaptypes < 2 && !diff_flag)
|
error->all(FLERR, Error::NOLASTLINE, "Could not find compute voronoi ID {}", id_voro);
|
||||||
error->all(FLERR, "Must specify at least 2 types in fix neighbor/swap command");
|
|
||||||
|
|
||||||
// set index and check validity of region
|
// set index and check validity of region
|
||||||
|
|
||||||
if (idregion) {
|
if (idregion) {
|
||||||
region = domain->get_region_by_id(idregion);
|
region = domain->get_region_by_id(idregion);
|
||||||
if (!region) error->all(FLERR, "Region {} for fix setforce does not exist", idregion);
|
if (!region)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "Region {} for fix neighbor/swap does not exist",
|
||||||
|
idregion);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int iswaptype = 0; iswaptype < nswaptypes; iswaptype++)
|
for (int iswaptype = 0; iswaptype < nswaptypes; iswaptype++)
|
||||||
if (type_list[iswaptype] <= 0 || type_list[iswaptype] > atom->ntypes)
|
if (type_list[iswaptype] <= 0 || type_list[iswaptype] > atom->ntypes)
|
||||||
error->all(FLERR, "Invalid atom type in fix neighbor/swap command");
|
error->all(FLERR, Error::NOLASTLINE, "Invalid atom type in fix neighbor/swap command");
|
||||||
|
|
||||||
|
int *type = atom->type;
|
||||||
if (atom->q_flag) {
|
if (atom->q_flag) {
|
||||||
double qmax, qmin;
|
double qmax, qmin;
|
||||||
int firstall, first;
|
int firstall, first;
|
||||||
@ -258,23 +298,27 @@ void FixNeighborSwap::init()
|
|||||||
for (int i = 0; i < atom->nlocal; i++) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
if (atom->mask[i] & groupbit) {
|
if (atom->mask[i] & groupbit) {
|
||||||
if (type[i] == type_list[iswaptype]) {
|
if (type[i] == type_list[iswaptype]) {
|
||||||
if (first) {
|
if (first > 0) {
|
||||||
qtype[iswaptype] = atom->q[i];
|
qtype[iswaptype] = atom->q[i];
|
||||||
first = 0;
|
first = 0;
|
||||||
} else if (qtype[iswaptype] != atom->q[i])
|
} else if (qtype[iswaptype] != atom->q[i])
|
||||||
error->one(FLERR, "All atoms of a swapped type must have the same charge.");
|
first = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MPI_Allreduce(&first, &firstall, 1, MPI_INT, MPI_MIN, world);
|
MPI_Allreduce(&first, &firstall, 1, MPI_INT, MPI_MIN, world);
|
||||||
if (firstall)
|
if (firstall < 0)
|
||||||
error->all(FLERR,
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
"At least one atom of each swapped type must be present to define charges.");
|
"All atoms of a swapped type must have the same charge");
|
||||||
|
if (firstall > 0)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
|
"At least one atom of each swapped type must be present to define charges");
|
||||||
if (first) qtype[iswaptype] = -DBL_MAX;
|
if (first) qtype[iswaptype] = -DBL_MAX;
|
||||||
MPI_Allreduce(&qtype[iswaptype], &qmax, 1, MPI_DOUBLE, MPI_MAX, world);
|
MPI_Allreduce(&qtype[iswaptype], &qmax, 1, MPI_DOUBLE, MPI_MAX, world);
|
||||||
if (first) qtype[iswaptype] = DBL_MAX;
|
if (first) qtype[iswaptype] = DBL_MAX;
|
||||||
MPI_Allreduce(&qtype[iswaptype], &qmin, 1, MPI_DOUBLE, MPI_MIN, world);
|
MPI_Allreduce(&qtype[iswaptype], &qmin, 1, MPI_DOUBLE, MPI_MIN, world);
|
||||||
if (qmax != qmin) error->all(FLERR, "All atoms of a swapped type must have same charge.");
|
if (qmax != qmin)
|
||||||
|
error->all(FLERR, Error::NOLASTLINE, "All atoms of a swapped type must have same charge.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,8 +352,9 @@ void FixNeighborSwap::init()
|
|||||||
|
|
||||||
int flagall;
|
int flagall;
|
||||||
MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world);
|
MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world);
|
||||||
|
if (flagall)
|
||||||
if (flagall) error->all(FLERR, "Cannot do neighbor/swap on atoms in atom_modify first group");
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
|
"Cannot use fix neighbor/swap on atoms in atom_modify first group");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,9 +404,6 @@ void FixNeighborSwap::pre_exchange()
|
|||||||
|
|
||||||
int FixNeighborSwap::attempt_swap()
|
int FixNeighborSwap::attempt_swap()
|
||||||
{
|
{
|
||||||
// int nlocal = atom->nlocal;
|
|
||||||
tagint *id = atom->tag;
|
|
||||||
|
|
||||||
if (niswap == 0) return 0;
|
if (niswap == 0) return 0;
|
||||||
|
|
||||||
// pre-swap energy
|
// pre-swap energy
|
||||||
@ -372,9 +414,6 @@ int FixNeighborSwap::attempt_swap()
|
|||||||
|
|
||||||
int i = pick_i_swap_atom();
|
int i = pick_i_swap_atom();
|
||||||
|
|
||||||
// get global id and position of atom i
|
|
||||||
// get_global_i(i);
|
|
||||||
|
|
||||||
// build nearest-neighbor list based on atom i
|
// build nearest-neighbor list based on atom i
|
||||||
|
|
||||||
build_i_neighbor_list(i);
|
build_i_neighbor_list(i);
|
||||||
@ -382,7 +421,7 @@ int FixNeighborSwap::attempt_swap()
|
|||||||
|
|
||||||
// pick a neighbor atom j based on i neighbor list
|
// pick a neighbor atom j based on i neighbor list
|
||||||
jtype_selected = -1;
|
jtype_selected = -1;
|
||||||
int j = pick_j_swap_neighbor(i);
|
int j = pick_j_swap_neighbor();
|
||||||
|
|
||||||
int itype = type_list[0];
|
int itype = type_list[0];
|
||||||
int jtype = jtype_selected;
|
int jtype = jtype_selected;
|
||||||
@ -494,26 +533,23 @@ double FixNeighborSwap::energy_full()
|
|||||||
int FixNeighborSwap::pick_i_swap_atom()
|
int FixNeighborSwap::pick_i_swap_atom()
|
||||||
{
|
{
|
||||||
tagint *id = atom->tag;
|
tagint *id = atom->tag;
|
||||||
int id_center_local = -1;
|
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
||||||
int iwhichglobal = static_cast<int>(niswap * random_equal->uniform());
|
int iwhichglobal = static_cast<int>(niswap * random_equal->uniform());
|
||||||
if ((iwhichglobal >= niswap_before) && (iwhichglobal < niswap_before + niswap_local)) {
|
if ((iwhichglobal >= niswap_before) && (iwhichglobal < niswap_before + niswap_local)) {
|
||||||
int iwhichlocal = iwhichglobal - niswap_before;
|
int iwhichlocal = iwhichglobal - niswap_before;
|
||||||
i = local_swap_iatom_list[iwhichlocal];
|
i = local_swap_iatom_list[iwhichlocal];
|
||||||
id_center_local = id[i];
|
|
||||||
MPI_Allreduce(&id[i], &id_center, 1, MPI_INT, MPI_MAX, world);
|
MPI_Allreduce(&id[i], &id_center, 1, MPI_INT, MPI_MAX, world);
|
||||||
} else {
|
} else {
|
||||||
MPI_Allreduce(&id[i], &id_center, 1, MPI_INT, MPI_MAX, world);
|
id_center = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int FixNeighborSwap::pick_j_swap_neighbor(int i)
|
int FixNeighborSwap::pick_j_swap_neighbor()
|
||||||
{
|
{
|
||||||
int j = -1;
|
int j = -1;
|
||||||
int jtype_selected_local = -1;
|
int jtype_selected_local = -1;
|
||||||
@ -535,7 +571,7 @@ int FixNeighborSwap::pick_j_swap_neighbor(int i)
|
|||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
error->all(FLERR, "Did not select local neighbor swap atom");
|
error->all(FLERR, Error::NOLASTLINE, "Did not select local neighbor swap atom");
|
||||||
}
|
}
|
||||||
|
|
||||||
MPI_Allreduce(&jtype_selected_local, &jtype_selected, 1, MPI_INT, MPI_MAX, world);
|
MPI_Allreduce(&jtype_selected_local, &jtype_selected, 1, MPI_INT, MPI_MAX, world);
|
||||||
@ -545,16 +581,6 @@ int FixNeighborSwap::pick_j_swap_neighbor(int i)
|
|||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
double FixNeighborSwap::get_distance(double *i, double *j)
|
|
||||||
{
|
|
||||||
double r = sqrt(MathSpecial::square((i[0] - j[0])) + MathSpecial::square((i[1] - j[1])) +
|
|
||||||
MathSpecial::square((i[2] - j[2])));
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
|
||||||
------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
||||||
{
|
{
|
||||||
int nghost = atom->nghost;
|
int nghost = atom->nghost;
|
||||||
@ -621,20 +647,18 @@ void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
|||||||
|
|
||||||
// Get distance if own center atom
|
// Get distance if own center atom
|
||||||
double r = INFINITY;
|
double r = INFINITY;
|
||||||
if (i_center >= 0) { double r = get_distance(x[temp_j], x[i_center]); }
|
|
||||||
|
|
||||||
// Get local id of ghost center atom when ghost
|
// Get local id of ghost center atom when ghost
|
||||||
for (int i = nlocal; i < nlocal + nghost; i++) {
|
for (int i = nlocal; i < nlocal + nghost; i++) {
|
||||||
if ((id[i] == id_center) && (get_distance(x[temp_j], x[i]) < r)) {
|
double rtmp = sqrt(distsq3(x[temp_j], x[i]));
|
||||||
r = get_distance(x[temp_j], x[i]);
|
if ((id[i] == id_center) && (rtmp < r)) r = rtmp;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rates_flag) {
|
if (rates_flag) {
|
||||||
local_swap_probability[njswap_local] =
|
local_swap_probability[njswap_local] =
|
||||||
rate_list[type[temp_j] - 1] * exp(-MathSpecial::square(r / r_0));
|
rate_list[type[temp_j] - 1] * exp(-square(r * inv_r_0));
|
||||||
} else {
|
} else {
|
||||||
local_swap_probability[njswap_local] = exp(-MathSpecial::square(r / r_0));
|
local_swap_probability[njswap_local] = exp(-square(r * inv_r_0));
|
||||||
}
|
}
|
||||||
local_probability += local_swap_probability[njswap_local];
|
local_probability += local_swap_probability[njswap_local];
|
||||||
local_swap_type_list[njswap_local] = type[temp_j];
|
local_swap_type_list[njswap_local] = type[temp_j];
|
||||||
@ -646,20 +670,18 @@ void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
|||||||
// Calculate distance from i to each j, adjust probability of selection
|
// Calculate distance from i to each j, adjust probability of selection
|
||||||
// Get distance if own center atom
|
// Get distance if own center atom
|
||||||
double r = INFINITY;
|
double r = INFINITY;
|
||||||
if (i_center >= 0) { double r = get_distance(x[temp_j], x[i_center]); }
|
|
||||||
|
|
||||||
// Get local id of ghost center atom when ghost
|
// Get local id of ghost center atom when ghost
|
||||||
for (int i = nlocal; i < nlocal + nghost; i++) {
|
for (int i = nlocal; i < nlocal + nghost; i++) {
|
||||||
if ((id[i] == id_center) && (get_distance(x[temp_j], x[i]) < r)) {
|
double rtmp = sqrt(distsq3(x[temp_j], x[i]));
|
||||||
r = get_distance(x[temp_j], x[i]);
|
if ((id[i] == id_center) && (rtmp < r)) r = rtmp;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rates_flag) {
|
if (rates_flag) {
|
||||||
local_swap_probability[njswap_local] =
|
local_swap_probability[njswap_local] =
|
||||||
rate_list[type[temp_j] - 1] * exp(-MathSpecial::square(r / r_0));
|
rate_list[type[temp_j] - 1] * exp(-square(r * inv_r_0));
|
||||||
} else {
|
} else {
|
||||||
local_swap_probability[njswap_local] = exp(-MathSpecial::square(r / r_0));
|
local_swap_probability[njswap_local] = exp(-square(r * inv_r_0));
|
||||||
}
|
}
|
||||||
local_probability += local_swap_probability[njswap_local];
|
local_probability += local_swap_probability[njswap_local];
|
||||||
|
|
||||||
@ -677,19 +699,18 @@ void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
|||||||
// Calculate distance from i to each j, adjust probability of selection
|
// Calculate distance from i to each j, adjust probability of selection
|
||||||
// Get distance if own center atom
|
// Get distance if own center atom
|
||||||
double r = INFINITY;
|
double r = INFINITY;
|
||||||
if (i_center >= 0) { r = get_distance(x[temp_j], x[i_center]); }
|
|
||||||
|
|
||||||
// Get local id of ghost center atoms
|
// Get local id of ghost center atoms
|
||||||
for (int i = nlocal; i < nlocal + nghost; i++) {
|
for (int i = nlocal; i < nlocal + nghost; i++) {
|
||||||
if ((id[i] == id_center) && (get_distance(x[temp_j], x[i]) < r))
|
double rtmp = sqrt(distsq3(x[temp_j], x[i]));
|
||||||
r = get_distance(x[temp_j], x[i]);
|
if ((id[i] == id_center) && (rtmp < r)) r = rtmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rates_flag) {
|
if (rates_flag) {
|
||||||
local_swap_probability[njswap_local] =
|
local_swap_probability[njswap_local] =
|
||||||
rate_list[type[temp_j] - 1] * exp(-MathSpecial::square(r / r_0));
|
rate_list[type[temp_j] - 1] * exp(-square(r * inv_r_0));
|
||||||
} else {
|
} else {
|
||||||
local_swap_probability[njswap_local] = exp(-MathSpecial::square(r / r_0));
|
local_swap_probability[njswap_local] = exp(-square(r * inv_r_0));
|
||||||
}
|
}
|
||||||
local_probability += local_swap_probability[njswap_local];
|
local_probability += local_swap_probability[njswap_local];
|
||||||
|
|
||||||
@ -702,20 +723,18 @@ void FixNeighborSwap::build_i_neighbor_list(int i_center)
|
|||||||
// Calculate distance from i to each j, adjust probability of selection
|
// Calculate distance from i to each j, adjust probability of selection
|
||||||
// Get distance if own center atom
|
// Get distance if own center atom
|
||||||
double r = INFINITY;
|
double r = INFINITY;
|
||||||
if (i_center >= 0) { double r = get_distance(x[temp_j], x[i_center]); }
|
|
||||||
|
|
||||||
// Get local id of ghost center atom when ghost
|
// Get local id of ghost center atom when ghost
|
||||||
for (int i = nlocal; i < nlocal + nghost; i++) {
|
for (int i = nlocal; i < nlocal + nghost; i++) {
|
||||||
if ((id[i] == id_center) && (get_distance(x[temp_j], x[i]) < r)) {
|
double rtmp = sqrt(distsq3(x[temp_j], x[i]));
|
||||||
r = get_distance(x[temp_j], x[i]);
|
if ((id[i] == id_center) && (rtmp < r)) r = rtmp;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rates_flag) {
|
if (rates_flag) {
|
||||||
local_swap_probability[njswap_local] =
|
local_swap_probability[njswap_local] =
|
||||||
rate_list[type[temp_j] - 1] * exp(-MathSpecial::square(r / r_0));
|
rate_list[type[temp_j] - 1] * exp(-square(r * inv_r_0));
|
||||||
} else {
|
} else {
|
||||||
local_swap_probability[njswap_local] = exp(-MathSpecial::square(r / r_0));
|
local_swap_probability[njswap_local] = exp(-square(r * inv_r_0));
|
||||||
}
|
}
|
||||||
local_probability += local_swap_probability[njswap_local];
|
local_probability += local_swap_probability[njswap_local];
|
||||||
|
|
||||||
@ -897,5 +916,6 @@ void FixNeighborSwap::restart(char *buf)
|
|||||||
|
|
||||||
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
||||||
if (ntimestep_restart != update->ntimestep)
|
if (ntimestep_restart != update->ntimestep)
|
||||||
error->all(FLERR, "Must not reset timestep when restarting fix neighbor/swap");
|
error->all(FLERR, Error::NOLASTLINE,
|
||||||
|
"Must not reset timestep when restarting fix neighbor/swap");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,6 @@ class FixNeighborSwap : public Fix {
|
|||||||
int niswap, njswap; // # of i,j swap atoms on all procs
|
int niswap, njswap; // # of i,j swap atoms on all procs
|
||||||
int niswap_local, njswap_local; // # of swap atoms on this proc
|
int niswap_local, njswap_local; // # of swap atoms on this proc
|
||||||
int niswap_before, njswap_before; // # of swap atoms on procs < this proc
|
int niswap_before, njswap_before; // # of swap atoms on procs < this proc
|
||||||
// int global_i_ID; // global id of selected i atom
|
|
||||||
class Region *region; // swap region
|
class Region *region; // swap region
|
||||||
char *idregion; // swap region id
|
char *idregion; // swap region id
|
||||||
|
|
||||||
@ -66,7 +65,7 @@ class FixNeighborSwap : public Fix {
|
|||||||
bool unequal_cutoffs;
|
bool unequal_cutoffs;
|
||||||
|
|
||||||
int atom_swap_nmax;
|
int atom_swap_nmax;
|
||||||
double beta, r_0;
|
double beta, inv_r_0;
|
||||||
double local_probability; // Total swap probability stored on this proc
|
double local_probability; // Total swap probability stored on this proc
|
||||||
double global_probability; // Total swap probability across all proc
|
double global_probability; // Total swap probability across all proc
|
||||||
double prev_probability; // Swap probability on proc < this proc
|
double prev_probability; // Swap probability on proc < this proc
|
||||||
@ -81,15 +80,14 @@ class FixNeighborSwap : public Fix {
|
|||||||
|
|
||||||
class RanPark *random_equal;
|
class RanPark *random_equal;
|
||||||
|
|
||||||
class Compute *c_voro;
|
char *id_voro;
|
||||||
class Compute *c_pe;
|
class Compute *c_voro, *c_pe;
|
||||||
|
|
||||||
void options(int, char **);
|
void options(int, char **);
|
||||||
int attempt_swap();
|
int attempt_swap();
|
||||||
double energy_full();
|
double energy_full();
|
||||||
int pick_i_swap_atom();
|
int pick_i_swap_atom();
|
||||||
int pick_j_swap_neighbor(int);
|
int pick_j_swap_neighbor();
|
||||||
double get_distance(double[3], double[3]);
|
|
||||||
void build_i_neighbor_list(int);
|
void build_i_neighbor_list(int);
|
||||||
void update_iswap_atoms_list();
|
void update_iswap_atoms_list();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -687,7 +687,7 @@ void FixMDIQMMM::pre_force(int vflag)
|
|||||||
double delx = xqm[i][0] - xqm[j][0];
|
double delx = xqm[i][0] - xqm[j][0];
|
||||||
double dely = xqm[i][1] - xqm[j][1];
|
double dely = xqm[i][1] - xqm[j][1];
|
||||||
double delz = xqm[i][2] - xqm[j][2];
|
double delz = xqm[i][2] - xqm[j][2];
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
rsq = delx * delx + dely * dely + delz * delz;
|
rsq = delx * delx + dely * dely + delz * delz;
|
||||||
qpotential_mine[i] -= qqrd2e * qqm[j] / sqrt(rsq);
|
qpotential_mine[i] -= qqrd2e * qqm[j] / sqrt(rsq);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -371,13 +371,13 @@ double AngleMesoCNT::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -399,7 +399,7 @@ void FixIPI::initial_integrate(int /*vflag*/)
|
|||||||
auto dely = x[i][1] - xhold[i][1];
|
auto dely = x[i][1] - xhold[i][1];
|
||||||
auto delz = x[i][2] - xhold[i][2];
|
auto delz = x[i][2] - xhold[i][2];
|
||||||
|
|
||||||
domain->minimum_image(delx, dely, delz);
|
domain->minimum_image(FLERR, delx, dely, delz);
|
||||||
|
|
||||||
x[i][0] = xhold[i][0] + delx;
|
x[i][0] = xhold[i][0] + delx;
|
||||||
x[i][1] = xhold[i][1] + dely;
|
x[i][1] = xhold[i][1] + dely;
|
||||||
|
|||||||
@ -453,13 +453,13 @@ double AngleClass2P6::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -365,13 +365,13 @@ double AngleCosineBuck6d::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1,dely1,delz1);
|
domain->minimum_image(FLERR, delx1,dely1,delz1);
|
||||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2,dely2,delz2);
|
domain->minimum_image(FLERR, delx2,dely2,delz2);
|
||||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||||
|
|
||||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||||
|
|||||||
@ -282,19 +282,19 @@ double AngleCharmm::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double delxUB = x[i3][0] - x[i1][0];
|
double delxUB = x[i3][0] - x[i1][0];
|
||||||
double delyUB = x[i3][1] - x[i1][1];
|
double delyUB = x[i3][1] - x[i1][1];
|
||||||
double delzUB = x[i3][2] - x[i1][2];
|
double delzUB = x[i3][2] - x[i1][2];
|
||||||
domain->minimum_image(delxUB, delyUB, delzUB);
|
domain->minimum_image(FLERR, delxUB, delyUB, delzUB);
|
||||||
double rUB = sqrt(delxUB * delxUB + delyUB * delyUB + delzUB * delzUB);
|
double rUB = sqrt(delxUB * delxUB + delyUB * delyUB + delzUB * delzUB);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -222,13 +222,13 @@ double AngleCosine::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -245,13 +245,13 @@ double AngleCosineSquared::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
@ -273,13 +273,13 @@ void AngleCosineSquared::born_matrix(int type, int i1, int i2, int i3, double &d
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
@ -248,13 +248,13 @@ double AngleHarmonic::single(int type, int i1, int i2, int i3)
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
@ -276,13 +276,13 @@ void AngleHarmonic::born_matrix(int type, int i1, int i2, int i3, double &du, do
|
|||||||
double delx1 = x[i1][0] - x[i2][0];
|
double delx1 = x[i1][0] - x[i2][0];
|
||||||
double dely1 = x[i1][1] - x[i2][1];
|
double dely1 = x[i1][1] - x[i2][1];
|
||||||
double delz1 = x[i1][2] - x[i2][2];
|
double delz1 = x[i1][2] - x[i2][2];
|
||||||
domain->minimum_image(delx1, dely1, delz1);
|
domain->minimum_image(FLERR, delx1, dely1, delz1);
|
||||||
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
double r1 = sqrt(delx1 * delx1 + dely1 * dely1 + delz1 * delz1);
|
||||||
|
|
||||||
double delx2 = x[i3][0] - x[i2][0];
|
double delx2 = x[i3][0] - x[i2][0];
|
||||||
double dely2 = x[i3][1] - x[i2][1];
|
double dely2 = x[i3][1] - x[i2][1];
|
||||||
double delz2 = x[i3][2] - x[i2][2];
|
double delz2 = x[i3][2] - x[i2][2];
|
||||||
domain->minimum_image(delx2, dely2, delz2);
|
domain->minimum_image(FLERR, delx2, dely2, delz2);
|
||||||
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
double r2 = sqrt(delx2 * delx2 + dely2 * dely2 + delz2 * delz2);
|
||||||
|
|
||||||
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
double c = delx1 * delx2 + dely1 * dely2 + delz1 * delz2;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user