Merge branch 'lammps:develop' into mliappy_unified
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,6 +3,7 @@
|
|||||||
.github export-ignore
|
.github export-ignore
|
||||||
.lgtm.yml export-ignore
|
.lgtm.yml export-ignore
|
||||||
SECURITY.md export-ignore
|
SECURITY.md export-ignore
|
||||||
|
CITATION.cff export-ignore
|
||||||
* text=auto
|
* text=auto
|
||||||
*.jpg -text
|
*.jpg -text
|
||||||
*.pdf -text
|
*.pdf -text
|
||||||
|
|||||||
91
CITATION.cff
Normal file
91
CITATION.cff
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# YAML 1.2
|
||||||
|
---
|
||||||
|
cff-version: 1.2.0
|
||||||
|
title: "LAMMPS: Large-scale Atomic/Molecular Massively Parallel Simulator"
|
||||||
|
type: software
|
||||||
|
authors:
|
||||||
|
- family-names: "Plimpton"
|
||||||
|
given-names: "Steven J."
|
||||||
|
- family-names: "Kohlmeyer"
|
||||||
|
given-names: "Axel"
|
||||||
|
orcid: "https://orcid.org/0000-0001-6204-6475"
|
||||||
|
- family-names: "Thompson"
|
||||||
|
given-names: "Aidan P."
|
||||||
|
orcid: "https://orcid.org/0000-0002-0324-9114"
|
||||||
|
- family-names: "Moore"
|
||||||
|
given-names: "Stan G."
|
||||||
|
- family-names: "Berger"
|
||||||
|
given-names: "Richard"
|
||||||
|
orcid: "https://orcid.org/0000-0002-3044-8266"
|
||||||
|
doi: 10.5281/zenodo.3726416
|
||||||
|
license: GPL-2.0-only
|
||||||
|
url: https://www.lammps.org
|
||||||
|
repository-code: https://github.com/lammps/lammps/
|
||||||
|
keywords:
|
||||||
|
- "Molecular Dynamics"
|
||||||
|
- "Materials Modeling"
|
||||||
|
message: "If you are referencing LAMMPS in a publication, please cite the paper below."
|
||||||
|
preferred-citation:
|
||||||
|
type: article
|
||||||
|
doi: "10.1016/j.cpc.2021.108171"
|
||||||
|
url: "https://www.sciencedirect.com/science/article/pii/S0010465521002836"
|
||||||
|
authors:
|
||||||
|
- family-names: "Thompson"
|
||||||
|
given-names: "Aidan P."
|
||||||
|
orcid: "https://orcid.org/0000-0002-0324-9114"
|
||||||
|
- family-names: "Aktulga"
|
||||||
|
given-names: "H. Metin"
|
||||||
|
- family-names: "Berger"
|
||||||
|
given-names: "Richard"
|
||||||
|
orcid: "https://orcid.org/0000-0002-3044-8266"
|
||||||
|
- family-names: "Bolintineanu"
|
||||||
|
given-names: "Dan S."
|
||||||
|
- family-names: "Brown"
|
||||||
|
given-names: "W. Michael"
|
||||||
|
- family-names: "Crozier"
|
||||||
|
given-names: "Paul S."
|
||||||
|
- family-names: "in 't Veld"
|
||||||
|
given-names: "Pieter J."
|
||||||
|
- family-names: "Kohlmeyer"
|
||||||
|
given-names: "Axel"
|
||||||
|
orcid: "https://orcid.org/0000-0001-6204-6475"
|
||||||
|
- family-names: "Moore"
|
||||||
|
given-names: "Stan G."
|
||||||
|
- family-names: "Nguyen"
|
||||||
|
given-names: "Trung Dac"
|
||||||
|
- family-names: "Shan"
|
||||||
|
given-names: "Ray"
|
||||||
|
- family-names: "Stevens"
|
||||||
|
given-names: "Mark J."
|
||||||
|
- family-names: "Tranchida"
|
||||||
|
given-names: "Julien"
|
||||||
|
- family-names: "Trott"
|
||||||
|
given-names: "Christian"
|
||||||
|
- family-names: "Plimpton"
|
||||||
|
given-names: "Steven J."
|
||||||
|
title: "LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales"
|
||||||
|
journal: "Computer Physics Communications"
|
||||||
|
keywords:
|
||||||
|
- Molecular dynamics
|
||||||
|
- Materials modeling
|
||||||
|
- Parallel algorithms
|
||||||
|
- LAMMPS
|
||||||
|
month: 2
|
||||||
|
volume: 271
|
||||||
|
issn: 0010-4655
|
||||||
|
pages: 108171
|
||||||
|
year: 2022
|
||||||
|
references:
|
||||||
|
- title: "Fast Parallel Algorithms for Short-Range Molecular Dynamics"
|
||||||
|
type: article
|
||||||
|
journal: Journal of Computational Physics
|
||||||
|
volume: 117
|
||||||
|
number: 1
|
||||||
|
pages: "1-19"
|
||||||
|
year: 1995
|
||||||
|
issn: 0021-9991
|
||||||
|
doi: 10.1006/jcph.1995.1039
|
||||||
|
url: https://www.sciencedirect.com/science/article/pii/S002199918571039X
|
||||||
|
authors:
|
||||||
|
- family-names: "Plimpton"
|
||||||
|
given-names: "Steve"
|
||||||
@ -154,6 +154,19 @@ endif()
|
|||||||
########################################################################
|
########################################################################
|
||||||
# User input options #
|
# User input options #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
# set path to python interpreter and thus enforcing python version if
|
||||||
|
# when in a virtual environment and PYTHON_EXECUTABLE is not set on command line
|
||||||
|
if(DEFINED ENV{VIRTUAL_ENV} AND NOT PYTHON_EXECUTABLE)
|
||||||
|
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
|
||||||
|
else()
|
||||||
|
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
|
||||||
|
endif()
|
||||||
|
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||||
|
message(STATUS "Running in virtual environment: $ENV{VIRTUAL_ENV}\n"
|
||||||
|
" Setting Python interpreter to: ${PYTHON_EXECUTABLE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
|
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
|
||||||
mark_as_advanced(LAMMPS_MACHINE)
|
mark_as_advanced(LAMMPS_MACHINE)
|
||||||
if(LAMMPS_MACHINE)
|
if(LAMMPS_MACHINE)
|
||||||
@ -203,7 +216,7 @@ set(STANDARD_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
@ -404,9 +417,11 @@ endif()
|
|||||||
|
|
||||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_LATTE OR PKG_ELECTRODE)
|
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_LATTE OR PKG_ELECTRODE)
|
||||||
enable_language(C)
|
enable_language(C)
|
||||||
|
if (NOT USE_INTERNAL_LINALG)
|
||||||
find_package(LAPACK)
|
find_package(LAPACK)
|
||||||
find_package(BLAS)
|
find_package(BLAS)
|
||||||
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
|
endif()
|
||||||
|
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
|
||||||
include(CheckGeneratorSupport)
|
include(CheckGeneratorSupport)
|
||||||
if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN)
|
if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN)
|
||||||
status(FATAL_ERROR "Cannot build internal linear algebra library as CMake build tool lacks Fortran support")
|
status(FATAL_ERROR "Cannot build internal linear algebra library as CMake build tool lacks Fortran support")
|
||||||
@ -635,7 +650,7 @@ endif()
|
|||||||
# packages which selectively include variants based on enabled styles
|
# packages which selectively include variants based on enabled styles
|
||||||
# e.g. accelerator packages
|
# e.g. accelerator packages
|
||||||
######################################################################
|
######################################################################
|
||||||
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||||
if(PKG_${PKG_WITH_INCL})
|
if(PKG_${PKG_WITH_INCL})
|
||||||
include(Packages/${PKG_WITH_INCL})
|
include(Packages/${PKG_WITH_INCL})
|
||||||
endif()
|
endif()
|
||||||
@ -785,6 +800,10 @@ if(BUILD_SHARED_LIBS)
|
|||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
# backward compatibility
|
||||||
|
if(PYTHON_EXECUTABLE)
|
||||||
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif()
|
||||||
find_package(Python COMPONENTS Interpreter)
|
find_package(Python COMPONENTS Interpreter)
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_IS_MULTI_CONFIG)
|
if(BUILD_IS_MULTI_CONFIG)
|
||||||
@ -817,11 +836,17 @@ endif()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
if(BUILD_SHARED_LIBS OR PKG_PYTHON)
|
if(BUILD_SHARED_LIBS OR PKG_PYTHON)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
|
||||||
|
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||||
find_package(PythonInterp) # Deprecated since version 3.12
|
find_package(PythonInterp) # Deprecated since version 3.12
|
||||||
if(PYTHONINTERP_FOUND)
|
if(PYTHONINTERP_FOUND)
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
# backward compatibility
|
||||||
|
if(PYTHON_EXECUTABLE)
|
||||||
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif()
|
||||||
find_package(Python COMPONENTS Interpreter)
|
find_package(Python COMPONENTS Interpreter)
|
||||||
endif()
|
endif()
|
||||||
if(Python_EXECUTABLE)
|
if(Python_EXECUTABLE)
|
||||||
|
|||||||
@ -233,7 +233,8 @@ elseif(GPU_API STREQUAL "OPENCL")
|
|||||||
elseif(GPU_API STREQUAL "HIP")
|
elseif(GPU_API STREQUAL "HIP")
|
||||||
if(NOT DEFINED HIP_PATH)
|
if(NOT DEFINED HIP_PATH)
|
||||||
if(NOT DEFINED ENV{HIP_PATH})
|
if(NOT DEFINED ENV{HIP_PATH})
|
||||||
set(HIP_PATH "/opt/rocm/hip" CACHE PATH "Path to HIP installation")
|
message(FATAL_ERROR "GPU_API=HIP requires HIP_PATH to be defined.\n"
|
||||||
|
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
|
||||||
else()
|
else()
|
||||||
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
|
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
|
||||||
endif()
|
endif()
|
||||||
@ -261,6 +262,8 @@ elseif(GPU_API STREQUAL "HIP")
|
|||||||
|
|
||||||
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
|
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
|
||||||
set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture")
|
set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture")
|
||||||
|
elseif(HIP_PLATFORM STREQUAL "spirv")
|
||||||
|
set(HIP_ARCH "spirv" CACHE STRING "HIP target architecture")
|
||||||
elseif(HIP_PLATFORM STREQUAL "nvcc")
|
elseif(HIP_PLATFORM STREQUAL "nvcc")
|
||||||
find_package(CUDA REQUIRED)
|
find_package(CUDA REQUIRED)
|
||||||
set(HIP_ARCH "sm_50" CACHE STRING "HIP primary CUDA architecture (e.g. sm_60)")
|
set(HIP_ARCH "sm_50" CACHE STRING "HIP primary CUDA architecture (e.g. sm_60)")
|
||||||
@ -340,6 +343,13 @@ elseif(GPU_API STREQUAL "HIP")
|
|||||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
|
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
|
||||||
DEPENDS ${CU_FILE}
|
DEPENDS ${CU_FILE}
|
||||||
COMMENT "Generating ${CU_NAME}.cubin")
|
COMMENT "Generating ${CU_NAME}.cubin")
|
||||||
|
elseif(HIP_PLATFORM STREQUAL "spirv")
|
||||||
|
configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||||
|
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} -c -O3 -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||||
|
DEPENDS ${CU_CPP_FILE}
|
||||||
|
COMMENT "Gerating ${CU_NAME}.cubin")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${CUBIN_H_FILE}
|
add_custom_command(OUTPUT ${CUBIN_H_FILE}
|
||||||
|
|||||||
@ -23,8 +23,9 @@ if(DOWNLOAD_LATTE)
|
|||||||
# CMake cannot pass BLAS or LAPACK library variable to external project if they are a list
|
# CMake cannot pass BLAS or LAPACK library variable to external project if they are a list
|
||||||
list(LENGTH BLAS_LIBRARIES} NUM_BLAS)
|
list(LENGTH BLAS_LIBRARIES} NUM_BLAS)
|
||||||
list(LENGTH LAPACK_LIBRARIES NUM_LAPACK)
|
list(LENGTH LAPACK_LIBRARIES NUM_LAPACK)
|
||||||
if((NUM_BLAS GREATER 1) OR (NUM_LAPACK GREATER 1))
|
if((NUM_BLAS GREATER 1) OR (NUM_LAPACK GREATER 1) AND NOT USE_INTERNAL_LINALG)
|
||||||
message(FATAL_ERROR "Cannot compile downloaded LATTE library due to a technical limitation")
|
message(FATAL_ERROR "Cannot compile downloaded LATTE library due to a technical limitation. "
|
||||||
|
"Try to configure LAMMPS with '-D USE_INTERNAL_LINALG=on' added as a workaround.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|||||||
@ -26,8 +26,21 @@ if(DOWNLOAD_MDI)
|
|||||||
# detect if we have python development support and thus can enable python plugins
|
# detect if we have python development support and thus can enable python plugins
|
||||||
set(MDI_USE_PYTHON_PLUGINS OFF)
|
set(MDI_USE_PYTHON_PLUGINS OFF)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
if(NOT PYTHON_VERSION_STRING)
|
||||||
|
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||||
|
# search for interpreter first, so we have a consistent library
|
||||||
|
find_package(PythonInterp) # Deprecated since version 3.12
|
||||||
|
if(PYTHONINTERP_FOUND)
|
||||||
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
# search for the library matching the selected interpreter
|
||||||
|
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||||
find_package(PythonLibs QUIET) # Deprecated since version 3.12
|
find_package(PythonLibs QUIET) # Deprecated since version 3.12
|
||||||
if(PYTHONLIBS_FOUND)
|
if(PYTHONLIBS_FOUND)
|
||||||
|
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
|
||||||
|
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
|
||||||
|
endif()
|
||||||
set(MDI_USE_PYTHON_PLUGINS ON)
|
set(MDI_USE_PYTHON_PLUGINS ON)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|||||||
13
cmake/Modules/Packages/MISC.cmake
Normal file
13
cmake/Modules/Packages/MISC.cmake
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# pair style and fix srp/react depend on the fixes bond/break and bond/create from the MC package
|
||||||
|
if(NOT PKG_MC)
|
||||||
|
get_property(LAMMPS_FIX_HEADERS GLOBAL PROPERTY FIX)
|
||||||
|
list(REMOVE_ITEM LAMMPS_FIX_HEADERS ${LAMMPS_SOURCE_DIR}/MISC/fix_srp_react.h)
|
||||||
|
set_property(GLOBAL PROPERTY FIX "${LAMMPS_FIX_HEADERS}")
|
||||||
|
get_property(LAMMPS_PAIR_HEADERS GLOBAL PROPERTY PAIR)
|
||||||
|
list(REMOVE_ITEM LAMMPS_PAIR_HEADERS ${LAMMPS_SOURCE_DIR}/MISC/pair_srp_react.h)
|
||||||
|
set_property(GLOBAL PROPERTY PAIR "${LAMMPS_PAIR_HEADERS}")
|
||||||
|
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||||
|
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/MISC/fix_srp_react.cpp)
|
||||||
|
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/MISC/pair_srp_react.cpp)
|
||||||
|
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
|
||||||
|
endif()
|
||||||
@ -1,8 +1,28 @@
|
|||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
if(NOT PYTHON_VERSION_STRING)
|
||||||
|
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||||
|
# search for interpreter first, so we have a consistent library
|
||||||
|
find_package(PythonInterp) # Deprecated since version 3.12
|
||||||
|
if(PYTHONINTERP_FOUND)
|
||||||
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
# search for the library matching the selected interpreter
|
||||||
|
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||||
find_package(PythonLibs REQUIRED) # Deprecated since version 3.12
|
find_package(PythonLibs REQUIRED) # Deprecated since version 3.12
|
||||||
|
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
|
||||||
|
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
|
||||||
|
endif()
|
||||||
target_include_directories(lammps PRIVATE ${PYTHON_INCLUDE_DIRS})
|
target_include_directories(lammps PRIVATE ${PYTHON_INCLUDE_DIRS})
|
||||||
target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARIES})
|
target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
|
if(NOT Python_INTERPRETER)
|
||||||
|
# backward compatibility
|
||||||
|
if(PYTHON_EXECUTABLE)
|
||||||
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
find_package(Python COMPONENTS Interpreter)
|
||||||
|
endif()
|
||||||
find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
||||||
target_link_libraries(lammps PRIVATE Python::Python)
|
target_link_libraries(lammps PRIVATE Python::Python)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -12,7 +12,7 @@ set(ALL_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
|
|||||||
@ -14,7 +14,7 @@ set(ALL_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
|
|||||||
@ -8,7 +8,7 @@ set(WIN_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
|
|||||||
@ -10,7 +10,7 @@ set(ALL_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
|
|||||||
@ -6,7 +6,7 @@ set(WIN_PACKAGES
|
|||||||
BPM
|
BPM
|
||||||
BROWNIAN
|
BROWNIAN
|
||||||
CG-DNA
|
CG-DNA
|
||||||
CG-SDK
|
CG-SPICA
|
||||||
CLASS2
|
CLASS2
|
||||||
COLLOID
|
COLLOID
|
||||||
COLVARS
|
COLVARS
|
||||||
|
|||||||
@ -242,7 +242,6 @@ $(MATHJAX):
|
|||||||
$(ANCHORCHECK): $(VENV)
|
$(ANCHORCHECK): $(VENV)
|
||||||
@( \
|
@( \
|
||||||
. $(VENV)/bin/activate; \
|
. $(VENV)/bin/activate; \
|
||||||
(cd utils/converters;\
|
pip install -e utils/converters;\
|
||||||
python setup.py develop);\
|
|
||||||
deactivate;\
|
deactivate;\
|
||||||
)
|
)
|
||||||
|
|||||||
@ -123,6 +123,7 @@ CMake build
|
|||||||
-D GPU_API=value # value = opencl (default) or cuda or hip
|
-D GPU_API=value # value = opencl (default) or cuda or hip
|
||||||
-D GPU_PREC=value # precision setting
|
-D GPU_PREC=value # precision setting
|
||||||
# value = double or mixed (default) or single
|
# value = double or mixed (default) or single
|
||||||
|
-D HIP_PATH # path to HIP installation. Must be set if GPU_API=HIP
|
||||||
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
|
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
|
||||||
# value = sm_XX, see below
|
# value = sm_XX, see below
|
||||||
# default is sm_50
|
# default is sm_50
|
||||||
@ -179,10 +180,17 @@ set appropriate environment variables. Some variables such as
|
|||||||
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
|
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
|
||||||
and the linker to work correctly.
|
and the linker to work correctly.
|
||||||
|
|
||||||
|
Using CHIP-SPV implementation of HIP is now supported. It allows one to run HIP
|
||||||
|
code on Intel GPUs via the OpenCL or Level Zero backends. To use CHIP-SPV, you must
|
||||||
|
set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake command line as CHIP-SPV does not
|
||||||
|
yet support hipCUB. The use of HIP for Intel GPUs is still experimental so you
|
||||||
|
should only use this option in preparations to run on Aurora system at ANL.
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
# AMDGPU target (ROCm <= 4.0)
|
# AMDGPU target (ROCm <= 4.0)
|
||||||
export HIP_PLATFORM=hcc
|
export HIP_PLATFORM=hcc
|
||||||
|
export HIP_PATH=/path/to/HIP/install
|
||||||
export HCC_AMDGPU_TARGET=gfx906
|
export HCC_AMDGPU_TARGET=gfx906
|
||||||
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
|
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
|
||||||
make -j 4
|
make -j 4
|
||||||
@ -191,6 +199,7 @@ and the linker to work correctly.
|
|||||||
|
|
||||||
# AMDGPU target (ROCm >= 4.1)
|
# AMDGPU target (ROCm >= 4.1)
|
||||||
export HIP_PLATFORM=amd
|
export HIP_PLATFORM=amd
|
||||||
|
export HIP_PATH=/path/to/HIP/install
|
||||||
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
|
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc ..
|
||||||
make -j 4
|
make -j 4
|
||||||
|
|
||||||
@ -199,10 +208,20 @@ and the linker to work correctly.
|
|||||||
# CUDA target (not recommended, use GPU_ARCH=cuda)
|
# CUDA target (not recommended, use GPU_ARCH=cuda)
|
||||||
# !!! DO NOT set CMAKE_CXX_COMPILER !!!
|
# !!! DO NOT set CMAKE_CXX_COMPILER !!!
|
||||||
export HIP_PLATFORM=nvcc
|
export HIP_PLATFORM=nvcc
|
||||||
|
export HIP_PATH=/path/to/HIP/install
|
||||||
export CUDA_PATH=/usr/local/cuda
|
export CUDA_PATH=/usr/local/cuda
|
||||||
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=sm_70 ..
|
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=sm_70 ..
|
||||||
make -j 4
|
make -j 4
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
# SPIR-V target (Intel GPUs)
|
||||||
|
export HIP_PLATFORM=spirv
|
||||||
|
export HIP_PATH=/path/to/HIP/install
|
||||||
|
export CMAKE_CXX_COMPILER=<hipcc/clang++>
|
||||||
|
cmake -D PKG_GPU=on -D GPU_API=HIP ..
|
||||||
|
make -j 4
|
||||||
|
|
||||||
Traditional make
|
Traditional make
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -790,6 +809,8 @@ library.
|
|||||||
|
|
||||||
-D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes
|
-D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes
|
||||||
-D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location)
|
-D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location)
|
||||||
|
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
|
||||||
|
# value = no (default) or yes
|
||||||
|
|
||||||
If ``DOWNLOAD_LATTE`` is set, the LATTE library will be downloaded
|
If ``DOWNLOAD_LATTE`` is set, the LATTE library will be downloaded
|
||||||
and built inside the CMake build directory. If the LATTE library
|
and built inside the CMake build directory. If the LATTE library
|
||||||
@ -797,6 +818,13 @@ library.
|
|||||||
``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library
|
``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library
|
||||||
file, not the directory the library file is in.
|
file, not the directory the library file is in.
|
||||||
|
|
||||||
|
The LATTE library requires LAPACK (and BLAS) and CMake can identify
|
||||||
|
their locations and pass that info to the LATTE build script. But
|
||||||
|
on some systems this triggers a (current) limitation of CMake and
|
||||||
|
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
|
||||||
|
those cases to use the bundled linear algebra library and work around
|
||||||
|
the limitation.
|
||||||
|
|
||||||
.. tab:: Traditional make
|
.. tab:: Traditional make
|
||||||
|
|
||||||
You can download and build the LATTE library manually if you
|
You can download and build the LATTE library manually if you
|
||||||
@ -1913,14 +1941,25 @@ within CMake will download the non-commercial use version.
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
-D DOWNLOAD_QUIP=value # download OpenKIM API v2 for build, value = no (default) or yes
|
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
|
||||||
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
|
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
|
||||||
|
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
|
||||||
|
# value = no (default) or yes
|
||||||
|
|
||||||
CMake will try to download and build the QUIP library from GitHub, if it is not
|
CMake will try to download and build the QUIP library from GitHub,
|
||||||
found on the local machine. This requires to have git installed. It will use the same compilers
|
if it is not found on the local machine. This requires to have git
|
||||||
and flags as used for compiling LAMMPS. Currently this is only supported for the GNU and the
|
installed. It will use the same compilers and flags as used for
|
||||||
Intel compilers. Set the ``QUIP_LIBRARY`` variable if you want to use a previously compiled
|
compiling LAMMPS. Currently this is only supported for the GNU
|
||||||
and installed QUIP library and CMake cannot find it.
|
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
|
||||||
|
want to use a previously compiled and installed QUIP library and
|
||||||
|
CMake cannot find it.
|
||||||
|
|
||||||
|
The QUIP library requires LAPACK (and BLAS) and CMake can identify
|
||||||
|
their locations and pass that info to the QUIP build script. But
|
||||||
|
on some systems this triggers a (current) limitation of CMake and
|
||||||
|
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
|
||||||
|
those cases to use the bundled linear algebra library and work around
|
||||||
|
the limitation.
|
||||||
|
|
||||||
.. tab:: Traditional make
|
.. tab:: Traditional make
|
||||||
|
|
||||||
|
|||||||
@ -48,18 +48,15 @@ Build using GNU make
|
|||||||
|
|
||||||
The LAMMPS manual is written in `reStructuredText <rst_>`_ format which
|
The LAMMPS manual is written in `reStructuredText <rst_>`_ format which
|
||||||
can be translated to different output format using the `Sphinx
|
can be translated to different output format using the `Sphinx
|
||||||
<sphinx_>`_ document generator tool. It also incorporates programmer
|
<https://sphinx-doc.org>`_ document generator tool. It also
|
||||||
documentation extracted from the LAMMPS C++ sources through the `Doxygen
|
incorporates programmer documentation extracted from the LAMMPS C++
|
||||||
<https://doxygen.nl>`_ program. Currently the translation to HTML, PDF
|
sources through the `Doxygen <https://doxygen.nl>`_ program. Currently
|
||||||
(via LaTeX), ePUB (for many e-book readers) and MOBI (for Amazon Kindle
|
the translation to HTML, PDF (via LaTeX), ePUB (for many e-book readers)
|
||||||
readers) are supported. For that to work a Python 3 interpreter, the
|
and MOBI (for Amazon Kindle readers) are supported. For that to work a
|
||||||
``doxygen`` tools and internet access to download additional files and
|
Python 3 interpreter, the ``doxygen`` tools and internet access to
|
||||||
tools are required. This download is usually only required once or
|
download additional files and tools are required. This download is
|
||||||
after the documentation folder is returned to a pristine state with
|
usually only required once or after the documentation folder is returned
|
||||||
``make clean-all``.
|
to a pristine state with ``make clean-all``.
|
||||||
|
|
||||||
.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html
|
|
||||||
.. _sphinx: https://www.sphinx-doc.org
|
|
||||||
|
|
||||||
For the documentation build a python virtual environment is set up in
|
For the documentation build a python virtual environment is set up in
|
||||||
the folder ``doc/docenv`` and various python packages are installed into
|
the folder ``doc/docenv`` and various python packages are installed into
|
||||||
@ -252,6 +249,5 @@ manual with ``make spelling``. This requires `a library called enchant
|
|||||||
positives* (e.g. keywords, names, abbreviations) those can be added to
|
positives* (e.g. keywords, names, abbreviations) those can be added to
|
||||||
the file ``lammps/doc/utils/sphinx-config/false_positives.txt``.
|
the file ``lammps/doc/utils/sphinx-config/false_positives.txt``.
|
||||||
|
|
||||||
.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html
|
|
||||||
|
|
||||||
.. _lws: https://www.lammps.org
|
.. _lws: https://www.lammps.org
|
||||||
|
.. _rst: https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html
|
||||||
|
|||||||
@ -21,6 +21,7 @@ commands in it are used to define a LAMMPS simulation.
|
|||||||
Commands_pair
|
Commands_pair
|
||||||
Commands_bond
|
Commands_bond
|
||||||
Commands_kspace
|
Commands_kspace
|
||||||
|
Commands_dump
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
General commands
|
General commands
|
||||||
================
|
================
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
.. _bond:
|
.. _bond:
|
||||||
|
|
||||||
@ -93,7 +94,7 @@ OPT.
|
|||||||
* :doc:`harmonic (iko) <angle_harmonic>`
|
* :doc:`harmonic (iko) <angle_harmonic>`
|
||||||
* :doc:`mm3 <angle_mm3>`
|
* :doc:`mm3 <angle_mm3>`
|
||||||
* :doc:`quartic (o) <angle_quartic>`
|
* :doc:`quartic (o) <angle_quartic>`
|
||||||
* :doc:`sdk (o) <angle_sdk>`
|
* :doc:`spica (o) <angle_spica>`
|
||||||
* :doc:`table (o) <angle_table>`
|
* :doc:`table (o) <angle_table>`
|
||||||
|
|
||||||
.. _dihedral:
|
.. _dihedral:
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
Compute commands
|
Compute commands
|
||||||
================
|
================
|
||||||
|
|||||||
56
doc/src/Commands_dump.rst
Normal file
56
doc/src/Commands_dump.rst
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
.. table_from_list::
|
||||||
|
:columns: 3
|
||||||
|
|
||||||
|
* :doc:`General commands <Commands_all>`
|
||||||
|
* :doc:`Fix styles <Commands_fix>`
|
||||||
|
* :doc:`Compute styles <Commands_compute>`
|
||||||
|
* :doc:`Pair styles <Commands_pair>`
|
||||||
|
* :ref:`Bond styles <bond>`
|
||||||
|
* :ref:`Angle styles <angle>`
|
||||||
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
|
* :ref:`Improper styles <improper>`
|
||||||
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
|
Dump commands
|
||||||
|
=============
|
||||||
|
|
||||||
|
An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
|
||||||
|
|
||||||
|
.. table_from_list::
|
||||||
|
:columns: 5
|
||||||
|
|
||||||
|
* :doc:`atom <dump>`
|
||||||
|
* :doc:`atom/adios <dump_adios>`
|
||||||
|
* :doc:`atom/gz <dump>`
|
||||||
|
* :doc:`atom/mpiio <dump>`
|
||||||
|
* :doc:`atom/zstd <dump>`
|
||||||
|
* :doc:`cfg <dump>`
|
||||||
|
* :doc:`cfg/gz <dump>`
|
||||||
|
* :doc:`cfg/mpiio <dump>`
|
||||||
|
* :doc:`cfg/uef <dump_cfg_uef>`
|
||||||
|
* :doc:`cfg/zstd <dump>`
|
||||||
|
* :doc:`custom <dump>`
|
||||||
|
* :doc:`custom/adios <dump_adios>`
|
||||||
|
* :doc:`custom/gz <dump>`
|
||||||
|
* :doc:`custom/mpiio <dump>`
|
||||||
|
* :doc:`custom/zstd <dump>`
|
||||||
|
* :doc:`dcd <dump>`
|
||||||
|
* :doc:`deprecated <dump>`
|
||||||
|
* :doc:`h5md <dump_h5md>`
|
||||||
|
* :doc:`image <dump_image>`
|
||||||
|
* :doc:`local <dump>`
|
||||||
|
* :doc:`local/gz <dump>`
|
||||||
|
* :doc:`local/zstd <dump>`
|
||||||
|
* :doc:`molfile <dump_molfile>`
|
||||||
|
* :doc:`movie <dump_image>`
|
||||||
|
* :doc:`netcdf <dump_netcdf>`
|
||||||
|
* :doc:`netcdf/mpiio <dump>`
|
||||||
|
* :doc:`vtk <dump_vtk>`
|
||||||
|
* :doc:`xtc <dump>`
|
||||||
|
* :doc:`xyz <dump>`
|
||||||
|
* :doc:`xyz/gz <dump>`
|
||||||
|
* :doc:`xyz/mpiio <dump>`
|
||||||
|
* :doc:`xyz/zstd <dump>`
|
||||||
|
* :doc:`yaml <dump>`
|
||||||
|
|
||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
Fix commands
|
Fix commands
|
||||||
============
|
============
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
KSpace solvers
|
KSpace solvers
|
||||||
==============
|
==============
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
* :ref:`Dihedral styles <dihedral>`
|
* :ref:`Dihedral styles <dihedral>`
|
||||||
* :ref:`Improper styles <improper>`
|
* :ref:`Improper styles <improper>`
|
||||||
* :doc:`KSpace styles <Commands_kspace>`
|
* :doc:`KSpace styles <Commands_kspace>`
|
||||||
|
* :doc:`Dump styles <Commands_dump>`
|
||||||
|
|
||||||
Pair_style potentials
|
Pair_style potentials
|
||||||
======================
|
======================
|
||||||
@ -181,9 +182,9 @@ OPT.
|
|||||||
* :doc:`lj/long/tip4p/long (o) <pair_lj_long>`
|
* :doc:`lj/long/tip4p/long (o) <pair_lj_long>`
|
||||||
* :doc:`lj/mdf <pair_mdf>`
|
* :doc:`lj/mdf <pair_mdf>`
|
||||||
* :doc:`lj/relres (o) <pair_lj_relres>`
|
* :doc:`lj/relres (o) <pair_lj_relres>`
|
||||||
* :doc:`lj/sdk (gko) <pair_sdk>`
|
* :doc:`lj/spica (gko) <pair_spica>`
|
||||||
* :doc:`lj/sdk/coul/long (go) <pair_sdk>`
|
* :doc:`lj/spica/coul/long (go) <pair_spica>`
|
||||||
* :doc:`lj/sdk/coul/msm (o) <pair_sdk>`
|
* :doc:`lj/spica/coul/msm (o) <pair_spica>`
|
||||||
* :doc:`lj/sf/dipole/sf (go) <pair_dipole>`
|
* :doc:`lj/sf/dipole/sf (go) <pair_dipole>`
|
||||||
* :doc:`lj/smooth (go) <pair_lj_smooth>`
|
* :doc:`lj/smooth (go) <pair_lj_smooth>`
|
||||||
* :doc:`lj/smooth/linear (o) <pair_lj_smooth_linear>`
|
* :doc:`lj/smooth/linear (o) <pair_lj_smooth_linear>`
|
||||||
@ -270,6 +271,7 @@ OPT.
|
|||||||
* :doc:`spin/magelec <pair_spin_magelec>`
|
* :doc:`spin/magelec <pair_spin_magelec>`
|
||||||
* :doc:`spin/neel <pair_spin_neel>`
|
* :doc:`spin/neel <pair_spin_neel>`
|
||||||
* :doc:`srp <pair_srp>`
|
* :doc:`srp <pair_srp>`
|
||||||
|
* :doc:`srp/react <pair_srp>`
|
||||||
* :doc:`sw (giko) <pair_sw>`
|
* :doc:`sw (giko) <pair_sw>`
|
||||||
* :doc:`sw/angle/table <pair_sw_angle_table>`
|
* :doc:`sw/angle/table <pair_sw_angle_table>`
|
||||||
* :doc:`sw/mod (o) <pair_sw>`
|
* :doc:`sw/mod (o) <pair_sw>`
|
||||||
|
|||||||
@ -17,6 +17,7 @@ of time and requests from the LAMMPS user community.
|
|||||||
Developer_flow
|
Developer_flow
|
||||||
Developer_write
|
Developer_write
|
||||||
Developer_notes
|
Developer_notes
|
||||||
|
Developer_updating
|
||||||
Developer_plugins
|
Developer_plugins
|
||||||
Developer_unittest
|
Developer_unittest
|
||||||
Classes
|
Classes
|
||||||
|
|||||||
324
doc/src/Developer_updating.rst
Normal file
324
doc/src/Developer_updating.rst
Normal file
@ -0,0 +1,324 @@
|
|||||||
|
Notes for updating code written for older LAMMPS versions
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
This section documents how C++ source files that are available *outside
|
||||||
|
of the LAMMPS source distribution* (e.g. in external USER packages or as
|
||||||
|
source files provided as a supplement to a publication) that are written
|
||||||
|
for an older version of LAMMPS and thus need to be updated to be
|
||||||
|
compatible with the current version of LAMMPS. Due to the active
|
||||||
|
development of LAMMPS it is likely to always be incomplete. Please
|
||||||
|
contact developer@lammps.org in case you run across an issue that is not
|
||||||
|
(yet) listed here. Please also review the latest information about the
|
||||||
|
LAMMPS :doc:`programming style conventions <Modify_style>`, especially
|
||||||
|
if you are considering to submit the updated version for inclusion into
|
||||||
|
the LAMMPS distribution.
|
||||||
|
|
||||||
|
Available topics in mostly chronological order are:
|
||||||
|
|
||||||
|
- `Setting flags in the constructor`_
|
||||||
|
- `Rename of pack/unpack_comm() to pack/unpack_forward_comm()`_
|
||||||
|
- `Use ev_init() to initialize variables derived from eflag and vflag`_
|
||||||
|
- `Use utils::numeric() functions instead of force->numeric()`_
|
||||||
|
- `Use utils::open_potential() function to open potential files`_
|
||||||
|
- `Simplify customized error messages`_
|
||||||
|
- `Use of "override" instead of "virtual"`_
|
||||||
|
- `Simplified and more compact neighbor list requests`_
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Setting flags in the constructor
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
As LAMMPS gains additional functionality, new flags may need to be set
|
||||||
|
in the constructor or a class to signal compatibility with such features.
|
||||||
|
Most of the time the defaults are chosen conservatively, but sometimes
|
||||||
|
the conservative choice is the uncommon choice, and then those settings
|
||||||
|
need to be made when updating code.
|
||||||
|
|
||||||
|
Pair styles:
|
||||||
|
|
||||||
|
- ``manybody_flag``: set to 1 if your pair style is not pair-wise additive
|
||||||
|
- ``restartinfo``: set to 0 if your pair style does not store data in restart files
|
||||||
|
|
||||||
|
|
||||||
|
Rename of pack/unpack_comm() to pack/unpack_forward_comm()
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 8Aug2014
|
||||||
|
|
||||||
|
In this change set the functions to pack data into communication buffers
|
||||||
|
and to unpack data from communication buffers for :doc:`forward
|
||||||
|
communications <Developer_comm_ops>` were renamed from ``pack_comm()``
|
||||||
|
and ``unpack_comm()`` to ``pack_forward_comm()`` and
|
||||||
|
``unpack_forward_comm()``, respectively. Also the meaning of the return
|
||||||
|
value of these functions was changed: rather than returning the number
|
||||||
|
of items per atom stored in the buffer, now the total number of items
|
||||||
|
added (or unpacked) needs to be returned. Here is an example from the
|
||||||
|
`PairEAM` class. Of course the member function declaration in corresponding
|
||||||
|
header file needs to be updated accordingly.
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
int PairEAM::pack_comm(int n, int *list, double *buf, int pbc_flag, int *pbc)
|
||||||
|
{
|
||||||
|
int m = 0;
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
int j = list[i];
|
||||||
|
buf[m++] = fp[j];
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
int PairEAM::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc)
|
||||||
|
{
|
||||||
|
int m = 0;
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
int j = list[i];
|
||||||
|
buf[m++] = fp[j];
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Because the various "pack" and "unpack" functions are defined in the
|
||||||
|
respective base classes as dummy functions doing nothing, and because
|
||||||
|
of the the name mismatch the custom versions in the derived class
|
||||||
|
will no longer be called, there will be no compilation error when
|
||||||
|
this change is not applied. Only calculations will suddenly produce
|
||||||
|
incorrect results because the required forward communication calls
|
||||||
|
will cease to function correctly.
|
||||||
|
|
||||||
|
Use ev_init() to initialize variables derived from eflag and vflag
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 29Mar2019
|
||||||
|
|
||||||
|
There are several variables that need to be initialized based on
|
||||||
|
the values of the "eflag" and "vflag" variables and since sometimes
|
||||||
|
there are new bits added and new variables need to be set to 1 or 0.
|
||||||
|
To make this consistent, across all styles, there is now an inline
|
||||||
|
function ``ev_init(eflag, vflag)`` that makes those settings
|
||||||
|
consistently and calls either ``ev_setup()`` or ``ev_unset()``.
|
||||||
|
Example from a pair style:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
if (eflag || vflag) ev_setup(eflag, vflag);
|
||||||
|
else evflag = vflag_fdotr = eflag_global = eflag_atom = 0;
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
ev_init(eflag, vflag);
|
||||||
|
|
||||||
|
Not applying this change will not cause a compilation error, but
|
||||||
|
can lead to inconsistent behavior and incorrect tallying of
|
||||||
|
energy or virial.
|
||||||
|
|
||||||
|
Use utils::numeric() functions instead of force->numeric()
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 18Sep2020
|
||||||
|
|
||||||
|
The "numeric()" conversion functions (including "inumeric()",
|
||||||
|
"bnumeric()", and "tnumeric()") have been moved from the Force class to
|
||||||
|
the utils namespace. Also they take an additional argument that selects
|
||||||
|
whether the ``Error::all()`` or ``Error::one()`` function should be
|
||||||
|
called in case of an error. The former should be used when *all* MPI
|
||||||
|
processes call the conversion function and the latter *must* be used
|
||||||
|
when they are called from only one or a subset of the MPI processes.
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
val = force->numeric(FLERR, arg[1]);
|
||||||
|
num = force->inumeric(FLERR, arg[2]);
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
val = utils::numeric(FLERR, true, arg[1], lmp);
|
||||||
|
num = utils::inumeric(FLERR, false, arg[2], lmp);
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
:cpp:func:`utils::numeric() <LAMMPS_NS::utils::numeric>`,
|
||||||
|
:cpp:func:`utils::inumeric() <LAMMPS_NS::utils::inumeric>`,
|
||||||
|
:cpp:func:`utils::bnumeric() <LAMMPS_NS::utils::bnumeric>`,
|
||||||
|
:cpp:func:`utils::tnumeric() <LAMMPS_NS::utils::tnumeric>`
|
||||||
|
|
||||||
|
Use utils::open_potential() function to open potential files
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 18Sep2020
|
||||||
|
|
||||||
|
The :cpp:func:`utils::open_potential()
|
||||||
|
<LAMMPS_NS::utils::open_potential>` function must be used to replace
|
||||||
|
calls to ``force->open_potential()`` and should be used to replace
|
||||||
|
``fopen()`` for opening potential files for reading. The custom
|
||||||
|
function does three additional steps compared to ``fopen()``: 1) it will
|
||||||
|
try to parse the ``UNITS:`` and ``DATE:`` metadata will stop with an
|
||||||
|
error on a units mismatch and will print the date info, if present, in
|
||||||
|
the log file; 2) for pair styles that support it, it will set up
|
||||||
|
possible automatic unit conversions based on the embedded unit
|
||||||
|
information and LAMMPS' current units setting; 3) it will not only try
|
||||||
|
to open a potential file at the given path, but will also search in the
|
||||||
|
folders listed in the ``LAMMPS_POTENTIALS`` environment variable. This
|
||||||
|
allows to keep potential files in a common location instead of having to
|
||||||
|
copy them around for simulations.
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
fp = force->open_potential(filename);
|
||||||
|
fp = fopen(filename, "r");
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
fp = utils::open_potential(filename, lmp);
|
||||||
|
|
||||||
|
Simplify customized error messages
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 14May2021
|
||||||
|
|
||||||
|
Aided by features of the bundled {fmt} library, error messages now
|
||||||
|
can have a variable number of arguments and the string will be interpreted
|
||||||
|
as a {fmt} style format string so that custom error messages can be
|
||||||
|
easily customized without having to use temporary buffers and ``sprintf()``.
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
if (fptr == NULL) {
|
||||||
|
char str[128];
|
||||||
|
sprintf(str,"Cannot open AEAM potential file %s",filename);
|
||||||
|
error->one(FLERR,str);
|
||||||
|
}
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
if (fptr == nullptr)
|
||||||
|
error->one(FLERR, "Cannot open AEAM potential file {}: {}", filename, utils::getsyserror());
|
||||||
|
|
||||||
|
Use of "override" instead of "virtual"
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 17Feb2022
|
||||||
|
|
||||||
|
Since LAMMPS requires C++11 we switched to use the "override" keyword
|
||||||
|
instead of "virtual" to indicate polymorphism in derived classes. This
|
||||||
|
allows the C++ compiler to better detect inconsistencies when an
|
||||||
|
override is intended or not. Please note that "override" has to be
|
||||||
|
added to **all** polymorph functions in derived classes and "virtual"
|
||||||
|
*only* to the function in the base class (or the destructor). Here is
|
||||||
|
an example from the ``FixWallReflect`` class:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
FixWallReflect(class LAMMPS *, int, char **);
|
||||||
|
virtual ~FixWallReflect();
|
||||||
|
int setmask();
|
||||||
|
void init();
|
||||||
|
void post_integrate();
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
FixWallReflect(class LAMMPS *, int, char **);
|
||||||
|
~FixWallReflect() override;
|
||||||
|
int setmask() override;
|
||||||
|
void init() override;
|
||||||
|
void post_integrate() override;
|
||||||
|
|
||||||
|
This change set will neither cause a compilation failure, nor will it
|
||||||
|
change functionality, but if you plan to submit the updated code for
|
||||||
|
inclusion into the LAMMPS distribution, it will be requested for achieve
|
||||||
|
a consistent :doc:`programming style <Modify_style>`.
|
||||||
|
|
||||||
|
Simplified function names for forward and reverse communication
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 24Mar2022
|
||||||
|
|
||||||
|
Rather then using the function name to distinguish between the different
|
||||||
|
forward and reverse communication functions for styles, LAMMPS now uses
|
||||||
|
the type of the "this" pointer argument.
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
comm->forward_comm_pair(this);
|
||||||
|
comm->forward_comm_fix(this);
|
||||||
|
comm->forward_comm_compute(this);
|
||||||
|
comm->forward_comm_dump(this);
|
||||||
|
comm->reverse_comm_pair(this);
|
||||||
|
comm->reverse_comm_fix(this);
|
||||||
|
comm->reverse_comm_compute(this);
|
||||||
|
comm->reverse_comm_dump(this);
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
comm->forward_comm(this);
|
||||||
|
comm->reverse_comm(this);
|
||||||
|
|
||||||
|
This change is required or else the code will not compile.
|
||||||
|
|
||||||
|
Simplified and more compact neighbor list requests
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionchanged:: 24Mar2022
|
||||||
|
|
||||||
|
This change set reduces the amount of code required to request a
|
||||||
|
neighbor list. It enforces consistency and no longer requires to change
|
||||||
|
internal data of the request. More information on neighbor list
|
||||||
|
requests can be :doc:`found here <Developer_notes>`. Example from the
|
||||||
|
``ComputeRDF`` class:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
int irequest = neighbor->request(this,instance_me);
|
||||||
|
neighbor->requests[irequest]->pair = 0;
|
||||||
|
neighbor->requests[irequest]->compute = 1;
|
||||||
|
neighbor->requests[irequest]->occasional = 1;
|
||||||
|
if (cutflag) {
|
||||||
|
neighbor->requests[irequest]->cut = 1;
|
||||||
|
neighbor->requests[irequest]->cutoff = mycutneigh;
|
||||||
|
}
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
auto req = neighbor->add_request(this, NeighConst::REQ_OCCASIONAL);
|
||||||
|
if (cutflag) req->set_cutoff(mycutneigh);
|
||||||
|
|
||||||
|
Public access to the ``NeighRequest`` class data members has been
|
||||||
|
removed so this update is *required* to avoid compilation failure.
|
||||||
@ -476,65 +476,6 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||||||
*Bonds defined but no bond types*
|
*Bonds defined but no bond types*
|
||||||
The data file header lists bonds but no bond types.
|
The data file header lists bonds but no bond types.
|
||||||
|
|
||||||
*Bond/react: Cannot use fix bond/react with non-molecular systems*
|
|
||||||
Only systems with bonds that can be changed can be used. Atom_style
|
|
||||||
template does not qualify.
|
|
||||||
|
|
||||||
*Bond/react: Invalid template atom ID in map file*
|
|
||||||
Atom IDs in molecule templates range from 1 to the number of atoms in the template.
|
|
||||||
|
|
||||||
*Bond/react: Rmax cutoff is longer than pairwise cutoff*
|
|
||||||
This is not allowed because bond creation is done using the pairwise
|
|
||||||
neighbor list.
|
|
||||||
|
|
||||||
*Bond/react: Molecule template ID for fix bond/react does not exist*
|
|
||||||
A valid molecule template must have been created with the molecule
|
|
||||||
command.
|
|
||||||
|
|
||||||
*Bond/react: Reaction templates must contain the same number of atoms*
|
|
||||||
There should be a one-to-one correspondence between atoms in the
|
|
||||||
pre-reacted and post-reacted templates, as specified by the map file.
|
|
||||||
|
|
||||||
*Bond/react: Unknown section in map file*
|
|
||||||
Please ensure reaction map files are properly formatted.
|
|
||||||
|
|
||||||
*Bond/react: Atom/Bond type affected by reaction too close to template edge*
|
|
||||||
This means an atom which changes type or connectivity during the
|
|
||||||
reaction is too close to an 'edge' atom defined in the map
|
|
||||||
file. This could cause incorrect assignment of bonds, angle, etc.
|
|
||||||
Generally, this means you must include more atoms in your templates,
|
|
||||||
such that there are at least two atoms between each atom involved in
|
|
||||||
the reaction and an edge atom.
|
|
||||||
|
|
||||||
*Bond/react: Fix bond/react needs ghost atoms from farther away*
|
|
||||||
This is because a processor needs to map the entire unreacted
|
|
||||||
molecule template onto simulation atoms it knows about. The
|
|
||||||
comm_modify cutoff command can be used to extend the communication
|
|
||||||
range.
|
|
||||||
|
|
||||||
*Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted*
|
|
||||||
Self-explanatory.
|
|
||||||
|
|
||||||
*Bond/react: First neighbors of chiral atoms must be of mutually different types*
|
|
||||||
Self-explanatory.
|
|
||||||
|
|
||||||
*Bond/react: Chiral atoms must have exactly four first neighbors*
|
|
||||||
Self-explanatory.
|
|
||||||
|
|
||||||
*Bond/react: Molecule template 'Coords' section required for chiralIDs keyword*
|
|
||||||
The coordinates of atoms in the pre-reacted template are used to determine
|
|
||||||
chirality.
|
|
||||||
|
|
||||||
*Bond/react special bond generation overflow*
|
|
||||||
The number of special bonds per-atom created by a reaction exceeds the
|
|
||||||
system setting. See the read_data or create_box command for how to
|
|
||||||
specify this value.
|
|
||||||
|
|
||||||
*Bond/react topology/atom exceed system topology/atom*
|
|
||||||
The number of bonds, angles etc per-atom created by a reaction exceeds
|
|
||||||
the system setting. See the read_data or create_box command for how to
|
|
||||||
specify this value.
|
|
||||||
|
|
||||||
*Both restart files must use % or neither*
|
*Both restart files must use % or neither*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
@ -1291,7 +1232,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||||||
*Cannot use chosen neighbor list style with lj/gromacs/kk*
|
*Cannot use chosen neighbor list style with lj/gromacs/kk*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
*Cannot use chosen neighbor list style with lj/sdk/kk*
|
*Cannot use chosen neighbor list style with lj/spica/kk*
|
||||||
That style is not supported by Kokkos.
|
That style is not supported by Kokkos.
|
||||||
|
|
||||||
*Cannot use chosen neighbor list style with pair eam/kk*
|
*Cannot use chosen neighbor list style with pair eam/kk*
|
||||||
@ -1659,10 +1600,10 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||||||
*Cannot use newton pair with lj/gromacs/gpu pair style*
|
*Cannot use newton pair with lj/gromacs/gpu pair style*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
*Cannot use newton pair with lj/sdk/coul/long/gpu pair style*
|
*Cannot use newton pair with lj/spica/coul/long/gpu pair style*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
*Cannot use newton pair with lj/sdk/gpu pair style*
|
*Cannot use newton pair with lj/spica/gpu pair style*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
*Cannot use newton pair with lj96/cut/gpu pair style*
|
*Cannot use newton pair with lj96/cut/gpu pair style*
|
||||||
@ -3521,6 +3462,65 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||||||
acquire needed info, The comm_modify cutoff command can be used to
|
acquire needed info, The comm_modify cutoff command can be used to
|
||||||
extend the communication range.
|
extend the communication range.
|
||||||
|
|
||||||
|
*Fix bond/react: Cannot use fix bond/react with non-molecular systems*
|
||||||
|
Only systems with bonds that can be changed can be used. Atom_style
|
||||||
|
template does not qualify.
|
||||||
|
|
||||||
|
*Fix bond/react: Invalid template atom ID in map file*
|
||||||
|
Atom IDs in molecule templates range from 1 to the number of atoms in the template.
|
||||||
|
|
||||||
|
*Fix bond/react: Rmax cutoff is longer than pairwise cutoff*
|
||||||
|
This is not allowed because bond creation is done using the pairwise
|
||||||
|
neighbor list.
|
||||||
|
|
||||||
|
*Fix bond/react: Molecule template ID for fix bond/react does not exist*
|
||||||
|
A valid molecule template must have been created with the molecule
|
||||||
|
command.
|
||||||
|
|
||||||
|
*Fix bond/react: Reaction templates must contain the same number of atoms*
|
||||||
|
There should be a one-to-one correspondence between atoms in the
|
||||||
|
pre-reacted and post-reacted templates, as specified by the map file.
|
||||||
|
|
||||||
|
*Fix bond/react: Unknown section in map file*
|
||||||
|
Please ensure reaction map files are properly formatted.
|
||||||
|
|
||||||
|
*Fix bond/react: Atom/Bond type affected by reaction too close to template edge*
|
||||||
|
This means an atom which changes type or connectivity during the
|
||||||
|
reaction is too close to an 'edge' atom defined in the map
|
||||||
|
file. This could cause incorrect assignment of bonds, angle, etc.
|
||||||
|
Generally, this means you must include more atoms in your templates,
|
||||||
|
such that there are at least two atoms between each atom involved in
|
||||||
|
the reaction and an edge atom.
|
||||||
|
|
||||||
|
*Fix bond/react: Fix bond/react needs ghost atoms from farther away*
|
||||||
|
This is because a processor needs to map the entire unreacted
|
||||||
|
molecule template onto simulation atoms it knows about. The
|
||||||
|
comm_modify cutoff command can be used to extend the communication
|
||||||
|
range.
|
||||||
|
|
||||||
|
*Fix bond/react: A deleted atom cannot remain bonded to an atom that is not deleted*
|
||||||
|
Self-explanatory.
|
||||||
|
|
||||||
|
*Fix bond/react: First neighbors of chiral atoms must be of mutually different types*
|
||||||
|
Self-explanatory.
|
||||||
|
|
||||||
|
*Fix bond/react: Chiral atoms must have exactly four first neighbors*
|
||||||
|
Self-explanatory.
|
||||||
|
|
||||||
|
*Fix bond/react: Molecule template 'Coords' section required for chiralIDs keyword*
|
||||||
|
The coordinates of atoms in the pre-reacted template are used to determine
|
||||||
|
chirality.
|
||||||
|
|
||||||
|
*Fix bond/react special bond generation overflow*
|
||||||
|
The number of special bonds per-atom created by a reaction exceeds the
|
||||||
|
system setting. See the read_data or create_box command for how to
|
||||||
|
specify this value.
|
||||||
|
|
||||||
|
*Fix bond/react topology/atom exceed system topology/atom*
|
||||||
|
The number of bonds, angles etc per-atom created by a reaction exceeds
|
||||||
|
the system setting. See the read_data or create_box command for how to
|
||||||
|
specify this value.
|
||||||
|
|
||||||
*Fix bond/swap cannot use dihedral or improper styles*
|
*Fix bond/swap cannot use dihedral or improper styles*
|
||||||
These styles cannot be defined when using this fix.
|
These styles cannot be defined when using this fix.
|
||||||
|
|
||||||
@ -6782,7 +6782,7 @@ keyword to allow for additional bonds to be formed
|
|||||||
This is because the computation of constraint forces within a water
|
This is because the computation of constraint forces within a water
|
||||||
molecule adds forces to atoms owned by other processors.
|
molecule adds forces to atoms owned by other processors.
|
||||||
|
|
||||||
*Pair style lj/sdk/coul/long/gpu requires atom attribute q*
|
*Pair style lj/spica/coul/long/gpu requires atom attribute q*
|
||||||
The atom style defined does not have this attribute.
|
The atom style defined does not have this attribute.
|
||||||
|
|
||||||
*Pair style nb3b/harmonic requires atom IDs*
|
*Pair style nb3b/harmonic requires atom IDs*
|
||||||
|
|||||||
@ -68,14 +68,6 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
|
|||||||
length, multiplying by the number of bonds in the interaction (e.g. 3
|
length, multiplying by the number of bonds in the interaction (e.g. 3
|
||||||
for a dihedral) and adding a small amount of stretch.
|
for a dihedral) and adding a small amount of stretch.
|
||||||
|
|
||||||
*Bond/react: Atom affected by reaction too close to template edge*
|
|
||||||
This means an atom which changes type or connectivity during the
|
|
||||||
reaction is too close to an 'edge' atom defined in the superimpose
|
|
||||||
file. This could cause incorrect assignment of bonds, angle, etc.
|
|
||||||
Generally, this means you must include more atoms in your templates,
|
|
||||||
such that there are at least two atoms between each atom involved in
|
|
||||||
the reaction and an edge atom.
|
|
||||||
|
|
||||||
*Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero*
|
*Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero*
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
@ -212,6 +204,14 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
|
|||||||
about changes they made at the same time step and thus it may result
|
about changes they made at the same time step and thus it may result
|
||||||
in unexpected behavior.
|
in unexpected behavior.
|
||||||
|
|
||||||
|
*Fix bond/react: Atom affected by reaction too close to template edge*
|
||||||
|
This means an atom which changes type or connectivity during the
|
||||||
|
reaction is too close to an 'edge' atom defined in the superimpose
|
||||||
|
file. This could cause incorrect assignment of bonds, angle, etc.
|
||||||
|
Generally, this means you must include more atoms in your templates,
|
||||||
|
such that there are at least two atoms between each atom involved in
|
||||||
|
the reaction and an edge atom.
|
||||||
|
|
||||||
*Fix bond/swap will ignore defined angles*
|
*Fix bond/swap will ignore defined angles*
|
||||||
See the page for fix bond/swap for more info on this
|
See the page for fix bond/swap for more info on this
|
||||||
restriction.
|
restriction.
|
||||||
@ -810,4 +810,3 @@ This will most likely cause errors in kinetic fluctuations.
|
|||||||
|
|
||||||
*Using pair tail corrections with pair_modify compute no*
|
*Using pair tail corrections with pair_modify compute no*
|
||||||
The tail corrections will thus not be computed.
|
The tail corrections will thus not be computed.
|
||||||
|
|
||||||
|
|||||||
@ -110,6 +110,7 @@ Command Reference
|
|||||||
angles
|
angles
|
||||||
dihedrals
|
dihedrals
|
||||||
impropers
|
impropers
|
||||||
|
dumps
|
||||||
fix_modify_atc_commands
|
fix_modify_atc_commands
|
||||||
Bibliography
|
Bibliography
|
||||||
|
|
||||||
|
|||||||
@ -100,13 +100,14 @@ Documentation (strict)
|
|||||||
|
|
||||||
Contributions that add new styles or commands or augment existing ones
|
Contributions that add new styles or commands or augment existing ones
|
||||||
must include the corresponding new or modified documentation in
|
must include the corresponding new or modified documentation in
|
||||||
`ReStructuredText format <rst>`_ (.rst files in the ``doc/src/`` folder). The
|
`ReStructuredText format <rst_>`_ (.rst files in the ``doc/src/``
|
||||||
documentation shall be written in American English and the .rst file
|
folder). The documentation shall be written in American English and the
|
||||||
must use only ASCII characters so it can be cleanly translated to PDF
|
.rst file must use only ASCII characters so it can be cleanly translated
|
||||||
files (via `sphinx <sphinx>`_ and PDFLaTeX). Special characters may be included via
|
to PDF files (via `sphinx <https://www.sphinx-doc.org>`_ and PDFLaTeX).
|
||||||
embedded math expression typeset in a LaTeX subset.
|
Special characters may be included via embedded math expression typeset
|
||||||
|
in a LaTeX subset.
|
||||||
|
|
||||||
.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html
|
.. _rst: https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html
|
||||||
|
|
||||||
When adding new commands, they need to be integrated into the sphinx
|
When adding new commands, they need to be integrated into the sphinx
|
||||||
documentation system, and the corresponding command tables and lists
|
documentation system, and the corresponding command tables and lists
|
||||||
@ -133,7 +134,7 @@ error free completion of the HTML and PDF build will be performed and
|
|||||||
also a spell check, a check for correct anchors and labels, and a check
|
also a spell check, a check for correct anchors and labels, and a check
|
||||||
for completeness of references all styles in their corresponding tables
|
for completeness of references all styles in their corresponding tables
|
||||||
and lists is run. In case the spell check reports false positives they
|
and lists is run. In case the spell check reports false positives they
|
||||||
can be added to the file doc/utils/sphinx-config/false_positives.txt
|
can be added to the file ``doc/utils/sphinx-config/false_positives.txt``
|
||||||
|
|
||||||
Contributions that add or modify the library interface or "public" APIs
|
Contributions that add or modify the library interface or "public" APIs
|
||||||
from the C++ code or the Fortran module must include suitable doxygen
|
from the C++ code or the Fortran module must include suitable doxygen
|
||||||
|
|||||||
@ -36,7 +36,7 @@ page gives those details.
|
|||||||
* :ref:`BPM <PKG-BPM>`
|
* :ref:`BPM <PKG-BPM>`
|
||||||
* :ref:`BROWNIAN <PKG-BROWNIAN>`
|
* :ref:`BROWNIAN <PKG-BROWNIAN>`
|
||||||
* :ref:`CG-DNA <PKG-CG-DNA>`
|
* :ref:`CG-DNA <PKG-CG-DNA>`
|
||||||
* :ref:`CG-SDK <PKG-CG-SDK>`
|
* :ref:`CG-SPICA <PKG-CG-SPICA>`
|
||||||
* :ref:`CLASS2 <PKG-CLASS2>`
|
* :ref:`CLASS2 <PKG-CLASS2>`
|
||||||
* :ref:`COLLOID <PKG-COLLOID>`
|
* :ref:`COLLOID <PKG-COLLOID>`
|
||||||
* :ref:`COLVARS <PKG-COLVARS>`
|
* :ref:`COLVARS <PKG-COLVARS>`
|
||||||
@ -384,28 +384,30 @@ The CG-DNA package requires that also the `MOLECULE <PKG-MOLECULE>`_ and
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. _PKG-CG-SDK:
|
.. _PKG-CG-SPICA:
|
||||||
|
|
||||||
CG-SDK package
|
CG-SPICA package
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
**Contents:**
|
**Contents:**
|
||||||
|
|
||||||
Several pair styles and an angle style which implement the
|
Several pair styles and an angle style which implement the
|
||||||
coarse-grained SDK model of Shinoda, DeVane, and Klein which enables
|
coarse-grained SPICA (formerly called SDK) model which enables
|
||||||
simulation of ionic liquids, electrolytes, lipids and charged amino
|
simulation of biological or soft material systems.
|
||||||
acids.
|
|
||||||
|
|
||||||
**Author:** Axel Kohlmeyer (Temple U).
|
**Original Author:** Axel Kohlmeyer (Temple U).
|
||||||
|
|
||||||
|
**Maintainers:** Yusuke Miyazaki and Wataru Shinoda (Okayama U).
|
||||||
|
|
||||||
**Supporting info:**
|
**Supporting info:**
|
||||||
|
|
||||||
* src/CG-SDK: filenames -> commands
|
* src/CG-SPICA: filenames -> commands
|
||||||
* src/CG-SDK/README
|
* src/CG-SPICA/README
|
||||||
* :doc:`pair_style lj/sdk/\* <pair_sdk>`
|
* :doc:`pair_style lj/spica/\* <pair_spica>`
|
||||||
* :doc:`angle_style sdk <angle_sdk>`
|
* :doc:`angle_style spica <angle_spica>`
|
||||||
* examples/PACKAGES/cgsdk
|
* examples/PACKAGES/cgspica
|
||||||
* https://www.lammps.org/pictures.html#cg
|
* https://www.lammps.org/pictures.html#cg
|
||||||
|
* https://www.spica-ff.org/
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -78,10 +78,10 @@ whether an extra library is needed to build and use the package:
|
|||||||
- src/CG-DNA/README
|
- src/CG-DNA/README
|
||||||
- PACKAGES/cgdna
|
- PACKAGES/cgdna
|
||||||
- no
|
- no
|
||||||
* - :ref:`CG-SDK <PKG-CG-SDK>`
|
* - :ref:`CG-SPICA <PKG-CG-SPICA>`
|
||||||
- SDK coarse-graining model
|
- SPICA (SDK) coarse-graining model
|
||||||
- :doc:`pair_style lj/sdk <pair_sdk>`
|
- :doc:`pair_style lj/spica <pair_spica>`
|
||||||
- PACKAGES/cgsdk
|
- PACKAGES/cgspica
|
||||||
- no
|
- no
|
||||||
* - :ref:`CLASS2 <PKG-CLASS2>`
|
* - :ref:`CLASS2 <PKG-CLASS2>`
|
||||||
- class 2 force fields
|
- class 2 force fields
|
||||||
|
|||||||
@ -1,32 +1,32 @@
|
|||||||
.. index:: angle_style sdk
|
.. index:: angle_style spica
|
||||||
.. index:: angle_style sdk/omp
|
.. index:: angle_style spica/omp
|
||||||
|
|
||||||
angle_style sdk command
|
angle_style spica command
|
||||||
=======================
|
=========================
|
||||||
|
|
||||||
Accelerator Variants: *sdk/omp*
|
Accelerator Variants: *spica/omp*
|
||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
angle_style sdk
|
angle_style spica
|
||||||
|
|
||||||
angle_style sdk/omp
|
angle_style spica/omp
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
angle_style sdk
|
angle_style spica
|
||||||
angle_coeff 1 300.0 107.0
|
angle_coeff 1 300.0 107.0
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
The *sdk* angle style is a combination of the harmonic angle potential,
|
The *spica* angle style is a combination of the harmonic angle potential,
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
|
|
||||||
@ -34,10 +34,10 @@ The *sdk* angle style is a combination of the harmonic angle potential,
|
|||||||
|
|
||||||
where :math:`\theta_0` is the equilibrium value of the angle and
|
where :math:`\theta_0` is the equilibrium value of the angle and
|
||||||
:math:`K` a prefactor, with the *repulsive* part of the non-bonded
|
:math:`K` a prefactor, with the *repulsive* part of the non-bonded
|
||||||
*lj/sdk* pair style between the atoms 1 and 3. This angle potential is
|
*lj/spica* pair style between the atoms 1 and 3. This angle potential is
|
||||||
intended for coarse grained MD simulations with the CMM parameterization
|
intended for coarse grained MD simulations with the SPICA (formerly called SDK) parameterization
|
||||||
using the :doc:`pair_style lj/sdk <pair_sdk>`. Relative to the
|
using the :doc:`pair_style lj/spica <pair_spica>`. Relative to the
|
||||||
pair_style *lj/sdk*, however, the energy is shifted by
|
pair_style *lj/spica*, however, the energy is shifted by
|
||||||
:math:`\epsilon`, to avoid sudden jumps. Note that the usual 1/2 factor
|
:math:`\epsilon`, to avoid sudden jumps. Note that the usual 1/2 factor
|
||||||
is included in :math:`K`.
|
is included in :math:`K`.
|
||||||
|
|
||||||
@ -51,9 +51,12 @@ The following coefficients must be defined for each angle type via the
|
|||||||
radians internally; hence :math:`K` is effectively energy per
|
radians internally; hence :math:`K` is effectively energy per
|
||||||
radian\^2.
|
radian\^2.
|
||||||
|
|
||||||
The required *lj/sdk* parameters are extracted automatically from the
|
The required *lj/spica* parameters are extracted automatically from the
|
||||||
pair_style.
|
pair_style.
|
||||||
|
|
||||||
|
Style *sdk*, the original implementation of style *spica*, is available
|
||||||
|
for backward compatibility.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. include:: accel_styles.rst
|
.. include:: accel_styles.rst
|
||||||
@ -64,14 +67,14 @@ Restrictions
|
|||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
This angle style can only be used if LAMMPS was built with the
|
This angle style can only be used if LAMMPS was built with the
|
||||||
CG-SDK package. See the :doc:`Build package <Build_package>` doc
|
CG-SPICA package. See the :doc:`Build package <Build_package>` doc
|
||||||
page for more info.
|
page for more info.
|
||||||
|
|
||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
:doc:`angle_coeff <angle_coeff>`, :doc:`angle_style harmonic <angle_harmonic>`, :doc:`pair_style lj/sdk <pair_sdk>`,
|
:doc:`angle_coeff <angle_coeff>`, :doc:`angle_style harmonic <angle_harmonic>`, :doc:`pair_style lj/spica <pair_spica>`,
|
||||||
:doc:`pair_style lj/sdk/coul/long <pair_sdk>`
|
:doc:`pair_style lj/spica/coul/long <pair_spica>`
|
||||||
|
|
||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
@ -92,7 +92,7 @@ of (g,i,k,o,t) to indicate which accelerated styles exist.
|
|||||||
* :doc:`harmonic <angle_harmonic>` - harmonic angle
|
* :doc:`harmonic <angle_harmonic>` - harmonic angle
|
||||||
* :doc:`mm3 <angle_mm3>` - anharmonic angle
|
* :doc:`mm3 <angle_mm3>` - anharmonic angle
|
||||||
* :doc:`quartic <angle_quartic>` - angle with cubic and quartic terms
|
* :doc:`quartic <angle_quartic>` - angle with cubic and quartic terms
|
||||||
* :doc:`sdk <angle_sdk>` - harmonic angle with repulsive SDK pair style between 1-3 atoms
|
* :doc:`spica <angle_spica>` - harmonic angle with repulsive SPICA pair style between 1-3 atoms
|
||||||
* :doc:`table <angle_table>` - tabulated by angle
|
* :doc:`table <angle_table>` - tabulated by angle
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|||||||
@ -8,10 +8,11 @@ Syntax
|
|||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
compute ID group-ID contact/atom
|
compute ID group-ID contact/atom group2-ID
|
||||||
|
|
||||||
* ID, group-ID are documented in :doc:`compute <compute>` command
|
* ID, group-ID are documented in :doc:`compute <compute>` command
|
||||||
* contact/atom = style name of this compute command
|
* contact/atom = style name of this compute command
|
||||||
|
* group2-ID = optional argument to restrict which atoms to consider for contacts (see below)
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
""""""""
|
""""""""
|
||||||
@ -19,6 +20,7 @@ Examples
|
|||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
compute 1 all contact/atom
|
compute 1 all contact/atom
|
||||||
|
compute 1 all contact/atom mygroup
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
@ -45,6 +47,9 @@ overview of LAMMPS output options.
|
|||||||
The per-atom vector values will be a number >= 0.0, as explained
|
The per-atom vector values will be a number >= 0.0, as explained
|
||||||
above.
|
above.
|
||||||
|
|
||||||
|
The optional *group2-ID* argument allows to specify from which group atoms
|
||||||
|
contribute to the coordination number. Default setting is group 'all'.
|
||||||
|
|
||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
@ -63,4 +68,7 @@ Related commands
|
|||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
|
|
||||||
|
*group2-ID* = all
|
||||||
|
|
||||||
|
|
||||||
none
|
none
|
||||||
|
|||||||
@ -1,4 +1,26 @@
|
|||||||
.. index:: dump
|
.. index:: dump
|
||||||
|
.. index:: dump atom
|
||||||
|
.. index:: dump cfg
|
||||||
|
.. index:: dump custom
|
||||||
|
.. index:: dump dcd
|
||||||
|
.. index:: dump local
|
||||||
|
.. index:: dump xtc
|
||||||
|
.. index:: dump yaml
|
||||||
|
.. index:: dump xyz
|
||||||
|
.. index:: dump atom/gz
|
||||||
|
.. index:: dump cfg/gz
|
||||||
|
.. index:: dump custom/gz
|
||||||
|
.. index:: dump local/gz
|
||||||
|
.. index:: dump xyz/gz
|
||||||
|
.. index:: dump atom/mpiio
|
||||||
|
.. index:: dump cfg/mpiio
|
||||||
|
.. index:: dump custom/mpiio
|
||||||
|
.. index:: dump xyz/mpiio
|
||||||
|
.. index:: dump atom/zstd
|
||||||
|
.. index:: dump cfg/zstd
|
||||||
|
.. index:: dump custom/zstd
|
||||||
|
.. index:: dump xyz/zstd
|
||||||
|
.. index:: dump local/zstd
|
||||||
|
|
||||||
dump command
|
dump command
|
||||||
============
|
============
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
.. index:: dump image
|
.. index:: dump image
|
||||||
|
.. index:: dump movie
|
||||||
|
|
||||||
dump image command
|
dump image command
|
||||||
==================
|
==================
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
.. index:: dump netcdf
|
.. index:: dump netcdf
|
||||||
|
.. index:: dump netcdf/mpiio
|
||||||
|
|
||||||
dump netcdf command
|
dump netcdf command
|
||||||
===================
|
===================
|
||||||
|
|||||||
8
doc/src/dumps.rst
Normal file
8
doc/src/dumps.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Dump Styles
|
||||||
|
###############
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:glob:
|
||||||
|
|
||||||
|
dump*
|
||||||
@ -1,27 +1,27 @@
|
|||||||
.. index:: pair_style lj/sdk
|
.. index:: pair_style lj/spica
|
||||||
.. index:: pair_style lj/sdk/gpu
|
.. index:: pair_style lj/spica/gpu
|
||||||
.. index:: pair_style lj/sdk/kk
|
.. index:: pair_style lj/spica/kk
|
||||||
.. index:: pair_style lj/sdk/omp
|
.. index:: pair_style lj/spica/omp
|
||||||
.. index:: pair_style lj/sdk/coul/long
|
.. index:: pair_style lj/spica/coul/long
|
||||||
.. index:: pair_style lj/sdk/coul/long/gpu
|
.. index:: pair_style lj/spica/coul/long/gpu
|
||||||
.. index:: pair_style lj/sdk/coul/long/omp
|
.. index:: pair_style lj/spica/coul/long/omp
|
||||||
.. index:: pair_style lj/sdk/coul/msm
|
.. index:: pair_style lj/spica/coul/msm
|
||||||
.. index:: pair_style lj/sdk/coul/msm/omp
|
.. index:: pair_style lj/spica/coul/msm/omp
|
||||||
|
|
||||||
pair_style lj/sdk command
|
pair_style lj/spica command
|
||||||
=========================
|
===========================
|
||||||
|
|
||||||
Accelerator Variants: *lj/sdk/gpu*, *lj/sdk/kk*, *lj/sdk/omp*
|
Accelerator Variants: *lj/spica/gpu*, *lj/spica/kk*, *lj/spica/omp*
|
||||||
|
|
||||||
pair_style lj/sdk/coul/long command
|
pair_style lj/spica/coul/long command
|
||||||
===================================
|
=====================================
|
||||||
|
|
||||||
Accelerator Variants: *lj/sdk/coul/long/gpu*, *lj/sdk/coul/long/omp*
|
Accelerator Variants: *lj/spica/coul/long/gpu*, *lj/spica/coul/long/omp*
|
||||||
|
|
||||||
pair_style lj/sdk/coul/msm command
|
pair_style lj/spica/coul/msm command
|
||||||
==================================
|
====================================
|
||||||
|
|
||||||
Accelerator Variants: *lj/sdk/coul/msm/omp*
|
Accelerator Variants: *lj/spica/coul/msm/omp*
|
||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
@ -30,14 +30,14 @@ Syntax
|
|||||||
|
|
||||||
pair_style style args
|
pair_style style args
|
||||||
|
|
||||||
* style = *lj/sdk* or *lj/sdk/coul/long*
|
* style = *lj/spica* or *lj/spica/coul/long*
|
||||||
* args = list of arguments for a particular style
|
* args = list of arguments for a particular style
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
*lj/sdk* args = cutoff
|
*lj/spica* args = cutoff
|
||||||
cutoff = global cutoff for Lennard Jones interactions (distance units)
|
cutoff = global cutoff for Lennard Jones interactions (distance units)
|
||||||
*lj/sdk/coul/long* args = cutoff (cutoff2)
|
*lj/spica/coul/long* args = cutoff (cutoff2)
|
||||||
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
|
cutoff = global cutoff for LJ (and Coulombic if only 1 arg) (distance units)
|
||||||
cutoff2 = global cutoff for Coulombic (optional) (distance units)
|
cutoff2 = global cutoff for Coulombic (optional) (distance units)
|
||||||
|
|
||||||
@ -46,21 +46,21 @@ Examples
|
|||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
pair_style lj/sdk 2.5
|
pair_style lj/spica 2.5
|
||||||
pair_coeff 1 1 lj12_6 1 1.1 2.8
|
pair_coeff 1 1 lj12_6 1 1.1 2.8
|
||||||
|
|
||||||
pair_style lj/sdk/coul/long 10.0
|
pair_style lj/spica/coul/long 10.0
|
||||||
pair_style lj/sdk/coul/long 10.0 12.0
|
pair_style lj/spica/coul/long 10.0 12.0
|
||||||
pair_coeff 1 1 lj9_6 100.0 3.5 12.0
|
pair_coeff 1 1 lj9_6 100.0 3.5 12.0
|
||||||
|
|
||||||
pair_style lj/sdk/coul/msm 10.0
|
pair_style lj/spica/coul/msm 10.0
|
||||||
pair_style lj/sdk/coul/msm 10.0 12.0
|
pair_style lj/spica/coul/msm 10.0 12.0
|
||||||
pair_coeff 1 1 lj9_6 100.0 3.5 12.0
|
pair_coeff 1 1 lj9_6 100.0 3.5 12.0
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
The *lj/sdk* styles compute a 9/6, 12/4, or 12/6 Lennard-Jones potential,
|
The *lj/spica* styles compute a 9/6, 12/4, 12/5, or 12/6 Lennard-Jones potential,
|
||||||
given by
|
given by
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
@ -71,14 +71,20 @@ given by
|
|||||||
E = & \frac{3\sqrt{3}}{2} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
E = & \frac{3\sqrt{3}}{2} \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
||||||
\left(\frac{\sigma}{r}\right)^4 \right]
|
\left(\frac{\sigma}{r}\right)^4 \right]
|
||||||
\qquad r < r_c \\
|
\qquad r < r_c \\
|
||||||
|
E = & \frac{12}{7}\left(\frac{12}{5}\right)^{\left(\frac{5}{7}\right)} \epsilon
|
||||||
|
\left[ \left(\frac{\sigma}{r}\right)^{12} -
|
||||||
|
\left(\frac{\sigma}{r}\right)^5 \right]
|
||||||
|
\qquad r < r_c \\
|
||||||
E = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
E = & 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
|
||||||
\left(\frac{\sigma}{r}\right)^6 \right]
|
\left(\frac{\sigma}{r}\right)^6 \right]
|
||||||
\qquad r < r_c
|
\qquad r < r_c
|
||||||
|
|
||||||
as required for the SDK Coarse-grained MD parameterization discussed in
|
as required for the SPICA (formerly called SDK) and the pSPICA Coarse-grained MD parameterization discussed in
|
||||||
:ref:`(Shinoda) <Shinoda3>` and :ref:`(DeVane) <DeVane>`. Rc is the cutoff.
|
:ref:`(Shinoda) <Shinoda3>`, :ref:`(DeVane) <DeVane>`, :ref:`(Seo) <Seo>`, and :ref:`(Miyazaki) <Miyazaki>`.
|
||||||
|
Rc is the cutoff.
|
||||||
|
Summary information on these force fields can be found at https://www.spica-ff.org
|
||||||
|
|
||||||
Style *lj/sdk/coul/long* computes the adds Coulombic interactions
|
Style *lj/spica/coul/long* computes the adds Coulombic interactions
|
||||||
with an additional damping factor applied so it can be used in
|
with an additional damping factor applied so it can be used in
|
||||||
conjunction with the :doc:`kspace_style <kspace_style>` command and
|
conjunction with the :doc:`kspace_style <kspace_style>` command and
|
||||||
its *ewald* or *pppm* or *pppm/cg* option. The Coulombic cutoff
|
its *ewald* or *pppm* or *pppm/cg* option. The Coulombic cutoff
|
||||||
@ -92,7 +98,7 @@ above, or in the data file or restart files read by the
|
|||||||
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
|
||||||
commands, or by mixing as described below:
|
commands, or by mixing as described below:
|
||||||
|
|
||||||
* cg_type (lj9_6, lj12_4, or lj12_6)
|
* cg_type (lj9_6, lj12_4, lj12_5, or lj12_6)
|
||||||
* epsilon (energy units)
|
* epsilon (energy units)
|
||||||
* sigma (distance units)
|
* sigma (distance units)
|
||||||
* cutoff1 (distance units)
|
* cutoff1 (distance units)
|
||||||
@ -108,11 +114,15 @@ and Coulombic interactions for this type pair. If both coefficients
|
|||||||
are specified, they are used as the LJ and Coulombic cutoffs for this
|
are specified, they are used as the LJ and Coulombic cutoffs for this
|
||||||
type pair.
|
type pair.
|
||||||
|
|
||||||
For *lj/sdk/coul/long* and *lj/sdk/coul/msm* only the LJ cutoff can be
|
For *lj/spica/coul/long* and *lj/spica/coul/msm* only the LJ cutoff can be
|
||||||
specified since a Coulombic cutoff cannot be specified for an
|
specified since a Coulombic cutoff cannot be specified for an
|
||||||
individual I,J type pair. All type pairs use the same global
|
individual I,J type pair. All type pairs use the same global
|
||||||
Coulombic cutoff specified in the pair_style command.
|
Coulombic cutoff specified in the pair_style command.
|
||||||
|
|
||||||
|
The original implementation of the above styles are
|
||||||
|
style *lj/sdk*, *lj/sdk/coul/long*, and *lj/sdk/coul/msm*,
|
||||||
|
and available for backward compatibility.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. include:: accel_styles.rst
|
.. include:: accel_styles.rst
|
||||||
@ -123,24 +133,24 @@ Mixing, shift, table, tail correction, restart, rRESPA info
|
|||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
|
For atom type pairs I,J and I != J, the epsilon and sigma coefficients
|
||||||
and cutoff distance for all of the lj/sdk pair styles *cannot* be mixed,
|
and cutoff distance for all of the lj/spica pair styles *cannot* be mixed,
|
||||||
since different pairs may have different exponents. So all parameters
|
since different pairs may have different exponents. So all parameters
|
||||||
for all pairs have to be specified explicitly through the "pair_coeff"
|
for all pairs have to be specified explicitly through the "pair_coeff"
|
||||||
command. Defining then in a data file is also not supported, due to
|
command. Defining then in a data file is also not supported, due to
|
||||||
limitations of that file format.
|
limitations of that file format.
|
||||||
|
|
||||||
All of the lj/sdk pair styles support the
|
All of the lj/spica pair styles support the
|
||||||
:doc:`pair_modify <pair_modify>` shift option for the energy of the
|
:doc:`pair_modify <pair_modify>` shift option for the energy of the
|
||||||
Lennard-Jones portion of the pair interaction.
|
Lennard-Jones portion of the pair interaction.
|
||||||
|
|
||||||
The *lj/sdk/coul/long* pair styles support the
|
The *lj/spica/coul/long* pair styles support the
|
||||||
:doc:`pair_modify <pair_modify>` table option since they can tabulate
|
:doc:`pair_modify <pair_modify>` table option since they can tabulate
|
||||||
the short-range portion of the long-range Coulombic interaction.
|
the short-range portion of the long-range Coulombic interaction.
|
||||||
|
|
||||||
All of the lj/sdk pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do
|
All of the lj/spica pair styles write their information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do
|
||||||
not need to be specified in an input script that reads a restart file.
|
not need to be specified in an input script that reads a restart file.
|
||||||
|
|
||||||
The lj/sdk and lj/cut/coul/long pair styles do not support
|
The lj/spica and lj/cut/coul/long pair styles do not support
|
||||||
the use of the *inner*, *middle*, and *outer* keywords of the :doc:`run_style respa <run_style>` command.
|
the use of the *inner*, *middle*, and *outer* keywords of the :doc:`run_style respa <run_style>` command.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
@ -148,8 +158,8 @@ the use of the *inner*, *middle*, and *outer* keywords of the :doc:`run_style re
|
|||||||
Restrictions
|
Restrictions
|
||||||
""""""""""""
|
""""""""""""
|
||||||
|
|
||||||
All of the lj/sdk pair styles are part of the CG-SDK package. The
|
All of the lj/spica pair styles are part of the CG-SPICA package. The
|
||||||
*lj/sdk/coul/long* style also requires the KSPACE package to be built
|
*lj/spica/coul/long* style also requires the KSPACE package to be built
|
||||||
(which is enabled by default). They are only enabled if LAMMPS was
|
(which is enabled by default). They are only enabled if LAMMPS was
|
||||||
built with that package. See the :doc:`Build package <Build_package>`
|
built with that package. See the :doc:`Build package <Build_package>`
|
||||||
doc page for more info.
|
doc page for more info.
|
||||||
@ -157,7 +167,7 @@ doc page for more info.
|
|||||||
Related commands
|
Related commands
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
:doc:`pair_coeff <pair_coeff>`, :doc:`angle_style sdk <angle_sdk>`
|
:doc:`pair_coeff <pair_coeff>`, :doc:`angle_style spica <angle_spica>`
|
||||||
|
|
||||||
Default
|
Default
|
||||||
"""""""
|
"""""""
|
||||||
@ -168,8 +178,16 @@ none
|
|||||||
|
|
||||||
.. _Shinoda3:
|
.. _Shinoda3:
|
||||||
|
|
||||||
**(Shinoda)** Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007).
|
**(Shinoda)** Shinoda, DeVane, Klein, Mol Sim, 33, 27-36 (2007).
|
||||||
|
|
||||||
.. _DeVane:
|
.. _DeVane:
|
||||||
|
|
||||||
**(DeVane)** Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008).
|
**(DeVane)** Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008).
|
||||||
|
|
||||||
|
.. _Seo:
|
||||||
|
|
||||||
|
**(Seo)** Seo, Shinoda, J Chem Theory Comput, 15, 762-774 (2019).
|
||||||
|
|
||||||
|
.. _Miyazaki:
|
||||||
|
|
||||||
|
**(Miyazaki)** Miyazaki, Okazaki, Shinoda, J Chem Theory Comput, 16, 782-793 (2020).
|
||||||
@ -1,18 +1,23 @@
|
|||||||
.. index:: pair_style srp
|
.. index:: pair_style srp
|
||||||
|
.. index:: pair_style srp/react
|
||||||
|
|
||||||
pair_style srp command
|
pair_style srp command
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
pair_style srp/react command
|
||||||
|
============================
|
||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
pair_style srp cutoff btype dist keyword value ...
|
pair_style srp cutoff btype dist keyword value ...
|
||||||
|
pair_style srp/react cutoff btype dist react-id keyword value ...
|
||||||
|
|
||||||
* cutoff = global cutoff for SRP interactions (distance units)
|
* cutoff = global cutoff for SRP interactions (distance units)
|
||||||
* btype = bond type to apply SRP interactions to (can be wildcard, see below)
|
* btype = bond type to apply SRP interactions to (can be wildcard, see below)
|
||||||
* distance = *min* or *mid*
|
* distance = *min* or *mid*
|
||||||
|
* react-id = id of either fix bond/break or fix bond/create
|
||||||
* zero or more keyword/value pairs may be appended
|
* zero or more keyword/value pairs may be appended
|
||||||
* keyword = *exclude*
|
* keyword = *exclude*
|
||||||
|
|
||||||
@ -36,13 +41,19 @@ Examples
|
|||||||
pair_coeff 1 2 none
|
pair_coeff 1 2 none
|
||||||
pair_coeff 2 2 srp 40.0
|
pair_coeff 2 2 srp 40.0
|
||||||
|
|
||||||
|
fix create all bond/create 100 1 2 1.0 1 prob 0.2 19852
|
||||||
|
pair_style hybrid dpd 1.0 1.0 12345 srp/react 0.8 * min create exclude yes
|
||||||
|
pair_coeff 1 1 dpd 60.0 50 1.0
|
||||||
|
pair_coeff 1 2 none
|
||||||
|
pair_coeff 2 2 srp/react 40.0
|
||||||
|
|
||||||
pair_style hybrid srp 0.8 2 mid
|
pair_style hybrid srp 0.8 2 mid
|
||||||
pair_coeff 1 1 none
|
pair_coeff 1 1 none
|
||||||
pair_coeff 1 2 none
|
pair_coeff 1 2 none
|
||||||
pair_coeff 2 2 srp 100.0 0.8
|
pair_coeff 2 2 srp 100.0 0.8
|
||||||
|
|
||||||
Description
|
Description
|
||||||
"""""""""""
|
|
||||||
|
|
||||||
Style *srp* computes a soft segmental repulsive potential (SRP) that
|
Style *srp* computes a soft segmental repulsive potential (SRP) that
|
||||||
acts between pairs of bonds. This potential is useful for preventing
|
acts between pairs of bonds. This potential is useful for preventing
|
||||||
@ -121,6 +132,18 @@ at the cutoff distance :math:`r_c`.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
Pair style *srp/react* interfaces the pair style *srp* with the
|
||||||
|
bond breaking and formation mechanisms provided by fix *bond/break*
|
||||||
|
and fix *bond/create*, respectively. When using this pair style, whenever a
|
||||||
|
bond breaking (or formation) reaction occurs, the corresponding fictitious
|
||||||
|
particle is deleted (or inserted) during the same simulation time step as
|
||||||
|
the reaction. This is useful in the simulation of reactive systems involving
|
||||||
|
large polymeric molecules :ref:`(Palkar) <Palkar>` where the segmental repulsive
|
||||||
|
potential is necessary to minimize topological violations, and also needs to be
|
||||||
|
turned on and off according to the progress of the reaction.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
Mixing, shift, table, tail correction, restart, rRESPA info
|
Mixing, shift, table, tail correction, restart, rRESPA info
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
@ -178,3 +201,8 @@ The default keyword value is exclude = yes.
|
|||||||
|
|
||||||
**(Sirk)** Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J
|
**(Sirk)** Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J
|
||||||
Chem Phys, 136 (13) 134903, 2012.
|
Chem Phys, 136 (13) 134903, 2012.
|
||||||
|
|
||||||
|
.. _Palkar:
|
||||||
|
|
||||||
|
**(Palkar)** Palkar V, Kuksenok O, J. Phys. Chem. B, 126 (1), 336-346, 2022
|
||||||
|
|
||||||
|
|||||||
@ -260,9 +260,9 @@ accelerated styles exist.
|
|||||||
* :doc:`lj/long/tip4p/long <pair_lj_long>` - long-range LJ and long-range Coulomb for TIP4P water
|
* :doc:`lj/long/tip4p/long <pair_lj_long>` - long-range LJ and long-range Coulomb for TIP4P water
|
||||||
* :doc:`lj/mdf <pair_mdf>` - LJ potential with a taper function
|
* :doc:`lj/mdf <pair_mdf>` - LJ potential with a taper function
|
||||||
* :doc:`lj/relres <pair_lj_relres>` - LJ using multiscale Relative Resolution (RelRes) methodology :ref:`(Chaimovich) <Chaimovich2>`.
|
* :doc:`lj/relres <pair_lj_relres>` - LJ using multiscale Relative Resolution (RelRes) methodology :ref:`(Chaimovich) <Chaimovich2>`.
|
||||||
* :doc:`lj/sdk <pair_sdk>` - LJ for SDK coarse-graining
|
* :doc:`lj/spica <pair_spica>` - LJ for SPICA coarse-graining
|
||||||
* :doc:`lj/sdk/coul/long <pair_sdk>` - LJ for SDK coarse-graining with long-range Coulomb
|
* :doc:`lj/spica/coul/long <pair_spica>` - LJ for SPICA coarse-graining with long-range Coulomb
|
||||||
* :doc:`lj/sdk/coul/msm <pair_sdk>` - LJ for SDK coarse-graining with long-range Coulomb via MSM
|
* :doc:`lj/spica/coul/msm <pair_spica>` - LJ for SPICA coarse-graining with long-range Coulomb via MSM
|
||||||
* :doc:`lj/sf/dipole/sf <pair_dipole>` - LJ with dipole interaction with shifted forces
|
* :doc:`lj/sf/dipole/sf <pair_dipole>` - LJ with dipole interaction with shifted forces
|
||||||
* :doc:`lj/smooth <pair_lj_smooth>` - smoothed Lennard-Jones potential
|
* :doc:`lj/smooth <pair_lj_smooth>` - smoothed Lennard-Jones potential
|
||||||
* :doc:`lj/smooth/linear <pair_lj_smooth_linear>` - linear smoothed LJ potential
|
* :doc:`lj/smooth/linear <pair_lj_smooth_linear>` - linear smoothed LJ potential
|
||||||
@ -349,6 +349,7 @@ accelerated styles exist.
|
|||||||
* :doc:`spin/magelec <pair_spin_magelec>` -
|
* :doc:`spin/magelec <pair_spin_magelec>` -
|
||||||
* :doc:`spin/neel <pair_spin_neel>` -
|
* :doc:`spin/neel <pair_spin_neel>` -
|
||||||
* :doc:`srp <pair_srp>` -
|
* :doc:`srp <pair_srp>` -
|
||||||
|
* :doc:`srp/react <pair_srp>` -
|
||||||
* :doc:`sw <pair_sw>` - Stillinger-Weber 3-body potential
|
* :doc:`sw <pair_sw>` - Stillinger-Weber 3-body potential
|
||||||
* :doc:`sw/angle/table <pair_sw_angle_table>` - Stillinger-Weber potential with tabulated angular term
|
* :doc:`sw/angle/table <pair_sw_angle_table>` - Stillinger-Weber potential with tabulated angular term
|
||||||
* :doc:`sw/mod <pair_sw>` - modified Stillinger-Weber 3-body potential
|
* :doc:`sw/mod <pair_sw>` - modified Stillinger-Weber 3-body potential
|
||||||
|
|||||||
@ -685,7 +685,9 @@ of a run, according to this formula:
|
|||||||
The run begins on startstep and ends on stopstep. Startstep and
|
The run begins on startstep and ends on stopstep. Startstep and
|
||||||
stopstep can span multiple runs, using the *start* and *stop* keywords
|
stopstep can span multiple runs, using the *start* and *stop* keywords
|
||||||
of the :doc:`run <run>` command. See the :doc:`run <run>` command for
|
of the :doc:`run <run>` command. See the :doc:`run <run>` command for
|
||||||
details of how to do this.
|
details of how to do this. If called in between runs or during a
|
||||||
|
:doc:`run 0 <run>` command, the ramp(x,y) function will return the
|
||||||
|
value of x.
|
||||||
|
|
||||||
The stagger(x,y) function uses the current timestep to generate a new
|
The stagger(x,y) function uses the current timestep to generate a new
|
||||||
timestep. X,y > 0 and x > y are required. The generated timesteps
|
timestep. X,y > 0 and x > y are required. The generated timesteps
|
||||||
@ -781,10 +783,14 @@ according to this formula:
|
|||||||
where dt = the timestep size.
|
where dt = the timestep size.
|
||||||
|
|
||||||
The run begins on startstep. Startstep can span multiple runs, using
|
The run begins on startstep. Startstep can span multiple runs, using
|
||||||
the *start* keyword of the :doc:`run <run>` command. See the
|
the *start* keyword of the :doc:`run <run>` command. See the :doc:`run
|
||||||
:doc:`run <run>` command for details of how to do this. Note that the
|
<run>` command for details of how to do this. Note that the
|
||||||
:doc:`thermo_style <thermo_style>` keyword elaplong =
|
:doc:`thermo_style <thermo_style>` keyword elaplong = timestep-startstep.
|
||||||
timestep-startstep.
|
If used between runs this function will return
|
||||||
|
the value according to the end of the last run or the value of x if
|
||||||
|
used before *any* runs. This function assumes the length of the time
|
||||||
|
step does not change and thus may not be used in combination with
|
||||||
|
:doc:`fix dt/reset <fix_dt_reset>`.
|
||||||
|
|
||||||
The swiggle(x,y,z) and cwiggle(x,y,z) functions each take 3 arguments:
|
The swiggle(x,y,z) and cwiggle(x,y,z) functions each take 3 arguments:
|
||||||
x = value0, y = amplitude, z = period. They use the elapsed time to
|
x = value0, y = amplitude, z = period. They use the elapsed time to
|
||||||
@ -799,10 +805,14 @@ run, according to one of these formulas, where omega = 2 PI / period:
|
|||||||
where dt = the timestep size.
|
where dt = the timestep size.
|
||||||
|
|
||||||
The run begins on startstep. Startstep can span multiple runs, using
|
The run begins on startstep. Startstep can span multiple runs, using
|
||||||
the *start* keyword of the :doc:`run <run>` command. See the
|
the *start* keyword of the :doc:`run <run>` command. See the :doc:`run
|
||||||
:doc:`run <run>` command for details of how to do this. Note that the
|
<run>` command for details of how to do this. Note that the
|
||||||
:doc:`thermo_style <thermo_style>` keyword elaplong =
|
:doc:`thermo_style <thermo_style>` keyword elaplong = timestep-startstep.
|
||||||
timestep-startstep.
|
If used between runs these functions will return
|
||||||
|
the value according to the end of the last run or the value of x if
|
||||||
|
used before *any* runs. These functions assume the length of the time
|
||||||
|
step does not change and thus may not be used in combination with
|
||||||
|
:doc:`fix dt/reset <fix_dt_reset>`.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ reader = {}
|
|||||||
region = {}
|
region = {}
|
||||||
total = 0
|
total = 0
|
||||||
|
|
||||||
index_pattern = re.compile(r"^.. index:: (compute|fix|pair_style|angle_style|bond_style|dihedral_style|improper_style|kspace_style)\s+([a-zA-Z0-9/_]+)$")
|
index_pattern = re.compile(r"^.. index:: (compute|fix|pair_style|angle_style|bond_style|dihedral_style|improper_style|kspace_style|dump)\s+([a-zA-Z0-9/_]+)$")
|
||||||
style_pattern = re.compile(r"(.+)Style\((.+),(.+)\)")
|
style_pattern = re.compile(r"(.+)Style\((.+),(.+)\)")
|
||||||
upper = re.compile("[A-Z]+")
|
upper = re.compile("[A-Z]+")
|
||||||
gpu = re.compile("(.+)/gpu$")
|
gpu = re.compile("(.+)/gpu$")
|
||||||
@ -84,7 +84,8 @@ def load_index_entries_in_file(path):
|
|||||||
|
|
||||||
def load_index_entries():
|
def load_index_entries():
|
||||||
index = {'compute': set(), 'fix': set(), 'pair_style': set(), 'angle_style': set(),
|
index = {'compute': set(), 'fix': set(), 'pair_style': set(), 'angle_style': set(),
|
||||||
'bond_style': set(), 'dihedral_style': set(), 'improper_style': set(), 'kspace_style': set()}
|
'bond_style': set(), 'dihedral_style': set(), 'improper_style': set(),
|
||||||
|
'kspace_style': set(), 'dump': set()}
|
||||||
rst_files = glob(os.path.join(doc_dir, '*.rst'))
|
rst_files = glob(os.path.join(doc_dir, '*.rst'))
|
||||||
for f in rst_files:
|
for f in rst_files:
|
||||||
for command_type, style in load_index_entries_in_file(f):
|
for command_type, style in load_index_entries_in_file(f):
|
||||||
@ -254,8 +255,9 @@ for command_type, entries in index.items():
|
|||||||
|
|
||||||
print("Total number of style index entries:", total_index)
|
print("Total number of style index entries:", total_index)
|
||||||
|
|
||||||
|
skip_angle = ('sdk')
|
||||||
skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species')
|
skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species')
|
||||||
skip_pair = ('meam/c','lj/sf','reax/c')
|
skip_pair = ('meam/c','lj/sf','reax/c','lj/sdk','lj/sdk/coul/long','lj/sdk/coul/msm')
|
||||||
skip_compute = ('pressure/cylinder')
|
skip_compute = ('pressure/cylinder')
|
||||||
|
|
||||||
counter = 0
|
counter = 0
|
||||||
@ -269,13 +271,14 @@ counter += check_style('Commands_pair.rst', doc_dir, ":doc:`(.+) <pair.+>`",pair
|
|||||||
counter += check_style('pair_style.rst', doc_dir, ":doc:`(.+) <pair.+>` -",pair,'Pair',skip=skip_pair,suffix=False)
|
counter += check_style('pair_style.rst', doc_dir, ":doc:`(.+) <pair.+>` -",pair,'Pair',skip=skip_pair,suffix=False)
|
||||||
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <bond.+>`",bond,'Bond',suffix=True)
|
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <bond.+>`",bond,'Bond',suffix=True)
|
||||||
counter += check_style('bond_style.rst', doc_dir, ":doc:`(.+) <bond.+>` -",bond,'Bond',suffix=False)
|
counter += check_style('bond_style.rst', doc_dir, ":doc:`(.+) <bond.+>` -",bond,'Bond',suffix=False)
|
||||||
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <angle.+>`",angle,'Angle',suffix=True)
|
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <angle.+>`",angle,'Angle',skip=skip_angle,suffix=True)
|
||||||
counter += check_style('angle_style.rst', doc_dir, ":doc:`(.+) <angle.+>` -",angle,'Angle',suffix=False)
|
counter += check_style('angle_style.rst', doc_dir, ":doc:`(.+) <angle.+>` -",angle,'Angle',skip=skip_angle,suffix=False)
|
||||||
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <dihedral.+>`",dihedral,'Dihedral',suffix=True)
|
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <dihedral.+>`",dihedral,'Dihedral',suffix=True)
|
||||||
counter += check_style('dihedral_style.rst', doc_dir, ":doc:`(.+) <dihedral.+>` -",dihedral,'Dihedral',suffix=False)
|
counter += check_style('dihedral_style.rst', doc_dir, ":doc:`(.+) <dihedral.+>` -",dihedral,'Dihedral',suffix=False)
|
||||||
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <improper.+>`",improper,'Improper',suffix=True)
|
counter += check_style('Commands_bond.rst', doc_dir, ":doc:`(.+) <improper.+>`",improper,'Improper',suffix=True)
|
||||||
counter += check_style('improper_style.rst', doc_dir, ":doc:`(.+) <improper.+>` -",improper,'Improper',suffix=False)
|
counter += check_style('improper_style.rst', doc_dir, ":doc:`(.+) <improper.+>` -",improper,'Improper',suffix=False)
|
||||||
counter += check_style('Commands_kspace.rst', doc_dir, ":doc:`(.+) <kspace_style>`",kspace,'KSpace',suffix=True)
|
counter += check_style('Commands_kspace.rst', doc_dir, ":doc:`(.+) <kspace_style>`",kspace,'KSpace',suffix=True)
|
||||||
|
counter += check_style('Commands_dump.rst', doc_dir, ":doc:`(.+) <dump.*>`",dump,'Dump',suffix=True)
|
||||||
|
|
||||||
if counter:
|
if counter:
|
||||||
print(f"Found {counter} issue(s) with style lists")
|
print(f"Found {counter} issue(s) with style lists")
|
||||||
@ -284,12 +287,13 @@ counter = 0
|
|||||||
|
|
||||||
counter += check_style_index("compute", compute, index["compute"], skip=['pressure/cylinder'])
|
counter += check_style_index("compute", compute, index["compute"], skip=['pressure/cylinder'])
|
||||||
counter += check_style_index("fix", fix, index["fix"], skip=['python','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species'])
|
counter += check_style_index("fix", fix, index["fix"], skip=['python','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species'])
|
||||||
counter += check_style_index("angle_style", angle, index["angle_style"])
|
counter += check_style_index("angle_style", angle, index["angle_style"], skip=['sdk'])
|
||||||
counter += check_style_index("bond_style", bond, index["bond_style"])
|
counter += check_style_index("bond_style", bond, index["bond_style"])
|
||||||
counter += check_style_index("dihedral_style", dihedral, index["dihedral_style"])
|
counter += check_style_index("dihedral_style", dihedral, index["dihedral_style"])
|
||||||
counter += check_style_index("improper_style", improper, index["improper_style"])
|
counter += check_style_index("improper_style", improper, index["improper_style"])
|
||||||
counter += check_style_index("kspace_style", kspace, index["kspace_style"])
|
counter += check_style_index("kspace_style", kspace, index["kspace_style"])
|
||||||
counter += check_style_index("pair_style", pair, index["pair_style"], skip=['meam/c', 'lj/sf','reax/c'])
|
counter += check_style_index("dump", dump, index["dump"])
|
||||||
|
counter += check_style_index("pair_style", pair, index["pair_style"], skip=['meam/c','lj/sf','reax/c','lj/sdk','lj/sdk/coul/long','lj/sdk/coul/msm'])
|
||||||
|
|
||||||
if counter:
|
if counter:
|
||||||
print(f"Found {counter} issue(s) with style index")
|
print(f"Found {counter} issue(s) with style index")
|
||||||
|
|||||||
@ -291,6 +291,7 @@ blocksize
|
|||||||
blueviolet
|
blueviolet
|
||||||
bn
|
bn
|
||||||
bni
|
bni
|
||||||
|
bnumeric
|
||||||
bo
|
bo
|
||||||
Bochkarev
|
Bochkarev
|
||||||
Bochum
|
Bochum
|
||||||
@ -423,6 +424,8 @@ CGDNA
|
|||||||
cgs
|
cgs
|
||||||
cgsdk
|
cgsdk
|
||||||
CGSDK
|
CGSDK
|
||||||
|
cgspica
|
||||||
|
CGSPICA
|
||||||
Chaimovich
|
Chaimovich
|
||||||
Chalopin
|
Chalopin
|
||||||
Champaign
|
Champaign
|
||||||
@ -1480,6 +1483,7 @@ intra
|
|||||||
intralayer
|
intralayer
|
||||||
intramolecular
|
intramolecular
|
||||||
ints
|
ints
|
||||||
|
inumeric
|
||||||
inv
|
inv
|
||||||
invariants
|
invariants
|
||||||
inversed
|
inversed
|
||||||
@ -1697,6 +1701,7 @@ kTln
|
|||||||
ktypeN
|
ktypeN
|
||||||
Kub
|
Kub
|
||||||
Kubo
|
Kubo
|
||||||
|
Kuksenok
|
||||||
Kumagai
|
Kumagai
|
||||||
Kumar
|
Kumar
|
||||||
Kurebayashi
|
Kurebayashi
|
||||||
@ -2086,6 +2091,7 @@ Mishin
|
|||||||
Mishra
|
Mishra
|
||||||
mistyped
|
mistyped
|
||||||
mistyrose
|
mistyrose
|
||||||
|
Miyazaki
|
||||||
Mj
|
Mj
|
||||||
mK
|
mK
|
||||||
mkdir
|
mkdir
|
||||||
@ -2486,6 +2492,7 @@ ohenrich
|
|||||||
ok
|
ok
|
||||||
Okabe
|
Okabe
|
||||||
Okamoto
|
Okamoto
|
||||||
|
Okazaki
|
||||||
O'Keefe
|
O'Keefe
|
||||||
OKeefe
|
OKeefe
|
||||||
oldlace
|
oldlace
|
||||||
@ -2701,6 +2708,7 @@ polydispersity
|
|||||||
polyelectrolyte
|
polyelectrolyte
|
||||||
polyhedra
|
polyhedra
|
||||||
Polym
|
Polym
|
||||||
|
polymorph
|
||||||
polymorphism
|
polymorphism
|
||||||
Ponder
|
Ponder
|
||||||
popen
|
popen
|
||||||
@ -2753,6 +2761,7 @@ pscrozi
|
|||||||
pseudodynamics
|
pseudodynamics
|
||||||
pseudopotential
|
pseudopotential
|
||||||
pSp
|
pSp
|
||||||
|
pSPICA
|
||||||
Pstart
|
Pstart
|
||||||
Pstop
|
Pstop
|
||||||
pstyle
|
pstyle
|
||||||
@ -3115,6 +3124,7 @@ semiaxes
|
|||||||
semimetals
|
semimetals
|
||||||
Semin
|
Semin
|
||||||
Sensable
|
Sensable
|
||||||
|
Seo
|
||||||
Sep
|
Sep
|
||||||
seqdep
|
seqdep
|
||||||
Serpico
|
Serpico
|
||||||
@ -3226,6 +3236,8 @@ Spellmeyer
|
|||||||
Speybroeck
|
Speybroeck
|
||||||
sph
|
sph
|
||||||
SPH
|
SPH
|
||||||
|
spica
|
||||||
|
SPICA
|
||||||
Spickermann
|
Spickermann
|
||||||
splined
|
splined
|
||||||
spparks
|
spparks
|
||||||
@ -3454,6 +3466,7 @@ tmin
|
|||||||
Tmin
|
Tmin
|
||||||
tmp
|
tmp
|
||||||
tN
|
tN
|
||||||
|
tnumeric
|
||||||
Tobias
|
Tobias
|
||||||
Toennies
|
Toennies
|
||||||
Tohoku
|
Tohoku
|
||||||
@ -3733,6 +3746,7 @@ wallstyle
|
|||||||
walltime
|
walltime
|
||||||
Waltham
|
Waltham
|
||||||
Waroquier
|
Waroquier
|
||||||
|
Wataru
|
||||||
wavepacket
|
wavepacket
|
||||||
wB
|
wB
|
||||||
Wbody
|
Wbody
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
LAMMPS CG-SDK example problems
|
LAMMPS CG-SPICA example problems
|
||||||
|
|
||||||
Each of these sub-directories contains a sample problem for the SDK
|
Each of these sub-directories contains a sample problem for
|
||||||
coarse grained MD potentials that you can run with LAMMPS.
|
the SPICA (formerly called SDK) coarse grained MD potentials
|
||||||
|
that you can run with LAMMPS.
|
||||||
|
|
||||||
These are the two sample systems
|
These are the two sample systems
|
||||||
|
|
||||||
@ -9,11 +10,11 @@ peg-verlet: coarse grained PEG surfactant/water mixture lamella
|
|||||||
verlet version
|
verlet version
|
||||||
this example uses the plain LJ term only, no charges.
|
this example uses the plain LJ term only, no charges.
|
||||||
two variants are provided regular harmonic angles and
|
two variants are provided regular harmonic angles and
|
||||||
the SDK variant that includes 1-3 LJ repulsion.
|
the SPICA variant that includes 1-3 LJ repulsion.
|
||||||
|
|
||||||
sds-monolayer: coarse grained SDS surfactant monolayers at water/vapor
|
sds-monolayer: coarse grained SDS surfactant monolayers at water/vapor
|
||||||
interface.
|
interface.
|
||||||
this example uses the SDK LJ term with coulomb and shows
|
this example uses the SPICA LJ term with coulomb and shows
|
||||||
how to use the combined coulomb style vs. hybrid/overlay
|
how to use the combined coulomb style vs. hybrid/overlay
|
||||||
with possible optimizations due to the small number of
|
with possible optimizations due to the small number of
|
||||||
charged particles in this system
|
charged particles in this system
|
||||||
@ -9,7 +9,7 @@ atom_style angle
|
|||||||
processors * * 1
|
processors * * 1
|
||||||
|
|
||||||
# read topology and force field
|
# read topology and force field
|
||||||
pair_style lj/sdk 15.0
|
pair_style lj/sdk 15.0 # compatible with "lj/spica"
|
||||||
bond_style harmonic
|
bond_style harmonic
|
||||||
angle_style harmonic
|
angle_style harmonic
|
||||||
special_bonds lj/coul 0.0 0.0 1.0
|
special_bonds lj/coul 0.0 0.0 1.0
|
||||||
@ -9,9 +9,9 @@ atom_style angle
|
|||||||
processors * * 1
|
processors * * 1
|
||||||
|
|
||||||
# read topology and force field
|
# read topology and force field
|
||||||
pair_style lj/sdk 15.0
|
pair_style lj/sdk 15.0 # compatible with "lj/spica"
|
||||||
bond_style harmonic
|
bond_style harmonic
|
||||||
angle_style sdk
|
angle_style sdk # compatible with "spica"
|
||||||
special_bonds lj/coul 0.0 0.0 1.0
|
special_bonds lj/coul 0.0 0.0 1.0
|
||||||
|
|
||||||
read_data data.pegc12e8.gz
|
read_data data.pegc12e8.gz
|
||||||
@ -5,9 +5,9 @@ dimension 3
|
|||||||
atom_style full
|
atom_style full
|
||||||
processors * * 1
|
processors * * 1
|
||||||
|
|
||||||
pair_style hybrid/overlay lj/sdk 15.0 coul/long 26.5
|
pair_style hybrid/overlay lj/sdk 15.0 coul/long 26.5 # "lj/sdk" is compatible with "lj/spica"
|
||||||
bond_style harmonic
|
bond_style harmonic
|
||||||
angle_style sdk
|
angle_style sdk # compatible with "spica"
|
||||||
special_bonds lj/coul 0.0 0.0 1.0
|
special_bonds lj/coul 0.0 0.0 1.0
|
||||||
|
|
||||||
read_data data.sds.gz
|
read_data data.sds.gz
|
||||||
@ -5,9 +5,9 @@ dimension 3
|
|||||||
atom_style full
|
atom_style full
|
||||||
processors * * 1
|
processors * * 1
|
||||||
|
|
||||||
pair_style lj/sdk/coul/long 15.0
|
pair_style lj/sdk/coul/long 15.0 # compatible with "lj/spica/coul/long"
|
||||||
bond_style harmonic
|
bond_style harmonic
|
||||||
angle_style sdk
|
angle_style sdk # compatible with "spica"
|
||||||
special_bonds lj/coul 0.0 0.0 1.0
|
special_bonds lj/coul 0.0 0.0 1.0
|
||||||
|
|
||||||
read_data data.sds.gz
|
read_data data.sds.gz
|
||||||
16
examples/PACKAGES/srp_react/README
Normal file
16
examples/PACKAGES/srp_react/README
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
This directory contains an input script for performing
|
||||||
|
simulations with the srp/react pair style. The pair style
|
||||||
|
srp/react interfaces fix bond/break and fix bond/create commands
|
||||||
|
with the segmental repulsive potential. This is useful in simulating
|
||||||
|
reactions with soft potentials such as DPD where minimizing
|
||||||
|
topological violations is important.
|
||||||
|
|
||||||
|
The input script in.srp_react is an example of a simulation of
|
||||||
|
a degrading nanogel particle. An initial equilibrated structure
|
||||||
|
of a nanogel particle (prior to degradation) is read from the
|
||||||
|
restart file. The degradation reaction is simulated via
|
||||||
|
the fix bond/break command. The simulation will generate the
|
||||||
|
file bonds_broken.txt containing the number of bonds
|
||||||
|
broken and fraction of bonds intact over the simulation time.
|
||||||
|
For more details see the LAMMPS online documentation and the
|
||||||
|
paper: Palkar, V., & Kuksenok, O. (2022). JPC B, 126, 336.
|
||||||
22959
examples/PACKAGES/srp_react/gel_equil.dat
Normal file
22959
examples/PACKAGES/srp_react/gel_equil.dat
Normal file
File diff suppressed because it is too large
Load Diff
95
examples/PACKAGES/srp_react/in.srp_react
Normal file
95
examples/PACKAGES/srp_react/in.srp_react
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
## srp_react example script
|
||||||
|
## Author: Vaibhav Palkar
|
||||||
|
##
|
||||||
|
## Simulates controlled degradation of a nanogel particle
|
||||||
|
## in a simulation box and prints statistics regarding
|
||||||
|
## the fraction of bonds broken over time.
|
||||||
|
|
||||||
|
variable rseeddpd equal 26817
|
||||||
|
variable rseedvel equal 5991
|
||||||
|
variable breakstep equal 10
|
||||||
|
variable probbreak equal 0.0009
|
||||||
|
variable rseedbreak equal 6777
|
||||||
|
|
||||||
|
# simulation time
|
||||||
|
#***********************************************
|
||||||
|
variable mainsteps equal 10000
|
||||||
|
|
||||||
|
# simulation setup
|
||||||
|
#***********************************************
|
||||||
|
units lj
|
||||||
|
atom_style molecular
|
||||||
|
boundary p p p
|
||||||
|
bond_style harmonic
|
||||||
|
#lattice fcc 3.0
|
||||||
|
comm_modify cutoff 4.0 vel yes
|
||||||
|
|
||||||
|
# initial nanogel
|
||||||
|
#***********************************************
|
||||||
|
read_data gel_equil.dat
|
||||||
|
|
||||||
|
# define groups, create solvent atoms
|
||||||
|
#**************************************************
|
||||||
|
group Npoly type 1 2 3 4
|
||||||
|
group water type 5
|
||||||
|
group N_all type 1 2 3 4 5
|
||||||
|
|
||||||
|
# density check
|
||||||
|
#***********************************************
|
||||||
|
variable N_atoms equal count(all)
|
||||||
|
variable tdens equal count(all)/vol
|
||||||
|
print "The system density is now ${tdens}"
|
||||||
|
|
||||||
|
# bond break settings
|
||||||
|
# #***********************************************
|
||||||
|
fix break N_all bond/break ${breakstep} 2 0 prob ${probbreak} ${rseedbreak}
|
||||||
|
|
||||||
|
# interaction parameter setting
|
||||||
|
#***********************************************
|
||||||
|
mass * 1.0
|
||||||
|
bond_coeff * 500.0 0.70
|
||||||
|
special_bonds lj 1 1 1
|
||||||
|
newton on
|
||||||
|
|
||||||
|
pair_style hybrid dpd 1.0 1.0 ${rseeddpd} srp/react 0.8 * mid break
|
||||||
|
#***********************************************
|
||||||
|
pair_coeff *5 *5 dpd 78.000 4.5 1.0
|
||||||
|
pair_coeff *4 5 dpd 79.500 4.5 1.0
|
||||||
|
pair_coeff *5 6 none
|
||||||
|
pair_coeff 6 6 srp/react 80.00 0.800
|
||||||
|
|
||||||
|
# initial velocity
|
||||||
|
#***********************************************
|
||||||
|
velocity all create 1.0 ${rseedvel} dist gaussian mom yes
|
||||||
|
|
||||||
|
# integrator control
|
||||||
|
#***********************************************
|
||||||
|
neighbor 0.3 bin
|
||||||
|
neigh_modify every 1 delay 5 check no
|
||||||
|
timestep 0.02
|
||||||
|
|
||||||
|
# Access variables of fix bond/break
|
||||||
|
#**********************************************
|
||||||
|
variable Nbreak equal f_break[2] # Number of bonds broken
|
||||||
|
variable TIME equal time
|
||||||
|
|
||||||
|
# ensemble setting
|
||||||
|
#***********************************************
|
||||||
|
fix 1 all nve
|
||||||
|
|
||||||
|
# print bonds breaking stats
|
||||||
|
# ***********************************************
|
||||||
|
variable TotBreak equal 100 # total breakable bonds in current system
|
||||||
|
fix print_bonds_broken all print 100 "${TIME} ${Nbreak} $((v_TotBreak-v_Nbreak)/v_TotBreak)" file bonds_broken.txt screen no title "time bonds_broken fraction_bonds_intact"
|
||||||
|
|
||||||
|
# thermo output
|
||||||
|
#***********************************************
|
||||||
|
thermo 100
|
||||||
|
thermo_style custom step temp pe ke etotal epair
|
||||||
|
thermo_modify flush yes norm no
|
||||||
|
|
||||||
|
reset_timestep 0
|
||||||
|
#dump 1 Npoly custom 5000 traj.lammpstrj id type x y z
|
||||||
|
#*********************************************
|
||||||
|
run ${mainsteps}
|
||||||
|
#***********************************************
|
||||||
@ -1,6 +1,9 @@
|
|||||||
# /* ----------------------------------------------------------------------
|
# /* ----------------------------------------------------------------------
|
||||||
# Generic Linux Makefile for HIP
|
# Generic Linux Makefile for HIP
|
||||||
# - export HIP_PLATFORM=amd (or nvcc) before execution
|
# - export HIP_PATH=/path/to/HIP/install path to the HIP implementation
|
||||||
|
# such as hipamd or CHIP-SPV.
|
||||||
|
# - export HIP_PLATFORM=<amd/nvcc/spirv> specify the HIP platform to use.
|
||||||
|
# Optional. If not set, will be determined by ${HIP_PATH}/bin/hipconfig.
|
||||||
# - change HIP_ARCH for your GPU
|
# - change HIP_ARCH for your GPU
|
||||||
# ------------------------------------------------------------------------- */
|
# ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -20,9 +23,21 @@ HIP_OPTS = -O3
|
|||||||
HIP_HOST_OPTS = -Wno-deprecated-declarations -fopenmp
|
HIP_HOST_OPTS = -Wno-deprecated-declarations -fopenmp
|
||||||
HIP_HOST_INCLUDE =
|
HIP_HOST_INCLUDE =
|
||||||
|
|
||||||
|
ifndef HIP_PATH
|
||||||
|
$(error HIP_PATH is not set)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef HIP_PLATFORM
|
||||||
|
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
|
||||||
|
endif
|
||||||
|
HIP_COMPILER=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
|
||||||
|
|
||||||
# use device sort
|
# use device sort
|
||||||
# requires linking with hipcc and hipCUB + (rocPRIM or CUB for AMD or Nvidia respectively)
|
# requires linking with hipcc and hipCUB + (rocPRIM or CUB for AMD or Nvidia respectively)
|
||||||
|
ifneq (spirv,$(HIP_PLATFORM))
|
||||||
|
# hipCUB not aviable for CHIP-SPV
|
||||||
HIP_HOST_OPTS += -DUSE_HIP_DEVICE_SORT
|
HIP_HOST_OPTS += -DUSE_HIP_DEVICE_SORT
|
||||||
|
endif
|
||||||
# path to cub
|
# path to cub
|
||||||
HIP_HOST_INCLUDE += -I./
|
HIP_HOST_INCLUDE += -I./
|
||||||
# path to hipcub
|
# path to hipcub
|
||||||
@ -36,12 +51,19 @@ endif
|
|||||||
# use mpi
|
# use mpi
|
||||||
HIP_HOST_OPTS += -DMPI_GERYON -DUCL_NO_EXIT
|
HIP_HOST_OPTS += -DMPI_GERYON -DUCL_NO_EXIT
|
||||||
# this settings should match LAMMPS Makefile
|
# this settings should match LAMMPS Makefile
|
||||||
MPI_COMP_OPTS = $(shell mpicxx --showme:compile)
|
# automatic flag detection for OpenMPI
|
||||||
|
ifeq ($(shell mpicxx --showme:compile >/dev/null 2>&1; echo $$?), 0)
|
||||||
|
MPI_COMP_OPTS = $(shell mpicxx --showme:compile) -DOMPI_SKIP_MPICXX=1
|
||||||
MPI_LINK_OPTS = $(shell mpicxx --showme:link)
|
MPI_LINK_OPTS = $(shell mpicxx --showme:link)
|
||||||
|
# automatic flag detection for MPICH
|
||||||
HIP_PATH ?= $(wildcard /opt/rocm/hip)
|
else ifeq ($(shell mpicxx -compile_info >/dev/null 2>&1; echo $$?),0)
|
||||||
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
|
MPI_COMP_OPTS = $(filter -I%,$(shell mpicxx -compile_info)) -DMPICH_IGNORE_CXX_SEEK
|
||||||
HIP_COMPILER=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
|
MPI_LINK_OPTS = $(filter -Wl%,$(shell mpicxx -link_info)) $(filter -L%,$(shell mpicxx -link_info)) $(filter -l%,$(shell mpicxx -link_info))
|
||||||
|
# for other MPI libs: must set flags manually, if needed
|
||||||
|
else
|
||||||
|
MPI_COMP_OPTS =
|
||||||
|
MPI_LINK_OPTS =
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (hcc,$(HIP_PLATFORM))
|
ifeq (hcc,$(HIP_PLATFORM))
|
||||||
# possible values: gfx803,gfx900,gfx906
|
# possible values: gfx803,gfx900,gfx906
|
||||||
@ -55,6 +77,8 @@ else ifeq (nvcc,$(HIP_PLATFORM))
|
|||||||
-gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_53,code=[sm_53,compute_53]\
|
-gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -gencode arch=compute_53,code=[sm_53,compute_53]\
|
||||||
-gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61] -gencode arch=compute_62,code=[sm_62,compute_62]\
|
-gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61] -gencode arch=compute_62,code=[sm_62,compute_62]\
|
||||||
-gencode arch=compute_70,code=[sm_70,compute_70] -gencode arch=compute_72,code=[sm_72,compute_72] -gencode arch=compute_75,code=[sm_75,compute_75]
|
-gencode arch=compute_70,code=[sm_70,compute_70] -gencode arch=compute_72,code=[sm_72,compute_72] -gencode arch=compute_75,code=[sm_75,compute_75]
|
||||||
|
else ifeq (spirv,$(HIP_PLATFORM))
|
||||||
|
HIP_ARCH = spirv
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BIN_DIR = .
|
BIN_DIR = .
|
||||||
@ -71,7 +95,15 @@ BSH = /bin/sh
|
|||||||
HIP_OPTS += -DUSE_HIP $(HIP_PRECISION)
|
HIP_OPTS += -DUSE_HIP $(HIP_PRECISION)
|
||||||
HIP_GPU_OPTS += $(HIP_OPTS) -I./
|
HIP_GPU_OPTS += $(HIP_OPTS) -I./
|
||||||
|
|
||||||
ifeq (clang,$(HIP_COMPILER))
|
ifeq (spirv,$(HIP_PLATFORM))
|
||||||
|
HIP_HOST_OPTS += -fPIC
|
||||||
|
HIP_GPU_CC = $(HIP_PATH)/bin/hipcc -c
|
||||||
|
HIP_GPU_OPTS_S =
|
||||||
|
HIP_GPU_OPTS_E =
|
||||||
|
HIP_KERNEL_SUFFIX = .cpp
|
||||||
|
HIP_LIBS_TARGET =
|
||||||
|
export HCC_AMDGPU_TARGET := $(HIP_ARCH)
|
||||||
|
else ifeq (clang,$(HIP_COMPILER))
|
||||||
HIP_HOST_OPTS += -fPIC
|
HIP_HOST_OPTS += -fPIC
|
||||||
HIP_GPU_CC = $(HIP_PATH)/bin/hipcc --genco
|
HIP_GPU_CC = $(HIP_PATH)/bin/hipcc --genco
|
||||||
HIP_GPU_OPTS_S = --offload-arch=$(HIP_ARCH)
|
HIP_GPU_OPTS_S = --offload-arch=$(HIP_ARCH)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk.cpp
|
lj_spica.cpp
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Class for acceleration of the lj/sdk/cut pair style
|
Class for acceleration of the lj/spica/cut pair style
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -14,14 +14,14 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#if defined(USE_OPENCL)
|
#if defined(USE_OPENCL)
|
||||||
#include "lj_sdk_cl.h"
|
#include "lj_spica_cl.h"
|
||||||
#elif defined(USE_CUDART)
|
#elif defined(USE_CUDART)
|
||||||
const char *lj_sdk=0;
|
const char *lj_spica=0;
|
||||||
#else
|
#else
|
||||||
#include "lj_sdk_cubin.h"
|
#include "lj_spica_cubin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lal_lj_sdk.h"
|
#include "lal_lj_spica.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
namespace LAMMPS_AL {
|
namespace LAMMPS_AL {
|
||||||
#define CGCMMT CGCMM<numtyp, acctyp>
|
#define CGCMMT CGCMM<numtyp, acctyp>
|
||||||
@ -53,33 +53,33 @@ int CGCMMT::init(const int ntypes, double **host_cutsq,
|
|||||||
const double gpu_split, FILE *_screen) {
|
const double gpu_split, FILE *_screen) {
|
||||||
int success;
|
int success;
|
||||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||||
_screen,lj_sdk,"k_lj_sdk");
|
_screen,lj_spica,"k_lj_spica");
|
||||||
if (success!=0)
|
if (success!=0)
|
||||||
return success;
|
return success;
|
||||||
|
|
||||||
// If atom type constants fit in shared memory use fast kernel
|
// If atom type constants fit in shared memory use fast kernel
|
||||||
int sdk_types=ntypes;
|
int spica_types=ntypes;
|
||||||
shared_types=false;
|
shared_types=false;
|
||||||
int max_shared_types=this->device->max_shared_types();
|
int max_shared_types=this->device->max_shared_types();
|
||||||
if (sdk_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
if (spica_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||||
sdk_types=max_shared_types;
|
spica_types=max_shared_types;
|
||||||
shared_types=true;
|
shared_types=true;
|
||||||
}
|
}
|
||||||
_sdk_types=sdk_types;
|
_spica_types=spica_types;
|
||||||
|
|
||||||
// Allocate a host write buffer for data initialization
|
// Allocate a host write buffer for data initialization
|
||||||
UCL_H_Vec<numtyp> host_write(sdk_types*sdk_types*32,*(this->ucl_device),
|
UCL_H_Vec<numtyp> host_write(spica_types*spica_types*32,*(this->ucl_device),
|
||||||
UCL_WRITE_ONLY);
|
UCL_WRITE_ONLY);
|
||||||
|
|
||||||
for (int i=0; i<sdk_types*sdk_types; i++)
|
for (int i=0; i<spica_types*spica_types; i++)
|
||||||
host_write[i]=0.0;
|
host_write[i]=0.0;
|
||||||
|
|
||||||
lj1.alloc(sdk_types*sdk_types,*(this->ucl_device),UCL_READ_ONLY);
|
lj1.alloc(spica_types*spica_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||||
this->atom->type_pack4(ntypes,sdk_types,lj1,host_write,host_cutsq,
|
this->atom->type_pack4(ntypes,spica_types,lj1,host_write,host_cutsq,
|
||||||
host_cg_type,host_lj1,host_lj2);
|
host_cg_type,host_lj1,host_lj2);
|
||||||
|
|
||||||
lj3.alloc(sdk_types*sdk_types,*(this->ucl_device),UCL_READ_ONLY);
|
lj3.alloc(spica_types*spica_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||||
this->atom->type_pack4(ntypes,sdk_types,lj3,host_write,host_lj3,host_lj4,
|
this->atom->type_pack4(ntypes,spica_types,lj3,host_write,host_lj3,host_lj4,
|
||||||
host_offset);
|
host_offset);
|
||||||
|
|
||||||
UCL_H_Vec<double> dview;
|
UCL_H_Vec<double> dview;
|
||||||
@ -132,7 +132,7 @@ int CGCMMT::loop(const int eflag, const int vflag) {
|
|||||||
} else {
|
} else {
|
||||||
this->k_pair.set_size(GX,BX);
|
this->k_pair.set_size(GX,BX);
|
||||||
this->k_pair.run(&this->atom->x, &lj1, &lj3,
|
this->k_pair.run(&this->atom->x, &lj1, &lj3,
|
||||||
&_sdk_types, &sp_lj, &this->nbor->dev_nbor,
|
&_spica_types, &sp_lj, &this->nbor->dev_nbor,
|
||||||
&this->_nbor_data->begin(), &this->ans->force,
|
&this->_nbor_data->begin(), &this->ans->force,
|
||||||
&this->ans->engv, &eflag, &vflag, &ainum,
|
&this->ans->engv, &eflag, &vflag, &ainum,
|
||||||
&nbor_pitch, &this->_threads_per_atom);
|
&nbor_pitch, &this->_threads_per_atom);
|
||||||
@ -1,9 +1,9 @@
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// lj_sdk.cu
|
// lj_spica.cu
|
||||||
// -------------------
|
// -------------------
|
||||||
// W. Michael Brown (ORNL)
|
// W. Michael Brown (ORNL)
|
||||||
//
|
//
|
||||||
// Device code for acceleration of the lj/sdk pair style
|
// Device code for acceleration of the lj/spica pair style
|
||||||
//
|
//
|
||||||
// __________________________________________________________________________
|
// __________________________________________________________________________
|
||||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -24,7 +24,7 @@ _texture_2d( pos_tex,int4);
|
|||||||
#define pos_tex x_
|
#define pos_tex x_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__kernel void k_lj_sdk(const __global numtyp4 *restrict x_,
|
__kernel void k_lj_spica(const __global numtyp4 *restrict x_,
|
||||||
const __global numtyp4 *restrict lj1,
|
const __global numtyp4 *restrict lj1,
|
||||||
const __global numtyp4 *restrict lj3,
|
const __global numtyp4 *restrict lj3,
|
||||||
const int lj_types,
|
const int lj_types,
|
||||||
@ -91,6 +91,9 @@ __kernel void k_lj_sdk(const __global numtyp4 *restrict x_,
|
|||||||
} else if (lj1[mtype].y == 1) {
|
} else if (lj1[mtype].y == 1) {
|
||||||
inv2=r2inv*ucl_sqrt(r2inv);
|
inv2=r2inv*ucl_sqrt(r2inv);
|
||||||
inv1=inv2*inv2;
|
inv1=inv2*inv2;
|
||||||
|
} else if (lj1[mtype].y == 4) {
|
||||||
|
inv1=r2inv*r2inv*ucl_sqrt(r2inv);
|
||||||
|
inv2=inv1*r2inv;
|
||||||
} else {
|
} else {
|
||||||
inv1=r2inv*r2inv*r2inv;
|
inv1=r2inv*r2inv*r2inv;
|
||||||
inv2=inv1;
|
inv2=inv1;
|
||||||
@ -119,7 +122,7 @@ __kernel void k_lj_sdk(const __global numtyp4 *restrict x_,
|
|||||||
ans,engv);
|
ans,engv);
|
||||||
}
|
}
|
||||||
|
|
||||||
__kernel void k_lj_sdk_fast(const __global numtyp4 *restrict x_,
|
__kernel void k_lj_spica_fast(const __global numtyp4 *restrict x_,
|
||||||
const __global numtyp4 *restrict lj1_in,
|
const __global numtyp4 *restrict lj1_in,
|
||||||
const __global numtyp4 *restrict lj3_in,
|
const __global numtyp4 *restrict lj3_in,
|
||||||
const __global numtyp *restrict sp_lj_in,
|
const __global numtyp *restrict sp_lj_in,
|
||||||
@ -192,6 +195,9 @@ __kernel void k_lj_sdk_fast(const __global numtyp4 *restrict x_,
|
|||||||
} else if (lj1[mtype].y == (numtyp)1) {
|
} else if (lj1[mtype].y == (numtyp)1) {
|
||||||
inv2=r2inv*ucl_sqrt(r2inv);
|
inv2=r2inv*ucl_sqrt(r2inv);
|
||||||
inv1=inv2*inv2;
|
inv1=inv2*inv2;
|
||||||
|
} else if (lj1[mtype].y == (numtyp)4) {
|
||||||
|
inv1=r2inv*r2inv*ucl_sqrt(r2inv);
|
||||||
|
inv2=inv1*r2inv;
|
||||||
} else {
|
} else {
|
||||||
inv1=r2inv*r2inv*r2inv;
|
inv1=r2inv*r2inv*r2inv;
|
||||||
inv2=inv1;
|
inv2=inv1;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk.h
|
lj_spica.h
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Class for acceleration of the lj/sdk pair style
|
Class for acceleration of the lj/spica pair style
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -67,7 +67,7 @@ class CGCMM : public BaseAtomic<numtyp, acctyp> {
|
|||||||
bool shared_types;
|
bool shared_types;
|
||||||
|
|
||||||
/// Number of atom types
|
/// Number of atom types
|
||||||
int _sdk_types;
|
int _spica_types;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _allocated;
|
bool _allocated;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk.h
|
lj_spica.h
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Functions for LAMMPS access to lj/sdk pair acceleration routines
|
Functions for LAMMPS access to lj/spica pair acceleration routines
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "lal_lj_sdk.h"
|
#include "lal_lj_spica.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace LAMMPS_AL;
|
using namespace LAMMPS_AL;
|
||||||
@ -27,7 +27,7 @@ static CGCMM<PRECISION,ACC_PRECISION> CMMMF;
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Allocate memory on host and device and copy constants to device
|
// Allocate memory on host and device and copy constants to device
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
int sdk_gpu_init(const int ntypes, double **cutsq, int **cg_types,
|
int spica_gpu_init(const int ntypes, double **cutsq, int **cg_types,
|
||||||
double **host_lj1, double **host_lj2, double **host_lj3,
|
double **host_lj1, double **host_lj2, double **host_lj3,
|
||||||
double **host_lj4, double **offset, double *special_lj,
|
double **host_lj4, double **offset, double *special_lj,
|
||||||
const int inum, const int nall, const int max_nbors,
|
const int inum, const int nall, const int max_nbors,
|
||||||
@ -42,7 +42,7 @@ int sdk_gpu_init(const int ntypes, double **cutsq, int **cg_types,
|
|||||||
int gpu_rank=CMMMF.device->gpu_rank();
|
int gpu_rank=CMMMF.device->gpu_rank();
|
||||||
int procs_per_gpu=CMMMF.device->procs_per_gpu();
|
int procs_per_gpu=CMMMF.device->procs_per_gpu();
|
||||||
|
|
||||||
CMMMF.device->init_message(screen,"lj/sdk",first_gpu,last_gpu);
|
CMMMF.device->init_message(screen,"lj/spica",first_gpu,last_gpu);
|
||||||
|
|
||||||
bool message=false;
|
bool message=false;
|
||||||
if (CMMMF.device->replica_me()==0 && screen)
|
if (CMMMF.device->replica_me()==0 && screen)
|
||||||
@ -89,11 +89,11 @@ int sdk_gpu_init(const int ntypes, double **cutsq, int **cg_types,
|
|||||||
return init_ok;
|
return init_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdk_gpu_clear() {
|
void spica_gpu_clear() {
|
||||||
CMMMF.clear();
|
CMMMF.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
int** sdk_gpu_compute_n(const int ago, const int inum_full,
|
int** spica_gpu_compute_n(const int ago, const int inum_full,
|
||||||
const int nall, double **host_x, int *host_type,
|
const int nall, double **host_x, int *host_type,
|
||||||
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
||||||
tagint **special, const bool eflag, const bool vflag,
|
tagint **special, const bool eflag, const bool vflag,
|
||||||
@ -105,7 +105,7 @@ int** sdk_gpu_compute_n(const int ago, const int inum_full,
|
|||||||
vatom, host_start, ilist, jnum, cpu_time, success);
|
vatom, host_start, ilist, jnum, cpu_time, success);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdk_gpu_compute(const int ago, const int inum_full, const int nall,
|
void spica_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||||
double **host_x, int *host_type, int *ilist, int *numj,
|
double **host_x, int *host_type, int *ilist, int *numj,
|
||||||
int **firstneigh, const bool eflag, const bool vflag,
|
int **firstneigh, const bool eflag, const bool vflag,
|
||||||
const bool eatom, const bool vatom, int &host_start,
|
const bool eatom, const bool vatom, int &host_start,
|
||||||
@ -114,7 +114,7 @@ void sdk_gpu_compute(const int ago, const int inum_full, const int nall,
|
|||||||
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success);
|
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success);
|
||||||
}
|
}
|
||||||
|
|
||||||
double sdk_gpu_bytes() {
|
double spica_gpu_bytes() {
|
||||||
return CMMMF.host_memory_usage();
|
return CMMMF.host_memory_usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk_long.cpp
|
lj_spica_long.cpp
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Class for acceleration of the lj/sdk/coul/long pair style
|
Class for acceleration of the lj/spica/coul/long pair style
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -14,14 +14,14 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#if defined(USE_OPENCL)
|
#if defined(USE_OPENCL)
|
||||||
#include "lj_sdk_long_cl.h"
|
#include "lj_spica_long_cl.h"
|
||||||
#elif defined(USE_CUDART)
|
#elif defined(USE_CUDART)
|
||||||
const char *lj_sdk_long=0;
|
const char *lj_spica_long=0;
|
||||||
#else
|
#else
|
||||||
#include "lj_sdk_long_cubin.h"
|
#include "lj_spica_long_cubin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lal_lj_sdk_long.h"
|
#include "lal_lj_spica_long.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
namespace LAMMPS_AL {
|
namespace LAMMPS_AL {
|
||||||
#define CGCMMLongT CGCMMLong<numtyp, acctyp>
|
#define CGCMMLongT CGCMMLong<numtyp, acctyp>
|
||||||
@ -58,7 +58,7 @@ int CGCMMLongT::init(const int ntypes, double **host_cutsq,
|
|||||||
const double g_ewald) {
|
const double g_ewald) {
|
||||||
int success;
|
int success;
|
||||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||||
_screen,lj_sdk_long,"k_lj_sdk_long");
|
_screen,lj_spica_long,"k_lj_spica_long");
|
||||||
if (success!=0)
|
if (success!=0)
|
||||||
return success;
|
return success;
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// lj_sdk_long.cu
|
// lj_spica_long.cu
|
||||||
// -------------------
|
// -------------------
|
||||||
// W. Michael Brown (ORNL)
|
// W. Michael Brown (ORNL)
|
||||||
//
|
//
|
||||||
// Device code for acceleration of the lj/sdk/coul/long pair style
|
// Device code for acceleration of the lj/spica/coul/long pair style
|
||||||
//
|
//
|
||||||
// __________________________________________________________________________
|
// __________________________________________________________________________
|
||||||
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -29,7 +29,7 @@ _texture( q_tex,int2);
|
|||||||
#define q_tex q_
|
#define q_tex q_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__kernel void k_lj_sdk_long(const __global numtyp4 *restrict x_,
|
__kernel void k_lj_spica_long(const __global numtyp4 *restrict x_,
|
||||||
const __global numtyp4 *restrict lj1,
|
const __global numtyp4 *restrict lj1,
|
||||||
const __global numtyp4 *restrict lj3,
|
const __global numtyp4 *restrict lj3,
|
||||||
const int lj_types,
|
const int lj_types,
|
||||||
@ -107,6 +107,9 @@ __kernel void k_lj_sdk_long(const __global numtyp4 *restrict x_,
|
|||||||
} else if (lj3[mtype].x == (numtyp)1) {
|
} else if (lj3[mtype].x == (numtyp)1) {
|
||||||
inv2=r2inv*ucl_rsqrt(rsq);
|
inv2=r2inv*ucl_rsqrt(rsq);
|
||||||
inv1=inv2*inv2;
|
inv1=inv2*inv2;
|
||||||
|
} else if (lj3[mtype].x == (numtyp)4) {
|
||||||
|
inv1=r2inv*r2inv*ucl_rsqrt(rsq);
|
||||||
|
inv2=inv1*r2inv;
|
||||||
} else {
|
} else {
|
||||||
inv1=r2inv*r2inv*r2inv;
|
inv1=r2inv*r2inv*r2inv;
|
||||||
inv2=inv1;
|
inv2=inv1;
|
||||||
@ -157,7 +160,7 @@ __kernel void k_lj_sdk_long(const __global numtyp4 *restrict x_,
|
|||||||
vflag,ans,engv);
|
vflag,ans,engv);
|
||||||
}
|
}
|
||||||
|
|
||||||
__kernel void k_lj_sdk_long_fast(const __global numtyp4 *restrict x_,
|
__kernel void k_lj_spica_long_fast(const __global numtyp4 *restrict x_,
|
||||||
const __global numtyp4 *restrict lj1_in,
|
const __global numtyp4 *restrict lj1_in,
|
||||||
const __global numtyp4 *restrict lj3_in,
|
const __global numtyp4 *restrict lj3_in,
|
||||||
const __global numtyp *restrict sp_lj_in,
|
const __global numtyp *restrict sp_lj_in,
|
||||||
@ -236,6 +239,9 @@ __kernel void k_lj_sdk_long_fast(const __global numtyp4 *restrict x_,
|
|||||||
} else if (lj3[mtype].x == (numtyp)1) {
|
} else if (lj3[mtype].x == (numtyp)1) {
|
||||||
inv2=r2inv*ucl_rsqrt(rsq);
|
inv2=r2inv*ucl_rsqrt(rsq);
|
||||||
inv1=inv2*inv2;
|
inv1=inv2*inv2;
|
||||||
|
} else if (lj3[mtype].x == (numtyp)4) {
|
||||||
|
inv1=r2inv*r2inv*ucl_rsqrt(rsq);
|
||||||
|
inv2=inv1*r2inv;
|
||||||
} else {
|
} else {
|
||||||
inv1=r2inv*r2inv*r2inv;
|
inv1=r2inv*r2inv*r2inv;
|
||||||
inv2=inv1;
|
inv2=inv1;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk_long.h
|
lj_spica_long.h
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Class for acceleration of the lj/sdk/coul/long pair style
|
Class for acceleration of the lj/spica/coul/long pair style
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -1,9 +1,9 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
lj_sdk_long.h
|
lj_spica_long.h
|
||||||
-------------------
|
-------------------
|
||||||
W. Michael Brown (ORNL)
|
W. Michael Brown (ORNL)
|
||||||
|
|
||||||
Functions for LAMMPS access to lj/sdk/coul/long acceleration functions
|
Functions for LAMMPS access to lj/spica/coul/long acceleration functions
|
||||||
|
|
||||||
__________________________________________________________________________
|
__________________________________________________________________________
|
||||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "lal_lj_sdk_long.h"
|
#include "lal_lj_spica_long.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace LAMMPS_AL;
|
using namespace LAMMPS_AL;
|
||||||
@ -27,7 +27,7 @@ static CGCMMLong<PRECISION,ACC_PRECISION> CMMLMF;
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Allocate memory on host and device and copy constants to device
|
// Allocate memory on host and device and copy constants to device
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
int sdkl_gpu_init(const int ntypes, double **cutsq, int **cg_type,
|
int spical_gpu_init(const int ntypes, double **cutsq, int **cg_type,
|
||||||
double **host_lj1, double **host_lj2, double **host_lj3,
|
double **host_lj1, double **host_lj2, double **host_lj3,
|
||||||
double **host_lj4, double **offset, double *special_lj,
|
double **host_lj4, double **offset, double *special_lj,
|
||||||
const int inum, const int nall, const int max_nbors,
|
const int inum, const int nall, const int max_nbors,
|
||||||
@ -44,7 +44,7 @@ int sdkl_gpu_init(const int ntypes, double **cutsq, int **cg_type,
|
|||||||
int gpu_rank=CMMLMF.device->gpu_rank();
|
int gpu_rank=CMMLMF.device->gpu_rank();
|
||||||
int procs_per_gpu=CMMLMF.device->procs_per_gpu();
|
int procs_per_gpu=CMMLMF.device->procs_per_gpu();
|
||||||
|
|
||||||
CMMLMF.device->init_message(screen,"lj/sdk/coul/long",first_gpu,last_gpu);
|
CMMLMF.device->init_message(screen,"lj/spica/coul/long",first_gpu,last_gpu);
|
||||||
|
|
||||||
bool message=false;
|
bool message=false;
|
||||||
if (CMMLMF.device->replica_me()==0 && screen)
|
if (CMMLMF.device->replica_me()==0 && screen)
|
||||||
@ -93,11 +93,11 @@ int sdkl_gpu_init(const int ntypes, double **cutsq, int **cg_type,
|
|||||||
return init_ok;
|
return init_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdkl_gpu_clear() {
|
void spical_gpu_clear() {
|
||||||
CMMLMF.clear();
|
CMMLMF.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
int** sdkl_gpu_compute_n(const int ago, const int inum_full,
|
int** spical_gpu_compute_n(const int ago, const int inum_full,
|
||||||
const int nall, double **host_x, int *host_type,
|
const int nall, double **host_x, int *host_type,
|
||||||
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
||||||
tagint **special, const bool eflag, const bool vflag,
|
tagint **special, const bool eflag, const bool vflag,
|
||||||
@ -111,7 +111,7 @@ int** sdkl_gpu_compute_n(const int ago, const int inum_full,
|
|||||||
host_q,boxlo,prd);
|
host_q,boxlo,prd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdkl_gpu_compute(const int ago, const int inum_full, const int nall,
|
void spical_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||||
double **host_x, int *host_type, int *ilist, int *numj,
|
double **host_x, int *host_type, int *ilist, int *numj,
|
||||||
int **firstneigh, const bool eflag, const bool vflag,
|
int **firstneigh, const bool eflag, const bool vflag,
|
||||||
const bool eatom, const bool vatom, int &host_start,
|
const bool eatom, const bool vatom, int &host_start,
|
||||||
@ -122,7 +122,7 @@ void sdkl_gpu_compute(const int ago, const int inum_full, const int nall,
|
|||||||
host_q,nlocal,boxlo,prd);
|
host_q,nlocal,boxlo,prd);
|
||||||
}
|
}
|
||||||
|
|
||||||
double sdkl_gpu_bytes() {
|
double spical_gpu_bytes() {
|
||||||
return CMMLMF.host_memory_usage();
|
return CMMLMF.host_memory_usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)
|
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_SPIRV__)
|
||||||
#define CONFIG_ID 303
|
#define CONFIG_ID 303
|
||||||
#define SIMD_SIZE 64
|
#define SIMD_SIZE 64
|
||||||
#else
|
#else
|
||||||
@ -112,7 +112,7 @@
|
|||||||
// KERNEL MACROS - TEXTURES
|
// KERNEL MACROS - TEXTURES
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)
|
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_SPIRV__)
|
||||||
#define _texture(name, type) __device__ type* name
|
#define _texture(name, type) __device__ type* name
|
||||||
#define _texture_2d(name, type) __device__ type* name
|
#define _texture_2d(name, type) __device__ type* name
|
||||||
#else
|
#else
|
||||||
@ -134,6 +134,9 @@
|
|||||||
int2 qt = tex1Dfetch(q_tex,i); \
|
int2 qt = tex1Dfetch(q_tex,i); \
|
||||||
ans=__hiloint2double(qt.y, qt.x); \
|
ans=__hiloint2double(qt.y, qt.x); \
|
||||||
}
|
}
|
||||||
|
#elseif defined(__HIP_PLATFORM_SPIRV__)
|
||||||
|
#define fetch4(ans,i,pos_tex) tex1Dfetch(&ans, pos_tex, i);
|
||||||
|
#define fetch(ans,i,q_tex) tex1Dfetch(&ans, q_tex,i);
|
||||||
#else
|
#else
|
||||||
#define fetch4(ans,i,pos_tex) ans=tex1Dfetch(pos_tex, i);
|
#define fetch4(ans,i,pos_tex) ans=tex1Dfetch(pos_tex, i);
|
||||||
#define fetch(ans,i,q_tex) ans=tex1Dfetch(q_tex,i);
|
#define fetch(ans,i,q_tex) ans=tex1Dfetch(q_tex,i);
|
||||||
@ -152,7 +155,7 @@
|
|||||||
#define mu_tex mu_
|
#define mu_tex mu_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)
|
#if defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_SPIRV__)
|
||||||
|
|
||||||
#undef fetch4
|
#undef fetch4
|
||||||
#undef fetch
|
#undef fetch
|
||||||
@ -209,7 +212,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CUDA_PRE_NINE) || defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)
|
#if defined(CUDA_PRE_NINE) || defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_SPIRV__)
|
||||||
|
|
||||||
#ifdef _SINGLE_SINGLE
|
#ifdef _SINGLE_SINGLE
|
||||||
#define shfl_down __shfl_down
|
#define shfl_down __shfl_down
|
||||||
|
|||||||
@ -306,13 +306,13 @@ do
|
|||||||
-A)
|
-A)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
#strip of -std=c++98 due to nvcc warnings and Tribits will place both -std=c++11 and -std=c++98
|
#strip off -std=c++98 due to nvcc warnings and Tribits will place both -std=c++11 and -std=c++98
|
||||||
-std=c++98|--std=c++98)
|
-std=c++98|--std=c++98)
|
||||||
;;
|
;;
|
||||||
#strip of pedantic because it produces endless warnings about #LINE added by the preprocessor
|
#strip off pedantic because it produces endless warnings about #LINE added by the preprocessor
|
||||||
-pedantic|-Wpedantic|-ansi)
|
-pedantic|-pedantic-errors|-Wpedantic|-ansi)
|
||||||
;;
|
;;
|
||||||
#strip of -Woverloaded-virtual to avoid "cc1: warning: command line option ‘-Woverloaded-virtual’ is valid for C++/ObjC++ but not for C"
|
#strip off -Woverloaded-virtual to avoid "cc1: warning: command line option ‘-Woverloaded-virtual’ is valid for C++/ObjC++ but not for C"
|
||||||
-Woverloaded-virtual)
|
-Woverloaded-virtual)
|
||||||
;;
|
;;
|
||||||
#strip -Xcompiler because we add it
|
#strip -Xcompiler because we add it
|
||||||
|
|||||||
@ -54,8 +54,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level1
|
*> \ingroup double_blas_level1
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -71,10 +69,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
|
DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level1 routine (version 3.7.0) --
|
* -- Reference BLAS level1 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INCX,N
|
INTEGER INCX,N
|
||||||
@ -128,4 +125,7 @@
|
|||||||
END IF
|
END IF
|
||||||
DASUM = DTEMP
|
DASUM = DTEMP
|
||||||
RETURN
|
RETURN
|
||||||
|
*
|
||||||
|
* End of DASUM
|
||||||
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -73,8 +73,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level1
|
*> \ingroup double_blas_level1
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -89,10 +87,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
|
SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level1 routine (version 3.7.0) --
|
* -- Reference BLAS level1 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
DOUBLE PRECISION DA
|
DOUBLE PRECISION DA
|
||||||
@ -149,4 +146,7 @@
|
|||||||
END DO
|
END DO
|
||||||
END IF
|
END IF
|
||||||
RETURN
|
RETURN
|
||||||
|
*
|
||||||
|
* End of DAXPY
|
||||||
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -166,7 +166,7 @@
|
|||||||
*>
|
*>
|
||||||
*> \param[out] WORK
|
*> \param[out] WORK
|
||||||
*> \verbatim
|
*> \verbatim
|
||||||
*> WORK is DOUBLE PRECISION array, dimension (4*N)
|
*> WORK is DOUBLE PRECISION array, dimension (4*(N-1))
|
||||||
*> \endverbatim
|
*> \endverbatim
|
||||||
*>
|
*>
|
||||||
*> \param[out] INFO
|
*> \param[out] INFO
|
||||||
@ -233,18 +233,15 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2017
|
|
||||||
*
|
|
||||||
*> \ingroup auxOTHERcomputational
|
*> \ingroup auxOTHERcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
|
SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
|
||||||
$ LDU, C, LDC, WORK, INFO )
|
$ LDU, C, LDC, WORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.1) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2017
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
CHARACTER UPLO
|
CHARACTER UPLO
|
||||||
|
|||||||
@ -40,17 +40,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level1
|
*> \ingroup double_blas_level1
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
DOUBLE PRECISION FUNCTION DCABS1(Z)
|
DOUBLE PRECISION FUNCTION DCABS1(Z)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level1 routine (version 3.7.0) --
|
* -- Reference BLAS level1 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
COMPLEX*16 Z
|
COMPLEX*16 Z
|
||||||
@ -63,4 +60,7 @@
|
|||||||
*
|
*
|
||||||
DCABS1 = ABS(DBLE(Z)) + ABS(DIMAG(Z))
|
DCABS1 = ABS(DBLE(Z)) + ABS(DIMAG(Z))
|
||||||
RETURN
|
RETURN
|
||||||
|
*
|
||||||
|
* End of DCABS1
|
||||||
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -66,8 +66,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level1
|
*> \ingroup double_blas_level1
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -82,10 +80,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
|
SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level1 routine (version 3.7.0) --
|
* -- Reference BLAS level1 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INCX,INCY,N
|
INTEGER INCX,INCY,N
|
||||||
@ -143,4 +140,7 @@
|
|||||||
END DO
|
END DO
|
||||||
END IF
|
END IF
|
||||||
RETURN
|
RETURN
|
||||||
|
*
|
||||||
|
* End of DCOPY
|
||||||
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -66,8 +66,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level1
|
*> \ingroup double_blas_level1
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -82,10 +80,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
|
DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level1 routine (version 3.7.0) --
|
* -- Reference BLAS level1 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INCX,INCY,N
|
INTEGER INCX,INCY,N
|
||||||
@ -145,4 +142,7 @@
|
|||||||
END IF
|
END IF
|
||||||
DDOT = DTEMP
|
DDOT = DTEMP
|
||||||
RETURN
|
RETURN
|
||||||
|
*
|
||||||
|
* End of DDOT
|
||||||
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -132,8 +132,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2017
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -189,10 +187,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
|
SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.1) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2017
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -147,8 +147,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2017
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -205,10 +203,9 @@
|
|||||||
SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
|
SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
|
||||||
$ INFO )
|
$ INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.1) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2017
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LWORK, M, N
|
INTEGER INFO, LDA, LWORK, M, N
|
||||||
@ -227,8 +224,7 @@
|
|||||||
* .. Local Scalars ..
|
* .. Local Scalars ..
|
||||||
LOGICAL LQUERY
|
LOGICAL LQUERY
|
||||||
INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
|
INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
|
||||||
$ NBMIN, NX
|
$ NBMIN, NX, WS
|
||||||
DOUBLE PRECISION WS
|
|
||||||
* ..
|
* ..
|
||||||
* .. External Subroutines ..
|
* .. External Subroutines ..
|
||||||
EXTERNAL DGEBD2, DGEMM, DLABRD, XERBLA
|
EXTERNAL DGEBD2, DGEMM, DLABRD, XERBLA
|
||||||
|
|||||||
@ -116,18 +116,15 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
|
SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
|
||||||
$ INFO )
|
$ INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
CHARACTER NORM
|
CHARACTER NORM
|
||||||
|
|||||||
@ -33,8 +33,16 @@
|
|||||||
*>
|
*>
|
||||||
*> \verbatim
|
*> \verbatim
|
||||||
*>
|
*>
|
||||||
*> DGELQ2 computes an LQ factorization of a real m by n matrix A:
|
*> DGELQ2 computes an LQ factorization of a real m-by-n matrix A:
|
||||||
*> A = L * Q.
|
*>
|
||||||
|
*> A = ( L 0 ) * Q
|
||||||
|
*>
|
||||||
|
*> where:
|
||||||
|
*>
|
||||||
|
*> Q is a n-by-n orthogonal matrix;
|
||||||
|
*> L is a lower-triangular m-by-m matrix;
|
||||||
|
*> 0 is a m-by-(n-m) zero matrix, if m < n.
|
||||||
|
*>
|
||||||
*> \endverbatim
|
*> \endverbatim
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -96,8 +104,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -121,10 +127,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
|
SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -34,7 +34,15 @@
|
|||||||
*> \verbatim
|
*> \verbatim
|
||||||
*>
|
*>
|
||||||
*> DGELQF computes an LQ factorization of a real M-by-N matrix A:
|
*> DGELQF computes an LQ factorization of a real M-by-N matrix A:
|
||||||
*> A = L * Q.
|
*>
|
||||||
|
*> A = ( L 0 ) * Q
|
||||||
|
*>
|
||||||
|
*> where:
|
||||||
|
*>
|
||||||
|
*> Q is a N-by-N orthogonal matrix;
|
||||||
|
*> L is a lower-triangular M-by-M matrix;
|
||||||
|
*> 0 is a M-by-(N-M) zero matrix, if M < N.
|
||||||
|
*>
|
||||||
*> \endverbatim
|
*> \endverbatim
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -110,8 +118,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -135,10 +141,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
|
SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LWORK, M, N
|
INTEGER INFO, LDA, LWORK, M, N
|
||||||
|
|||||||
@ -194,8 +194,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2017
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEsolve
|
*> \ingroup doubleGEsolve
|
||||||
*
|
*
|
||||||
*> \par Contributors:
|
*> \par Contributors:
|
||||||
@ -209,10 +207,9 @@
|
|||||||
SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
|
SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
|
||||||
$ WORK, LWORK, IWORK, INFO )
|
$ WORK, LWORK, IWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK driver routine (version 3.7.1) --
|
* -- LAPACK driver routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2017
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
|
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
|
||||||
|
|||||||
@ -164,18 +164,15 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEsolve
|
*> \ingroup doubleGEsolve
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
|
SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
|
||||||
$ WORK, LWORK, INFO )
|
$ WORK, LWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK driver routine (version 3.7.0) --
|
* -- LAPACK driver routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
|
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
|
||||||
|
|||||||
@ -166,8 +166,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level3
|
*> \ingroup double_blas_level3
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -187,10 +185,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level3 routine (version 3.7.0) --
|
* -- Reference BLAS level3 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
DOUBLE PRECISION ALPHA,BETA
|
DOUBLE PRECISION ALPHA,BETA
|
||||||
@ -215,7 +212,7 @@
|
|||||||
* ..
|
* ..
|
||||||
* .. Local Scalars ..
|
* .. Local Scalars ..
|
||||||
DOUBLE PRECISION TEMP
|
DOUBLE PRECISION TEMP
|
||||||
INTEGER I,INFO,J,L,NCOLA,NROWA,NROWB
|
INTEGER I,INFO,J,L,NROWA,NROWB
|
||||||
LOGICAL NOTA,NOTB
|
LOGICAL NOTA,NOTB
|
||||||
* ..
|
* ..
|
||||||
* .. Parameters ..
|
* .. Parameters ..
|
||||||
@ -224,17 +221,15 @@
|
|||||||
* ..
|
* ..
|
||||||
*
|
*
|
||||||
* Set NOTA and NOTB as true if A and B respectively are not
|
* Set NOTA and NOTB as true if A and B respectively are not
|
||||||
* transposed and set NROWA, NCOLA and NROWB as the number of rows
|
* transposed and set NROWA and NROWB as the number of rows of A
|
||||||
* and columns of A and the number of rows of B respectively.
|
* and B respectively.
|
||||||
*
|
*
|
||||||
NOTA = LSAME(TRANSA,'N')
|
NOTA = LSAME(TRANSA,'N')
|
||||||
NOTB = LSAME(TRANSB,'N')
|
NOTB = LSAME(TRANSB,'N')
|
||||||
IF (NOTA) THEN
|
IF (NOTA) THEN
|
||||||
NROWA = M
|
NROWA = M
|
||||||
NCOLA = K
|
|
||||||
ELSE
|
ELSE
|
||||||
NROWA = K
|
NROWA = K
|
||||||
NCOLA = M
|
|
||||||
END IF
|
END IF
|
||||||
IF (NOTB) THEN
|
IF (NOTB) THEN
|
||||||
NROWB = K
|
NROWB = K
|
||||||
@ -379,6 +374,6 @@
|
|||||||
*
|
*
|
||||||
RETURN
|
RETURN
|
||||||
*
|
*
|
||||||
* End of DGEMM .
|
* End of DGEMM
|
||||||
*
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -134,8 +134,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level2
|
*> \ingroup double_blas_level2
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -156,10 +154,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
|
SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level2 routine (version 3.7.0) --
|
* -- Reference BLAS level2 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
DOUBLE PRECISION ALPHA,BETA
|
DOUBLE PRECISION ALPHA,BETA
|
||||||
@ -325,6 +322,6 @@
|
|||||||
*
|
*
|
||||||
RETURN
|
RETURN
|
||||||
*
|
*
|
||||||
* End of DGEMV .
|
* End of DGEMV
|
||||||
*
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -33,8 +33,17 @@
|
|||||||
*>
|
*>
|
||||||
*> \verbatim
|
*> \verbatim
|
||||||
*>
|
*>
|
||||||
*> DGEQR2 computes a QR factorization of a real m by n matrix A:
|
*> DGEQR2 computes a QR factorization of a real m-by-n matrix A:
|
||||||
*> A = Q * R.
|
*>
|
||||||
|
*> A = Q * ( R ),
|
||||||
|
*> ( 0 )
|
||||||
|
*>
|
||||||
|
*> where:
|
||||||
|
*>
|
||||||
|
*> Q is a m-by-m orthogonal matrix;
|
||||||
|
*> R is an upper-triangular n-by-n matrix;
|
||||||
|
*> 0 is a (m-n)-by-n zero matrix, if m > n.
|
||||||
|
*>
|
||||||
*> \endverbatim
|
*> \endverbatim
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -96,8 +105,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -121,10 +128,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
|
SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -34,7 +34,16 @@
|
|||||||
*> \verbatim
|
*> \verbatim
|
||||||
*>
|
*>
|
||||||
*> DGEQRF computes a QR factorization of a real M-by-N matrix A:
|
*> DGEQRF computes a QR factorization of a real M-by-N matrix A:
|
||||||
*> A = Q * R.
|
*>
|
||||||
|
*> A = Q * ( R ),
|
||||||
|
*> ( 0 )
|
||||||
|
*>
|
||||||
|
*> where:
|
||||||
|
*>
|
||||||
|
*> Q is a M-by-M orthogonal matrix;
|
||||||
|
*> R is an upper-triangular N-by-N matrix;
|
||||||
|
*> 0 is a (M-N)-by-N zero matrix, if M > N.
|
||||||
|
*>
|
||||||
*> \endverbatim
|
*> \endverbatim
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -86,7 +95,8 @@
|
|||||||
*> \param[in] LWORK
|
*> \param[in] LWORK
|
||||||
*> \verbatim
|
*> \verbatim
|
||||||
*> LWORK is INTEGER
|
*> LWORK is INTEGER
|
||||||
*> The dimension of the array WORK. LWORK >= max(1,N).
|
*> The dimension of the array WORK.
|
||||||
|
*> LWORK >= 1, if MIN(M,N) = 0, and LWORK >= N, otherwise.
|
||||||
*> For optimum performance LWORK >= N*NB, where NB is
|
*> For optimum performance LWORK >= N*NB, where NB is
|
||||||
*> the optimal blocksize.
|
*> the optimal blocksize.
|
||||||
*>
|
*>
|
||||||
@ -111,8 +121,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -136,10 +144,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
|
SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LWORK, M, N
|
INTEGER INFO, LDA, LWORK, M, N
|
||||||
@ -169,10 +176,9 @@
|
|||||||
*
|
*
|
||||||
* Test the input arguments
|
* Test the input arguments
|
||||||
*
|
*
|
||||||
|
K = MIN( M, N )
|
||||||
INFO = 0
|
INFO = 0
|
||||||
NB = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 )
|
NB = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 )
|
||||||
LWKOPT = N*NB
|
|
||||||
WORK( 1 ) = LWKOPT
|
|
||||||
LQUERY = ( LWORK.EQ.-1 )
|
LQUERY = ( LWORK.EQ.-1 )
|
||||||
IF( M.LT.0 ) THEN
|
IF( M.LT.0 ) THEN
|
||||||
INFO = -1
|
INFO = -1
|
||||||
@ -180,19 +186,25 @@
|
|||||||
INFO = -2
|
INFO = -2
|
||||||
ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
|
ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
|
||||||
INFO = -4
|
INFO = -4
|
||||||
ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
|
ELSE IF( .NOT.LQUERY ) THEN
|
||||||
INFO = -7
|
IF( LWORK.LE.0 .OR. ( M.GT.0 .AND. LWORK.LT.MAX( 1, N ) ) )
|
||||||
|
$ INFO = -7
|
||||||
END IF
|
END IF
|
||||||
IF( INFO.NE.0 ) THEN
|
IF( INFO.NE.0 ) THEN
|
||||||
CALL XERBLA( 'DGEQRF', -INFO )
|
CALL XERBLA( 'DGEQRF', -INFO )
|
||||||
RETURN
|
RETURN
|
||||||
ELSE IF( LQUERY ) THEN
|
ELSE IF( LQUERY ) THEN
|
||||||
|
IF( K.EQ.0 ) THEN
|
||||||
|
LWKOPT = 1
|
||||||
|
ELSE
|
||||||
|
LWKOPT = N*NB
|
||||||
|
END IF
|
||||||
|
WORK( 1 ) = LWKOPT
|
||||||
RETURN
|
RETURN
|
||||||
END IF
|
END IF
|
||||||
*
|
*
|
||||||
* Quick return if possible
|
* Quick return if possible
|
||||||
*
|
*
|
||||||
K = MIN( M, N )
|
|
||||||
IF( K.EQ.0 ) THEN
|
IF( K.EQ.0 ) THEN
|
||||||
WORK( 1 ) = 1
|
WORK( 1 ) = 1
|
||||||
RETURN
|
RETURN
|
||||||
|
|||||||
@ -109,8 +109,6 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup double_blas_level2
|
*> \ingroup double_blas_level2
|
||||||
*
|
*
|
||||||
*> \par Further Details:
|
*> \par Further Details:
|
||||||
@ -130,10 +128,9 @@
|
|||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
|
SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
|
||||||
*
|
*
|
||||||
* -- Reference BLAS level2 routine (version 3.7.0) --
|
* -- Reference BLAS level2 routine --
|
||||||
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
DOUBLE PRECISION ALPHA
|
DOUBLE PRECISION ALPHA
|
||||||
@ -222,6 +219,6 @@
|
|||||||
*
|
*
|
||||||
RETURN
|
RETURN
|
||||||
*
|
*
|
||||||
* End of DGER .
|
* End of DGER
|
||||||
*
|
*
|
||||||
END
|
END
|
||||||
|
|||||||
@ -115,17 +115,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEsolve
|
*> \ingroup doubleGEsolve
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
|
SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK driver routine (version 3.7.0) --
|
* -- LAPACK driver routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LDB, N, NRHS
|
INTEGER INFO, LDA, LDB, N, NRHS
|
||||||
|
|||||||
@ -203,18 +203,15 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date April 2012
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEsing
|
*> \ingroup doubleGEsing
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU,
|
SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU,
|
||||||
$ VT, LDVT, WORK, LWORK, INFO )
|
$ VT, LDVT, WORK, LWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK driver routine (version 3.7.0) --
|
* -- LAPACK driver routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* April 2012
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
CHARACTER JOBU, JOBVT
|
CHARACTER JOBU, JOBVT
|
||||||
|
|||||||
@ -101,17 +101,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
|
SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -101,17 +101,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
|
SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -106,17 +106,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
RECURSIVE SUBROUTINE DGETRF2( M, N, A, LDA, IPIV, INFO )
|
RECURSIVE SUBROUTINE DGETRF2( M, N, A, LDA, IPIV, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, M, N
|
INTEGER INFO, LDA, M, N
|
||||||
|
|||||||
@ -107,17 +107,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
|
SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
INTEGER INFO, LDA, LWORK, N
|
INTEGER INFO, LDA, LWORK, N
|
||||||
|
|||||||
@ -114,17 +114,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date December 2016
|
|
||||||
*
|
|
||||||
*> \ingroup doubleGEcomputational
|
*> \ingroup doubleGEcomputational
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
|
SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
|
||||||
*
|
*
|
||||||
* -- LAPACK computational routine (version 3.7.0) --
|
* -- LAPACK computational routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* December 2016
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
CHARACTER TRANS
|
CHARACTER TRANS
|
||||||
|
|||||||
@ -52,17 +52,14 @@
|
|||||||
*> \author Univ. of Colorado Denver
|
*> \author Univ. of Colorado Denver
|
||||||
*> \author NAG Ltd.
|
*> \author NAG Ltd.
|
||||||
*
|
*
|
||||||
*> \date June 2017
|
|
||||||
*
|
|
||||||
*> \ingroup OTHERauxiliary
|
*> \ingroup OTHERauxiliary
|
||||||
*
|
*
|
||||||
* =====================================================================
|
* =====================================================================
|
||||||
LOGICAL FUNCTION DISNAN( DIN )
|
LOGICAL FUNCTION DISNAN( DIN )
|
||||||
*
|
*
|
||||||
* -- LAPACK auxiliary routine (version 3.7.1) --
|
* -- LAPACK auxiliary routine --
|
||||||
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
* -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||||
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||||
* June 2017
|
|
||||||
*
|
*
|
||||||
* .. Scalar Arguments ..
|
* .. Scalar Arguments ..
|
||||||
DOUBLE PRECISION, INTENT(IN) :: DIN
|
DOUBLE PRECISION, INTENT(IN) :: DIN
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user