Merge branch 'master' of https://github.com/lammps/lammps into lammps-master2

This commit is contained in:
Jacob Gissinger
2021-08-20 10:53:04 -04:00
4453 changed files with 106551 additions and 73942 deletions

64
.github/CODEOWNERS vendored
View File

@ -22,41 +22,42 @@ src/MESSAGE/* @sjplimp
src/MLIAP/* @athomps
src/SNAP/* @athomps
src/SPIN/* @julient31
src/USER-BROWNIAN/* @samueljmcameron
src/USER-CGDNA/* @ohenrich
src/USER-CGSDK/* @akohlmey
src/USER-COLVARS/* @giacomofiorin
src/USER-FEP/* @agiliopadua
src/USER-HDNNP/* @singraber
src/USER-INTEL/* @wmbrownintel
src/USER-MANIFOLD/* @Pakketeretet2
src/USER-MDI/* @taylor-a-barnes
src/USER-MEAMC/* @martok
src/USER-MESONT/* @iafoss
src/USER-MOFFF/* @hheenen
src/USER-MOLFILE/* @akohlmey
src/USER-NETCDF/* @pastewka
src/USER-PACE/* @yury-lysogorskiy
src/USER-PLUMED/* @gtribello
src/USER-PHONON/* @lingtikong
src/USER-PTM/* @pmla
src/USER-OMP/* @akohlmey
src/USER-QMMM/* @akohlmey
src/USER-REAXC/* @hasanmetin
src/USER-REACTION/* @jrgissing
src/USER-SCAFACOS/* @rhalver
src/USER-TALLY/* @akohlmey
src/USER-UEF/* @danicholson
src/USER-VTK/* @rbberger
src/BROWNIAN/* @samueljmcameron
src/CG-DNA/* @ohenrich
src/CG-SDK/* @akohlmey
src/COLVARS/* @giacomofiorin
src/DIELECTRIC/* @ndtrung81
src/FEP/* @agiliopadua
src/ML-HDNNP/* @singraber
src/INTEL/* @wmbrownintel
src/MANIFOLD/* @Pakketeretet2
src/MDI/* @taylor-a-barnes
src/MEAM/* @martok
src/MESONT/* @iafoss
src/MOFFF/* @hheenen
src/MOLFILE/* @akohlmey
src/NETCDF/* @pastewka
src/ML-PACE/* @yury-lysogorskiy
src/PLUMED/* @gtribello
src/PHONON/* @lingtikong
src/PTM/* @pmla
src/OPENMP/* @akohlmey
src/QMMM/* @akohlmey
src/REAXFF/* @hasanmetin @stanmoore1
src/REACTION/* @jrgissing
src/SCAFACOS/* @rhalver
src/TALLY/* @akohlmey
src/UEF/* @danicholson
src/VTK/* @rbberger
# individual files in packages
src/GPU/pair_vashishta_gpu.* @andeplane
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk
src/USER-MISC/*_grem.* @dstelter92
src/USER-MISC/compute_stress_mop*.* @RomainVermorel
src/REPLICA/*_grem.* @dstelter92
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
src/MISC/*_tracker.* @jtclemm
# core LAMMPS classes
src/lammps.* @sjplimp
@ -80,6 +81,7 @@ src/kspace.* @sjplimp
src/lmptyp.h @sjplimp
src/library.* @sjplimp
src/main.cpp @sjplimp
src/min_*.* @sjplimp
src/memory.* @sjplimp
src/modify.* @sjplimp
src/molecule.* @sjplimp
@ -108,7 +110,6 @@ src/thermo.* @sjplimp
src/universe.* @sjplimp
src/update.* @sjplimp
src/variable.* @sjplimp
src/verlet.* @sjplimp
src/velocity.* @sjplimp
src/write_data.* @sjplimp
src/write_restart.* @sjplimp
@ -121,6 +122,7 @@ src/info.* @akohlmey @rbberger
src/timer.* @akohlmey
src/min* @sjplimp @stanmoore1
src/utils.* @akohlmey @rbberger
src/verlet.* @sjplimp @stanmoore1
src/math_eigen_impl.h @jewettaij
# tools
@ -137,7 +139,7 @@ unittest/* @akohlmey @rbberger
# cmake
cmake/* @junghans @rbberger
cmake/Modules/Packages/USER-COLVARS.cmake @junghans @rbberger @giacomofiorin
cmake/Modules/Packages/COLVARS.cmake @junghans @rbberger @giacomofiorin
cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167
cmake/presets/*.cmake @akohlmey

View File

@ -74,13 +74,13 @@ Here is a checklist of steps you need to follow to submit a single file or user
* For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no trailing whitespace, no lines over 80 characters. I/O is done via the C-style stdio library, style class header files should not import any system headers, STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. There MUST NOT be any "using namespace XXX;" statements in headers. In the implementation file (<name>.cpp) system includes should be placed in angular brackets (<>) and for c-library functions the C++ style header files should be included (<cstdio> instead of <stdio.h>, or <cstring> instead of <string.h>). This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages.
* Source, style name, and documentation file should follow the following naming convention: style names should be lowercase and words separated by a forward slash; for a new fix style 'foo/bar', the class should be named FixFooBar, the name of the source files should be 'fix_foo_bar.h' and 'fix_foo_bar.cpp' and the corresponding documentation should be in a file 'fix_foo_bar.rst'.
* If you want your contribution to be added as a user-contributed feature, and it is a single file (actually a `<name>.cpp` and `<name>.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that directory, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features.
* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like USER-FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this USER-FOO directory.
* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this FOO directory.
* Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code.
* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are files in the [reStructuredText](https://docutils.sourceforge.io/rst.html) markup language, that are then converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `<name>.rst` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. An introduction to reStructuredText can be found at [https://docutils.sourceforge.io/docs/user/rst/quickstart.html](https://docutils.sourceforge.io/docs/user/rst/quickstart.html). The text files can include mathematical expressions and symbol in ".. math::" sections or ":math:" expressions or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.rst for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv. Please run at least `make html`, `make pdf` and `make spelling` and carefully inspect and proofread the resulting HTML format doc page as well as the output produced to the screen. Make sure that all spelling errors are fixed or the necessary false positives are added to the `doc/utils/sphinx-config/false_positives.txt` file. For new styles, those usually also need to be added to lists on the respective overview pages. This can be checked for also with `make style_check`.
* For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/USER for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind
* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are files in the [reStructuredText](https://docutils.sourceforge.io/rst.html) markup language, that are then converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `<name>.rst` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. An introduction to reStructuredText can be found at [https://docutils.sourceforge.io/docs/user/rst/quickstart.html](https://docutils.sourceforge.io/docs/user/rst/quickstart.html). The text files can include mathematical expressions and symbol in ".. math::" sections or ":math:" expressions or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.rst for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv. Please run at least `make html`, `make pdf` and `make spelling` and carefully inspect and proofread the resulting HTML format doc page as well as the output produced to the screen. Make sure that all spelling errors are fixed or the necessary false positives are added to the `doc/utils/sphinx-config/false_positives.txt` file. For new styles, those usually also need to be added to lists on the respective overview pages. This can be checked for also with `make style_check`.
* For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/PACKAGES for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind
* For new utility functions or class (i.e. anything that does not depend on a LAMMPS object), new unit tests should be added to the unittest tree.
* When adding a new LAMMPS style, a .yaml file with a test configuration and reference data should be added for the styles where a suitable tester program already exists (e.g. pair styles, bond styles, etc.).
* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the <name>.cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide.
* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the <name>.cpp source file. See src/EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide.
Finally, as a general rule-of-thumb, the more clear and self-explanatory you make your documentation and README files, and the easier you make it for people to get started, e.g. by providing example scripts, the more likely it is that users will try out your new feature.

3
.gitignore vendored
View File

@ -12,6 +12,7 @@
*.sif
*.dll
*.pyc
a.out
__pycache__
Obj_*
@ -43,6 +44,8 @@ Thumbs.db
/build*
/CMakeCache.txt
/CMakeFiles/
/Testing
/Makefile
/Testing
/cmake_install.cmake
/lmp

View File

@ -4,7 +4,7 @@ extraction:
command:
- "mkdir build"
- "cd build"
- "cmake -G Ninja -C ../cmake/presets/minimal.cmake ../cmake"
- "cmake -G Ninja -C ../cmake/presets/most.cmake ../cmake"
index:
build_command:
- "cd build"

View File

@ -8,7 +8,7 @@ region box block 0 20 0 20 0 20
create_box 1 box
create_atoms 1 box
pair_style meam/c
pair_style meam
pair_coeff * * library.meam Ni4 Ni.meam Ni4
velocity all create 1600.0 376847 loop geom

View File

@ -15,7 +15,7 @@ create_atoms 1 box
Created 32000 atoms
create_atoms CPU = 0.002 seconds
pair_style meam/c
pair_style meam
pair_coeff * * library.meam Ni4 Ni.meam Ni4
Reading potential file library.meam with DATE: 2012-06-29
Reading potential file Ni.meam with DATE: 2007-06-11
@ -38,12 +38,12 @@ Neighbor list info ...
ghost atom cutoff = 5
binsize = 2.5, bins = 29 29 29
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair meam/c, perpetual
(1) pair meam, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
(2) pair meam/c, perpetual, half/full from (1)
(2) pair meam, perpetual, half/full from (1)
attributes: half, newton on
pair build: halffull/newton
stencil: none

View File

@ -15,7 +15,7 @@ create_atoms 1 box
Created 32000 atoms
create_atoms CPU = 0.001 seconds
pair_style meam/c
pair_style meam
pair_coeff * * library.meam Ni4 Ni.meam Ni4
Reading potential file library.meam with DATE: 2012-06-29
Reading potential file Ni.meam with DATE: 2007-06-11
@ -38,12 +38,12 @@ Neighbor list info ...
ghost atom cutoff = 5
binsize = 2.5, bins = 29 29 29
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair meam/c, perpetual
(1) pair meam, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
(2) pair meam/c, perpetual, half/full from (1)
(2) pair meam, perpetual, half/full from (1)
attributes: half, newton on
pair build: halffull/newton
stencil: none

View File

@ -24,7 +24,7 @@ velocity all create 300.0 9999
pair_style reax/c NULL
pair_coeff * * ffield.reax C H O N
WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:315)
WARNING: Changed valency_val to valency_boc for X (src/REAXFF/reaxc_ffield.cpp:315)
timestep 0.1
fix 1 all nve

View File

@ -24,7 +24,7 @@ velocity all create 300.0 9999
pair_style reax/c NULL
pair_coeff * * ffield.reax C H O N
WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:315)
WARNING: Changed valency_val to valency_boc for X (src/REAXFF/reaxc_ffield.cpp:315)
timestep 0.1
fix 1 all nve

View File

@ -77,7 +77,7 @@ check_for_autogen_files(${LAMMPS_SOURCE_DIR})
include(CheckIncludeFileCXX)
# set required compiler flags and compiler/CPU arch specific optimizations
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
@ -138,17 +138,92 @@ install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS
PLUGIN QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESONT USER-MGPT USER-MISC
USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB
USER-RANN USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-PACE USER-BROWNIAN)
set(STANDARD_PACKAGES
ADIOS
ASPHERE
ATC
AWPMD
BOCS
BODY
BROWNIAN
CG-DNA
CG-SDK
CLASS2
COLLOID
COLVARS
COMPRESS
DIELECTRIC
DIFFRACTION
DIPOLE
DPD-BASIC
DPD-MESO
DPD-REACT
DPD-SMOOTH
DRUDE
EFF
EXTRA-COMPUTE
EXTRA-DUMP
EXTRA-FIX
EXTRA-MOLECULE
EXTRA-PAIR
FEP
GRANULAR
H5MD
INTERLAYER
KIM
KSPACE
LATBOLTZ
LATTE
MACHDYN
MANIFOLD
MANYBODY
MC
MDI
MEAM
MESONT
MESSAGE
MGPT
MISC
ML-HDNNP
ML-IAP
ML-PACE
ML-QUIP
ML-RANN
ML-SNAP
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
ORIENT
PERI
PHONON
PLUGIN
PLUMED
POEMS
PTM
PYTHON
QEQ
QMMM
QTB
REACTION
REAXFF
REPLICA
RIGID
SCAFACOS
SHOCK
SMTBQ
SPH
SPIN
SRD
TALLY
UEF
VORONOI
VTK
YAFF)
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP)
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT INTEL OPENMP)
foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES})
option(PKG_${PKG} "Build ${PKG} Package" OFF)
@ -159,7 +234,7 @@ endforeach()
######################################################
target_include_directories(lammps PUBLIC $<BUILD_INTERFACE:${LAMMPS_SOURCE_DIR}>)
if(PKG_USER-ADIOS)
if(PKG_ADIOS)
# The search for ADIOS2 must come before MPI because
# it includes its own MPI search with the latest FindMPI.cmake
# script that defines the MPI::MPI_C target
@ -169,15 +244,16 @@ if(PKG_USER-ADIOS)
endif()
if(NOT CMAKE_CROSSCOMPILING)
set(MPI_CXX_SKIP_MPICXX TRUE)
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
else()
set(MPI_CXX_SKIP_MPICXX TRUE)
option(BUILD_MPI "Build MPI version" OFF)
endif()
if(BUILD_MPI)
# do not include the (obsolete) MPI C++ bindings which makes
# for leaner object files and avoids namespace conflicts
set(MPI_CXX_SKIP_MPICXX TRUE)
# We use a non-standard procedure to cross-compile with MPI on Windows
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
include(MPI4WIN)
@ -229,12 +305,16 @@ endif()
# "hard" dependencies between packages resulting
# in an error instead of skipping over files
pkg_depends(MLIAP SNAP)
pkg_depends(ML-IAP ML-SNAP)
pkg_depends(MPIIO MPI)
pkg_depends(USER-ATC MANYBODY)
pkg_depends(USER-LB MPI)
pkg_depends(USER-PHONON KSPACE)
pkg_depends(USER-SCAFACOS MPI)
pkg_depends(ATC MANYBODY)
pkg_depends(LATBOLTZ MPI)
pkg_depends(PHONON KSPACE)
pkg_depends(SCAFACOS MPI)
pkg_depends(DIELECTRIC KSPACE)
pkg_depends(DIELECTRIC EXTRA-PAIR)
pkg_depends(CG-DNA MOLECULE)
pkg_depends(CG-DNA ASPHERE)
# detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF)
@ -256,7 +336,8 @@ if(BUILD_OMP)
endif()
if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR
(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)))
@ -269,7 +350,7 @@ if(BUILD_OMP)
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
endif()
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_LATTE)
enable_language(C)
find_package(LAPACK)
find_package(BLAS)
@ -289,6 +370,8 @@ if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
endif()
endif()
# tweak jpeg library names to avoid linker errors with MinGW cross-compilation
set(JPEG_NAMES libjpeg libjpeg-62)
find_package(JPEG QUIET)
option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
if(WITH_JPEG)
@ -348,8 +431,8 @@ else()
set(CUDA_REQUEST_PIC)
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON MLIAP VORONOI USER-COLVARS USER-HDNNP USER-MDI USER-MOLFILE USER-NETCDF USER-PLUMED
USER-QMMM USER-QUIP USER-SCAFACOS USER-SMD USER-VTK KIM LATTE MESSAGE MSCG COMPRESS USER-PACE)
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MESSAGE MSCG COMPRESS ML-PACE)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -442,9 +525,8 @@ endforeach()
##############################################
# add lib sources of (simple) enabled packages
############################################
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
if(PKG_${SIMPLE_LIB})
string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
foreach(PKG_LIB POEMS ATC AWPMD H5MD MESONT)
if(PKG_${PKG_LIB})
string(TOLOWER "${PKG_LIB}" PKG_LIB)
if(PKG_LIB STREQUAL "mesont")
enable_language(Fortran)
@ -468,13 +550,13 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
endif()
endforeach()
if(PKG_USER-AWPMD)
if(PKG_AWPMD)
target_link_libraries(awpmd PRIVATE ${LAPACK_LIBRARIES})
endif()
if(PKG_USER-ATC)
if(PKG_ATC)
if(LAMMPS_SIZES STREQUAL "BIGBIG")
message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
message(FATAL_ERROR "The ATC Package is not compatible with -DLAMMPS_BIGBIG")
endif()
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES})
if(BUILD_MPI)
@ -486,15 +568,15 @@ if(PKG_USER-ATC)
target_compile_definitions(atc PRIVATE -DLAMMPS_${LAMMPS_SIZES})
endif()
if(PKG_USER-H5MD)
include(Packages/USER-H5MD)
if(PKG_H5MD)
include(Packages/H5MD)
endif()
######################################################################
# packages which selectively include variants based on enabled styles
# e.g. accelerator packages
######################################################################
foreach(PKG_WITH_INCL CORESHELL QEQ USER-OMP USER-SDPD KOKKOS OPT USER-INTEL GPU)
foreach(PKG_WITH_INCL CORESHELL QEQ OPENMP DPD-SMOOTH KOKKOS OPT INTEL GPU)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()

View File

@ -22,7 +22,7 @@ find_library(N2P2_LIBNNPIF NAMES nnpif HINTS "${N2P2_DIR}/lib")
#
# target_compile_definitions(lammps PRIVATE -DN2P2_NO_SF_GROUPS)
#
# to "lib/lammps-extra.cmake" which is then included by USER-HDNNP.cmake.
# to "lib/lammps-extra.cmake" which is then included by ML-HDNNP.cmake.
find_file(N2P2_CMAKE_EXTRA NAMES lammps-extra.cmake HINTS "${N2P2_DIR}/lib")
find_package_handle_standard_args(N2P2 DEFAULT_MSG

View File

@ -67,7 +67,7 @@ endfunction()
macro(pkg_depends PKG1 PKG2)
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
message(FATAL_ERROR "The ${PKG1} package needs LAMMPS to be build with the ${PKG2} package")
endif()
endmacro()

View File

@ -1,6 +1,6 @@
message(STATUS "Downloading and building OpenCL loader library")
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.05.02.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
set(OPENCL_LOADER_MD5 "29180b05056578afda92f0d394c3a373" CACHE STRING "MD5 checksum of OpenCL loader tarball")
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.06.30.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
set(OPENCL_LOADER_MD5 "f9e55dd550cfbf77f46507adf7cb8fd2" CACHE STRING "MD5 checksum of OpenCL loader tarball")
mark_as_advanced(OPENCL_LOADER_URL)
mark_as_advanced(OPENCL_LOADER_MD5)

View File

@ -1,13 +1,13 @@
# Fix rigid/meso requires RIGID to be installed
set(USER-SDPD_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-SDPD)
set(DPD-SMOOTH_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/DPD-SMOOTH)
get_property(hlist GLOBAL PROPERTY FIX)
if(NOT PKG_RIGID)
list(REMOVE_ITEM hlist ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.h)
list(REMOVE_ITEM hlist ${DPD-SMOOTH_SOURCES_DIR}/fix_rigid_meso.h)
get_target_property(LAMMPS_SOURCES lammps SOURCES)
list(REMOVE_ITEM LAMMPS_SOURCES ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.cpp)
list(REMOVE_ITEM LAMMPS_SOURCES ${DPD-SMOOTH_SOURCES_DIR}/fix_rigid_meso.cpp)
set_property(TARGET lammps PROPERTY SOURCES ${LAMMPS_SOURCES})
endif()
set_property(GLOBAL PROPERTY FIX "${hlist}")
target_include_directories(lammps PRIVATE ${USER-SDPD_SOURCES_DIR})
target_include_directories(lammps PRIVATE ${DPD-SMOOTH_SOURCES_DIR})

View File

@ -3,9 +3,9 @@ if(NOT FOUND_IMMINTRIN)
message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
endif()
target_compile_definitions(lammps PRIVATE -DLMP_USER_INTEL)
target_compile_definitions(lammps PRIVATE -DLMP_INTEL)
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by INTEL (cpu or knl)")
set(INTEL_ARCH_VALUES cpu knl)
set_property(CACHE INTEL_ARCH PROPERTY STRINGS ${INTEL_ARCH_VALUES})
validate_option(INTEL_ARCH INTEL_ARCH_VALUES)
@ -40,10 +40,10 @@ endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "USER-INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
message(FATAL_ERROR "INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
else()
message(WARNING "USER-INTEL gives best performance with Intel compilers")
message(WARNING "INTEL gives best performance with Intel compilers")
endif()
find_package(TBB_MALLOC QUIET)
@ -52,7 +52,7 @@ if(TBB_MALLOC_FOUND)
else()
target_compile_definitions(lammps PRIVATE -DLMP_INTEL_NO_TBB)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries")
message(WARNING "INTEL with Intel compilers should use TBB malloc libraries")
endif()
endif()
@ -65,12 +65,12 @@ else()
endif()
if((NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "64") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "128") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "256"))
message(FATAL_ERROR "USER-INTEL only supports memory alignment of 64, 128 or 256 on this platform")
message(FATAL_ERROR "INTEL only supports memory alignment of 64, 128 or 256 on this platform")
endif()
if(INTEL_ARCH STREQUAL "KNL")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "Must use Intel compiler with USER-INTEL for KNL architecture")
message(FATAL_ERROR "Must use Intel compiler with INTEL for KNL architecture")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload")
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"")
@ -91,26 +91,26 @@ else()
endif()
# collect sources
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/fix_intel.cpp
${USER-INTEL_SOURCES_DIR}/fix_nh_intel.cpp
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp)
set(INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/INTEL)
set(INTEL_SOURCES ${INTEL_SOURCES_DIR}/fix_intel.cpp
${INTEL_SOURCES_DIR}/fix_nh_intel.cpp
${INTEL_SOURCES_DIR}/intel_buffers.cpp
${INTEL_SOURCES_DIR}/nbin_intel.cpp
${INTEL_SOURCES_DIR}/npair_intel.cpp)
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
set_property(GLOBAL PROPERTY "INTEL_SOURCES" "${INTEL_SOURCES}")
# detect styles which have a USER-INTEL version
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} intel USER-INTEL_SOURCES)
RegisterNBinStyle(${USER-INTEL_SOURCES_DIR}/nbin_intel.h)
RegisterNPairStyle(${USER-INTEL_SOURCES_DIR}/npair_intel.h)
RegisterFixStyle(${USER-INTEL_SOURCES_DIR}/fix_intel.h)
# detect styles which have a INTEL version
RegisterStylesExt(${INTEL_SOURCES_DIR} intel INTEL_SOURCES)
RegisterNBinStyle(${INTEL_SOURCES_DIR}/nbin_intel.h)
RegisterNPairStyle(${INTEL_SOURCES_DIR}/npair_intel.h)
RegisterFixStyle(${INTEL_SOURCES_DIR}/fix_intel.h)
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
get_property(INTEL_SOURCES GLOBAL PROPERTY INTEL_SOURCES)
if(PKG_KSPACE)
list(APPEND USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
RegisterIntegrateStyle(${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
endif()
target_sources(lammps PRIVATE ${USER-INTEL_SOURCES})
target_include_directories(lammps PRIVATE ${USER-INTEL_SOURCES_DIR})
target_sources(lammps PRIVATE ${INTEL_SOURCES})
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})

View File

@ -74,11 +74,12 @@ else()
target_link_libraries(lammps PRIVATE kokkos)
target_link_libraries(lmp PRIVATE kokkos)
endif()
target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS)
target_compile_definitions(lammps PUBLIC $<BUILD_INTERFACE:LMP_KOKKOS>)
set(KOKKOS_PKG_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/KOKKOS)
set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_map_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_vec_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_tiled_kokkos.cpp
@ -116,7 +117,7 @@ RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_halffull_kokkos.h)
if(PKG_USER-DPD)
if(PKG_DPD-REACT)
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)
@ -126,4 +127,4 @@ endif()
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
target_sources(lammps PRIVATE ${KOKKOS_PKG_SOURCES})
target_include_directories(lammps PRIVATE ${KOKKOS_PKG_SOURCES_DIR})
target_include_directories(lammps PUBLIC $<BUILD_INTERFACE:${KOKKOS_PKG_SOURCES_DIR}>)

View File

@ -7,8 +7,8 @@ endif()
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT})
if(DOWNLOAD_EIGEN3)
message(STATUS "Eigen3 download requested - we will build our own")
set(EIGEN3_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz" CACHE STRING "URL for Eigen3 tarball")
set(EIGEN3_MD5 "9e30f67e8531477de4117506fe44669b" CACHE STRING "MD5 checksum of Eigen3 tarball")
set(EIGEN3_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.gz" CACHE STRING "URL for Eigen3 tarball")
set(EIGEN3_MD5 "609286804b0f79be622ccf7f9ff2b660" CACHE STRING "MD5 checksum of Eigen3 tarball")
mark_as_advanced(EIGEN3_URL)
mark_as_advanced(EIGEN3_MD5)
include(ExternalProject)
@ -30,3 +30,8 @@ else()
endif()
target_link_libraries(lammps PRIVATE Eigen3::Eigen)
endif()
# PGI/Nvidia compiler internals collide with vector intrinsics support in Eigen3
if((CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC"))
target_compile_definitions(lammps PRIVATE -DEIGEN_DONT_VECTORIZE)
endif()

View File

@ -114,5 +114,5 @@ else()
target_link_libraries(lmp PRIVATE ${mdi_LIBRARY})
endif()
target_compile_definitions(lammps PRIVATE -DLMP_USER_MDI)
target_compile_definitions(lmp PRIVATE -DLMP_USER_MDI)
target_compile_definitions(lammps PRIVATE -DLMP_MDI)
target_compile_definitions(lmp PRIVATE -DLMP_MDI)

View File

@ -16,13 +16,13 @@ if(DOWNLOAD_N2P2)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
set(N2P2_COMP llvm)
set(N2P2_CXX_STD "-std=c++11")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
set(N2P2_COMP intel)
set(N2P2_CXX_STD "-std=c++11")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(N2P2_COMP gnu)
set(N2P2_CXX_STD "-std=gnu++11")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC"))
set(N2P2_COMP gnu)
set(N2P2_CXX_STD "--c++11")
else() # default
@ -55,6 +55,9 @@ if(DOWNLOAD_N2P2)
endif()
endif()
# prefer GNU make, if available. N2P2 lib seems to need it.
find_program(N2P2_MAKE NAMES gmake make)
# override compiler (optimization) flags in n2p2 library to flags used for LAMMPS
# specifically -march=native can result in problems when compiling on HPC clusters or with a cross compiler
# this convoluted way gets correct quoting/escaping when configuring the external project
@ -74,7 +77,7 @@ if(DOWNLOAD_N2P2)
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
PATCH_COMMAND sed -i -e "s/\\(MPI_\\(P\\|Unp\\)ack(\\)/\\1(void *) /" src/libnnpif/LAMMPS/InterfaceLammps.cpp
BUILD_COMMAND make -f makefile libnnpif ${N2P2_BUILD_OPTIONS}
BUILD_COMMAND ${N2P2_MAKE} -f makefile libnnpif ${N2P2_BUILD_OPTIONS}
BUILD_ALWAYS YES
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1

View File

@ -1,4 +1,4 @@
# if PYTHON package is included we may also include Python support in MLIAP
# if PYTHON package is included we may also include Python support in ML-IAP
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
if(PKG_PYTHON)
find_package(Cythonize QUIET)
@ -7,25 +7,25 @@ if(PKG_PYTHON)
endif()
endif()
option(MLIAP_ENABLE_PYTHON "Build MLIAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
if(MLIAP_ENABLE_PYTHON)
find_package(Cythonize REQUIRED)
if(NOT PKG_PYTHON)
message(FATAL_ERROR "Must enable PYTHON package for including Python support in MLIAP")
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
endif()
if(CMAKE_VERSION VERSION_LESS 3.12)
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in MLIAP requires Python 3.6 or later")
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
endif()
else()
if(Python_VERSION VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in MLIAP requires Python 3.6 or later")
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
endif()
endif()
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/MLIAP/mliap_model_python_couple.pyx)
set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/ML-IAP/mliap_model_python_couple.pyx)
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_SRC} NAME_WE)
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h

View File

@ -0,0 +1,70 @@
enable_language(Fortran)
find_package(QUIP QUIET)
if(QUIP_FOUND)
set(DOWNLOAD_QUIP_DEFAULT OFF)
else()
set(DOWNLOAD_QUIP_DEFAULT ON)
endif()
option(DOWNLOAD_QUIP "Download the QUIP library instead of using an already installed one" ${DOWNLOAD_QUIP_DEFAULT})
if(DOWNLOAD_QUIP)
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
set(temp "F77 = ${CMAKE_Fortran_COMPILER}\nF90 = ${CMAKE_Fortran_COMPILER}\nF95 = ${CMAKE_Fortran_COMPILER}\n")
set(temp "${temp}CC=${CMAKE_C_COMPILER}\nCPLUSPLUS=${CMAKE_CXX_COMPILER}\nLINKER=${CMAKE_Fortran_COMPILER}\n")
if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n")
set(temp "${temp}DEFINES += -DGETARG_F2003 -DFORTRAN_UNDERSCORE\n")
set(temp "${temp}F95FLAGS += -fpp -free -fPIC\n")
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n")
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")
set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n")
set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n")
else()
message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP")
endif()
set(temp "${temp}CFLAGS += -fPIC \nCPLUSPLUSFLAGS += -fPIC\nAR_ADD=src\n")
set(temp "${temp}MATH_LINKOPTS=")
foreach(flag ${BLAS_LIBRARIES})
set(temp "${temp} ${flag}")
endforeach()
foreach(flag ${LAPACK_LIBRARIES})
set(temp "${temp} ${flag}")
endforeach()
set(temp "${temp}\n")
set(temp "${temp}PYTHON=python\nPIP=pip\nEXTRA_LINKOPTS=\n")
set(temp "${temp}HAVE_CP2K=0\nHAVE_VASP=0\nHAVE_TB=0\nHAVE_PRECON=1\nHAVE_LOTF=0\nHAVE_ONIOM=0\n")
set(temp "${temp}HAVE_LOCAL_E_MIX=0\nHAVE_QC=0\nHAVE_GAP=1\nHAVE_DESCRIPTORS_NONCOMMERCIAL=1\n")
set(temp "${temp}HAVE_TURBOGAP=0\nHAVE_QR=1\nHAVE_THIRDPARTY=0\nHAVE_FX=0\nHAVE_SCME=0\nHAVE_MTP=0\n")
set(temp "${temp}HAVE_MBD=0\nHAVE_TTM_NF=0\nHAVE_CH4=0\nHAVE_NETCDF4=0\nHAVE_MDCORE=0\nHAVE_ASAP=0\n")
set(temp "${temp}HAVE_CGAL=0\nHAVE_METIS=0\nHAVE_LMTO_TBE=0\n")
file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}")
message(STATUS "QUIP download via git requested - we will build our own")
# QUIP has no releases (except for a tag marking the end of Python 2 support). We use the current "public" branch
# The LAMMPS interface wrapper has a compatibility constant that is being checked at runtime.
include(ExternalProject)
ExternalProject_Add(quip_build
GIT_REPOSITORY "https://github.com/libAtoms/QUIP/"
GIT_TAG origin/public
GIT_SHALLOW YES
GIT_PROGRESS YES
PATCH_COMMAND cp ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
CONFIGURE_COMMAND env QUIP_ARCH=lammps make config
BUILD_COMMAND env QUIP_ARCH=lammps make libquip
INSTALL_COMMAND ""
BUILD_IN_SOURCE YES
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/libquip.a
)
ExternalProject_get_property(quip_build SOURCE_DIR)
add_library(LAMMPS::QUIP UNKNOWN IMPORTED)
set_target_properties(LAMMPS::QUIP PROPERTIES
IMPORTED_LOCATION "${SOURCE_DIR}/build/lammps/libquip.a"
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
target_link_libraries(lammps PRIVATE LAMMPS::QUIP)
add_dependencies(LAMMPS::QUIP quip_build)
else()
find_package(QUIP REQUIRED)
target_link_libraries(lammps PRIVATE QUIP::QUIP ${LAPACK_LIBRARIES})
endif()

View File

@ -1,5 +1,7 @@
set(MOLFILE_INCLUDE_DIR "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
set(MOLFILE_INCLUDE_DIRS "${MOLFILE_INCLUDE_DIR}")
add_library(molfile INTERFACE)
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIR})
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
endif()
target_link_libraries(lammps PRIVATE molfile)

View File

@ -1,4 +1,4 @@
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
# may use NetCDF or PNetCDF with MPI, but must have NetCDF without

View File

@ -0,0 +1,40 @@
set(OPENMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPENMP)
set(OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/thr_data.cpp
${OPENMP_SOURCES_DIR}/thr_omp.cpp
${OPENMP_SOURCES_DIR}/fix_omp.cpp
${OPENMP_SOURCES_DIR}/fix_nh_omp.cpp
${OPENMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
${OPENMP_SOURCES_DIR}/domain_omp.cpp)
target_compile_definitions(lammps PRIVATE -DLMP_OPENMP)
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${OPENMP_SOURCES}")
# detects styles which have OPENMP version
RegisterStylesExt(${OPENMP_SOURCES_DIR} omp OMP_SOURCES)
RegisterFixStyle(${OPENMP_SOURCES_DIR}/fix_omp.h)
get_property(OPENMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
# manually add package dependent source files from OPENMP that do not provide styles
if(PKG_ASPHERE)
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/fix_nh_asphere_omp.cpp)
endif()
if(PKG_RIGID)
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/fix_rigid_nh_omp.cpp)
endif()
if(PKG_REAXFF)
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/reaxff_bond_orders_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_hydrogen_bonds_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_nonbonded_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_bonds_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_init_md_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_torsion_angles_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_forces_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_multi_body_omp.cpp
${OPENMP_SOURCES_DIR}/reaxff_valence_angles_omp.cpp)
endif()
target_sources(lammps PRIVATE ${OPENMP_SOURCES})
target_include_directories(lammps PRIVATE ${OPENMP_SOURCES_DIR})

View File

@ -54,8 +54,8 @@ if(DOWNLOAD_PLUMED)
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/libplumedWrapper.a")
endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.1/plumed-src-2.7.1.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "4eac6a462ec84dfe0cec96c82421b8e8" CACHE STRING "MD5 checksum of PLUMED tarball")
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.7.2/plumed-src-2.7.2.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "cfa0b4dd90a81c25d3302e8d97bfeaea" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)

View File

@ -1,18 +1,13 @@
# Fix qeq/fire requires MANYBODY (i.e. COMB and COMB3) to be installed
set(QEQ_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/QEQ)
file(GLOB QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix*.h)
file(GLOB QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix*.cpp)
get_property(hlist GLOBAL PROPERTY FIX)
if(NOT PKG_MANYBODY)
list(REMOVE_ITEM QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix_qeq_fire.h)
list(REMOVE_ITEM QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix_qeq_fire.cpp)
list(REMOVE_ITEM hlist ${QEQ_SOURCES_DIR}/fix_qeq_fire.h)
get_target_property(LAMMPS_SOURCES lammps SOURCES)
list(REMOVE_ITEM LAMMPS_SOURCES ${QEQ_SOURCES_DIR}/fix_qeq_fire.cpp)
set_property(TARGET lammps PROPERTY SOURCES ${LAMMPS_SOURCES})
endif()
set_property(GLOBAL PROPERTY "QEQ_SOURCES" "${QEQ_SOURCES}")
set_property(GLOBAL PROPERTY FIX "${hlist}")
foreach(MY_HEADER ${QEQ_HEADERS})
AddStyleHeader(${MY_HEADER} FIX)
endforeach()
get_property(QEQ_SOURCES GLOBAL PROPERTY QEQ_SOURCES)
target_sources(lammps PRIVATE ${QEQ_SOURCES})
target_include_directories(lammps PRIVATE ${QEQ_SOURCES_DIR})

View File

@ -1,40 +0,0 @@
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
${USER-OMP_SOURCES_DIR}/fix_omp.cpp
${USER-OMP_SOURCES_DIR}/fix_nh_omp.cpp
${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
${USER-OMP_SOURCES_DIR}/domain_omp.cpp)
target_compile_definitions(lammps PRIVATE -DLMP_USER_OMP)
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${USER-OMP_SOURCES}")
# detects styles which have USER-OMP version
RegisterStylesExt(${USER-OMP_SOURCES_DIR} omp OMP_SOURCES)
RegisterFixStyle(${USER-OMP_SOURCES_DIR}/fix_omp.h)
get_property(USER-OMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
# manually add package dependent source files from USER-OMP that do not provide styles
if(PKG_ASPHERE)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_nh_asphere_omp.cpp)
endif()
if(PKG_RIGID)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_rigid_nh_omp.cpp)
endif()
if(PKG_USER-REAXC)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/reaxc_bond_orders_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_hydrogen_bonds_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_nonbonded_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_bonds_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_init_md_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_torsion_angles_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_forces_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_multi_body_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_valence_angles_omp.cpp)
endif()
target_sources(lammps PRIVATE ${USER-OMP_SOURCES})
target_include_directories(lammps PRIVATE ${USER-OMP_SOURCES_DIR})

View File

@ -1,3 +0,0 @@
enable_language(Fortran)
find_package(QUIP REQUIRED)
target_link_libraries(lammps PRIVATE QUIP::QUIP ${LAPACK_LIBRARIES})

View File

@ -1,17 +1,96 @@
# preset that turns on all existing packages off. can be used to reset
# Preset that turns on all existing packages off. Can be used to reset
# an existing package selection without losing any other settings
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-RANN
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
set(ALL_PACKAGES
ADIOS
ASPHERE
ATC
AWPMD
BOCS
BODY
BROWNIAN
CG-DNA
CG-SDK
CLASS2
COLLOID
COLVARS
COMPRESS
CORESHELL
DIELECTRIC
DIFFRACTION
DIPOLE
DPD-BASIC
DPD-MESO
DPD-REACT
DPD-SMOOTH
DRUDE
EFF
EXTRA-COMPUTE
EXTRA-DUMP
EXTRA-FIX
EXTRA-MOLECULE
EXTRA-PAIR
FEP
GPU
GRANULAR
H5MD
INTEL
INTERLAYER
KIM
KOKKOS
KSPACE
LATBOLTZ
LATTE
MACHDYN
MANIFOLD
MANYBODY
MC
MDI
MEAM
MESONT
MESSAGE
MGPT
MISC
ML-HDNNP
ML-IAP
ML-PACE
ML-QUIP
ML-RANN
ML-SNAP
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT
ORIENT
PERI
PHONON
PLUGIN
PLUMED
POEMS
PTM
PYTHON
QEQ
QMMM
QTB
REACTION
REAXFF
REPLICA
RIGID
SCAFACOS
SHOCK
SMTBQ
SPH
SPIN
SRD
TALLY
UEF
VORONOI
VTK
YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -1,19 +1,98 @@
# preset that turns on all existing packages. using the combination
# this preset followed by the nolib.cmake preset should configure a
# LAMMPS binary, with as many packages included, that can be compiled
# Preset that turns on all existing packages. Using the combination
# of this preset followed by the nolib.cmake preset should configure
# a LAMMPS binary, with as many packages included, that can be compiled
# with just a working C++ compiler and an MPI library.
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE
MPIIO MSCG OPT PERI PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN
SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
USER-HDNNP USER-INTEL USER-LB USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PACE USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP USER-RANN
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
USER-TALLY USER-UEF USER-VTK USER-YAFF)
set(ALL_PACKAGES
ADIOS
ASPHERE
ATC
AWPMD
BOCS
BODY
BROWNIAN
CG-DNA
CG-SDK
CLASS2
COLLOID
COLVARS
COMPRESS
CORESHELL
DIELECTRIC
DIFFRACTION
DIPOLE
DPD-BASIC
DPD-MESO
DPD-REACT
DPD-SMOOTH
DRUDE
EFF
EXTRA-COMPUTE
EXTRA-DUMP
EXTRA-FIX
EXTRA-MOLECULE
EXTRA-PAIR
FEP
GPU
GRANULAR
H5MD
INTEL
INTERLAYER
KIM
KOKKOS
KSPACE
LATBOLTZ
LATTE
MACHDYN
MANIFOLD
MANYBODY
MC
MDI
MEAM
MESONT
MESSAGE
MGPT
MISC
ML-HDNNP
ML-IAP
ML-PACE
ML-QUIP
ML-RANN
ML-SNAP
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT
ORIENT
PERI
PHONON
PLUGIN
PLUMED
POEMS
PTM
PYTHON
QEQ
QMMM
QTB
REACTION
REAXFF
REPLICA
RIGID
SCAFACOS
SHOCK
SMTBQ
SPH
SPIN
SRD
TALLY
UEF
VORONOI
VTK
YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -1,13 +1,18 @@
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
# prefer flang over gfortran, if available
find_program(CLANG_FORTRAN NAMES flang gfortran f95)
set(ENV{OMPI_FC} ${CLANG_FORTRAN})
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER ${CLANG_FORTRAN} CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g -std=f95" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG -std=f95" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG -std=f95" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)

View File

@ -1,7 +1,7 @@
# Preset that turns on packages with automatic downloads of sources or potentials.
# Compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT USER-MDI USER-PACE)
set(ALL_PACKAGES KIM LATTE MSCG VORONOI PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -2,10 +2,22 @@
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_CXX "g++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
set(MPI_C "gcc" CACHE STRING "" FORCE)
set(MPI_C_COMPILER "mpicc" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_Fortran "gfortran" CACHE STRING "" FORCE)
set(MPI_Fortran_COMPILER "mpifort" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "gcc" CACHE STRING "" FORCE)

View File

@ -1,13 +1,76 @@
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
PERI POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
USER-ATC USER-AWPMD USER-BOCS USER-BROWNIAN USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-HDNNP USER-INTEL USER-MANIFOLD USER-MDI USER-MEAMC USER-MESODPD
USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP
USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC
USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
USER-YAFF)
set(WIN_PACKAGES
ASPHERE
ATC
AWPMD
BOCS
BODY
BROWNIAN
CG-DNA
CG-SDK
CLASS2
COLLOID
COLVARS
COMPRESS
CORESHELL
DIELECTRIC
DIFFRACTION
DIPOLE
DPD-BASIC
DPD-MESO
DPD-REACT
DPD-SMOOTH
DRUDE
EFF
EXTRA-COMPUTE
EXTRA-DUMP
EXTRA-FIX
EXTRA-MOLECULE
EXTRA-PAIR
FEP
GPU
GRANULAR
INTEL
INTERLAYER
KSPACE
LATTE
MACHDYN
MANIFOLD
MANYBODY
MC
MDI
MEAM
MESONT
MGPT
MISC
ML-HDNNP
ML-IAP
ML-SNAP
ML-RANN
MOFFF
MOLECULE
MOLFILE
OPENMP
OPT
ORIENT
PERI
PHONON
POEMS
PTM
QEQ
QTB
REACTION
REAXFF
REPLICA
RIGID
SHOCK
SMTBQ
SPH
SPIN
SRD
TALLY
UEF
VORONOI
YAFF)
foreach(PKG ${WIN_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
@ -16,7 +79,7 @@ endforeach()
# these two packages require a full MPI implementation
if(BUILD_MPI)
set(PKG_MPIIO ON CACHE BOOL "" FORCE)
set(PKG_USER-LB ON CACHE BOOL "" FORCE)
set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE)
endif()
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)

View File

@ -2,13 +2,65 @@
# external libraries. Compared to all_on.cmake some more unusual packages
# are removed. The resulting binary should be able to run most inputs.
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI
PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
USER-BROWNIAN USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC
USER-MESODPD USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION
USER-REAXC USER-SDPD USER-SPH USER-SMD USER-UEF USER-YAFF)
set(ALL_PACKAGES
ASPHERE
BOCS
BODY
BROWNIAN
CG-DNA
CG-SDK
CLASS2
COLLOID
COLVARS
COMPRESS
CORESHELL
DIELECTRIC
DIFFRACTION
DIPOLE
DPD-BASIC
DPD-MESO
DPD-REACT
DPD-SMOOTH
DRUDE
EFF
EXTRA-COMPUTE
EXTRA-FIX
EXTRA-MOLECULE
EXTRA-PAIR
FEP
GRANULAR
INTERLAYER
KSPACE
MACHDYN
MANYBODY
MC
MEAM
MISC
ML-IAP
ML-SNAP
MOFFF
MOLECULE
OPENMP
OPT
ORIENT
PERI
PHONON
PLUGIN
POEMS
PYTHON
QEQ
REACTION
REAXFF
REPLICA
RIGID
SHOCK
SPH
SPIN
SRD
TALLY
UEF
VORONOI
YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -1,11 +1,34 @@
# preset that turns off all packages that require some form of external
# library or special compiler (fortran or cuda) or equivalent.
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MESSAGE MPIIO MSCG
PYTHON VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-HDNNP USER-LB USER-MOLFILE
USER-MESONT USER-MDI USER-NETCDF USER-PACE USER-PLUMED USER-QMMM USER-QUIP
USER-SCAFACOS USER-SMD USER-VTK)
set(PACKAGES_WITH_LIB
ADIOS
ATC
AWPMD
COMPRESS
GPU
H5MD
KIM
KOKKOS
LATBOLTZ
LATTE
MACHDYN
MDI
MESONT
MESSAGE
ML-HDNNP
ML-PACE
ML-QUIP
MOLFILE
MPIIO
MSCG
NETCDF
PLUMED
PYTHON
QMMM
SCAFACOS
VORONOI
VTK)
foreach(PKG ${PACKAGES_WITH_LIB})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -0,0 +1,26 @@
# preset that will restore gcc/g++ with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -Werror=vla -Wno-maybe-uninitialized -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -Werror=vla -Wno-maybe-uninitialized -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O3 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_CXX "g++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
set(MPI_C "gcc" CACHE STRING "" FORCE)
set(MPI_C_COMPILER "mpicc" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -Wno-maybe-uninitialized -g" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -Wno-maybe-uninitialized -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-Wall -O3 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_Fortran "gfortran" CACHE STRING "" FORCE)
set(MPI_Fortran_COMPILER "mpifort" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "gcc" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "gomp" CACHE STRING "" FORCE)
set(OpenMP_CXX "g++" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "gomp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libgomp.so" CACHE PATH "" FORCE)

View File

@ -230,7 +230,7 @@ $(VENV):
)
$(MATHJAX):
@git clone -b 3.1.4 -c advice.detachedHead=0 --depth 1 git://github.com/mathjax/MathJax.git $@
@git clone -b 3.2.0 -c advice.detachedHead=0 --depth 1 git://github.com/mathjax/MathJax.git $@
$(ANCHORCHECK): $(VENV)
@( \

View File

@ -122,7 +122,7 @@ recorded compilation commands information when typing `make iwyu`.
A lot of code predates the application of the rules in this document
and the rules themselves are a moving target. So there are going to be
significant chunks of code that do not fully comply. This applies
for example to the USER-REAXC, or the USER-ATC package. The LAMMPS
for example to the REAXFF, or the ATC package. The LAMMPS
developers are dedicated to make an effort to improve the compliance
and welcome volunteers wanting to help with the process.

View File

@ -1,4 +1,4 @@
.TH LAMMPS "27 May 2021" "2021-05-27"
.TH LAMMPS "30 July 2021" "2021-07-30"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
@ -135,7 +135,7 @@ For example "-pk gpu 2" is the same as "package gpu 2" in the input
script. The possible styles and options are discussed in the
.B LAMMPS
manual for the "package" command. This switch can be used multiple
times, e.g. to set options for the USER-INTEL and USER-OMP packages
times, e.g. to set options for the INTEL and OPENMP packages
when used together. Along with the "-sf" or "-suffix" switch, this
is a convenient mechanism for invoking accelerator packages and their
options without having to edit an input script.

View File

@ -191,7 +191,7 @@ Bibliography
A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996).
**(Campana)**
C.\ Campana and M. H. Muser, *Practical Green's function approach to the simulation of elastic semi-infinite solids*\ , `Phys. Rev. B [74], 075420 (2006) <https://doi.org/10.1103/PhysRevB.74.075420>`_
C.\ Campana and M. H. Muser, *Practical Green's function approach to the simulation of elastic semi-infinite solids*, `Phys. Rev. B [74], 075420 (2006) <https://doi.org/10.1103/PhysRevB.74.075420>`_
**(Cao1)**
J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993).
@ -767,7 +767,7 @@ Bibliography
Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997).
**(Moustafa)**
Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, *Very fast averaging of thermal properties of crystals by molecular simulation*\ , `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, *Very fast averaging of thermal properties of crystals by molecular simulation*, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
**(Muller-Plathe1)**
Muller-Plathe, J Chem Phys, 106, 6082 (1997).

View File

@ -90,7 +90,7 @@ standard. A more detailed discussion of that is below.
directory, or ``make`` from the ``src/STUBS`` dir. If the build
fails, you may need to edit the ``STUBS/Makefile`` for your
platform. The stubs library does not provide MPI/IO functions
required by some LAMMPS packages, e.g. ``MPIIO`` or ``USER-LB``,
required by some LAMMPS packages, e.g. ``MPIIO`` or ``LATBOLTZ``,
and thus is not compatible with those packages.
.. note::
@ -120,19 +120,19 @@ self-installed MPICH or OpenMPI, so you should study the provided
documentation to find out how to build and link with it.
The majority of OpenMP (threading) support in LAMMPS is provided by the
``USER-OMP`` package; see the :doc:`Speed_omp`
page for details. The ``USER-INTEL`` package also includes OpenMP
threading (it is compatible with ``USER-OMP`` and will usually fall
back on styles from that package, if a ``USER-INTEL`` does not exist)
``OPENMP`` package; see the :doc:`Speed_omp`
page for details. The ``INTEL`` package also includes OpenMP
threading (it is compatible with ``OPENMP`` and will usually fall
back on styles from that package, if a ``INTEL`` does not exist)
and adds vectorization support when compiled with compatible compilers,
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
package can be compiled to include OpenMP threading.
In addition, there are a few commands in LAMMPS that have native OpenMP
support included as well. These are commands in the ``MPIIO``,
``SNAP``, ``USER-DIFFRACTION``, and ``USER-DPD`` packages. In addition
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. In addition
some packages support OpenMP threading indirectly through the libraries
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``USER-COLVARS``.
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``COLVARS``.
See the :doc:`Packages details <Packages_details>` page for more
info on these packages and the pages for their respective commands
for OpenMP threading info.
@ -176,7 +176,7 @@ performance. Vendor provided compilers for a specific hardware can
produce faster code than open-source compilers like the GNU compilers.
On the most common x86 hardware most popular C++ compilers are quite
similar in performance of C/C++ code at high optimization levels. When
using the ``USER-INTEL`` package, there is a distinct advantage in using
using the ``INTEL`` package, there is a distinct advantage in using
the `Intel C++ compiler <intel_>`_ due to much improved vectorization
through SSE and AVX instructions on compatible hardware as the source
code includes changes and Intel compiler specific directives to enable
@ -325,9 +325,9 @@ LAMMPS.
.. code-block:: bash
Makefile.opt # OPT package
Makefile.omp # USER-OMP package
Makefile.intel_cpu # USER-INTEL package for CPUs
Makefile.intel_coprocessor # USER-INTEL package for KNLs
Makefile.omp # OPENMP package
Makefile.intel_cpu # INTEL package for CPUs
Makefile.intel_coprocessor # INTEL package for KNLs
Makefile.gpu # GPU package
Makefile.kokkos_cuda_mpi # KOKKOS package for GPUs
Makefile.kokkos_omp # KOKKOS package for CPUs (OpenMP)

View File

@ -140,7 +140,7 @@ can be used several times in one command.
For your convenience we provide :ref:`CMake presets <cmake_presets>`
that combine multiple settings to enable optional LAMMPS packages or use
a different compiler tool chain. Those are loaded with the *-C* flag
(``-C ../cmake/presets/minimal.cmake``). This step would only be needed
(``-C ../cmake/presets/basic.cmake``). This step would only be needed
once, as the settings from the preset files are stored in the
``CMakeCache.txt`` file. It is also possible to customize the build
by adding one or more *-D* flags to the CMake command line.

View File

@ -310,7 +310,7 @@ and working.
parameter needs to be adjusted. Typically a value around 1.0e-13
can be used, but it may need to be as large as 1.0e-8 in some
cases.
- The tests for pair styles from OPT, USER-OMP and USER-INTEL are
- The tests for pair styles from OPT, OPENMP and INTEL are
performed with automatically rescaled epsilon to account for
additional loss of precision from code optimizations and different
summation orders.
@ -345,7 +345,7 @@ and compared. If the fix is a thermostat and thus the internal property
``t_target`` can be extracted, then this is compared to the reference
data. The tests are repeated with the respa run style.
If the fix has a multi-threaded version in the USER-OMP package, then
If the fix has a multi-threaded version in the OPENMP package, then
the entire set of tests is repeated for that version as well.
For this to work, some additional conditions have to be met by the

View File

@ -31,37 +31,37 @@ This is the list of packages that may require additional steps.
.. table_from_list::
:columns: 6
* :ref:`ADIOS <adios>`
* :ref:`ATC <atc>`
* :ref:`AWPMD <awpmd>`
* :ref:`COLVARS <colvars>`
* :ref:`COMPRESS <compress>`
* :ref:`GPU <gpu>`
* :ref:`H5MD <h5md>`
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MDI <mdi>`
* :ref:`MESONT <mesont>`
* :ref:`MESSAGE <message>`
* :ref:`MLIAP <mliap>`
* :ref:`ML-HDNNP <ml-hdnnp>`
* :ref:`ML-IAP <mliap>`
* :ref:`ML-PACE <ml-pace>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`
* :ref:`PLUMED <plumed>`
* :ref:`POEMS <poems>`
* :ref:`PYTHON <python>`
* :ref:`QMMM <qmmm>`
* :ref:`SCAFACOS <scafacos>`
* :ref:`VORONOI <voronoi>`
* :ref:`USER-ADIOS <user-adios>`
* :ref:`USER-ATC <user-atc>`
* :ref:`USER-AWPMD <user-awpmd>`
* :ref:`USER-COLVARS <user-colvars>`
* :ref:`USER-H5MD <user-h5md>`
* :ref:`USER-HDNNP <user-hdnnp>`
* :ref:`USER-INTEL <user-intel>`
* :ref:`USER-MDI <user-mdi>`
* :ref:`USER-MESONT <user-mesont>`
* :ref:`USER-MOLFILE <user-molfile>`
* :ref:`USER-NETCDF <user-netcdf>`
* :ref:`USER-PACE <user-pace>`
* :ref:`USER-PLUMED <user-plumed>`
* :ref:`USER-OMP <user-omp>`
* :ref:`USER-QMMM <user-qmmm>`
* :ref:`USER-QUIP <user-quip>`
* :ref:`USER-SCAFACOS <user-scafacos>`
* :ref:`USER-SMD <user-smd>`
* :ref:`USER-VTK <user-vtk>`
* :ref:`VTK <vtk>`
----------
@ -74,7 +74,8 @@ To build with this package you must have the `zlib compression library
<https://zlib.net>`_ available on your system to build dump styles with
a '/gz' suffix. There are also styles using the
`Zstandard <https://facebook.github.io/zstd/>`_ library which have a
'/zstd' suffix.
'/zstd' suffix. The zstd library version must be at least 1.4. Older
versions use an incompatible API and thus LAMMPS will fail to compile.
.. tabs::
@ -622,7 +623,7 @@ This list was last updated for version 3.4.1 of the Kokkos library.
mkdir build-kokkos-cuda
cd build-kokkos-cuda
cmake -C ../cmake/presets/minimal.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
cmake -C ../cmake/presets/basic.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
cmake --build .
.. tab:: Basic traditional make settings:
@ -811,16 +812,17 @@ be installed on your system.
.. _mliap:
MLIAP package
ML-IAP package
---------------------------
Building the MLIAP package requires including the :ref:`SNAP <PKG-SNAP>`
package. There will be an error message if this requirement is not satisfied.
Using the *mliappy* model also requires enabling Python support, which
in turn requires the :ref:`PYTHON <PKG-PYTHON>`
package **and** requires you have the `cython <https://cython.org>`_ software
installed and with it a working ``cythonize`` command. This feature requires
compiling LAMMPS with Python version 3.6 or later.
Building the ML-IAP package requires including the :ref:`ML-SNAP
<PKG-ML-SNAP>` package. There will be an error message if this requirement
is not satisfied. Using the *mliappy* model also requires enabling
Python support, which in turn requires to include the :ref:`PYTHON
<PKG-PYTHON>` package **and** requires to have the `cython
<https://cython.org>`_ software installed and with it a working
``cythonize`` command. This feature requires compiling LAMMPS with
Python version 3.6 or later.
.. tabs::
@ -834,9 +836,9 @@ compiling LAMMPS with Python version 3.6 or later.
suitable Python version and the ``cythonize`` command and choose
the default accordingly. During the build procedure the provided
.pyx file(s) will be automatically translated to C++ code and compiled.
Please do **not** run ``cythonize`` manually in the ``src/MLIAP`` folder,
Please do **not** run ``cythonize`` manually in the ``src/ML-IAP`` folder,
as that can lead to compilation errors if Python support is not enabled.
If you did by accident, please remove the generated .cpp and .h files.
If you did it by accident, please remove the generated .cpp and .h files.
.. tab:: Traditional make
@ -845,15 +847,16 @@ compiling LAMMPS with Python version 3.6 or later.
the ``cythonize`` command in case the corresponding .pyx file(s) were
modified. You may need to modify ``lib/python/Makefile.lammps``
if the LAMMPS build fails.
To manually enforce building MLIAP with Python support enabled,
you can add
``-DMLIAP_PYTHON`` to the ``LMP_INC`` variable in your machine makefile.
You may have to manually run the ``cythonize`` command on .pyx file(s)
in the ``src`` folder, if this is not automatically done during
installing the MLIAP package. Please do **not** run ``cythonize``
in the ``src/MLIAP`` folder, as that can lead to compilation errors
if Python support is not enabled.
If you did by accident, please remove the generated .cpp and .h files.
To enable building the ML-IAP package with Python support enabled,
you need to add ``-DMLIAP_PYTHON`` to the ``LMP_INC`` variable in
your machine makefile. You may have to manually run the
``cythonize`` command on .pyx file(s) in the ``src`` folder, if
this is not automatically done during installing the ML-IAP
package. Please do **not** run ``cythonize`` in the ``src/ML-IAP``
folder, as that can lead to compilation errors if Python support
is not enabled. If you did this by accident, please remove the
generated .cpp and .h files.
----------
@ -1054,12 +1057,12 @@ binary package provided by your operating system.
----------
.. _user-adios:
.. _adios:
USER-ADIOS package
ADIOS package
-----------------------------------
The USER-ADIOS package requires the `ADIOS I/O library
The ADIOS package requires the `ADIOS I/O library
<https://github.com/ornladios/ADIOS2>`_, version 2.3.1 or newer. Make
sure that you have ADIOS built either with or without MPI to match if
you build LAMMPS with or without MPI. ADIOS compilation settings for
@ -1075,38 +1078,38 @@ systems.
.. code-block:: bash
-D ADIOS2_DIR=path # path is where ADIOS 2.x is installed
-D PKG_USER-ADIOS=yes
-D PKG_ADIOS=yes
.. tab:: Traditional make
Turn on the USER-ADIOS package before building LAMMPS. If the
Turn on the ADIOS package before building LAMMPS. If the
ADIOS 2.x software is installed in PATH, there is nothing else to
do:
.. code-block:: bash
$ make yes-user-adios
$ make yes-adios
otherwise, set ADIOS2_DIR environment variable when turning on the package:
.. code-block:: bash
$ ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed
$ ADIOS2_DIR=path make yes-adios # path is where ADIOS 2.x is installed
----------
.. _user-atc:
.. _atc:
USER-ATC package
ATC package
-------------------------------
The USER-ATC package requires the MANYBODY package also be installed.
The ATC package requires the MANYBODY package also be installed.
.. tabs::
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-ATC=yes``
No additional settings are needed besides ``-D PKG_ATC=yes``
and ``-D PKG_MANYBODY=yes``.
.. tab:: Traditional make
@ -1149,16 +1152,16 @@ The USER-ATC package requires the MANYBODY package also be installed.
----------
.. _user-awpmd:
.. _awpmd:
USER-AWPMD package
AWPMD package
------------------
.. tabs::
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-AQPMD=yes``.
No additional settings are needed besides ``-D PKG_AQPMD=yes``.
.. tab:: Traditional make
@ -1200,9 +1203,9 @@ USER-AWPMD package
----------
.. _user-colvars:
.. _colvars:
USER-COLVARS package
COLVARS package
---------------------------------------
This package includes the `Colvars library
@ -1216,7 +1219,7 @@ be built for the most part with all major versions of the C++ language.
This is the recommended build procedure for using Colvars in
LAMMPS. No additional settings are normally needed besides
``-D PKG_USER-COLVARS=yes``.
``-D PKG_COLVARS=yes``.
.. tab:: Traditional make
@ -1259,9 +1262,9 @@ be built for the most part with all major versions of the C++ language.
----------
.. _user-pace:
.. _ml-pace:
USER-PACE package
ML-PACE package
-----------------------------
This package requires a library that can be downloaded and built
@ -1274,8 +1277,8 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
.. tab:: CMake build
By default the library will be downloaded from the git repository
and built automatically when the USER-PACE package is enabled with
``-D PKG_USER-PACE=yes``. The location for the sources may be
and built automatically when the ML-PACE package is enabled with
``-D PKG_ML-PACE=yes``. The location for the sources may be
customized by setting the variable ``PACELIB_URL`` when
configuring with CMake (e.g. to use a local archive on machines
without internet access). Since CMake checks the validity of the
@ -1286,7 +1289,7 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
.. tab:: Traditional make
You can download and build the USER-PACE library
You can download and build the ML-PACE library
in one step from the ``lammps/src`` dir, using these commands,
which invoke the ``lib/pace/Install.py`` script.
@ -1299,9 +1302,9 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
----------
.. _user-plumed:
.. _plumed:
USER-PLUMED package
PLUMED package
-------------------------------------
.. _plumedinstall: https://plumed.github.io/doc-master/user-doc/html/_installation.html
@ -1309,7 +1312,7 @@ USER-PLUMED package
Before building LAMMPS with this package, you must first build PLUMED.
PLUMED can be built as part of the LAMMPS build or installed separately
from LAMMPS using the generic `PLUMED installation instructions <plumedinstall_>`_.
The USER-PLUMED package has been tested to work with Plumed versions
The PLUMED package has been tested to work with Plumed versions
2.4.x, 2.5.x, and 2.6.x and will error out, when trying to run calculations
with a different version of the Plumed kernel.
@ -1345,7 +1348,7 @@ LAMMPS build.
.. tab:: CMake build
When the ``-D PKG_USER-PLUMED=yes`` flag is included in the cmake
When the ``-D PKG_PLUMED=yes`` flag is included in the cmake
command you must ensure that GSL is installed in locations that
are specified in your environment. There are then two additional
variables that control the manner in which PLUMED is obtained and
@ -1378,7 +1381,7 @@ LAMMPS build.
.. tab:: Traditional make
PLUMED needs to be installed before the USER-PLUMED package is
PLUMED needs to be installed before the PLUMED package is
installed so that LAMMPS can find the right settings when
compiling and linking the LAMMPS executable. You can either
download and build PLUMED inside the LAMMPS plumed library folder
@ -1403,12 +1406,12 @@ LAMMPS build.
build to use. A new file ``lib/plumed/Makefile.lammps`` is also
created with settings suitable for LAMMPS to compile and link
PLUMED using the desired linkage mode. After this step is
completed, you can install the USER-PLUMED package and compile
completed, you can install the PLUMED package and compile
LAMMPS in the usual manner:
.. code-block:: bash
$ make yes-user-plumed
$ make yes-plumed
$ make machine
Once this compilation completes you should be able to run LAMMPS
@ -1423,15 +1426,15 @@ LAMMPS build.
If you want to change the linkage mode, you have to re-run "make
lib-plumed" with the desired settings **and** do a re-install if
the USER-PLUMED package with "make yes-user-plumed" to update the
the PLUMED package with "make yes-plumed" to update the
required makefile settings with the changes in the lib/plumed
folder.
----------
.. _user-h5md:
.. _h5md:
USER-H5MD package
H5MD package
---------------------------------
To build with this package you must have the HDF5 software package
@ -1442,7 +1445,7 @@ the HDF5 library.
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-H5MD=yes``.
No additional settings are needed besides ``-D PKG_H5MD=yes``.
This should auto-detect the H5MD library on your system. Several
advanced CMake H5MD options exist if you need to specify where it
@ -1474,13 +1477,13 @@ the HDF5 library.
----------
.. _user-hdnnp:
.. _ml-hdnnp:
USER-HDNNP package
---------------------------------
ML-HDNNP package
----------------
To build with the USER-HDNNP package it is required to download and build the
external `n2p2 <https://github.com/CompPhysVienna/n2p2>`__ library ``v2.1.4``
To build with the ML-HDNNP package it is required to download and build the
external `n2p2 <https://github.com/CompPhysVienna/n2p2>`_ library ``v2.1.4``
(or higher). The LAMMPS build process offers an automatic download and
compilation of *n2p2* or allows you to choose the installation directory of
*n2p2* manually. Please see the boxes below for the CMake and traditional build
@ -1490,7 +1493,7 @@ In case of a manual installation of *n2p2* you only need to build the *n2p2* cor
library ``libnnp`` and interface library ``libnnpif``. When using GCC it should
suffice to execute ``make libnnpif`` in the *n2p2* ``src`` directory. For more
details please see ``lib/hdnnp/README`` and the `n2p2 build documentation
<https://compphysvienna.github.io/n2p2/topics/build.html>`__.
<https://compphysvienna.github.io/n2p2/topics/build.html>`_.
.. tabs::
@ -1528,24 +1531,24 @@ details please see ``lib/hdnnp/README`` and the `n2p2 build documentation
----------
.. _user-intel:
.. _intel:
USER-INTEL package
INTEL package
-----------------------------------
To build with this package, you must choose which hardware you want to
build for, either x86 CPUs or Intel KNLs in offload mode. You should
also typically :ref:`install the USER-OMP package <user-omp>`, as it can be
used in tandem with the USER-INTEL package to good effect, as explained
also typically :ref:`install the OPENMP package <openmp>`, as it can be
used in tandem with the INTEL package to good effect, as explained
on the :doc:`Speed_intel` page.
When using Intel compilers version 16.0 or later is required. You can
also use the GNU or Clang compilers and they will provide performance
improvements over regular styles and USER-OMP styles, but less so than
improvements over regular styles and OPENMP styles, but less so than
with the Intel compilers. Please also note, that some compilers have
been found to apply memory alignment constraints incompletely or
incorrectly and thus can cause segmentation faults in otherwise correct
code when using features from the USER-INTEL package.
code when using features from the INTEL package.
.. tabs::
@ -1562,7 +1565,7 @@ code when using features from the USER-INTEL package.
Choose which hardware to compile for in Makefile.machine via the
following settings. See ``src/MAKE/OPTIONS/Makefile.intel_cpu*``
and ``Makefile.knl`` files for examples. and
``src/USER-INTEL/README`` for additional information.
``src/INTEL/README`` for additional information.
For CPUs:
@ -1598,9 +1601,9 @@ TBB and MKL.
----------
.. _user-mdi:
.. _mdi:
USER-MDI package
MDI package
-----------------------------
.. tabs::
@ -1627,9 +1630,9 @@ USER-MDI package
----------
.. _user-mesont:
.. _mesont:
USER-MESONT package
MESONT package
-------------------------
This package includes a library written in Fortran 90 in the
@ -1642,7 +1645,7 @@ they will be downloaded the first time this package is installed.
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-MESONT=yes``
No additional settings are needed besides ``-D PKG_MESONT=yes``
.. tab:: Traditional make
@ -1669,9 +1672,9 @@ they will be downloaded the first time this package is installed.
----------
.. _user-molfile:
.. _molfile:
USER-MOLFILE package
MOLFILE package
---------------------------------------
.. tabs::
@ -1681,9 +1684,9 @@ USER-MOLFILE package
.. code-block:: bash
-D MOLFILE_INCLUDE_DIR=path # (optional) path where VMD molfile plugin headers are installed
-D PKG_USER-MOLFILE=yes
-D PKG_MOLFILE=yes
Using ``-D PKG_USER-MOLFILE=yes`` enables the package, and setting
Using ``-D PKG_MOLFILE=yes`` enables the package, and setting
``-D MOLFILE_INCLUDE_DIR`` allows to provide a custom location for
the molfile plugin header files. These should match the ABI of the
plugin files used, and thus one typically sets them to include
@ -1707,9 +1710,9 @@ USER-MOLFILE package
----------
.. _user-netcdf:
.. _netcdf:
USER-NETCDF package
NETCDF package
-------------------------------------
To build with this package you must have the NetCDF library installed
@ -1719,7 +1722,7 @@ on your system.
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-NETCDF=yes``.
No additional settings are needed besides ``-D PKG_NETCDF=yes``.
This should auto-detect the NETCDF library if it is installed on
your system at standard locations. Several advanced CMake NETCDF
@ -1738,9 +1741,9 @@ on your system.
----------
.. _user-omp:
.. _openmp:
USER-OMP package
OPENMP package
-------------------------------
.. tabs::
@ -1748,13 +1751,13 @@ USER-OMP package
.. tab:: CMake build
No additional settings are required besides ``-D
PKG_USER-OMP=yes``. If CMake detects OpenMP compiler support, the
USER-OMP code will be compiled with multi-threading support
PKG_OPENMP=yes``. If CMake detects OpenMP compiler support, the
OPENMP code will be compiled with multi-threading support
enabled, otherwise as optimized serial code.
.. tab:: Traditional make
To enable multi-threading support in the USER-OMP package (and
To enable multi-threading support in the OPENMP package (and
other styles supporting OpenMP) the following compile and link
flags must be added to your Makefile.machine file. See
``src/MAKE/OPTIONS/Makefile.omp`` for an example.
@ -1771,12 +1774,12 @@ USER-OMP package
----------
.. _user-qmmm:
.. _qmmm:
USER-QMMM package
QMMM package
---------------------------------
For using LAMMPS to do QM/MM simulations via the USER-QMMM package you
For using LAMMPS to do QM/MM simulations via the QMMM package you
need to build LAMMPS as a library. A LAMMPS executable with :doc:`fix
qmmm <fix_qmmm>` included can be built, but will not be able to do a
QM/MM simulation on as such. You must also build a QM code - currently
@ -1799,11 +1802,11 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
libqmmm.a) are not included in the static LAMMPS library and
(currently) not installed, while their code is included in the
shared LAMMPS library. Thus a typical command line to configure
building LAMMPS for USER-QMMM would be:
building LAMMPS for QMMM would be:
.. code-block:: bash
cmake -C ../cmake/presets/minimal.cmake -D PKG_USER-QMMM=yes \
cmake -C ../cmake/presets/basic.cmake -D PKG_QMMM=yes \
-D BUILD_LIB=yes -DBUILD_SHARED_LIBS=yes ../cmake
After completing the LAMMPS build and also configuring and
@ -1846,16 +1849,16 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
----------
.. _user-quip:
.. _ml-quip:
USER-QUIP package
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. See step 1 and step 1.1 in the
``lib/quip/README`` file for details on how to do this.
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
@ -1863,11 +1866,14 @@ to be downloaded and configured. See step 1 and step 1.1 in the
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download OpenKIM API v2 for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
CMake will **not** download and build the QUIP library. But once you have
done that, a CMake build of LAMMPS with ``-D PKG_USER-QUIP=yes`` should
work. Set the ``QUIP_LIBRARY`` variable if CMake cannot find the QUIP library.
CMake will try to download and build the QUIP library from GitHub, if it is not
found on the local machine. This requires to have git installed. It will use the same compilers
and flags as used for compiling LAMMPS. Currently this is only supported for the GNU and the
Intel compilers. Set the ``QUIP_LIBRARY`` variable if you want to use a previously compiled
and installed QUIP library and CMake cannot find it.
.. tab:: Traditional make
@ -1881,9 +1887,9 @@ to be downloaded and configured. See step 1 and step 1.1 in the
----------
.. _user-scafacos:
.. _scafacos:
USER-SCAFACOS package
SCAFACOS package
-----------------------------------------
To build with this package, you must download and build the
@ -1928,9 +1934,9 @@ To build with this package, you must download and build the
----------
.. _user-smd:
.. _machdyn:
USER-SMD package
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
@ -1972,9 +1978,9 @@ Eigen3 is a template library, so you do not need to build it.
----------
.. _user-vtk:
.. _vtk:
USER-VTK package
VTK package
-------------------------------
To build with this package you must have the VTK library installed on
@ -1984,7 +1990,7 @@ your system.
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_USER-VTK=yes``.
No additional settings are needed besides ``-D PKG_VTK=yes``.
This should auto-detect the VTK library if it is installed on your
system at standard locations. Several advanced VTK options exist

View File

@ -117,10 +117,10 @@ settings may become outdated:
make mac # build serial LAMMPS on a Mac
make mac_mpi # build parallel LAMMPS on a Mac
make intel_cpu # build with the USER-INTEL package optimized for CPUs
make knl # build with the USER-INTEL package optimized for KNLs
make intel_cpu # build with the INTEL package optimized for CPUs
make knl # build with the INTEL package optimized for KNLs
make opt # build with the OPT package optimized for CPUs
make omp # build with the USER-OMP package optimized for OpenMP
make omp # build with the OPENMP package optimized for OpenMP
make kokkos_omp # build with the KOKKOS package for OpenMP
make kokkos_cuda_mpi # build with the KOKKOS package for GPUs
make kokkos_phi # build with the KOKKOS package for KNLs

View File

@ -204,9 +204,9 @@ be multiple tests run automatically:
.. parsed-literal::
Found 33 standard and 41 user packages
Standard package NEWPACKAGE missing in Packages_standard.rst
Standard package NEWPACKAGE missing in Packages_details.rst
Found 88 packages
Package NEWPACKAGE missing in Packages_list.rst
Package NEWPACKAGE missing in Packages_details.rst
- A test that only standard, printable ASCII text characters are used.
This runs the command ``env LC_ALL=C grep -n '[^ -~]' src/*.rst`` and

View File

@ -30,17 +30,37 @@ steps, as explained on the :doc:`Build extras <Build_extras>` page.
These links take you to the extra instructions for those select
packages:
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-HDNNP <user-hdnnp>` | :ref:`USER-INTEL <user-intel>` |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-MOLFILE <user-molfile>` | :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PACE <user-pace>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
| :ref:`USER-QUIP <user-quip>` | :ref:`USER-SCAFACOS <user-scafacos>` | :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
.. table_from_list::
:columns: 6
* :ref:`ADIOS <adios>`
* :ref:`ATC <atc>`
* :ref:`AWPMD <awpmd>`
* :ref:`COLVARS <colvars>`
* :ref:`COMPRESS <compress>`
* :ref:`GPU <gpu>`
* :ref:`H5MD <h5md>`
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MESSAGE <message>`
* :ref:`ML-HDNNP <ml-hdnnp>`
* :ref:`ML-PACE <ml-pace>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`
* :ref:`PLUMED <plumed>`
* :ref:`POEMS <poems>`
* :ref:`PYTHON <python>`
* :ref:`QMMM <qmmm>`
* :ref:`SCAFACOS <scafacos>`
* :ref:`VORONOI <voronoi>`
* :ref:`VTK <vtk>`
The mechanism for including packages is simple but different for CMake
versus make.
@ -58,14 +78,10 @@ versus make.
.. code-block:: csh
-D PKG_MANYBODY=yes
-D PKG_USER-INTEL=yes
-D PKG_INTEL=yes
All standard and user packages are included the same way. Note
that USER packages have a hyphen between USER and the rest of the
package name, not an underscore.
See the shortcut section below for how to install many packages at
once with CMake.
All packages are included the same way. See the shortcut section
below for how to install many packages at once with CMake.
.. note::
@ -89,12 +105,10 @@ versus make.
.. code-block:: bash
make no-rigid
make yes-user-intel
make yes-intel
All standard and user packages are included the same way.
See the shortcut section below for how to install many packages at
once with make.
All packages are included the same way. See the shortcut section
below for how to install many packages at once with make.
.. note::
@ -126,7 +140,7 @@ other files dependent on that package are also excluded.
.. note::
By default no package is installed. Prior to August 2018, however,
By default no packages are installed. Prior to August 2018, however,
if you downloaded a tarball, 3 packages (KSPACE, MANYBODY, MOLECULE)
were pre-installed via the traditional make procedure in the ``src``
directory. That is no longer the case, so that CMake will build
@ -153,7 +167,7 @@ one of them as a starting point and customize it to your needs.
.. code-block:: bash
cmake -C ../cmake/presets/minimal.cmake [OPTIONS] ../cmake # enable just a few core packages
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake # enable just a few core packages
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages
cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake # enable packages which download sources or potential files
cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake # disable packages that do require extra libraries or tools
@ -208,10 +222,10 @@ These commands install/un-install sets of packages:
make yes-all # install all packages
make no-all # uninstall all packages
make yes-standard or make yes-std # install standard packages
make no-standard or make no-std # uninstall standard packages
make yes-user # install user packages
make no-user # uninstall user packages
make yes-basic # install a few commonly used packages'
make no-basic # remove a few commonly used packages'
make yes-most # install most packages w/o libs'
make no-most # remove most packages w/o libs'
make yes-lib # install packages that require extra libraries
make no-lib # uninstall packages that require extra libraries
make yes-ext # install packages that require external libraries
@ -225,15 +239,14 @@ package`` will list all the these commands.
Installing or un-installing a package for the make based build process
works by simply copying files back and forth between the main source
directory src and the sub-directories with the package name (e.g.
src/KSPACE, src/USER-ATC), so that the files are included or excluded
src/KSPACE, src/ATC), so that the files are included or excluded
when LAMMPS is built. Only source files in the src folder will be
compiled.
The following make commands help manage files that exist in both the
src directory and in package sub-directories. You do not normally
need to use these commands unless you are editing LAMMPS files or are
:doc:`installing a patch <Install_patch>` downloaded from the LAMMPS web
site.
updating LAMMPS via git.
Type ``make package-status`` or ``make ps`` to show which packages are
currently installed. For those that are installed, it will list any
@ -245,10 +258,10 @@ currently installed, without listing the status of packages that are
not installed.
Type ``make package-update`` or ``make pu`` to overwrite src files with
files from the package sub-directories if the package is installed.
It should be used after a :doc:`patch has been applied <Install_patch>`,
since patches only update the files in the package sub-directory, but
not the src files.
files from the package sub-directories if the package is installed. It
should be used after the checkout has been :doc:`updated or changed
withy git <Install_git>`, this will only update the files in the package
sub-directories, but not the copies in the src folder.
Type ``make package-overwrite`` to overwrite files in the package
sub-directories with src files.

View File

@ -64,7 +64,7 @@ LAMMPS can use them if they are available on your system.
selected, then CMake will try to detect, if threaded FFTW
libraries are available and enable them by default. This setting
is independent of whether OpenMP threads are enabled and a
packages like KOKKOS or USER-OMP is used. If CMake cannot detect
packages like KOKKOS or OPENMP is used. If CMake cannot detect
the FFT library, you can set these variables to assist:
.. code-block:: bash
@ -242,8 +242,8 @@ does not support 64-bit integers or incurs performance penalties when
using them.
These are limits for the core of the LAMMPS code, specific features or
some styles may impose additional limits. The :ref:`USER-ATC
<PKG-USER-ATC>` package cannot be compiled with the "bigbig" setting.
some styles may impose additional limits. The :ref:`ATC
<PKG-ATC>` package cannot be compiled with the "bigbig" setting.
Also, there are limitations when using the library interface where some
functions with known issues have been replaced by dummy calls printing a
corresponding error message rather than crashing randomly or corrupting

View File

@ -18,7 +18,7 @@ Bond_style potentials
All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -57,7 +57,7 @@ Angle_style potentials
All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -99,7 +99,7 @@ Dihedral_style potentials
All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -135,7 +135,7 @@ Improper_style potentials
All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::

View File

@ -2,7 +2,7 @@ Commands by category
====================
This page lists most of the LAMMPS commands, grouped by category. The
:doc:`General commands <Commands_all>` doc page lists all general commands
:doc:`General commands <Commands_all>` page lists all general commands
alphabetically. Style options for entries like fix, compute, pair etc.
have their own pages where they are listed alphabetically.

View File

@ -16,8 +16,8 @@ Compute commands
An alphabetic list of all LAMMPS :doc:`compute <compute>` commands.
Some styles have accelerated versions. This is indicated by
additional letters in parenthesis: g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
additional letters in parenthesis: g = GPU, i = INTEL, k =
KOKKOS, o = OPENMP, t = OPT.
.. table_from_list::
:columns: 5
@ -47,17 +47,20 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`dihedral <compute_dihedral>`
* :doc:`dihedral/local <compute_dihedral_local>`
* :doc:`dilatation/atom <compute_dilatation_atom>`
* :doc:`dipole <compute_dipole>`
* :doc:`dipole/chunk <compute_dipole_chunk>`
* :doc:`displace/atom <compute_displace_atom>`
* :doc:`dpd <compute_dpd>`
* :doc:`dpd/atom <compute_dpd_atom>`
* :doc:`edpd/temp/atom <compute_edpd_temp_atom>`
* :doc:`efield/atom <compute_efield_atom>`
* :doc:`entropy/atom <compute_entropy_atom>`
* :doc:`erotate/asphere <compute_erotate_asphere>`
* :doc:`erotate/rigid <compute_erotate_rigid>`
* :doc:`erotate/sphere <compute_erotate_sphere>`
* :doc:`erotate/sphere/atom <compute_erotate_sphere_atom>`
* :doc:`event/displace <compute_event_displace>`
* :doc:`fabric <compute_fabric>`
* :doc:`fep <compute_fep>`
* :doc:`force/tally <compute_tally>`
* :doc:`fragment/atom <compute_cluster_atom>`
@ -69,6 +72,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`gyration/shape/chunk <compute_gyration_shape_chunk>`
* :doc:`heat/flux <compute_heat_flux>`
* :doc:`heat/flux/tally <compute_tally>`
* :doc:`heat/flux/virial/tally <compute_tally>`
* :doc:`hexorder/atom <compute_hexorder_atom>`
* :doc:`hma <compute_hma>`
* :doc:`improper <compute_improper>`

View File

@ -16,7 +16,7 @@ Fix commands
An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles
have accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -157,11 +157,15 @@ OPT.
* :doc:`orient/fcc <fix_orient>`
* :doc:`orient/eco <fix_orient_eco>`
* :doc:`pafi <fix_pafi>`
* :doc:`pair/tracker <fix_pair_tracker>`
* :doc:`phonon <fix_phonon>`
* :doc:`pimd <fix_pimd>`
* :doc:`planeforce <fix_planeforce>`
* :doc:`plumed <fix_plumed>`
* :doc:`poems <fix_poems>`
* :doc:`polarize/bem/gmres <fix_polarize>`
* :doc:`polarize/bem/icc <fix_polarize>`
* :doc:`polarize/functional <fix_polarize>`
* :doc:`pour <fix_pour>`
* :doc:`precession/spin <fix_precession_spin>`
* :doc:`press/berendsen <fix_press_berendsen>`
@ -175,14 +179,14 @@ OPT.
* :doc:`qeq/dynamic <fix_qeq>`
* :doc:`qeq/fire <fix_qeq>`
* :doc:`qeq/point <fix_qeq>`
* :doc:`qeq/reax (ko) <fix_qeq_reax>`
* :doc:`qeq/reaxff (ko) <fix_qeq_reaxff>`
* :doc:`qeq/shielded <fix_qeq>`
* :doc:`qeq/slater <fix_qeq>`
* :doc:`qmmm <fix_qmmm>`
* :doc:`qtb <fix_qtb>`
* :doc:`rattle <fix_shake>`
* :doc:`reax/c/bonds (k) <fix_reaxc_bonds>`
* :doc:`reax/c/species (k) <fix_reaxc_species>`
* :doc:`reaxff/bonds (k) <fix_reaxff_bonds>`
* :doc:`reaxff/species (k) <fix_reaxff_species>`
* :doc:`recenter <fix_recenter>`
* :doc:`restrain <fix_restrain>`
* :doc:`rhok <fix_rhok>`

View File

@ -50,6 +50,6 @@ values are not desired, the :doc:`processors <processors>` and
tell LAMMPS how to map processors to the simulation box.
Many input script errors are detected by LAMMPS and an ERROR or
WARNING message is printed. The :doc:`Errors <Errors>` doc page gives
WARNING message is printed. The :doc:`Errors <Errors>` page gives
more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used.

View File

@ -16,7 +16,7 @@ KSpace solvers
All LAMMPS :doc:`kspace_style <kspace_style>` solvers. Some styles have
accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -28,12 +28,16 @@ OPT.
* :doc:`ewald/dipole/spin <kspace_style>`
* :doc:`msm (o) <kspace_style>`
* :doc:`msm/cg (o) <kspace_style>`
* :doc:`msm/dielectric <kspace_style>`
* :doc:`pppm (giko) <kspace_style>`
* :doc:`pppm/cg (o) <kspace_style>`
* :doc:`pppm/dipole <kspace_style>`
* :doc:`pppm/dipole/spin <kspace_style>`
* :doc:`pppm/dielectric <kspace_style>`
* :doc:`pppm/disp (io) <kspace_style>`
* :doc:`pppm/disp/tip4p (o) <kspace_style>`
* :doc:`pppm/disp/dielectric <kspace_style>`
* :doc:`pppm/stagger <kspace_style>`
* :doc:`pppm/tip4p (o) <kspace_style>`
* :doc:`pppm/dielectric <kspace_style>`
* :doc:`scafacos <kspace_style>`

View File

@ -16,7 +16,7 @@ Pair_style potentials
All LAMMPS :doc:`pair_style <pair_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT.
.. table_from_list::
@ -29,7 +29,7 @@ OPT.
* :doc:`hybrid/scaled <pair_hybrid>`
* :doc:`kim <pair_kim>`
* :doc:`list <pair_list>`
*
* :doc:`tracker <pair_tracker>`
*
*
*
@ -69,13 +69,16 @@ OPT.
* :doc:`comb3 <pair_comb>`
* :doc:`cosine/squared <pair_cosine_squared>`
* :doc:`coul/cut (gko) <pair_coul>`
* :doc:`coul/cut/dielectric <pair_dielectric>`
* :doc:`coul/cut/global (o) <pair_coul>`
* :doc:`coul/cut/soft (o) <pair_fep_soft>`
* :doc:`coul/debye (gko) <pair_coul>`
* :doc:`coul/diel (o) <pair_coul_diel>`
* :doc:`coul/dsf (gko) <pair_coul>`
* :doc:`coul/exclude <pair_coul>`
* :doc:`coul/long (gko) <pair_coul>`
* :doc:`coul/long/cs (g) <pair_cs>`
* :doc:`coul/long/dielectric <pair_dielectric>`
* :doc:`coul/long/soft (o) <pair_fep_soft>`
* :doc:`coul/msm (o) <pair_coul>`
* :doc:`coul/slater/cut <pair_coul_slater>`
@ -143,13 +146,17 @@ OPT.
* :doc:`lj/cubic (go) <pair_lj_cubic>`
* :doc:`lj/cut (gikot) <pair_lj>`
* :doc:`lj/cut/coul/cut (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/cut/dielectric (o) <pair_dielectric>`
* :doc:`lj/cut/coul/cut/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/coul/debye (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/debye/dielectric <pair_dielectric>`
* :doc:`lj/cut/coul/dsf (gko) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/long (gikot) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/long/cs <pair_cs>`
* :doc:`lj/cut/coul/long/dielectric (o) <pair_dielectric>`
* :doc:`lj/cut/coul/long/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/coul/msm (go) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/msm/dielectric <pair_dielectric>`
* :doc:`lj/cut/coul/wolf (o) <pair_lj_cut_coul>`
* :doc:`lj/cut/dipole/cut (go) <pair_dipole>`
* :doc:`lj/cut/dipole/long (g) <pair_dipole>`
@ -164,6 +171,7 @@ OPT.
* :doc:`lj/gromacs (gko) <pair_gromacs>`
* :doc:`lj/gromacs/coul/gromacs (ko) <pair_gromacs>`
* :doc:`lj/long/coul/long (iot) <pair_lj_long>`
* :doc:`lj/long/coul/long/dielectric <pair_dielectric>`
* :doc:`lj/long/dipole/long <pair_dipole>`
* :doc:`lj/long/tip4p/long (o) <pair_lj_long>`
* :doc:`lj/mdf <pair_mdf>`
@ -183,7 +191,7 @@ OPT.
* :doc:`lubricateU/poly <pair_lubricateU>`
* :doc:`mdpd <pair_mesodpd>`
* :doc:`mdpd/rhosum <pair_mesodpd>`
* :doc:`meam/c <pair_meamc>`
* :doc:`meam <pair_meam>`
* :doc:`meam/spline (o) <pair_meam_spline>`
* :doc:`meam/sw/spline <pair_meam_sw_spline>`
* :doc:`mesocnt <pair_mesocnt>`
@ -228,7 +236,7 @@ OPT.
* :doc:`python <pair_python>`
* :doc:`quip <pair_quip>`
* :doc:`rann <pair_rann>`
* :doc:`reax/c (ko) <pair_reaxc>`
* :doc:`reaxff (ko) <pair_reaxff>`
* :doc:`rebo (io) <pair_airebo>`
* :doc:`resquared (go) <pair_resquared>`
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>`

View File

@ -47,7 +47,7 @@ LAMMPS:
named "x" followed by an "x" character.
How the variable is converted to a text string depends on what style
of variable it is; see the :doc:`variable <variable>` doc page for
of variable it is; see the :doc:`variable <variable>` page for
details. It can be a variable that stores multiple text strings, and
return one of them. The returned text string can be multiple "words"
(space separated) which will then be interpreted as multiple

View File

@ -25,23 +25,20 @@ The reset_ids command has been renamed to :doc:`reset_atom_ids <reset_atom_ids>`
MEAM package
------------
The MEAM package has been removed since it was superseded by the
:ref:`USER-MEAMC package <PKG-USER-MEAMC>`. The code in
the USER-MEAMC package is a translation of the Fortran code of MEAM into C++,
which removes several restrictions (e.g. there can be multiple instances
in hybrid pair styles) and allows for some optimizations leading
to better performance. The new pair style :doc:`meam/c <pair_meamc>` has
the exact same syntax as the old "meam" pair style and thus pair style
meam is an alias to the new style and backward
compatibility of old inputs is preserved.
The MEAM package in Fortran has been replaced by a C++ implementation.
The code in the :ref:`MEAM package <PKG-MEAM>` is a translation of the
Fortran code of MEAM into C++, which removes several restrictions
(e.g. there can be multiple instances in hybrid pair styles) and allows
for some optimizations leading to better performance. The pair style
:doc:`meam <pair_meam>` has the exact same syntax.
REAX package
------------
The REAX package has been removed since it was superseded by the
:ref:`USER-REAXC package <PKG-USER-REAXC>`. The USER-REAXC
:ref:`REAXFF package <PKG-REAXFF>`. The REAXFF
package has been tested to yield equivalent results to the REAX package,
offers better performance, supports OpenMP multi-threading via USER-OMP,
offers better performance, supports OpenMP multi-threading via OPENMP,
and GPU and threading parallelization through KOKKOS. The new pair styles
are not syntax compatible with the removed reax pair style, so input
files will have to be adapted.

View File

@ -17,7 +17,7 @@ currently supports building with :doc:`conventional makefiles
differ in how packages are enabled or disabled for inclusion into a
LAMMPS binary so they cannot be mixed. The source files for each
package are in all-uppercase sub-directories of the ``src`` folder, for
example ``src/MOLECULE`` or ``src/USER-MISC``. The ``src/STUBS``
example ``src/MOLECULE`` or ``src/EXTRA-MOLECULE``. The ``src/STUBS``
sub-directory is not a package but contains a dummy MPI library, that is
used when building a serial version of the code. The ``src/MAKE``
directory and its sub-directories contain makefiles with settings and

View File

@ -404,8 +404,8 @@ noise). Then it will restart from the previously generated restart and
compare with the reference and also start from the data file. A final
check will use multi-cutoff r-RESPA (if supported by the pair style) at
a 1:1 split and compare to the Verlet results. These sets of tests are
run with multiple test fixtures for accelerated styles (OPT, USER-OMP,
USER-INTEL) and for the latter two with 4 OpenMP threads enabled. For
run with multiple test fixtures for accelerated styles (OPT, OPENMP,
INTEL) and for the latter two with 4 OpenMP threads enabled. For
these tests the relative error (epsilon) is lowered by a common factor
due to the additional numerical noise, but the tests are still comparing
to the same reference data.

View File

@ -334,10 +334,11 @@ arguments of commands in LAMMPS are parsed and to make abstractions of
repetitive tasks.
The :cpp:class:`LAMMPS_NS::ArgInfo` class provides an abstraction
for parsing references to compute or fix styles or variables. These
would start with a "c\_", "f\_", "v\_" followed by the ID or name of
than instance and may be postfixed with one or two array indices
"[<number>]" with numbers > 0.
for parsing references to compute or fix styles, variables or custom
integer or double properties handled by :doc:`fix property/atom <fix_property_atom>`.
These would start with a "c\_", "f\_", "v\_", "d\_", "d2\_", "i\_", or "i2\_"
followed by the ID or name of than instance and may be postfixed with
one or two array indices "[<number>]" with numbers > 0.
A typical code segment would look like this:

View File

@ -59,7 +59,7 @@ of each timestep. First of all, implement a constructor:
}
In the constructor you should parse your fix arguments which are
specified in the script. All fixes have pretty the same syntax:
specified in the script. All fixes have pretty much the same syntax:
``fix <fix-ID> <fix group> <fix name> <fix arguments ...>``. The
first 3 parameters are parsed by Fix base class constructor, while
``<fix arguments>`` should be parsed by you. In our case, we need to

View File

@ -1,11 +1,11 @@
Errors
******
These doc pages describe the errors you can encounter when using
LAMMPS. The common problems include conceptual issues. The messages
and warnings doc pages give complete lists of all the messages the
code may generate (except those generated by USER packages), with
additional details for many of them.
These doc pages describe many of the error and warning message you can
encounter when using LAMMPS. The common problems include conceptual
issues. The messages and warnings doc pages give complete lists of all
the messages the code may generate, with additional details for many of
them.
.. toctree::
:maxdepth: 1

View File

@ -17,8 +17,9 @@ the steps outlined below:
if your issue has already been reported and if it is still open.
* Check the `GitHub Pull Requests page <https://github.com/lammps/lammps/pulls>`_
to see if there is already a fix for your bug pending.
* Check the `mailing list archives <https://www.lammps.org/mail.html>`_
to see if the issue has been discussed before.
* Check the `mailing list archives <https://www.lammps.org/mail.html>`_ or
the `LAMMPS forum <https://www.lammps.org/forum.html>`_ to see if the
issue has been discussed before.
If none of these steps yields any useful information, please file a new
bug report on the `GitHub Issue page <https://github.com/lammps/lammps/issues>`_.

View File

@ -14,10 +14,6 @@ For example, a message like this:
means that line #78 in the file src/velocity.cpp generated the error.
Looking in the source code may help you figure out what went wrong.
Note that error messages from :doc:`user-contributed packages <Packages_user>` are not listed here. If such an error
occurs and is not self-explanatory, you will need to look in the source
code or contact the author of the package.
Doc page with :doc:`WARNING messages <Errors_warnings>`
----------
@ -574,10 +570,10 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
See the region prism command for details.
*Can only use -plog with multiple partitions*
Self-explanatory. See doc page discussion of command-line switches.
Self-explanatory. See page discussion of command-line switches.
*Can only use -pscreen with multiple partitions*
Self-explanatory. See doc page discussion of command-line switches.
Self-explanatory. See page discussion of command-line switches.
*Can only use Kokkos supported regions with Kokkos package*
Self-explanatory.
@ -1158,7 +1154,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Self-explanatory.
*Cannot use -reorder after -partition*
Self-explanatory. See doc page discussion of command-line switches.
Self-explanatory. See page discussion of command-line switches.
*Cannot use Ewald with 2d simulation*
The kspace style ewald cannot be used in 2d simulations. You can use
@ -2351,14 +2347,14 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Compute used in variable between runs is not current*
Computes cannot be invoked by a variable in between runs. Thus they
must have been evaluated on the last timestep of the previous run in
order for their value(s) to be accessed. See the doc page for the
order for their value(s) to be accessed. See the page for the
variable command for more info.
*Compute used in variable thermo keyword between runs is not current*
Some thermo keywords rely on a compute to calculate their value(s).
Computes cannot be invoked by a variable in between runs. Thus they
must have been evaluated on the last timestep of the previous run in
order for their value(s) to be accessed. See the doc page for the
order for their value(s) to be accessed. See the page for the
variable command for more info.
*Compute vcm/chunk does not use chunk/atom compute*
@ -3130,7 +3126,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Energy was not tallied on needed timestep*
You are using a thermo keyword that requires potentials to
have tallied energy, but they did not on this timestep. See the
variable doc page for ideas on how to make this work.
variable page for ideas on how to make this work.
*Epsilon or sigma reference not set by pair style in PPPMDisp*
Self-explanatory.
@ -4539,10 +4535,10 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
particles.
*Incorrect # of floating-point values in Bodies section of data file*
See doc page for body style.
See page for body style.
*Incorrect # of integer values in Bodies section of data file*
See doc page for body style.
See page for body style.
*Incorrect %s format in data file*
A section of the data file being read by fix property/atom does
@ -4577,7 +4573,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
The number of fields per line is not what expected.
*Incorrect bonus data format in data file*
See the read_data doc page for a description of how various kinds of
See the read_data page for a description of how various kinds of
bonus data must be formatted for certain atom styles.
*Incorrect boundaries with slab Ewald*
@ -4645,7 +4641,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Incorrect number of words per line in the potential file.
*Incorrect integer value in Bodies section of data file*
See doc page for body style.
See page for body style.
*Incorrect multiplicity arg for dihedral coefficients*
Self-explanatory. Check the input script or data file.
@ -5914,7 +5910,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
other.
*Must set number of threads via package omp command*
Because you are using the USER-OMP package, set the number of threads
Because you are using the OPENMP package, set the number of threads
via its settings, not by the pair_style snap nthreads setting.
*Must shrink-wrap piston boundary*
@ -6015,7 +6011,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Self-explanatory.
*Needed bonus data not in data file*
Some atom styles require bonus data. See the read_data doc page for
Some atom styles require bonus data. See the read_data page for
details.
*Needed molecular topology not in data file*
@ -6217,7 +6213,7 @@ keyword to allow for additional bonds to be formed
*One or more atom IDs is too big*
The limit on atom IDs is set by the SMALLBIG, BIGBIG, SMALLSMALL
setting in your LAMMPS build. See the :doc:`Build settings <Build_settings>` doc page for more info.
setting in your LAMMPS build. See the :doc:`Build settings <Build_settings>` page for more info.
*One or more atom IDs is zero*
Either all atoms IDs must be zero or none of them.
@ -6359,16 +6355,16 @@ keyword to allow for additional bonds to be formed
The GPU package must be installed via "make yes-gpu" before LAMMPS is
built.
*Package intel command without USER-INTEL package installed*
The USER-INTEL package must be installed via "make yes-user-intel"
*Package intel command without INTEL package installed*
The INTEL package must be installed via "make yes-intel"
before LAMMPS is built.
*Package kokkos command without KOKKOS package enabled*
The KOKKOS package must be installed via "make yes-kokkos" before
LAMMPS is built, and the "-k on" must be used to enable the package.
*Package omp command without USER-OMP package installed*
The USER-OMP package must be installed via "make yes-user-omp" before
*Package omp command without OPENMP package installed*
The OPENMP package must be installed via "make yes-openmp" before
LAMMPS is built.
*Pair body requires atom style body*
@ -6612,7 +6608,7 @@ keyword to allow for additional bonds to be formed
*Pair style bop requires comm ghost cutoff at least 3x larger than %g*
Use the communicate ghost command to set this. See the pair bop
doc page for more details.
page for more details.
*Pair style born/coul/long requires atom attribute q*
An atom style that defines this attribute must be used.
@ -6932,7 +6928,7 @@ keyword to allow for additional bonds to be formed
*Per-atom energy was not tallied on needed timestep*
You are using a thermo keyword that requires potentials to
have tallied energy, but they did not on this timestep. See the
variable doc page for ideas on how to make this work.
variable page for ideas on how to make this work.
*Per-atom fix in equal-style variable formula*
Equal-style variables cannot use per-atom quantities.
@ -6940,7 +6936,7 @@ keyword to allow for additional bonds to be formed
*Per-atom virial was not tallied on needed timestep*
You are using a thermo keyword that requires potentials to have
tallied the virial, but they did not on this timestep. See the
variable doc page for ideas on how to make this work.
variable page for ideas on how to make this work.
*Per-processor system is too big*
The number of owned atoms plus ghost atoms on a single
@ -8079,13 +8075,13 @@ keyword to allow for additional bonds to be formed
*Using suffix gpu without GPU package installed*
Self-explanatory.
*Using suffix intel without USER-INTEL package installed*
*Using suffix intel without INTEL package installed*
Self-explanatory.
*Using suffix kk without KOKKOS package enabled*
Self-explanatory.
*Using suffix omp without USER-OMP package installed*
*Using suffix omp without OPENMP package installed*
Self-explanatory.
*Using update dipole flag requires atom attribute mu*
@ -8427,7 +8423,7 @@ keyword to allow for additional bonds to be formed
*Virial was not tallied on needed timestep*
You are using a thermo keyword that requires potentials to
have tallied the virial, but they did not on this timestep. See the
variable doc page for ideas on how to make this work.
variable page for ideas on how to make this work.
*Voro++ error: narea and neigh have a different size*
This error is returned by the Voro++ library.

View File

@ -14,10 +14,6 @@ generated. For example, a message like this:
means that line #187 in the file src/domain.cpp generated the error.
Looking in the source code may help you figure out what went wrong.
Note that warning messages from :doc:`user-contributed packages <Packages_user>` are not listed here. If such a warning
occurs and is not self-explanatory, you will need to look in the source
code or contact the author of the package.
Doc page with :doc:`ERROR messages <Errors_messages>`
----------
@ -217,7 +213,7 @@ Doc page with :doc:`ERROR messages <Errors_messages>`
in unexpected behavior.
*Fix bond/swap will ignore defined angles*
See the doc page for fix bond/swap for more info on this
See the page for fix bond/swap for more info on this
restriction.
*Fix deposit near setting < possible overlap separation %g*
@ -518,7 +514,7 @@ This will most likely cause errors in kinetic fluctuations.
will integrate the body motion, but it would be more efficient to use
fix rigid.
*Not using real units with pair reax*
*Not using real units with pair reaxff*
This is most likely an error, unless you have created your own ReaxFF
parameter file in a different set of units.
@ -529,7 +525,7 @@ This will most likely cause errors in kinetic fluctuations.
*OMP_NUM_THREADS environment is not set.*
This environment variable must be set appropriately to use the
USER-OMP package.
OPENMP package.
*One or more atoms are time integrated more than once*
This is probably an error since you typically do not want to
@ -809,5 +805,3 @@ This will most likely cause errors in kinetic fluctuations.
*Using pair tail corrections with pair_modify compute no*
The tail corrections will thus not be computed.
*pair style reax is now deprecated and will soon be retired. Users should switch to pair_style reax/c*
Self-explanatory.

View File

@ -150,6 +150,8 @@ Lowercase directories
+-------------+------------------------------------------------------------------+
| threebody | regression test input for a variety of manybody potentials |
+-------------+------------------------------------------------------------------+
| tracker | track interactions in LJ melt |
+-------------+------------------------------------------------------------------+
| vashishta | use of the Vashishta potential |
+-------------+------------------------------------------------------------------+
| voronoi | Voronoi tesselation via compute voronoi/atom command |
@ -172,10 +174,10 @@ web site.
If you uncomment the :doc:`dump image <dump_image>` line(s) in the input
script a series of JPG images will be produced by the run (assuming
you built LAMMPS with JPG support; see the
:doc:`Build_settings <Build_settings>` doc page for details). These can
:doc:`Build_settings <Build_settings>` page for details). These can
be viewed individually or turned into a movie or animated by tools
like ImageMagick or QuickTime or various Windows-based tools. See the
:doc:`dump image <dump_image>` doc page for more details. E.g. this
:doc:`dump image <dump_image>` page for more details. E.g. this
Imagemagick command would create a GIF file suitable for viewing in a
browser.
@ -205,23 +207,23 @@ Uppercase directories
+------------+--------------------------------------------------------------------------------------------------+
| MC | using LAMMPS in a Monte Carlo mode to relax the energy of a system |
+------------+--------------------------------------------------------------------------------------------------+
| PACKAGES | examples for specific packages and contributed commands |
+------------+--------------------------------------------------------------------------------------------------+
| SPIN | examples for features of the SPIN package |
+------------+--------------------------------------------------------------------------------------------------+
| UNITS | examples that run the same simulation in lj, real, metal units |
+------------+--------------------------------------------------------------------------------------------------+
| USER | examples for USER packages and USER-contributed commands |
+------------+--------------------------------------------------------------------------------------------------+
| VISCOSITY | compute viscosity via several methods |
+------------+--------------------------------------------------------------------------------------------------+
Nearly all of these directories have README files which give more
details on how to understand and use their contents.
The USER directory has a large number of sub-directories which
correspond by name to a USER package. They contain scripts that
illustrate how to use the command(s) provided in that package. Many
The PACKAGES directory has a large number of sub-directories which
correspond by name to specific packages. They contain scripts that
illustrate how to use the command(s) provided in those packages. Many
of the sub-directories have their own README files which give further
instructions. See the :doc:`Packages_details <Packages_details>` doc
page for more info on specific USER packages.
page for more info on specific packages.
.. _openkim: https://openkim.org

View File

@ -50,7 +50,7 @@ a temperature or pressure compute to a barostatting fix.
Thermodynamic output, which can be setup via the
:doc:`thermo_style <thermo_style>` command, often includes pressure
values. As explained on the doc page for the
values. As explained on the page for the
:doc:`thermo_style <thermo_style>` command, the default pressure is
setup by the thermo command itself. It is NOT the pressure associated
with any barostatting fix you have defined or with any compute you

View File

@ -49,7 +49,7 @@ command's documentation for the formula it computes.
COMPASS is a general force field for atomistic simulation of common
organic molecules, inorganic small molecules, and polymers which was
developed using ab initio and empirical parameterization techniques.
See the :doc:`Tools <Tools>` doc page for the msi2lmp tool for creating
See the :doc:`Tools <Tools>` page for the msi2lmp tool for creating
LAMMPS template input and data files from BIOVIA's Materials Studio
files. Please note that the msi2lmp tool is very old and largely
unmaintained, so it does not support all features of Materials Studio

View File

@ -10,7 +10,7 @@ deformable objects, etc. Note that other kinds of finite-size
spherical and aspherical particles are also supported by LAMMPS, such
as spheres, ellipsoids, line segments, and triangles, but they are
simpler entities than body particles. See the :doc:`Howto spherical
<Howto_spherical>` doc page for a general overview of all these
<Howto_spherical>` page for a general overview of all these
particle types.
Body particles are used via the :doc:`atom_style body <atom_style>`
@ -170,14 +170,14 @@ with this body style to compute body/body and body/non-body interactions.
The *rounded/polygon* body style represents body particles as a 2d
polygon with a variable number of N vertices. This style can only be
used for 2d models; see the :doc:`boundary <boundary>` command. See the
"pair_style body/rounded/polygon" doc page for a diagram of two
"pair_style body/rounded/polygon" page for a diagram of two
squares with rounded circles at the vertices. Special cases for N = 1
(circle) and N = 2 (rod with rounded ends) can also be specified.
One use of this body style is for 2d discrete element models, as
described in :ref:`Fraige <body-Fraige>`.
Similar to body style *nparticle*\ , the atom_style body command for
Similar to body style *nparticle*, the atom_style body command for
this body style takes two additional arguments:
.. parsed-literal::
@ -284,7 +284,7 @@ The *rounded/polyhedron* body style represents body particles as a 3d
polyhedron with a variable number of N vertices, E edges and F faces.
This style can only be used for 3d models; see the
:doc:`boundary <boundary>` command. See the "pair_style
body/rounded/polygon" doc page for a diagram of a two 2d squares with
body/rounded/polygon" page for a diagram of a two 2d squares with
rounded circles at the vertices. A 3d cube with rounded spheres at
the 8 vertices and 12 rounded edges would be similar. Special cases
for N = 1 (sphere) and N = 2 (rod with rounded ends) can also be
@ -293,7 +293,7 @@ specified.
This body style is for 3d discrete element models, as described in
:ref:`Wang <body-Wang>`.
Similar to body style *rounded/polygon*\ , the atom_style body command
Similar to body style *rounded/polygon*, the atom_style body command
for this body style takes two additional arguments:
.. parsed-literal::

View File

@ -51,7 +51,7 @@ scales the floating point value to spread it across multiple integers.
Spatial bins can be of various kinds, e.g. 1d bins = slabs, 2d bins =
pencils, 3d bins = boxes, spherical bins, cylindrical bins.
This compute also calculates the number of chunks *Nchunk*\ , which is
This compute also calculates the number of chunks *Nchunk*, which is
used by other commands to tally per-chunk data. *Nchunk* can be a
static value or change over time (e.g. the number of clusters). The
chunk ID for an individual atom can also be static (e.g. a molecule

View File

@ -119,7 +119,7 @@ server code. Another code could be substituted for either.
The examples below show launching both codes from the same window (or
batch script), using the "&" character to launch the first code in the
background. For all modes except *mpi/one*\ , you could also launch the
background. For all modes except *mpi/one*, you could also launch the
codes in separate windows on your desktop machine. It does not
matter whether you launch the client or server first.
@ -132,7 +132,7 @@ mpirun, even if one or both of them runs on a single processor. This
is so that MPI can figure out how to connect both MPI processes
together to exchange MPI messages between them.
For message exchange in *file*\ , *zmq*\ , or *mpi/two* modes:
For message exchange in *file*, *zmq*, or *mpi/two* modes:
.. code-block:: bash

View File

@ -362,7 +362,7 @@ have to be enabled to be included into a LAMMPS executable. Packages
are enabled through setting variables of the kind ``PKG_<NAME>`` to
``on`` and disabled by setting them to ``off`` (or using ``yes``,
``no``, ``1``, ``0`` correspondingly). ``<NAME>`` has to be replaced by
the name of the package, e.g. ``MOLECULE`` or ``USER-MISC``.
the name of the package, e.g. ``MOLECULE`` or ``EXTRA-PAIR``.
Using presets
@ -382,9 +382,9 @@ change some variables later with additional *-D* flags. A few examples:
.. code-block:: bash
cmake -C ../cmake/presets/minimal.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/presets/basic.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/presets/clang.cmake -C ../cmake/presets/most.cmake ../cmake
cmake -C ../cmake/presets/minimal.cmake -D BUILD_MPI=off ../cmake
cmake -C ../cmake/presets/basic.cmake -D BUILD_MPI=off ../cmake
The first command will install the packages ``KSPACE``, ``MANYBODY``,
``MOLECULE``, ``RIGID`` and ``MISC``; the first four from the preset
@ -400,7 +400,7 @@ It is also possible to do this incrementally.
.. code-block:: bash
cmake -C ../cmake/presets/minimal.cmake ../cmake
cmake -C ../cmake/presets/basic.cmake ../cmake
cmake -D PKG_MISC=on .
will achieve the same final configuration as in the first example above.

View File

@ -5,7 +5,7 @@ The adiabatic core-shell model by :ref:`Mitchell and Fincham <MitchellFincham>`
to a system. In order to mimic the electron shell of an ion, a
satellite particle is attached to it. This way the ions are split into
a core and a shell where the latter is meant to react to the
electrostatic environment inducing polarizability. See the :doc:`Howto polarizable <Howto_polarizable>` doc page for a discussion of all
electrostatic environment inducing polarizability. See the :doc:`Howto polarizable <Howto_polarizable>` page for a discussion of all
the polarizable models available in LAMMPS.
Technically, shells are attached to the cores by a spring force f =
@ -78,7 +78,7 @@ satellite particle if desired.
Since the core/shell model permits distances of r = 0.0 between the
core and shell, a pair style with a "cs" suffix needs to be used to
implement a valid long-range Coulombic correction. Several such pair
styles are provided in the CORESHELL package. See :doc:`this doc page <pair_cs>` for details. All of the core/shell enabled pair
styles are provided in the CORESHELL package. See :doc:`this page <pair_cs>` for details. All of the core/shell enabled pair
styles require the use of a long-range Coulombic solver, as specified
by the :doc:`kspace_style <kspace_style>` command. Either the PPPM or
Ewald solvers can be used.

View File

@ -42,7 +42,7 @@ context of your application.
stand-alone code could communicate with LAMMPS through files that the
command writes and reads.
See the :doc:`Modify command <Modify_command>` doc page for info on how
See the :doc:`Modify command <Modify_command>` page for info on how
to add a new command to LAMMPS.
.. spacer

View File

@ -2,14 +2,14 @@ Tutorial for Thermalized Drude oscillators in LAMMPS
====================================================
This tutorial explains how to use Drude oscillators in LAMMPS to
simulate polarizable systems using the USER-DRUDE package. As an
simulate polarizable systems using the DRUDE package. As an
illustration, the input files for a simulation of 250 phenol molecules
are documented. First of all, LAMMPS has to be compiled with the
USER-DRUDE package activated. Then, the data file and input scripts
DRUDE package activated. Then, the data file and input scripts
have to be modified to include the Drude dipoles and how to handle
them.
Example input scripts available: examples/USER/drude
Example input scripts available: examples/PACKAGES/drude
----------
@ -82,7 +82,7 @@ The data file is similar to a standard LAMMPS data file for
to their DC should appear in the data file as normal atoms and bonds.
You can use the *polarizer* tool (Python script distributed with the
USER-DRUDE package) to convert a non-polarizable data file (here
DRUDE package) to convert a non-polarizable data file (here
*data.102494.lmp*\ ) to a polarizable data file (\ *data-p.lmp*\ )
.. code-block:: bash
@ -91,7 +91,7 @@ USER-DRUDE package) to convert a non-polarizable data file (here
This will automatically insert the new atoms and bonds.
The masses and charges of DCs and DPs are computed
from *phenol.dff*\ , as well as the DC-DP bond constants. The file
from *phenol.dff*, as well as the DC-DP bond constants. The file
*phenol.dff* contains the polarizabilities of the atom types
and the mass of the Drude particles, for instance:
@ -106,7 +106,7 @@ and the mass of the Drude particles, for instance:
The hydrogen atoms are absent from this file, so they will be treated
as non-polarizable atoms. In the non-polarizable data file
*data.102494.lmp*\ , atom names corresponding to the atom type numbers
*data.102494.lmp*, atom names corresponding to the atom type numbers
have to be specified as comments at the end of lines of the *Masses*
section. You probably need to edit it to add these names. It should
look like
@ -125,7 +125,7 @@ look like
**Basic input file**
The atom style should be set to (or derive from) *full*\ , so that you
The atom style should be set to (or derive from) *full*, so that you
can define atomic charges and molecular bonds, angles, dihedrals...
The *polarizer* tool also outputs certain lines related to the input
@ -143,7 +143,7 @@ and N for non-polarizable atoms. Here the atom types 1 to 3 (C and O
atoms) are DC, atom types 4 and 5 (H atoms) are non-polarizable and
the atom types 6 to 8 are the newly created DPs.
By recognizing the fix *drude*\ , LAMMPS will find and store matching
By recognizing the fix *drude*, LAMMPS will find and store matching
DC-DP pairs and will treat DP as equivalent to their DC in the
*special bonds* relations. It may be necessary to extend the space
for storing such special relations. In this case extra space should
@ -340,11 +340,11 @@ For the *thole* pair style the coefficients are
The special neighbors have charge-charge and charge-dipole
interactions screened by the *coul* factors of the *special_bonds*
command (0.0, 0.0, and 0.5 in the example above). Without using the
pair_style *thole*\ , dipole-dipole interactions are screened by the
same factor. By using the pair_style *thole*\ , dipole-dipole
pair_style *thole*, dipole-dipole interactions are screened by the
same factor. By using the pair_style *thole*, dipole-dipole
interactions are screened by Thole's function, whatever their special
relationship (except within each DC-DP pair of course). Consider for
example 1-2 neighbors: using the pair_style *thole*\ , their dipoles
example 1-2 neighbors: using the pair_style *thole*, their dipoles
will see each other (despite the *coul* factor being 0.) and the
interactions between these dipoles will be damped by Thole's function.
@ -384,7 +384,7 @@ For our phenol example, the groups would be defined as
group CORES type 1 2 3 # DCs
group DRUDES type 6 7 8 # DPs
Note that with the fixes *drude/transform*\ , it is not required to
Note that with the fixes *drude/transform*, it is not required to
specify *comm_modify vel yes* because the fixes do it anyway (several
times and for the forces also).

View File

@ -140,8 +140,8 @@ After everything is done, add the files to the branch and commit them:
flag) will automatically include **all** modified **and** new files
and that is rarely the behavior you want. It can easily lead to
accidentally adding unrelated and unwanted changes into the
repository. Instead it is preferable to explicitly use *git add*\ ,
*git rm*\ , *git mv* for adding, removing, renaming individual files,
repository. Instead it is preferable to explicitly use *git add*,
*git rm*, *git mv* for adding, removing, renaming individual files,
respectively, and then *git commit* to finalize the commit.
Carefully check all pending changes with *git status* before
committing them. If you find doing this on the command line too

View File

@ -17,6 +17,11 @@ This compute
* :doc:`compute erotate/sphere <compute_erotate_sphere>`
calculates rotational kinetic energy which can be :doc:`output with thermodynamic info <Howto_output>`.
The compute
* :doc:`compute fabric <compute_fabric>`
calculates various versions of the fabric tensor for granular and non-granular pair styles.
Use one of these 4 pair potentials, which compute forces and torques
between interacting pairs of particles:

View File

@ -4,7 +4,7 @@ Calculate thermal conductivity
The thermal conductivity kappa of a material can be measured in at
least 4 ways using various options in LAMMPS. See the examples/KAPPA
directory for scripts that implement the 4 methods discussed here for
a simple Lennard-Jones fluid model. Also, see the :doc:`Howto viscosity <Howto_viscosity>` doc page for an analogous discussion
a simple Lennard-Jones fluid model. Also, see the :doc:`Howto viscosity <Howto_viscosity>` page for an analogous discussion
for viscosity.
The thermal conductivity tensor kappa is a measure of the propensity
@ -58,7 +58,7 @@ between hot and cold regions of the simulation box.
The :doc:`compute heat/flux <compute_heat_flux>` command can calculate
the needed heat flux and describes how to implement the Green_Kubo
formalism using additional LAMMPS commands, such as the :doc:`fix ave/correlate <fix_ave_correlate>` command to calculate the needed
auto-correlation. See the doc page for the :doc:`compute heat/flux <compute_heat_flux>` command for an example input script
auto-correlation. See the page for the :doc:`compute heat/flux <compute_heat_flux>` command for an example input script
that calculates the thermal conductivity of solid Ar via the GK
formalism.

View File

@ -3,13 +3,13 @@ Manifolds (surfaces)
**Overview:**
This doc page is not about a LAMMPS input script command, but about
This page is not about a LAMMPS input script command, but about
manifolds, which are generalized surfaces, as defined and used by the
USER-MANIFOLD package, to track particle motion on the manifolds. See
the src/USER-MANIFOLD/README file for more details about the package
MANIFOLD package, to track particle motion on the manifolds. See
the src/MANIFOLD/README file for more details about the package
and its commands.
Below is a list of currently supported manifolds by the USER-MANIFOLD
Below is a list of currently supported manifolds by the MANIFOLD
package, their parameters and a short description of them. The
parameters listed here are in the same order as they should be passed
to the relevant fixes.

View File

@ -3,7 +3,7 @@ Using LAMMPS with the MDI library for code coupling
.. note::
This Howto doc page will eventually replace the
This Howto page will eventually replace the
:doc:`Howto client/server <Howto_client_server>` doc page.
Client/server coupling of two codes is where one code is the "client"
@ -120,7 +120,7 @@ input script will continue. After finishing execution of the input
script, the instance of LAMMPS will be destroyed.
LAMMPS supports the full set of MD-appropriate engine commands defined
by the MDI library. See the :doc:`mdi/engine <mdi_engine>` doc page for
by the MDI library. See the :doc:`mdi/engine <mdi_engine>` page for
a list of these.
If those commands are not sufficient for a user-developed driver to use

View File

@ -268,7 +268,7 @@ Computes that generate values to output
Every :doc:`compute <compute>` in LAMMPS produces either global or
per-atom or local values. The values can be scalars or vectors or
arrays of data. These values can be output using the other commands
described in this section. The doc page for each compute command
described in this section. The page for each compute command
describes what it produces. Computes that produce per-atom or local
values have the word "atom" or "local" in their style name. Computes
without the word "atom" or "local" produce global values.
@ -281,7 +281,7 @@ Fixes that generate values to output
Some :doc:`fixes <fix>` in LAMMPS produces either global or per-atom or
local values which can be accessed by other commands. The values can
be scalars or vectors or arrays of data. These values can be output
using the other commands described in this section. The doc page for
using the other commands described in this section. The page for
each fix command tells whether it produces any output quantities and
describes them.

View File

@ -10,7 +10,7 @@ systems can be simulated in LAMMPS using three methods:
* the adiabatic core-shell method, implemented in the
:doc:`CORESHELL <Howto_coreshell>` package,
* the thermalized Drude dipole method, implemented in the
:doc:`USER-DRUDE <Howto_drude>` package.
:doc:`DRUDE <Howto_drude>` package.
The fluctuating charge method calculates instantaneous charges on
interacting atoms based on the electronegativity equalization

View File

@ -8,34 +8,33 @@ periodically.
These are the relevant commands:
* :doc:`neb <neb>` for nudged elastic band calculations
* :doc:`hyper <hyper>` for bond boost hyperdynamics (HD)
* :doc:`neb <neb>` for nudged elastic band calculations (NEB)
* :doc:`neb_spin <neb_spin>` for magnetic nudged elastic band calculations
* :doc:`prd <prd>` for parallel replica dynamics
* :doc:`tad <tad>` for temperature accelerated dynamics
* :doc:`temper <temper>` for parallel tempering
* :doc:`prd <prd>` for parallel replica dynamics (PRD)
* :doc:`tad <tad>` for temperature accelerated dynamics (TAD)
* :doc:`temper <temper>` for parallel tempering with fixed volume
* :doc:`temper/npt <temper_npt>` for parallel tempering extended for NPT
* :doc:`temper/grem <temper_grem>` for parallel tempering with generalized replica exchange (gREM)
* :doc:`fix pimd <fix_pimd>` for path-integral molecular dynamics (PIMD)
NEB is a method for finding transition states and barrier energies.
PRD and TAD are methods for performing accelerated dynamics to find
and perform infrequent events. Parallel tempering or replica exchange
runs different replicas at a series of temperature to facilitate
rare-event sampling.
NEB is a method for finding transition states and barrier potential energies.
HD, PRD, and TAD are methods for performing accelerated dynamics to find and
perform infrequent events. Parallel tempering or replica exchange runs
different replicas at a series of temperature to facilitate rare-event
sampling. PIMD runs different replicas whose individual particles in different
replicas are coupled together by springs to model a system of ring-polymers which
can represent the quantum nature of atom cores.
These commands can only be used if LAMMPS was built with the REPLICA
package. See the :doc:`Build package <Build_package>` doc page for more
info.
PIMD runs different replicas whose individual particles are coupled
together by springs to model a system or ring-polymers.
This commands can only be used if LAMMPS was built with the USER-MISC
package. See the :doc:`Build package <Build_package>` doc page for more
package. See the :doc:`Build package <Build_package>` page for more
info.
In all these cases, you must run with one or more processors per
replica. The processors assigned to each replica are determined at
run-time by using the :doc:`-partition command-line switch <Run_options>` to launch LAMMPS on multiple partitions,
which in this context are the same as replicas. E.g. these commands:
run-time by using the :doc:`-partition command-line switch
<Run_options>` to launch LAMMPS on multiple partitions, which in this
context are the same as replicas. E.g. these commands:
.. code-block:: bash
@ -46,9 +45,11 @@ would each run 8 replicas, on either 16 or 8 processors. Note the use
of the :doc:`-in command-line switch <Run_options>` to specify the input
script which is required when running in multi-replica mode.
Also note that with MPI installed on a machine (e.g. your desktop),
you can run on more (virtual) processors than you have physical
processors. Thus the above commands could be run on a
single-processor (or few-processor) desktop so that you can run
a multi-replica simulation on more replicas than you have
physical processors.
Also note that with MPI installed on a machine (e.g. your desktop), you
can run on more (virtual) processors than you have physical processors.
Thus the above commands could be run on a single-processor (or
few-processor) desktop so that you can run a multi-replica simulation on
more replicas than you have physical processors. This is useful for
testing and debugging, since with most modern processors and MPI
libraries the efficiency of a calculation can severely diminish when
oversubscribing processors.

View File

@ -28,7 +28,7 @@ can be invoked via the *dpd/tstat* pair style:
:doc:`Fix nvt <fix_nh>` only thermostats the translational velocity of
particles. :doc:`Fix nvt/sllod <fix_nvt_sllod>` also does this, except
that it subtracts out a velocity bias due to a deforming box and
integrates the SLLOD equations of motion. See the :doc:`Howto nemd <Howto_nemd>` doc page for further details. :doc:`Fix nvt/sphere <fix_nvt_sphere>` and :doc:`fix nvt/asphere <fix_nvt_asphere>` thermostat not only translation
integrates the SLLOD equations of motion. See the :doc:`Howto nemd <Howto_nemd>` page for further details. :doc:`Fix nvt/sphere <fix_nvt_sphere>` and :doc:`fix nvt/asphere <fix_nvt_asphere>` thermostat not only translation
velocities but also rotational velocities for spherical and aspherical
particles.
@ -88,7 +88,7 @@ Below is a list of some custom temperature computes that can be used like that:
Thermodynamic output, which can be setup via the
:doc:`thermo_style <thermo_style>` command, often includes temperature
values. As explained on the doc page for the
values. As explained on the page for the
:doc:`thermo_style <thermo_style>` command, the default temperature is
setup by the thermo command itself. It is NOT the temperature
associated with any thermostatting fix you have defined or with any

View File

@ -23,21 +23,21 @@ origin given by **a** = (xhi-xlo,0,0); **b** = (xy,yhi-ylo,0); **c** =
and are called "tilt factors" because they are the amount of
displacement applied to faces of an originally orthogonal box to
transform it into the parallelepiped. In LAMMPS the triclinic
simulation box edge vectors **a**\ , **b**\ , and **c** cannot be arbitrary
simulation box edge vectors **a**, **b**, and **c** cannot be arbitrary
vectors. As indicated, **a** must lie on the positive x axis. **b** must
lie in the xy plane, with strictly positive y component. **c** may have
any orientation with strictly positive z component. The requirement
that **a**\ , **b**\ , and **c** have strictly positive x, y, and z components,
respectively, ensures that **a**\ , **b**\ , and **c** form a complete
that **a**, **b**, and **c** have strictly positive x, y, and z components,
respectively, ensures that **a**, **b**, and **c** form a complete
right-handed basis. These restrictions impose no loss of generality,
since it is possible to rotate/invert any set of 3 crystal basis
vectors so that they conform to the restrictions.
For example, assume that the 3 vectors **A**\ ,\ **B**\ ,\ **C** are the edge
For example, assume that the 3 vectors **A**,\ **B**,\ **C** are the edge
vectors of a general parallelepiped, where there is no restriction on
**A**\ ,\ **B**\ ,\ **C** other than they form a complete right-handed basis i.e.
**A** x **B** . **C** > 0. The equivalent LAMMPS **a**\ ,\ **b**\ ,\ **c** are a linear
rotation of **A**\ , **B**\ , and **C** and can be computed as follows:
**A**,\ **B**,\ **C** other than they form a complete right-handed basis i.e.
**A** x **B** . **C** > 0. The equivalent LAMMPS **a**,\ **b**,\ **c** are a linear
rotation of **A**, **B**, and **C** and can be computed as follows:
.. math::
@ -57,9 +57,9 @@ rotation of **A**\ , **B**\ , and **C** and can be computed as follows:
where A = \| **A** \| indicates the scalar length of **A**\ . The hat symbol (\^)
indicates the corresponding unit vector. :math:`\beta` and :math:`\gamma` are angles
between the vectors described below. Note that by construction,
**a**\ , **b**\ , and **c** have strictly positive x, y, and z components, respectively.
**a**, **b**, and **c** have strictly positive x, y, and z components, respectively.
If it should happen that
**A**\ , **B**\ , and **C** form a left-handed basis, then the above equations
**A**, **B**, and **C** form a left-handed basis, then the above equations
are not valid for **c**\ . In this case, it is necessary
to first apply an inversion. This can be achieved
by interchanging two basis vectors or by changing the sign of one of them.
@ -95,7 +95,7 @@ for details.
The 9 parameters (xlo,xhi,ylo,yhi,zlo,zhi,xy,xz,yz) are defined at the
time the simulation box is created. This happens in one of 3 ways.
If the :doc:`create_box <create_box>` command is used with a region of
style *prism*\ , then a triclinic box is setup. See the
style *prism*, then a triclinic box is setup. See the
:doc:`region <region>` command for details. If the
:doc:`read_data <read_data>` command is used to define the simulation
box, and the header of the data file contains a line with the "xy xz
@ -135,7 +135,7 @@ example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are geometrically all equivalent. If the box tilt exceeds this
limit during a dynamics run (e.g. via the :doc:`fix deform <fix_deform>`
command), then the box is "flipped" to an equivalent shape with a tilt
factor within the bounds, so the run can continue. See the :doc:`fix deform <fix_deform>` doc page for further details.
factor within the bounds, so the run can continue. See the :doc:`fix deform <fix_deform>` page for further details.
One exception to this rule is if the first dimension in the tilt
factor (x for xy) is non-periodic. In that case, the limits on the
@ -160,10 +160,10 @@ For extreme values of tilt, LAMMPS may also lose atoms and generate an
error.
Triclinic crystal structures are often defined using three lattice
constants *a*\ , *b*\ , and *c*\ , and three angles :math:`\alpha`,
constants *a*, *b*, and *c*, and three angles :math:`\alpha`,
:math:`\beta`, and :math:`\gamma`. Note that in this nomenclature,
the a, b, and c lattice constants are the scalar lengths of the edge
vectors **a**\ , **b**\ , and **c** defined above. The relationship
vectors **a**, **b**, and **c** defined above. The relationship
between these 6 quantities (a, b, c, :math:`\alpha`, :math:`\beta`,
:math:`\gamma`) and the LAMMPS box sizes (lx,ly,lz) =
(xhi-xlo,yhi-ylo,zhi-zlo) and tilt factors (xy,xz,yz) is as follows:
@ -188,10 +188,10 @@ The inverse relationship can be written as follows:
{\rm yz} = & \frac{b*c \cos{\alpha} - {\rm xy}*{\rm xz}}{\rm ly} \\
{\rm lz}^2 = & c^2 - {\rm xz}^2 - {\rm yz}^2 \\
The values of *a*\ , *b*\ , *c* , :math:`\alpha` , :math:`\beta`, and
The values of *a*, *b*, *c*, :math:`\alpha` , :math:`\beta`, and
:math:`\gamma` can be printed out or accessed by computes using the
:doc:`thermo_style custom <thermo_style>` keywords
*cella*\ , *cellb*\ , *cellc*\ , *cellalpha*\ , *cellbeta*\ , *cellgamma*\ ,
*cella*, *cellb*, *cellc*, *cellalpha*, *cellbeta*, *cellgamma*,
respectively.
As discussed on the :doc:`dump <dump>` command doc page, when the BOX

View File

@ -42,7 +42,7 @@ command, which determines grad(Vstream) in the equation above.
E.g. the derivative in the y-direction of the Vx component of fluid
motion or grad(Vstream) = dVx/dy. The Pxy off-diagonal component of
the pressure or stress tensor, as calculated by the :doc:`compute pressure <compute_pressure>` command, can also be monitored, which
is the J term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` doc page for details on NEMD simulations.
is the J term in the equation above. See the :doc:`Howto nemd <Howto_nemd>` page for details on NEMD simulations.
The third method is to perform a reverse non-equilibrium MD simulation
using the :doc:`fix viscosity <fix_viscosity>` command which implements

View File

@ -13,7 +13,7 @@ by several popular visualization tools. The :doc:`dump image <dump_image>` and :
output internally rendered images and convert a sequence of them to a
movie during the MD run. Several programs included with LAMMPS as
auxiliary tools can convert between LAMMPS format files and other
formats. See the :doc:`Tools <Tools>` doc page for details.
formats. See the :doc:`Tools <Tools>` page for details.
A Python-based toolkit distributed by our group can read native LAMMPS
dump files, including custom dump files with additional columns of
@ -25,7 +25,7 @@ RasMol visualization programs. Pizza.py has tools that do interactive
3d OpenGL visualization and one that creates SVG images of dump file
snapshots.
.. _pizza: https://pizza.sandia.gov
.. _pizza: https://lammps.github.io/pizza
.. _ensight: https://www.ansys.com/products/fluids/ansys-ensight

View File

@ -53,7 +53,7 @@ granular particles; all the other commands create smooth walls.
* :doc:`fix wall/region <fix_wall_region>` - use region surface as wall
* :doc:`fix wall/gran <fix_wall_gran>` - flat or curved walls with :doc:`pair_style granular <pair_gran>` potential
The *lj93*\ , *lj126*\ , *colloid*\ , *harmonic*\ , and *morse* styles all
The *lj93*, *lj126*, *colloid*, *harmonic*, and *morse* styles all
allow the flat walls to move with a constant velocity, or oscillate in
time. The :doc:`fix wall/region <fix_wall_region>` command offers the
most generality, since the region surface is treated as a wall, and

View File

@ -208,7 +208,7 @@ Presets are a way to specify a collection of CMake options using a file.
.. code-block:: bash
cmake ../cmake/presets/minimal.cmake ../cmake
cmake ../cmake/presets/basic.cmake ../cmake
This command configures the build and generates the necessary Makefiles. To compile the binary, run the make command.

View File

@ -18,7 +18,6 @@ need the source code.
Install_tarball
Install_git
Install_patch
These are the files and sub-directories in the LAMMPS distribution:
@ -27,6 +26,8 @@ These are the files and sub-directories in the LAMMPS distribution:
+------------+-------------------------------------------+
| LICENSE | GNU General Public License (GPL) |
+------------+-------------------------------------------+
| SECURITY.md| Security Policy for the LAMMPS package |
+------------+-------------------------------------------+
| bench | benchmark problems |
+------------+-------------------------------------------+
| cmake | CMake build files |

View File

@ -120,8 +120,11 @@ changed. How to do this depends on the build system you are using.
$ make package-update # sync package files with src files
$ make foo # re-build for your machine (mpi, serial, etc)
Just as described on the :doc:`Apply patch <Install_patch>` page,
after a patch has been installed.
to enforce consistency of the source between the src folder
and package directories. This is OK to do even if you don't
use any packages. The "make purge" command removes any deprecated
src files if they were removed by the patch from a package
sub-directory.
.. warning::

View File

@ -1,96 +0,0 @@
Applying patches
----------------
It is easy to stay current with the most recent LAMMPS patch releases
if you use git to track the LAMMPS development. Instructions for
how to stay current are on the
:doc:`Download the LAMMPS source with git <Install_git>` page.
If you prefer to download a tarball, as described on the
:doc:`tarball download <Install_tarball>` page, you can stay current by
downloading "patch files" when new patch releases are made. A link to
a patch file is posted on the
`bug fixes and new feature page <https://www.lammps.org/bug.html>`_
of the LAMMPS website, along
with a list of changed files and details about what is in the new patch
release. This page explains how to apply the patch file to your local
LAMMPS directory.
.. note::
You should not apply patch files to a local git checkout of
LAMMPS, only to an unpacked tarball. Use git commands to
update such a version of the LAMMPS source code.
Here are the steps to apply a patch file. Note that if your version
of LAMMPS is several patch releases behind, you need to apply all the
intervening patch files in succession to bring your version of LAMMPS
up to date.
* Download the patch file. You may have to shift-click in your browser
to download the file instead of display it. Patch files have names
like patch.12Dec16.
* Put the patch file in your top-level LAMMPS directory, where the
LICENSE and README files are.
* Apply the patch by typing the following command from your top-level
LAMMPS directory, where the redirected file is the name of the patch
file.
.. code-block:: bash
$ patch -bp1 < patch.12Dec16
* A list of updated files print out to the screen. The -b switch
creates backup files of your originals (e.g. src/force.cpp.orig), so
you can manually undo the patch if something goes wrong.
* Once you have updated your local files you need to re-build LAMMPS.
If you are applying several patches successively, you only need to
do the rebuild once at the end. How to do it depends on the build
system you are using.
.. tabs::
.. tab:: CMake build
Change to your build folder and type:
.. code-block:: bash
cmake . --build
CMake should auto-detect whether it needs to re-run the CMake
configuration step and otherwise redo the build for all files
that have been changed or files that depend on changed files.
In case some build options have been changed or renamed, you
may have to update those by running:
.. code-block:: bash
cmake .
and then rebuild.
.. tab:: Traditional make
Switch to the src directory and type:
.. code-block:: bash
$ make purge # remove any deprecated src files
$ make package-update # sync package files with src files
$ make foo # re-build for your machine (mpi, serial, etc)
to enforce consistency of the source between the src folder
and package directories. This is OK to do even if you don't
use any packages. The "make purge" command removes any deprecated
src files if they were removed by the patch from a package
sub-directory.
.. warning::
If you wish to edit/change a src file that is from a package,
you should edit the version of the file inside the package
sub-directory with src, then re-install the package. The
version in the source directory is merely a copy and will be
wiped out if you type "make package-update".

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