Merge branch 'develop' into triclinic-neighbor-bug
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,6 +1,6 @@
|
|||||||
# Contributing to LAMMPS via GitHub
|
# Contributing to LAMMPS via GitHub
|
||||||
|
|
||||||
Thank your for considering to contribute to the LAMMPS software project.
|
Thank you for considering to contribute to the LAMMPS software project.
|
||||||
|
|
||||||
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
||||||
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -57,3 +57,6 @@ out/x86
|
|||||||
out/x64
|
out/x64
|
||||||
src/Makefile.package-e
|
src/Makefile.package-e
|
||||||
src/Makefile.package.settings-e
|
src/Makefile.package.settings-e
|
||||||
|
/cmake/build/x64-Debug-Clang
|
||||||
|
/install/x64-GUI-MSVC
|
||||||
|
/install
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
|
# -*- CMake -*- master configuration file for building LAMMPS
|
||||||
########################################
|
########################################
|
||||||
# CMake build system
|
# CMake build system
|
||||||
# This file is part of LAMMPS
|
# This file is part of LAMMPS
|
||||||
# Created by Christoph Junghans and Richard Berger
|
# Created by Christoph Junghans and Richard Berger
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
########################################
|
########################################
|
||||||
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
||||||
if(POLICY CMP0074)
|
if(POLICY CMP0074)
|
||||||
@ -12,22 +13,11 @@ endif()
|
|||||||
if(POLICY CMP0075)
|
if(POLICY CMP0075)
|
||||||
cmake_policy(SET CMP0075 NEW)
|
cmake_policy(SET CMP0075 NEW)
|
||||||
endif()
|
endif()
|
||||||
# set policy to silence warnings about missing executable permissions in
|
|
||||||
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
|
|
||||||
if(POLICY CMP0109)
|
|
||||||
cmake_policy(SET CMP0109 OLD)
|
|
||||||
endif()
|
|
||||||
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
|
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
|
||||||
if(POLICY CMP0135)
|
if(POLICY CMP0135)
|
||||||
cmake_policy(SET CMP0135 OLD)
|
cmake_policy(SET CMP0135 OLD)
|
||||||
endif()
|
endif()
|
||||||
########################################
|
|
||||||
# Use CONFIGURE_DEPENDS as option for file(GLOB...) when available
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
|
||||||
unset(CONFIGURE_DEPENDS)
|
|
||||||
else()
|
|
||||||
set(CONFIGURE_DEPENDS CONFIGURE_DEPENDS)
|
|
||||||
endif()
|
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
project(lammps CXX)
|
project(lammps CXX)
|
||||||
@ -136,15 +126,15 @@ if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL
|
|||||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# we require C++11 without extensions. Kokkos requires at least C++14 (currently)
|
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
|
||||||
if(NOT CMAKE_CXX_STANDARD)
|
if(NOT CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_STANDARD LESS 11)
|
if(CMAKE_CXX_STANDARD LESS 11)
|
||||||
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
||||||
endif()
|
endif()
|
||||||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14))
|
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||||
@ -192,6 +182,7 @@ option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
|||||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
||||||
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
||||||
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
||||||
|
option(BUILD_LAMMPS_GUI "Build and install the LAMMPS GUI" OFF)
|
||||||
|
|
||||||
# Support using clang-tidy for C++ files with selected options
|
# Support using clang-tidy for C++ files with selected options
|
||||||
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
||||||
@ -202,8 +193,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
|
file(GLOB ALL_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
|
||||||
file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp)
|
file(GLOB MAIN_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||||
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
|
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
|
||||||
add_library(lammps ${ALL_SOURCES})
|
add_library(lammps ${ALL_SOURCES})
|
||||||
|
|
||||||
@ -278,7 +269,6 @@ set(STANDARD_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
ORIENT
|
ORIENT
|
||||||
PERI
|
PERI
|
||||||
@ -384,11 +374,6 @@ if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
|
|||||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
|
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" ${ENABLE_TESTING})
|
|
||||||
if(LAMMPS_EXCEPTIONS)
|
|
||||||
target_compile_definitions(lammps PUBLIC -DLAMMPS_EXCEPTIONS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# "hard" dependencies between packages resulting
|
# "hard" dependencies between packages resulting
|
||||||
# in an error instead of skipping over files
|
# in an error instead of skipping over files
|
||||||
pkg_depends(ML-IAP ML-SNAP)
|
pkg_depends(ML-IAP ML-SNAP)
|
||||||
@ -440,14 +425,14 @@ if(BUILD_OMP)
|
|||||||
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
||||||
enable_language(C)
|
enable_language(C)
|
||||||
if (NOT USE_INTERNAL_LINALG)
|
if (NOT USE_INTERNAL_LINALG)
|
||||||
find_package(LAPACK)
|
find_package(LAPACK)
|
||||||
find_package(BLAS)
|
find_package(BLAS)
|
||||||
endif()
|
endif()
|
||||||
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
|
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
|
||||||
file(GLOB LINALG_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
|
file(GLOB LINALG_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
|
||||||
add_library(linalg STATIC ${LINALG_SOURCES})
|
add_library(linalg STATIC ${LINALG_SOURCES})
|
||||||
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
|
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
|
||||||
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
|
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
|
||||||
@ -465,12 +450,7 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
|
|||||||
if(WITH_JPEG)
|
if(WITH_JPEG)
|
||||||
find_package(JPEG REQUIRED)
|
find_package(JPEG REQUIRED)
|
||||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG)
|
target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
||||||
target_include_directories(lammps PRIVATE ${JPEG_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES})
|
|
||||||
else()
|
|
||||||
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PNG QUIET)
|
find_package(PNG QUIET)
|
||||||
@ -520,7 +500,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
||||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
|
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON)
|
||||||
if(PKG_${PKG_WITH_INCL})
|
if(PKG_${PKG_WITH_INCL})
|
||||||
include(Packages/${PKG_WITH_INCL})
|
include(Packages/${PKG_WITH_INCL})
|
||||||
endif()
|
endif()
|
||||||
@ -582,8 +562,8 @@ endforeach()
|
|||||||
foreach(PKG ${STANDARD_PACKAGES})
|
foreach(PKG ${STANDARD_PACKAGES})
|
||||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||||
|
|
||||||
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
||||||
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
|
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
|
||||||
|
|
||||||
# check for package files in src directory due to old make system
|
# check for package files in src directory due to old make system
|
||||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||||
@ -610,8 +590,8 @@ endforeach()
|
|||||||
foreach(PKG ${SUFFIX_PACKAGES})
|
foreach(PKG ${SUFFIX_PACKAGES})
|
||||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||||
|
|
||||||
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
||||||
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
|
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
|
||||||
|
|
||||||
# check for package files in src directory due to old make system
|
# check for package files in src directory due to old make system
|
||||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||||
@ -625,7 +605,7 @@ endforeach()
|
|||||||
foreach(PKG_LIB POEMS ATC AWPMD H5MD)
|
foreach(PKG_LIB POEMS ATC AWPMD H5MD)
|
||||||
if(PKG_${PKG_LIB})
|
if(PKG_${PKG_LIB})
|
||||||
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
||||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${CONFIGURE_DEPENDS}
|
file(GLOB_RECURSE ${PKG_LIB}_SOURCES CONFIGURE_DEPENDS
|
||||||
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
|
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
|
||||||
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
|
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
|
||||||
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
|
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
|
||||||
@ -795,9 +775,11 @@ include(Tools)
|
|||||||
include(Documentation)
|
include(Documentation)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Install potential and force field files in data directory
|
# Install bench, potential and force field files in data directory
|
||||||
###############################################################################
|
###############################################################################
|
||||||
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps)
|
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/lammps)
|
||||||
|
|
||||||
|
install(DIRECTORY ${LAMMPS_DIR}/bench DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
if(BUILD_TOOLS)
|
if(BUILD_TOOLS)
|
||||||
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||||
@ -818,20 +800,11 @@ install(
|
|||||||
# This is primarily for people that only want to use the Python wrapper.
|
# This is primarily for people that only want to use the Python wrapper.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
# backward compatibility
|
||||||
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
|
if(PYTHON_EXECUTABLE)
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
find_package(PythonInterp) # Deprecated since version 3.12
|
|
||||||
if(PYTHONINTERP_FOUND)
|
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
# backward compatibility
|
|
||||||
if(PYTHON_EXECUTABLE)
|
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
find_package(Python COMPONENTS Interpreter)
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Python COMPONENTS Interpreter)
|
||||||
if(BUILD_IS_MULTI_CONFIG)
|
if(BUILD_IS_MULTI_CONFIG)
|
||||||
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
|
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
|
||||||
else()
|
else()
|
||||||
@ -890,13 +863,23 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
|
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
|
||||||
|
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
|
||||||
|
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
|
||||||
|
OUTPUT_VARIABLE GIT_DESCRIBE
|
||||||
|
ERROR_QUIET
|
||||||
|
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
endif()
|
||||||
message(STATUS "<<< Build configuration >>>
|
message(STATUS "<<< Build configuration >>>
|
||||||
LAMMPS Version: ${PROJECT_VERSION}
|
LAMMPS Version: ${PROJECT_VERSION} ${GIT_DESCRIBE}
|
||||||
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
|
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
|
||||||
CMake Version: ${CMAKE_VERSION}
|
CMake Version: ${CMAKE_VERSION}
|
||||||
Build type: ${LAMMPS_BUILD_TYPE}
|
Build type: ${LAMMPS_BUILD_TYPE}
|
||||||
Install path: ${CMAKE_INSTALL_PREFIX}
|
Install path: ${CMAKE_INSTALL_PREFIX}
|
||||||
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
|
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
|
||||||
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
|
||||||
|
endif()
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Print package summary
|
# Print package summary
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -940,11 +923,9 @@ if(_index GREATER -1)
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "<<< Linker flags: >>>")
|
message(STATUS "<<< Linker flags: >>>")
|
||||||
message(STATUS "Executable name: ${LAMMPS_BINARY}")
|
message(STATUS "Executable name: ${LAMMPS_BINARY}")
|
||||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
get_target_property(OPTIONS lammps LINK_OPTIONS)
|
||||||
get_target_property(OPTIONS lammps LINK_OPTIONS)
|
if(OPTIONS)
|
||||||
if(OPTIONS)
|
message(STATUS "Linker options: ${OPTIONS}")
|
||||||
message(STATUS "Linker options: ${OPTIONS}")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_EXE_LINKER_FLAGS)
|
if(CMAKE_EXE_LINKER_FLAGS)
|
||||||
message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
|
message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
|
||||||
@ -1025,6 +1006,14 @@ endif()
|
|||||||
if(BUILD_LAMMPS_SHELL)
|
if(BUILD_LAMMPS_SHELL)
|
||||||
message(STATUS "<<< Building LAMMPS Shell >>>")
|
message(STATUS "<<< Building LAMMPS Shell >>>")
|
||||||
endif()
|
endif()
|
||||||
|
if(BUILD_LAMMPS_GUI)
|
||||||
|
message(STATUS "<<< Building LAMMPS GUI >>>")
|
||||||
|
if(LAMMPS_GUI_USE_PLUGIN)
|
||||||
|
message(STATUS "Loading LAMMPS library as plugin at run time")
|
||||||
|
else()
|
||||||
|
message(STATUS "Linking LAMMPS library at compile time")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
if(ENABLE_TESTING)
|
if(ENABLE_TESTING)
|
||||||
message(STATUS "<<< Building Unit Tests >>>")
|
message(STATUS "<<< Building Unit Tests >>>")
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
|
|||||||
@ -63,6 +63,11 @@
|
|||||||
"name": "ENABLE_TESTING",
|
"name": "ENABLE_TESTING",
|
||||||
"value": "True",
|
"value": "True",
|
||||||
"type": "BOOL"
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_LAMMPS_GUI",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -303,6 +308,54 @@
|
|||||||
"type": "STRING"
|
"type": "STRING"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-GUI-MSVC",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Release",
|
||||||
|
"buildRoot": "${workspaceRoot}\\build\\${name}",
|
||||||
|
"installRoot": "${workspaceRoot}\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake -D QT_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5 -D Qt5_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "-V",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "BUILD_SHARED_LIBS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_TOOLS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LAMMPS_EXCEPTIONS",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ENABLE_TESTING",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_MPI",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WITH_PNG",
|
||||||
|
"value": "False",
|
||||||
|
"type": "BOOL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BUILD_LAMMPS_GUI",
|
||||||
|
"value": "True",
|
||||||
|
"type": "BOOL"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -1,19 +1,11 @@
|
|||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
# use default (or custom) Python executable, if version is sufficient
|
||||||
find_package(PythonInterp 3.5 QUIET) # Deprecated since version 3.12
|
if(Python_VERSION VERSION_GREATER_EQUAL 3.6)
|
||||||
if(PYTHONINTERP_FOUND)
|
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||||
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
set(Python3_VERSION ${PYTHON_VERSION_STRING})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
# use default (or custom) Python executable, if version is sufficient
|
|
||||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.5)
|
|
||||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
find_package(Python3 COMPONENTS Interpreter QUIET)
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
|
|
||||||
if(Python3_EXECUTABLE)
|
if(Python3_EXECUTABLE)
|
||||||
if(Python3_VERSION VERSION_GREATER_EQUAL 3.5)
|
if(Python3_VERSION VERSION_GREATER_EQUAL 3.6)
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
check-whitespace
|
check-whitespace
|
||||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .
|
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .
|
||||||
|
|||||||
@ -5,24 +5,18 @@ option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
|
|||||||
|
|
||||||
if(BUILD_DOC)
|
if(BUILD_DOC)
|
||||||
# Current Sphinx versions require at least Python 3.8
|
# Current Sphinx versions require at least Python 3.8
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
# use default (or custom) Python executable, if version is sufficient
|
||||||
find_package(PythonInterp 3.8 REQUIRED)
|
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
|
||||||
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m venv)
|
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||||
else()
|
|
||||||
# use default (or custom) Python executable, if version is sufficient
|
|
||||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
|
|
||||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
|
||||||
if(Python3_VERSION VERSION_LESS 3.8)
|
|
||||||
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
|
|
||||||
endif()
|
|
||||||
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
|
if(Python3_VERSION VERSION_LESS 3.8)
|
||||||
|
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
|
||||||
|
endif()
|
||||||
|
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
|
||||||
|
|
||||||
find_package(Doxygen 1.8.10 REQUIRED)
|
find_package(Doxygen 1.8.10 REQUIRED)
|
||||||
|
file(GLOB DOC_SOURCES CONFIGURE_DEPENDS ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
|
||||||
file(GLOB DOC_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
|
|
||||||
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT docenv
|
OUTPUT docenv
|
||||||
@ -80,7 +74,7 @@ if(BUILD_DOC)
|
|||||||
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
|
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
|
||||||
endif()
|
endif()
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
file(GLOB MATHJAX_VERSION_DIR ${CONFIGURE_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
|
file(GLOB MATHJAX_VERSION_DIR CONFIGURE_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
|
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -7,15 +7,7 @@
|
|||||||
# adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake
|
# adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
find_package(Python 3.6 COMPONENTS Interpreter QUIET)
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
|
||||||
find_package(PythonInterp 3.6 QUIET) # Deprecated since version 3.12
|
|
||||||
if(PYTHONINTERP_FOUND)
|
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
find_package(Python 3.6 COMPONENTS Interpreter QUIET)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Use the Cython executable that lives next to the Python executable
|
# Use the Cython executable that lives next to the Python executable
|
||||||
# if it is a local installation.
|
# if it is a local installation.
|
||||||
|
|||||||
@ -28,9 +28,7 @@ if(MSVC)
|
|||||||
add_compile_options(/Zc:__cplusplus)
|
add_compile_options(/Zc:__cplusplus)
|
||||||
add_compile_options(/wd4244)
|
add_compile_options(/wd4244)
|
||||||
add_compile_options(/wd4267)
|
add_compile_options(/wd4267)
|
||||||
if(LAMMPS_EXCEPTIONS)
|
add_compile_options(/EHsc)
|
||||||
add_compile_options(/EHsc)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
@ -65,7 +63,7 @@ endfunction(validate_option)
|
|||||||
|
|
||||||
# helper function for getting the most recently modified file or folder from a glob pattern
|
# helper function for getting the most recently modified file or folder from a glob pattern
|
||||||
function(get_newest_file path variable)
|
function(get_newest_file path variable)
|
||||||
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
|
file(GLOB _dirs CONFIGURE_DEPENDS ${path})
|
||||||
set(_besttime 2000-01-01T00:00:00)
|
set(_besttime 2000-01-01T00:00:00)
|
||||||
set(_bestfile "<unknown>")
|
set(_bestfile "<unknown>")
|
||||||
foreach(_dir ${_dirs})
|
foreach(_dir ${_dirs})
|
||||||
|
|||||||
@ -41,7 +41,7 @@ endfunction()
|
|||||||
|
|
||||||
# helper function for getting the most recently modified file or folder from a glob pattern
|
# helper function for getting the most recently modified file or folder from a glob pattern
|
||||||
function(get_newest_file path variable)
|
function(get_newest_file path variable)
|
||||||
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
|
file(GLOB _dirs CONFIGURE_DEPENDS ${path})
|
||||||
set(_besttime 2000-01-01T00:00:00)
|
set(_besttime 2000-01-01T00:00:00)
|
||||||
set(_bestfile "<unknown>")
|
set(_bestfile "<unknown>")
|
||||||
foreach(_dir ${_dirs})
|
foreach(_dir ${_dirs})
|
||||||
@ -80,8 +80,8 @@ endfunction()
|
|||||||
|
|
||||||
function(check_for_autogen_files source_dir)
|
function(check_for_autogen_files source_dir)
|
||||||
message(STATUS "Running check for auto-generated files from make-based build system")
|
message(STATUS "Running check for auto-generated files from make-based build system")
|
||||||
file(GLOB SRC_AUTOGEN_FILES ${CONFIGURE_DEPENDS} ${source_dir}/style_*.h)
|
file(GLOB SRC_AUTOGEN_FILES CONFIGURE_DEPENDS ${source_dir}/style_*.h)
|
||||||
file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.h)
|
file(GLOB SRC_AUTOGEN_PACKAGES CONFIGURE_DEPENDS ${source_dir}/packages_*.h)
|
||||||
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
|
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
|
||||||
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
|
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
|
||||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars)
|
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars)
|
||||||
|
|
||||||
file(GLOB COLVARS_SOURCES ${CONFIGURE_DEPENDS} ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
|
file(GLOB COLVARS_SOURCES CONFIGURE_DEPENDS ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
|
||||||
|
|
||||||
option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)
|
option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (PKG_AMOEBA)
|
|||||||
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
|
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB GPU_LIB_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
|
file(GLOB GPU_LIB_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
|
||||||
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
|
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
|
||||||
|
|
||||||
if(GPU_API STREQUAL "CUDA")
|
if(GPU_API STREQUAL "CUDA")
|
||||||
@ -64,11 +64,13 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
endif()
|
endif()
|
||||||
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
|
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
|
||||||
endif()
|
endif()
|
||||||
|
option(CUDA_BUILD_MULTIARCH "Enable building CUDA kernels for all supported GPU architectures" ON)
|
||||||
|
mark_as_advanced(GPU_BUILD_MULTIARCH)
|
||||||
|
|
||||||
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
||||||
|
|
||||||
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
|
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
|
||||||
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
|
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
|
||||||
if(GPU_LIB_OLD_CUBIN_HEADERS)
|
if(GPU_LIB_OLD_CUBIN_HEADERS)
|
||||||
message(FATAL_ERROR "########################################################################\n"
|
message(FATAL_ERROR "########################################################################\n"
|
||||||
"Found file(s) generated by the make-based build system in lib/gpu\n"
|
"Found file(s) generated by the make-based build system in lib/gpu\n"
|
||||||
@ -78,71 +80,73 @@ if(GPU_API STREQUAL "CUDA")
|
|||||||
"########################################################################")
|
"########################################################################")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
||||||
|
|
||||||
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
|
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
|
||||||
|
|
||||||
if(CUDPP_OPT)
|
if(CUDPP_OPT)
|
||||||
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
|
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
|
||||||
file(GLOB GPU_LIB_CUDPP_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
|
file(GLOB GPU_LIB_CUDPP_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
|
||||||
file(GLOB GPU_LIB_CUDPP_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
|
file(GLOB GPU_LIB_CUDPP_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
|
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
|
||||||
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
|
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
|
||||||
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
|
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
|
||||||
|
|
||||||
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
if(CUDA_BUILD_MULTIARCH)
|
||||||
# only the Kepler achitecture and beyond is supported
|
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
||||||
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
# only the Kepler achitecture and beyond is supported
|
||||||
if(CUDA_VERSION VERSION_LESS 8.0)
|
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
||||||
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
|
if(CUDA_VERSION VERSION_LESS 8.0)
|
||||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0")
|
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
|
||||||
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
|
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0")
|
||||||
set(GPU_CUDA_GENCODE "-arch=all")
|
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
|
||||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
set(GPU_CUDA_GENCODE "-arch=all")
|
||||||
set(GPU_CUDA_GENCODE "-arch=all")
|
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||||
else()
|
set(GPU_CUDA_GENCODE "-arch=all")
|
||||||
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
|
else()
|
||||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
|
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
|
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
|
||||||
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
|
endif()
|
||||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
|
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
|
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
|
||||||
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
|
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
|
||||||
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
|
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
|
||||||
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
|
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
|
||||||
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
|
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
|
||||||
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
|
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
|
||||||
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
|
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
|
||||||
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
|
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
|
||||||
endif()
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||||
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
|
endif()
|
||||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
|
||||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||||
|
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -201,7 +205,7 @@ elseif(GPU_API STREQUAL "OPENCL")
|
|||||||
include(OpenCLUtils)
|
include(OpenCLUtils)
|
||||||
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
|
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
|
||||||
|
|
||||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
|
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||||
list(REMOVE_ITEM GPU_LIB_CU
|
list(REMOVE_ITEM GPU_LIB_CU
|
||||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
|
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
|
||||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
|
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
|
||||||
@ -331,7 +335,7 @@ elseif(GPU_API STREQUAL "HIP")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
||||||
|
|
||||||
set(GPU_LIB_CU_HIP "")
|
set(GPU_LIB_CU_HIP "")
|
||||||
|
|||||||
@ -1,12 +1,7 @@
|
|||||||
set(KIM-API_MIN_VERSION 2.1.3)
|
set(KIM-API_MIN_VERSION 2.1.3)
|
||||||
find_package(CURL)
|
find_package(CURL)
|
||||||
if(CURL_FOUND)
|
if(CURL_FOUND)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
target_link_libraries(lammps PRIVATE CURL::libcurl)
|
||||||
target_include_directories(lammps PRIVATE ${CURL_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(lammps PRIVATE ${CURL_LIBRARIES})
|
|
||||||
else()
|
|
||||||
target_link_libraries(lammps PRIVATE CURL::libcurl)
|
|
||||||
endif()
|
|
||||||
target_compile_definitions(lammps PRIVATE -DLMP_KIM_CURL)
|
target_compile_definitions(lammps PRIVATE -DLMP_KIM_CURL)
|
||||||
set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.")
|
set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.")
|
||||||
mark_as_advanced(LMP_DEBUG_CURL)
|
mark_as_advanced(LMP_DEBUG_CURL)
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
########################################################################
|
########################################################################
|
||||||
# As of version 3.3.0 Kokkos requires C++14
|
# As of version 4.0.0 Kokkos requires C++17
|
||||||
if(CMAKE_CXX_STANDARD LESS 14)
|
if(CMAKE_CXX_STANDARD LESS 17)
|
||||||
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to be set to at least C++14")
|
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to
|
||||||
|
be set to at least C++17")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -49,8 +50,8 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.1.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||||
set(KOKKOS_MD5 "34d7860d548c06a4040236d959c9f99a" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
set(KOKKOS_MD5 "a5f096bd8ad01b97fdc7a32583b17a33" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||||
mark_as_advanced(KOKKOS_URL)
|
mark_as_advanced(KOKKOS_URL)
|
||||||
mark_as_advanced(KOKKOS_MD5)
|
mark_as_advanced(KOKKOS_MD5)
|
||||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||||
@ -75,7 +76,7 @@ if(DOWNLOAD_KOKKOS)
|
|||||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||||
elseif(EXTERNAL_KOKKOS)
|
elseif(EXTERNAL_KOKKOS)
|
||||||
find_package(Kokkos 3.7.02 REQUIRED CONFIG)
|
find_package(Kokkos 4.1.00 REQUIRED CONFIG)
|
||||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||||
else()
|
else()
|
||||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||||
@ -155,7 +156,7 @@ if(PKG_ML-IAP)
|
|||||||
|
|
||||||
# Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included
|
# Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included
|
||||||
if(MLIAP_ENABLE_PYTHON AND Cythonize_EXECUTABLE)
|
if(MLIAP_ENABLE_PYTHON AND Cythonize_EXECUTABLE)
|
||||||
file(GLOB MLIAP_KOKKOS_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
|
file(GLOB MLIAP_KOKKOS_CYTHON_SRC CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
|
||||||
foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
|
foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
|
||||||
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
|
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
|
||||||
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h
|
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h
|
||||||
|
|||||||
@ -4,7 +4,7 @@ if(LEPTON_SOURCE_DIR)
|
|||||||
endif()
|
endif()
|
||||||
set(LEPTON_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/lepton)
|
set(LEPTON_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/lepton)
|
||||||
|
|
||||||
file(GLOB LEPTON_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
|
file(GLOB LEPTON_SOURCES CONFIGURE_DEPENDS ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
|
||||||
|
|
||||||
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") OR
|
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") OR
|
||||||
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR
|
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR
|
||||||
@ -15,7 +15,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LEPTON_ENABLE_JIT)
|
if(LEPTON_ENABLE_JIT)
|
||||||
file(GLOB ASMJIT_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
|
file(GLOB ASMJIT_SOURCES CONFIGURE_DEPENDS ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(lepton STATIC ${LEPTON_SOURCES} ${ASMJIT_SOURCES})
|
add_library(lepton STATIC ${LEPTON_SOURCES} ${ASMJIT_SOURCES})
|
||||||
|
|||||||
@ -26,29 +26,9 @@ 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)
|
find_package(Python QUIET COMPONENTS Development)
|
||||||
if(NOT PYTHON_VERSION_STRING)
|
if(Python_Development_FOUND)
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
set(MDI_USE_PYTHON_PLUGINS ON)
|
||||||
# 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
|
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
find_package(Python QUIET COMPONENTS Development)
|
|
||||||
if(Python_Development_FOUND)
|
|
||||||
set(MDI_USE_PYTHON_PLUGINS ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
# python plugins are not supported and thus must be always off on Windows
|
# python plugins are not supported and thus must be always off on Windows
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
@ -102,13 +82,9 @@ if(DOWNLOAD_MDI)
|
|||||||
# if compiling with python plugins we need
|
# if compiling with python plugins we need
|
||||||
# to add python libraries as dependency.
|
# to add python libraries as dependency.
|
||||||
if(MDI_USE_PYTHON_PLUGINS)
|
if(MDI_USE_PYTHON_PLUGINS)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
list(APPEND MDI_DEP_LIBS Python::Python)
|
||||||
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
|
|
||||||
else()
|
|
||||||
list(APPEND MDI_DEP_LIBS Python::Python)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# need to add support for dlopen/dlsym, except when compiling for Windows.
|
# need to add support for dlopen/dlsym, except when compiling for Windows.
|
||||||
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
||||||
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
|
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
|
||||||
|
|||||||
@ -2,12 +2,7 @@
|
|||||||
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
|
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
|
||||||
if(PKG_PYTHON)
|
if(PKG_PYTHON)
|
||||||
find_package(Cythonize QUIET)
|
find_package(Cythonize QUIET)
|
||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
find_package(Python COMPONENTS NumPy QUIET)
|
||||||
find_package(Python COMPONENTS NumPy QUIET)
|
|
||||||
else()
|
|
||||||
# assume we have NumPy
|
|
||||||
set(Python_NumPy_FOUND ON)
|
|
||||||
endif()
|
|
||||||
if(Cythonize_FOUND AND Python_NumPy_FOUND)
|
if(Cythonize_FOUND AND Python_NumPy_FOUND)
|
||||||
set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
|
set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
|
||||||
endif()
|
endif()
|
||||||
@ -17,24 +12,16 @@ option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_EN
|
|||||||
|
|
||||||
if(MLIAP_ENABLE_PYTHON)
|
if(MLIAP_ENABLE_PYTHON)
|
||||||
find_package(Cythonize REQUIRED)
|
find_package(Cythonize REQUIRED)
|
||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
find_package(Python COMPONENTS NumPy REQUIRED)
|
||||||
find_package(Python COMPONENTS NumPy REQUIRED)
|
|
||||||
endif()
|
|
||||||
if(NOT PKG_PYTHON)
|
if(NOT PKG_PYTHON)
|
||||||
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
|
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(Python_VERSION VERSION_LESS 3.6)
|
||||||
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
|
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
||||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if(Python_VERSION VERSION_LESS 3.6)
|
|
||||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
|
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
|
||||||
file(GLOB MLIAP_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
|
file(GLOB MLIAP_CYTHON_SRC CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
|
||||||
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
|
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
|
||||||
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
|
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
|
||||||
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
|
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
|
||||||
|
|||||||
@ -1,28 +0,0 @@
|
|||||||
find_package(GSL REQUIRED)
|
|
||||||
find_package(MSCG QUIET)
|
|
||||||
if(MSGC_FOUND)
|
|
||||||
set(DOWNLOAD_MSCG_DEFAULT OFF)
|
|
||||||
else()
|
|
||||||
set(DOWNLOAD_MSCG_DEFAULT ON)
|
|
||||||
endif()
|
|
||||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
|
|
||||||
if(DOWNLOAD_MSCG)
|
|
||||||
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
|
|
||||||
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
|
|
||||||
mark_as_advanced(MSCG_URL)
|
|
||||||
mark_as_advanced(MSCG_MD5)
|
|
||||||
|
|
||||||
include(ExternalCMakeProject)
|
|
||||||
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
|
|
||||||
|
|
||||||
# set include and link library
|
|
||||||
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
|
|
||||||
target_link_libraries(lammps PRIVATE mscg)
|
|
||||||
else()
|
|
||||||
find_package(MSCG)
|
|
||||||
if(NOT MSCG_FOUND)
|
|
||||||
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
|
|
||||||
endif()
|
|
||||||
target_link_libraries(lammps PRIVATE MSCG::MSCG)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})
|
|
||||||
@ -1,29 +1,11 @@
|
|||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
|
||||||
if(NOT PYTHON_VERSION_STRING)
|
if(NOT Python_INTERPRETER)
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
# backward compatibility
|
||||||
# search for interpreter first, so we have a consistent library
|
if(PYTHON_EXECUTABLE)
|
||||||
find_package(PythonInterp) # Deprecated since version 3.12
|
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
if(PYTHONINTERP_FOUND)
|
|
||||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
# search for the library matching the selected interpreter
|
find_package(Python COMPONENTS Interpreter)
|
||||||
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
|
||||||
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_link_libraries(lammps PRIVATE ${PYTHON_LIBRARIES})
|
|
||||||
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)
|
|
||||||
target_link_libraries(lammps PRIVATE Python::Python)
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
||||||
|
target_link_libraries(lammps PRIVATE Python::Python)
|
||||||
target_compile_definitions(lammps PRIVATE -DLMP_PYTHON)
|
target_compile_definitions(lammps PRIVATE -DLMP_PYTHON)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function(FindStyleHeaders path style_class file_pattern headers)
|
function(FindStyleHeaders path style_class file_pattern headers)
|
||||||
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
|
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
|
||||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||||
|
|
||||||
foreach(file_name ${files})
|
foreach(file_name ${files})
|
||||||
@ -187,7 +187,7 @@ endfunction(DetectBuildSystemConflict)
|
|||||||
|
|
||||||
|
|
||||||
function(FindPackagesHeaders path style_class file_pattern headers)
|
function(FindPackagesHeaders path style_class file_pattern headers)
|
||||||
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
|
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
|
||||||
get_property(plist GLOBAL PROPERTY ${headers})
|
get_property(plist GLOBAL PROPERTY ${headers})
|
||||||
|
|
||||||
foreach(file_name ${files})
|
foreach(file_name ${files})
|
||||||
|
|||||||
@ -6,7 +6,7 @@ if(ENABLE_TESTING)
|
|||||||
find_program(VALGRIND_BINARY NAMES valgrind)
|
find_program(VALGRIND_BINARY NAMES valgrind)
|
||||||
# generate custom suppression file
|
# generate custom suppression file
|
||||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
|
||||||
file(GLOB VALGRIND_SUPPRESSION_FILES ${CONFIGURE_DEPENDS} ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
|
file(GLOB VALGRIND_SUPPRESSION_FILES CONFIGURE_DEPENDS ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
|
||||||
foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
|
foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
|
||||||
file(READ ${SUPP} SUPPRESSIONS)
|
file(READ ${SUPP} SUPPRESSIONS)
|
||||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
|
||||||
@ -19,7 +19,7 @@ if(ENABLE_TESTING)
|
|||||||
# we need to build and link a LOT of tester executables, so it is worth checking if
|
# we need to build and link a LOT of tester executables, so it is worth checking if
|
||||||
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
|
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
|
||||||
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
|
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
|
||||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
if((CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
|
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
|
||||||
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
|
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
|
||||||
@ -66,16 +66,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
||||||
mark_as_advanced(ENABLE_COVERAGE)
|
mark_as_advanced(ENABLE_COVERAGE)
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
target_compile_options(lammps PUBLIC --coverage)
|
||||||
if(CMAKE_CXX_FLAGS)
|
target_link_options(lammps PUBLIC --coverage)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
target_compile_options(lammps PUBLIC --coverage)
|
|
||||||
target_link_options(lammps PUBLIC --coverage)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -118,16 +110,8 @@ validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
|
|||||||
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
||||||
if(NOT ENABLE_SANITIZER STREQUAL "none")
|
if(NOT ENABLE_SANITIZER STREQUAL "none")
|
||||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||||
if(CMAKE_CXX_FLAGS)
|
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
|
||||||
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
|
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
|
||||||
set(ENABLE_SANITIZER "none")
|
set(ENABLE_SANITIZER "none")
|
||||||
|
|||||||
@ -26,7 +26,7 @@ if(BUILD_TOOLS)
|
|||||||
|
|
||||||
enable_language(C)
|
enable_language(C)
|
||||||
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE)
|
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE)
|
||||||
file(GLOB MSI2LMP_SOURCES ${CONFIGURE_DEPENDS} ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
|
file(GLOB MSI2LMP_SOURCES CONFIGURE_DEPENDS ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
|
||||||
add_executable(msi2lmp ${MSI2LMP_SOURCES})
|
add_executable(msi2lmp ${MSI2LMP_SOURCES})
|
||||||
if(STANDARD_MATH_LIB)
|
if(STANDARD_MATH_LIB)
|
||||||
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
|
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
|
||||||
@ -37,12 +37,13 @@ if(BUILD_TOOLS)
|
|||||||
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
if(BUILD_LAMMPS_SHELL)
|
if(BUILD_LAMMPS_SHELL)
|
||||||
|
if(NOT PkgConfig_FOUND)
|
||||||
|
message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell")
|
||||||
|
endif()
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
||||||
if(NOT LAMMPS_EXCEPTIONS)
|
|
||||||
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include resource compiler to embed icons into the executable on Windows
|
# include resource compiler to embed icons into the executable on Windows
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
@ -67,4 +68,8 @@ if(BUILD_LAMMPS_SHELL)
|
|||||||
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_LAMMPS_GUI)
|
||||||
|
get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
|
||||||
|
get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
|
||||||
|
add_subdirectory(${LAMMPS_GUI_DIR} ${LAMMPS_GUI_BIN})
|
||||||
|
endif()
|
||||||
|
|||||||
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en-US</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>The LAMMPS Molecular Dynamics Software</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>lammps</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.lammps.gui</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>LAMMPS</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
69
cmake/packaging/README.macos
Normal file
69
cmake/packaging/README.macos
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
LAMMPS and LAMMPS GUI universal binaries for macOS (arm64/x86_64)
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
This package provides universal binaries of LAMMPS and LAMMPS GUI that should
|
||||||
|
run on macOS systems running running macOS version 11 (Big Sur) or newer. Note
|
||||||
|
the binaries are compiled without MPI support and contain a compatible subset
|
||||||
|
of the available packages.
|
||||||
|
|
||||||
|
The following individual commands are included:
|
||||||
|
binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt
|
||||||
|
|
||||||
|
After copying the lammps-gui folder into your Applications folder, please follow
|
||||||
|
these steps:
|
||||||
|
|
||||||
|
1. Open the Terminal app
|
||||||
|
|
||||||
|
2. Type the following command and press ENTER:
|
||||||
|
|
||||||
|
open ~/.zprofile
|
||||||
|
|
||||||
|
This will open a text editor for modifying the .zprofile file in your home
|
||||||
|
directory.
|
||||||
|
|
||||||
|
3. Add the following lines to the end of the file, save it, and close the editor
|
||||||
|
|
||||||
|
LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents
|
||||||
|
LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials
|
||||||
|
LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench
|
||||||
|
MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files
|
||||||
|
PATH=${LAMMPS_INSTALL_DIR}/bin:$PATH
|
||||||
|
export LAMMPS_POTENTIALS LAMMPS_BENCH_DIR PATH
|
||||||
|
|
||||||
|
4. In your existing terminal, type the following command make the settings active
|
||||||
|
|
||||||
|
source ~/.zprofile
|
||||||
|
|
||||||
|
Note, you don't have to type this in new terminals, since they will apply
|
||||||
|
the changes from .zprofile automatically.
|
||||||
|
|
||||||
|
Note: the above assumes you use the default shell (zsh) that comes with
|
||||||
|
MacOS. If you customized MacOS to use a different shell, you'll need to modify
|
||||||
|
that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands
|
||||||
|
to modify the same environment variables.
|
||||||
|
|
||||||
|
5. Try running LAMMPS (which might fail, see step 7)
|
||||||
|
|
||||||
|
lmp -in ${LAMMPS_BENCH_DIR}/in.lj
|
||||||
|
|
||||||
|
6. Try running the LAMMPS GUI
|
||||||
|
|
||||||
|
lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo
|
||||||
|
|
||||||
|
Depending on the size and resolution of your screen, the fonts may
|
||||||
|
be too small to read. This can be adjusted by setting the environment
|
||||||
|
variable QT_FONT_DPI. The default value would be 72, so to increase
|
||||||
|
the fonts by a third one can add to the .zprofile file the line
|
||||||
|
|
||||||
|
export QT_FONT_DPI=96
|
||||||
|
|
||||||
|
and reload as shown above.
|
||||||
|
|
||||||
|
7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt)
|
||||||
|
|
||||||
|
MacOS will likely block the initial run of the executables, since they
|
||||||
|
were downloaded from the internet and are missing a known signature from an
|
||||||
|
identified developer. Go to "Settings" and search for "Security settings". It
|
||||||
|
should display a message that an executable like "lmp" was blocked. Press
|
||||||
|
"Open anyway", which might prompt you for your admin credentials. Afterwards
|
||||||
|
"lmp" and the other executables should work as expected.
|
||||||
77
cmake/packaging/build_linux_tgz.sh
Executable file
77
cmake/packaging/build_linux_tgz.sh
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
DESTDIR=${PWD}/../LAMMPS_GUI
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
|
||||||
|
|
||||||
|
echo "Create staging area for deployment and populate"
|
||||||
|
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||||
|
|
||||||
|
echo "Remove debug info"
|
||||||
|
for s in ${DESTDIR}/bin/* ${DESTDIR}/lib/liblammps*
|
||||||
|
do \
|
||||||
|
test -f $s && strip --strip-debug $s
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Remove libc, gcc, and X11 related shared libs"
|
||||||
|
rm -f ${DESTDIR}/lib/ld*.so ${DESTDIR}/lib/ld*.so.[0-9]
|
||||||
|
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}.so.?
|
||||||
|
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}-[0-9].[0-9]*.so
|
||||||
|
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb*
|
||||||
|
rm -f ${DESTDIR}/lib/libgcc_s*
|
||||||
|
rm -f ${DESTDIR}/lib/libstdc++*
|
||||||
|
|
||||||
|
# get qt dir
|
||||||
|
QTDIR=$(ldd ${DESTDIR}/bin/lammps-gui | grep libQt5Core | sed -e 's/^.*=> *//' -e 's/libQt5Core.so.*$/qt5/')
|
||||||
|
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||||
|
[Paths]
|
||||||
|
Plugins = ../qt5plugins
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# platform plugin
|
||||||
|
mkdir -p ${DESTDIR}/qt5plugins/platforms
|
||||||
|
cp ${QTDIR}/plugins/platforms/libqxcb.so ${DESTDIR}/qt5plugins/platforms
|
||||||
|
|
||||||
|
# get platform plugin dependencies
|
||||||
|
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd ${QTDIR}/plugins/platforms/libqxcb.so | grep -v ${DESTDIR} | grep libQt5 | sed -e 's/^.*=> *//' -e 's/\(libQt5.*.so.*\) .*$/\1/')
|
||||||
|
for dep in ${QTDEPS}
|
||||||
|
do \
|
||||||
|
cp ${dep} ${DESTDIR}/lib
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Add additional plugins for Qt"
|
||||||
|
for dir in styles imageformats
|
||||||
|
do \
|
||||||
|
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qt5plugins/
|
||||||
|
done
|
||||||
|
|
||||||
|
# get imageplugin dependencies
|
||||||
|
for s in ${DESTDIR}/qt5plugins/imageformats/*.so
|
||||||
|
do \
|
||||||
|
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd $s | grep -v ${DESTDIR} | grep -E '(libQt5|jpeg)' | sed -e 's/^.*=> *//' -e 's/\(lib.*.so.*\) .*$/\1/')
|
||||||
|
for dep in ${QTDEPS}
|
||||||
|
do \
|
||||||
|
cp ${dep} ${DESTDIR}/lib
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Set up wrapper script"
|
||||||
|
MYDIR=$(dirname "$0")
|
||||||
|
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
|
||||||
|
for s in ${DESTDIR}/bin/*
|
||||||
|
do \
|
||||||
|
EXE=$(basename $s)
|
||||||
|
test ${EXE} = linux_wrapper.sh && continue
|
||||||
|
test ${EXE} = qt.conf && continue
|
||||||
|
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
||||||
|
done
|
||||||
|
|
||||||
|
pushd ..
|
||||||
|
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo "Cleanup dir"
|
||||||
|
rm -r ${DESTDIR}
|
||||||
|
exit 0
|
||||||
111
cmake/packaging/build_macos_dmg.sh
Executable file
111
cmake/packaging/build_macos_dmg.sh
Executable file
@ -0,0 +1,111 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg
|
||||||
|
|
||||||
|
echo "Create initial dmg file with macdeployqt"
|
||||||
|
macdeployqt lammps-gui.app -dmg
|
||||||
|
echo "Create writable dmg file"
|
||||||
|
hdiutil convert ${APP_NAME}.dmg -format UDRW -o ${APP_NAME}-rw.dmg
|
||||||
|
|
||||||
|
echo "Mount writeable DMG file in read-write mode. Keep track of device and volume names"
|
||||||
|
DEVICE=$(hdiutil attach -readwrite -noverify ${APP_NAME}-rw.dmg | grep '^/dev/' | sed 1q | awk '{print $1}')
|
||||||
|
VOLUME=$(df | grep ${DEVICE} | sed -e 's/^.*\(\/Volumes\/\)/\1/')
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
echo "Create link to Application folder and move README and background image files"
|
||||||
|
|
||||||
|
pushd "${VOLUME}"
|
||||||
|
ln -s /Applications .
|
||||||
|
mv ${APP_NAME}.app/Contents/Resources/README.txt .
|
||||||
|
mkdir .background
|
||||||
|
mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png
|
||||||
|
mv ${APP_NAME}.app LAMMPS.app
|
||||||
|
cd LAMMPS.app/Contents
|
||||||
|
|
||||||
|
echo "Attach icons to LAMMPS console and GUI executables"
|
||||||
|
echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc
|
||||||
|
Rez -a icon.rsrc -o bin/lmp
|
||||||
|
SetFile -a C bin/lmp
|
||||||
|
Rez -a icon.rsrc -o MacOS/lammps-gui
|
||||||
|
SetFile -a C MacOS/lammps-gui
|
||||||
|
rm icon.rsrc
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo 'Tell the Finder to resize the window, set the background,'
|
||||||
|
echo 'change the icon size, place the icons in the right position, etc.'
|
||||||
|
echo '
|
||||||
|
tell application "Finder"
|
||||||
|
tell disk "'${APP_NAME}'"
|
||||||
|
|
||||||
|
-- wait for the image to finish mounting
|
||||||
|
set open_attempts to 0
|
||||||
|
repeat while open_attempts < 4
|
||||||
|
try
|
||||||
|
open
|
||||||
|
delay 1
|
||||||
|
set open_attempts to 5
|
||||||
|
close
|
||||||
|
on error errStr number errorNumber
|
||||||
|
set open_attempts to open_attempts + 1
|
||||||
|
delay 10
|
||||||
|
end try
|
||||||
|
end repeat
|
||||||
|
delay 5
|
||||||
|
|
||||||
|
-- open the image the first time and save a .DS_Store
|
||||||
|
-- just the background and icon setup
|
||||||
|
open
|
||||||
|
set current view of container window to icon view
|
||||||
|
set theViewOptions to the icon view options of container window
|
||||||
|
set background picture of theViewOptions to file ".background:background.png"
|
||||||
|
set arrangement of theViewOptions to not arranged
|
||||||
|
set icon size of theViewOptions to 64
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
-- next set up the position of the app and Applications symlink
|
||||||
|
-- plus hide all window decorations
|
||||||
|
open
|
||||||
|
update without registering applications
|
||||||
|
tell container window
|
||||||
|
set sidebar width to 0
|
||||||
|
set statusbar visible to false
|
||||||
|
set toolbar visible to false
|
||||||
|
set the bounds to { 100, 40, 868, 640 }
|
||||||
|
set position of item "'LAMMPS'.app" to { 190, 216 }
|
||||||
|
set position of item "Applications" to { 576, 216 }
|
||||||
|
set position of item "README.txt" to { 190, 400 }
|
||||||
|
end tell
|
||||||
|
update without registering applications
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
|
||||||
|
-- one last open and close to check the results
|
||||||
|
open
|
||||||
|
delay 5
|
||||||
|
close
|
||||||
|
end tell
|
||||||
|
delay 1
|
||||||
|
end tell
|
||||||
|
' | osascript
|
||||||
|
|
||||||
|
sync
|
||||||
|
|
||||||
|
echo "Unmount modified disk image and convert to compressed read-only image"
|
||||||
|
hdiutil detach "${DEVICE}"
|
||||||
|
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg"
|
||||||
|
|
||||||
|
echo "Attach icon to .dmg file"
|
||||||
|
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
|
||||||
|
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
|
||||||
|
SetFile -a C LAMMPS-macOS-multiarch.dmg
|
||||||
|
rm icon.rsrc
|
||||||
|
|
||||||
|
echo "Delete temporary disk images"
|
||||||
|
rm -f "${APP_NAME}-rw.dmg"
|
||||||
|
rm -f "${APP_NAME}.dmg"
|
||||||
|
|
||||||
|
exit 0
|
||||||
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP_NAME=lammps-gui
|
||||||
|
DESTDIR=${PWD}/LAMMPS_GUI
|
||||||
|
SYSROOT="$1"
|
||||||
|
|
||||||
|
echo "Delete old files, if they exist"
|
||||||
|
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
|
||||||
|
|
||||||
|
echo "Create staging area for deployment and populate"
|
||||||
|
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||||
|
|
||||||
|
# no static libs needed
|
||||||
|
rm -rvf ${DESTDIR}/lib
|
||||||
|
# but the LAMMPS lib
|
||||||
|
|
||||||
|
echo "Copying required DLL files"
|
||||||
|
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Copy required Qt plugins"
|
||||||
|
mkdir -p ${DESTDIR}/qt5plugins
|
||||||
|
for plugin in imageformats platforms styles
|
||||||
|
do \
|
||||||
|
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Check dependencies of DLL files"
|
||||||
|
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||||
|
do \
|
||||||
|
doskip=0
|
||||||
|
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||||
|
do \
|
||||||
|
test ${dll} = ${skip}.dll && doskip=1
|
||||||
|
done
|
||||||
|
test ${doskip} -eq 1 && continue
|
||||||
|
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||||
|
[Paths]
|
||||||
|
Plugins = ../qt5plugins
|
||||||
|
EOF
|
||||||
|
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI
|
||||||
|
|
||||||
28
cmake/packaging/build_windows_vs.cmake
Normal file
28
cmake/packaging/build_windows_vs.cmake
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# CMake script to be run post installation to build zipped package
|
||||||
|
|
||||||
|
# clean up old zipfile and deployment tree
|
||||||
|
file(REMOVE LAMMPS-Win10-amd64.zip)
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||||
|
file(RENAME ${INSTNAME} LAMMPS_GUI)
|
||||||
|
|
||||||
|
# move all executables and dlls to main folder and delete bin folder
|
||||||
|
file(GLOB BINFILES LIST_DIRECTORIES FALSE LAMMPS_GUI/bin/*.exe LAMMPS_GUI/bin/*.dll)
|
||||||
|
foreach(bin ${BINFILES})
|
||||||
|
get_filename_component(exe ${bin} NAME)
|
||||||
|
file(RENAME ${bin} LAMMPS_GUI/${exe})
|
||||||
|
endforeach()
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI/bin)
|
||||||
|
|
||||||
|
# create qt.conf so Qt will find its plugins
|
||||||
|
file(WRITE LAMMPS_GUI/qt.conf "[Paths]\r\nPlugins = qt5plugins\r\n")
|
||||||
|
|
||||||
|
# initialize environment and then run windeployqt to populate folder with missing dependencies and Qt plugins
|
||||||
|
file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r\nset PATH=${QT5_BIN_DIR};%PATH%\r\nwindeployqt --plugindir LAMMPS_GUI/qt5plugins --release LAMMPS_GUI/lammps-gui.exe --no-quick-import --no-webkit2 --no-translations --no-system-d3d-compiler --no-angle --no-opengl-sw\r\n")
|
||||||
|
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
|
||||||
|
file(REMOVE qtdeploy.bat)
|
||||||
|
|
||||||
|
# create zip archive
|
||||||
|
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip")
|
||||||
|
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
|
||||||
|
file(REMOVE makearchive.ps1)
|
||||||
|
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||||
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 598 KiB |
BIN
cmake/packaging/lammps.icns
Normal file
BIN
cmake/packaging/lammps.icns
Normal file
Binary file not shown.
15
cmake/packaging/linux_wrapper.sh
Executable file
15
cmake/packaging/linux_wrapper.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# wrapper for bundled executables
|
||||||
|
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
EXENAME=$(basename "$0")
|
||||||
|
|
||||||
|
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
||||||
|
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
|
||||||
|
|
||||||
|
# set some environment variables for LAMMPS etc.
|
||||||
|
LAMMPS_POTENTIALS=${BASEDIR}/share/lammps/potentials
|
||||||
|
MSI2LMP_LIBRARY=${BASEDIR}/share/lammps/frc_files
|
||||||
|
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY
|
||||||
|
|
||||||
|
exec "${BASEDIR}/bin/${EXENAME}" "$@"
|
||||||
30
cmake/packaging/png2iconset.sh
Executable file
30
cmake/packaging/png2iconset.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# != 2 ]
|
||||||
|
then
|
||||||
|
echo "usage: $0 <pngfile> <iconset name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
png="$1"
|
||||||
|
ico="$2"
|
||||||
|
|
||||||
|
if [ ! -f ${png} ]
|
||||||
|
then
|
||||||
|
echo "PNG Image $1 not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ${ico}.iconset
|
||||||
|
mkdir ${ico}.iconset
|
||||||
|
sips -z 16 16 ${png} --out ${ico}.iconset/icon_16x16.png
|
||||||
|
sips -z 32 32 ${png} --out ${ico}.iconset/icon_16x16@2x.png
|
||||||
|
sips -z 32 32 ${png} --out ${ico}.iconset/icon_32x32.png
|
||||||
|
sips -z 64 64 ${png} --out ${ico}.iconset/icon_32x32@2x.png
|
||||||
|
sips -z 128 128 ${png} --out ${ico}.iconset/icon_128x128.png
|
||||||
|
sips -z 256 256 ${png} --out ${ico}.iconset/icon_128x128@2x.png
|
||||||
|
sips -z 256 256 ${png} --out ${ico}.iconset/icon_256x256.png
|
||||||
|
sips -z 512 512 ${png} --out ${ico}.iconset/icon_256x256@2x.png
|
||||||
|
sips -z 512 512 ${png} --out ${ico}.iconset/icon_512x512.png
|
||||||
|
sips -z 1024 1024 ${png} --out ${ico}.iconset/icon_512x512@2x.png
|
||||||
|
iconutil -c icns ${ico}.iconset
|
||||||
|
rm -rf ${ico}.iconset
|
||||||
@ -64,7 +64,6 @@ set(ALL_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
OPENMP
|
OPENMP
|
||||||
OPT
|
OPT
|
||||||
|
|||||||
@ -66,7 +66,6 @@ set(ALL_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
OPENMP
|
OPENMP
|
||||||
OPT
|
OPT
|
||||||
|
|||||||
@ -9,7 +9,6 @@ endforeach()
|
|||||||
|
|
||||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
|
|
||||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
||||||
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
||||||
|
|||||||
14
cmake/presets/macos-multiarch.cmake
Normal file
14
cmake/presets/macos-multiarch.cmake
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# preset that will build portable multi-arch binaries on macOS without MPI
|
||||||
|
|
||||||
|
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0 CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(BUILD_MPI FALSE CACHE BOOL "" FORCE)
|
||||||
|
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE)
|
||||||
|
set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE)
|
||||||
@ -24,8 +24,8 @@ set(ALL_PACKAGES
|
|||||||
DPD-REACT
|
DPD-REACT
|
||||||
DPD-SMOOTH
|
DPD-SMOOTH
|
||||||
DRUDE
|
DRUDE
|
||||||
ELECTRODE
|
|
||||||
EFF
|
EFF
|
||||||
|
ELECTRODE
|
||||||
EXTRA-COMPUTE
|
EXTRA-COMPUTE
|
||||||
EXTRA-DUMP
|
EXTRA-DUMP
|
||||||
EXTRA-FIX
|
EXTRA-FIX
|
||||||
|
|||||||
@ -20,7 +20,6 @@ set(PACKAGES_WITH_LIB
|
|||||||
ML-QUIP
|
ML-QUIP
|
||||||
MOLFILE
|
MOLFILE
|
||||||
MPIIO
|
MPIIO
|
||||||
MSCG
|
|
||||||
NETCDF
|
NETCDF
|
||||||
PLUMED
|
PLUMED
|
||||||
PYTHON
|
PYTHON
|
||||||
|
|||||||
@ -32,6 +32,7 @@ set(WIN_PACKAGES
|
|||||||
INTERLAYER
|
INTERLAYER
|
||||||
KSPACE
|
KSPACE
|
||||||
LEPTON
|
LEPTON
|
||||||
|
MACHDYN
|
||||||
MANIFOLD
|
MANIFOLD
|
||||||
MANYBODY
|
MANYBODY
|
||||||
MC
|
MC
|
||||||
@ -45,6 +46,7 @@ set(WIN_PACKAGES
|
|||||||
MOLECULE
|
MOLECULE
|
||||||
MOLFILE
|
MOLFILE
|
||||||
OPENMP
|
OPENMP
|
||||||
|
OPT
|
||||||
ORIENT
|
ORIENT
|
||||||
PERI
|
PERI
|
||||||
PHONON
|
PHONON
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.TH LAMMPS "1" "15 June 2023" "2023-06-15"
|
.TH LAMMPS "1" "2 August 2023" "2023-08-2"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.B LAMMPS
|
.B LAMMPS
|
||||||
\- Molecular Dynamics Simulator. Version 15 June 2023
|
\- Molecular Dynamics Simulator. Version 2 August 2023
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B lmp
|
.B lmp
|
||||||
|
|||||||
@ -203,7 +203,7 @@ Bibliography
|
|||||||
A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005)
|
A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005)
|
||||||
|
|
||||||
**(CasP)**
|
**(CasP)**
|
||||||
CasP webpage: https://www.helmholtz-berlin.de/people/gregor-schiwietz/casp_en.html
|
CasP webpage: http://www.casp-program.org/
|
||||||
|
|
||||||
**(Cawkwell2012)**
|
**(Cawkwell2012)**
|
||||||
A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).
|
A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).
|
||||||
|
|||||||
@ -16,8 +16,7 @@ environments is on a :doc:`separate page <Howto_cmake>`.
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
LAMMPS currently requires that CMake version 3.10 or later is available;
|
LAMMPS currently requires that CMake version 3.16 or later is available.
|
||||||
version 3.12 or later is preferred.
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
@ -34,19 +33,18 @@ Advantages of using CMake
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
CMake is an alternative to compiling LAMMPS in the traditional way
|
CMake is an alternative to compiling LAMMPS in the traditional way
|
||||||
through :doc:`(manually customized) makefiles <Build_make>` and a recent
|
through :doc:`(manually customized) makefiles <Build_make>`. Using
|
||||||
addition to LAMMPS thanks to the efforts of Christoph Junghans (LANL)
|
CMake has multiple advantages that are specifically helpful for
|
||||||
and Richard Berger (Temple U). Using CMake has multiple advantages that
|
people with limited experience in compiling software or for people
|
||||||
are specifically helpful for people with limited experience in compiling
|
that want to modify or extend LAMMPS.
|
||||||
software or for people that want to modify or extend LAMMPS.
|
|
||||||
|
|
||||||
- CMake can detect available hardware, tools, features, and libraries
|
- CMake can detect available hardware, tools, features, and libraries
|
||||||
and adapt the LAMMPS default build configuration accordingly.
|
and adapt the LAMMPS default build configuration accordingly.
|
||||||
- CMake can generate files for different build tools and integrated
|
- CMake can generate files for different build tools and integrated
|
||||||
development environments (IDE).
|
development environments (IDE).
|
||||||
- CMake supports customization of settings with a command line, text
|
- CMake supports customization of settings with a command line, text
|
||||||
mode, or graphical user interface. No knowledge of file formats or
|
mode, or graphical user interface. No manual editing of files,
|
||||||
complex command line syntax is required.
|
knowledge of file formats or complex command line syntax is required.
|
||||||
- All enabled components are compiled in a single build operation.
|
- All enabled components are compiled in a single build operation.
|
||||||
- Automated dependency tracking for all files and configuration options.
|
- Automated dependency tracking for all files and configuration options.
|
||||||
- Support for true out-of-source compilation. Multiple configurations
|
- Support for true out-of-source compilation. Multiple configurations
|
||||||
|
|||||||
@ -52,7 +52,6 @@ This is the list of packages that may require additional steps.
|
|||||||
* :ref:`ML-POD <ml-pod>`
|
* :ref:`ML-POD <ml-pod>`
|
||||||
* :ref:`ML-QUIP <ml-quip>`
|
* :ref:`ML-QUIP <ml-quip>`
|
||||||
* :ref:`MOLFILE <molfile>`
|
* :ref:`MOLFILE <molfile>`
|
||||||
* :ref:`MSCG <mscg>`
|
|
||||||
* :ref:`NETCDF <netcdf>`
|
* :ref:`NETCDF <netcdf>`
|
||||||
* :ref:`OPENMP <openmp>`
|
* :ref:`OPENMP <openmp>`
|
||||||
* :ref:`OPT <opt>`
|
* :ref:`OPT <opt>`
|
||||||
@ -140,6 +139,8 @@ CMake build
|
|||||||
# value = yes or no (default)
|
# value = yes or no (default)
|
||||||
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
||||||
# value = yes or no (default)
|
# value = yes or no (default)
|
||||||
|
-D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU architectures
|
||||||
|
# value = yes (default) or no
|
||||||
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
||||||
# value = yes (default) or no
|
# value = yes (default) or no
|
||||||
|
|
||||||
@ -158,41 +159,49 @@ CMake build
|
|||||||
A more detailed list can be found, for example,
|
A more detailed list can be found, for example,
|
||||||
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
|
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
|
||||||
|
|
||||||
CMake can detect which version of the CUDA toolkit is used and thus will try
|
CMake can detect which version of the CUDA toolkit is used and thus will
|
||||||
to include support for **all** major GPU architectures supported by this toolkit.
|
try to include support for **all** major GPU architectures supported by
|
||||||
Thus the GPU_ARCH setting is merely an optimization, to have code for
|
this toolkit. Thus the GPU_ARCH setting is merely an optimization, to
|
||||||
the preferred GPU architecture directly included rather than having to wait
|
have code for the preferred GPU architecture directly included rather
|
||||||
for the JIT compiler of the CUDA driver to translate it.
|
than having to wait for the JIT compiler of the CUDA driver to translate
|
||||||
|
it. This behavior can be turned off (e.g. to speed up compilation) by
|
||||||
|
setting :code:`CUDA_ENABLE_MULTIARCH` to :code:`no`.
|
||||||
|
|
||||||
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the CUDA toolkit
|
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the
|
||||||
is required and a GPU architecture of Kepler or later, which must *also* be
|
CUDA toolkit is required and a GPU architecture of Kepler or later,
|
||||||
supported by the CUDA toolkit in use **and** the CUDA driver in use.
|
which must *also* be supported by the CUDA toolkit in use **and** the
|
||||||
When compiling for OpenCL, OpenCL version 1.2 or later is required and the
|
CUDA driver in use. When compiling for OpenCL, OpenCL version 1.2 or
|
||||||
GPU must be supported by the GPU driver and OpenCL runtime bundled with the driver.
|
later is required and the GPU must be supported by the GPU driver and
|
||||||
|
OpenCL runtime bundled with the driver.
|
||||||
|
|
||||||
When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
|
When building with CMake, you **must NOT** build the GPU library in
|
||||||
using the traditional build procedure. CMake will detect files generated by that
|
``lib/gpu`` using the traditional build procedure. CMake will detect
|
||||||
process and will terminate with an error and a suggestion for how to remove them.
|
files generated by that process and will terminate with an error and a
|
||||||
|
suggestion for how to remove them.
|
||||||
|
|
||||||
If you are compiling for OpenCL, the default setting is to download, build, and
|
If you are compiling for OpenCL, the default setting is to download,
|
||||||
link with a static OpenCL ICD loader library and standard OpenCL headers. This
|
build, and link with a static OpenCL ICD loader library and standard
|
||||||
way no local OpenCL development headers or library needs to be present and only
|
OpenCL headers. This way no local OpenCL development headers or library
|
||||||
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
|
needs to be present and only OpenCL compatible drivers need to be
|
||||||
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
installed to use OpenCL. If this is not desired, you can set
|
||||||
|
:code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
||||||
|
|
||||||
The GPU library has some multi-thread support using OpenMP. If LAMMPS is built
|
The GPU library has some multi-thread support using OpenMP. If LAMMPS
|
||||||
with ``-D BUILD_OMP=on`` this will also be enabled.
|
is built with ``-D BUILD_OMP=on`` this will also be enabled.
|
||||||
|
|
||||||
If you are compiling with HIP, note that before running CMake you will have to
|
If you are compiling with HIP, note that before running CMake you will
|
||||||
set appropriate environment variables. Some variables such as
|
have to 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
|
||||||
and the linker to work correctly.
|
necessary for :code:`hipcc` and the linker to work correctly.
|
||||||
|
|
||||||
Using CHIP-SPV implementation of HIP is now supported. It allows one to run HIP
|
.. versionadded:: 3Aug2022
|
||||||
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
|
Using the CHIP-SPV implementation of HIP is supported. It allows one to
|
||||||
yet support hipCUB. The use of HIP for Intel GPUs is still experimental so you
|
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
|
||||||
should only use this option in preparations to run on Aurora system at ANL.
|
CHIP-SPV, you must set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake
|
||||||
|
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
|
||||||
|
the use of HIP for Intel GPUs is experimental. You should only use this
|
||||||
|
option in preparations to run on Aurora system at Argonne.
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
@ -629,6 +638,12 @@ They must be specified in uppercase.
|
|||||||
* - VEGA90A
|
* - VEGA90A
|
||||||
- GPU
|
- GPU
|
||||||
- AMD GPU MI200 GFX90A
|
- AMD GPU MI200 GFX90A
|
||||||
|
* - NAVI1030
|
||||||
|
- GPU
|
||||||
|
- AMD GPU V620/W6800
|
||||||
|
* - NAVI1100
|
||||||
|
- GPU
|
||||||
|
- AMD GPU RX7900XTX
|
||||||
* - INTEL_GEN
|
* - INTEL_GEN
|
||||||
- GPU
|
- GPU
|
||||||
- SPIR64-based devices, e.g. Intel GPUs, using JIT
|
- SPIR64-based devices, e.g. Intel GPUs, using JIT
|
||||||
@ -651,7 +666,7 @@ They must be specified in uppercase.
|
|||||||
- GPU
|
- GPU
|
||||||
- Intel GPU Ponte Vecchio
|
- Intel GPU Ponte Vecchio
|
||||||
|
|
||||||
This list was last updated for version 3.7.1 of the Kokkos library.
|
This list was last updated for version 4.0.1 of the Kokkos library.
|
||||||
|
|
||||||
.. tabs::
|
.. tabs::
|
||||||
|
|
||||||
@ -921,59 +936,6 @@ Python version 3.6 or later.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. _mscg:
|
|
||||||
|
|
||||||
MSCG package
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
To build with this package, you must download and build the MS-CG
|
|
||||||
library. Building the MS-CG library requires that the GSL
|
|
||||||
(GNU Scientific Library) headers and libraries are installed on your
|
|
||||||
machine. See the ``lib/mscg/README`` and ``MSCG/Install`` files for
|
|
||||||
more details.
|
|
||||||
|
|
||||||
.. tabs::
|
|
||||||
|
|
||||||
.. tab:: CMake build
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
-D DOWNLOAD_MSCG=value # download MSCG for build, value = no (default) or yes
|
|
||||||
-D MSCG_LIBRARY=path # MSCG library file (only needed if a custom location)
|
|
||||||
-D MSCG_INCLUDE_DIR=path # MSCG include directory (only needed if a custom location)
|
|
||||||
|
|
||||||
If ``DOWNLOAD_MSCG`` is set, the MSCG library will be downloaded
|
|
||||||
and built inside the CMake build directory. If the MSCG library
|
|
||||||
is already on your system (in a location CMake cannot find it),
|
|
||||||
``MSCG_LIBRARY`` is the filename (plus path) of the MSCG library
|
|
||||||
file, not the directory the library file is in.
|
|
||||||
``MSCG_INCLUDE_DIR`` is the directory the MSCG include file is in.
|
|
||||||
|
|
||||||
.. tab:: Traditional make
|
|
||||||
|
|
||||||
You can download and build the MS-CG library manually if you
|
|
||||||
prefer; follow the instructions in ``lib/mscg/README``\ . You can
|
|
||||||
also do it in one step from the ``lammps/src`` dir, using a
|
|
||||||
command like these, which simply invokes the
|
|
||||||
``lib/mscg/Install.py`` script with the specified args:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
make lib-mscg # print help message
|
|
||||||
make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master
|
|
||||||
# with the settings compatible with "make serial"
|
|
||||||
make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master
|
|
||||||
# with the settings compatible with "make mpi"
|
|
||||||
make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release
|
|
||||||
|
|
||||||
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``,
|
|
||||||
will be created in ``lib/mscg`` to point to the MS-CG
|
|
||||||
``src/installation`` dir. When LAMMPS is built in src it will use
|
|
||||||
these links. You should not need to edit the
|
|
||||||
``lib/mscg/Makefile.lammps`` file.
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. _opt:
|
.. _opt:
|
||||||
|
|
||||||
OPT package
|
OPT package
|
||||||
|
|||||||
@ -55,7 +55,6 @@ packages:
|
|||||||
* :ref:`ML-POD <ml-pod>`
|
* :ref:`ML-POD <ml-pod>`
|
||||||
* :ref:`ML-QUIP <ml-quip>`
|
* :ref:`ML-QUIP <ml-quip>`
|
||||||
* :ref:`MOLFILE <molfile>`
|
* :ref:`MOLFILE <molfile>`
|
||||||
* :ref:`MSCG <mscg>`
|
|
||||||
* :ref:`NETCDF <netcdf>`
|
* :ref:`NETCDF <netcdf>`
|
||||||
* :ref:`OPENMP <openmp>`
|
* :ref:`OPENMP <openmp>`
|
||||||
* :ref:`OPT <opt>`
|
* :ref:`OPT <opt>`
|
||||||
|
|||||||
@ -459,27 +459,13 @@ those systems:
|
|||||||
.. _exceptions:
|
.. _exceptions:
|
||||||
|
|
||||||
Exception handling when using LAMMPS as a library
|
Exception handling when using LAMMPS as a library
|
||||||
------------------------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
This setting is useful when external codes drive LAMMPS as a library.
|
LAMMPS errors do not kill the calling code, but throw an exception. In
|
||||||
With this option enabled, LAMMPS errors do not kill the calling code.
|
the C-library interface, the call stack is unwound and control returns
|
||||||
Instead, the call stack is unwound and control returns to the caller,
|
to the caller, e.g. to Python or a code that is coupled to LAMMPS and
|
||||||
e.g. to Python. Of course, the calling code has to be set up to
|
the error status can be queried. When using C++ directly, the calling
|
||||||
*catch* exceptions thrown from within LAMMPS.
|
code has to be set up to *catch* exceptions thrown from within LAMMPS.
|
||||||
|
|
||||||
.. tabs::
|
|
||||||
|
|
||||||
.. tab:: CMake build
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
-D LAMMPS_EXCEPTIONS=value # yes or no (default)
|
|
||||||
|
|
||||||
.. tab:: Traditional make
|
|
||||||
|
|
||||||
.. code-block:: make
|
|
||||||
|
|
||||||
LMP_INC = -DLAMMPS_EXCEPTIONS <other LMP_INC settings>
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,6 @@ OPT.
|
|||||||
* :doc:`momentum (k) <fix_momentum>`
|
* :doc:`momentum (k) <fix_momentum>`
|
||||||
* :doc:`momentum/chunk <fix_momentum>`
|
* :doc:`momentum/chunk <fix_momentum>`
|
||||||
* :doc:`move <fix_move>`
|
* :doc:`move <fix_move>`
|
||||||
* :doc:`mscg <fix_mscg>`
|
|
||||||
* :doc:`msst <fix_msst>`
|
* :doc:`msst <fix_msst>`
|
||||||
* :doc:`mvv/dpd <fix_mvv_dpd>`
|
* :doc:`mvv/dpd <fix_mvv_dpd>`
|
||||||
* :doc:`mvv/edpd <fix_mvv_dpd>`
|
* :doc:`mvv/edpd <fix_mvv_dpd>`
|
||||||
|
|||||||
@ -85,6 +85,16 @@ The same functionality is available through
|
|||||||
:doc:`bond style mesocnt <bond_mesocnt>` and
|
:doc:`bond style mesocnt <bond_mesocnt>` and
|
||||||
:doc:`angle style mesocnt <angle_mesocnt>`.
|
:doc:`angle style mesocnt <angle_mesocnt>`.
|
||||||
|
|
||||||
|
MSCG package
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. deprecated:: TBD
|
||||||
|
|
||||||
|
The MSCG package has been removed from LAMMPS since it was unmaintained
|
||||||
|
for many years and instead superseded by the `OpenMSCG software
|
||||||
|
<https://software.rcc.uchicago.edu/mscg/>`_ of the Voth group at the
|
||||||
|
University of Chicago, which can be used independent from LAMMPS.
|
||||||
|
|
||||||
REAX package
|
REAX package
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|||||||
@ -92,8 +92,8 @@ Arguments for these methods can be values returned by the
|
|||||||
*setup_grid()* method (described below), which define the extent of
|
*setup_grid()* method (described below), which define the extent of
|
||||||
the grid cells (owned+ghost) the processor owns. These 4 methods
|
the grid cells (owned+ghost) the processor owns. These 4 methods
|
||||||
allocate memory for 2d (first two) and 3d (second two) grid data. The
|
allocate memory for 2d (first two) and 3d (second two) grid data. The
|
||||||
two methods that end in "_one" allocate an array which stores a single
|
two methods that end in "_offset" allocate an array which stores a single
|
||||||
value per grid cell. The two that end in "_multi" allocate an array
|
value per grid cell. The two that end in "_last" allocate an array
|
||||||
which stores *Nvalues* per grid cell.
|
which stores *Nvalues* per grid cell.
|
||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: c++
|
||||||
|
|||||||
@ -104,8 +104,6 @@ Lowercase directories
|
|||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| min | energy minimization of 2d LJ melt |
|
| min | energy minimization of 2d LJ melt |
|
||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| mscg | parameterize a multi-scale coarse-graining (MSCG) model |
|
|
||||||
+-------------+------------------------------------------------------------------+
|
|
||||||
| msst | MSST shock dynamics |
|
| msst | MSST shock dynamics |
|
||||||
+-------------+------------------------------------------------------------------+
|
+-------------+------------------------------------------------------------------+
|
||||||
| multi | multi neighboring for systems with large interaction disparities |
|
| multi | multi neighboring for systems with large interaction disparities |
|
||||||
|
|||||||
@ -2278,19 +2278,13 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
|||||||
|
|
||||||
.. versionadded:: 3Nov2022
|
.. versionadded:: 3Nov2022
|
||||||
|
|
||||||
In case of an error, LAMMPS will either abort or throw a C++ exception.
|
When using the library interface, the library interface functions
|
||||||
The latter has to be :ref:`enabled at compile time <exceptions>`.
|
will "catch" exceptions, and then the error status can be checked by
|
||||||
This function checks if exceptions were enabled.
|
calling :f:func:`has_error`. The most recent error message can be
|
||||||
|
retrieved via :f:func:`get_last_error_message`. This allows to
|
||||||
When using the library interface with C++ exceptions enabled, the library
|
restart a calculation or delete and recreate the LAMMPS instance when
|
||||||
interface functions will "catch" them, and the error status can then be
|
a C++ exception occurs. One application of using exceptions this way
|
||||||
checked by calling :f:func:`has_error`. The most recent error message can be
|
is the :ref:`lammps_shell`.
|
||||||
retrieved via :f:func:`get_last_error_message`.
|
|
||||||
This can allow one to restart a calculation or delete and recreate
|
|
||||||
the LAMMPS instance when a C++ exception occurs. One application
|
|
||||||
of using exceptions this way is the :ref:`lammps_shell`. If C++
|
|
||||||
exceptions are disabled and an error happens during a call to
|
|
||||||
LAMMPS or the Fortran API, the application will terminate.
|
|
||||||
|
|
||||||
:to: :cpp:func:`lammps_config_has_exceptions`
|
:to: :cpp:func:`lammps_config_has_exceptions`
|
||||||
:r has_exceptions:
|
:r has_exceptions:
|
||||||
|
|||||||
@ -13,9 +13,9 @@ box with a single z plane of atoms - e.g.
|
|||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
create box 1 -10 10 -10 10 -0.25 0.25
|
create_box 1 -10 10 -10 10 -0.25 0.25
|
||||||
|
|
||||||
If using the :doc:`read data <read_data>` command to read in a file of
|
If using the :doc:`read_data <read_data>` command to read in a file of
|
||||||
atom coordinates, set the "zlo zhi" values to be finite but narrow,
|
atom coordinates, set the "zlo zhi" values to be finite but narrow,
|
||||||
similar to the create_box command settings just described. For each
|
similar to the create_box command settings just described. For each
|
||||||
atom in the file, assign a z coordinate so it falls inside the
|
atom in the file, assign a z coordinate so it falls inside the
|
||||||
|
|||||||
@ -79,9 +79,9 @@ As bonds can be broken between neighbor list builds, the
|
|||||||
bond styles. There are two possible settings which determine how pair
|
bond styles. There are two possible settings which determine how pair
|
||||||
interactions work between bonded particles. First, one can overlay
|
interactions work between bonded particles. First, one can overlay
|
||||||
pair forces with bond forces such that all bonded particles also
|
pair forces with bond forces such that all bonded particles also
|
||||||
feel pair interactions. This can be accomplished by using the *overlay/pair*
|
feel pair interactions. This can be accomplished by setting the *overlay/pair*
|
||||||
keyword present in all bpm bond styles and by using the following special
|
keyword present in all bpm bond styles to *yes* and requires using the
|
||||||
bond settings
|
following special bond settings
|
||||||
|
|
||||||
.. code-block:: LAMMPS
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
@ -107,7 +107,17 @@ bond lists is expensive. By setting the lj weight for 1-2 bonds to
|
|||||||
zero, this turns off pairwise interactions. Even though there are no
|
zero, this turns off pairwise interactions. Even though there are no
|
||||||
charges in BPM models, setting a nonzero coul weight for 1-2 bonds
|
charges in BPM models, setting a nonzero coul weight for 1-2 bonds
|
||||||
ensures all bonded neighbors are still included in the neighbor list
|
ensures all bonded neighbors are still included in the neighbor list
|
||||||
in case bonds break between neighbor list builds.
|
in case bonds break between neighbor list builds. If bond breakage is
|
||||||
|
disabled during a simulation run by setting the *break* keyword to *no*,
|
||||||
|
a zero coul weight for 1-2 bonds can be used to exclude bonded atoms
|
||||||
|
from the neighbor list builds
|
||||||
|
|
||||||
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
|
special_bonds lj 0 1 1 coul 0 1 1
|
||||||
|
|
||||||
|
This can be useful for post-processing, or to determine pair interaction
|
||||||
|
properties between distinct bonded particles.
|
||||||
|
|
||||||
To monitor the fracture of bonds in the system, all BPM bond styles
|
To monitor the fracture of bonds in the system, all BPM bond styles
|
||||||
have the ability to record instances of bond breakage to output using
|
have the ability to record instances of bond breakage to output using
|
||||||
|
|||||||
@ -3,9 +3,9 @@ Using CMake with LAMMPS tutorial
|
|||||||
|
|
||||||
The support for building LAMMPS with CMake is a recent addition to
|
The support for building LAMMPS with CMake is a recent addition to
|
||||||
LAMMPS thanks to the efforts of Christoph Junghans (LANL) and Richard
|
LAMMPS thanks to the efforts of Christoph Junghans (LANL) and Richard
|
||||||
Berger (Temple U). One of the key strengths of CMake is that it is not
|
Berger (LANL). One of the key strengths of CMake is that it is not
|
||||||
tied to a specific platform or build system and thus generate the files
|
tied to a specific platform or build system and thus it generates the
|
||||||
necessary to build and develop for different build systems and on
|
files necessary to build and develop for different build systems and on
|
||||||
different platforms. Note, that this applies to the build system itself
|
different platforms. Note, that this applies to the build system itself
|
||||||
not the LAMMPS code. In other words, without additional porting effort,
|
not the LAMMPS code. In other words, without additional porting effort,
|
||||||
it is not possible - for example - to compile LAMMPS with Visual C++ on
|
it is not possible - for example - to compile LAMMPS with Visual C++ on
|
||||||
@ -14,7 +14,7 @@ necessary to program LAMMPS as a project in integrated development
|
|||||||
environments (IDE) like Eclipse, Visual Studio, QtCreator, Xcode,
|
environments (IDE) like Eclipse, Visual Studio, QtCreator, Xcode,
|
||||||
CodeBlocks, Kate and others.
|
CodeBlocks, Kate and others.
|
||||||
|
|
||||||
A second important feature of CMake is, that it can detect and validate
|
A second important feature of CMake is that it can detect and validate
|
||||||
available libraries, optimal settings, available support tools and so
|
available libraries, optimal settings, available support tools and so
|
||||||
on, so that by default LAMMPS will take advantage of available tools
|
on, so that by default LAMMPS will take advantage of available tools
|
||||||
without requiring to provide the details about how to enable/integrate
|
without requiring to provide the details about how to enable/integrate
|
||||||
@ -32,8 +32,7 @@ program ``cmake`` (or ``cmake3``), a text mode interactive user
|
|||||||
interface (TUI) program ``ccmake`` (or ``ccmake3``), or a graphical user
|
interface (TUI) program ``ccmake`` (or ``ccmake3``), or a graphical user
|
||||||
interface (GUI) program ``cmake-gui``. All of them are portable
|
interface (GUI) program ``cmake-gui``. All of them are portable
|
||||||
software available on all supported platforms and can be used
|
software available on all supported platforms and can be used
|
||||||
interchangeably. The minimum supported CMake version is 3.10 (3.12 or
|
interchangeably. The minimum required CMake version is 3.16.
|
||||||
later is recommended).
|
|
||||||
|
|
||||||
All details about features and settings for CMake are in the `CMake
|
All details about features and settings for CMake are in the `CMake
|
||||||
online documentation <https://cmake.org/documentation/>`_. We focus
|
online documentation <https://cmake.org/documentation/>`_. We focus
|
||||||
@ -43,11 +42,20 @@ Prerequisites
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
This tutorial assumes that you are operating in a command-line environment
|
This tutorial assumes that you are operating in a command-line environment
|
||||||
using a shell like Bash.
|
using a shell like Bash or Zsh.
|
||||||
|
|
||||||
- Linux: any Terminal window will work
|
- Linux: any Terminal window will work or text console
|
||||||
- macOS: launch the Terminal application.
|
- macOS: launch the Terminal application
|
||||||
- Windows 10: install and run the :doc:`Windows Subsystem for Linux <Howto_wsl>`
|
- Windows 10 or 11: install and run the :doc:`Windows Subsystem for Linux <Howto_wsl>`
|
||||||
|
- other Unix-like operating systems like FreeBSD
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
It is also possible to use CMake on Windows 10 or 11 through either the Microsoft
|
||||||
|
Visual Studio IDE with the bundled CMake or from the Windows command prompt using
|
||||||
|
a separately installed CMake package, both using the native Microsoft Visual C++
|
||||||
|
compilers and (optionally) the Microsoft MPI SDK. This tutorial, however, only
|
||||||
|
covers unix-like command line interfaces.
|
||||||
|
|
||||||
We also assume that you have downloaded and unpacked a recent LAMMPS source code package
|
We also assume that you have downloaded and unpacked a recent LAMMPS source code package
|
||||||
or used Git to create a clone of the LAMMPS sources on your compilation machine.
|
or used Git to create a clone of the LAMMPS sources on your compilation machine.
|
||||||
@ -338,8 +346,6 @@ Some common LAMMPS specific variables
|
|||||||
- common compiler flags, for optimization or instrumentation (default:)
|
- common compiler flags, for optimization or instrumentation (default:)
|
||||||
* - ``LAMMPS_MACHINE``
|
* - ``LAMMPS_MACHINE``
|
||||||
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
|
||||||
* - ``LAMMPS_EXCEPTIONS``
|
|
||||||
- when set to ``on`` errors will throw a C++ exception instead of aborting (default: ``off``)
|
|
||||||
* - ``FFT``
|
* - ``FFT``
|
||||||
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
|
||||||
* - ``FFT_SINGLE``
|
* - ``FFT_SINGLE``
|
||||||
@ -412,9 +418,9 @@ interface (``ccmake`` or ``cmake-gui``).
|
|||||||
|
|
||||||
Using a preset to select a compiler package (``clang.cmake``,
|
Using a preset to select a compiler package (``clang.cmake``,
|
||||||
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
|
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
|
||||||
are an exception to the mechanism of updating the configuration incrementally,
|
are an exception to the mechanism of updating the configuration
|
||||||
as they will trigger a reset of cached internal CMake settings and thus
|
incrementally, as they will trigger a reset of cached internal CMake
|
||||||
reset settings to their default values.
|
settings and thus reset settings to their default values.
|
||||||
|
|
||||||
Compilation and build targets
|
Compilation and build targets
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|||||||
@ -53,10 +53,10 @@ System-wide Installation
|
|||||||
Step 1: Building LAMMPS as a shared library
|
Step 1: Building LAMMPS as a shared library
|
||||||
"""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
To use LAMMPS inside of Python it has to be compiled as shared library. This
|
To use LAMMPS inside of Python it has to be compiled as shared
|
||||||
library is then loaded by the Python interface. In this example we enable the
|
library. This library is then loaded by the Python interface. In this
|
||||||
MOLECULE package and compile LAMMPS with C++ exceptions, PNG, JPEG and FFMPEG
|
example we enable the MOLECULE package and compile LAMMPS with PNG, JPEG
|
||||||
output support enabled.
|
and FFMPEG output support enabled.
|
||||||
|
|
||||||
Step 1a: For the CMake based build system, the steps are:
|
Step 1a: For the CMake based build system, the steps are:
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Step 1a: For the CMake based build system, the steps are:
|
|||||||
cd $LAMMPS_DIR/build-shared
|
cd $LAMMPS_DIR/build-shared
|
||||||
|
|
||||||
# MPI, PNG, Jpeg, FFMPEG are auto-detected
|
# MPI, PNG, Jpeg, FFMPEG are auto-detected
|
||||||
cmake ../cmake -DPKG_MOLECULE=yes -DLAMMPS_EXCEPTIONS=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
|
cmake ../cmake -DPKG_MOLECULE=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
|
||||||
make
|
make
|
||||||
|
|
||||||
Step 1b: For the legacy, make based build system, the steps are:
|
Step 1b: For the legacy, make based build system, the steps are:
|
||||||
@ -79,7 +79,7 @@ Step 1b: For the legacy, make based build system, the steps are:
|
|||||||
make yes-MOLECULE
|
make yes-MOLECULE
|
||||||
|
|
||||||
# compile shared library using Makefile
|
# compile shared library using Makefile
|
||||||
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG -DLAMMPS_EXCEPTIONS" JPG_LIB="-lpng -ljpeg"
|
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG" JPG_LIB="-lpng -ljpeg"
|
||||||
|
|
||||||
Step 2: Installing the LAMMPS Python package
|
Step 2: Installing the LAMMPS Python package
|
||||||
""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@ -356,18 +356,16 @@ Together with matplotlib plotting data out of LAMMPS becomes simple:
|
|||||||
Error handling with PyLammps
|
Error handling with PyLammps
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Compiling the shared library with C++ exception support provides a better error
|
Using C++ exceptions in LAMMPS for errors allows capturing them on the
|
||||||
handling experience. Without exceptions the LAMMPS code will terminate the
|
C++ side and rethrowing them on the Python side. This way you can handle
|
||||||
current Python process with an error message. C++ exceptions allow capturing
|
LAMMPS errors through the Python exception handling mechanism.
|
||||||
them on the C++ side and rethrowing them on the Python side. This way you
|
|
||||||
can handle LAMMPS errors through the Python exception handling mechanism.
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Capturing a LAMMPS exception in Python can still mean that the
|
Capturing a LAMMPS exception in Python can still mean that the
|
||||||
current LAMMPS process is in an illegal state and must be terminated. It is
|
current LAMMPS process is in an illegal state and must be
|
||||||
advised to save your data and terminate the Python instance as quickly as
|
terminated. It is advised to save your data and terminate the Python
|
||||||
possible.
|
instance as quickly as possible.
|
||||||
|
|
||||||
Using PyLammps in IPython notebooks and Jupyter
|
Using PyLammps in IPython notebooks and Jupyter
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Programming language standards
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Most of the C++ code currently requires a compiler compatible with the
|
Most of the C++ code currently requires a compiler compatible with the
|
||||||
C++11 standard, the KOKKOS package currently requires C++14. Most of
|
C++11 standard, the KOKKOS package currently requires C++17. Most of
|
||||||
the Python code is written to be compatible with Python 3.5 or later or
|
the Python code is written to be compatible with Python 3.5 or later or
|
||||||
Python 2.7. Some Python scripts *require* Python 3 and a few others
|
Python 2.7. Some Python scripts *require* Python 3 and a few others
|
||||||
still need to be ported from Python 2 to Python 3.
|
still need to be ported from Python 2 to Python 3.
|
||||||
@ -25,7 +25,7 @@ LAMMPS can be compiled from source code using a (traditional) build
|
|||||||
system based on shell scripts, a few shell utilities (grep, sed, cat,
|
system based on shell scripts, a few shell utilities (grep, sed, cat,
|
||||||
tr) and the GNU make program. This requires running within a Bourne
|
tr) and the GNU make program. This requires running within a Bourne
|
||||||
shell (``/bin/sh``). Alternatively, a build system with different back ends
|
shell (``/bin/sh``). Alternatively, a build system with different back ends
|
||||||
can be created using CMake. CMake must be at least version 3.10.
|
can be created using CMake. CMake must be at least version 3.16.
|
||||||
|
|
||||||
Operating systems
|
Operating systems
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
@ -62,9 +62,9 @@ regularly tested.
|
|||||||
Portability compliance
|
Portability compliance
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Only a subset of the LAMMPS source code is fully compliant to all of the
|
Only a subset of the LAMMPS source code is *fully* compliant to *all*
|
||||||
above mentioned standards. This is rather typical for projects like
|
of the above mentioned standards. This is rather typical for projects
|
||||||
LAMMPS that largely depend on contributions from the user community.
|
like LAMMPS that largely depend on contributions from the user community.
|
||||||
Not all contributors are trained as programmers and not all of them have
|
Not all contributors are trained as programmers and not all of them have
|
||||||
access to multiple platforms for testing. As part of the continuous
|
access to multiple platforms for testing. As part of the continuous
|
||||||
integration process, however, all contributions are automatically tested
|
integration process, however, all contributions are automatically tested
|
||||||
|
|||||||
@ -28,20 +28,34 @@ Include files (varied)
|
|||||||
packages and hard-to-find bugs have regularly manifested in the
|
packages and hard-to-find bugs have regularly manifested in the
|
||||||
past.
|
past.
|
||||||
|
|
||||||
- Header files, especially those defining a "style", should only use
|
- Header files, especially those defining a "style", should only use the
|
||||||
the absolute minimum number of include files and **must not**
|
absolute minimum number of include files and **must not** contain any
|
||||||
contain any ``using`` statements. Typically, that would only be the
|
``using`` statements. Typically, that would only be the header for the
|
||||||
header for the base class. Instead, any include statements should
|
base class. Instead, any include statements should be put in the
|
||||||
be put in the corresponding implementation files and forward
|
corresponding implementation files and forward declarations be used.
|
||||||
declarations be used. For implementation files, the "include what
|
For implementation files, the "include what you use" principle should
|
||||||
you use" principle should be employed. However, there is the
|
be employed. However, there is the notable exception that when the
|
||||||
notable exception that when the ``pointers.h`` header is included
|
``pointers.h`` header is included (or the header of one of the classes
|
||||||
(or one of the base classes derived from it) certain headers will
|
derived from it), certain headers will *always* be included and thus
|
||||||
always be included and thus do not need to be explicitly specified.
|
do not need to be explicitly specified. These are: `mpi.h`,
|
||||||
These are: `mpi.h`, `cstddef`, `cstdio`, `cstdlib`, `string`,
|
`cstddef`, `cstdio`, `cstdlib`, `string`, `utils.h`, `vector`,
|
||||||
`utils.h`, `vector`, `fmt/format.h`, `climits`, `cinttypes`. This
|
`fmt/format.h`, `climits`, `cinttypes`. This also means any such file
|
||||||
also means any such file can assume that `FILE`, `NULL`, and
|
can assume that `FILE`, `NULL`, and `INT_MAX` are defined.
|
||||||
`INT_MAX` are defined.
|
|
||||||
|
- Class members variables should not be initialized in the header file,
|
||||||
|
but instead should be initialized either in the initializer list of
|
||||||
|
the constructor or explicitly assigned in the body of the constructor.
|
||||||
|
If the member variable is relevant to the functionality of a class
|
||||||
|
(for example when it stores a value from a command line argument), the
|
||||||
|
member variable declaration is followed by a brief comment explaining
|
||||||
|
its purpose and what its values can be. Class members that are
|
||||||
|
pointers should always be initialized to ``nullptr`` in the
|
||||||
|
initializer list of the constructor. This reduces clutter in the
|
||||||
|
header and avoids accessing uninitialized pointers, which leads to
|
||||||
|
hard to debug issues, class members are often implicitly initialized
|
||||||
|
to ``NULL`` on the first use (but *not* after a :doc:`clear command
|
||||||
|
<clear>`). Please see the files ``reset_atoms_mol.h`` and
|
||||||
|
``reset_atoms_mol.cpp`` as an example.
|
||||||
|
|
||||||
- System headers or headers from installed libraries are included with
|
- System headers or headers from installed libraries are included with
|
||||||
angular brackets (example: ``#include <vector>``), while local
|
angular brackets (example: ``#include <vector>``), while local
|
||||||
|
|||||||
@ -88,7 +88,6 @@ page gives those details.
|
|||||||
* :ref:`MOLECULE <PKG-MOLECULE>`
|
* :ref:`MOLECULE <PKG-MOLECULE>`
|
||||||
* :ref:`MOLFILE <PKG-MOLFILE>`
|
* :ref:`MOLFILE <PKG-MOLFILE>`
|
||||||
* :ref:`MPIIO <PKG-MPIIO>`
|
* :ref:`MPIIO <PKG-MPIIO>`
|
||||||
* :ref:`MSCG <PKG-MSCG>`
|
|
||||||
* :ref:`NETCDF <PKG-NETCDF>`
|
* :ref:`NETCDF <PKG-NETCDF>`
|
||||||
* :ref:`OPENMP <PKG-OPENMP>`
|
* :ref:`OPENMP <PKG-OPENMP>`
|
||||||
* :ref:`OPT <PKG-OPT>`
|
* :ref:`OPT <PKG-OPT>`
|
||||||
@ -1257,7 +1256,7 @@ Also see the :ref:`GPU <PKG-GPU>`, :ref:`OPT <PKG-OPT>`, :ref:`INTEL
|
|||||||
<PKG-INTEL>`, and :ref:`OPENMP <PKG-OPENMP>` packages, which have styles
|
<PKG-INTEL>`, and :ref:`OPENMP <PKG-OPENMP>` packages, which have styles
|
||||||
optimized for CPUs, KNLs, and GPUs.
|
optimized for CPUs, KNLs, and GPUs.
|
||||||
|
|
||||||
You must have a C++14 compatible compiler to use this package.
|
You must have a C++17 compatible compiler to use this package.
|
||||||
KOKKOS makes extensive use of advanced C++ features, which can
|
KOKKOS makes extensive use of advanced C++ features, which can
|
||||||
expose compiler bugs, especially when compiling for maximum
|
expose compiler bugs, especially when compiling for maximum
|
||||||
performance at high optimization levels. Please see the file
|
performance at high optimization levels. Please see the file
|
||||||
@ -2066,38 +2065,6 @@ The MPIIO package requires that LAMMPS is build in :ref:`MPI parallel mode <seri
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
.. _PKG-MSCG:
|
|
||||||
|
|
||||||
MSCG package
|
|
||||||
------------
|
|
||||||
|
|
||||||
**Contents:**
|
|
||||||
|
|
||||||
A :doc:`fix mscg <fix_mscg>` command which can parameterize a
|
|
||||||
Multi-Scale Coarse-Graining (MSCG) model using the open-source `MS-CG library <mscg-home_>`_.
|
|
||||||
|
|
||||||
.. _mscg-home: https://github.com/uchicago-voth/MSCG-release
|
|
||||||
|
|
||||||
To use this package you must have the MS-CG library available on your
|
|
||||||
system.
|
|
||||||
|
|
||||||
**Authors:** The fix was written by Lauren Abbott (Sandia). The MS-CG
|
|
||||||
library was developed by Jacob Wagner in Greg Voth's group at the
|
|
||||||
University of Chicago.
|
|
||||||
|
|
||||||
**Install:**
|
|
||||||
|
|
||||||
This package has :ref:`specific installation instructions <mscg>` on the :doc:`Build extras <Build_extras>` page.
|
|
||||||
|
|
||||||
**Supporting info:**
|
|
||||||
|
|
||||||
* src/MSCG: filenames -> commands
|
|
||||||
* src/MSCG/README
|
|
||||||
* lib/mscg/README
|
|
||||||
* examples/mscg
|
|
||||||
|
|
||||||
----------
|
|
||||||
|
|
||||||
.. _PKG-NETCDF:
|
.. _PKG-NETCDF:
|
||||||
|
|
||||||
NETCDF package
|
NETCDF package
|
||||||
|
|||||||
@ -338,11 +338,6 @@ whether an extra library is needed to build and use the package:
|
|||||||
- :doc:`dump <dump>`
|
- :doc:`dump <dump>`
|
||||||
- n/a
|
- n/a
|
||||||
- no
|
- no
|
||||||
* - :ref:`MSCG <PKG-MSCG>`
|
|
||||||
- multi-scale coarse-graining wrapper
|
|
||||||
- :doc:`fix mscg <fix_mscg>`
|
|
||||||
- mscg
|
|
||||||
- ext
|
|
||||||
* - :ref:`NETCDF <PKG-NETCDF>`
|
* - :ref:`NETCDF <PKG-NETCDF>`
|
||||||
- dump output via NetCDF
|
- dump output via NetCDF
|
||||||
- :doc:`dump netcdf <dump_netcdf>`
|
- :doc:`dump netcdf <dump_netcdf>`
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
Handling LAMMPS errors
|
Handling LAMMPS errors
|
||||||
*******************************
|
**********************
|
||||||
|
|
||||||
Compiling the shared library with :ref:`C++ exception support <exceptions>` provides a better error
|
The shared library is compiled with :ref:`C++ exception support
|
||||||
handling experience. Without exceptions the LAMMPS code will terminate the
|
<exceptions>` to provide a better error handling experience. C++
|
||||||
current Python process with an error message. C++ exceptions allow capturing
|
exceptions allow capturing errors on the C++ side and rethrowing them on
|
||||||
them on the C++ side and rethrowing them on the Python side. This way
|
the Python side. This way LAMMPS errors can be handled through the
|
||||||
LAMMPS errors can be handled through the Python exception handling mechanism.
|
Python exception handling mechanism.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -31,6 +31,6 @@ LAMMPS errors can be handled through the Python exception handling mechanism.
|
|||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Capturing a LAMMPS exception in Python can still mean that the
|
Capturing a LAMMPS exception in Python can still mean that the
|
||||||
current LAMMPS process is in an illegal state and must be terminated. It is
|
current LAMMPS process is in an illegal state and must be
|
||||||
advised to save your data and terminate the Python instance as quickly as
|
terminated. It is advised to save your data and terminate the Python
|
||||||
possible.
|
instance as quickly as possible when running in parallel with MPI.
|
||||||
|
|||||||
@ -26,23 +26,29 @@ task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
|
|||||||
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
GPUs) and HIP (for AMD GPUs). You choose the mode at build time to
|
||||||
produce an executable compatible with a specific hardware.
|
produce an executable compatible with a specific hardware.
|
||||||
|
|
||||||
.. admonition:: C++14 support
|
.. admonition:: C++17 support
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
Kokkos requires using a compiler that supports the c++14 standard. For
|
Kokkos requires using a compiler that supports the c++17 standard. For
|
||||||
some compilers, it may be necessary to add a flag to enable c++14 support.
|
some compilers, it may be necessary to add a flag to enable c++17 support.
|
||||||
For example, the GNU compiler uses the -std=c++14 flag. For a list of
|
For example, the GNU compiler uses the -std=c++17 flag. For a list of
|
||||||
compilers that have been tested with the Kokkos library, see the Kokkos
|
compilers that have been tested with the Kokkos library, see the Kokkos
|
||||||
`README <https://github.com/kokkos/kokkos/blob/master/README.md>`_.
|
`Wiki <https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
|
||||||
|
|
||||||
.. admonition:: NVIDIA CUDA support
|
.. admonition:: NVIDIA CUDA support
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit
|
To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit
|
||||||
software version 9.0 or later must be installed on your system. See
|
software version 11.0 or later must be installed on your system. See
|
||||||
the discussion for the :doc:`GPU package <Speed_gpu>` for details of
|
the discussion for the :doc:`GPU package <Speed_gpu>` for details of
|
||||||
how to check and do this.
|
how to check and do this.
|
||||||
|
|
||||||
|
.. admonition:: AMD ROCm (HIP) support
|
||||||
|
:class: note
|
||||||
|
|
||||||
|
To build with Kokkos support for AMD GPUs, the AMD ROCm toolkit
|
||||||
|
software version 5.2.0 or later must be installed on your system.
|
||||||
|
|
||||||
.. admonition:: CUDA and MPI library compatibility
|
.. admonition:: CUDA and MPI library compatibility
|
||||||
:class: note
|
:class: note
|
||||||
|
|
||||||
|
|||||||
@ -93,6 +93,7 @@ Miscellaneous tools
|
|||||||
* :ref:`i-pi <ipi>`
|
* :ref:`i-pi <ipi>`
|
||||||
* :ref:`kate <kate>`
|
* :ref:`kate <kate>`
|
||||||
* :ref:`LAMMPS shell <lammps_shell>`
|
* :ref:`LAMMPS shell <lammps_shell>`
|
||||||
|
* :ref:`LAMMPS GUI <lammps_gui>`
|
||||||
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
* :ref:`LAMMPS magic patterns for file(1) <magic>`
|
||||||
* :ref:`Offline build tool <offline>`
|
* :ref:`Offline build tool <offline>`
|
||||||
* :ref:`singularity/apptainer <singularity_tool>`
|
* :ref:`singularity/apptainer <singularity_tool>`
|
||||||
@ -634,6 +635,229 @@ you first need to use the :doc:`clear` command.
|
|||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
.. _lammps_gui:
|
||||||
|
|
||||||
|
LAMMPS GUI
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. versionadded:: 2Aug2023
|
||||||
|
|
||||||
|
Overview
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
LAMMPS GUI is essentially a small graphical text editor that is linked
|
||||||
|
to the :ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run
|
||||||
|
LAMMPS directly using the contents of the editor's text buffer as input.
|
||||||
|
This is similar to what people usually would do using a text editor to
|
||||||
|
edit the input and then a command line terminal window to run the input
|
||||||
|
commands. The main benefit is that this integrates very well with
|
||||||
|
graphical desktop environments and that it is easier to use for
|
||||||
|
beginners in running computations and thus very suitable for tutorials
|
||||||
|
on LAMMPS. A small difference is that for the LAMMPS GUI it is not
|
||||||
|
require to first commit its buffer of the text editor to a file.
|
||||||
|
|
||||||
|
Features
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
The main window of the LAMMPS GUI is a generic text editor window with
|
||||||
|
line numbers and syntax highlighting set up for LAMMPS input files. It
|
||||||
|
can be used to edit any kind of text file, though. The output of a run
|
||||||
|
is captured and displayed in a separate dialog window and *not* sent to
|
||||||
|
the console or a log file (unless the :doc:`log command <log>` is used
|
||||||
|
in the input. The log window is regularly updated during the run and a
|
||||||
|
progress bar for the run command shown at the bottom of the main window.
|
||||||
|
Starting a new run will open another log windows. The state of LAMMPS
|
||||||
|
will be reset between two runs. After the simulation is finished, an
|
||||||
|
image of the simulated system can be created and shown in an image
|
||||||
|
viewer window. Ongoing runs can be stopped at the next iteration via
|
||||||
|
triggering a timeout.
|
||||||
|
|
||||||
|
When opening a file, the editor will determine the directory where the
|
||||||
|
file resides and switch its current working directory to the folder of
|
||||||
|
that file. Many LAMMPS inputs contain commands that read other files,
|
||||||
|
typically from the folder of the input file. The GUI will always show
|
||||||
|
the current working directory in the bottom. The editor window can also
|
||||||
|
receive (entire) files via drag-n-drop from a file manager GUI or a
|
||||||
|
desktop environment. When exiting the GUI with a modified buffer, a
|
||||||
|
dialog asking to either cancel, ignore the modifications, or save the
|
||||||
|
file with show up. Same when attempting to load a new file into a
|
||||||
|
modified buffer.
|
||||||
|
|
||||||
|
Hotkeys
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
Almost all functionality is accessible from the menu or via hotkeys.
|
||||||
|
The following hotkeys are available (On macOS use the Command key
|
||||||
|
instead of Ctrl (aka Control)).
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
:widths: auto
|
||||||
|
|
||||||
|
* - Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
- Hotkey
|
||||||
|
- Function
|
||||||
|
* - Ctrl+N
|
||||||
|
- New File
|
||||||
|
- Ctrl+Z
|
||||||
|
- Undo edit
|
||||||
|
- Ctrl+V
|
||||||
|
- Paste text
|
||||||
|
- Ctrl+Q
|
||||||
|
- Quit (Main Window only)
|
||||||
|
* - Ctrl+O
|
||||||
|
- Open File
|
||||||
|
- Ctrl+Shift+Z
|
||||||
|
- Redo edit
|
||||||
|
- Ctrl+Enter
|
||||||
|
- Run LAMMPS
|
||||||
|
- Ctrl+W
|
||||||
|
- Close (Log and Image Window only)
|
||||||
|
* - CTRL+S
|
||||||
|
- Save File
|
||||||
|
- Ctrl+C
|
||||||
|
- Copy text
|
||||||
|
- Ctrl+/
|
||||||
|
- Stop Active Run
|
||||||
|
- Ctrl+P
|
||||||
|
- Preferences
|
||||||
|
* - Ctrl+Shift+S
|
||||||
|
- Save File As
|
||||||
|
- Ctrl+X
|
||||||
|
- Cut text
|
||||||
|
- Ctrl+I
|
||||||
|
- Create Snapshot Image
|
||||||
|
- Ctrl+Shift+/
|
||||||
|
- Quick Help
|
||||||
|
|
||||||
|
Further editing keybindings `are documented with the Qt documentation
|
||||||
|
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
|
||||||
|
case of conflicts the list above takes precedence.
|
||||||
|
|
||||||
|
Parallelization
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Due to its nature as a graphical application, it is not possible to use
|
||||||
|
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading is
|
||||||
|
available and enabled by default.
|
||||||
|
|
||||||
|
Prerequisites and portability
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
LAMMPS GUI is programmed in C++ based on the C++11 standard and using
|
||||||
|
the `Qt GUI framework <https://www.qt.io/product/framework>`_.
|
||||||
|
Currently, Qt version 5.12 or later is required; Qt 5.15LTS is
|
||||||
|
recommended Qt 6.x not (yet) supported. Furthermore, CMake version 3.16
|
||||||
|
is required and LAMMPS must be configured with ``-D
|
||||||
|
LAMMPS_EXCETIONS=on`` and ``-D BUILD_MPI=off``. It has been successfully
|
||||||
|
compiled and tested on:
|
||||||
|
|
||||||
|
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
|
||||||
|
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS
|
||||||
|
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
|
||||||
|
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
|
||||||
|
|
||||||
|
Pre-compiled executables
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Pre-compiled LAMMPS executables including the GUI are currently
|
||||||
|
available from https://download.lammps.org/static. You can unpack the
|
||||||
|
archive (or mount the macOS disk image) and run the GUI directly in
|
||||||
|
place. The folder may also be moved around and added to the ``PATH``
|
||||||
|
environment variable so the executables will be found automatically. The
|
||||||
|
LAMMPS GUI executable is called ``lammps-gui`` and takes no arguments or
|
||||||
|
will interpret the first argument as filename to load.
|
||||||
|
|
||||||
|
Compilation
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
The source for the LAMMPS GUI is included with the LAMMPS source code
|
||||||
|
distribution in the folder `tools/lammps-gui` and thus it can be can be
|
||||||
|
built as part of a regular LAMMPS compilation.
|
||||||
|
:doc:`Using CMake <Howto_cmake>` is required.
|
||||||
|
To enable its compilation the CMake variable ``-D BUILD_LAMMPS_GUI=on``
|
||||||
|
must be set when creating the CMake configuration. All other settings
|
||||||
|
(compiler, flags, compile type) for LAMMPS GUI are then inherited from
|
||||||
|
the regular LAMMPS build. If the Qt library is packaged for Linux
|
||||||
|
distributions, then its location is typically auto-detected since the
|
||||||
|
required CMake configuration files are stored in a location where CMake
|
||||||
|
can find them without additional help. Otherwise, the location of the
|
||||||
|
Qt library installation must be indicated by setting
|
||||||
|
``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to a folder inside
|
||||||
|
the Qt installation that contains the file ``Qt5Config.cmake``.
|
||||||
|
|
||||||
|
It is also possible to build the LAMMPS GUI as a standalone executable
|
||||||
|
(e.g. when LAMMPS has been compiled with traditional make), then the
|
||||||
|
CMake configuration needs to be told where to find the LAMMPS headers
|
||||||
|
and the LAMMPS library, via `-D LAMMPS_SOURCE_DIR=/path/to/lammps/src`.
|
||||||
|
CMake will try to guess a build folder with the LAMMPS library from that
|
||||||
|
path, but it can also be set with `-D LAMMPS_LIB_DIR=/path/to/lammps/lib`.
|
||||||
|
|
||||||
|
Rather than linking to the LAMMPS library during compilation, it is also
|
||||||
|
possible to compile the GUI with a plugin loader library that will load
|
||||||
|
the LAMMPS library dynamically at runtime during the start of the GUI
|
||||||
|
from a shared library; e.g. `liblammps.so` or `liblammps.dylib` or
|
||||||
|
`liblammps.dll` (depending on the operating system). This has the
|
||||||
|
advantage that the LAMMPS library can be updated LAMMPS without having
|
||||||
|
to recompile the GUI. The ABI of the LAMMPS C-library interface is very
|
||||||
|
stable and generally backward compatible. This feature is enabled by
|
||||||
|
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then
|
||||||
|
``-D LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
|
||||||
|
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS distribution.
|
||||||
|
|
||||||
|
Platform notes
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
macOS
|
||||||
|
"""""
|
||||||
|
|
||||||
|
When building on macOS, the build procedure will try to manufacture a
|
||||||
|
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg'
|
||||||
|
target (i.e. `cmake --build <build dir> --target dmg` or `make dmg`.
|
||||||
|
|
||||||
|
To build multi-arch executables that will run on both, arm64 and x86_64
|
||||||
|
architectures natively, it is necessary to set the CMake variable ``-D
|
||||||
|
CMAKE_OSX_ARCHITECTURES=arm64;x86_64``. To achieve wide compatibility
|
||||||
|
with different macOS versions, you can also set ``-D
|
||||||
|
CMAKE_OSX_DEPLOYMENT_TARGET=11.0`` which will set compatibility to macOS
|
||||||
|
11 (Big Sur) and later, even if you are compiling on a more recent macOS
|
||||||
|
version.
|
||||||
|
|
||||||
|
Windows
|
||||||
|
"""""""
|
||||||
|
|
||||||
|
On Windows currently only compilation from within Visual Studio 2022 is
|
||||||
|
supported and tested. Using CMake and Ninja as build system is
|
||||||
|
required. Qt needs to be installed, tested was a package downloaded from
|
||||||
|
https://www.qt.io, into the ``C:\\Qt`` folder. There is a custom
|
||||||
|
`x64-GUI-MSVC` build configuration provided that will activate building
|
||||||
|
the `lammps-gui.exe` executable in addition to LAMMPS. When requesting
|
||||||
|
an installation from the `Build` menu, it will create a compressed zip
|
||||||
|
file with the executables and required dependent .dll files. This zip
|
||||||
|
file can be uncompressed and ``lammps-gui.exe`` run directly from there.
|
||||||
|
The uncompressed folder can be added to the ``PATH`` environment and
|
||||||
|
LAMMPS and LAMMPS GUI can be launched from anywhere from the command
|
||||||
|
line.
|
||||||
|
|
||||||
|
Linux
|
||||||
|
"""""
|
||||||
|
|
||||||
|
Version 5.12 or later of the Qt library and CMake version 3.16 are
|
||||||
|
required and those are provided by, e.g., Ubuntu 20.04LTS. Thus older
|
||||||
|
Linux distributions are not likely to be supported, while more recent
|
||||||
|
ones will work, even for pre-compiled executables (see above). After
|
||||||
|
compiling with ``cmake --build <build folder>``, use
|
||||||
|
``cmake --build <build folder> --target tgz`` or ``make tgz`` to build
|
||||||
|
a ``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
|
||||||
|
support libraries.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
.. _arc:
|
.. _arc:
|
||||||
|
|
||||||
lmp2arc tool
|
lmp2arc tool
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC add_molecule command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> add_molecule <small|large> <tag> <group-ID>
|
fix_modify <AtC fixID> add_molecule <small|large> <tag> <group-ID>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC add_species command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> add_species <tag> <group|type> <ID>
|
fix_modify <AtC fixID> add_species <tag> <group|type> <ID>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC atom_element_map command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> atom_element_map <eulerian|lagrangian> [<frequency>]
|
fix_modify <AtC fixID> atom_element_map <eulerian|lagrangian> [<frequency>]
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC atom_weight command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> atom_weight <method> <args>
|
fix_modify <AtC fixID> atom_weight <method> <args>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC atomic_charge command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> <include|omit> atomic_charge
|
fix_modify <AtC fixID> <include|omit> atomic_charge
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC boundary_dynamics command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> boundary_dynamics <on|damped_harmonic|prescribed|coupled|none>
|
fix_modify <AtC fixID> boundary_dynamics <on|damped_harmonic|prescribed|coupled|none>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC boundary_faceset command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> boundary_faceset <is|add> <faceset_name>
|
fix_modify <AtC fixID> boundary_faceset <is|add> <faceset_name>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC boundary type command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> boundary type <atom-type-id>
|
fix_modify <AtC fixID> boundary type <atom-type-id>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC consistent_fe_initialization command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> consistent_fe_initialization <on|off>
|
fix_modify <AtC fixID> consistent_fe_initialization <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC control localized_lambda command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> control localized_lambda <on|off>
|
fix_modify <AtC fixID> control localized_lambda <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC control momentum command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> control <physics_type> <solution_parameter> <value>
|
fix_modify <AtC fixID> control <physics_type> <solution_parameter> <value>
|
||||||
fix_modify AtC control momentum none
|
fix_modify AtC control momentum none
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC control thermal command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> control <physics_type> <solution_parameter> <value>
|
fix_modify <AtC fixID> control <physics_type> <solution_parameter> <value>
|
||||||
fix_modify <AtC fixID> control thermal <control_type> <optional_args>
|
fix_modify <AtC fixID> control thermal <control_type> <optional_args>
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC decomposition command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> decomposition <type>
|
fix_modify <AtC fixID> decomposition <type>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC extrinsic electron_integration command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> extrinsic electron_integration <integration_type> [<num_subcycle_steps>]
|
fix_modify <AtC fixID> extrinsic electron_integration <integration_type> [<num_subcycle_steps>]
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC equilibrium_start command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> equilibrium_start <on|off>
|
fix_modify <AtC fixID> equilibrium_start <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC extrinsic exchange command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> extrinsic exchange <on|off>
|
fix_modify <AtC fixID> extrinsic exchange <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC fe_md_boundary command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> fe_md_boundary <faceset|interpolate|no_boundary>
|
fix_modify <AtC fixID> fe_md_boundary <faceset|interpolate|no_boundary>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC filter scale command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> filter scale <scale>
|
fix_modify <AtC fixID> filter scale <scale>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC filter type command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> filter type <exponential|step|no_filter>
|
fix_modify <AtC fixID> filter type <exponential|step|no_filter>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC fix command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> fix <field> <nodeset> <constant|function>
|
fix_modify <AtC fixID> fix <field> <nodeset> <constant|function>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC fix_flux command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> fix_flux <field> <face_set> <value|function>
|
fix_modify <AtC fixID> fix_flux <field> <face_set> <value|function>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC computes command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> computes <add|delete> <per-atom compute-ID> <volume|number>
|
fix_modify <AtC fixID> computes <add|delete> <per-atom compute-ID> <volume|number>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC fields command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> fields <all|none>
|
fix_modify <AtC fixID> fields <all|none>
|
||||||
fix_modify <AtC fixID> fields <add|delete> <list_of_fields>
|
fix_modify <AtC fixID> fields <add|delete> <list_of_fields>
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC gradients command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> gradients <add|delete> <list_of_fields>
|
fix_modify <AtC fixID> gradients <add|delete> <list_of_fields>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC kernel command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> kernel <type> <parameters>
|
fix_modify <AtC fixID> kernel <type> <parameters>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC on_the_fly command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> on_the_fly <bond|kernel> <on|off>
|
fix_modify <AtC fixID> on_the_fly <bond|kernel> <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC rates command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> rates <add|delete> <list_of_fields>
|
fix_modify <AtC fixID> rates <add|delete> <list_of_fields>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC initial command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> initial <field> <nodeset> <constant|function>
|
fix_modify <AtC fixID> initial <field> <nodeset> <constant|function>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC internal_element_set command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> internal_element_set <element_set_name>
|
fix_modify <AtC fixID> internal_element_set <element_set_name>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC internal_quadrature command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> internal_quadrature <on|off> [region]
|
fix_modify <AtC fixID> internal_quadrature <on|off> [region]
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC kernel_bandwidth command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> kernel_bandwidth <value>
|
fix_modify <AtC fixID> kernel_bandwidth <value>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC control lumped_lambda_solve command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> control lumped_lambda_solve <on|off>
|
fix_modify <AtC fixID> control lumped_lambda_solve <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC control mask_direction command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> control mask_direction <direction> <on|off>
|
fix_modify <AtC fixID> control mask_direction <direction> <on|off>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC mass_matrix command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> mass_matrix <fe|md_fe>
|
fix_modify <AtC fixID> mass_matrix <fe|md_fe>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC material command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> material <elementset_name> <material_id>
|
fix_modify <AtC fixID> material <elementset_name> <material_id>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC mesh add_to_nodeset command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> mesh add_to_nodeset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
|
fix_modify <AtC fixID> mesh add_to_nodeset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC mesh create command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> mesh create <nx> <ny> <nz> <region-ID> <f|p> <f|p> <f|p>
|
fix_modify <AtC fixID> mesh create <nx> <ny> <nz> <region-ID> <f|p> <f|p> <f|p>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC mesh create_elementset command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> mesh create_elementset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
|
fix_modify <AtC fixID> mesh create_elementset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ fix_modify AtC mesh create_faceset box command
|
|||||||
Syntax
|
Syntax
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
.. parsed-literal::
|
.. code-block:: LAMMPS
|
||||||
|
|
||||||
fix_modify <AtC fixID> mesh create_faceset <id> box <xmin> <xmax> <ymin> <ymax> <zmin> <zmax> <in|out> [units]
|
fix_modify <AtC fixID> mesh create_faceset <id> box <xmin> <xmax> <ymin> <ymax> <zmin> <zmax> <in|out> [units]
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user