Compare commits
415 Commits
patch_11Ma
...
patch_29Ju
| Author | SHA1 | Date | |
|---|---|---|---|
| a52ddf8759 | |||
| 0f71ed1fec | |||
| 43ffee980d | |||
| 560b34aad0 | |||
| ea35235ca0 | |||
| 474b59a1f3 | |||
| c63d77d0b8 | |||
| bf9646cbbe | |||
| d2dd76e655 | |||
| d649a6fe38 | |||
| a8b7153f4e | |||
| c3fe26a614 | |||
| bbe77e4c31 | |||
| b819018084 | |||
| 6900f9edf9 | |||
| 11a8d4e1c3 | |||
| d9396df5b9 | |||
| 0e047f2786 | |||
| ec99b0957c | |||
| 75a3968039 | |||
| a3a2981cd2 | |||
| 4f9c0456e6 | |||
| ad4720ef00 | |||
| 946bca82c5 | |||
| 85d7f7ddc9 | |||
| ee0e9f94f1 | |||
| 9f1aabea50 | |||
| b3bc5fd823 | |||
| e0dc53ab3f | |||
| 206d349d5b | |||
| 4d629872d8 | |||
| 7a783870e2 | |||
| 0df8587c18 | |||
| ad3d049edd | |||
| 7abc960d39 | |||
| 23fb0370a9 | |||
| a043ddcb82 | |||
| a2b2507121 | |||
| 6bd5a3d69b | |||
| 086e83456b | |||
| 1db4705a3d | |||
| 8e77be0848 | |||
| fc3694189e | |||
| 75aacfd17f | |||
| 08552fefe9 | |||
| 20fe0cd9d0 | |||
| 8f4b7161c5 | |||
| 38cdc1828d | |||
| 9353569d30 | |||
| 868f5711a2 | |||
| 7ffab9a228 | |||
| 58559d9e62 | |||
| 3eed23d3f7 | |||
| d3b83885d1 | |||
| 3549345830 | |||
| 244963aa19 | |||
| 264f832b18 | |||
| 5c4bf8ac47 | |||
| 6008cee6aa | |||
| f33a2c982c | |||
| 8e14143908 | |||
| e6ef8ce5ee | |||
| ebe622ff7d | |||
| f94cdf856c | |||
| e2622f0230 | |||
| e4dd6dec40 | |||
| b0126dd9d6 | |||
| f36e1a2cdc | |||
| c9d147c366 | |||
| 19f81e0802 | |||
| 49a91db0b2 | |||
| bad750eb2b | |||
| 5e48565761 | |||
| af91f7fa5d | |||
| 0cd86bab22 | |||
| bec82e4045 | |||
| 06b3209ad8 | |||
| 2fd45050cd | |||
| 8ffa96c9e9 | |||
| 6a9251245c | |||
| cb2cf5b773 | |||
| c4d0994d5e | |||
| e2c03f0596 | |||
| 9108306c11 | |||
| 86519ce213 | |||
| 0b1d4a1696 | |||
| 264e4fd3b1 | |||
| d237625d2a | |||
| ce0f3daad6 | |||
| cb7b23e220 | |||
| 3f17d33fbe | |||
| 510834cb7b | |||
| 2165a2aa9b | |||
| ac41cc2c9a | |||
| f5f73b0172 | |||
| 35f5a685f6 | |||
| 62984c1de0 | |||
| 04d040b863 | |||
| 92f0f19df6 | |||
| dcdc7877a4 | |||
| 2f11f2d7b2 | |||
| e25b6c81ee | |||
| 80cca7c4c1 | |||
| 2fe0eabc09 | |||
| 7da8e69b45 | |||
| e8e1349da4 | |||
| dc132c8bf1 | |||
| f0a2c57401 | |||
| 4ca3d30db7 | |||
| cbfb751e92 | |||
| 65c895721f | |||
| bfacfc46be | |||
| 919d95d375 | |||
| 258185690d | |||
| cea0227f14 | |||
| 3e58ebea4f | |||
| 7a22612bea | |||
| 9805b5d34a | |||
| 9f3cb83fb3 | |||
| 9f3fae1c47 | |||
| 0e603493af | |||
| 7f0c88c74b | |||
| 1f770a6a8f | |||
| 596acaf4d2 | |||
| 472a1a501d | |||
| eb485afc45 | |||
| 4265e68ff8 | |||
| 90f0586c9e | |||
| c371ce1005 | |||
| e3a528a493 | |||
| 28504e91c0 | |||
| 47482afbc1 | |||
| 7d3a549de9 | |||
| a9b794b2ab | |||
| 3ae8fdccd8 | |||
| 70a7b37614 | |||
| 036647c102 | |||
| 37b901eadb | |||
| 4a88f53d22 | |||
| d4861e71d2 | |||
| 5a3ef99272 | |||
| 605b4dca22 | |||
| dade67664d | |||
| 93d6510d34 | |||
| 4f8d1893e9 | |||
| 7c7a80b31a | |||
| da5931d65d | |||
| 83ae0ad26f | |||
| b189a328ed | |||
| 469b67a39b | |||
| 1d0773d10d | |||
| 03a7d1cd5d | |||
| 08331da93d | |||
| ab0f3debeb | |||
| fe14bfd1d2 | |||
| d55c7039ee | |||
| 87dcef7115 | |||
| 7e234497ff | |||
| 277b43b2fd | |||
| 6f61ed2af5 | |||
| 16cc613993 | |||
| 6842a527e0 | |||
| d094bf789c | |||
| 3750e0a427 | |||
| 40c4461a78 | |||
| d830fc2301 | |||
| 265b6c261e | |||
| 3411b0e576 | |||
| 47458f1ca0 | |||
| c4bcb7e73d | |||
| 18b543179c | |||
| 14c4438a72 | |||
| acd20512f0 | |||
| 5fcdfe6dcb | |||
| 7c9afc1be2 | |||
| b2e6863d93 | |||
| cb887d48a1 | |||
| 9ef1bfe814 | |||
| 76b85e4d25 | |||
| 8a2faff541 | |||
| fe483a769f | |||
| f312fbfe32 | |||
| f68c6dddb8 | |||
| c5b51df06e | |||
| 479cc9424d | |||
| 673202d05f | |||
| 3e79296dcf | |||
| fcf9ed0fc2 | |||
| 661848139c | |||
| 12d8370ec5 | |||
| 3c781afa6c | |||
| 37268e435b | |||
| 29e555213c | |||
| 965ac3cedd | |||
| 30e3e9ab88 | |||
| 6cb0c2e9c5 | |||
| ebd93cac69 | |||
| a2dd21dca5 | |||
| e78ed7d044 | |||
| 142de878f9 | |||
| 4c28827aa1 | |||
| 5a383aa518 | |||
| a4a3133b76 | |||
| 9dda907f7d | |||
| fa5ecf88a5 | |||
| 7ca794beb9 | |||
| c386bdddf9 | |||
| 56c3a0be29 | |||
| cf3095e938 | |||
| 6056c1db4d | |||
| 38182dcc60 | |||
| ef3c0dbf7b | |||
| 4c18a07193 | |||
| e3e040227b | |||
| f2a6aa249f | |||
| 6457e5eedb | |||
| c27e617fd8 | |||
| b9a8f91753 | |||
| 95e259fe71 | |||
| 69a9f1bf94 | |||
| e7773808a5 | |||
| 0368202d12 | |||
| 3ba87e52e9 | |||
| 1422b0413b | |||
| 18c6d7f289 | |||
| 1b4068b575 | |||
| 5f0e6d0aa7 | |||
| 99f4274483 | |||
| 341fa160fe | |||
| 102be8dd8b | |||
| 6c42c9b378 | |||
| ce4a446cea | |||
| 933cf92e36 | |||
| 69903cb4aa | |||
| 6de4569483 | |||
| ad5cfb5ae6 | |||
| fbc435a0cb | |||
| 108c31e24a | |||
| e550f5120b | |||
| 2f9e6d4566 | |||
| 1641f78e3e | |||
| 4ec31564fe | |||
| f5b7419108 | |||
| 1f193e02e0 | |||
| 838a1938bb | |||
| df3eb36519 | |||
| bb6dcb8ebd | |||
| e6f76451eb | |||
| cfb350d40b | |||
| 5daf1fe0d4 | |||
| 2e7b919774 | |||
| 858c211fdc | |||
| 6997aedf30 | |||
| cab602045e | |||
| 124641dc8a | |||
| 6944973484 | |||
| 9e82c86fbd | |||
| 68dd7d4f2b | |||
| b2da3ca3e9 | |||
| e1361a9dca | |||
| 94c6d2d546 | |||
| 585a164e78 | |||
| 5a4a7cebc1 | |||
| 133f0922b3 | |||
| 1a88ffd5ab | |||
| 307e471456 | |||
| f5d66e74c5 | |||
| bebf25dcb3 | |||
| 3f316f71ef | |||
| 8303d1a375 | |||
| 363d8ef775 | |||
| a449488b1d | |||
| e076d08ee9 | |||
| 1a5144bf37 | |||
| ca6920be72 | |||
| 55d8cc0341 | |||
| 6b73e29f64 | |||
| 09046ad3f7 | |||
| 06c18dd36c | |||
| 55bd823339 | |||
| 77e04a9213 | |||
| 233f03ea8e | |||
| f65b06de0e | |||
| 0f32d603b5 | |||
| 3440b1a2a7 | |||
| 8952b1107c | |||
| b3b3c225e8 | |||
| 4d34e55072 | |||
| 437e854741 | |||
| 4820cef5d4 | |||
| e7598eeec0 | |||
| a5d29fa52e | |||
| 821ef0cf77 | |||
| 42f22a9723 | |||
| 0d8110bc19 | |||
| 44c5e88e24 | |||
| 308dac6821 | |||
| 944dab1351 | |||
| c3cc07bd3d | |||
| c50258e89c | |||
| 9674512997 | |||
| f864584bce | |||
| 075598b405 | |||
| 7780d92823 | |||
| 66caf1c1a3 | |||
| 95eb86d6c7 | |||
| d43c556263 | |||
| d7992f324d | |||
| a25895d31d | |||
| 4f762deff8 | |||
| 843f89fc92 | |||
| 6336c3b975 | |||
| a43e74180a | |||
| 6626cd5aaa | |||
| 6226ec8831 | |||
| 6c91cc1f76 | |||
| 4e42ee2cfc | |||
| 1224296365 | |||
| 25cef528c9 | |||
| 6359392834 | |||
| 71e1867dd2 | |||
| f90af1839e | |||
| 2ebd4eb26e | |||
| 3682bc47c2 | |||
| 2797afbf3e | |||
| 635383c00c | |||
| b6a8168e3f | |||
| 71fce2e413 | |||
| 994fd2af0e | |||
| d8138a5b4c | |||
| a001f2c248 | |||
| 8104568b6a | |||
| 96d1c421df | |||
| 96c5c92b1a | |||
| 59b59573a7 | |||
| 51d2625daf | |||
| 4e6188cff6 | |||
| d504dcc465 | |||
| eaaad3f6d5 | |||
| 75069ec55b | |||
| 392816a807 | |||
| 1b8669c620 | |||
| ce80d1a3ea | |||
| 8709f6044b | |||
| a315599bac | |||
| 08bc115380 | |||
| 65b7e43a91 | |||
| 436a5de3a6 | |||
| f0cca6fb9d | |||
| 3ed640666f | |||
| 6a9ecde742 | |||
| 2a3b93ca3d | |||
| e4c6c46b4c | |||
| 7990826ca2 | |||
| fa499ff95d | |||
| 86cfbb3010 | |||
| f409f4ff53 | |||
| eab737a45c | |||
| b422480002 | |||
| 3d18f55155 | |||
| 10b38cda93 | |||
| 6490ee46b7 | |||
| 642c8f9859 | |||
| 755bda2275 | |||
| 05a7e5011f | |||
| 3abb7f0eaf | |||
| 5b93fc6a27 | |||
| 1e096d77ef | |||
| 38e940a392 | |||
| 7cc62f4234 | |||
| 01f378d265 | |||
| ab200cff06 | |||
| 5fe0b0a2cc | |||
| 6df54ac3ec | |||
| 1e9d91bd8f | |||
| 749336ae1f | |||
| 925e647acf | |||
| 148d26d943 | |||
| 2bfd30f7d7 | |||
| f4bb33de4b | |||
| 49f0a7a89a | |||
| f1182df776 | |||
| 1828274a99 | |||
| 813343928a | |||
| cc44a8863c | |||
| f3e58440a2 | |||
| 4cbda74df4 | |||
| c6bb9586ef | |||
| b219392d59 | |||
| f6b4587fe8 | |||
| 72d9795d7f | |||
| 54832a8fe4 | |||
| d144ab0164 | |||
| 87993368f9 | |||
| 3de0cf5ab4 | |||
| f5ff30df83 | |||
| 45ea7b3cc7 | |||
| 023b018ed2 | |||
| 98a22c2b55 | |||
| b88f7aac32 | |||
| 7519dee502 | |||
| 8746ab547e | |||
| 2c5597ae4b | |||
| 8a56b8ad3a | |||
| b934621651 | |||
| bf5b3f96e9 | |||
| 4d375e72f0 | |||
| 7cc59fbbbe | |||
| d53def5853 | |||
| af45d55b3f | |||
| 3168704858 | |||
| bf18d84273 | |||
| 9b0f8a0c55 | |||
| 192f83164c | |||
| 78d8be311c |
12
.github/CODEOWNERS
vendored
@ -16,6 +16,7 @@ src/COMPRESS/* @akohlmey
|
||||
src/GPU/* @ndtrung81
|
||||
src/KOKKOS/* @stanmoore1
|
||||
src/KIM/* @ellio167
|
||||
src/LATTE/* @cnegre
|
||||
src/USER-CGDNA/* @ohenrich
|
||||
src/USER-CGSDK/* @akohlmey
|
||||
src/USER-COLVARS/* @giacomofiorin
|
||||
@ -43,3 +44,14 @@ src/USER-MISC/*_grem.* @dstelter92
|
||||
|
||||
# tools
|
||||
tools/msi2lmp/* @akohlmey
|
||||
|
||||
# cmake
|
||||
cmake/* @junghans @rbberger
|
||||
|
||||
# python
|
||||
python/* @rbberger
|
||||
|
||||
# docs
|
||||
doc/utils/*/* @rbberger
|
||||
doc/Makefile @rbberger
|
||||
doc/README @rbberger
|
||||
|
||||
2
README
@ -25,7 +25,7 @@ The LAMMPS distribution includes the following files and directories:
|
||||
README this file
|
||||
LICENSE the GNU General Public License (GPL)
|
||||
bench benchmark problems
|
||||
couple code coupling examples using LAMMPS as a library
|
||||
cmake CMake build system
|
||||
doc documentation
|
||||
examples simple test problems
|
||||
lib libraries LAMMPS can be linked with
|
||||
|
||||
@ -2,15 +2,16 @@
|
||||
# CMake build system
|
||||
# This file is part of LAMMPS
|
||||
# Created by Christoph Junghans and Richard Berger
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(lammps)
|
||||
project(lammps CXX)
|
||||
set(SOVERSION 0)
|
||||
set(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||
set(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib)
|
||||
get_filename_component(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
|
||||
|
||||
#To not conflict with old Makefile build system, we build everything here
|
||||
|
||||
# To avoid conflicts with the conventional Makefile build system, we build everything here
|
||||
file(GLOB LIB_SOURCES ${LAMMPS_SOURCE_DIR}/*.cpp)
|
||||
file(GLOB LMP_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||
list(REMOVE_ITEM LIB_SOURCES ${LMP_SOURCES})
|
||||
@ -23,13 +24,23 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
|
||||
|
||||
# remove any style headers in the src dir
|
||||
file(GLOB SRC_STYLE_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
if(SRC_STYLE_FILES)
|
||||
file(REMOVE ${SRC_STYLE_FILES})
|
||||
endif()
|
||||
|
||||
enable_language(CXX)
|
||||
# check for files auto-generated by make-based buildsystem
|
||||
# this is fast, so check for it all the time
|
||||
message(STATUS "Running check for auto-generated files from make-based build system")
|
||||
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h)
|
||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||
get_filename_component(FILENAME "${_SRC}" NAME)
|
||||
if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
|
||||
message(FATAL_ERROR "\n########################################################################\n"
|
||||
"Found header file(s) generated by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${LAMMPS_SOURCE_DIR} purge\n"
|
||||
"to remove\n"
|
||||
"########################################################################")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
######################################################################
|
||||
# compiler tests
|
||||
@ -41,28 +52,80 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
|
||||
endif()
|
||||
|
||||
# GNU compiler features
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable code coverage" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_ADDRESS "Enable address sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_ADDRESS)
|
||||
if(ENABLE_SANITIZE_ADDRESS)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_UNDEFINED "Enable undefined behavior sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_UNDEFINED)
|
||||
if(ENABLE_SANITIZE_UNDEFINED)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_THREAD "Enable thread sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_THREAD)
|
||||
if(ENABLE_SANITIZE_THREAD)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# User input options #
|
||||
########################################################################
|
||||
option(BUILD_SHARED_LIBS "Build shared libs" OFF)
|
||||
if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
option(BUILD_EXE "Build lmp binary" ON)
|
||||
if(BUILD_EXE)
|
||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
|
||||
mark_as_advanced(LAMMPS_MACHINE)
|
||||
if(LAMMPS_MACHINE)
|
||||
set(LAMMPS_MACHINE "_${LAMMPS_MACHINE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(BUILD_LIB "Build LAMMPS library" OFF)
|
||||
if(BUILD_LIB)
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
set(LIB_SUFFIX "" CACHE STRING "Suffix to append to liblammps and pkg-config file")
|
||||
mark_as_advanced(LIB_SUFFIX)
|
||||
if(LIB_SUFFIX)
|
||||
set(LIB_SUFFIX "_${LIB_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_EXE AND NOT BUILD_LIB)
|
||||
message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE")
|
||||
endif()
|
||||
|
||||
option(DEVELOPER_MODE "Enable developer mode" OFF)
|
||||
mark_as_advanced(DEVELOPER_MODE)
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(LAMMPS_LINK_LIBS)
|
||||
set(LAMMPS_DEPS)
|
||||
set(LAMMPS_API_DEFINES)
|
||||
option(ENABLE_MPI "Build MPI version" OFF)
|
||||
if(ENABLE_MPI)
|
||||
|
||||
find_package(MPI QUIET)
|
||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||
if(BUILD_MPI)
|
||||
find_package(MPI REQUIRED)
|
||||
include_directories(${MPI_C_INCLUDE_PATH})
|
||||
include_directories(${MPI_CXX_INCLUDE_PATH})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MPI_CXX_LIBRARIES})
|
||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||
if(LAMMPS_LONGLONG_TO_LONG)
|
||||
add_definitions(-DLAMMPS_LONGLONG_TO_LONG)
|
||||
endif()
|
||||
else()
|
||||
enable_language(C)
|
||||
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c)
|
||||
add_library(mpi_stubs STATIC ${MPI_SOURCES})
|
||||
include_directories(${LAMMPS_SOURCE_DIR}/STUBS)
|
||||
@ -83,12 +146,6 @@ if(LAMMPS_EXCEPTIONS)
|
||||
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_EXCEPTIONS")
|
||||
endif()
|
||||
|
||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary and liblammps (WON'T enable any features automatically")
|
||||
mark_as_advanced(LAMMPS_MACHINE)
|
||||
if(LAMMPS_MACHINE)
|
||||
set(LAMMPS_MACHINE "_${LAMMPS_MACHINE}")
|
||||
endif()
|
||||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Verbose makefile" OFF)
|
||||
|
||||
option(ENABLE_TESTING "Enable testing" OFF)
|
||||
@ -96,26 +153,23 @@ if(ENABLE_TESTING)
|
||||
enable_testing()
|
||||
endif(ENABLE_TESTING)
|
||||
|
||||
option(ENABLE_ALL "Build all default packages" OFF)
|
||||
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR
|
||||
KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ
|
||||
REAX REPLICA RIGID SHOCK SNAP SRD)
|
||||
set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE
|
||||
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESO
|
||||
USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
|
||||
USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
|
||||
KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ REAX REPLICA RIGID SHOCK SPIN SNAP
|
||||
SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD USER-BOCS
|
||||
USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE
|
||||
USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
|
||||
USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
|
||||
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
|
||||
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
option(ENABLE_${PKG} "Build ${PKG} Package" ${ENABLE_ALL})
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
option(ENABLE_${PKG} "Build ${PKG} Package" OFF)
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
|
||||
macro(pkg_depends PKG1 PKG2)
|
||||
if(ENABLE_${PKG1} AND NOT ENABLE_${PKG2})
|
||||
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
|
||||
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
|
||||
endif()
|
||||
endmacro()
|
||||
@ -123,39 +177,51 @@ endmacro()
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(QEQ MANYBODY)
|
||||
pkg_depends(USER-ATC MANYBODY)
|
||||
pkg_depends(USER-H5MD MPI)
|
||||
pkg_depends(USER-LB MPI)
|
||||
pkg_depends(USER-MISC MANYBODY)
|
||||
pkg_depends(USER-PHONON KSPACE)
|
||||
pkg_depends(CORESHELL KSPACE)
|
||||
|
||||
######################################################
|
||||
# packages with special compiler needs or external libs
|
||||
######################################################
|
||||
if(ENABLE_REAX OR ENABLE_MEAM OR ENABLE_USER-QUIP OR ENABLE_USER-QMMM OR ENABLE_LATTE)
|
||||
if(PKG_REAX OR PKG_MEAM OR PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE)
|
||||
enable_language(Fortran)
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_KOKKOS OR ENABLE_MSCG)
|
||||
# starting with CMake 3.1 this is all you have to do to enforce C++11
|
||||
set(CMAKE_CXX_STANDARD 11) # C++11...
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
|
||||
if(PKG_MEAM OR PKG_USER-H5MD OR PKG_USER-QMMM)
|
||||
enable_language(C)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-OMP OR ENABLE_KOKKOS OR ENABLE_USER-INTEL)
|
||||
find_package(OpenMP QUIET)
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
if(BUILD_OMP OR PKG_USER-OMP OR PKG_KOKKOS OR PKG_USER-INTEL)
|
||||
find_package(OpenMP REQUIRED)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(ENABLE_KSPACE)
|
||||
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
|
||||
set_property(CACHE FFT PROPERTY STRINGS KISSFFT FFTW3 MKL FFTW2)
|
||||
if(PKG_KSPACE)
|
||||
option(FFT_SINGLE "Use single precision FFT instead of double" OFF)
|
||||
set(FFTW "FFTW3")
|
||||
if(FFT_SINGLE)
|
||||
set(FFTW "FFTW3F")
|
||||
add_definitions(-DFFT_SINGLE)
|
||||
endif()
|
||||
find_package(${FFTW} QUIET)
|
||||
if(${FFTW}_FOUND)
|
||||
set(FFT "${FFTW}" CACHE STRING "FFT library for KSPACE package")
|
||||
else()
|
||||
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
|
||||
endif()
|
||||
set_property(CACHE FFT PROPERTY STRINGS KISSFFT ${FFTW} MKL)
|
||||
if(NOT FFT STREQUAL "KISSFFT")
|
||||
find_package(${FFT} REQUIRED)
|
||||
add_definitions(-DFFT_${FFT})
|
||||
if(NOT FFT STREQUAL "FFTW3F")
|
||||
add_definitions(-DFFT_FFTW)
|
||||
else()
|
||||
add_definitions(-DFFT_${FFT})
|
||||
endif()
|
||||
include_directories(${${FFT}_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${${FFT}_LIBRARIES})
|
||||
endif()
|
||||
@ -166,28 +232,23 @@ if(ENABLE_KSPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE)
|
||||
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
|
||||
find_package(LAPACK)
|
||||
if(NOT LAPACK_FOUND)
|
||||
enable_language(Fortran)
|
||||
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.f)
|
||||
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.[fF])
|
||||
add_library(linalg STATIC ${LAPACK_SOURCES})
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
if(FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
target_compile_options(linalg PRIVATE -fno-second-underscore)
|
||||
endif()
|
||||
set(LAPACK_LIBRARIES linalg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_PYTHON)
|
||||
if(PKG_PYTHON)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
add_definitions(-DLMP_PYTHON)
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PYTHON_LIBRARY})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(BUILD_LIB AND BUILD_SHARED_LIBS)
|
||||
if(NOT PYTHON_INSTDIR)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
-c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
@ -197,16 +258,25 @@ if(ENABLE_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
find_package(JPEG QUIET)
|
||||
option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
|
||||
if(WITH_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
add_definitions(-DLAMMPS_JPEG)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${JPEG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package(PNG)
|
||||
find_package(ZLIB)
|
||||
find_package(PNG QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
if(PNG_FOUND AND ZLIB_FOUND)
|
||||
option(WITH_PNG "Enable PNG support" ON)
|
||||
else()
|
||||
option(WITH_PNG "Enable PNG support" OFF)
|
||||
endif()
|
||||
if(WITH_PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
add_definitions(-DLAMMPS_PNG)
|
||||
@ -214,85 +284,131 @@ endif()
|
||||
|
||||
find_program(GZIP_EXECUTABLE gzip)
|
||||
find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE)
|
||||
if(GZIP_FOUND)
|
||||
option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND})
|
||||
if(WITH_GZIP)
|
||||
if(NOT GZIP_FOUND)
|
||||
message(FATAL_ERROR "gzip executable not found")
|
||||
endif()
|
||||
add_definitions(-DLAMMPS_GZIP)
|
||||
endif()
|
||||
|
||||
find_program(FFMPEG_EXECUTABLE ffmpeg)
|
||||
find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE)
|
||||
if(FFMPEG_FOUND)
|
||||
option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND})
|
||||
if(WITH_FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
message(FATAL_ERROR "ffmpeg executable not found")
|
||||
endif()
|
||||
add_definitions(-DLAMMPS_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VORONOI)
|
||||
find_package(VORO REQUIRED) #some distros
|
||||
if(PKG_VORONOI)
|
||||
option(DOWNLOAD_VORO "Download voro++ (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_VORO)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(voro_build
|
||||
URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
|
||||
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
|
||||
CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(voro_build SOURCE_DIR)
|
||||
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
|
||||
set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS voro_build)
|
||||
else()
|
||||
find_package(VORO)
|
||||
if(NOT VORO_FOUND)
|
||||
message(FATAL_ERROR "VORO not found, help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
include_directories(${VORO_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_LATTE)
|
||||
find_package(LATTE QUIET)
|
||||
if(NOT LATTE_FOUND)
|
||||
if(PKG_LATTE)
|
||||
option(DOWNLOAD_LATTE "Download latte (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_LATTE)
|
||||
message(STATUS "LATTE not found - we will build our own")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(latte_build
|
||||
URL https://github.com/lanl/LATTE/archive/v1.1.1.tar.gz
|
||||
URL_MD5 cb86f1d2473ce00aa61ff6a023154b03
|
||||
URL https://github.com/lanl/LATTE/archive/v1.2.1.tar.gz
|
||||
URL_MD5 bed76e7e76c545c36dd848a8f1fd35eb
|
||||
SOURCE_SUBDIR cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
|
||||
)
|
||||
ExternalProject_get_property(latte_build INSTALL_DIR)
|
||||
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)
|
||||
list(APPEND LAMMPS_DEPS latte_build)
|
||||
else()
|
||||
find_package(LATTE)
|
||||
if(NOT LATTE_FOUND)
|
||||
message(FATAL_ERROR "LATTE not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-MOLFILE)
|
||||
if(PKG_USER-MOLFILE)
|
||||
add_library(molfile INTERFACE)
|
||||
target_include_directories(molfile INTERFACE ${LAMMPS_LIB_SOURCE_DIR}/molfile)
|
||||
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
|
||||
list(APPEND LAMMPS_LINK_LIBS molfile)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-NETCDF)
|
||||
if(PKG_USER-NETCDF)
|
||||
find_package(NetCDF REQUIRED)
|
||||
include_directories(NETCDF_INCLUDE_DIR)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${NETCDF_LIBRARY})
|
||||
add_definitions(-DLMP_HAS_NETCDF -DNC_64BIT_DATA=0x0020)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-SMD)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
if(PKG_USER-SMD)
|
||||
option(DOWNLOAD_Eigen3 "Download Eigen3 (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_Eigen3)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(Eigen3_build
|
||||
URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
|
||||
URL_MD5 1a47e78efe365a97de0c022d127607c3
|
||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
|
||||
set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR})
|
||||
list(APPEND LAMMPS_DEPS Eigen3_build)
|
||||
else()
|
||||
find_package(Eigen3)
|
||||
if(NOT Eigen3_FOUND)
|
||||
message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_Eigen3=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-QUIP)
|
||||
if(PKG_USER-QUIP)
|
||||
find_package(QUIP REQUIRED)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-QMMM)
|
||||
if(PKG_USER-QMMM)
|
||||
message(WARNING "Building QMMM with CMake is still experimental")
|
||||
find_package(QE REQUIRED)
|
||||
include_directories(${QE_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-VTK)
|
||||
if(PKG_USER-VTK)
|
||||
find_package(VTK REQUIRED NO_MODULE)
|
||||
include(${VTK_USE_FILE})
|
||||
add_definitions(-DLAMMPS_VTK)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${VTK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_KIM)
|
||||
find_package(KIM QUIET)
|
||||
if(NOT KIM_FOUND)
|
||||
message(STATUS "KIM not found - we will build our own")
|
||||
if(PKG_KIM)
|
||||
option(DOWNLOAD_KIM "Download kim-api (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_KIM)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(kim_build
|
||||
URL https://github.com/openkim/kim-api/archive/v1.9.4.tar.gz
|
||||
URL_MD5 f4d35a1705eed46d64c7c0ab448ff3e0
|
||||
URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
|
||||
URL_MD5 9f66efc128da33039e30659f36fc6d00
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
)
|
||||
@ -300,41 +416,62 @@ if(ENABLE_KIM)
|
||||
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
|
||||
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
|
||||
list(APPEND LAMMPS_DEPS kim_build)
|
||||
else()
|
||||
find_package(KIM)
|
||||
if(NOT KIM_FOUND)
|
||||
message(FATAL_ERROR "KIM not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES})
|
||||
include_directories(${KIM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_MSCG)
|
||||
if(PKG_MSCG)
|
||||
find_package(GSL REQUIRED)
|
||||
set(LAMMPS_LIB_MSCG_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/mscg)
|
||||
set(MSCG_TARBALL ${LAMMPS_LIB_MSCG_BIN_DIR}/MS-CG-master.zip)
|
||||
set(LAMMPS_LIB_MSCG_BIN_DIR ${LAMMPS_LIB_MSCG_BIN_DIR}/MSCG-release-master/src)
|
||||
if(NOT EXISTS ${LAMMPS_LIB_MSCG_BIN_DIR})
|
||||
if(NOT EXISTS ${MSCG_TARBALL})
|
||||
message(STATUS "Downloading ${MSCG_TARBALL}")
|
||||
file(DOWNLOAD
|
||||
https://github.com/uchicago-voth/MSCG-release/archive/master.zip
|
||||
${MSCG_TARBALL} SHOW_PROGRESS) #EXPECTED_MD5 cannot be due due to master
|
||||
option(DOWNLOAD_MSCG "Download latte (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_MSCG)
|
||||
include(ExternalProject)
|
||||
if(NOT LAPACK_FOUND)
|
||||
set(EXTRA_MSCG_OPTS "-DLAPACK_LIBRARIES=${CMAKE_CURRENT_BINARY_DIR}/liblinalg.a")
|
||||
endif()
|
||||
ExternalProject_Add(mscg_build
|
||||
URL https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz
|
||||
URL_MD5 8c45e269ee13f60b303edd7823866a91
|
||||
SOURCE_SUBDIR src/CMake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} ${EXTRA_MSCG_OPTS}
|
||||
BUILD_COMMAND make mscg INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(mscg_build BINARY_DIR)
|
||||
set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a)
|
||||
ExternalProject_get_property(mscg_build SOURCE_DIR)
|
||||
set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS mscg_build)
|
||||
if(NOT LAPACK_FOUND)
|
||||
file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS})
|
||||
add_dependencies(mscg_build linalg)
|
||||
endif()
|
||||
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_DIRS, or set DOWNLOAD_MSCG=ON to download it")
|
||||
endif()
|
||||
message(STATUS "Unpacking ${MSCG_TARBALL}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${MSCG_TARBALL}
|
||||
WORKING_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/mscg)
|
||||
endif()
|
||||
file(GLOB MSCG_SOURCES ${LAMMPS_LIB_MSCG_BIN_DIR}/*.cpp)
|
||||
add_library(mscg STATIC ${MSCG_SOURCES})
|
||||
list(APPEND LAMMPS_LINK_LIBS mscg)
|
||||
target_compile_options(mscg PRIVATE -DDIMENSION=3 -D_exclude_gromacs=1)
|
||||
target_include_directories(mscg PUBLIC ${LAMMPS_LIB_MSCG_BIN_DIR})
|
||||
target_link_libraries(mscg ${GSL_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MSCG_LIBRARIES} ${GSL_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
include_directories(${MSCG_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(PKG_COMPRESS)
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
########################################################################
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFileCXX)
|
||||
foreach(HEADER math.h)
|
||||
check_include_file(${HEADER} FOUND_${HEADER})
|
||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
||||
if(NOT FOUND_${HEADER})
|
||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
||||
endif(NOT FOUND_${HEADER})
|
||||
@ -343,6 +480,9 @@ endforeach(HEADER)
|
||||
set(MATH_LIBRARIES "m" CACHE STRING "math library")
|
||||
mark_as_advanced( MATH_LIBRARIES )
|
||||
include(CheckLibraryExists)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.4")
|
||||
enable_language(C) # check_library_exists isn't supported without a c compiler before v3.4
|
||||
endif()
|
||||
foreach(FUNC sin cos)
|
||||
check_library_exists(${MATH_LIBRARIES} ${FUNC} "" FOUND_${FUNC}_${MATH_LIBRARIES})
|
||||
if(NOT FOUND_${FUNC}_${MATH_LIBRARIES})
|
||||
@ -360,25 +500,16 @@ RegisterStyles(${LAMMPS_SOURCE_DIR})
|
||||
##############################################
|
||||
# add sources of enabled packages
|
||||
############################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES})
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
# ignore PKG files which were manually installed in src folder
|
||||
# headers are ignored during RegisterStyles
|
||||
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/*.h)
|
||||
|
||||
foreach(PKG_FILE in ${${PKG}_SOURCES})
|
||||
get_filename_component(FNAME ${PKG_FILE} NAME)
|
||||
list(REMOVE_ITEM LIB_SOURCES ${LAMMPS_SOURCE_DIR}/${FNAME})
|
||||
endforeach()
|
||||
# check for package files in src directory due to old make system
|
||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||
|
||||
foreach(PKG_FILE in ${${PKG}_HEADERS})
|
||||
get_filename_component(FNAME ${PKG_FILE} NAME)
|
||||
DetectAndRemovePackageHeader(${LAMMPS_SOURCE_DIR}/${FNAME})
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_${PKG})
|
||||
if(PKG_${PKG})
|
||||
# detects styles in package and adds them to global list
|
||||
RegisterStyles(${${PKG}_SOURCES_DIR})
|
||||
|
||||
@ -387,12 +518,23 @@ foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# dedicated check for entire contents of accelerator packages
|
||||
foreach(PKG ${ACCEL_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/*.h)
|
||||
|
||||
# check for package files in src directory due to old make system
|
||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||
endforeach()
|
||||
|
||||
##############################################
|
||||
# add lib sources of (simple) enabled packages
|
||||
############################################
|
||||
foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
|
||||
USER-QMMM)
|
||||
if(ENABLE_${SIMPLE_LIB})
|
||||
if(PKG_${SIMPLE_LIB})
|
||||
string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
|
||||
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.F
|
||||
@ -413,40 +555,26 @@ foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_USER-AWPMD)
|
||||
if(PKG_USER-AWPMD)
|
||||
target_link_libraries(awpmd ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-ATC)
|
||||
if(PKG_USER-ATC)
|
||||
target_link_libraries(atc ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-H5MD)
|
||||
if(PKG_USER-H5MD)
|
||||
find_package(HDF5 REQUIRED)
|
||||
target_link_libraries(h5md ${HDF5_LIBRARIES})
|
||||
target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_MEAM AND FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
foreach(FSRC ${meam_SOURCES})
|
||||
string(REGEX REPLACE "^.*\\." "" FEXT "${FSRC}")
|
||||
list(FIND CMAKE_Fortran_SOURCE_FILE_EXTENSIONS "${FEXT}" FINDEX)
|
||||
if(FINDEX GREATER -1)
|
||||
set_property(SOURCE ${FSRC} APPEND PROPERTY COMPILE_FLAGS "-fno-second-underscore")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(ENABLE_REAX AND FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
target_compile_options(reax PRIVATE -fno-second-underscore)
|
||||
endif()
|
||||
|
||||
|
||||
######################################################################
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
######################################################################
|
||||
if(ENABLE_USER-OMP)
|
||||
if(PKG_USER-OMP)
|
||||
set(USER-OMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-OMP)
|
||||
set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp
|
||||
${USER-OMP_SOURCES_DIR}/thr_omp.cpp
|
||||
@ -463,7 +591,7 @@ if(ENABLE_USER-OMP)
|
||||
include_directories(${USER-OMP_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_KOKKOS)
|
||||
if(PKG_KOKKOS)
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
add_definitions(-DLMP_KOKKOS)
|
||||
@ -499,7 +627,7 @@ if(ENABLE_KOKKOS)
|
||||
RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
|
||||
|
||||
if(ENABLE_USER-DPD)
|
||||
if(PKG_USER-DPD)
|
||||
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h)
|
||||
@ -512,7 +640,7 @@ if(ENABLE_KOKKOS)
|
||||
include_directories(${KOKKOS_PKG_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT)
|
||||
if(PKG_OPT)
|
||||
set(OPT_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPT)
|
||||
set(OPT_SOURCES)
|
||||
set_property(GLOBAL PROPERTY "OPT_SOURCES" "${OPT_SOURCES}")
|
||||
@ -526,7 +654,34 @@ if(ENABLE_OPT)
|
||||
include_directories(${OPT_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-INTEL)
|
||||
if(PKG_USER-INTEL)
|
||||
if(NOT DEVELOPER_MODE)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
message(FATAL_ERROR "USER-INTEL is needed at least 2016 intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
option(INJECT_KNL_FLAG "Inject flags for KNL build" OFF)
|
||||
if(INJECT_KNL_FLAG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xMIC-AVX512")
|
||||
endif()
|
||||
option(INJECT_INTEL_FLAG "Inject OMG fast flags for USER-INTEL" ON)
|
||||
if(INJECT_INTEL_FLAG AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
|
||||
endif()
|
||||
include(CheckCXXCompilerFlag)
|
||||
foreach(_FLAG -qopenmp -qno-offload -fno-alias -ansi-alias -restrict -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG -O2 "-fp-model fast=2" -no-prec-div -qoverride-limits -qopt-zmm-usage=high)
|
||||
check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG})
|
||||
if(COMPILER_SUPPORTS${_FLAG})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
|
||||
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/intel_preprocess.h
|
||||
${USER-INTEL_SOURCES_DIR}/intel_buffers.h
|
||||
@ -550,7 +705,10 @@ if(ENABLE_USER-INTEL)
|
||||
include_directories(${USER-INTEL_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_GPU)
|
||||
if(PKG_GPU)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
|
||||
endif()
|
||||
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||
${GPU_SOURCES_DIR}/fix_gpu.h
|
||||
@ -573,8 +731,7 @@ if(ENABLE_GPU)
|
||||
endif()
|
||||
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
|
||||
|
||||
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM architecture")
|
||||
set_property(CACHE GPU_ARCH PROPERTY STRINGS sm_10 sm_20 sm_30 sm_60)
|
||||
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM architecture (e.g. sm_60)")
|
||||
|
||||
file(GLOB GPU_LIB_CU ${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)
|
||||
@ -647,7 +804,7 @@ if(ENABLE_GPU)
|
||||
add_library(gpu STATIC ${GPU_LIB_SOURCES})
|
||||
target_link_libraries(gpu ${OpenCL_LIBRARIES})
|
||||
target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu ${OpenCL_INCLUDE_DIRS})
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC} -DMPI_GERYON -DUCL_NO_EXIT)
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT)
|
||||
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL)
|
||||
|
||||
list(APPEND LAMMPS_LINK_LIBS gpu)
|
||||
@ -683,60 +840,157 @@ GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
include_directories(${LAMMPS_SOURCE_DIR})
|
||||
include_directories(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
|
||||
######################################
|
||||
# Generate lmpinstalledpkgs.h
|
||||
######################################
|
||||
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
|
||||
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
if(PKG_${PKG})
|
||||
set(temp "${temp} \"${PKG}\",\n")
|
||||
endif()
|
||||
endforeach()
|
||||
set(temp "${temp} NULL\n};\n#endif\n\n")
|
||||
message(STATUS "Generating lmpinstalledpkgs.h...")
|
||||
file(WRITE "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h")
|
||||
|
||||
###########################################
|
||||
# Actually add executable and lib to build
|
||||
############################################
|
||||
add_library(lammps ${LIB_SOURCES})
|
||||
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if (${_index} GREATER -1)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
endif()
|
||||
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
|
||||
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
list(REMOVE_DUPLICATES LAMMPS_LINK_LIBS)
|
||||
if(BUILD_LIB)
|
||||
add_library(lammps ${LIB_SOURCES})
|
||||
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
endif()
|
||||
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LIB_SUFFIX})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
|
||||
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND LMP_SOURCES ${LIB_SOURCES})
|
||||
endif()
|
||||
|
||||
add_executable(lmp ${LMP_SOURCES})
|
||||
target_link_libraries(lmp lammps)
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
|
||||
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(ENABLE_TESTING)
|
||||
add_test(ShowHelp lmp${LAMMPS_MACHINE} -help)
|
||||
if(BUILD_EXE)
|
||||
add_executable(lmp ${LMP_SOURCES})
|
||||
if(BUILD_LIB)
|
||||
target_link_libraries(lmp lammps)
|
||||
else()
|
||||
target_link_libraries(lmp ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lmp ${LAMMPS_DEPS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
|
||||
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(ENABLE_TESTING)
|
||||
add_test(ShowHelp lmp${LAMMPS_MACHINE} -help)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##################################
|
||||
###############################################################################
|
||||
# Testing
|
||||
#
|
||||
# Requires latest gcovr (for GCC 8.1 support):#
|
||||
# pip install git+https://github.com/gcovr/gcovr.git
|
||||
###############################################################################
|
||||
if(ENABLE_COVERAGE)
|
||||
find_program(GCOVR_BINARY gcovr)
|
||||
find_package_handle_standard_args(GCOVR DEFAULT_MSG GCOVR_BINARY)
|
||||
|
||||
if(GCOVR_FOUND)
|
||||
get_filename_component(ABSOLUTE_LAMMPS_SOURCE_DIR ${LAMMPS_SOURCE_DIR} ABSOLUTE)
|
||||
|
||||
add_custom_target(
|
||||
gen_coverage_xml
|
||||
COMMAND ${GCOVR_BINARY} -s -x -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generating XML Coverage Report..."
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
gen_coverage_html
|
||||
COMMAND ${GCOVR_BINARY} -s --html --html-details -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.html
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generating HTML Coverage Report..."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Print package summary
|
||||
##################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES} ${ACCEL_PACKAGES})
|
||||
if(ENABLE_${PKG})
|
||||
###############################################################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
|
||||
if(PKG_${PKG})
|
||||
message(STATUS "Building package: ${PKG}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
|
||||
get_directory_property(CPPFLAGS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||
include(FeatureSummary)
|
||||
feature_summary(DESCRIPTION "The following packages have been found:" WHAT PACKAGES_FOUND)
|
||||
message(STATUS "<<< Build configuration >>>
|
||||
Build type ${CMAKE_BUILD_TYPE}
|
||||
Install path ${CMAKE_INSTALL_PREFIX}
|
||||
Compilers and Flags:
|
||||
C++ Compiler ${CMAKE_CXX_COMPILER}
|
||||
Type ${CMAKE_CXX_COMPILER_ID}
|
||||
C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}")
|
||||
Version ${CMAKE_CXX_COMPILER_VERSION}
|
||||
C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
|
||||
Defines ${CPPFLAGS}")
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
if(LANGUAGES MATCHES ".*Fortran.*")
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if (${_index} GREATER -1)
|
||||
message(STATUS "Fortran Compiler ${CMAKE_Fortran_COMPILER}
|
||||
Type ${CMAKE_Fortran_COMPILER_ID}
|
||||
Version ${CMAKE_Fortran_COMPILER_VERSION}
|
||||
Fortran Flags ${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
message(STATUS "Linker flags:
|
||||
list (FIND LANGUAGES "C" _index)
|
||||
if (${_index} GREATER -1)
|
||||
message(STATUS "C Compiler ${CMAKE_C_COMPILER}
|
||||
Type ${CMAKE_C_COMPILER_ID}
|
||||
Version ${CMAKE_C_COMPILER_VERSION}
|
||||
C Flags ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
if(CMAKE_EXE_LINKER_FLAGS)
|
||||
message(STATUS "Linker flags:
|
||||
Executable ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
message(STATUS "Shared libries ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
message(STATUS "Shared libraries ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
else()
|
||||
message(STATUS "Static libries ${CMAKE_STATIC_LINKER_FLAGS}")
|
||||
message(STATUS "Static libraries ${CMAKE_STATIC_LINKER_FLAGS}")
|
||||
endif()
|
||||
message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}")
|
||||
|
||||
if(BUILD_MPI)
|
||||
message(STATUS "Using mpi with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}")
|
||||
endif()
|
||||
if(PKG_GPU)
|
||||
message(STATUS "GPU Api: ${GPU_API}")
|
||||
if(GPU_API STREQUAL "CUDA")
|
||||
message(STATUS "GPU Arch: ${GPU_ARCH}")
|
||||
elseif(GPU_API STREQUAL "OpenCL")
|
||||
message(STATUS "OCL Tune: ${OCL_TUNE}")
|
||||
endif()
|
||||
message(STATUS "GPU Precision: ${GPU_PREC}")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}")
|
||||
endif()
|
||||
if(PKG_KSPACE)
|
||||
message(STATUS "Using ${FFT} as FFT")
|
||||
endif()
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
# - Find fftw2
|
||||
# Find the native FFTW2 headers and libraries.
|
||||
#
|
||||
# FFTW2_INCLUDE_DIRS - where to find fftw2.h, etc.
|
||||
# FFTW2_LIBRARIES - List of libraries when using fftw2.
|
||||
# FFTW2_FOUND - True if fftw2 found.
|
||||
#
|
||||
|
||||
find_path(FFTW2_INCLUDE_DIR fftw.h)
|
||||
|
||||
find_library(FFTW2_LIBRARY NAMES fftw)
|
||||
|
||||
set(FFTW2_LIBRARIES ${FFTW2_LIBRARY})
|
||||
set(FFTW2_INCLUDE_DIRS ${FFTW2_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW2_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(FFTW2 DEFAULT_MSG FFTW2_LIBRARY FFTW2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(FFTW2_INCLUDE_DIR FFTW2_LIBRARY )
|
||||
25
cmake/Modules/FindFFTW3F.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
# - Find fftw3f
|
||||
# Find the native FFTW3F headers and libraries.
|
||||
#
|
||||
# FFTW3F_INCLUDE_DIRS - where to find fftw3f.h, etc.
|
||||
# FFTW3F_LIBRARIES - List of libraries when using fftw3f.
|
||||
# FFTW3F_FOUND - True if fftw3f found.
|
||||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(PC_FFTW3F fftw3f)
|
||||
find_path(FFTW3F_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3F_INCLUDE_DIRS})
|
||||
|
||||
find_library(FFTW3F_LIBRARY NAMES fftw3f HINTS ${PC_FFTW3F_LIBRARY_DIRS})
|
||||
|
||||
set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY})
|
||||
set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3F_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(FFTW3F DEFAULT_MSG FFTW3F_LIBRARY FFTW3F_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(FFTW3F_INCLUDE_DIR FFTW3F_LIBRARY )
|
||||
22
cmake/Modules/FindMSCG.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
# - Find mscg
|
||||
# Find the native MSCG headers and libraries.
|
||||
#
|
||||
# MSCG_INCLUDE_DIRS - where to find mscg.h, etc.
|
||||
# MSCG_LIBRARIES - List of libraries when using mscg.
|
||||
# MSCG_FOUND - True if mscg found.
|
||||
#
|
||||
|
||||
find_path(MSCG_INCLUDE_DIR mscg.h PATH_SUFFIXES mscg)
|
||||
|
||||
find_library(MSCG_LIBRARY NAMES mscg)
|
||||
|
||||
set(MSCG_LIBRARIES ${MSCG_LIBRARY})
|
||||
set(MSCG_INCLUDE_DIRS ${MSCG_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set MSCG_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(MSCG DEFAULT_MSG MSCG_LIBRARY MSCG_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(MSCG_INCLUDE_DIR MSCG_LIBRARY )
|
||||
@ -45,14 +45,10 @@ function(FindStyleHeadersExt path style_class extension headers sources)
|
||||
endfunction(FindStyleHeadersExt)
|
||||
|
||||
function(CreateStyleHeader path filename)
|
||||
math(EXPR N "${ARGC}-2")
|
||||
|
||||
set(temp "")
|
||||
if(N GREATER 0)
|
||||
math(EXPR ARG_END "${ARGC}-1")
|
||||
|
||||
foreach(IDX RANGE 2 ${ARG_END})
|
||||
list(GET ARGV ${IDX} FNAME)
|
||||
if(ARGC GREATER 2)
|
||||
list(REMOVE_AT ARGV 0 1)
|
||||
foreach(FNAME ${ARGV})
|
||||
get_filename_component(FNAME ${FNAME} NAME)
|
||||
set(temp "${temp}#include \"${FNAME}\"\n")
|
||||
endforeach()
|
||||
@ -107,35 +103,6 @@ function(RegisterStyles search_path)
|
||||
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
|
||||
endfunction(RegisterStyles)
|
||||
|
||||
function(RemovePackageHeader headers pkg_header)
|
||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||
list(REMOVE_ITEM hlist ${pkg_header})
|
||||
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
|
||||
endfunction(RemovePackageHeader)
|
||||
|
||||
function(DetectAndRemovePackageHeader fname)
|
||||
RemovePackageHeader(ANGLE ${fname})
|
||||
RemovePackageHeader(ATOM_VEC ${fname})
|
||||
RemovePackageHeader(BODY ${fname})
|
||||
RemovePackageHeader(BOND ${fname})
|
||||
RemovePackageHeader(COMMAND ${fname})
|
||||
RemovePackageHeader(COMPUTE ${fname})
|
||||
RemovePackageHeader(DIHEDRAL ${fname})
|
||||
RemovePackageHeader(DUMP ${fname})
|
||||
RemovePackageHeader(FIX ${fname})
|
||||
RemovePackageHeader(IMPROPER ${fname})
|
||||
RemovePackageHeader(INTEGRATE ${fname})
|
||||
RemovePackageHeader(KSPACE ${fname})
|
||||
RemovePackageHeader(MINIMIZE ${fname})
|
||||
RemovePackageHeader(NBIN ${fname})
|
||||
RemovePackageHeader(NPAIR ${fname})
|
||||
RemovePackageHeader(NSTENCIL ${fname})
|
||||
RemovePackageHeader(NTOPO ${fname})
|
||||
RemovePackageHeader(PAIR ${fname})
|
||||
RemovePackageHeader(READER ${fname})
|
||||
RemovePackageHeader(REGION ${fname})
|
||||
endfunction(DetectAndRemovePackageHeader)
|
||||
|
||||
function(RegisterStylesExt search_path extension sources)
|
||||
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
|
||||
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
|
||||
@ -181,3 +148,21 @@ function(GenerateStyleHeaders output_path)
|
||||
GenerateStyleHeader(${output_path} READER reader ) # read_dump
|
||||
GenerateStyleHeader(${output_path} REGION region ) # domain
|
||||
endfunction(GenerateStyleHeaders)
|
||||
|
||||
function(DetectBuildSystemConflict lammps_src_dir)
|
||||
if(ARGC GREATER 1)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
foreach(SRC_FILE ${ARGV})
|
||||
get_filename_component(FILENAME ${SRC_FILE} NAME)
|
||||
if(EXISTS ${lammps_src_dir}/${FILENAME})
|
||||
message(FATAL_ERROR "\n########################################################################\n"
|
||||
"Found package(s) installed by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${lammps_src_dir} no-all purge\n"
|
||||
"to uninstall\n"
|
||||
"########################################################################")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction(DetectBuildSystemConflict)
|
||||
|
||||
1660
cmake/README.md
@ -13,6 +13,6 @@ Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library
|
||||
URL: http://lammps.sandia.gov
|
||||
Version:
|
||||
Requires:
|
||||
Libs: -L${libdir} -llammps@LAMMPS_MACHINE@
|
||||
Libs: -L${libdir} -llammps@LIB_SUFFIX@@
|
||||
Libs.private: -lm
|
||||
Cflags: -I${includedir} @LAMMPS_API_DEFINES@
|
||||
|
||||
22
cmake/presets/all_off.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/all_on.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
69
cmake/presets/manual_selection.cmake
Normal file
@ -0,0 +1,69 @@
|
||||
set(PKG_ASPHERE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_BODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CLASS2 OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COLLOID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CORESHELL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_DIPOLE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GPU OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GRANULAR OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KIM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KOKKOS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KSPACE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LATTE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LIB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MANYBODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MEAM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MOLECULE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MPIIO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MSCG OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_OPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PERI OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_POEMS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PYTHOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_QEQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REAX OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REPLICA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_RIGID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SHOCK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SNAP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SRD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_VOROFFOI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(PKG_USER OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-ATC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-AWPMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-BOCS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGDNA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGSDK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-COLVARS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DIFFRACTIOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DPD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DRUDE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-EFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-FEP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-H5MD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-INTEL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-LB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MANIFOLD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MEAMC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MESO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MGPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOFFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOLFILE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-NETCDF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-OMP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-PHOFFOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QMMM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QTB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QUIP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-REAXC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMTBQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SPH OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-TALLY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-UEF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-VTK OFF CACHE BOOL "" FORCE)
|
||||
22
cmake/presets/nolib.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/std.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
26
cmake/presets/std_nolib.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/user.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${USER_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
@ -9,6 +9,7 @@ TXT2RST = $(VENV)/bin/txt2rst
|
||||
ANCHORCHECK = $(VENV)/bin/doc_anchor_check
|
||||
|
||||
PYTHON = $(shell which python3)
|
||||
VIRTUALENV = virtualenv
|
||||
HAS_PYTHON3 = NO
|
||||
HAS_VIRTUALENV = NO
|
||||
|
||||
@ -16,7 +17,13 @@ ifeq ($(shell which python3 >/dev/null 2>&1; echo $$?), 0)
|
||||
HAS_PYTHON3 = YES
|
||||
endif
|
||||
|
||||
ifeq ($(shell which virtualenv-3 >/dev/null 2>&1; echo $$?), 0)
|
||||
VIRTUALENV = virtualenv-3
|
||||
HAS_VIRTUALENV = YES
|
||||
endif
|
||||
|
||||
ifeq ($(shell which virtualenv >/dev/null 2>&1; echo $$?), 0)
|
||||
VIRTUALENV = virtualenv
|
||||
HAS_VIRTUALENV = YES
|
||||
endif
|
||||
|
||||
@ -158,7 +165,7 @@ $(VENV):
|
||||
@if [ "$(HAS_PYTHON3)" == "NO" ] ; then echo "Python3 was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||
@if [ "$(HAS_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||
@( \
|
||||
virtualenv -p $(PYTHON) $(VENV); \
|
||||
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
|
||||
. $(VENV)/bin/activate; \
|
||||
pip install Sphinx; \
|
||||
pip install sphinxcontrib-images; \
|
||||
|
||||
BIN
doc/src/Eqs/dihedral_table_cut.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
11
doc/src/Eqs/dihedral_table_cut.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[12pt]{article}
|
||||
\pagestyle{empty}
|
||||
\begin{document}
|
||||
|
||||
\begin{eqnarray*}
|
||||
f(\theta) & = & K \qquad\qquad\qquad\qquad\qquad\qquad \theta < \theta_1 \\
|
||||
f(\theta) & = & K \left(1-\frac{(\theta - \theta_1)^2}{(\theta_2 - \theta_1)^2}\right) \qquad \theta_1 < \theta < \theta_2
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
||||
|
||||
BIN
doc/src/Eqs/fix_integration_spin_stdecomposition.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
40
doc/src/Eqs/fix_integration_spin_stdecomposition.tex
Normal file
@ -0,0 +1,40 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm,tikz}
|
||||
\usetikzlibrary{automata,arrows,shapes,snakes}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{tikzpicture}
|
||||
|
||||
%Global
|
||||
\node (v1) at (0,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ };
|
||||
\node (s1) at (0,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ };
|
||||
\node (r) at (0,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{r} \leftarrow \bm{r}+L_r.\Delta t$ };
|
||||
\node (s2) at (0,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ };
|
||||
\node (v2) at (0,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ };
|
||||
|
||||
\draw[line width=2pt, ->] (v1) -- (s1);
|
||||
\draw[line width=2pt, ->] (s1) -- (r);
|
||||
\draw[line width=2pt, ->] (r) -- (s2);
|
||||
\draw[line width=2pt, ->] (s2) -- (v2);
|
||||
|
||||
%Spin
|
||||
\node (s01) at (6,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ };
|
||||
\node (sN1) at (6,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$};
|
||||
\node (sN) at (6,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N} \leftarrow \bm{s}_{\rm N}+L_{s_{\rm N}}.\Delta t/2$ };
|
||||
\node (sN2) at (6,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$};
|
||||
\node (s02) at (6,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ };
|
||||
|
||||
\draw[line width=2pt,dashed, ->] (s01) -- (sN1);
|
||||
\draw[line width=2pt, ->] (sN1) -- (sN);
|
||||
\draw[line width=2pt, ->] (sN) -- (sN2);
|
||||
\draw[line width=2pt,dashed, ->] (sN2) -- (s02);
|
||||
|
||||
%from Global to Spin
|
||||
\draw[line width=2pt, dashed, ->] (s1) -- (s01.west);
|
||||
\draw[line width=2pt, dashed, ->] (s1) -- (s02.west);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/fix_langevin_spin_sLLG.jpg
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
14
doc/src/Eqs/fix_langevin_spin_sLLG.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\frac{d \vec{s}_{i}}{dt} = \frac{1}{\left(1+\lambda^2 \right)} \left( \left(
|
||||
\vec{\omega}_{i} +\vec{\eta} \right) \times \vec{s}_{i} + \lambda\, \vec{s}_{i}
|
||||
\times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) \right), \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/force_spin_aniso.jpg
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
11
doc/src/Eqs/force_spin_aniso.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{aniso} = -\sum_{{ i}=1}^{N} K_{an}(\bm{r}_{i})\, \left( \vec{s}_{i} \cdot \vec{n}_{i} \right)^2, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/force_spin_zeeman.jpg
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
11
doc/src/Eqs/force_spin_zeeman.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{zeeman} = -\mu_{B}\mu_0\sum_{i=0}^{N}g_{i} \vec{s}_{i} \cdot \vec{H}_{ext} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy.jpg
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
10
doc/src/Eqs/pair_entropy.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
s_S^i=-2\pi\rho k_B \int\limits_0^{r_m} \left [ g(r) \ln g(r) - g(r) + 1 \right ] r^2 dr ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy2.jpg
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
10
doc/src/Eqs/pair_entropy2.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
g_m^i(r) = \frac{1}{4 \pi \rho r^2} \sum\limits_{j} \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-(r-r_{ij})^2/(2\sigma^2)} ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy3.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
10
doc/src/Eqs/pair_entropy3.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
\bar{s}_S^i = \frac{\sum_j s_S^j + s_S^i}{N + 1} ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_dmi_interaction.jpg
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
16
doc/src/Eqs/pair_spin_dmi_interaction.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{dm} = -\sum_{{ i,j}=1,i\neq j}^{N}
|
||||
\left( \vec{e}_{ij} \times \vec{D} \right)
|
||||
\cdot\left(\vec{s}_{i}\times \vec{s}_{j}\right),
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
\vec{D}\left(r_{ij}\right)
|
||||
{\rm ~and~} \vec{D}\left(r_{ij}\right) = \vec{e}_{ij} \times \vec{D}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_forces.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
14
doc/src/Eqs/pair_spin_exchange_forces.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{F}^{i} = \sum_{j}^{Neighbor} \frac{\partial {J} \left(r_{ij} \right)}{
|
||||
\partial r_{ij}} \left( \vec{s}_{i}\cdot \vec{s}_{j} \right) \vec{r}_{ij}
|
||||
~~{\rm and}~~ \vec{\omega}^{i} = \frac{1}{\hbar} \sum_{j}^{Neighbor} {J}
|
||||
\left(r_{ij} \right)\,\vec{s}_{j} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_function.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
13
doc/src/Eqs/pair_spin_exchange_function.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
{J}\left( r_{ij} \right) = 4 a \left( \frac{r_{ij}}{d} \right)^2 \left( 1 - b \left( \frac{r_{ij}}{d} \right)^2 \right) e^{-\left( \frac{r_{ij}}{d}
|
||||
\right)^2 }\Theta (R_c - r_{ij}) \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_interaction.jpg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
11
doc/src/Eqs/pair_spin_exchange_interaction.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{exchange} ~=~ -\sum_{i,j,i\neq j}^{N} {J} \left(r_{ij} \right)\, \vec{s}_{i}\cdot \vec{s}_{j} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_me_forces.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
13
doc/src/Eqs/pair_spin_me_forces.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{F}^{i} = -\sum_{j}^{Neighbor} \left( \vec{s}_{i}\times \vec{s}_{j} \right)
|
||||
\times \vec{E} ~~{\rm and}~~ \vec{\omega}^{i} = -\frac{1}{\hbar}
|
||||
\sum_{j}^{Neighbor} \vec{s}_j \times \left(\vec{E}\times r_{ij} \right),\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_me_interaction.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
12
doc/src/Eqs/pair_spin_me_interaction.tex
Normal file
@ -0,0 +1,12 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{\omega}_i = -\frac{1}{\hbar} \sum_{j}^{Neighb} \vec{s}_{j}\times\vec{D}(r_{ij}) ~~{\rm and}~~
|
||||
\vec{F}_i = -\sum_{j}^{Neighb} \frac{\partial D(r_{ij})}{\partial r_{ij}} \left(\vec{s}_{i}\times \vec{s}_{j} \right) \cdot \vec{r}_{ij}, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_neel_functions.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
13
doc/src/Eqs/pair_spin_neel_functions.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{eqnarray}
|
||||
g_1(r_{ij}) &=& g(r_{ij}) + \frac{12}{35} q(r_{ij}) \nonumber \\
|
||||
q_1(r_{ij}) &=& \frac{9}{5} q(r_{ij}) \nonumber \\
|
||||
q_2(r_{ij}) &=& - \frac{2}{5} q(r_{ij}) \nonumber
|
||||
\end{eqnarray}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_neel_interaction.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
16
doc/src/Eqs/pair_spin_neel_interaction.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\mathcal{H}_{N\acute{e}el}=-\sum_{{ i,j=1,i\neq j}}^N g_1(r_{ij})\left(({\bm e}_{ij}\cdot {\bm s}_{i})({\bm e}_{ij}
|
||||
\cdot {\bm s}_{j})-\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3} \right)
|
||||
+q_1(r_{ij})\left( ({\bm e}_{ij}\cdot {\bm s}_{i})^2 -\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3}\right)
|
||||
\left( ({\bm e}_{ij}\cdot {\bm s}_{i})^2 -\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3} \right)
|
||||
+ q_2(r_{ij}) \Big( ({\bm e}_{ij}\cdot {\bm s}_{i}) ({\bm e}_{ij}\cdot {\bm s}_{j})^3 + ({\bm e}_{ij}\cdot
|
||||
{\bm s}_{j}) ({\bm e}_{ij}\cdot {\bm s}_{i})^3\Big) \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="11 May 2018 version">
|
||||
<META NAME="docnumber" CONTENT="29 Jun 2018 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
@ -19,7 +19,7 @@
|
||||
:line
|
||||
|
||||
LAMMPS Documentation :c,h1
|
||||
11 May 2018 version :c,h2
|
||||
29 Jun 2018 version :c,h2
|
||||
|
||||
Version info: :h3
|
||||
|
||||
|
||||
@ -129,6 +129,17 @@ region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE :pre
|
||||
|
||||
so that you do not have to define (or discard) a temporary variable X.
|
||||
|
||||
Additionally, the "immediate" variable expression may be followed by a
|
||||
colon, followed by a C-style format string, e.g. ":%f" or ":%.10g".
|
||||
The format string must be appropriate for a double-precision
|
||||
floating-point value. The format string is used to output the result
|
||||
of the variable expression evaluation. If a format string is not
|
||||
specified a high-precision "%.20g" is used as the default.
|
||||
|
||||
This can be useful for formatting print output to a desired precion:
|
||||
|
||||
print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom" :pre
|
||||
|
||||
Note that neither the curly-bracket or immediate form of variables can
|
||||
contain nested $ characters for other variables to substitute for.
|
||||
Thus you cannot do this:
|
||||
@ -583,6 +594,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"indent"_fix_indent.html,
|
||||
"latte"_fix_latte.html,
|
||||
"langevin (k)"_fix_langevin.html,
|
||||
"langevin/spin"_fix_langevin_spin.hmtl,
|
||||
"lineforce"_fix_lineforce.html,
|
||||
"momentum (k)"_fix_momentum.html,
|
||||
"move"_fix_move.html,
|
||||
@ -606,6 +618,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"nve/line"_fix_nve_line.html,
|
||||
"nve/noforce"_fix_nve_noforce.html,
|
||||
"nve/sphere (o)"_fix_nve_sphere.html,
|
||||
"nve/spin"_fix_nve_spin.html,
|
||||
"nve/tri"_fix_nve_tri.html,
|
||||
"nvt (iko)"_fix_nh.html,
|
||||
"nvt/asphere (o)"_fix_nvt_asphere.html,
|
||||
@ -618,6 +631,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"planeforce"_fix_planeforce.html,
|
||||
"poems"_fix_poems.html,
|
||||
"pour"_fix_pour.html,
|
||||
"precession/spin"_fix_precession_spin.html,
|
||||
"press/berendsen"_fix_press_berendsen.html,
|
||||
"print"_fix_print.html,
|
||||
"property/atom (k)"_fix_property_atom.html,
|
||||
@ -824,6 +838,7 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
"sna/atom"_compute_sna_atom.html,
|
||||
"snad/atom"_compute_sna_atom.html,
|
||||
"snav/atom"_compute_sna_atom.html,
|
||||
"spin"_compute_spin.html,
|
||||
"stress/atom"_compute_stress_atom.html,
|
||||
"temp (k)"_compute_temp.html,
|
||||
"temp/asphere"_compute_temp_asphere.html,
|
||||
@ -852,6 +867,7 @@ package"_Section_start.html#start_3.
|
||||
"dpd"_compute_dpd.html,
|
||||
"dpd/atom"_compute_dpd_atom.html,
|
||||
"edpd/temp/atom"_compute_edpd_temp_atom.html,
|
||||
"entropy/atom"_compute_entropy_atom.html,
|
||||
"fep"_compute_fep.html,
|
||||
"force/tally"_compute_tally.html,
|
||||
"heat/flux/tally"_compute_tally.html,
|
||||
@ -1017,6 +1033,10 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
"snap (k)"_pair_snap.html,
|
||||
"soft (go)"_pair_soft.html,
|
||||
"sw (giko)"_pair_sw.html,
|
||||
"spin/dmi"_pair_spin_dmi.html,
|
||||
"spin/exchange"_pair_spin_exchange.html,
|
||||
"spin/magelec"_pair_spin_magelec.html,
|
||||
"spin/neel"_pair_spin_neel.html,
|
||||
"table (gko)"_pair_table.html,
|
||||
"tersoff (giko)"_pair_tersoff.html,
|
||||
"tersoff/mod (gko)"_pair_tersoff_mod.html,
|
||||
@ -1212,7 +1232,8 @@ package"_Section_start.html#start_3.
|
||||
"nharmonic (o)"_dihedral_nharmonic.html,
|
||||
"quadratic (o)"_dihedral_quadratic.html,
|
||||
"spherical (o)"_dihedral_spherical.html,
|
||||
"table (o)"_dihedral_table.html :tb(c=4,ea=c)
|
||||
"table (o)"_dihedral_table.html,
|
||||
"table/cut"_dihedral_table_cut.html :tb(c=4,ea=c)
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -803,6 +803,13 @@ lo value must be less than the hi value for all 3 dimensions. :dd
|
||||
The box command cannot be used after a read_data, read_restart, or
|
||||
create_box command. :dd
|
||||
|
||||
{BUG: restartinfo=1 but no restart support in pair style} :dt
|
||||
|
||||
The pair style has a bug, where it does not support reading
|
||||
and writing information to a restart file, but does not set
|
||||
the member variable restartinfo to 0 as required in that case. :dd
|
||||
|
||||
|
||||
{CPU neighbor lists must be used for ellipsoid/sphere mix.} :dt
|
||||
|
||||
When using Gay-Berne or RE-squared pair styles with both ellipsoidal and
|
||||
|
||||
@ -36,7 +36,8 @@ This section describes how to perform common tasks using LAMMPS.
|
||||
6.24 "Setting parameters for the kspace_style pppm/disp command"_#howto_24
|
||||
6.25 "Polarizable models"_#howto_25
|
||||
6.26 "Adiabatic core/shell model"_#howto_26
|
||||
6.27 "Drude induced dipoles"_#howto_27 :all(b)
|
||||
6.27 "Drude induced dipoles"_#howto_27
|
||||
6.28 "Magnetic spins"_#howto_28 :all(b)
|
||||
|
||||
The example input scripts included in the LAMMPS distribution and
|
||||
highlighted in "Section 7"_Section_example.html also show how to
|
||||
@ -2906,6 +2907,54 @@ with a Coulomb pair style. It may be useful to use {coul/long/cs} or
|
||||
similar from the CORESHELL package if the core and Drude particle come
|
||||
too close, which can cause numerical issues.
|
||||
|
||||
:line
|
||||
|
||||
6.28 Magnetic spins :link(howto_28),h4
|
||||
|
||||
Classical magnetic spin simualtions can be performed via the SPIN
|
||||
package. The algrorithmic and implementation details are described in
|
||||
"Tranchida"_#Tranchida7.
|
||||
|
||||
The model representents the simulation of atomic magnetic spins
|
||||
coupled to lattice vibrations. The dynamics of those magnetic spins
|
||||
can be used to simulate a broad range a phenomena related to
|
||||
magneto-elasticity, or or to study the influence of defects on the
|
||||
magnetic properties of materials.
|
||||
|
||||
The magnetic spins are interacting with each others and with the
|
||||
lattice via pair interactions. Typically, the magnetic exchange
|
||||
interaction can be defined using the
|
||||
"pair/spin/exchange"_pair_spin_exchange.html command. This exchange
|
||||
applies a magnetic torque to a given spin, considering the orientation
|
||||
of its neighboring spins and their relative distances.
|
||||
It also applies a force on the atoms as a function of the spin
|
||||
orientations and their associated inter-atomic distances.
|
||||
|
||||
The command "fix precession/spin"_fix_precession_spin.html allows to
|
||||
apply a constant magnetic torque on all the spins in the system. This
|
||||
torque can be an external magnetic field (Zeeman interaction), or an
|
||||
uniaxial magnetic anisotropy.
|
||||
|
||||
A Langevin thermostat can be applied to those magnetic spins using
|
||||
"fix langevin/spin"_fix_langevin_spin.html. Typically, this thermostat
|
||||
can be coupled to another Langevin thermostat applied to the atoms
|
||||
using "fix langevin"_fix_langevin.html in order to simulate
|
||||
thermostated spin-lattice system.
|
||||
|
||||
The magnetic Gilbert damping can also be applied using "fix
|
||||
langevin/spin"_fix_langevin_spin.html. It allows to either dissipate
|
||||
the thermal energy of the Langevin thermostat, or to perform a
|
||||
relaxation of the magnetic configuration toward an equilibrium state.
|
||||
|
||||
All the computed magnetic properties can be outputed by two main
|
||||
commands. The first one is "compute spin"_compute_spin.html, that
|
||||
enables to evaluate magnetic averaged quantities, such as the total
|
||||
magnetization of the system along x, y, or z, the spin temperature, or
|
||||
the magnetic energy. The second command is "compute
|
||||
property/atom"_compute_property_atom.html. It enables to output all the
|
||||
per atom magnetic quantities. Typically, the orientation of a given
|
||||
magnetic spin, or the magnetic force acting on this spin.
|
||||
|
||||
:line
|
||||
:line
|
||||
|
||||
@ -2957,3 +3006,7 @@ Phys, 79, 926 (1983).
|
||||
|
||||
:link(howto-Lamoureux)
|
||||
[(Lamoureux and Roux)] G. Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003)
|
||||
|
||||
:link(Tranchida7)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
|
||||
@ -114,6 +114,7 @@ Package, Description, Doc page, Example, Library
|
||||
"RIGID"_#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, -
|
||||
"SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, -
|
||||
"SNAP"_#SNAP, quantum-fitted potential, "pair_style snap"_pair_snap.html, snap, -
|
||||
"SPIN"_#SPIN, magnetic atomic spin dynamics, "Section 6.6.28"_Section_howto.html#howto_28, SPIN, -
|
||||
"SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, -
|
||||
"VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l)
|
||||
|
||||
@ -1415,6 +1416,38 @@ examples/snap :ul
|
||||
|
||||
:line
|
||||
|
||||
SPIN package :link(SPIN),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
Model atomic magnetic spins classically, coupled to atoms moving in
|
||||
the usual manner via MD. Various pair, fix, and compute styles.
|
||||
|
||||
[Author:] Julian Tranchida (Sandia).
|
||||
|
||||
[Install or un-install:]
|
||||
|
||||
make yes-spin
|
||||
make machine :pre
|
||||
|
||||
make no-spin
|
||||
make machine :pre
|
||||
|
||||
[Supporting info:]
|
||||
|
||||
src/SPIN: filenames -> commands
|
||||
"Section 6.28"_Section_howto.html#howto_28
|
||||
"pair_style spin/dmi"_pair_spin_dmi.html
|
||||
"pair_style spin/exchange"_pair_spin_exchange.html
|
||||
"pair_style spin/magelec"_pair_spin_magelec.html
|
||||
"pair_style spin/neel"_pair_spin_neel.html
|
||||
"fix nve/spin"_fix_nve_spin.html
|
||||
"fix precession/spin"_fix_precession_spin.html
|
||||
"compute spin"_compute_spin.html
|
||||
examples/SPIN :ul
|
||||
|
||||
:line
|
||||
|
||||
SRD package :link(SRD),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
@ -15,7 +15,7 @@ atom_style style args :pre
|
||||
style = {angle} or {atomic} or {body} or {bond} or {charge} or {dipole} or \
|
||||
{dpd} or {edpd} or {mdpd} or {tdpd} or {electron} or {ellipsoid} or \
|
||||
{full} or {line} or {meso} or {molecular} or {peri} or {smd} or \
|
||||
{sphere} or {tri} or {template} or {hybrid} :ulb,l
|
||||
{sphere} or {spin} or {tri} or {template} or {hybrid} :ulb,l
|
||||
args = none for any style except the following
|
||||
{body} args = bstyle bstyle-args
|
||||
bstyle = style of body particles
|
||||
@ -38,6 +38,7 @@ atom_style full
|
||||
atom_style body nparticle 2 10
|
||||
atom_style hybrid charge bond
|
||||
atom_style hybrid charge body nparticle 2 5
|
||||
atom_style spin
|
||||
atom_style template myMols
|
||||
atom_style tdpd 2 :pre
|
||||
|
||||
@ -89,6 +90,7 @@ quantities.
|
||||
{peri} | mass, volume | mesocopic Peridynamic models |
|
||||
{smd} | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles |
|
||||
{sphere} | diameter, mass, angular velocity | granular models |
|
||||
{spin} | magnetic moment | system with magnetic particles |
|
||||
{template} | template index, template atom | small molecules with fixed topology |
|
||||
{tri} | corner points, angular momentum | rigid bodies |
|
||||
{wavepacket} | charge, spin, eradius, etag, cs_re, cs_im | AWPMD :tb(c=3,s=|)
|
||||
@ -175,6 +177,9 @@ used for calculating the field variables (e.g. stress and deformation)
|
||||
and a contact radius for calculating repulsive forces which prevent
|
||||
individual physical bodies from penetrating each other.
|
||||
|
||||
For the {spin} style, a magnetic spin is associated to each atom.
|
||||
Those spins have a norm (their magnetic moment) and a direction.
|
||||
|
||||
The {wavepacket} style is similar to {electron}, but the electrons may
|
||||
consist of several Gaussian wave packets, summed up with coefficients
|
||||
cs= (cs_re,cs_im). Each of the wave packets is treated as a separate
|
||||
@ -312,6 +317,8 @@ The {meso} style is part of the USER-SPH package for smoothed particle
|
||||
hydrodynamics (SPH). See "this PDF
|
||||
guide"_USER/sph/SPH_LAMMPS_userguide.pdf to using SPH in LAMMPS.
|
||||
|
||||
The {spin} style is part of the SPIN package.
|
||||
|
||||
The {wavepacket} style is part of the USER-AWPMD package for the
|
||||
"antisymmetrized wave packet MD method"_pair_awpmd.html.
|
||||
|
||||
|
||||
130
doc/src/compute_entropy_atom.txt
Normal file
@ -0,0 +1,130 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
compute entropy/atom command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID entropy/atom sigma cutoff keyword value ... :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command :l
|
||||
entropy/atom = style name of this compute command :l
|
||||
sigma = width of gaussians used in the g(r) smoothening :l
|
||||
cutoff = cutoff for the g(r) calculation :l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
keyword = {avg} or {local}
|
||||
{avg} values = {yes} or {no} cutoff2
|
||||
{yes} = average the pair entropy over neighbors
|
||||
{no} = do not average the pair entropy over neighbors
|
||||
cutoff2 = cutoff for the averaging over neighbors
|
||||
{local} values = {yes} or {no} = use the local density around each atom to normalize the g(r) :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute 1 all entropy/atom 0.25 5.
|
||||
compute 1 all entropy/atom 0.25 5. avg yes 5.
|
||||
compute 1 all entropy/atom 0.125 7.3 avg yes 5.1 local yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Define a computation that calculates the pair entropy fingerprint for
|
||||
each atom in the group. The fingerprint is useful to distinguish between
|
||||
ordered and disordered environments, for instance liquid and solid-like
|
||||
environments, or glassy and crystalline-like environments. Some
|
||||
applications could be the identification of grain boundaries, a
|
||||
melt-solid interface, or a solid cluster emerging from the melt.
|
||||
The advantage of this parameter over others is that no a priori
|
||||
information about the solid structure is required.
|
||||
|
||||
This parameter for atom i is computed using the following formula from
|
||||
"(Piaggi)"_#Piaggi and "(Nettleton)"_#Nettleton ,
|
||||
|
||||
:c,image(Eqs/pair_entropy.jpg)
|
||||
|
||||
where r is a distance, g(r) is the radial distribution function of atom
|
||||
i and rho is the density of the system. The g(r) computed for each
|
||||
atom i can be noisy and therefore it is smoothened using:
|
||||
|
||||
:c,image(Eqs/pair_entropy2.jpg)
|
||||
|
||||
where the sum in j goes through the neighbors of atom i, and sigma is a
|
||||
parameter to control the smoothening.
|
||||
|
||||
The input parameters are {sigma} the smoothening parameter, and the
|
||||
{cutoff} for the calculation of g(r).
|
||||
|
||||
If the keyword {avg} has the setting {yes}, then this compute also
|
||||
averages the parameter over the neighbors of atom i according to:
|
||||
|
||||
:c,image(Eqs/pair_entropy3.jpg)
|
||||
|
||||
where the sum j goes over the neighbors of atom i and N is the number
|
||||
of neighbors. This procedure provides a sharper distinction between
|
||||
order and disorder environments. In this case the input parameter
|
||||
{cutoff2} is the cutoff for the averaging over the neighbors and
|
||||
must also be specified.
|
||||
|
||||
If the {avg yes} option is used, the effective cutoff of the neighbor
|
||||
list should be {cutoff}+{cutoff2} and therefore it might be necessary
|
||||
to increase the skin of the neighbor list with:
|
||||
|
||||
neighbor skin bin :pre
|
||||
|
||||
See "neighbor"_neighbor.html for details.
|
||||
|
||||
If the {local yes} option is used, the g(r) is normalized by the
|
||||
local density around each atom, that is to say the density around each
|
||||
atom is the number of neighbors within the neighbor list cutoff divided
|
||||
by the corresponding volume. This option can be useful when dealing with
|
||||
inhomogeneus systems such as those that have surfaces.
|
||||
|
||||
Here are typical input parameters for fcc aluminum (lattice
|
||||
constant 4.05 Angstroms),
|
||||
|
||||
compute 1 all entropy/atom 0.25 5.7 avg yes 3.7 :pre
|
||||
|
||||
and for bcc sodium (lattice constant 4.23 Angstroms),
|
||||
|
||||
compute 1 all entropy/atom 0.25 7.3 avg yes 5.1 :pre
|
||||
|
||||
|
||||
[Output info:]
|
||||
|
||||
By default, this compute calculates the pair entropy value for each
|
||||
atom as a per-atom vector, which can be accessed by any command that
|
||||
uses per-atom values from a compute as input. See "Section
|
||||
6.15"_Section_howto.html#howto_15 for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The pair entropy values have units of the Boltzmann constant. They are
|
||||
always negative, and lower values (lower entropy) correspond to more
|
||||
ordered environments.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This compute is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"compute cna/atom"_compute_cna_atom.html
|
||||
"compute centro/atom"_compute_centro_atom.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The default values for the optional keywords are avg = no and local = no.
|
||||
|
||||
:line
|
||||
|
||||
:link(Piaggi)
|
||||
[(Piaggi)] Piaggi and Parrinello, J Chem Phys, 147, 114112 (2017).
|
||||
|
||||
:link(Nettleton)
|
||||
[(Nettleton)] Nettleton and Green, J Chem Phys, 29, 6 (1958).
|
||||
@ -19,6 +19,7 @@ input = one or more atom attributes :l
|
||||
x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz, mu,
|
||||
sp, spx, spy, spz, fmx, fmy, fmz,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz,
|
||||
shapex,shapey, shapez,
|
||||
@ -46,6 +47,9 @@ input = one or more atom attributes :l
|
||||
q = atom charge
|
||||
mux,muy,muz = orientation of dipole moment of atom
|
||||
mu = magnitude of dipole moment of atom
|
||||
sp = atomic magnetic spin moment
|
||||
spx, spy, spz = direction of the atomic magnetic spin
|
||||
fmx, fmy, fmz = magnetic force
|
||||
radius,diameter = radius,diameter of spherical particle
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
@ -82,7 +86,8 @@ input = one or more atom attributes :l
|
||||
|
||||
compute 1 all property/atom xs vx fx mux
|
||||
compute 2 all property/atom type
|
||||
compute 1 all property/atom ix iy iz :pre
|
||||
compute 1 all property/atom ix iy iz
|
||||
compute 3 all property/atom sp spx spy spz :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -152,6 +157,10 @@ The vector or array values will be in whatever "units"_units.html the
|
||||
corresponding attribute is in, e.g. velocity units for vx, charge
|
||||
units for q, etc.
|
||||
|
||||
For the spin quantities, sp is in the units of the Bohr magneton, spx,
|
||||
spy, and spz are adimentional quantities, and fmx, fmy and fmz are
|
||||
given in rad.THz.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
78
doc/src/compute_spin.txt
Normal file
@ -0,0 +1,78 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
compute spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID compute/spin :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command
|
||||
compute/spin = style name of this compute command :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute out_mag all compute/spin :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Define a computation that calculates magnetic quantities for a system
|
||||
of atoms having spins.
|
||||
|
||||
This compute calculates 6 magnetic quantities.
|
||||
|
||||
The three first quantities are the x,y and z coordinates of the total magnetization.
|
||||
|
||||
The fourth quantity is the norm of the total magnetization.
|
||||
|
||||
The fifth quantity is the magnetic energy.
|
||||
|
||||
The sixth one is referred to as the spin temperature, according
|
||||
to the work of "(Nurdin)"_#Nurdin1.
|
||||
|
||||
The simplest way to output the results of the compute spin calculation
|
||||
is to define some of the quantities as variables, and to use the thermo and
|
||||
thermo_style commands, for example:
|
||||
|
||||
compute out_mag all compute/spin :pre
|
||||
|
||||
variable mag_z equal c_out_mag\[3\]
|
||||
variable mag_norm equal c_out_mag\[4\]
|
||||
variable temp_mag equal c_out_mag\[6\] :pre
|
||||
|
||||
thermo 10
|
||||
thermo_style custom step v_mag_z v_mag_norm v_temp_mag :pre
|
||||
|
||||
This serie of commands evaluates the total magnetization along z, the norm of
|
||||
the total magnetization, and the magnetic temperature. Three variables are
|
||||
assigned to those quantities. The thermo and thermo_style commands print them
|
||||
every 10 timesteps.
|
||||
|
||||
|
||||
[Output info:]
|
||||
|
||||
The array values are "intensive". The array values will be in
|
||||
metal units ("units"_units.html).
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {spin} compute is part of the SPIN package.
|
||||
This compute is only enabled if LAMMPS was built with this package.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
The atom_style has to be "spin" for this compute to be valid.
|
||||
|
||||
[Related commands:] none
|
||||
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Nurdin1)
|
||||
[(Nurdin)] Nurdin and Schotte Phys Rev E, 61(4), 3579 (2000)
|
||||
|
||||
@ -31,6 +31,7 @@ Computes :h1
|
||||
compute_dpd
|
||||
compute_dpd_atom
|
||||
compute_edpd_temp_atom
|
||||
compute_entropy_atom
|
||||
compute_erotate_asphere
|
||||
compute_erotate_rigid
|
||||
compute_erotate_sphere
|
||||
@ -95,6 +96,7 @@ Computes :h1
|
||||
compute_smd_ulsph_stress
|
||||
compute_smd_vol
|
||||
compute_sna_atom
|
||||
compute_spin
|
||||
compute_stress_atom
|
||||
compute_tally
|
||||
compute_tdpd_cc_atom
|
||||
|
||||
@ -37,8 +37,8 @@ keyword = {special} :l
|
||||
|
||||
create_bonds many all all 1 1.0 1.2
|
||||
create_bonds many surf solvent 3 2.0 2.4
|
||||
create_bond single/bond 1 1 2
|
||||
create_bond single/angle 5 52 98 107 special no :pre
|
||||
create_bonds single/bond 1 1 2
|
||||
create_bonds single/angle 5 52 98 107 special no :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
||||
205
doc/src/dihedral_table_cut.txt
Normal file
@ -0,0 +1,205 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
dihedral_style table/cut command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
dihedral_style table/cut style Ntable :pre
|
||||
|
||||
style = {linear} or {spline} = method of interpolation
|
||||
Ntable = size of the internal lookup table :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
dihedral_style table/cut spline 400
|
||||
dihedral_style table/cut linear 1000
|
||||
dihedral_coeff 1 aat 1.0 177 180 file.table DIH_TABLE1
|
||||
dihedral_coeff 2 aat 0.5 170 180 file.table DIH_TABLE2 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {table/cut} dihedral style creates interpolation tables of length
|
||||
{Ntable} from dihedral potential and derivative values listed in a
|
||||
file(s) as a function of the dihedral angle "phi". In addition, an
|
||||
analytic cutoff that is quadratic in the bond-angle (theta) is applied
|
||||
in order to regularize the dihedral interaction. The dihedral table
|
||||
files are read by the "dihedral_coeff"_dihedral_coeff.html command.
|
||||
|
||||
The interpolation tables are created by fitting cubic splines to the
|
||||
file values and interpolating energy and derivative values at each of
|
||||
{Ntable} dihedral angles. During a simulation, these tables are used
|
||||
to interpolate energy and force values on individual atoms as
|
||||
needed. The interpolation is done in one of 2 styles: {linear} or
|
||||
{spline}.
|
||||
|
||||
For the {linear} style, the dihedral angle (phi) is used to find 2
|
||||
surrounding table values from which an energy or its derivative is
|
||||
computed by linear interpolation.
|
||||
|
||||
For the {spline} style, cubic spline coefficients are computed and
|
||||
stored at each of the {Ntable} evenly-spaced values in the
|
||||
interpolated table. For a given dihedral angle (phi), the appropriate
|
||||
coefficients are chosen from this list, and a cubic polynomial is used
|
||||
to compute the energy and the derivative at this angle.
|
||||
|
||||
The following coefficients must be defined for each dihedral type via
|
||||
the "dihedral_coeff"_dihedral_coeff.html command as in the example
|
||||
above.
|
||||
|
||||
style (aat)
|
||||
cutoff prefactor
|
||||
cutoff angle1
|
||||
cutoff angle2
|
||||
filename
|
||||
keyword :ul
|
||||
|
||||
The cutoff dihedral style uses a tabulated dihedral interaction with a
|
||||
cutoff function:
|
||||
|
||||
:c,image(Eqs/dihedral_table_cut.jpg)
|
||||
|
||||
The cutoff specifies an prefactor to the cutoff function. While this value
|
||||
would ordinarily equal 1 there may be situations where the value should change.
|
||||
|
||||
The cutoff angle1 specifies the angle (in degrees) below which the dihedral
|
||||
interaction is unmodified, i.e. the cutoff function is 1.
|
||||
|
||||
The cutoff function is applied between angle1 and angle2, which is the angle at
|
||||
which the cutoff function drops to zero. The value of zero effectively "turns
|
||||
off" the dihedral interaction.
|
||||
|
||||
The filename specifies a file containing tabulated energy and
|
||||
derivative values. The keyword specifies a section of the file. The
|
||||
format of this file is described below.
|
||||
|
||||
:line
|
||||
|
||||
The format of a tabulated file is as follows (without the
|
||||
parenthesized comments). It can begin with one or more comment
|
||||
or blank lines.
|
||||
|
||||
# Table of the potential and its negative derivative :pre
|
||||
|
||||
DIH_TABLE1 (keyword is the first text on line)
|
||||
N 30 DEGREES (N, NOF, DEGREES, RADIANS, CHECKU/F)
|
||||
(blank line)
|
||||
1 -168.0 -1.40351172223 0.0423346818422
|
||||
2 -156.0 -1.70447981034 0.00811786522531
|
||||
3 -144.0 -1.62956100432 -0.0184129719987
|
||||
...
|
||||
30 180.0 -0.707106781187 0.0719306095245 :pre
|
||||
|
||||
# Example 2: table of the potential. Forces omitted :pre
|
||||
|
||||
DIH_TABLE2
|
||||
N 30 NOF CHECKU testU.dat CHECKF testF.dat :pre
|
||||
|
||||
1 -168.0 -1.40351172223
|
||||
2 -156.0 -1.70447981034
|
||||
3 -144.0 -1.62956100432
|
||||
...
|
||||
30 180.0 -0.707106781187 :pre
|
||||
|
||||
A section begins with a non-blank line whose 1st character is not a
|
||||
"#"; blank lines or lines starting with "#" can be used as comments
|
||||
between sections. The first line begins with a keyword which
|
||||
identifies the section. The line can contain additional text, but the
|
||||
initial text must match the argument specified in the
|
||||
"dihedral_coeff"_dihedral_coeff.html command. The next line lists (in
|
||||
any order) one or more parameters for the table. Each parameter is a
|
||||
keyword followed by one or more numeric values.
|
||||
|
||||
Following a blank line, the next N lines list the tabulated values. On
|
||||
each line, the 1st value is the index from 1 to N, the 2nd value is
|
||||
the angle value, the 3rd value is the energy (in energy units), and
|
||||
the 4th is -dE/d(phi) also in energy units). The 3rd term is the
|
||||
energy of the 4-atom configuration for the specified angle. The 4th
|
||||
term (when present) is the negative derivative of the energy with
|
||||
respect to the angle (in degrees, or radians depending on whether the
|
||||
user selected DEGREES or RADIANS). Thus the units of the last term
|
||||
are still energy, not force. The dihedral angle values must increase
|
||||
from one line to the next.
|
||||
|
||||
Dihedral table splines are cyclic. There is no discontinuity at 180
|
||||
degrees (or at any other angle). Although in the examples above, the
|
||||
angles range from -180 to 180 degrees, in general, the first angle in
|
||||
the list can have any value (positive, zero, or negative). However
|
||||
the {range} of angles represented in the table must be {strictly} less
|
||||
than 360 degrees (2pi radians) to avoid angle overlap. (You may not
|
||||
supply entries in the table for both 180 and -180, for example.) If
|
||||
the user's table covers only a narrow range of dihedral angles,
|
||||
strange numerical behavior can occur in the large remaining gap.
|
||||
|
||||
[Parameters:]
|
||||
|
||||
The parameter "N" is required and its value is the number of table
|
||||
entries that follow. Note that this may be different than the N
|
||||
specified in the "dihedral_style table"_dihedral_style.html command.
|
||||
Let {Ntable} is the number of table entries requested dihedral_style
|
||||
command, and let {Nfile} be the parameter following "N" in the
|
||||
tabulated file ("30" in the sparse example above). What LAMMPS does
|
||||
is a preliminary interpolation by creating splines using the {Nfile}
|
||||
tabulated values as nodal points. It uses these to interpolate as
|
||||
needed to generate energy and derivative values at {Ntable} different
|
||||
points (which are evenly spaced over a 360 degree range, even if the
|
||||
angles in the file are not). The resulting tables of length {Ntable}
|
||||
are then used as described above, when computing energy and force for
|
||||
individual dihedral angles and their atoms. This means that if you
|
||||
want the interpolation tables of length {Ntable} to match exactly what
|
||||
is in the tabulated file (with effectively nopreliminary
|
||||
interpolation), you should set {Ntable} = {Nfile}. To insure the
|
||||
nodal points in the user's file are aligned with the interpolated
|
||||
table entries, the angles in the table should be integer multiples of
|
||||
360/{Ntable} degrees, or 2*PI/{Ntable} radians (depending on your
|
||||
choice of angle units).
|
||||
|
||||
The optional "NOF" keyword allows the user to omit the forces
|
||||
(negative energy derivatives) from the table file (normally located in
|
||||
the 4th column). In their place, forces will be calculated
|
||||
automatically by differentiating the potential energy function
|
||||
indicated by the 3rd column of the table (using either linear or
|
||||
spline interpolation).
|
||||
|
||||
The optional "DEGREES" keyword allows the user to specify angles in
|
||||
degrees instead of radians (default).
|
||||
|
||||
The optional "RADIANS" keyword allows the user to specify angles in
|
||||
radians instead of degrees. (Note: This changes the way the forces
|
||||
are scaled in the 4th column of the data file.)
|
||||
|
||||
The optional "CHECKU" keyword is followed by a filename. This allows
|
||||
the user to save all of the the {Ntable} different entries in the
|
||||
interpolated energy table to a file to make sure that the interpolated
|
||||
function agrees with the user's expectations. (Note: You can
|
||||
temporarily increase the {Ntable} parameter to a high value for this
|
||||
purpose. "{Ntable}" is explained above.)
|
||||
|
||||
The optional "CHECKF" keyword is analogous to the "CHECKU" keyword.
|
||||
It is followed by a filename, and it allows the user to check the
|
||||
interpolated force table. This option is available even if the user
|
||||
selected the "NOF" option.
|
||||
|
||||
Note that one file can contain many sections, each with a tabulated
|
||||
potential. LAMMPS reads the file section by section until it finds one
|
||||
that matches the specified keyword.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This dihedral style can only be used if LAMMPS was built with the
|
||||
USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_3
|
||||
section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dihedral_coeff"_dihedral_coeff.html, "dihedral_style table"_dihedral_table.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:link(dihedralcut-Salerno)
|
||||
[(Salerno)] Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018).
|
||||
@ -19,6 +19,7 @@ Dihedral Styles :h1
|
||||
dihedral_quadratic
|
||||
dihedral_spherical
|
||||
dihedral_table
|
||||
dihedral_table_cut
|
||||
dihedral_zero
|
||||
dihedral_charmm
|
||||
dihedral_class2
|
||||
|
||||
@ -15,7 +15,7 @@ dump_modify dump-ID keyword values ... :pre
|
||||
dump-ID = ID of dump to modify :ulb,l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
these keywords apply to various dump styles :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {maxfiles} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
|
||||
{append} arg = {yes} or {no}
|
||||
{at} arg = N
|
||||
N = index of frame written upon first dump
|
||||
@ -37,6 +37,8 @@ keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fi
|
||||
{image} arg = {yes} or {no}
|
||||
{label} arg = string
|
||||
string = character string (e.g. BONDS) to use in header of dump local file
|
||||
{maxfiles} arg = Fmax
|
||||
Fmax = keep only the most recent {Fmax} snapshots (one snapshot per file)
|
||||
{nfile} arg = Nf
|
||||
Nf = write this many files, one from each of Nf processors
|
||||
{pad} arg = Nchar = # of characters to convert timestep to
|
||||
@ -364,6 +366,20 @@ e.g. BONDS or ANGLES.
|
||||
|
||||
:line
|
||||
|
||||
The {maxfiles} keyword can only be used when a '*' wildcard is
|
||||
included in the dump file name, i.e. when writing a new file(s) for
|
||||
each snapshot. The specified {Fmax} is how many snapshots will be
|
||||
kept. Once this number is reached, the file(s) containing the oldest
|
||||
snapshot is deleted before a new dump file is written. If the
|
||||
specified {Fmax} <= 0, then all files are retained.
|
||||
|
||||
This can be useful for debugging, especially if you don't know on what
|
||||
timestep something bad will happen, e.g. when LAMMPS will exit with an
|
||||
error. You can dump every timestep, and limit the number of dump
|
||||
files produced, even if you run for 1000s of steps.
|
||||
|
||||
:line
|
||||
|
||||
The {nfile} or {fileper} keywords can be used in conjunction with the
|
||||
"%" wildcard character in the specified dump file name, for all dump
|
||||
styles except the {dcd}, {image}, {movie}, {xtc}, and {xyz} styles
|
||||
@ -470,7 +486,7 @@ to respond to the call from the dump command, and update the
|
||||
appropriate reference positions. This is done be defining an
|
||||
"atom-style variable"_variable.html, {check} in this example, which
|
||||
calculates a Boolean value (0 or 1) for each atom, based on the same
|
||||
criterion used by dump_modify thresh.
|
||||
criterion used by dump_modify thresh.
|
||||
|
||||
See the "compute displace/atom"_compute_displace_atom.html command for
|
||||
more details, including an example of how to produce output that
|
||||
@ -584,13 +600,13 @@ included.)
|
||||
|
||||
region foo sphere 10 20 10 15
|
||||
variable inregion atom rmask(foo)
|
||||
dump_modify ... thresh v_inregion |^ LAST
|
||||
dump_modify ... thresh v_inregion |^ LAST :pre
|
||||
|
||||
This will dump atoms which crossed the boundary of the spherical
|
||||
region since the last dump.
|
||||
|
||||
variable charge atom "(q > 0.5) || (q < -0.5)"
|
||||
dump_modify ... thresh v_charge |^ LAST
|
||||
dump_modify ... thresh v_charge |^ LAST :pre
|
||||
|
||||
This will dump atoms whose charge has changed from an absolute value
|
||||
less than 1/2 to greater than 1/2 (or vice versa) since the last dump.
|
||||
@ -901,6 +917,7 @@ flush = yes
|
||||
format = %d and %g for each integer or floating point value
|
||||
image = no
|
||||
label = ENTRIES
|
||||
maxifiles = -1
|
||||
nfile = 1
|
||||
pad = 0
|
||||
pbc = no
|
||||
|
||||
@ -205,6 +205,14 @@ a bond coefficient over time, very similar to how the {pair} keyword
|
||||
operates. The only difference is that now a bond coefficient for a
|
||||
given bond type is adapted.
|
||||
|
||||
A wild-card asterisk can be used in place of or in conjunction with
|
||||
the bond type argument to set the coefficients for multiple bond types.
|
||||
This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of
|
||||
atom types, then an asterisk with no numeric values means all types
|
||||
from 1 to N. A leading asterisk means all types from 1 to n (inclusive).
|
||||
A trailing asterisk means all types from n to N (inclusive). A middle
|
||||
asterisk means all types from m to n (inclusive).
|
||||
|
||||
Currently {bond} does not support bond_style hybrid nor bond_style
|
||||
hybrid/overlay as bond styles. The only bonds that currently are
|
||||
working with fix_adapt are
|
||||
|
||||
@ -20,14 +20,15 @@ ID, group-ID are documented in "fix"_fix.html command. Group-ID is ignored. :ulb
|
||||
bond/react = style name of this fix command :l
|
||||
zero or more common keyword/value pairs may be appended directly after 'bond/react' :l
|
||||
these apply to all reaction specifications (below) :l
|
||||
common_keyword = {stabilization}
|
||||
{stabilization} values = group-ID xmax
|
||||
group-ID = user-assigned ID of an internally-created dynamic group that excludes reacting atoms, and can be used by a subsequent time integration fix such as nvt, npt, or nve (cannot be 'all')
|
||||
{xmax} value = distance
|
||||
distance = xmax value that is used by an internally created "nve/limit"_fix_nve_limit.html integrator
|
||||
react = mandatory argument indicating new reaction specification
|
||||
react-ID = user-assigned name for the reaction
|
||||
react-group-ID = only atoms in this group are available for the reaction
|
||||
common_keyword = {stabilization} :l
|
||||
{stabilization} values = {no} or {yes} {group-ID} {xmax}
|
||||
{no} = no reaction site stabilization
|
||||
{yes} = perform reaction site stabilization
|
||||
{group-ID} = user-assigned ID for all non-reacting atoms (group created internally)
|
||||
{xmax} = xmax value that is used by an internally created "nve/limit"_fix_nve_limit.html integrator :pre
|
||||
react = mandatory argument indicating new reaction specification :l
|
||||
react-ID = user-assigned name for the reaction :l
|
||||
react-group-ID = only atoms in this group are available for the reaction :l
|
||||
Nevery = attempt reaction every this many steps :l
|
||||
Rmin = bonding pair atoms must be separated by more than Rmin to initiate reaction (distance units) :l
|
||||
Rmax = bonding pair atoms must be separated by less than Rmax to initiate reaction (distance units) :l
|
||||
@ -47,7 +48,7 @@ react = mandatory argument indicating new reaction specification
|
||||
|
||||
molecule mol1 pre_reacted_topology.txt
|
||||
molecule mol2 post_reacted_topology.txt
|
||||
fix 5 all bond/react stabilization no react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt
|
||||
fix 5 all bond/react stabilization no react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt :pre
|
||||
|
||||
molecule mol1 pre_reacted_rxn1.txt
|
||||
molecule mol2 post_reacted_rxn1.txt
|
||||
@ -56,12 +57,12 @@ molecule mol4 post_reacted_rxn2.txt
|
||||
fix 5 all bond/react stabilization yes nvt_grp .03 &
|
||||
react myrxn1 all 1 0 3.25 mol1 mol2 map_file_rxn1.txt prob 0.50 12345 &
|
||||
react myrxn2 all 1 0 2.75 mol3 mol4 map_file_rxn2.txt prob 0.25 12345
|
||||
fix 6 nvt_grp nvt temp 300 300 100 # system-wide thermostat must be defined after bond/react :pre
|
||||
fix 6 nvt_grp nvt temp 300 300 100 # set thermostat after bond/react :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Initiate complex covalent bonding (topology) changes. These topology
|
||||
changes will be referred to as "reactions" throughout this
|
||||
changes will be referred to as 'reactions' throughout this
|
||||
documentation. Topology changes are defined in pre- and post-reaction
|
||||
molecule templates and can include creation and deletion of bonds,
|
||||
angles, dihedrals, impropers, bond-types, angle-types, dihedral-types,
|
||||
@ -81,10 +82,10 @@ occurred 3) build a molecule template of the reaction site after the
|
||||
reaction has occurred 4) create a map that relates the
|
||||
template-atom-IDs of each atom between pre- and post-reaction molecule
|
||||
templates 5) fill a simulation box with molecules and run a simulation
|
||||
with fix/bond react.
|
||||
with fix bond/react.
|
||||
|
||||
Only one 'fix bond/react' command can be used at a time. Multiple
|
||||
reactions can be simultaneously applied by specifying multiple 'react'
|
||||
reactions can be simultaneously applied by specifying multiple {react}
|
||||
arguments to a single 'fix bond/react' command. This syntax is
|
||||
necessary because the 'common keywords' are applied to all reactions.
|
||||
|
||||
@ -99,10 +100,11 @@ typically be set to the maximum distance that non-reacting atoms move
|
||||
during the simulation.
|
||||
|
||||
The group-ID set using the {stabilization} keyword should be a
|
||||
previously unused group-ID. The fix bond/react command creates a
|
||||
"dynamic group"_group.html of this name that excludes reacting atoms.
|
||||
This dynamic group-ID should then be used by a subsequent system-wide
|
||||
time integrator, as shown in the second example above. It is currently
|
||||
previously unused group-ID. It cannot be specified as 'all'. The fix
|
||||
bond/react command creates a "dynamic group"_group.html of this name
|
||||
that includes all non-reacting atoms. This dynamic group-ID should
|
||||
then be used by a subsequent system-wide time integrator such as nvt,
|
||||
npt, or nve, as shown in the second example above. It is currently
|
||||
necessary to place the time integration command after the fix
|
||||
bond/react command due to the internal dynamic grouping performed by
|
||||
fix bond/react.
|
||||
@ -111,9 +113,9 @@ NOTE: The internally created group currently applies to all atoms in
|
||||
the system, i.e. you should generally not have a separate thermostat
|
||||
which acts on the 'all' group.
|
||||
|
||||
The following comments pertain to each 'react' argument:
|
||||
The following comments pertain to each {react} argument:
|
||||
|
||||
A check for possible new reaction sites is performed every Nevery
|
||||
A check for possible new reaction sites is performed every {Nevery}
|
||||
timesteps.
|
||||
|
||||
Two conditions must be met for a reaction to occur. First a bonding
|
||||
@ -124,20 +126,20 @@ modified to match the post-reaction template.
|
||||
|
||||
A bonding atom pair will be identified if several conditions are met.
|
||||
First, a pair of atoms within the specified react-group-ID of type
|
||||
typei and typej must separated by a distance between Rmin and Rmax. It
|
||||
is possible that multiple bonding atom pairs are identified: if the
|
||||
bonding atoms in the pre-reacted template are not 1-2, 1-3, or 1-4
|
||||
neighbors, the closest bonding atom partner is set as its bonding
|
||||
partner; otherwise, the farthest potential partner is chosen. Then, if
|
||||
both an atomi and atomj have each other as their nearest bonding
|
||||
partners, these two atoms are identified as the bonding atom pair of
|
||||
the reaction site. Once this unique bonding atom pair is identified
|
||||
for each reaction, there could two or more reactions that involve a
|
||||
given atom on the same timestep. If this is the case, only one such
|
||||
reaction is permitted to occur. This reaction is chosen randomly from
|
||||
all potential reactions. This capability allows e.g. for different
|
||||
reaction pathways to proceed from identical reaction sites with
|
||||
user-specified probabilities.
|
||||
typei and typej must separated by a distance between {Rmin} and
|
||||
{Rmax}. It is possible that multiple bonding atom pairs are
|
||||
identified: if the bonding atoms in the pre-reacted template are not
|
||||
1-2, 1-3, or 1-4 neighbors, the closest bonding atom partner is set as
|
||||
its bonding partner; otherwise, the farthest potential partner is
|
||||
chosen. Then, if both an atomi and atomj have each other as their
|
||||
nearest bonding partners, these two atoms are identified as the
|
||||
bonding atom pair of the reaction site. Once this unique bonding atom
|
||||
pair is identified for each reaction, there could two or more
|
||||
reactions that involve a given atom on the same timestep. If this is
|
||||
the case, only one such reaction is permitted to occur. This reaction
|
||||
is chosen randomly from all potential reactions. This capability
|
||||
allows e.g. for different reaction pathways to proceed from identical
|
||||
reaction sites with user-specified probabilities.
|
||||
|
||||
The pre-reacted molecule template is specified by a molecule command.
|
||||
This molecule template file contains a sample reaction site and its
|
||||
@ -175,77 +177,43 @@ A discussion of correctly handling this is also provided on the
|
||||
|
||||
The map file is a text document with the following format:
|
||||
|
||||
Format of the map file
|
||||
A map file has a header and a body. The header of map file the
|
||||
contains one mandatory keyword and one optional keyword. The mandatory
|
||||
keyword is 'equivalences' and the optional keyword is 'edgeIDs':
|
||||
|
||||
A map file has a header and a body. The header appears first. The
|
||||
first line of the header is always skipped; it typically contains a
|
||||
description of the file. Lines can have a trailing comment starting
|
||||
with '#' that is ignored. If the line is blank (only whitespace after
|
||||
comment is deleted), it is skipped. If the line contains a header
|
||||
keyword, the corresponding value(s) is read from the line. If it
|
||||
doesn't contain a header keyword, the line begins the body of the
|
||||
file.
|
||||
N {equivalences} = # of atoms N in the reaction molecule templates
|
||||
N {edgeIDs} = # of edge atoms N in the pre-reacted molecule template :pre
|
||||
|
||||
The header contains one mandatory keyword and one optional keyword.
|
||||
The mandatory keyword is 'equivalences' and the optional keyword is
|
||||
'edgeIDs.' These specify the number of atoms in the pre- and
|
||||
post-reacted templates and the number of edge atoms in pre-reacted
|
||||
template, respectively.
|
||||
|
||||
The body contains two mandatory sections and one optional section. The
|
||||
first section begins with the keyword 'BondingIDs' and lists the atom
|
||||
IDs of the bonding atom pair in the pre-reacted molecule template. The
|
||||
second mandatory section begins with the keyword 'Equivalences' and
|
||||
lists a one-to-one correspondence between atom IDs of the pre- and
|
||||
post-reacted templates. The optional section begins with the keyword
|
||||
'EdgeIDs' and list the atom IDs of edge atoms in the pre-reacted
|
||||
The body of the map file contains two mandatory sections and one
|
||||
optional section. The first mandatory section begins with the keyword
|
||||
'BondingIDs' and lists the atom IDs of the bonding atom pair in the
|
||||
pre-reacted molecule template. The second mandatory section begins
|
||||
with the keyword 'Equivalences' and lists a one-to-one correspondence
|
||||
between atom IDs of the pre- and post-reacted templates. The first
|
||||
column is an atom ID of the pre-reacted molecule template, and the
|
||||
second column is the corresponding atom ID of the post-reacted
|
||||
molecule template. The optional section begins with the keyword
|
||||
'EdgeIDs' and lists the atom IDs of edge atoms in the pre-reacted
|
||||
molecule template.
|
||||
|
||||
Format of the header of the map file
|
||||
|
||||
These are the recognized header keywords. Header lines can come in any
|
||||
order. The value(s) are read from the beginning of the line. Thus the
|
||||
keyword 'equivalences' should be in a line like "25 equivalences."
|
||||
|
||||
equivalences = # of atoms in the pre- and post-reacted molecule
|
||||
templates edgeIDs = # of edge atoms in the pre-reacted molecule template :pre
|
||||
|
||||
The edgeIDs keyword is optional.
|
||||
|
||||
Format of the body of the map file
|
||||
|
||||
These are the section keywords for the body of the file.
|
||||
|
||||
BondingIDs, EdgeIDs = list of atom IDs of bonding and edge atoms in
|
||||
the pre-reacted molecule template
|
||||
|
||||
Equivalences = a two column list where the first column is an atom ID
|
||||
of the pre-reacted molecule template, and the second column is the
|
||||
corresponding atom ID of the post-reacted molecule template
|
||||
|
||||
The bondingIDs section will always contain two atom IDs, corresponding
|
||||
to the bonding atom pairs of the pre-reacted map file. The
|
||||
Equivalences section will contain as many rows as there are atoms in
|
||||
the pre- and post-reacted molecule templates. The edgeIDs section is
|
||||
optional, but would contain an atom ID for each edge atom in the
|
||||
pre-reacted molecule template.
|
||||
|
||||
A sample map file is given below:
|
||||
|
||||
:line
|
||||
|
||||
# This is a map file :pre
|
||||
# this is a map file :pre
|
||||
|
||||
2 edgeIDs
|
||||
7 equivalences :pre
|
||||
|
||||
BondingIDs :pre
|
||||
|
||||
3 5 :pre
|
||||
3
|
||||
5 :pre
|
||||
|
||||
EdgeIDs :pre
|
||||
|
||||
1 7 :pre
|
||||
1
|
||||
7 :pre
|
||||
|
||||
Equivalences :pre
|
||||
|
||||
@ -264,13 +232,13 @@ within LAMMPS that store bond topology are updated to reflect the
|
||||
post-reacted molecule template. All force fields with fixed bonds,
|
||||
angles, dihedrals or impropers are supported.
|
||||
|
||||
A few capabilities to note: 1) You may specify as many 'react'
|
||||
A few capabilities to note: 1) You may specify as many {react}
|
||||
arguments as desired. For example, you could break down a complicated
|
||||
reaction mechanism into several reaction steps, each defined by its
|
||||
own 'react' argument. 2) While typically a bond is formed or removed
|
||||
own {react} argument. 2) While typically a bond is formed or removed
|
||||
between the bonding atom pairs specified in the pre-reacted molecule
|
||||
template, this is not required. 3) By reversing the order of the pre-
|
||||
and post- reacted molecule templates in another 'react' argument, you
|
||||
and post- reacted molecule templates in another {react} argument, you
|
||||
can allow for the possibility of one or more reverse reactions.
|
||||
|
||||
The optional keywords deal with the probability of a given reaction
|
||||
@ -304,7 +272,7 @@ you can use the internally-created dynamic group named
|
||||
would thermostat the group of all atoms currently involved in a
|
||||
reaction:
|
||||
|
||||
fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1
|
||||
fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1 :pre
|
||||
|
||||
NOTE: This command must be added after the fix bond/react command, and
|
||||
will apply to all reactions.
|
||||
@ -324,10 +292,11 @@ local command.
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
||||
are relevant to this fix.
|
||||
files"_restart.html, aside from internally-created per-atom
|
||||
properties. None of the "fix_modify"_fix_modify.html options are
|
||||
relevant to this fix.
|
||||
|
||||
This fix computes one statistic for each 'react' argument that it
|
||||
This fix computes one statistic for each {react} argument that it
|
||||
stores in a global vector, of length 'number of react arguments', that
|
||||
can be accessed by various "output
|
||||
commands"_Section_howto.html#howto_15. The vector values calculated by
|
||||
@ -359,5 +328,5 @@ The option defaults are stabilization = no, stabilize_steps = 60
|
||||
|
||||
:line
|
||||
|
||||
:link(Gissinger) [(Gissinger)] Gissinger, Jensen and Wise, Polymer,
|
||||
128, 211 (2017).
|
||||
:link(Gissinger)
|
||||
[(Gissinger)] Gissinger, Jensen and Wise, Polymer, 128, 211 (2017).
|
||||
|
||||
@ -19,7 +19,9 @@ Tmin = minimum dt allowed which can be NULL (time units)
|
||||
Tmax = maximum dt allowed which can be NULL (time units)
|
||||
Xmax = maximum distance for an atom to move in one timestep (distance units)
|
||||
zero or more keyword/value pairs may be appended
|
||||
keyword = {units} :ul
|
||||
keyword = {emax} or {units} :ul
|
||||
{emax} value = Emax
|
||||
Emax = maximum kinetic energy change for an atom in one timestep (energy units)
|
||||
{units} value = {lattice} or {box}
|
||||
lattice = Xmax is defined in lattice units
|
||||
box = Xmax is defined in simulation box units :pre
|
||||
@ -27,12 +29,17 @@ keyword = {units} :ul
|
||||
[Examples:]
|
||||
|
||||
fix 5 all dt/reset 10 1.0e-5 0.01 0.1
|
||||
fix 5 all dt/reset 10 0.01 2.0 0.2 units box :pre
|
||||
fix 5 all dt/reset 10 0.01 2.0 0.2 units box
|
||||
fix 5 all dt/reset 5 NULL 0.001 0.5 emax 30 units box :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Reset the timestep size every N steps during a run, so that no atom
|
||||
moves further than Xmax, based on current atom velocities and forces.
|
||||
moves further than the specified {Xmax} distance, based on current
|
||||
atom velocities and forces. Optionally an additional criterion is
|
||||
imposed by the {emax} keyword, so that no atom's kinetic energy
|
||||
changes by more than the specified {Emax}.
|
||||
|
||||
This can be useful when starting from a configuration with overlapping
|
||||
atoms, where forces will be large. Or it can be useful when running
|
||||
an impact simulation where one or more high-energy atoms collide with
|
||||
@ -48,7 +55,12 @@ current velocity and force. Since performing this calculation exactly
|
||||
would require the solution to a quartic equation, a cheaper estimate
|
||||
is generated. The estimate is conservative in that the atom's
|
||||
displacement is guaranteed not to exceed {Xmax}, though it may be
|
||||
smaller.
|
||||
smaller.
|
||||
|
||||
In addition if the {emax} keyword is used, the specified {Emax} value
|
||||
is enforced as a limit on how much an atom's kinetic energy can
|
||||
change. If the timestep required is even smaller than for the {Xmax}
|
||||
displacement, then the smaller timestep is used.
|
||||
|
||||
Given this putative timestep for each atom, the minimum timestep value
|
||||
across all atoms is computed. Then the {Tmin} and {Tmax} bounds are
|
||||
@ -87,4 +99,5 @@ minimization"_minimize.html.
|
||||
|
||||
[Default:]
|
||||
|
||||
The option defaults is units = lattice.
|
||||
The option defaults are units = lattice, and no emax kinetic energy
|
||||
limit.
|
||||
|
||||
102
doc/src/fix_langevin_spin.txt
Normal file
@ -0,0 +1,102 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix langevin/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID langevin/spin T Tdamp seed :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||
langevin/spin = style name of this fix command :l
|
||||
T = desired temperature of the bath (temperature units, K in metal units) :l
|
||||
Tdamp = transverse magnetic damping parameter (adim) :l
|
||||
seed = random number seed to use for white noise (positive integer) :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 2 all langevin/spin 300.0 0.01 21 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Apply a Langevin thermostat as described in "(Mayergoyz)"_#Mayergoyz1 to the
|
||||
magnetic spins associated to the atoms.
|
||||
Used with "fix nve/spin"_fix_nve_spin.html, this command performs
|
||||
Brownian dynamics (BD).
|
||||
A random torque and a transverse dissipation are applied to each spin i according to
|
||||
the following stochastic differential equation:
|
||||
|
||||
:c,image(Eqs/fix_langevin_spin_sLLG.jpg)
|
||||
|
||||
with lambda the transverse damping, and eta a random verctor.
|
||||
This equation is referred to as the stochastic Landau-Lifshitz-Gilbert (sLLG)
|
||||
equation.
|
||||
|
||||
The components of eta are drawn from a Gaussian probability law. Their amplitude
|
||||
is defined as a proportion of the temperature of the external thermostat T (in K
|
||||
in metal units).
|
||||
|
||||
More details about this implementation are reported in "(Tranchida)"_#Tranchida2.
|
||||
|
||||
Note: due to the form of the sLLG equation, this fix has to be defined just
|
||||
before the nve/spin fix (and after all other magnetic fixes).
|
||||
As an example:
|
||||
|
||||
fix 1 all precession/spin zeeman 0.01 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 300.0 0.01 21
|
||||
fix 3 all nve/spin lattice yes :pre
|
||||
|
||||
is correct, but defining a force/spin command after the langevin/spin command
|
||||
would give an error message.
|
||||
|
||||
Note: The random # {seed} must be a positive integer. A Marsaglia random
|
||||
number generator is used. Each processor uses the input seed to
|
||||
generate its own unique seed and its own stream of random numbers.
|
||||
Thus the dynamics of the system will not be identical on two runs on
|
||||
different numbers of processors.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. Because the state of the random number generator
|
||||
is not saved in restart files, this means you cannot do "exact"
|
||||
restarts with this fix, where the simulation continues on the same as
|
||||
if no restart had taken place. However, in a statistical sense, a
|
||||
restarted simulation should produce the same behavior.
|
||||
|
||||
This fix is not invoked during "energy minimization"_minimize.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {langevin/spin} fix is part of the SPIN package.
|
||||
This style is only enabled if LAMMPS was built with this package.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
The numerical integration has to be performed with {fix nve/spin}
|
||||
when {fix langevin/spin} is enabled.
|
||||
|
||||
This fix has to be the last defined magnetic fix before the time
|
||||
integration fix (e.g. {fix nve/spin}).
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix nve/spin"_fix_nve_spin.html, "fix precession/spin"_fix_precession_spin.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Mayergoyz1)
|
||||
[(Mayergoyz)] I.D. Mayergoyz, G. Bertotti, C. Serpico (2009). Elsevier (2009)
|
||||
|
||||
:link(Tranchida2)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
76
doc/src/fix_nve_spin.txt
Normal file
@ -0,0 +1,76 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix nve/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID nve/spin keyword values :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||
nve/spin = style name of this fix command :l
|
||||
keyword = {lattice} :l
|
||||
{lattice} value = {no} or {yes} :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 1 all nve/spin lattice no :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Perform a symplectic integration for the spin or spin-lattice system.
|
||||
|
||||
The {lattice} keyword defines if the spins are integrated on a lattice
|
||||
of fixed atoms (lattice = no), or if atoms are moving (lattice = yes).
|
||||
|
||||
By default (lattice = yes), a spin-lattice integration is performed.
|
||||
|
||||
The {nve/spin} fix applies a Suzuki-Trotter decomposition to
|
||||
the equations of motion of the spin lattice system, following the scheme:
|
||||
|
||||
:c,image(Eqs/fix_integration_spin_stdecomposition.jpg)
|
||||
|
||||
according to the implementation reported in "(Omelyan)"_#Omelyan1.
|
||||
|
||||
A sectoring method enables this scheme for parallel calculations.
|
||||
The implementation of this sectoring algorithm is reported
|
||||
in "(Tranchida)"_#Tranchida1.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix style can only be used if LAMMPS was built with the
|
||||
SPIN package. See the "Making LAMMPS"_Section_start.html#start_3
|
||||
section for more info on packages.
|
||||
|
||||
To use the spin algorithm, it is necessary to define a map with
|
||||
the atom_modify command. Typically, by adding the command:
|
||||
|
||||
atom_modify map array :pre
|
||||
|
||||
before you create the simulation box. Note that the keyword "hash"
|
||||
instead of "array" is also valid.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "fix nve"_fix_nve.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Omelyan1)
|
||||
[(Omelyan)] Omelyan, Mryglod, and Folk. Phys. Rev. Lett.
|
||||
86(5), 898. (2001).
|
||||
|
||||
:link(Tranchida1)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
87
doc/src/fix_precession_spin.txt
Normal file
@ -0,0 +1,87 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix precession/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group precession/spin style args :pre
|
||||
|
||||
ID, group are documented in "fix"_fix.html command :ulb,l
|
||||
precession/spin = style name of this fix command :l
|
||||
style = {zeeman} or {anisotropy} :l
|
||||
{zeeman} args = H x y z
|
||||
H = intensity of the magnetic field (in Tesla)
|
||||
x y z = vector direction of the field
|
||||
{anisotropy} args = K x y z
|
||||
K = intensity of the magnetic anisotropy (in eV)
|
||||
x y z = vector direction of the anisotropy :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0
|
||||
fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0
|
||||
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.001 0.0 0.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Impose a force torque to each magnetic spin in the group.
|
||||
|
||||
Style {zeeman} is used for the simulation of the interaction
|
||||
between the magnetic spins in the defined group and an external
|
||||
magnetic field:
|
||||
|
||||
:c,image(Eqs/force_spin_zeeman.jpg)
|
||||
|
||||
with mu0 the vacuum permeability, muB the Bohr magneton (muB = 5.788 eV/T
|
||||
in metal units).
|
||||
|
||||
Style {anisotropy} is used to simulate an easy axis or an easy plane
|
||||
for the magnetic spins in the defined group:
|
||||
|
||||
:c,image(Eqs/force_spin_aniso.jpg)
|
||||
|
||||
with n defining the direction of the anisotropy, and K (in eV) its intensity.
|
||||
If K>0, an easy axis is defined, and if K<0, an easy plane is defined.
|
||||
|
||||
In both cases, the choice of (x y z) imposes the vector direction for the force.
|
||||
Only the direction of the vector is important; it's length is ignored.
|
||||
|
||||
Both styles can be combined within one single command line.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
By default, the energy associated to this fix is not added to the potential
|
||||
energy of the system.
|
||||
The "fix_modify"_fix_modify.html {energy} option is supported by this fix
|
||||
to add this magnetic potential energy to the potential energy of the system,
|
||||
|
||||
fix 1 all precession/spin zeeman 1.0 0.0 0.0 1.0
|
||||
fix_modify 1 energy yes :pre
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
"output commands"_Section_howto.html#howto_15.
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {precession/spin} style is part of the SPIN package.
|
||||
This style is only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html
|
||||
|
||||
[Default:] none
|
||||
@ -241,19 +241,17 @@ molecule ID = 0) surrounding rigid bodies, this may not be what you
|
||||
want. Thus you should be careful to use a fix group that only
|
||||
includes atoms you want to be part of rigid bodies.
|
||||
|
||||
Bodystyle {custom} is similar to bodystyle {molecule}, however some
|
||||
custom properties are used to group atoms into rigid bodies. The
|
||||
special case for molecule/body ID = 0 is not available. Possible
|
||||
custom properties are an integer property associated with atoms through
|
||||
"fix property/atom"_fix_property_atom.html or an atom style variable
|
||||
or an atomfile style variable. For the latter two, the variable value
|
||||
will be rounded to an integer and then rigid bodies defined from
|
||||
those values.
|
||||
|
||||
For bodystyle {group}, each of the listed groups is treated as a
|
||||
separate rigid body. Only atoms that are also in the fix group are
|
||||
included in each rigid body. This option is only allowed for the
|
||||
{rigid} styles.
|
||||
Bodystyle {custom} is similar to bodystyle {molecule} except that it
|
||||
is more flexible in using other per-atom properties to define the sets
|
||||
of atoms that form rigid bodies. An integer vector defined by the
|
||||
"fix property/atom"_fix_property_atom.txt command can be used. Or an
|
||||
"atom-style or atomfile-style variable"_variable.html can be used; the
|
||||
floating-point value produced by the variable is rounded to an
|
||||
integer. As with bondstyle {molecule}, each set of atoms in the fix
|
||||
groups with the same integer value is treated as a different rigid
|
||||
body. Since fix property/atom vectors and atom-style variables
|
||||
produce values for all atoms, you should be careful to use a fix group
|
||||
that only includes atoms you want to be part of rigid bodies.
|
||||
|
||||
NOTE: To compute the initial center-of-mass position and other
|
||||
properties of each rigid body, the image flags for each atom in the
|
||||
|
||||
@ -61,6 +61,7 @@ Fixes :h1
|
||||
fix_langevin
|
||||
fix_langevin_drude
|
||||
fix_langevin_eff
|
||||
fix_langevin_spin
|
||||
fix_latte
|
||||
fix_lb_fluid
|
||||
fix_lb_momentum
|
||||
@ -99,6 +100,7 @@ Fixes :h1
|
||||
fix_nve_manifold_rattle
|
||||
fix_nve_noforce
|
||||
fix_nve_sphere
|
||||
fix_nve_spin
|
||||
fix_nve_tri
|
||||
fix_nvk
|
||||
fix_nvt_asphere
|
||||
@ -114,6 +116,7 @@ Fixes :h1
|
||||
fix_planeforce
|
||||
fix_poems
|
||||
fix_pour
|
||||
fix_precession_spin
|
||||
fix_press_berendsen
|
||||
fix_print
|
||||
fix_property_atom
|
||||
|
||||
@ -176,6 +176,7 @@ fix_ipi.html
|
||||
fix_langevin.html
|
||||
fix_langevin_drude.html
|
||||
fix_langevin_eff.html
|
||||
fix_langevin_spin.html
|
||||
fix_latte.html
|
||||
fix_lb_fluid.html
|
||||
fix_lb_momentum.html
|
||||
@ -213,6 +214,7 @@ fix_nve_line.html
|
||||
fix_nve_manifold_rattle.html
|
||||
fix_nve_noforce.html
|
||||
fix_nve_sphere.html
|
||||
fix_nve_spin.html
|
||||
fix_nve_tri.html
|
||||
fix_nvk.html
|
||||
fix_nvt_asphere.html
|
||||
@ -229,6 +231,7 @@ fix_pimd.html
|
||||
fix_planeforce.html
|
||||
fix_poems.html
|
||||
fix_pour.html
|
||||
fix_precession_spin.html
|
||||
fix_press_berendsen.html
|
||||
fix_print.html
|
||||
fix_property_atom.html
|
||||
@ -317,6 +320,7 @@ compute_displace_atom.html
|
||||
compute_dpd.html
|
||||
compute_dpd_atom.html
|
||||
compute_edpd_temp_atom.html
|
||||
compute_entropy_atom.html
|
||||
compute_erotate_asphere.html
|
||||
compute_erotate_rigid.html
|
||||
compute_erotate_sphere.html
|
||||
@ -381,6 +385,7 @@ compute_smd_ulsph_strain_rate.html
|
||||
compute_smd_ulsph_stress.html
|
||||
compute_smd_vol.html
|
||||
compute_sna_atom.html
|
||||
compute_spin.html
|
||||
compute_stress_atom.html
|
||||
compute_tally.html
|
||||
compute_tdpd_cc_atom.html
|
||||
@ -506,6 +511,10 @@ pair_sph_lj.html
|
||||
pair_sph_rhosum.html
|
||||
pair_sph_taitwater.html
|
||||
pair_sph_taitwater_morris.html
|
||||
pair_spin_dmi.html
|
||||
pair_spin_exchange.html
|
||||
pair_spin_magelec.html
|
||||
pair_spin_neel.html
|
||||
pair_srp.html
|
||||
pair_sw.html
|
||||
pair_table.html
|
||||
@ -582,6 +591,7 @@ dihedral_opls.html
|
||||
dihedral_quadratic.html
|
||||
dihedral_spherical.html
|
||||
dihedral_table.html
|
||||
dihedral_table_cut.html
|
||||
dihedral_zero.html
|
||||
|
||||
lammps_commands_improper.html
|
||||
|
||||
@ -98,19 +98,20 @@ molecule (header keyword = inertia).
|
||||
NOTE: The molecule command can be used to define molecules with bonds,
|
||||
angles, dihedrals, imporopers, or special bond lists of neighbors
|
||||
within a molecular topology, so that you can later add the molecules
|
||||
to your simulation, via one or more of the commands listed above. If
|
||||
such molecules do not already exist when LAMMPS creates the simulation
|
||||
box, via the "create_box"_create_box.html or
|
||||
"read_data"_read_data.html command, when you later add them you may
|
||||
overflow the pre-allocated data structures which store molecular
|
||||
topology information with each atom, and an error will be generated.
|
||||
Both the "create_box"_create_box.html command and the data files read
|
||||
by the "read_data"_read_data.html command have "extra" options which
|
||||
to your simulation, via one or more of the commands listed above.
|
||||
Since this topology-related information requires that suitable storage
|
||||
is reserved when LAMMPS creates the simulation box (e.g. when using
|
||||
the "create_box"_create_box.html command or the
|
||||
"read_data"_read_data.html command) suitable space has to be reserved
|
||||
so you do not overflow those pre-allocated data structures when adding
|
||||
molecules later. Both the "create_box"_create_box.html command and
|
||||
the "read_data"_read_data.html command have "extra" options which
|
||||
insure space is allocated for storing topology info for molecules that
|
||||
are added later.
|
||||
|
||||
The format of an individual molecule file is similar to the data file
|
||||
read by the "read_data"_read_data.html commands, and is as follows.
|
||||
The format of an individual molecule file is similar but
|
||||
(not identical) to the data file read by the "read_data"_read_data.html
|
||||
commands, and is as follows.
|
||||
|
||||
A molecule file has a header and a body. The header appears first.
|
||||
The first line of the header is always skipped; it typically contains
|
||||
@ -455,7 +456,11 @@ of SHAKE clusters.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:] none
|
||||
[Restrictions:]
|
||||
|
||||
This command must come after the simulation box is define by a
|
||||
"read_data"_read_data.html, "read_restart"_read_restart.html, or
|
||||
"create_box"_create_box.html command.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
||||
@ -12,12 +12,14 @@ pair_style born/omp command :h3
|
||||
pair_style born/gpu command :h3
|
||||
pair_style born/coul/long command :h3
|
||||
pair_style born/coul/long/cs command :h3
|
||||
pair_style born/coul/long/cs/gpu command :h3
|
||||
pair_style born/coul/long/gpu command :h3
|
||||
pair_style born/coul/long/omp command :h3
|
||||
pair_style born/coul/msm command :h3
|
||||
pair_style born/coul/msm/omp command :h3
|
||||
pair_style born/coul/wolf command :h3
|
||||
pair_style born/coul/wolf/cs command :h3
|
||||
pair_style born/coul/wolf/cs/gpu command :h3
|
||||
pair_style born/coul/wolf/gpu command :h3
|
||||
pair_style born/coul/wolf/omp command :h3
|
||||
pair_style born/coul/dsf command :h3
|
||||
|
||||
@ -20,6 +20,7 @@ pair_style coul/dsf/kk command :h3
|
||||
pair_style coul/dsf/omp command :h3
|
||||
pair_style coul/long command :h3
|
||||
pair_style coul/long/cs command :h3
|
||||
pair_style coul/long/cs/gpu command :h3
|
||||
pair_style coul/long/omp command :h3
|
||||
pair_style coul/long/gpu command :h3
|
||||
pair_style coul/long/kk command :h3
|
||||
|
||||
@ -95,9 +95,9 @@ This pair style can only be used via the {pair} keyword of the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This pair style is part of the USER-MISC package. It is only enabled
|
||||
if LAMMPS was built with that package. See
|
||||
the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
This pair style is part of the MANYBODY package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
This pair style requires the "newton"_newton.html setting to be "on"
|
||||
for pair interactions.
|
||||
@ -117,4 +117,5 @@ appropriate units if your simulation doesn't use "metal" units.
|
||||
:line
|
||||
|
||||
:link(Gao)
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics
|
||||
Research B 191 (2012) 504.
|
||||
|
||||
@ -23,15 +23,15 @@ pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
pair_coeff * * rebo CH.airebo NULL NULL C
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
pair_coeff 2 2 coul/shield 0.69 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {ilp/graphene/hbn} style computes the registry-dependent interlayer
|
||||
potential (RDILP) potential as described in "(Leven)"_#Leven and
|
||||
potential (ILP) potential as described in "(Leven)"_#Leven and
|
||||
"(Maaravi)"_#Maaravi2. The normals are calculated in the way as described
|
||||
in "(Kolmogorov)"_#Kolmogorov2.
|
||||
|
||||
@ -61,13 +61,13 @@ NOTE: The parameters presented in the parameter file (e.g. BNCH.ILP),
|
||||
are fitted with taper function by setting the cutoff equal to 16.0
|
||||
Angstrom. Using different cutoff or taper function should be careful.
|
||||
|
||||
NOTE: Two parameter files (BNCH.ILP and BNCH-old.ILP) are presented,
|
||||
BNCH-old.ILP contains the parameters published in "(Leven)"_#Leven and
|
||||
"(Maaravi)"_#Maaravi2, which is only suitable for long-range
|
||||
interaction. The parameters in BNCH.ILP provides a good description both
|
||||
for short- and long-range interaction. This is useful for simulations in
|
||||
the high pressure (small interlayer distances) regime. The comparison of
|
||||
two sets of parameters can be found in "(Ouyang)"_#Ouyang.
|
||||
NOTE: Two new sets of parameters of ILP for two-dimensional hexagonal Materials
|
||||
are presented in "(Ouyang)"_#Ouyang1. These parameters provide a good description
|
||||
in both short- and long-range interaction regime, while the old ILP parameters
|
||||
published in "(Leven)"_#Leven and "(Maaravi)"_#Maaravi2 are only suitable for
|
||||
long-range interaction regime. This feature is essential for simulations in
|
||||
high-pressure regime (i.e., the interlayer distance smaller than the equilibrium distance).
|
||||
The benchmark tests and comparison of these parameters can be found in "(Ouyang)"_#Ouyang1.
|
||||
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
@ -101,12 +101,12 @@ units, if your simulation does not use {metal} units.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
"pair_none"_pair_none.html
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html
|
||||
"pair_style pair_kolmogorov_crespi_z"_pair_kolmogorov_crespi_z.html
|
||||
"pair_style pair_kolmogorov_crespi_full"_pair_kolmogorov_crespi_full.html
|
||||
"pair_style pair_coul_shield"_pair_coul_shield.html
|
||||
"pair_coeff"_pair_coeff.html,
|
||||
"pair_none"_pair_none.html,
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html,
|
||||
"pair_style pair_kolmogorov_crespi_z"_pair_kolmogorov_crespi_z.html,
|
||||
"pair_style pair_kolmogorov_crespi_full"_pair_kolmogorov_crespi_full.html,
|
||||
"pair_style pair_coul_shield"_pair_coul_shield.html.
|
||||
|
||||
[Default:] tap_flag = 1
|
||||
|
||||
@ -121,5 +121,5 @@ units, if your simulation does not use {metal} units.
|
||||
:link(Kolmogorov2)
|
||||
[(Kolmogorov)] A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005)
|
||||
|
||||
:link(Ouyang)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, O. Hod, M. Urbakh, In preparation.
|
||||
:link(Ouyang1)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, M. Urbakh, O. Hod, arXiv:1806.09555 (2018).
|
||||
|
||||
@ -27,7 +27,7 @@ pair_coeff * * kolmogorov/crespi/full CC.KC C C :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {kolmogorov/crespi/full} style computes the Kolmogorov-Crespi
|
||||
The {kolmogorov/crespi/full} style computes the Kolmogorov-Crespi (KC)
|
||||
interaction potential as described in "(Kolmogorov)"_#Kolmogorov1.
|
||||
No simplification is made,
|
||||
|
||||
@ -51,6 +51,15 @@ and {rcut} are included in the parameter file. {S} is designed to
|
||||
facilitate scaling of energies. {rcut} is designed to build the neighbor
|
||||
list for calculating the normals for each atom pair.
|
||||
|
||||
NOTE: A new set of parameters of KC potential for hydrocarbons (CH.KC)
|
||||
is presented in "(Ouyang)"_#Ouyang2. The parameters in CH.KC provides
|
||||
a good description in both short- and long-range interaction regime,
|
||||
while the original parameters (CC.KC) published in "(Kolmogorov)"_#Kolmogorov1
|
||||
are only suitable for long-range interaction regime.
|
||||
This feature is essential for simulations in high-pressure regime
|
||||
(i.e., the interlayer distance smaller than the equilibrium distance).
|
||||
The benchmark tests and comparison of these parameters can be found in "(Ouyang)"_#Ouyang2.
|
||||
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
|
||||
@ -83,11 +92,11 @@ units.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
"pair_none"_pair_none.html
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html
|
||||
"pair_style kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html
|
||||
"pair_style ilp/graphene/hbn"_pair_ilp_graphene_hbn.html
|
||||
"pair_coeff"_pair_coeff.html,
|
||||
"pair_none"_pair_none.html,
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html,
|
||||
"pair_style kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html,
|
||||
"pair_style ilp/graphene/hbn"_pair_ilp_graphene_hbn.html.
|
||||
|
||||
[Default:] tap_flag = 0
|
||||
|
||||
@ -95,3 +104,6 @@ units.
|
||||
|
||||
:link(Kolmogorov1)
|
||||
[(Kolmogorov)] A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005)
|
||||
|
||||
:link(Ouyang2)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, M. Urbakh, O. Hod, arXiv:1806.09555 (2018).
|
||||
|
||||
@ -47,13 +47,14 @@ the "(Aktulga)"_#Aktulga paper. The {reax/c} style was initially
|
||||
implemented as a stand-alone C code and is now integrated into LAMMPS
|
||||
as a package.
|
||||
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that is
|
||||
derived from the {reax/c} style. The Kokkos version can run on GPUs and
|
||||
can also use OpenMP multithreading. For more information about the Kokkos package,
|
||||
see "Section 4"_Section_packages.html#kokkos and "Section 5.3.3"_accelerate_kokkos.html.
|
||||
One important consideration when using the {reax/c/kk} style is the choice of either
|
||||
half or full neighbor lists. This setting can be changed using the Kokkos "package"_package.html
|
||||
command.
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that
|
||||
is derived from the {reax/c} style. The Kokkos version can run on GPUs
|
||||
and can also use OpenMP multithreading. For more information about the
|
||||
Kokkos package, see "Section 4"_Section_packages.html#kokkos and
|
||||
"Section 5.3.3"_accelerate_kokkos.html. One important consideration
|
||||
when using the {reax/c/kk} style is the choice of either half or full
|
||||
neighbor lists. This setting can be changed using the Kokkos
|
||||
"package"_package.html command.
|
||||
|
||||
The {reax/c} style differs from the "pair_style reax"_pair_reax.html
|
||||
command in the lo-level implementation details. The {reax} style is a
|
||||
@ -80,9 +81,8 @@ parameterizations for different classes of materials. You can submit
|
||||
a contact request at the Materials Computation Center (MCC) website
|
||||
"https://www.mri.psu.edu/materials-computation-center/connect-mcc"_https://www.mri.psu.edu/materials-computation-center/connect-mcc,
|
||||
describing the material(s) you are interested in modeling with ReaxFF.
|
||||
They can tell
|
||||
you what is currently available or what it would take to create a
|
||||
suitable ReaxFF parameterization.
|
||||
They can tell you what is currently available or what it would take to
|
||||
create a suitable ReaxFF parameterization.
|
||||
|
||||
The {cfile} setting can be specified as NULL, in which case default
|
||||
settings are used. A control file can be specified which defines
|
||||
@ -120,28 +120,31 @@ assign to each atom will be used for computing the electrostatic
|
||||
interactions in the system.
|
||||
See the "fix qeq/reax"_fix_qeq_reax.html command for details.
|
||||
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on
|
||||
the low-gradient correction of the ReaxFF/C for long-range
|
||||
London Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on the
|
||||
low-gradient correction of the ReaxFF/C for long-range London
|
||||
Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
file {ffield.reax.lg} is designed for this correction, and is trained
|
||||
for several energetic materials (see "Liu"). When using lg-correction,
|
||||
recommended value for parameter {thb} is 0.01, which can be set in the
|
||||
control file. Note: Force field files are different for the original
|
||||
or lg corrected pair styles, using wrong ffield file generates an error message.
|
||||
or lg corrected pair styles, using wrong ffield file generates an
|
||||
error message.
|
||||
|
||||
Using the optional keyword {enobonds} with the value {yes}, the energy
|
||||
of atoms with no bonds (i.e. isolated atoms) is included in the total
|
||||
potential energy and the per-atom energy of that atom. If the value
|
||||
{no} is specified then the energy of atoms with no bonds is set to zero.
|
||||
The latter behavior is usual not desired, as it causes discontinuities
|
||||
in the potential energy when the bonding of an atom drops to zero.
|
||||
{no} is specified then the energy of atoms with no bonds is set to
|
||||
zero. The latter behavior is usual not desired, as it causes
|
||||
discontinuities in the potential energy when the bonding of an atom
|
||||
drops to zero.
|
||||
|
||||
Optional keywords {safezone} and {mincap} are used for allocating
|
||||
reax/c arrays. Increasing these values can avoid memory problems, such
|
||||
as segmentation faults and bondchk failed errors, that could occur under
|
||||
certain conditions. These keywords aren't used by the Kokkos version, which
|
||||
instead uses a more robust memory allocation scheme that checks if the sizes of
|
||||
the arrays have been exceeded and automatically allocates more memory.
|
||||
reax/c arrays. Increasing these values can avoid memory problems,
|
||||
such as segmentation faults and bondchk failed errors, that could
|
||||
occur under certain conditions. These keywords aren't used by the
|
||||
Kokkos version, which instead uses a more robust memory allocation
|
||||
scheme that checks if the sizes of the arrays have been exceeded and
|
||||
automatically allocates more memory.
|
||||
|
||||
The thermo variable {evdwl} stores the sum of all the ReaxFF potential
|
||||
energy contributions, with the exception of the Coulombic and charge
|
||||
@ -153,7 +156,8 @@ This pair style tallies a breakdown of the total ReaxFF potential
|
||||
energy into sub-categories, which can be accessed via the "compute
|
||||
pair"_compute_pair.html command as a vector of values of length 14.
|
||||
The 14 values correspond to the following sub-categories (the variable
|
||||
names in italics match those used in the original FORTRAN ReaxFF code):
|
||||
names in italics match those used in the original FORTRAN ReaxFF
|
||||
code):
|
||||
|
||||
{eb} = bond energy
|
||||
{ea} = atom energy
|
||||
@ -340,8 +344,8 @@ reax"_pair_reax.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no, safezone = 1.2,
|
||||
mincap = 50.
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no,
|
||||
safezone = 1.2, mincap = 50.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
66
doc/src/pair_spin_dmi.txt
Normal file
@ -0,0 +1,66 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/dmi command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/dmi cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/dmi 4.0
|
||||
pair_coeff * * dmi 2.6 0.001 1.0 0.0 0.0
|
||||
pair_coeff 1 2 dmi 4.0 0.00109 0.0 0.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/dmi} computes the Dzyaloshinskii-Moriya (DM) interaction
|
||||
between pairs of magnetic spins:
|
||||
|
||||
:c,image(Eqs/pair_spin_dmi_interaction.jpg)
|
||||
|
||||
where si and sj are two neighboring magnetic spins of two particles,
|
||||
eij = (ri - rj)/|ri-rj| is the normalized separation vector between the
|
||||
two particles, and D is the DM vector defining the intensity and the
|
||||
sign of the interaction.
|
||||
|
||||
Examples and more explanations about this interaction and its parametrization are
|
||||
reported in "(Tranchida)"_#Tranchida5.
|
||||
|
||||
From this DM interaction, each spin i will be submitted to a magnetic torque
|
||||
omega and its associated atom to a force F (for spin-lattice calculations only).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida5.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Tranchida5)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
82
doc/src/pair_spin_exchange.txt
Normal file
@ -0,0 +1,82 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/exchange command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/exchange cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/exchange 4.0
|
||||
pair_coeff * * exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff 1 2 exchange 6.0 -0.01575 0.0 1.965 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/exchange} computes the exchange interaction between
|
||||
pairs of magnetic spins:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_interaction.jpg)
|
||||
|
||||
where si and sj are two neighboring magnetic spins of two particles,
|
||||
rij = ri - rj is the inter-atomic distance between the two particles,
|
||||
and J(rij) is a function defining the intensity and the sign of the exchange
|
||||
interaction.
|
||||
|
||||
This function is defined as:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_function.jpg)
|
||||
|
||||
where a, b and d are the three constant coefficients defined in the associated
|
||||
"pair_coeff" command.
|
||||
|
||||
The coefficients a, b, and d need to be fitted so that the function above matches with
|
||||
the value of the exchange interaction for the N neighbor shells taken into account.
|
||||
|
||||
Examples and more explanations about this function and its parametrization are reported
|
||||
in "(Tranchida)"_#Tranchida3.
|
||||
|
||||
From this exchange interaction, each spin i will be submitted
|
||||
to a magnetic torque omega, and its associated atom can be submitted to a
|
||||
force F for spin-lattice calculations (see "fix_nve_spin"_fix_nve_spin.html),
|
||||
such as:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_forces.jpg)
|
||||
|
||||
with h the Planck constant (in metal units).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida3.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Tranchida3)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
73
doc/src/pair_spin_magelec.txt
Normal file
@ -0,0 +1,73 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/me command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/me cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/me 4.5
|
||||
pair_coeff * * me 4.5 0.00109 1.0 1.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/me} computes a magneto-electric interaction between
|
||||
pairs of magnetic spins. According to the derivation reported in
|
||||
"(Katsura)"_#Katsura1, this interaction is defined as:
|
||||
|
||||
:c,image(Eqs/pair_spin_me_interaction.jpg)
|
||||
|
||||
where si and sj are neighboring magnetic spins of two particles,
|
||||
eij = (ri - rj)/|ri-rj| is the normalized separation vector between the
|
||||
two particles, and E is an electric polarization vector.
|
||||
The norm and direction of E are giving the intensity and the
|
||||
direction of a screened dielectric atomic polarization (in eV).
|
||||
|
||||
From this magneto-electric interaction, each spin i will be submitted
|
||||
to a magnetic torque omega, and its associated atom can be submitted to a
|
||||
force F for spin-lattice calculations (see "fix_nve_spin"_fix_nve_spin.html),
|
||||
such as:
|
||||
|
||||
:c,image(Eqs/pair_spin_me_forces.jpg)
|
||||
|
||||
with h the Planck constant (in metal units).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida4.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_spin_exchange"_pair_spin_exchange.html, "pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Katsura1)
|
||||
[(Katsura)] H. Katsura, N. Nagaosa, A.V. Balatsky. Phys. Rev. Lett., 95(5), 057205. (2005)
|
||||
|
||||
:link(Tranchida4)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau, and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
81
doc/src/pair_spin_neel.txt
Normal file
@ -0,0 +1,81 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/neel command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/neel cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/neel 4.0
|
||||
pair_coeff * * neel 4.0 0.0048 0.234 1.168 2.6905 0.705 0.652
|
||||
pair_coeff 1 2 neel 4.0 0.0048 0.234 1.168 0.0 0.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/neel} computes the Neel pair anisotropy model
|
||||
between pairs of magnetic spins:
|
||||
|
||||
:c,image(Eqs/pair_spin_neel_interaction.jpg)
|
||||
|
||||
where si and sj are two neighboring magnetic spins of two particles,
|
||||
rij = ri - rj is the inter-atomic distance between the two particles,
|
||||
eij = (ri - rj)/|ri-rj| is their normalized separation vector
|
||||
and g1, q1 and q2 are three functions defining the intensity of the
|
||||
dipolar and quadrupolar contributions, with:
|
||||
|
||||
:c,image(Eqs/pair_spin_neel_functions.jpg)
|
||||
|
||||
With the functions g(rij) and q(rij) defined and fitted according to the same
|
||||
Bethe-Slater function used to fit the exchange interaction:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_function.jpg)
|
||||
|
||||
where a, b and d are the three constant coefficients defined in the associated
|
||||
"pair_coeff" command.
|
||||
|
||||
The coefficients a, b, and d need to be fitted so that the function above matches with
|
||||
the values of the magneto-elastic constant of the materials at stake.
|
||||
|
||||
Examples and more explanations about this function and its parametrization are reported
|
||||
in "(Tranchida)"_#Tranchida6. More examples of parametrization will be provided in
|
||||
future work.
|
||||
|
||||
From this DM interaction, each spin i will be submitted to a magnetic torque
|
||||
omega and its associated atom to a force F (for spin-lattice calculations only).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida6.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Tranchida6)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
@ -192,8 +192,8 @@ This pair style can only be used via the {pair} keyword of the
|
||||
[Restrictions:]
|
||||
|
||||
This pair style is part of the MANYBODY package. It is only enabled
|
||||
if LAMMPS was built with that package. See
|
||||
the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
if LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
This pair style requires the "newton"_newton.html setting to be "on"
|
||||
for pair interactions.
|
||||
|
||||
@ -97,6 +97,10 @@ Pair Styles :h1
|
||||
pair_sph_rhosum
|
||||
pair_sph_taitwater
|
||||
pair_sph_taitwater_morris
|
||||
pair_spin_dmi
|
||||
pair_spin_exchange
|
||||
pair_spin_magelec
|
||||
pair_spin_neel
|
||||
pair_srp
|
||||
pair_sw
|
||||
pair_table
|
||||
|
||||
@ -296,17 +296,24 @@ list of runs (e.g. 1000) without having to list N strings in the input
|
||||
script.
|
||||
|
||||
For the {string} style, a single string is assigned to the variable.
|
||||
The only difference between this and using the {index} style with a
|
||||
single string is that a variable with {string} style can be redefined.
|
||||
E.g. by another command later in the input script, or if the script is
|
||||
read again in a loop.
|
||||
Two differences between this this and using the {index} style exist:
|
||||
a variable with {string} style can be redefined, e.g. by another command later
|
||||
in the input script, or if the script is read again in a loop. The other
|
||||
difference is that {string} performs variable substitution even if the
|
||||
string parameter is quoted.
|
||||
|
||||
For the {format} style, an equal-style variable is specified along
|
||||
with a C-style format string, e.g. "%f" or "%.10g", which must be
|
||||
appropriate for formatting a double-precision floating-point value.
|
||||
This allows an equal-style variable to be formatted specifically for
|
||||
output as a string, e.g. by the "print"_print.html command, if the
|
||||
default format "%.15g" has too much precision.
|
||||
The default format is "%.15g". This variable style allows an
|
||||
equal-style variable to be formatted precisely when it is evaluated.
|
||||
|
||||
If you simply wish to print a variable value with desired precision to
|
||||
the screen or logfile via the "print"_print.html or "fix
|
||||
print"_fix_print.html commands, you can also do this by specifying an
|
||||
"immediate" variable with a trailing colon and format string, as part
|
||||
of the string argument of those commands. This is explained in
|
||||
"Section 3.2"_Section_commands.html#cmd_2.
|
||||
|
||||
For the {getenv} style, a single string is assigned to the variable
|
||||
which should be the name of an environment variable. When the
|
||||
|
||||
BIN
doc/utils/txt2html/txt2html
Executable file
@ -6,10 +6,10 @@
|
||||
// in.lammps = LAMMPS input script
|
||||
// in.quest = Quest input script
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "stdint.h"
|
||||
|
||||
#include "many2one.h"
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
// Sfactor = multiplier on strain effect
|
||||
// in.spparks = SPPARKS input script
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "lammps_data_write.h"
|
||||
#include "many2many.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "error.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "files.h"
|
||||
|
||||
#define MAXLINE 256
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "lammps_data_write.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef LAMMPS_DATA_WRITE_H
|
||||
#define LAMMPS_DATA_WRITE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include "send2one.h"
|
||||
|
||||
class LAMMPSDataWrite : public Send2One {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "many2many.h"
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "many2one.h"
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include "one2many.h"
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "mpi.h"
|
||||
#include "stdlib.h"
|
||||
#include "stdio.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "send2one.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
// Tdelta = incremental temperature for each of N runs
|
||||
// See README for compilation instructions
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "mpi.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "lammps.h" // these are LAMMPS include files
|
||||
#include "input.h"
|
||||
|
||||