Compare commits

...

909 Commits

Author SHA1 Message Date
6f00e98945 Merge pull request #2785 from akohlmey/next_patch_release
Step version string for next patch release
2021-05-27 17:13:03 -04:00
bd1c5592ab Merge pull request #2784 from akohlmey/set-python-home
Internally set PYTHONHOME for LAMMPS on Windows
2021-05-27 16:45:34 -04:00
129c517abe link to copy of GPLv2 inside of LAMMPS distribution 2021-05-27 16:09:28 -04:00
98023e73b9 clarify GPL version and fix URLs 2021-05-27 15:44:56 -04:00
2ee3e5851d step version string for next patch release 2021-05-27 15:25:40 -04:00
b4e5298bf8 Merge pull request #2783 from stanmoore1/kk_update_3.4.1
Update Kokkos library in LAMMPS to v3.4.1
2021-05-27 15:10:34 -04:00
89058e8712 skip bundling GPLv3 lib 2021-05-27 15:05:27 -04:00
86059433f6 Merge pull request #2570 from kipbarrett/pair_rann
Add new Package USER-RANN with pair style rann for using a neural network to compute energies and forces
2021-05-27 13:07:26 -04:00
8c8e4eaeec Update Kokkos arch list 2021-05-27 10:48:10 -06:00
0895abaa74 Update Kokkos CMake file 2021-05-27 10:40:31 -06:00
a660f286b1 internally forward LAMMPSHOME environment variable, if present, to PYTHONHOME 2021-05-27 12:39:25 -04:00
76a472d8b8 Merge pull request #2640 from ndtrung81/eam-gpu
Fixing bugs on eam*/gpu for pair hybrid with neigh yes, where the gpu…
2021-05-27 12:11:13 -04:00
e2f702ab63 Merge pull request #2768 from rbberger/doc_versions
Prepare LAMMPS manual to show multiple versions and downloads
2021-05-27 10:54:43 -04:00
7d2f252568 Update Kokkos library in LAMMPS to v3.4.1 2021-05-27 08:45:16 -06:00
40a5c2de5b Merge pull request #2782 from jrgissing/bond/react-doc-tweaks
Bond/react doc tweaks
2021-05-27 10:41:14 -04:00
0713e95873 integrate documentation 2021-05-26 16:55:51 -04:00
258afaafd8 whitespace 2021-05-26 16:05:52 -04:00
80fc111b5c add new package to .gitignore 2021-05-26 16:05:45 -04:00
64aa84a851 remove dead code 2021-05-26 16:01:26 -04:00
f703025c32 whitespace 2021-05-26 16:01:03 -04:00
4b37421318 Add word 2021-05-26 16:00:58 -04:00
c13b1b39ef Change title and add forum page link 2021-05-26 15:58:30 -04:00
409dd02eae Merge remote-tracking branch 'origin/master' into doc_versions 2021-05-26 15:54:56 -04:00
368765f10f disable automatic clang-format processing for .cpp files 2021-05-26 15:41:44 -04:00
769183c94f simplify and reformat 2021-05-26 15:40:15 -04:00
4794b4cd38 update include files according to LAMMPS' conventions 2021-05-26 15:26:25 -04:00
9d9a7e853e make header ready for use with clang-format and apply conventions 2021-05-26 15:26:08 -04:00
1af4538858 update homepage URLs 2021-05-26 15:19:00 -04:00
012003c68a Merge branch 'master' into pair_rann
# Conflicts:
#	cmake/CMakeLists.txt
#	cmake/presets/all_off.cmake
#	cmake/presets/all_on.cmake
2021-05-26 15:17:30 -04:00
49ced1ed18 Merge pull request #2781 from akohlmey/collected-small-changes
Collected small changes
2021-05-26 11:29:18 -04:00
01212881d2 clarify docs 2021-05-26 00:05:21 -04:00
c723fe2345 Update fix_bond_react.rst 2021-05-25 23:54:43 -04:00
0f5a1178fb we don't need txt2rst and txt2html anymore 2021-05-25 22:14:29 -04:00
d3bf00769c a couple more URL fixes 2021-05-25 22:14:00 -04:00
04f7cd0fb7 replace non-ASCII characters 2021-05-25 22:13:37 -04:00
4ee00087c4 update homepage URLs 2021-05-25 18:59:06 -04:00
04defbf49c Merge remote-tracking branch 'github/master' into collected-small-changes 2021-05-25 18:57:34 -04:00
2fa389ed4a Merge pull request #2626 from singraber/pair-style-nnp
Contribution: package USER-HDNNP for high-dimensional neural network potentials
2021-05-25 17:51:40 -04:00
14f989b086 Also use current_version in layout.html 2021-05-25 17:36:52 -04:00
e1c5cfd372 Add LAMMPS_WEBSITE_BUILD_VERSION to set current doc version 2021-05-25 17:23:34 -04:00
5b548879a7 tell CMake to export all symbols when building .dlls on windows
this needs a special treatment when compiling with the MinGW cross-compiler
2021-05-25 17:17:54 -04:00
c10812644d correct citation 2021-05-25 17:17:16 -04:00
735c5c52dc Merge remote-tracking branch 'origin/master' into doc_versions 2021-05-25 17:15:23 -04:00
a3a2bdc8f6 Keep version in header, only show selector if LAMMPS_WEBSITE_BUILD is set 2021-05-25 17:15:17 -04:00
c6bf768826 update list of packages included with cross-compilation 2021-05-25 16:56:41 -04:00
8c9b29f9ec Merge branch 'pair-style-nnp' of github.com:singraber/lammps into pair-style-nnp 2021-05-25 14:52:50 -06:00
c55997abca Minor edits 2021-05-25 14:51:55 -06:00
9e1db61b41 Merge branch 'master' into pair-style-nnp 2021-05-25 16:44:55 -04:00
58625d800e also make CMake scripts in unittest tree consistent 2021-05-25 15:10:18 -04:00
bc063f2e88 make formatting of if statements and string comparisons consistent 2021-05-25 15:06:08 -04:00
bec53a1cbf fix bug with passing strings to fortran. this closes #2780 2021-05-25 14:41:35 -04:00
a853cd0487 tell CMake to export all symbols when building .dlls on windows
this needs a special treatment when compiling with the MinGW cross-compiler
2021-05-25 14:37:31 -04:00
92e995d3a2 Merge pull request #2778 from akohlmey/update-homepage-url
Add tool to fix LAMMPS homepage URLs
2021-05-24 16:58:33 -04:00
7cc00e3fed fix spelling 2021-05-24 16:21:48 -04:00
2e6a0112d3 update URLs in some more files 2021-05-24 16:19:37 -04:00
743ce218a4 Merge branch 'update-homepage-url' of github.com:akohlmey/lammps into update-homepage-url 2021-05-24 15:53:57 -04:00
fdfa761f45 update mesont fortran library sources 2021-05-24 15:53:44 -04:00
e7ed20d307 hack to allow processing individual files. handle a few more substitutions 2021-05-24 15:53:21 -04:00
49218059b4 hack to allow processing individual files 2021-05-24 15:38:41 -04:00
63ecb77303 fix some more URLs 2021-05-24 15:38:27 -04:00
73195677a5 don't export security statement to source snapshots 2021-05-24 15:34:47 -04:00
825182d06c fix typo. closes #2779 2021-05-24 15:33:48 -04:00
5eb818a02b the manual, especially the PDF version, has 3 parts 2021-05-24 14:44:47 -04:00
dca509a5d8 update the all on/off CMake presets 2021-05-24 14:43:13 -04:00
0a6401fb7b add missing colon 2021-05-24 14:39:39 -04:00
e4b3d8b632 correct table formatting that got broken by changing URLs 2021-05-24 14:38:03 -04:00
3f963ce249 update README/docs about generating the manual and accessing it online 2021-05-24 14:33:00 -04:00
09c19a936b update URLs in source code and manual 2021-05-24 14:18:20 -04:00
9bafefb4df Merge branch 'master' into update-homepage-url 2021-05-24 14:05:04 -04:00
61b1126c3d Merge branch 'master' into pair_rann
# Conflicts:
#	cmake/CMakeLists.txt
#	src/Makefile
2021-05-24 12:21:04 -04:00
a50c980595 Merge branch 'master' into pair-style-nnp 2021-05-24 12:08:45 -04:00
a0352433c0 Merge pull request #2777 from akohlmey/collected-small-changes
Collected small changes and fixes
2021-05-24 11:48:04 -04:00
08b44b59b0 Merge pull request #2776 from akohlmey/clang-tidy
Address issues detected by static code analysis with clang-tidy
2021-05-24 11:07:25 -04:00
7dee0b0633 Merge branch 'gpu-updates' into eam-gpu 2021-05-24 00:24:04 -04:00
0b538b1922 add tool to fix LAMMPS homepage URLs 2021-05-23 19:49:32 -04:00
f3e90633b5 Resolve merge conflicts with upstream one more time 2021-05-23 16:37:42 -04:00
53164321c9 silence CMake warnings with CMake 3.19 and later when cross compiling 2021-05-23 03:37:58 -04:00
ba854ec7c3 changes required to cross-compile unit tests for windows 2021-05-23 01:46:14 -04:00
d5f62a22b8 64-bit integers are "long long" on windows, not "long" (which is 32-bit) 2021-05-23 00:53:40 -04:00
bf2d1db49d PGI compiler can handle restrict and aligned attributes 2021-05-22 21:28:39 -04:00
d9bcbe0e42 fix null pointer dereferences due to typos 2021-05-22 19:16:36 -04:00
5c99669897 silence PGI compiler warnings 2021-05-22 19:09:01 -04:00
d2fe5e6ec8 include compiler optimization with certain build types when using presets 2021-05-22 18:35:56 -04:00
c0d13d064c since the new Intel compiler is LLVM based the _noalias macro needs to be defined like for GNU and Clang 2021-05-22 18:35:15 -04:00
7ba0d553e4 correct C++ standard dependency of Kokkos in Package details summary 2021-05-22 18:34:33 -04:00
6a41109cde work around compatibility issues with MPI and classic intel compilers 2021-05-22 18:30:25 -04:00
47507de276 libn2p2 uses M_PI which is non-standard and thus requires -std=gnu++11 with newer MinGW 2021-05-22 16:26:36 -04:00
0737e014f3 update code owners file 2021-05-22 13:51:55 -04:00
7a17780a82 consistently check for newton pair off and align error message rest of LAMMPS
also add checks for required charge property for pair styles with coulomb
2021-05-22 13:17:58 -04:00
0e1fa44b9d fix compilation error on latest intel OpenCL compiler due to missing tagint definition 2021-05-22 13:16:31 -04:00
6fe5c338a8 add comments to document USER-HDNNP cmake scripting 2021-05-22 11:54:35 -04:00
eae4efdbde silence PGI compiler warnings 2021-05-22 11:53:35 -04:00
076412b7ac allow compiler specific ar 2021-05-22 11:35:40 -04:00
8b76f6ac63 disable debug settings and pass platform "ar" program 2021-05-22 11:28:06 -04:00
42ef13bc06 enable C++11 for compiling N2P2 lib with PGI 2021-05-22 11:19:54 -04:00
14cb45c161 xcode compiler may be reported as AppleClang instead of Clang 2021-05-22 10:40:55 -04:00
5e2b97812e update sed command for BSD sed which doesn't like multiple -e options 2021-05-22 10:33:06 -04:00
450503cc42 pass C++ standard setting flag to N2P2 make (needed for macOS' xcode) 2021-05-22 10:30:38 -04:00
3083756a64 include USER-HDNNP in MinGW64 cross-compilation build 2021-05-22 08:03:29 -04:00
01a94af217 small doc update / whitespace fix 2021-05-22 08:01:45 -04:00
95427b1fda add support for building with Windows including cross-compilation and MPI-2 2021-05-22 07:43:54 -04:00
c0b25853cf more cmake tweaks 2021-05-21 17:12:11 -04:00
9f363f219f silence compiler warning 2021-05-21 16:58:01 -04:00
db55531eed simplify 2021-05-21 16:57:44 -04:00
1c4e011926 plug memory leak 2021-05-21 16:57:35 -04:00
48169abbe8 add doi to short citation message 2021-05-21 16:57:24 -04:00
a9dfecc27f regularize automatic download build for n2p2 library with CMake 2021-05-21 16:16:01 -04:00
10961b8cb6 update to upstream 2021-05-21 16:15:31 -04:00
e01502d349 Finished build doc pages 2021-05-21 18:18:46 +02:00
a9427f20b2 Merge pull request #2770 from strlnkv/wall_region_morse_bug_fix
wall/region Morse potential derivative correction
2021-05-19 20:07:26 -04:00
b2641a4836 Merge pull request #2775 from akohlmey/tip4p-coulomb-warn
Print warning when a tip4p pair style may cause incorrect results
2021-05-19 20:06:05 -04:00
5aebbee564 coordinate -> site 2021-05-19 19:29:00 -04:00
0b8c82e906 use correct type for clang-tidy command options 2021-05-19 17:56:26 -04:00
e584a3b958 Must use explicit scope on virtual functions when called from constructor 2021-05-19 16:57:15 -04:00
cfb3efb50f add cmake config option to enable clang-tidy with preferred options 2021-05-19 16:45:43 -04:00
a847a7ee9e print warning when a tip4p pair style may cause incorrect results 2021-05-19 15:33:26 -04:00
fe93603d15 Merge branch 'eam-gpu' of https://github.com/ndtrung81/lammps into eam-gpu 2021-05-19 10:59:47 -05:00
8af6e58a7f Fixed a bug with the eam kernel for screening out pairs that are excluded by the pair style (when eam is a sub-style in pair hybrid) 2021-05-19 10:56:51 -05:00
a0ca2e2681 Updated pair style hdnnp docs 2021-05-19 00:15:25 +02:00
32838fd4b8 Merge pull request #2773 from dynikon/master
Fix angle_style table doc
2021-05-18 16:31:15 -04:00
12baec203d Merge pull request #2771 from akohlmey/collected-small-changes
CMake and documentation updates for USER-MDI
2021-05-18 15:07:16 -04:00
5dbf9f754e Merge branch 'master' into eam-gpu 2021-05-18 14:19:39 -04:00
3ccac2d9cc Merge pull request #2772 from stanmoore1/bugfix
Fix issues in last patch
2021-05-18 14:17:45 -04:00
c6991b20ca fix angle_table doc 2021-05-18 13:26:13 +09:00
7ebed94df9 fix cut-n-paste bug 2021-05-17 18:14:21 -04:00
fb3fdb43a1 Tweak ASPHERE examples 2021-05-17 10:27:57 -06:00
cc99be900a Fix memory leak in Kokkos memory grow() function 2021-05-17 10:13:56 -06:00
2f91b03c50 Small tweak 2021-05-17 09:52:50 -06:00
b0be5ea408 Merge branch 'bugfix' of github.com:stanmoore1/lammps into bugfix 2021-05-17 09:41:35 -06:00
5271854721 Fix dellocation issues 2021-05-17 09:41:14 -06:00
5ad84a0a49 Fix unitialized variable 2021-05-17 09:08:59 -06:00
640a46ec3f Fix broken examples 2021-05-17 08:29:54 -06:00
9cf8f96838 Fixed bug, changed build docs 2021-05-17 00:39:06 +02:00
31a55f1f76 Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp 2021-05-16 22:54:29 +02:00
333f0c0c2a simplify some more 2021-05-15 23:01:59 -04:00
266b824b92 document -mdi command line flag 2021-05-15 22:30:14 -04:00
e4a24445c4 include USER-PACE in Windows package 2021-05-15 22:17:10 -04:00
017643cfa8 address various issues in USER-MDI.cmake for downloaded MDI library 2021-05-15 21:41:45 -04:00
d8d1f398cd fix formatting issues 2021-05-15 18:12:16 -04:00
7a8cd4694a document -mdi flag in help message 2021-05-15 18:12:03 -04:00
343fe6392b wall/region Morse potential derivative correction
The 1/r part due to dr/dx is added further in post_force().
2021-05-15 23:54:42 +03:00
e04f4dde17 work around use of non-standard M_PI define in PACE external library 2021-05-15 16:39:59 -04:00
8062323b93 update presets to reflect recently added packages 2021-05-15 10:19:01 -04:00
e6178892c7 Merge pull request #2766 from akohlmey/next_patch_release
Step version strings for the next patch release
2021-05-15 01:13:41 -04:00
7d40eb3cac fix issue with commands docs not being kept separate from programmer guide 2021-05-15 00:26:19 -04:00
492d82904f add false positives 2021-05-14 23:51:43 -04:00
59cc481108 change config entry for post 3.5 sphinx versions and enable permalinks 2021-05-14 23:51:33 -04:00
9f4cca4981 correct index entries 2021-05-14 23:50:51 -04:00
c311574fe6 add missing fix entry 2021-05-14 23:50:38 -04:00
20de21f8de Merge branch 'master' into next_patch_release 2021-05-14 23:39:25 -04:00
235e91a337 Merge pull request #2762 from akohlmey/prepare-clang-format
Prepare LAMMPS to support updating the coding style with clang-format
2021-05-14 23:23:35 -04:00
1ed75e3db0 fix buffer overflow in writing triclinic headers with MPI-I/O 2021-05-14 22:51:56 -04:00
6b80cb0169 whitespace 2021-05-14 20:47:08 -04:00
07cb55ef7f Merge branch 'master' into prepare-clang-format 2021-05-14 20:43:51 -04:00
247edbcaa3 Merge pull request #2722 from lammps/kokkos_double_free
Avoid double free in some Kokkos pair styles destruction
2021-05-14 20:43:00 -04:00
d24d501a4a Merge branch 'master' into prepare-clang-format 2021-05-14 20:38:54 -04:00
b23556e1a8 Merge pull request #2765 from masterleinad/fix_snap_kokkos_sycl
Fix compiling the SNAP module with Kokkos and SYCL
2021-05-14 20:31:53 -04:00
06f0a9207e Merge pull request #2769 from lammps/neigh-copy-bug
fix bug with mis-indexing of neighbor build copyflag check
2021-05-14 19:16:56 -04:00
7fcd449864 apply clang-format to all headers with some exceptions 2021-05-14 19:16:07 -04:00
250fbd24a3 neighbor build check on copyflag mis-indexed 2021-05-14 16:06:56 -06:00
60e41a90c2 update new files for clang-format 2021-05-14 17:37:58 -04:00
7284a70900 Merge branch 'master' into prepare-clang-format 2021-05-14 17:25:24 -04:00
de025aec47 Merge pull request #2761 from rbberger/collected-small-changes
Collected small changes and fixes for the next patch release
2021-05-14 17:24:36 -04:00
79ebf387fe Merge branch 'prepare-clang-format' of github.com:akohlmey/lammps into prepare-clang-format 2021-05-14 17:22:03 -04:00
9483db9581 Merge branch 'prepare-clang-format' of github.com:akohlmey/lammps into prepare-clang-format 2021-05-14 17:21:18 -04:00
7d44da08ad Merge branch 'prepare-clang-format' of github.com:akohlmey/lammps into prepare-clang-format 2021-05-14 15:25:05 -04:00
aa6c6169a8 Merge branch 'master' into prepare-clang-format
# Conflicts:
#	src/KOKKOS/nbin_kokkos.h
#	src/KOKKOS/nbin_ssa_kokkos.h
#	src/MOLECULE/bond_fene_expand.h
#	src/USER-DPD/nbin_ssa.h
#	src/USER-DPD/nstencil_half_bin_2d_ssa.h
#	src/USER-DPD/nstencil_half_bin_3d_ssa.h
#	src/USER-INTEL/nbin_intel.h
#	src/USER-MISC/fix_propel_self.cpp
#	src/USER-OMP/npair_full_multi_old_omp.h
#	src/USER-OMP/npair_half_multi_old_newton_omp.h
#	src/USER-OMP/npair_half_size_multi_newtoff_omp.h
#	src/USER-OMP/npair_halffull_newtoff_omp.h
#	src/USER-OMP/npair_halffull_newton_omp.h
#	src/USER-OMP/npair_skip_omp.h
#	src/main.cpp
#	src/nbin_standard.h
#	src/npair_full_multi_old.h
#	src/npair_halffull_newtoff.h
#	src/npair_halffull_newton.h
#	src/npair_skip.h
#	src/npair_skip_respa.h
#	src/npair_skip_size.h
#	src/npair_skip_size_off2on.h
#	src/npair_skip_size_off2on_oneside.h
#	src/nstencil_full_bin_2d.h
#	src/nstencil_full_bin_3d.h
#	src/nstencil_full_ghost_bin_2d.h
#	src/nstencil_full_ghost_bin_3d.h
#	src/nstencil_full_multi_2d.h
#	src/nstencil_full_multi_3d.h
#	src/nstencil_full_multi_old_2d.h
#	src/nstencil_full_multi_old_3d.h
#	src/nstencil_half_bin_2d_newtoff.cpp
#	src/nstencil_half_bin_3d_newtoff.cpp
#	src/nstencil_half_bin_3d_newton_tri.h
#	src/nstencil_half_ghost_bin_2d_newtoff.cpp
#	src/nstencil_half_ghost_bin_2d_newtoff.h
#	src/nstencil_half_ghost_bin_3d_newtoff.cpp
#	src/nstencil_half_ghost_bin_3d_newtoff.h
#	src/nstencil_half_multi_2d.h
#	src/nstencil_half_multi_2d_newtoff.h
#	src/nstencil_half_multi_2d_newton_tri.h
#	src/nstencil_half_multi_2d_tri.h
#	src/nstencil_half_multi_3d_newtoff.h
#	src/nstencil_half_multi_3d_newton_tri.h
2021-05-14 15:24:02 -04:00
117b6e2a80 Add copymode flag 2021-05-14 12:43:02 -06:00
a93ec125a4 Move deep_copy call 2021-05-14 12:24:21 -06:00
6740959c65 Merge pull request #2611 from MolSSI-MDI/mdi
Add MolSSI Driver Interface Support
2021-05-14 13:18:52 -04:00
6f6adc285a Fix typo 2021-05-14 10:25:32 -06:00
5a7e784447 Add missing copymode to parent classes 2021-05-14 10:08:05 -06:00
eedd726edb Merge branch 'master' of github.com:lammps/lammps into kokkos_double_free 2021-05-14 09:38:21 -06:00
7b4fdb92df Use only copymode in Kokkos pair_styles 2021-05-14 09:36:13 -06:00
cf18ec6cc6 Add selection of Manual version 2021-05-14 11:10:15 -04:00
70ce971d4a address some warnings from coverity scan 2021-05-14 08:39:47 -04:00
ad34953a52 Merge branch 'master' into collected-small-changes 2021-05-14 08:35:49 -04:00
e5cc4409a5 Merge pull request #2760 from jrgissing/bond/react-custom_constraint
Bond/react: custom constraint
2021-05-13 20:04:48 -04:00
465cd52707 Fix MDI calls in fix_mdi_engine.cpp 2021-05-13 17:16:07 -04:00
6b275e283c step version number for the next patch release 2021-05-13 17:14:35 -04:00
242949100a describe use of clang-format when submitting contributions 2021-05-13 15:01:42 -04:00
d02e09baaa Merge pull request #17 from akohlmey/mdi_update
MDI formatting updates and MPI STUBS handling
2021-05-13 14:41:51 -04:00
44ed6f1896 don't use provided communicator when LAMMPS was compiled with STUBS 2021-05-13 14:21:23 -04:00
fa80903ac2 NULL -> nullptr; apply clang-format 2021-05-13 14:20:56 -04:00
dc6b8102bc Fix compiling the SNAP module with Kokkos and SYCL 2021-05-13 18:03:22 +00:00
50de35c41a Merge pull request #16 from akohlmey/mdi_updates
USER-MDI updates
2021-05-13 13:18:16 -04:00
0f7a41590d fix bug in lammps_reset_box() no-box check and error out when atoms exist 2021-05-13 12:46:43 -04:00
7c0d632dfb Fix bug in MDI checksums 2021-05-13 12:08:58 -04:00
36de1c4201 remove unused header 2021-05-13 11:49:24 -04:00
8efab68db5 integrate MDI wrapper directly into main.cpp
we can remove the header, since this dummy interface should not be used elsewhere.
2021-05-13 11:41:05 -04:00
8d9465ccdb move MDI C style library calls to separate files 2021-05-13 11:37:05 -04:00
7d7781373c update gitignore 2021-05-13 11:35:13 -04:00
f121ae98d6 forget to update 2021-05-13 11:34:58 -04:00
9cfe665b7a bugfix 2021-05-13 11:34:28 -04:00
30d2f18ccb whitespace fixes 2021-05-13 09:57:58 -04:00
33205ed91f Use "mdi/engine" consistenty, complete integration in manual, spelling 2021-05-13 09:57:08 -04:00
f86f182cd3 cosmetic changes 2021-05-13 08:59:02 -04:00
1f7343d60f format tweaks 2021-05-13 08:57:53 -04:00
d9505a4527 cmake tweaks 2021-05-13 08:57:41 -04:00
800c7cc6c3 Update USER-MDI README 2021-05-12 20:40:58 -04:00
53397fdda5 Expand MDI examples README 2021-05-12 18:31:10 -04:00
6f9f13c97b Update style of MDI function calls 2021-05-12 18:31:10 -04:00
74db24110f Fix bug when using mdi_engine command in parallel 2021-05-12 18:31:10 -04:00
1cbfcf5182 Fix bug in mdi_interface.h 2021-05-12 18:31:10 -04:00
6fa136f230 Add MDI_Comm typedef to dummy MDI interface 2021-05-12 18:31:10 -04:00
04754bc812 Add support for MDI >CELL command 2021-05-12 18:31:10 -04:00
edfb27f964 Add support for MDI CELL_DISPL commands 2021-05-12 18:31:10 -04:00
b940914f45 Improvements to the MDI interface 2021-05-12 18:31:10 -04:00
5595fe2ef6 Improves USER-MDI style and formatting 2021-05-12 18:31:10 -04:00
94b52d3bd1 Minor fixes to MDI documentation 2021-05-12 18:31:10 -04:00
2d12d04545 additions/changes to MDI doc pages 2021-05-12 18:31:10 -04:00
eacfe05e0f Fix bug in MDI cmake build 2021-05-12 18:31:10 -04:00
64fa70f8d2 Add USER-MDI README file 2021-05-12 18:31:10 -04:00
a731c43000 Add docs for mdi_engine command and fix 2021-05-12 18:31:10 -04:00
66fb5e1cf3 Add documentation for MDI library functions 2021-05-12 18:31:10 -04:00
e053619eed Add call to MDI_Set_execute_command 2021-05-12 18:31:10 -04:00
b95fa003f5 Add support for MDI Plugin System 2021-05-12 18:31:10 -04:00
2854ea29a5 Add additional MDI examples 2021-05-12 18:31:10 -04:00
4a0b71f66b Add MDI example 2021-05-12 18:31:10 -04:00
e465205c05 Automatically add mdiengine fix 2021-05-12 18:31:10 -04:00
738fdc2901 Simplify MDI add_compute calls 2021-05-12 18:31:10 -04:00
43935724ba Fix bugs in MDI cmake config 2021-05-12 18:31:10 -04:00
6aa70bff02 Improve MDI package install 2021-05-12 18:31:10 -04:00
63578e3f10 Add MDI errors when using lj units 2021-05-12 18:31:10 -04:00
b21479e20a Added initial MolSSI Driver interface 2021-05-12 18:31:10 -04:00
a7b514e373 fix issue with breathe's doxygen to sphinx translation 2021-05-12 18:03:05 -04:00
9a36acf96b Merge branch 'master' into collected-small-changes 2021-05-12 18:01:48 -04:00
058d56cf5c Merge pull request #2733 from stanmoore1/kk_update_3.4.0
Update Kokkos library in LAMMPS to v3.4.0
2021-05-12 17:00:44 -04:00
e960674cea Merge pull request #2536 from jtclemm/multi_epcc
Add faster method for multi neighboring
2021-05-12 15:25:28 -04:00
a8f469b105 refactor strtok 2021-05-12 15:05:46 -04:00
e715688d03 dead code removal 2021-05-12 14:22:48 -04:00
1f2b709b83 strdup update 2021-05-12 14:17:42 -04:00
0ee7bc6e01 Update remaining variable names after refactor 2021-05-12 13:57:51 -04:00
8617770592 Merge pull request #2511 from samueljmcameron/fix_bd_sphere
Add USER-BROWNIAN package
2021-05-12 13:51:42 -04:00
4ccb17ab62 whitespace 2021-05-12 13:49:41 -04:00
fdfbb0f425 Merge pull request #2706 from gugmelik/smooth-gpu
GPU version of pair_style lj/smooth
2021-05-12 12:02:08 -04:00
cac634076d ensuring cutusermulti always created 2021-05-12 08:59:12 -06:00
7f94712839 Explicitly defining default ncollections 2021-05-12 08:17:14 -06:00
dfb15e76c3 Merge branch 'master' of https://github.com/lammps/lammps into kk_update_3.4.0 2021-05-12 08:14:03 -06:00
e3c9e9c328 document scalar output property of fix grem 2021-05-12 09:13:47 -04:00
6b45f9052f small fixed and error checking 2021-05-12 08:55:00 -04:00
1d10147cb6 reformat and shorten new example inputs 2021-05-12 07:53:18 -04:00
b49d91fa8e add contributing author and citation DOIs 2021-05-12 07:00:47 -04:00
986a72ff6e remove executable permissions on non-executable files 2021-05-12 06:32:58 -04:00
9ef0395313 whitespace fixes 2021-05-12 06:30:52 -04:00
24075b3281 remove unused variable declarations 2021-05-12 06:24:19 -04:00
f0e52981f2 Merge branch 'master' into multi_epcc 2021-05-12 06:16:52 -04:00
8dad40ea49 apply clang-format 2021-05-12 00:17:12 -04:00
d5c7ef113d whitespace fix 2021-05-12 00:10:06 -04:00
71da854c38 small doc updates 2021-05-12 00:07:32 -04:00
5591b0f33d Merge branch 'master' into smooth-gpu 2021-05-11 23:59:14 -04:00
af0e9ee51b update headers, protect initializers and macros, reapply clang-format 2021-05-11 23:52:31 -04:00
bb2ab544c2 avoid compilation failure on CentOS 7 2021-05-11 23:38:04 -04:00
64ae30a5c0 add a security policy file 2021-05-11 23:01:11 -04:00
824dff8181 update .clang-format file from src and update files 2021-05-11 22:48:06 -04:00
68160e3f22 switch to 100 chars columnwidth and apply clang-format to a few .cpp files 2021-05-11 22:11:41 -04:00
d8291eea7b Merge branch 'master' into prepare-clang-format
# Conflicts:
#	src/MOLECULE/bond_fene.h
#	src/MOLECULE/bond_fene_expand.h
2021-05-11 21:49:48 -04:00
1ea46cad0e use PRNGSIZE constant consistently 2021-05-11 21:46:16 -04:00
fdd811a43b Update remaining variable names after refactor 2021-05-11 21:22:29 -04:00
e874446b7c fix whitespace in doc files 2021-05-11 21:20:29 -04:00
57a2f21757 add/update USER-BROWNIAN example inputs and logs 2021-05-11 21:13:10 -04:00
8a507cc7da reformat with clang-format and related changes 2021-05-11 19:32:57 -04:00
ee546e2fa3 Merge pull request #2758 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch release
2021-05-11 19:31:12 -04:00
0d4cca5af9 fix compilation issues 2021-05-11 18:32:18 -04:00
ed75618ad6 integrate USER-BROWNIAN package into the documentation proper 2021-05-11 18:31:59 -04:00
2013c478ed Traditional make process auto-download works
Implemented via Install.py script
2021-05-12 00:06:31 +02:00
632e0d6a52 add USER-BROWNIAN package to various package management files 2021-05-11 17:59:02 -04:00
5cc3f88fcf changed author 2021-05-12 00:57:41 +03:00
92c5951d6c Update to latest changes from upstream 2021-05-11 17:49:03 -04:00
442a829b1e changed author 2021-05-12 00:40:38 +03:00
5865ced9c7 minor change 2021-05-12 00:25:51 +03:00
01ca668c98 permissions, again 2021-05-11 17:22:41 -04:00
d3186b74f7 updated 2021-05-12 00:14:27 +03:00
8beb251dcc Merge branch 'bond/react-custom_constraint' of https://github.com/jrgissing/lammps into bond/react-custom_constraint 2021-05-11 15:59:02 -04:00
b36ee935f7 update citations 2021-05-11 15:59:00 -04:00
8f917b509b add test for querying the operating system info 2021-05-11 15:24:04 -04:00
5b8763c471 Merge branch 'lammps:master' into smooth-gpu 2021-05-11 22:22:33 +03:00
fbe9240cf3 add python unit test for GPU capabilities 2021-05-11 15:17:43 -04:00
94a646cd01 new accelerator variant: GPU 2021-05-11 22:17:29 +03:00
c2ddce4c26 new accelerator variant: GPU 2021-05-11 22:13:37 +03:00
228711f59b add GPU device query functions to library interface and its wrappers 2021-05-11 14:59:49 -04:00
4213ebd2ff Merge branch 'lammps:master' into bond/react-custom_constraint 2021-05-11 12:54:46 -06:00
ead311adf8 replace variable length array on stack with std::unique_ptr()
this closes #2757
2021-05-11 13:42:47 -04:00
af6eae29d4 reformat else statements 2021-05-11 13:42:34 -04:00
883d55f416 skip running GPU test if there is no viable GPU device 2021-05-11 13:42:25 -04:00
1ae21f46ab revert change that introduced a bug 2021-05-11 13:42:08 -04:00
3173b39444 Update fix_bond_react.rst
restore original docs
2021-05-11 01:26:37 -04:00
527b5d0635 refactor constraints' boolean logic
restores backward compatibility as well
2021-05-11 01:22:39 -04:00
ecc9658cca Add context manager code to PyLammps 2021-05-10 19:19:26 -04:00
985fe9cd31 Use fmt::gmtime in timer.cpp 2021-05-10 19:09:44 -04:00
0260674698 Update .lgtm.yml 2021-05-10 18:54:53 -04:00
b4539fdac2 Update CodeQL configuration 2021-05-10 18:54:01 -04:00
e1b2235d36 Update py_nve.py 2021-05-10 18:42:27 -04:00
85acf0b067 Remove unused imports 2021-05-10 18:42:27 -04:00
67660197a6 Add missing configuration file for LGTM 2021-05-10 18:42:27 -04:00
38eb0fa29d Python: add context manager implementation 2021-05-10 18:42:27 -04:00
f375aab2c5 Correct test name 2021-05-10 18:42:27 -04:00
feb0a49f2f Python: Make NeighList a subclass of object 2021-05-10 18:42:27 -04:00
51847f70f2 Use fmt::localtime() in info.cpp 2021-05-10 18:42:26 -04:00
a687868c69 finalize available GPU hardware introspection functions 2021-05-10 16:34:27 -04:00
3eef759bb1 Merge pull request #2749 from akohlmey/varargs-message-warning
Make warning and info messages vararg compatible and implement "thermo_modify warn"
2021-05-10 13:41:23 -04:00
5895e960cb Merge pull request #2753 from akohlmey/update-pair-polymorphic
Refactor pair style polymorphic to use the TabularFunction class shared with pair style bop
2021-05-10 12:58:49 -04:00
fbdcfb2f72 preliminary interface to detect whether a viable GPU is present 2021-05-10 09:16:51 -04:00
de3a49ac4f silence codeql warnings 2021-05-10 03:48:55 -04:00
c91563b797 avoid uninitialized data issues detected by valgrind 2021-05-10 03:37:20 -04:00
0a1c2b2a23 update false positives 2021-05-09 23:11:20 -04:00
54b7baea7b more codeql recommendations 2021-05-09 20:25:20 -04:00
92fe1373a5 fix bug 2021-05-09 20:24:22 -04:00
69a92a3e00 apply some codeql recommendations
- remove unused imports
- avoid overlaps of variable names with keywords
- make some exception processing more explicit
2021-05-09 19:52:31 -04:00
6d9309b76d remove dead code 2021-05-09 17:44:23 -04:00
bffee8dd6a silence compiler warning 2021-05-09 17:44:12 -04:00
c9470c6baf update includes 2021-05-09 11:33:53 -04:00
48a425718a remove dead code 2021-05-09 05:58:54 -04:00
6cf85e0ae3 replace variable length array with explicit new/delete 2021-05-09 05:58:46 -04:00
c1891dca82 explicitly set vstring to None in case of exceptions 2021-05-09 05:58:20 -04:00
a4ea858bc2 prevent overflow of memory usage accounting 2021-05-09 00:46:49 -04:00
10d7a9f553 Merge pull request #2756 from akohlmey/collected-small-changes
Collected small changes and bugfixes for the next patch release
2021-05-09 00:03:17 -04:00
299ad3b37d work around bogus device overhead info in OpenCL 2021-05-08 23:43:15 -04:00
30068d4599 make the output more fortran-like 2021-05-07 20:14:28 -04:00
86d4ec7a45 Replace localtime() with thread-safe fmt::localtime() 2021-05-07 19:53:18 -04:00
b6b70b2033 small tweak 2021-05-07 19:51:13 -04:00
d70932bcdd add note about cases where the number of warnings can be larger than the limit 2021-05-07 19:46:25 -04:00
c45008d803 avoid possible deadlock scenario in fix deposit and fix pour 2021-05-07 19:11:21 -04:00
aa157e53c3 make consistent with the rest of LAMMPS 2021-05-07 19:10:36 -04:00
9d40f85919 address spelling issues 2021-05-07 18:46:01 -04:00
ad15af0d7f rename MY_CBRT2 to MY_CUBEROOT2 2021-05-07 18:43:21 -04:00
f43b7e0840 update and clarify documentation of thermo_modify warn 2021-05-07 18:42:45 -04:00
8b8f06db63 Simplify unittest-macos.yml 2021-05-07 17:11:13 -04:00
2e3073b16a Add ccache to MacOS GH actions build 2021-05-07 17:09:38 -04:00
b3083f1982 Fixed issue with accessing type2frho array in eam energy kernels 2021-05-07 13:43:58 -04:00
147e561dca Update in.fix_python_invoke_neighlist example 2021-05-07 12:51:58 -04:00
51200de45d Use correct shape for 1d numpy arrays 2021-05-07 12:51:49 -04:00
69d081cd6a prefer system provided OpenCL library on macOS 2021-05-07 09:28:13 -04:00
427a430b93 update list of default settings 2021-05-07 09:18:00 -04:00
09d59a981e fix typo reported on MatSci forum 2021-05-07 07:23:52 -04:00
b36cf85c31 update Swig interface definition file with added APIs. reorder to match library.h. 2021-05-06 20:50:21 -04:00
7441264c31 fix uninitialized data bug 2021-05-06 19:36:09 -04:00
b392b63224 clarify non-mixing behavior 2021-05-06 18:00:22 -04:00
7b9d721c08 fix typos 2021-05-06 18:00:11 -04:00
54884c978a Merge pull request #2742 from rbberger/offline_builds
Add tool to support offline builds
2021-05-05 23:54:55 -04:00
d1941392d3 disable clang-format for all existing .cpp files (for now) 2021-05-05 23:53:38 -04:00
49a7bb57de add clang-format support to plugin examples 2021-05-05 23:51:12 -04:00
5fcd0d8b79 apply clang-format 2021-05-05 23:48:43 -04:00
9e4c618d30 add clang-format support for fastdep tool 2021-05-05 23:46:26 -04:00
13fb03cf2c fix typo 2021-05-05 23:22:05 -04:00
bdbe773a08 add documentation for offline building scripts 2021-05-05 23:20:01 -04:00
4e737b5645 add offline folder to tools README file 2021-05-05 23:19:32 -04:00
97cd87a198 include clang-format configuration file 2021-05-05 22:20:54 -04:00
8874f8a63b simplify with new error functions. replace static string buffers. 2021-05-05 21:12:06 -04:00
22e93468d6 simplify code by appling varargs messages and warnings 2021-05-05 18:19:12 -04:00
8fd0595f1b update error class unit test 2021-05-05 18:18:05 -04:00
5978770ebf ensure that box too small and comm cutoff too small will not trigger on rounding 2021-05-05 17:05:34 -04:00
a23e034ced silence compiler warnings 2021-05-05 16:56:45 -04:00
92058b32ea must use Error::message() to print the warning about suppressed warnings 2021-05-05 16:55:59 -04:00
8a2a4c408e also skip warnings if per rank warning count is over. don't wait until total count is computed 2021-05-05 16:55:35 -04:00
7f034b2ef7 replace replicated Dihedral/Improper problem warning with function in base class 2021-05-05 16:54:40 -04:00
9f4da1128b remove optional logflag argument from Error::message() and Error::warning() 2021-05-05 16:02:51 -04:00
ed45ef301f add unit test for error class 2021-05-05 14:55:47 -04:00
6145412bd8 fix logic bugs 2021-05-05 14:48:33 -04:00
87283f7269 apply warning limit 2021-05-05 14:48:20 -04:00
f12f9166a5 Resolving merge conflicts, updating URLs 2021-05-05 11:19:44 -06:00
18b066c034 seems we can use a tighter epsilon on the revised pair styles bop/polymorphic 2021-05-05 12:11:27 -04:00
f6941447f7 remove unused functions 2021-05-05 12:08:12 -04:00
2a903f85de update unit test reference data 2021-05-05 12:02:32 -04:00
acc1d8aee1 use consolidated value() function 2021-05-05 12:02:00 -04:00
183eb2a7d6 reformat 2021-05-05 12:01:39 -04:00
e4cb6094a4 consolidate value() functions 2021-05-05 12:01:33 -04:00
efd6f7b2d0 Fixed issue with accessing type2frho array in eam energy kernels 2021-05-04 23:12:55 -05:00
7c3a7cb2e4 Merge branch 'master' into eam-gpu 2021-05-04 23:05:29 -05:00
51a84a67f9 cosmetic changes 2021-05-04 22:52:24 -04:00
cdc3e2bad9 refactor to use TabularFunction class shared with pair style bop 2021-05-04 22:26:56 -04:00
8285e71fd9 simplify remove unused code 2021-05-04 22:26:02 -04:00
09684b776f Merge pull request #2750 from akohlmey/update-bop
Updated pair style bop
2021-05-04 20:59:26 -04:00
350ec7cc07 Updating documentation 2021-05-04 17:22:35 -06:00
fa386c0e96 Changing how multi/cutoff works, changing collection indexing in user args 2021-05-04 17:12:17 -06:00
2b33bafbc9 Merge pull request #2748 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch release
2021-05-04 18:51:43 -04:00
78202ac0ec cosmetic changes 2021-05-04 14:42:17 -04:00
b22b2dcba1 refactor write_tables() 2021-05-04 11:50:44 -04:00
df0f628ad1 eliminate TripletParameters struct 2021-05-04 11:26:40 -04:00
6a24302247 update URLs in comment header 2021-05-04 11:26:18 -04:00
ec9fd8c724 simplify exception handling since PotentialFileReader will catch most of them already 2021-05-04 11:09:36 -04:00
2d67a2630d ifdef out write_tables() method by default 2021-05-04 11:01:41 -04:00
48360bedfa use PotentialFileReader instead of TextFileReader 2021-05-04 10:48:57 -04:00
978d47caef use utils::open_potential() to simplify path expansion and unit checking 2021-05-04 07:19:26 -04:00
4f9f87c8ab include TabularFunction class 2021-05-04 00:24:12 -04:00
9137c579ba update bop unit tests 2021-05-04 00:07:49 -04:00
329cb9c400 print message about reading the potential file name and date 2021-05-03 23:34:05 -04:00
90a57f5328 modernize code, especially the potential file reader, and plug memory leaks 2021-05-03 23:16:02 -04:00
37f26fc5fe update standard element map to bop_elements and check for missing elements 2021-05-03 20:19:21 -04:00
199e750eb1 small tweaks to pass unit tests on FreeBSD 2021-05-03 16:33:04 -04:00
69224ea682 must skip this test if USER-OMP is installed but OpenMP not enabled 2021-05-03 15:30:48 -04:00
14f1c62adf must not define global members in ifdef'd block. 2021-05-03 14:54:34 -04:00
f0cc70b29a implement "thermo_modify warn" to control amount of warnings 2021-05-03 14:21:16 -04:00
8e2ecbc7ac detect Linux distribution, if possible and include in OS info output 2021-05-03 12:12:15 -04:00
8cf2cd5875 update for 32-bit MinGW64 compatibility 2021-05-03 11:38:41 -04:00
37cd51f3e4 tar file was updated one more time 2021-05-02 23:30:02 -04:00
16964e12bc remove fragile OpenMP thread checks 2021-05-02 22:06:08 -04:00
7e04c6933d update opencl-loader library to be compatible with mingw 8 and later 2021-05-02 22:04:27 -04:00
7f8b136724 split TabularFunction class to separate files 2021-04-30 21:57:41 -04:00
4331260b22 update src/.gitignore 2021-04-30 21:50:02 -04:00
5578f57d8a get rid of shadowed variables, sort includes, and replace "me" with "comm->me" 2021-04-30 20:32:37 -04:00
3ddae82cc4 NULL -> nullptr 2021-04-30 20:22:24 -04:00
7339493f6e update format in header and silence compiler warnings 2021-04-30 20:20:57 -04:00
17102f5b37 update BOP pair style from Xiaowang Zhou 2021-04-30 20:13:25 -04:00
ce9ead95e7 updated BOP potential files from Xiaowang Zhou 2021-04-30 20:11:25 -04:00
b4a70880d9 Merge pull request #2745 from rbberger/gpu_updates
Updates to the GPU package
2021-04-30 19:32:44 -04:00
74a382a304 Merge pull request #2744 from akohlmey/update-opencl
Update OpenCL ICD loader library to OpenCL specifications version 3.0.7
2021-04-30 18:55:09 -04:00
fe2a6eb8e7 Add quotes in instructions 2021-04-30 18:47:00 -04:00
dfa9f15817 Use URL-encoded PIP_FIND_LINKS to support spaces in paths 2021-04-30 18:18:58 -04:00
ee0e48ff86 Update README.md 2021-04-30 18:00:29 -04:00
7994bb320f Add more quotes 2021-04-30 17:52:32 -04:00
17242550c1 Update comment 2021-04-30 17:09:48 -04:00
d8220e2773 CMake: Rebuild OpenCL kernel headers when code changes 2021-04-30 17:04:12 -04:00
b19a4aeb22 fix up include files in USER-PTM package 2021-04-30 15:51:50 -04:00
02847ef92b rebase 2021-04-30 15:37:32 -04:00
ad8dc606e9 protect style macros in headers 2021-04-30 15:14:41 -04:00
a1665fddc8 next iteration of preparing for clang-format 2021-04-30 13:51:14 -04:00
04ee87af0c Merge branch 'master' into prepare-clang-format 2021-04-30 13:29:45 -04:00
6f5881e151 Merge pull request #2710 from msvbd/dpd_extended
Generalized DPD pair styles: dpd/ext and dpd/ext/tstat
2021-04-30 13:26:16 -04:00
8d8158396f Merge pull request #2721 from agiliopadua/examples
New examples for FEP calculation and references in doc pages
2021-04-30 12:55:57 -04:00
85ba1e9e3b Fix documentation build by adding explicit dependency to six 2021-04-30 12:27:21 -04:00
b7fb28f940 Merge pull request #2719 from akohlmey/varargs-log-error-functions
Overload utils::logmesg(), Error::all(), and Error::one() so they can take a format string and a variable number of arguments
2021-04-30 12:12:13 -04:00
6029445ab5 Fix tagint datatype with LAMMPS_BIGBIG in OpenCL
The previous version was trying to use 16 byte integers.
2021-04-30 12:01:56 -04:00
0ec6cec117 Merge pull request #2743 from jrgissing/bond/react-create_atoms_bugfix
bond/react: create atoms bugfix
2021-04-30 11:40:37 -04:00
b88cdd6890 Corrected implementation of ellipsoidal dynamics, made ashared base class for the time-integrators, templated the time-integrators (and so reversed changes that this PR had previously made to random_mars src files), combined docs of all three integrators. 2021-04-30 16:30:04 +01:00
bebb5c3edf Add quotes 2021-04-30 11:04:34 -04:00
8b13d75e7f update OpenCL loader library to the 3.0.7 specs 2021-04-30 09:28:56 -04:00
375f8e7054 support loading OpenCL functions up to the OpenCL 3.0 standard 2021-04-30 09:28:01 -04:00
8dfcdc4b3c Revert "activate workaround for problems with new GPU code neighbor lists"
This reverts commit a28d9a6e69.
2021-04-29 19:24:28 -04:00
f61b02eebf Untested Install.py for traditional make process 2021-04-29 23:40:53 +02:00
4384cf57a4 relocate comment 2021-04-29 17:34:04 -04:00
1d51abd160 bond/react: create atoms bufix
fix when multiple insertions straddling box boundary
2021-04-29 16:42:34 -04:00
3bf2dbd45c Merge branch 'offline_builds' of github.com:rbberger/lammps into offline_builds 2021-04-29 14:00:40 -04:00
85f683c1a0 Fix typo 2021-04-29 14:00:23 -04:00
bfd2b301c6 Update README.md 2021-04-29 13:47:43 -04:00
3d36d42e72 Update README.md 2021-04-29 13:47:17 -04:00
53165fc7c9 Add PACELIB to offline scripts 2021-04-29 13:37:26 -04:00
8b410cf2bd Add scripts to simplify offline builds of docs and CMake 2021-04-29 13:26:55 -04:00
00578e1b26 Merge pull request #2741 from stanmoore1/kk_mycutneighsq
Add missing code in Kokkos neighborlist to use custom cutoff
2021-04-28 19:21:07 -04:00
a9ff9312d6 Merge remote-tracking branch 'origin/master' into varargs-log-error-functions 2021-04-28 18:13:31 -04:00
9a7e32a924 Add missing code in Kokkos neighborlist to use custom cutoff 2021-04-28 13:54:23 -06:00
ceb173135b Merge pull request #2737 from ab5424/patch
Update USER-INTEL.cmake
2021-04-27 22:32:30 -04:00
980244dd0c add protection comments 2021-04-27 22:31:01 -04:00
d3b19f22fc Merge pull request #2738 from akohlmey/read_data_trunc_lines
Make read_data compatible with files that have lines longer than 256 chars
2021-04-27 21:11:09 -04:00
5d837a0641 update unit tests 2021-04-27 18:46:30 -04:00
d315105dfa document line length limit in atomfile variable names 2021-04-27 18:43:23 -04:00
632e963092 add comment to line length truncation limit in data files 2021-04-27 18:39:43 -04:00
7b1b57aa9b rename utils::fgets_trunc_nl() to utils::fgets_trunc() 2021-04-27 18:32:51 -04:00
1aec90473c Merge pull request #2739 from stanmoore1/kk_mvapich
Fix typo in MVAPICH flag for Kokkos CUDA-Aware MPI
2021-04-27 18:29:58 -04:00
cc4f25e77c Fix typo in MVAPICH flag for Kokkos CUDA-Aware MPI 2021-04-27 13:44:27 -07:00
f29744b5bc add documentation for fgets_trunc_nl() 2021-04-27 16:21:17 -04:00
15cff295c0 change read_data to use new utility function 2021-04-27 16:14:08 -04:00
e2318e1710 add tests for new function 2021-04-27 16:13:57 -04:00
b65bc86718 new utility function fgets_trunc_nl() 2021-04-27 16:13:45 -04:00
cce54b6ba5 disable check failing due to inconsistent behavior on different platforms 2021-04-27 16:13:23 -04:00
5655523468 correct expected error message 2021-04-27 16:13:15 -04:00
6375b91bd7 Update USER-INTEL.cmake 2021-04-27 17:13:03 +02:00
3455172f7d Merge pull request #2725 from akohlmey/more-unit-tests
Add more unit tests
2021-04-26 23:30:44 -04:00
de3cdfa44b Fix typo 2021-04-26 20:53:10 -06:00
41c784a8a8 Update Build_extras 2021-04-26 20:51:35 -06:00
e95615c6a5 Update Kokkos cmake file 2021-04-26 20:43:36 -06:00
57a7bd7186 adjust for changed CMake variable scope due to moving script code 2021-04-26 20:16:55 -04:00
692da3bf88 Update Kokkos library in LAMMPS to v3.4.0 2021-04-26 16:28:19 -06:00
95285f9365 Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp 2021-04-26 23:52:59 +02:00
ad843f977f Auto-download works now for CMake build. 2021-04-26 23:46:27 +02:00
18215ff3e7 Merge remote-tracking branch 'origin/master' into more-unit-tests 2021-04-26 14:48:14 -04:00
462f27d661 Use copy-and-swap in Tokenizers
Ensures that the classes behave consistently when copied, moved, copy assigned,
and move assigned.
2021-04-26 14:28:13 -04:00
39f3c1684f Merge pull request #2729 from akohlmey/update-contributing-guide
Update the GitHub contributing guide to include the MatSci forum
2021-04-26 14:23:30 -04:00
6b04ebd617 Merge branch 'master' into varargs-log-error-functions 2021-04-26 13:27:58 -04:00
31d244dd80 Merge pull request #2727 from akohlmey/refactor-read-lines-from-file
Move "read_lines_from_file" utility function from Comm class to utils namespace
2021-04-26 13:24:24 -04:00
4a2816b61c Merge pull request #2726 from akohlmey/iwyu-update
Update lists of included header files
2021-04-26 12:28:49 -04:00
0eee2d013d add info to docs 2021-04-26 12:27:34 -04:00
2c6fe2d0b5 add tests for the overloaded constructor using a file pointer 2021-04-26 12:12:45 -04:00
dbd7d454b9 for consistent behavior we must not close the file pointer when it was passed as argument 2021-04-26 12:12:19 -04:00
8af1530e29 throw EOF exception in TextFileReader::next_values() if next_line() doesn't do it 2021-04-26 11:27:17 -04:00
ac60cfb0c3 add custom constructor for TextFileReader that uses an already opened file descriptor 2021-04-26 11:26:50 -04:00
4fa5840f13 fix bug due to adding ArgInfo 2021-04-26 11:02:41 -04:00
792966a957 always describe the git version, even when using a git clone without history 2021-04-26 11:02:15 -04:00
e779de7e1e Merge branch 'master' into more-unit-tests 2021-04-25 22:48:44 -04:00
beca3e5f0d collect the full help message 2021-04-25 22:27:36 -04:00
e9e0bb71b6 Use varargs version of Error:all() and Error::one() where applicable 2021-04-25 21:30:51 -04:00
4cbe6200d6 correct declaration 2021-04-25 21:02:01 -04:00
831b0fb70f correct misplaced [[noreturn]] 2021-04-25 19:26:38 -04:00
4e25204296 add vararg versions of Error::all() and Error::one() plus unit tests 2021-04-25 19:04:49 -04:00
60c2d8ea5b rather than replicate code, expand format to string and call original function 2021-04-25 18:33:37 -04:00
07d4b09eb6 Updated CMake files, auto-download not yet working 2021-04-26 00:03:07 +02:00
a0b0681cc8 rename _internal_logmesg() to fmtargs_logmesg()
vlogmesg() can be too easily confused with logmesg()
2021-04-25 17:20:36 -04:00
b4fa718576 update the GitHub contributing guide to include the MatSci forum in addition to the mailing list. 2021-04-25 07:25:05 -04:00
ba4781bd82 restore old string matching as it works just as well (on my machine) 2021-04-25 01:14:57 -04:00
b7088a14ae use alternate way to compare strings 2021-04-25 00:45:10 -04:00
ba5f531619 add some basic tests for the "processors" command 2021-04-25 00:44:51 -04:00
43325dca82 update/add tests about starting up LAMMPS
- move the test checking the help message from the c++ library
  to running the executable and checking the output
- add a command line test for errors on invalid command line flags
- add a c++ library test checking if ntreads is set to 1 without OMP_NUM_THREADS
2021-04-25 00:19:22 -04:00
b0cd6b3ef7 improve docs also for related functions 2021-04-24 22:08:28 -04:00
7e7a448a08 remove the old versions of the utility function and use the new 2021-04-24 21:33:36 -04:00
8e5e995188 add docs for new utility function 2021-04-24 21:32:29 -04:00
539ab02365 provide more generic implementation of Comm::read_lines_from_file() in utils 2021-04-24 21:05:11 -04:00
92a9994fd4 silence compiler warnings by avoiding to shadow variables 2021-04-24 18:38:12 -04:00
4738337e47 update/trim list of include files according to the IWYU principle 2021-04-24 13:22:39 -04:00
e4c7c23843 move sanitizer and iwyu configuration to Testing module and update iwyu
this changes the iwyu configuration so that it will check for using
GNU or Clang only as supported compilers, enforces the necessary recording
of compilation commands in a json file and tweaks the "iwyu" target
to work around an issue with the current iwyu implementation by placing
the "native" runtime of the chosen compiler first
2021-04-24 11:09:09 -04:00
e6f57cdf2c minor tweaks 2021-04-24 07:21:29 -04:00
66f690004d correctly test move constructors 2021-04-24 07:14:49 -04:00
0aa64eaf14 portability improvement. replace POSIX-only functionality. 2021-04-24 07:14:29 -04:00
e980d17882 reuse existing code. add tests for write_data 2021-04-24 07:14:04 -04:00
2c4017d3ac add test for write_dump cfg 2021-04-24 07:13:26 -04:00
9e7d26351d tweak epsilon for GPU package tests 2021-04-24 07:13:06 -04:00
6943a3da35 must check if file is readable before changes to internal data 2021-04-24 07:12:45 -04:00
6a9b441331 add tests for writing restart files 2021-04-24 01:22:23 -04:00
cf81f72aad more tests for tokenizer classes 2021-04-24 01:22:06 -04:00
8c50f56548 add unit test for TextFileReader class 2021-04-24 00:31:46 -04:00
93691ca939 Merge pull request #2723 from rbberger/gpu_cmake
CMake: Add missing defines to GPU kernel compilation
2021-04-23 21:19:20 -04:00
5933750a85 Merge pull request #2717 from akohlmey/collected-small-changes
Collected small changes and bugfixes
2021-04-23 19:59:35 -04:00
9cdd926763 remove excess quotes 2021-04-23 19:19:41 -04:00
ed926812dc simplify 2021-04-23 18:47:57 -04:00
8a49bf3a31 fix missing argument bug in velocity code and simplify a second case 2021-04-23 18:47:02 -04:00
917cd1b924 silence more compiler warnings 2021-04-23 16:57:39 -04:00
99fa6ed4b4 delay part of the variable.cpp refactoring until we have better unit testing for it. 2021-04-23 16:50:35 -04:00
f47333bebf Update MathJax to 3.1.4 hotfix version 2021-04-23 16:38:54 -04:00
b7272bbbf7 restore variable declaration 2021-04-23 16:38:37 -04:00
24314b2316 Formatting 2021-04-23 16:36:01 -04:00
8ba1b59d8d Correct fprintf statement in debug code 2021-04-23 16:34:12 -04:00
15ce976dba simplify 2021-04-23 16:32:27 -04:00
ef858ae70f silence compiler warnings 2021-04-23 16:19:57 -04:00
f759e6ffcf don't implicitly assume an undefined define equals 0 2021-04-23 15:51:43 -04:00
fe063b27c7 silence compiler warnings 2021-04-23 15:51:16 -04:00
8541b0da3e reduce compiler warnings by avoiding to redeclare variables so they shadow others 2021-04-23 15:35:45 -04:00
5a12baeef9 remove dead code and silence compiler warnings 2021-04-23 15:14:01 -04:00
8fc9eb26bc address spell checker warnings 2021-04-23 15:08:20 -04:00
d60c630e56 cosmetic changes: whitespace and include file order 2021-04-23 15:05:06 -04:00
49b540381c Merge branch 'master' into dpd_extended 2021-04-23 15:03:03 -04:00
628b06b7de fix CMakeLists.txt 2021-04-23 20:15:11 +02:00
1f24a45ef7 fix Makefile 2021-04-23 20:09:51 +02:00
a9abcadc01 one more doc fix 2021-04-23 20:09:41 +02:00
e28867eed0 change doc 2021-04-23 20:08:56 +02:00
792b411e46 fix messed up merge 2021-04-23 11:18:46 -05:00
6a1a58d727 Added CMake imported target N2P2::N2P2 2021-04-23 17:56:35 +02:00
9c21c8e3ef added upstream changes 2021-04-23 10:42:26 -05:00
b2bfb26161 Merge https://github.com/lammps/lammps into pair_rann 2021-04-23 10:35:35 -05:00
8ea5b8c41b add false positives for recently added docs 2021-04-23 11:22:50 -04:00
3ac2b36993 add link to Commands_pair.rst 2021-04-23 16:10:00 +02:00
2e63d126e3 change dir to MISC 2021-04-23 15:49:11 +02:00
62f7e97316 rename pair_styles 2021-04-23 14:39:55 +02:00
a438c2bc7b tweak unit test YAML epsilon values for GPU mixed precision tests to pass 2021-04-23 05:43:03 -04:00
cbf81a5f9f make detection of styles more specific and still support suffixed versions 2021-04-23 05:15:28 -04:00
92cc30e7ba correctly determine the number of active pair style instances 2021-04-23 05:13:36 -04:00
7bae94cb49 fix cut-n-paste bug detected by coverity scan 2021-04-23 04:39:21 -04:00
c8d16353e8 Merge pull request #2724 from akohlmey/consistent-lammps-url-comment
Consistent LAMMPS header comments and URL fixes
2021-04-23 04:20:27 -04:00
ec7d3410f3 add or correct some more LAMMPS header comments 2021-04-22 22:26:27 -04:00
78d1c33bbe a few more http://lammps.sandia.gov to https://lammps.sandia.gov updates 2021-04-22 21:42:34 -04:00
ac9f1fba86 small fixes 2021-04-22 21:40:10 -04:00
61e931ba31 add missing LAMMPS header comment 2021-04-22 21:38:29 -04:00
1ac3991aad Lammps -> LAMMPS 2021-04-22 21:37:54 -04:00
df7fe4431f make LAMMPS homepage URL and C++ indicator comments consistent 2021-04-22 21:26:07 -04:00
4ccb4c9603 CMake: Add missing defines to GPU kernel compilation 2021-04-22 18:46:07 -04:00
2695495552 Avoid double free in Kokkos pair styles 2021-04-22 17:50:09 -04:00
53a0ded240 update MathJax version for CMake based doc build 2021-04-22 16:26:49 -04:00
a2e46c47e3 download only a specific tag/version of MathJax when cloning 2021-04-22 16:20:34 -04:00
65cef12ae2 print compiled in accelerator configuration with ./lmp -h 2021-04-22 16:10:51 -04:00
69d41dc16c Merge pull request #2720 from rbberger/gpu_updates
Update GPU package to allow using CUDA 11.3 drivers
2021-04-22 14:28:51 -04:00
0632922a9b Explicitly check for subgroup support instead of CL version 2021-04-22 12:54:13 -04:00
0f1f49afa7 Add more output to ocl_get_devices 2021-04-22 12:52:30 -04:00
ad02e9df69 Added example of SPCE hydration, LJ + q 2021-04-22 18:40:45 +02:00
25c0bb7a31 Merge branch 'master' into examples 2021-04-22 18:08:32 +02:00
d405f2ec4b Update defines to use old neighbor code for CUDA >= 11.2 2021-04-22 09:16:37 -04:00
a49d783e16 check formatting and multiple arguments when using utils::logmesg() 2021-04-22 05:44:35 -04:00
eb85edfb3d make naming of the compiled pace library consistent with those of other libs 2021-04-22 00:15:14 -04:00
c2579391c0 silence compiler warnings 2021-04-22 00:10:29 -04:00
e7cb20efeb replace non-ASCII character in docs 2021-04-21 23:55:40 -04:00
3aec5c6484 tweak docs for logmesg() overload 2021-04-21 23:50:13 -04:00
d2cdb318ab apply new logmesg() overload to a bunch of cases. 2021-04-21 23:38:45 -04:00
0cf1252f1f add overload to utils::logmesg() that handles format strings and variable arguments
this reduces utils::logmesg(lmp,fmt::format(...)) to utils::logmesg(lmp,...)
while still allowing just a single string argument.
2021-04-21 22:52:32 -04:00
4127faacec substitute unicode general punctuation left/right single/double quotes 2021-04-21 22:02:18 -04:00
a1e07d3f75 fix memory leak in fix atom/swap
reported on MatSci forum:
https://matsci.org/t/question-to-fix-atom-swap-function/36135
2021-04-21 22:01:33 -04:00
96baae29d0 fix bug flagged by compiler warning 2021-04-21 22:01:07 -04:00
b4efeb977d update and sort lists of packages for different presets and categories 2021-04-21 22:00:06 -04:00
6ceeee24e2 Merge branch 'master' into collected-small-changes 2021-04-21 21:59:58 -04:00
7e2d40c5fa Merge pull request #2642 from rbberger/balance_tests
MPI balancing testing
2021-04-21 16:00:01 -04:00
e1d75d7e53 Merge pull request #2715 from lammps/kk_bugfix
Fix compile error in Kokkos package
2021-04-21 15:32:45 -04:00
1c80c9455b whitespace fixes 2021-04-21 14:58:57 -04:00
a64a7d5096 Merge pull request #2714 from julient31/STT2
Improvement of the SPIN package by removing a limitation
2021-04-21 14:55:17 -04:00
6cad2ba829 reverting changes in fix precession/spin 2021-04-21 10:55:43 -06:00
1656661fc2 Disable rcb_min_size test 2021-04-21 11:17:32 -04:00
f270b600f7 Fix compile error in kokkos_type 2021-04-21 08:17:17 -06:00
b1dd616a2f correcting a small typo in the checks, and adding a note in the
documentation of fix precession/spin about the error if a (0,0,0) vector
is given as an input.
2021-04-21 07:43:00 -06:00
0e38bfb58b adding "division by zero" checks in fix precession/spin 2021-04-21 07:25:12 -06:00
2e01bb8f62 Merge pull request #2713 from rbberger/collected_small_changes
Collected small changes
2021-04-20 20:40:49 -04:00
f1945522c4 Merge pull request #2711 from wmbrownIntel/tersoff-gpu-multitype-fix
Fixes issues from Feb 2021 GPU package: update for tersoff styles using multiple types and lj/charmm/coul/charmm
2021-04-20 19:38:03 -04:00
56be6d8ec2 Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp 2021-04-20 23:20:14 +02:00
90d3b65691 Minor changes for CMake build tested 2021-04-20 22:55:26 +02:00
ce09f728dd Merge pull request #2712 from ssande7/chunk_atom_bound_upper
[BUGFIX] compute chunk/atom bound xxx upper
2021-04-20 16:01:41 -04:00
7696d0f84c Add ENVIRONMENT to RunLammps test 2021-04-20 15:40:59 -04:00
a4e2255c87 Avoid memory leak in case of errors/exceptions in add_fix 2021-04-20 14:31:11 -04:00
fcf17a709e Don't store group if initial assignment failed 2021-04-20 14:24:07 -04:00
aba4dfc42e Avoid leaking memory in error cases 2021-04-20 14:06:53 -04:00
8826e962de Add info message when death test is skipped 2021-04-20 14:06:08 -04:00
33556e3745 Remove unused defines 2021-04-20 11:44:39 -04:00
58549fa10d Merge branch 'clean-master2' of github.com:julient31/lammps into STT2 2021-04-19 17:32:16 -06:00
a64378ba5b cleaning-up fix nve/spin and precession/spin 2021-04-19 17:29:47 -06:00
10ea64fb0c Improving the doc for the STT term 2021-04-19 17:25:14 -06:00
f2096ded96 - improved design of test_problem
- cleaned up langevin/spin
- started doc for stt and hexaniso
2021-04-19 17:09:53 -06:00
a6efdf9b9f Clean up molecule files creation 2021-04-19 15:14:01 -04:00
bc4b4147ef Avoid filename collisions with AtomStyles test 2021-04-19 14:57:41 -04:00
92abca3910 bug fixes 2021-04-19 13:40:19 -05:00
58292e5c51 Merge branch 'master' into examples 2021-04-19 19:31:42 +02:00
cf62dbf96a In manual pages point to examples 2021-04-19 18:23:33 +02:00
c46f1b5241 modify tests for hybrid pair styles to include some pair_coeff none settings 2021-04-19 08:51:53 -04:00
d60a247138 fix typo 2021-04-19 08:44:46 -04:00
1ad45d65d6 document limitation of not using GPU pair styles as the same style multiple times with hybrid 2021-04-19 08:09:02 -04:00
5409a2a807 rearrange for better readability 2021-04-19 07:55:10 -04:00
48e9f451f4 disallow using the same GPU pair style multiple times as hybrid sub-style 2021-04-19 01:23:54 -04:00
f3eb577b3b update hybrid tests, enable test for hybrid with CPU neigh list and no multiples of the same style 2021-04-19 01:14:25 -04:00
9469cba081 enable GPU unit test for pair style lj/charmm/coul/charmm 2021-04-19 00:34:22 -04:00
101deae472 Removed error thrown when bound xxx upper is used 2021-04-19 10:19:44 +10:00
bb7931c989 Fixing bugs in slow (non-shared memory) variant of lj/charmm/coul/charmm/gpu 2021-04-18 09:35:54 -07:00
f1680b0fdd enable unit test runs on the GPU for tersoff and tersoff/zbl 2021-04-18 20:43:48 -04:00
8d10f35acb display more info about the GPU package setting in the CMake config summary 2021-04-18 20:43:03 -04:00
3d5897c926 Fixes issue from Feb 2021 GPU package update for tersoff styles using multiple types. 2021-04-18 01:40:33 -07:00
18e5e42ce3 minor change 2021-04-18 04:30:59 +03:00
025489ec2c Merge remote-tracking branch 'origin/master' into collected_small_changes 2021-04-17 11:05:23 -04:00
e5877d8aa9 More explicit code in simple case 2021-04-17 11:04:38 -04:00
233beb4df1 Merge branch 'smooth-gpu' of https://github.com/gugmelik/lammps into smooth-gpu 2021-04-17 14:59:03 +03:00
a91e904f34 minor changes 2021-04-17 14:56:16 +03:00
288c0a8023 Merge pull request #2693 from julient31/spin-kokkos
Adding a spin/kokkos atom style
2021-04-16 18:27:47 -04:00
e906fae88c whitespace fixes 2021-04-16 17:10:07 -04:00
668b74bc09 Merge branch 'master' into spin-kokkos 2021-04-16 17:08:38 -04:00
4ed57cb757 Merge pull request #2705 from akohlmey/collected-small-changes
Collected small changes and fixes
2021-04-16 17:07:39 -04:00
9ea465f56a Merge pull request #2707 from akohlmey/commands-base-class
Add Command base class for command styles
2021-04-16 16:16:40 -04:00
99035dc680 removing all commented lines 2021-04-16 11:59:37 -06:00
87a60da150 Update lal_lj_smooth.h
Added new line at the end of file.
2021-04-16 20:05:58 +03:00
5b9c0ff643 Update lal_lj_smooth.cu
Added new line at the end of file.
2021-04-16 20:03:30 +03:00
e4e20b67a8 Update lal_lj_smooth.cpp
Added new line at the end of file.
2021-04-16 20:02:32 +03:00
7a97331e51 add support for Plumed2 version 2.5.7, 2.6.3, 2.7.1 2021-04-16 12:38:00 -04:00
ce51305b2d fix typing error in doc file 2021-04-16 15:44:20 +02:00
4041a07e66 add USER-DPDEXT to CMakeLists.txt 2021-04-16 15:43:03 +02:00
f115b8ba2f Merge branch 'master' into dpd_extended 2021-04-16 14:16:53 +02:00
9031c23080 add extended dpd (dpdext & dpdext_tstat) 2021-04-16 14:14:18 +02:00
b15a813a59 Avoid manual new / delete[] in AtomVec::Method 2021-04-15 18:46:59 -04:00
7300e5c4bd Use C++ for AtomVec::Method 2021-04-15 18:33:21 -04:00
024725c3e0 notation update
constraints can be grouped logically with curly brackets now, instead of parentheses
2021-04-15 16:19:09 -04:00
21a38c203a bond/react: custom constraint docs 2021-04-15 16:11:39 -04:00
9168f949e6 bond/react: custom constraint 2021-04-15 16:06:47 -04:00
0870a56093 expand exception message to include cause of file open failure 2021-04-15 11:57:48 -04:00
6e739c04e4 use safe fread() call 2021-04-14 20:02:05 -04:00
2a81411029 use linux distro and version info to decide when to look for faster linkers 2021-04-14 20:01:46 -04:00
d5661e06ae Detect linux distribution and version 2021-04-14 20:00:38 -04:00
91dfc6875b Silence compiler warnings about unused variables 2021-04-14 17:02:12 -04:00
2e5079371a must delete command explicitly now 2021-04-14 07:26:34 -04:00
75579fc100 take advantage of having the common Command base class to unify code paths 2021-04-14 07:05:00 -04:00
81578d9934 update docs for change in class topology 2021-04-13 17:47:21 -04:00
b53822da46 provide Command base class in command.h for deriving command styles from 2021-04-13 17:47:00 -04:00
8aed7e55b3 add error check when updating variables in ::single() function 2021-04-13 14:59:37 -04:00
9dbdb4386b fix typo 2021-04-13 14:54:47 -04:00
680e6a389d use type cast consistently 2021-04-13 14:54:04 -04:00
533739b128 avoid NULL pointer dereference / slience warnings issued by static code analysis 2021-04-13 14:53:51 -04:00
3b2c0871cc add and use Neighbor::modify_params() convenience function 2021-04-13 14:53:03 -04:00
107d112265 updates for thermo energy output 2021-04-13 09:43:28 -06:00
208d9f1fce use safe fread function to silence compiler warnings 2021-04-13 09:59:15 -04:00
82337c8cc5 silence compiler warnings when compiling with python 2 2021-04-13 09:58:41 -04:00
bddc6d5820 make installation procedure consistent with install.py 2021-04-13 09:58:19 -04:00
b9cb63ae56 remove redundant check 2021-04-13 00:47:58 -04:00
fab571cf6b IWYU reported header updates 2021-04-13 00:47:49 -04:00
02612047c3 must set CMAKE_EXPORT_COMPILE_COMMANDS ON for using iwyu 2021-04-12 23:57:30 -04:00
d8c68dec6f whitespace fixes 2021-04-12 23:32:26 -04:00
014875fb1e Merge branch 'master' into collected-small-changes 2021-04-12 23:28:43 -04:00
e49e505b9f make utility function private 2021-04-12 23:16:02 -04:00
f07fa3d266 Merge pull request #2704 from rbberger/compress_package
More refactoring of COMPRESS package
2021-04-12 23:01:35 -04:00
dba3cce883 Make dump xyz/gz, xyz/zstd compatible to 'buffer no' option 2021-04-12 20:03:58 -04:00
47814292a1 Make dump cfg/gz, cfg/zstd compatible to 'buffer no' option 2021-04-12 19:57:27 -04:00
9bc353e5bd Merge pull request #2585 from tc387/charge_regulation2
Add fix charge/regulation to MC package
2021-04-12 18:49:03 -04:00
455bb933c8 adding modifications for more than one fix langevin/spin in fix nve/spin 2021-04-12 16:18:22 -06:00
0ca9f2e8a0 Merge pull request #2699 from yury-lysogorskiy/feature/user-pace
USER-PACE pair_style integration into LAMMPS
2021-04-12 17:05:40 -04:00
bb52cf9377 adding mask check for fix prec/spin 2021-04-12 15:01:29 -06:00
573aebf06f adding possibility of one or more fix prec/spin in fix nve/spin 2021-04-12 14:52:47 -06:00
d08d59acb3 whitespace fix 2021-04-12 15:00:21 -04:00
bdfa45376d Merge branch 'master' into collected-small-changes 2021-04-12 14:59:42 -04:00
f1e5d11151 add LAMMPS distribution header 2021-04-12 14:52:53 -04:00
04248c2ccd finalize CMake build docs 2021-04-12 14:52:35 -04:00
ee38452f14 fix bug causing a failed download when using cmake -B <dir> 2021-04-12 14:52:17 -04:00
869fe5a2e1 Merge pull request #2702 from akohlmey/pair-hybrid-scaled
New pair style hybrid/scaled
2021-04-12 14:04:17 -04:00
3925bcc1de apply requested changes do pair style hybrid doc 2021-04-12 13:41:38 -04:00
5605a237cf working on the typedef correction 2021-04-12 10:27:20 -06:00
c324d754a0 when installing the LAMMPS python package create a valid version id 2021-04-12 10:51:44 -04:00
82e1c4fb12 silence compiler warnings 2021-04-12 10:25:39 -04:00
65ba022c2a simplify 2021-04-12 10:25:24 -04:00
a572142e6f fix inconsistent new/delete 2021-04-12 10:25:10 -04:00
0c79673d93 make fix charge/regulation compatible with USER-INTEL package 2021-04-12 10:14:31 -04:00
9658b8e645 move fix charge/regulation to MC package (examples stay in place for now) 2021-04-12 10:05:52 -04:00
0c2fc07cc5 add USER-OMP version of pair style coul/cut/global 2021-04-12 10:00:52 -04:00
bc25fa8268 full integration into documentation build system 2021-04-12 09:59:02 -04:00
e95cbf618b Merge branch 'master' into charge_regulation2 2021-04-12 09:55:15 -04:00
7d95943b7e increased bin size in example input file to avoid dangerous builds 2021-04-12 01:46:39 -05:00
d81f03706c Added an example using real units. 2021-04-12 01:30:36 -05:00
38d5798223 must not look for package metadata when using python module from source tree 2021-04-11 21:36:18 -04:00
bb0be962a9 eliminate use of s(n)printf() in QEQ package 2021-04-11 16:44:46 -04:00
e1418a341a ensure that only one of comb/comb3 is matched and called 2021-04-11 06:05:41 -04:00
39a00e2901 reformat 2021-04-11 06:03:46 -04:00
d88cf587b2 add pair style coul/cut/global and fix restart/data bugs in coul/cut 2021-04-10 00:25:00 -04:00
ec6e2d35cb complete update of the hybrid documentation for hybrid/scaled 2021-04-09 22:50:51 -04:00
0d325f2221 error out when scale factor variables do not exist 2021-04-09 22:50:16 -04:00
0496fd27db reorder include files 2021-04-09 22:49:25 -04:00
0628bb89ce Merge branch 'master' into pair-hybrid-scaled 2021-04-09 22:21:16 -04:00
9b78426eba Merge pull request #2703 from akohlmey/collected-small-changes
Collected small changes and bugfixes
2021-04-09 22:20:35 -04:00
96f59a58d3 be a little more paranoid about avoiding memory leakage 2021-04-09 21:53:18 -04:00
7a2910f05f must have num == 2 for getenv style variables 2021-04-09 21:44:34 -04:00
552d13b9e4 print message only on MPI rank 0 2021-04-09 21:43:02 -04:00
c16e4f241f replace "leaky" call to putenv() with setenv() on non-windows platforms 2021-04-09 20:37:01 -04:00
a69c5a5cae fix bugs in shell putenv and getenv style variables. add more unit tests. 2021-04-09 20:19:04 -04:00
e5ee210f58 Make dump atom/gz, atom/zstd compatible to 'buffer no' option 2021-04-09 18:02:55 -04:00
242881af55 Make dump custom/gz, custom/zstd compatible to 'buffer no' option 2021-04-09 17:46:59 -04:00
234c755507 Add missing types in dump local 2021-04-09 17:21:33 -04:00
511f64fde4 Update dump custom/gz 2021-04-09 16:36:30 -04:00
c17ee12989 Update dump xyz/gz 2021-04-09 15:57:17 -04:00
eb3cddb028 Update docs to include format support in dump local variants 2021-04-09 15:46:18 -04:00
cf41ea6faf Update dump local and local/gz 2021-04-09 15:42:28 -04:00
d19cd8fb11 Fix test 2021-04-09 14:49:45 -04:00
dc71d80306 Add dump local tests 2021-04-09 14:49:07 -04:00
5c9a5ba8ac Add missing code to allow customized formatting in dump local 2021-04-09 14:48:38 -04:00
e0e031aa43 Correct dump_modify example in docs 2021-04-09 13:38:18 -04:00
77de0273be Fix typo 2021-04-09 12:37:14 -04:00
2682663df6 Use GzFileWriter in dump cfg/gz 2021-04-09 11:41:45 -04:00
ded22bf8bc Minor changes to dump_atom_gz/dump_atom_zstd 2021-04-09 11:36:10 -04:00
7b53ce572c Merge branch 'master' into compress_package 2021-04-09 10:58:39 -04:00
08471cb88e update path to updated log file 2021-04-09 10:29:36 -04:00
b6b101f29a update melt example to use velocity with loop geom for consistent velocities 2021-04-09 09:54:47 -04:00
d507c57c8a add missing zeroing of the torque array, reformat code 2021-04-09 09:45:09 -04:00
97977e3e68 incorrect check for additional argument in pair_modify nofdotr 2021-04-09 09:44:23 -04:00
924a331342 avoid uninitialized data usage reported by coverity scan 2021-04-09 09:08:39 -04:00
7b45b691f4 pair_pace.cpp: check that units are "metal"
update ace-evaluator (download link + md5sum in cmake and make build systems):  accept multilines comment at the beginning of potential.ace file
add first comment line for potentials/Cu-PBE-core-rep.ace
2021-04-09 13:31:40 +02:00
4c23ecfd4f error out on special atom styles 2021-04-09 00:47:22 -04:00
de158c40ad add support for torque 2021-04-09 00:38:58 -04:00
f2039b5667 add hybrid/scaled pair style to summary tables 2021-04-09 00:36:29 -04:00
73a33abb44 add unit test for hybrid/scaled 2021-04-09 00:32:06 -04:00
ae27d3bf4c add support for single() and read/write_restart() 2021-04-09 00:31:43 -04:00
8ed6d80b85 first working version, forces only, no restart 2021-04-08 21:25:38 -04:00
ee240f93d9 Rearranged cutoff and element map user input
Cutoff radius is now mandatory argument of pair_style. "emap" keyword is
removed and replaced by additional pair_coeff arguments (similar to
pair_airebo.cpp). Changes in docs are still missing.
2021-04-08 23:54:26 +02:00
a441c7b379 simplify hybrid coeff parsing. check for number is already done with conversion 2021-04-08 17:44:13 -04:00
c660dcefd2 add minimal framework for pair style hybrid/scaled 2021-04-08 17:42:32 -04:00
0aee75857a Eliminated doc build warnings 2021-04-08 14:09:19 -06:00
a39dc9f9b2 Added minimal info on downloading and building PACE library 2021-04-08 13:36:04 -06:00
22a337b393 Updated READMEs in lib/pace and src/USER-PACE 2021-04-08 13:00:20 -06:00
2d19282961 reorder include statements in RIGID package 2021-04-08 13:45:37 -04:00
d1fd2f74d1 update PACELIB_URL (tackling some PGI warnings): v.2021.2.3.upd2
update lib/pace/Makefile: -O3 optimization
2021-04-08 16:06:05 +02:00
492ddbbcfa simplify 2021-04-08 09:32:24 -04:00
74a3796418 avoid ambiguous precedence through using parentheses. update unit test reference 2021-04-08 09:29:18 -04:00
ac5bd8a4f7 correct the description of how the F dot r contributions are computed 2021-04-08 08:44:18 -04:00
73ee7805dc remove GPL3 license terms from src/USER-PACE/pair_pace.*
delete lib/pace/CMakeLists.txt
2021-04-08 12:13:33 +02:00
d22d6ad45d cmake/USER-PACE.cmake: update PACELIB_URL and PACELIB_MD5 (new source files with whitespaces)
lib/pace: add Makefile, Install.py use make
remove the LICENSE from src/USER-PACE
2021-04-08 11:52:49 +02:00
1ca38db9df simplify and avoid temporary buffers when piping to/from gzip 2021-04-07 23:26:21 -04:00
a84ac392a3 silence compiler warnings 2021-04-07 23:25:22 -04:00
8a233a5ec7 add unit test reference data for USER-PACE 2021-04-07 19:30:38 -04:00
f6f383bf99 add .gitignore file to lib/pace folder 2021-04-07 19:29:22 -04:00
b57025523f honor LAMMPS_POTENTIALS environment variable when loading potential file 2021-04-07 19:28:02 -04:00
bd6dd658d6 Updating to master, misc style changes 2021-04-07 17:21:16 -06:00
2d4b05ffa6 refactor code to more closely match LAMMPS coding conventions
- update indentation to 2 characters
- remove dead code and unused class members
- use convenience functions in many places
- reuse code and members from Pair base class
- declare local functions/variables static
- PIMPL-ify access to the ACE evaluator library functions/classes
- correct settings member variables to match implementation
2021-04-07 19:13:10 -04:00
2d1fc67b5d update .gitignore 2021-04-07 19:09:43 -04:00
d54384dd91 Merge branch 'master' into multi_epcc 2021-04-07 16:34:01 -06:00
084c0713d6 resolve whitespace issues 2021-04-07 18:05:00 -04:00
7b34f025ee correct src/Makefile for USER-PACE 2021-04-07 17:46:18 -04:00
0151fd00c2 correct CMake support for USER-PACE package and align with recent conventions for downloading external code 2021-04-07 17:37:30 -04:00
0496626533 Merge branch 'master' into feature/user-pace 2021-04-07 16:26:26 -04:00
feda2dc08d Updated doc page and spelling 2021-04-07 14:07:58 -06:00
29c78d022a add lib/pace/Makefile.lammps 2021-04-07 19:54:35 +02:00
3e3f66adac Merge branch 'master' into smooth-gpu
Added gpu acceleration for smooth pair_style.
2021-04-07 14:15:33 +03:00
0d1ccbe1b5 Move A.Thomson's modifications on doc and examples in:
- doc/src/.rst
- examples/USER/pace
- potentials
2021-04-07 12:43:28 +02:00
3de3302767 remove source files from lib/pace;
add lib/pace/Install.py to automatically download the source files from github/ICAMS/lammps-user-pace;
add lib/pace/CMakeLists.txt to build libpace.a
add lib/pace/README
update src/USER-PACE/Install.sh
2021-04-07 12:20:24 +02:00
6a99f5b5c5 WIP:
-  no auto-download of user-pace src yet
-  lib/pace/*.cpp,*.h are provided explicitly yet.
- implement CMake integration in USER-PACE.cmake and in CMakeLists.txt
2021-04-06 17:24:54 +02:00
f0e3786ded Minor changes to conform with coding standards 2021-04-04 22:48:25 +02:00
17e6f59463 Merge branch 'spin-kokkos' of github.com:julient31/lammps into spin-kokkos 2021-04-01 11:46:15 -06:00
4975295e0f - adding a force/clear equivalent for spins in verlet/kk
- setting all validation problems for spin/kk
2021-04-01 11:45:16 -06:00
b34585762b updated sectoring function to account for triclinic cells. I didn't see a triclinic cell error warnings in SPIN/* or KOKKOS/atom_vec_spin_kokkos.cpp files. 2021-04-01 01:00:25 -06:00
8e4a2e4c7b Renamed a missing cmake file, NNP => HDNNP 2021-04-01 00:41:27 +02:00
7b9dfb296d Renamed pair style, user package: nnp => hdnnp 2021-04-01 00:35:17 +02:00
6dfd475175 Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp 2021-03-31 23:24:11 +02:00
2d0aad1904 Merge branch 'spin-kokkos' of github.com:julient31/lammps into spin-kokkos 2021-03-30 10:39:27 -06:00
39dc3e69ba Commit before pull 2021-03-30 10:35:25 -06:00
256bde9282 Merge branch 'clean-master2' of github.com:julient31/lammps into spin-kokkos 2021-03-30 07:24:42 -06:00
213fc06321 Add GzFileWriter implementation 2021-03-29 18:05:04 -04:00
4ea9a9bf04 Removed screening symmetry and added rann example 2021-03-29 15:23:22 -05:00
dca9cd9c1c Kept the .cubin files so that they are only rebuilt whenever changes are made to the relevant source files 2021-03-29 13:46:16 -05:00
7662cfe28d Merge /home/ndtrung/Codes/lammps-git into eam-gpu 2021-03-29 13:33:31 -05:00
4d96a50edb Merge branch 'master' of https://github.com/kipbarrett/lammps into pair_rann 2021-03-29 10:55:47 -05:00
d9d5d3a36a Correcting skin distance calculation for collection/interval 2021-03-19 09:29:47 -06:00
8d18051232 acceleration for pair_style lj/smooth 2021-03-18 20:48:57 +03:00
ca88f97a4b added acceleration of lj/smooth on gpu 2021-03-12 01:40:52 +03:00
e32d059d26 lj/smooth/gpu 2021-03-06 23:43:25 +03:00
4960aeb3c8 error on line 194 2021-03-06 23:39:37 +03:00
fdf06e48b2 removed factory creation 2021-03-05 16:53:49 -06:00
02021eb330 removed factory creation 2021-03-05 16:49:04 -06:00
b5e1851e5d removed factory creation 2021-03-05 16:47:13 -06:00
debb0ef63d Add comments for review 2021-03-05 10:59:52 -05:00
0857bccc10 Add RCB tests 2021-03-04 18:31:54 -05:00
0b9675807b Fix typos 2021-03-04 17:48:44 -05:00
e3a892ccd7 Start unittests for MPI load balancing 2021-03-04 10:10:58 -05:00
d5c3e1786a Fixing bugs on eam*/gpu for pair hybrid with neigh yes, where the gpu pair style eam is used for only a subset of the pair types. eam being the first substyle works correctly, but otherwise will give incorrect forces 2021-03-02 13:05:37 -06:00
ed53e2bbff Add ignored Makefile.lammps in lib/nnp 2021-02-25 14:02:00 +01:00
0c583fff7d Allow for -DLAMMPS_BIGBIG compilation 2021-02-25 11:54:37 +01:00
992d0e13aa Merge branch 'master' of github.com:lammps/lammps into pair-style-nnp 2021-02-24 23:37:21 +01:00
037441b502 More documentation, added citation in source 2021-02-24 23:35:21 +01:00
e713a931d3 Added lots of docs, finished CMake script 2021-02-24 17:57:24 +01:00
c56f665c5b CMake files for finding n2p2 2021-02-23 23:35:18 +01:00
7e411f2b12 New makefile in lib/nnp/ dir, updated Install.sh 2021-02-23 14:05:06 +01:00
6dbb0230c2 Updated documentation, cleaned source 2021-02-22 22:57:45 +01:00
af974c2aba Added pair_nnp documentation 2021-02-22 00:29:10 +01:00
28207f15b8 Switch to forward declaration in header pair_nnp.h 2021-02-21 00:13:52 +01:00
4442f38bed Inclusion of n2p2 interface files
- github.com/CompPhysVienna/n2p2 commit 2f05836
- example modified (less atoms)
2021-02-20 23:04:13 +01:00
0a06b90b53 template for smooth/spu 2021-02-17 15:33:28 +03:00
039ed4c750 Fixing example input scripts with mode multi 2021-02-16 10:24:15 -07:00
8dee6cee8d remove style files from src 2021-02-11 09:25:42 -06:00
f165fdb61d remove all files from src that are in src/USER-RANN 2021-02-11 08:48:00 -06:00
417e92bc2d Axels requested revisions 2021-02-11 08:43:04 -06:00
f705d49d45 reformat docs, correct spelling errors, and update false positives list 2021-02-11 09:17:14 -05:00
7f8e8c635c create new reference log files 2021-02-11 08:01:43 -05:00
c583ad6dc4 Merge branch 'master' into charge_regulation2 2021-02-11 07:53:29 -05:00
6c2abf4739 update fix charge/regulation input example to follow LAMMPS conventions closer 2021-02-11 07:53:19 -05:00
676191f330 various cosmetic changes
- print warnings only on MPI rank 0
- use the fix name charge/regulation consistently
- use domain->prd_half for half box length instead of computing it
- use utils::inumeric() to guarantee integer charge input
- LAMMPS coding style adjustments
2021-02-11 07:50:47 -05:00
9671ba7900 silence compiler warnings 2021-02-11 07:05:28 -05:00
8ee693204a use nullptr instead of NULL to initialize pointers 2021-02-11 07:05:07 -05:00
faa2407aa4 plug memory leak 2021-02-11 07:04:19 -05:00
60113a6ddf Applied edits/optimizations suggested by Axel. Further simplifified/fixed MC acceptance equations, few clarifications to documentation. 2021-02-10 13:24:30 -06:00
58e4938b0f Updating examples, updating multi in info, fixing memory issues in comm/neighbor 2021-02-08 10:50:57 -07:00
de1205c5a9 Fixing misc valgrind issues, particularly with resizing ncollections 2021-02-07 20:38:24 -07:00
952216033e Adding correct masks to kokks/user-dpd nbin classes 2021-02-07 13:33:11 -07:00
5a4c45f2ea Fixing bitmasks and removing method again 2021-02-07 13:02:45 -07:00
05f02fbc32 Removing setup method and adding correct nbin bitmask 2021-02-07 12:49:12 -07:00
880b40e104 Adding setup_bins() method to nbin_intel.cpp 2021-02-07 10:44:51 -07:00
65a82bb585 Adding new example 2021-02-06 12:57:19 -07:00
4421843604 fixed Latex doc error #2 2021-02-05 19:00:33 -06:00
2f5588733b fixed doc Latex error 2021-02-05 18:47:04 -06:00
c4ef85ba22 Updating to master 2021-02-05 17:01:32 -07:00
c94a740b4e Updating examples 2021-02-05 16:43:52 -07:00
0bc31fad09 header file minor cleanup 2021-02-05 17:03:15 -06:00
d62ba49f1a added minor comments 2021-02-05 16:57:00 -06:00
6d862569ea Updated emails 2021-02-05 16:24:55 -06:00
606b33ea03 Added fix_charge_regulation source code and documentation. 2021-02-05 16:05:37 -06:00
56841ba912 Fixing typo in pair gran, fixing bugs in communication and neighbor 2021-02-02 18:05:19 -07:00
852e4efc6f Updating documentation/examples, patching comm_modify cutoff/multi command 2021-02-02 14:50:30 -07:00
0676c953c0 Removing stray file 2021-02-02 09:41:50 -07:00
d79a2c3a02 Adding collection array, new user arguments, and multi communication 2021-02-02 09:39:13 -07:00
908562588e maybe the last one 2021-01-29 17:17:51 -06:00
ec82a4602d should be all ready 2021-01-29 17:08:24 -06:00
3e639fe979 Initial inclusion of rann potential 2021-01-25 16:41:35 -06:00
2c92737cd5 Resolve merge conflicts 2021-01-13 09:42:57 -07:00
a25c77e512 Misc comments, typos, and cleanups 2021-01-12 23:04:14 -07:00
d5f34f6296 Examples and documentation 2021-01-08 15:27:23 -07:00
50be21902e Reducing memory consumption for multi 2020-12-26 16:00:33 -07:00
795bd40318 Resolving merge conflicts 2020-12-26 13:58:24 -07:00
a88fab7558 Missed typos in user-omp 2020-12-26 11:07:48 -07:00
2458eaf4f9 Adding custom grouping option 2020-12-26 11:03:29 -07:00
b421c3d676 Adding arguments, initialization, and communication for custom groupings 2020-12-22 10:20:06 -07:00
5a3cb38705 Made requested changes to fix propel/self. Last thing to change would be to re-introduce the types keyword into this fix if that was deemed to be best. 2020-12-21 10:58:27 +00:00
5ae32146eb Adding full neighbor list check for new reduced comm 2020-12-20 17:18:32 -07:00
bce37abe8f Clarifying variable names 2020-12-20 15:15:19 -07:00
129210c7a0 Updated examples and docs, and added basic brownian dynamics integrator (no rotational degrees of freedom). 2020-12-20 17:38:32 +00:00
05ecf86134 Made changes to propel/self. Kept all features of previous version (and tested they stayed the same), but additionally added dipole option for direction of self-propulsion. Also updated examples. 2020-12-20 16:39:04 +00:00
fee6df1ab6 Fixing typos 2020-12-19 18:07:10 -07:00
0a36baf86d Updating naming in other classes 2020-12-19 17:51:09 -07:00
5d097845e7 Renaming multi2->multi in nstencil 2020-12-19 17:45:46 -07:00
1c52ff15c3 Renaming multi nstencils to multi/old 2020-12-19 17:39:20 -07:00
4a85afcde2 Removing redundant stencils 2020-12-19 17:22:42 -07:00
42e5130893 Renaming multi->multi2 in nbin files 2020-12-19 17:18:54 -07:00
42278e8766 Renaming multi2->multi npair classes, renaming npair multi variables 2020-12-19 17:09:11 -07:00
0549da668d Renaming multi->multi/old, updating lmpcite 2020-12-19 16:06:47 -07:00
c1e3bc5794 Updating to master 2020-12-19 15:28:02 -07:00
a9c6d6f117 Removing temporary utilities 2020-12-19 14:11:46 -07:00
4c1f449350 Moved brownian dynamics files to be in USER-BROWNIAN package 2020-12-19 17:42:47 +00:00
d9440a582c Final touches on docs to discuss temperature in overdamped dynamics. 2020-12-16 17:30:28 +00:00
f2e7f5263e Added bd integrator for ellipsoidal particles as well. 2020-12-16 16:14:13 +00:00
86ebe0a9d3 Minor change to doc for bd/sphere. 2020-12-13 16:56:00 +00:00
f81a17abbd Moved fix_bd_sphere to src/USER-MISC folder, examples to examples/USER/misc folder, and added one-liner on README file. 2020-12-11 12:11:02 +00:00
4fa48edb81 Adding size/multi npair files 2020-12-10 11:36:15 -07:00
ee99a2e960 Added reset_dt() function. Have not moved files to USER-MISC folder yet (waiting to hear back on some comments). 2020-12-10 09:12:21 +00:00
dab4c7409a Changes for pull request 2511. 2020-12-09 21:04:23 +00:00
6b51bf104a Added unit test for fix bd/sphere. 2020-12-08 14:52:28 +00:00
9848492d93 Added example input scripts for fix_bd_sphere code. 2020-12-08 11:16:42 +00:00
3c918029f0 Added virial flag to fix_bd_sphere. 2020-12-06 19:23:15 +00:00
a7d2059d86 Fixed some issues after initial testing. 2020-12-05 09:33:15 +00:00
ca5c921702 added brownian dynamics integrator fix bd/sphere. 2020-12-03 13:00:21 +00:00
6308248a44 Replacing binsizex with multi2 version 2020-11-30 20:55:04 -07:00
e716abd34a Fixing bad bracket 2020-11-30 11:00:53 -07:00
6c9bb854c0 Revamping multi2 npair classes, fixed bug if two types had same cut, better comments 2020-11-30 10:51:15 -07:00
8a0dac90ca Removing redundant k variables in npair 2020-11-29 19:57:14 -07:00
2c79fbebe8 Adding todo note for comm, testing for full nlist 2020-11-29 17:48:43 -07:00
cea20da5be Simplifying stencils 2020-11-29 16:07:20 -07:00
f8d35139c3 Adding files for OMP 2020-11-27 17:16:52 -07:00
73a6bb3621 Fixing mistake with stencil cutoffs not being squ squared 2020-11-26 15:58:05 -07:00
9b9e5022d6 initializing comm distances, temporarily sorting nlit dumps 2020-11-26 14:57:48 -07:00
d7047245f4 Add cross type self bin check for newton 2020-11-22 21:22:29 -07:00
de5df539c9 Changing particle size metric to neighcutsq 2020-11-22 20:40:47 -07:00
00a74558ff Fixing typos 2020-11-22 20:01:14 -07:00
af11a54a27 Copying more variables to classes and moving/clarifying definitions 2020-11-12 18:37:53 -07:00
6909839ff0 Fix full multi stencil 2020-11-12 15:03:44 -07:00
b6dfc28e38 Resetting bin sizes in stencils 2020-11-11 22:50:59 -07:00
ac527f4615 Fixing bugs in nstencil 2020-11-11 15:39:53 -07:00
f94c82910d Fixing remaining bugs to compile 2020-11-11 10:11:49 -07:00
9a3ece75f2 Batch 1 of typo/bug fixes 2020-11-10 23:30:58 -07:00
061229093c Adding npair classes 2020-11-10 22:44:55 -07:00
bdc21c87b2 Clarifying multi2 stencil label 2020-11-10 20:15:54 -07:00
dd1cce1da5 Finish stencil classes 2020-11-10 20:03:00 -07:00
af57879416 Labelling stencils half/full, removing unnecessary newton on/off designation 2020-11-10 17:15:28 -07:00
943a187be7 Renamed to multi2, initial stencil edits 2020-11-10 16:39:56 -07:00
12288630f5 Fixing comm and renaming bytype 2020-11-09 16:32:11 -07:00
557ef57526 Adding initial support for triclinic boundaries 2020-10-29 15:13:28 -06:00
58e27a9c51 More edits and documentation 2020-10-09 13:50:20 -06:00
c85498e98b started to add spin/kk to the doc
modified validaion tests for kokkos compatibility
2020-10-09 09:47:47 -06:00
e8ebce1b52 Fix GPU compile error 2020-10-08 08:21:55 -06:00
b263a8d3ee Merge branch 'master' of https://github.com/lammps/lammps into spin-kokkos 2020-10-08 08:21:31 -06:00
aa1a87687b Fix minor issues 2020-10-08 07:32:36 -06:00
e125d464d1 Replacing molecular enumeration 2020-10-05 16:09:50 -06:00
b1b014aed3 Fixing merge conflicts 2020-10-02 15:09:47 -06:00
c4579a7502 First commit
- added spin/kk style files
- modified few necessary files
- compiles, but SegFault when running
2020-09-30 11:43:01 -06:00
4254 changed files with 149824 additions and 51337 deletions

2
.gitattributes vendored
View File

@ -1,3 +1,5 @@
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
.lgtm.yml export-ignore
SECURITY.md export-ignore

16
.github/CODEOWNERS vendored
View File

@ -13,29 +13,37 @@ lib/kim/* @ellio167
lib/mesont/* @iafoss
# whole packages
src/COMPRESS/* @akohlmey
src/COMPRESS/* @rbberger
src/GPU/* @ndtrung81
src/KOKKOS/* @stanmoore1
src/KIM/* @ellio167
src/LATTE/* @cnegre
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
@ -47,7 +55,6 @@ 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-REACTION/fix_bond_react.* @jrgissing
src/USER-MISC/*_grem.* @dstelter92
src/USER-MISC/compute_stress_mop*.* @RomainVermorel
@ -122,6 +129,8 @@ tools/emacs/* @HaoZeke
tools/singularity/* @akohlmey @rbberger
tools/code_standard/* @rbberger
tools/valgrind/* @akohlmey
tools/swig/* @akohlmey
tools/offline/* @rbberger
# tests
unittest/* @akohlmey @rbberger
@ -130,7 +139,7 @@ unittest/* @akohlmey @rbberger
cmake/* @junghans @rbberger
cmake/Modules/Packages/USER-COLVARS.cmake @junghans @rbberger @giacomofiorin
cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167
cmake/presets/*.cmake @junghans @rbberger @akohlmey
cmake/presets/*.cmake @akohlmey
# python
python/* @rbberger
@ -142,6 +151,7 @@ fortran/* @akohlmey
doc/utils/*/* @rbberger
doc/Makefile @rbberger
doc/README @rbberger
examples/plugin/* @akohlmey
# for releases
src/version.h @sjplimp

View File

@ -26,11 +26,11 @@ __
## I don't want to read this whole thing I just have a question!
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to the ['lammps-users' mailing list](https://lammps.sandia.gov/mail.html). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post delayed until it is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using.
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to either the ['lammps-users' mailing list](https://lammps.sandia.gov/mail.html) or the [LAMMPS Material Science Discourse forum](https://matsci.org/lammps). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post delayed until it is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. The LAMMPS forum was recently created as part of a larger effort to build a materials science community and have discussions not just about using LAMMPS. Thus the forum may be also used for discussions that would be off-topic for the mailing list. Those will just have to be moved to a more general category.
## How Can I Contribute?
There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list), and you can contribute by submitting pull requests on GitHub or e-mail your code
There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list or posting in the LAMMPS Materials Science Discourse forum), and you can contribute by submitting pull requests on GitHub or e-mail your code
to one of the [LAMMPS core developers](https://lammps.sandia.gov/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
### Discussing How To Use LAMMPS
@ -42,6 +42,8 @@ Anyone can browse/search previous questions/answers in the archives. You do not
If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies the reply will usually be sent to both, your personal email address and the mailing list. When replying to people, that responded to your post to the list, please always included the mailing list in your replies (i.e. use "Reply All" and **not** "Reply"). Responses will appear on the list in a few minutes, but it can take a few hours for postings and replies to show up in the SourceForge archive. Sending replies also to the mailing list is important, so that responses are archived and people with a similar issue can search for possible solutions in the mailing list archive.
The LAMMPS Materials Science Discourse forum was created recently to facilitate discussion not just about LAMMPS and as part of a larger effort towards building a materials science community. The forum contains a read-only sub-category with the continually updated mailing list archive, so you won't miss anything by joining only the forum and not the mailing list.
### Reporting Bugs
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.

4
.github/codeql/cpp.yml vendored Normal file
View File

@ -0,0 +1,4 @@
paths:
- src
- lib
- tools

5
.github/codeql/python.yml vendored Normal file
View File

@ -0,0 +1,5 @@
paths:
- python/lammps
queries:
- uses: security-and-quality

View File

@ -31,16 +31,18 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/${{ matrix.language }}.yml
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
if: ${{ matrix.language == 'cpp' }}
run: mkdir build
- name: Building LAMMPS via CMake
if: ${{ matrix.language == 'cpp' }}
shell: bash
working-directory: ${{github.workspace}}/build
working-directory: build
run: |
cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake
cmake -C ../cmake/presets/most.cmake ../cmake
cmake --build . --parallel 2
- name: Perform CodeQL Analysis

View File

@ -10,6 +10,8 @@ jobs:
name: MacOS Unit Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: macos-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
@ -17,20 +19,36 @@ jobs:
with:
fetch-depth: 2
- name: Install ccache
run: brew install ccache
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
run: mkdir build
- name: Set up ccache
uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: macos-ccache-${{ github.sha }}
restore-keys: macos-ccache-
- name: Building LAMMPS via CMake
shell: bash
working-directory: ${{github.workspace}}/build
working-directory: build
run: |
cmake -C $GITHUB_WORKSPACE/cmake/presets/clang.cmake \
-C $GITHUB_WORKSPACE/cmake/presets/most.cmake \
$GITHUB_WORKSPACE/cmake \
-DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON
ccache -z
cmake -C ../cmake/presets/clang.cmake \
-C ../cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D ENABLE_TESTING=on \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on \
../cmake
cmake --build . --parallel 2
ccache -s
- name: Run Tests
working-directory: ${{github.workspace}}/build
working-directory: build
shell: bash
run: ctest -V

14
.lgtm.yml Normal file
View File

@ -0,0 +1,14 @@
extraction:
cpp:
configure:
command:
- "mkdir build"
- "cd build"
- "cmake -G Ninja -C ../cmake/presets/minimal.cmake ../cmake"
index:
build_command:
- "cd build"
- "ninja"
python:
python_setup:
version: 3

20
README
View File

@ -14,10 +14,10 @@ LAMMPS is a classical molecular dynamics simulation code designed to
run efficiently on parallel computers. It was developed at Sandia
National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely
under the terms of the GNU Public License (GPL).
under the terms of the GNU Public License (GPL) version 2.
The primary author of the code is Steve Plimpton, who can be emailed
at sjplimp@sandia.gov. The LAMMPS WWW Site at lammps.sandia.gov has
at sjplimp@sandia.gov. The LAMMPS WWW Site at www.lammps.org has
more information about the code and its uses.
The LAMMPS distribution includes the following files and directories:
@ -37,14 +37,14 @@ tools pre- and post-processing tools
Point your browser at any of these files to get started:
https://lammps.sandia.gov/doc/Manual.html LAMMPS manual
https://lammps.sandia.gov/doc/Intro.html hi-level introduction
https://lammps.sandia.gov/doc/Build.html how to build LAMMPS
https://lammps.sandia.gov/doc/Run_head.html how to run LAMMPS
https://lammps.sandia.gov/doc/Commands_all.html Table of available commands
https://lammps.sandia.gov/doc/Library.html LAMMPS library interfaces
https://lammps.sandia.gov/doc/Modify.html how to modify and extend LAMMPS
https://lammps.sandia.gov/doc/Developer.html LAMMPS developer info
https://docs.lammps.org/Manual.html LAMMPS manual
https://docs.lammps.org/Intro.html hi-level introduction
https://docs.lammps.org/Build.html how to build LAMMPS
https://docs.lammps.org/Run_head.html how to run LAMMPS
https://docs.lammps.org/Commands_all.html Table of available commands
https://docs.lammps.org/Library.html LAMMPS library interfaces
https://docs.lammps.org/Modify.html how to modify and extend LAMMPS
https://docs.lammps.org/Developer.html LAMMPS developer info
You can also create these doc pages locally:

35
SECURITY.md Normal file
View File

@ -0,0 +1,35 @@
# Security Policy
LAMMPS is designed as a user-level application to conduct computer
simulations for research using classical mechanics. As such LAMMPS
depends to some degrees on users providing correctly formatted input and
LAMMPS needs to read and write files based on uncontrolled user input.
As a parallel application for use in high-performance computing
environments, performance critical steps are also done without checking
data.
LAMMPS also is interfaced to a number of external libraries, including
libraries with experimental research software, that are not validated
and tested by the LAMMPS developers, so it is easy to import bad
behavior from calling functions in one of those libraries.
Thus is is quite easy to crash LAMMPS through malicious input and do all
kinds of filesystem manipulations. And because of that LAMMPS should
**NEVER** be compiled or **run** as superuser, either from a "root" or
"administrator" account directly or indirectly via "sudo" or "su".
Therefore what could be seen as a security vulnerability is usually
either a user mistake or a bug in the code. Bugs can be reported in
the LAMMPS project
[issue tracker on GitHub](https://github.com/lammps/lammps/issues).
# Version Updates
LAMMPS follows continuous release development model. We aim to keep all
release versions (stable or patch) fully functional and employ a variety
of automatic testing procedures to detect failures of existing
functionality from adding new features before releases are made. Thus
bugfixes and updates are only integrated into the current development
branch and thus the next (patch) release and users are recommended to
update regularly.

View File

@ -1,7 +1,7 @@
These are input scripts used to run benchmark tests for many of the
interatomic potentials in LAMMPS. The results of running these
scripts on different machines are shown on the Potentials section of
the Benchmark page of the LAMMPS WWW site (lammps.sandia.gov/bench).
the Benchmark page of the LAMMPS WWW site (https://www.lammps.org/bench.html).
Examples are shown below of how to run these scripts. Log files for
running them on 1 and 4 processors of a Linux box are included in the

View File

@ -2,7 +2,7 @@ LAMMPS benchmark problems
This directory contains 5 benchmark problems which are discussed in
the Benchmark section of the LAMMPS documentation, and on the
Benchmark page of the LAMMPS WWW site (lammps.sandia.gov/bench).
Benchmark page of the LAMMPS WWW site (https://www.lammps.org/bench.html).
This directory also has several sub-directories:
@ -11,7 +11,7 @@ KEPLER benchmark scripts for GPU cluster with Kepler GPUs
POTENTIALS benchmarks scripts for various potentials in LAMMPS
The results for all of these benchmarks are displayed and discussed on
the Benchmark page of the LAMMPS WWW site: lammps.sandia.gov/bench.
the Benchmark page of the LAMMPS WWW site: https://www.lammps.org/bench.html
The remainder of this file refers to the 5 problems in the top-level
of this directory and how to run them on CPUs, either in serial or

View File

@ -7,6 +7,11 @@ cmake_minimum_required(VERSION 3.10)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
# set policy to silence warnings about missing executable permissions in
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD)
endif()
########################################
project(lammps CXX)
@ -72,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")
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")
@ -86,6 +91,11 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
# export all symbols when building a .dll file on windows
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
########################################################################
# User input options #
########################################################################
@ -104,11 +114,23 @@ endif()
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
# allow enabling clang-tidy for C++ files
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
if(ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*-header-filter=.*" CACHE STRING "")
endif()
include(GNUInstallDirs)
file(GLOB ALL_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp)
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
add_library(lammps ${ALL_SOURCES})
# tell CMake to export all symbols to a .dll on Windows with MinGW cross-compilers
if(BUILD_SHARED_LIBS AND (CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
set_target_properties(lammps PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
endif()
add_executable(lmp ${MAIN_SOURCES})
target_link_libraries(lmp PRIVATE lammps)
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
@ -121,10 +143,10 @@ set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
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-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF
USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB
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-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(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP)
@ -151,12 +173,13 @@ if(NOT CMAKE_CROSSCOMPILING)
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)
# We use a non-standard procedure to cross-compile with MPI on Windows
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
include(MPI4WIN)
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
else()
@ -190,7 +213,7 @@ string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES)
target_compile_definitions(lammps PUBLIC -DLAMMPS_${LAMMPS_SIZES})
# posix_memalign is not available on Windows
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(LAMMPS_MEMALIGN "0" CACHE STRING "posix_memalign() is not available on Windows" FORCE)
else()
set(LAMMPS_MEMALIGN "64" CACHE STRING "enables the use of the posix_memalign() call instead of malloc() when large chunks or memory are allocated by LAMMPS. Set to 0 to disable")
@ -232,8 +255,9 @@ if(BUILD_OMP)
message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support")
endif()
if (((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR
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 "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)))
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
@ -245,68 +269,6 @@ if(BUILD_OMP)
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
endif()
# Compiler specific features for testing
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
mark_as_advanced(ENABLE_COVERAGE)
if(ENABLE_COVERAGE)
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
endif()
else()
target_compile_options(lammps PUBLIC --coverage)
target_link_options(lammps PUBLIC --coverage)
endif()
endif()
endif()
#######################################
# add custom target for IWYU analysis
#######################################
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
mark_as_advanced(ENABLE_IWYU)
if(ENABLE_IWYU)
find_program(IWYU_EXE NAMES include-what-you-use iwyu)
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
if (IWYU_EXE AND IWYU_TOOL)
add_custom_target(
iwyu
${IWYU_TOOL} -o clang -p ${CMAKE_CURRENT_BINARY_DIR} -- -Xiwyu --mapping_file=${CMAKE_CURRENT_SOURCE_DIR}/iwyu/iwyu-extra-map.imp
COMMENT "Running IWYU")
add_dependencies(iwyu lammps)
else()
message(FATAL_ERROR "To use IWYU you need the include-what-you-use/iwyu executable"
"and the iwyu-tool/iwyu_tool script installed in your PATH")
endif()
endif()
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
mark_as_advanced(ENABLE_SANITIZER)
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
if(NOT ENABLE_SANITIZER STREQUAL "none")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
endif()
else()
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
endif()
else()
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
set(ENABLE_SANITIZER "none")
endif()
endif()
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
enable_language(C)
find_package(LAPACK)
@ -358,7 +320,7 @@ find_program(GZIP_EXECUTABLE gzip)
find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE)
option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND})
if(WITH_GZIP)
if(GZIP_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING))
if(GZIP_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
target_compile_definitions(lammps PRIVATE -DLAMMPS_GZIP)
else()
message(FATAL_ERROR "gzip executable not found")
@ -369,7 +331,7 @@ find_program(FFMPEG_EXECUTABLE ffmpeg)
find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE)
option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND})
if(WITH_FFMPEG)
if(FFMPEG_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING))
if(FFMPEG_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
target_compile_definitions(lammps PRIVATE -DLAMMPS_FFMPEG)
else()
message(FATAL_ERROR "ffmpeg executable not found")
@ -386,8 +348,8 @@ else()
set(CUDA_REQUEST_PIC)
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON MLIAP VORONOI USER-COLVARS USER-MOLFILE USER-NETCDF USER-PLUMED USER-QMMM
USER-QUIP USER-SCAFACOS USER-SMD USER-VTK KIM LATTE MESSAGE MSCG COMPRESS)
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)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -484,7 +446,7 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
if(PKG_${SIMPLE_LIB})
string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
string(TOLOWER "${PKG_LIB}" PKG_LIB)
if(PKG_LIB STREQUAL mesont)
if(PKG_LIB STREQUAL "mesont")
enable_language(Fortran)
file(GLOB_RECURSE ${PKG_LIB}_SOURCES
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.f90)
@ -496,9 +458,9 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
target_link_libraries(lammps PRIVATE ${PKG_LIB})
if(PKG_LIB STREQUAL awpmd)
if(PKG_LIB STREQUAL "awpmd")
target_include_directories(awpmd PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/awpmd/systems/interact ${LAMMPS_LIB_SOURCE_DIR}/awpmd/ivutils/include)
elseif(PKG_LIB STREQUAL h5md)
elseif(PKG_LIB STREQUAL "h5md")
target_include_directories(h5md PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/h5md/include ${HDF5_INCLUDE_DIRS})
else()
target_include_directories(${PKG_LIB} PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB})
@ -511,7 +473,7 @@ if(PKG_USER-AWPMD)
endif()
if(PKG_USER-ATC)
if(LAMMPS_SIZES STREQUAL BIGBIG)
if(LAMMPS_SIZES STREQUAL "BIGBIG")
message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
endif()
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES})
@ -555,7 +517,7 @@ endif()
# and the MPI library - if use - has to be linked right before those
# and after everything else that is compiled locally
######################################################################
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(lammps PRIVATE -lwsock32 -lpsapi)
endif()
@ -604,8 +566,8 @@ add_dependencies(lammps gitversion)
# Actually add executable and lib to build
############################################
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
list (FIND LANGUAGES "Fortran" _index)
if(${_index} GREATER -1)
list(FIND LANGUAGES "Fortran" _index)
if(_index GREATER -1)
target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
endif()
set(LAMMPS_CXX_HEADERS angle.h atom.h bond.h citeme.h comm.h compute.h dihedral.h domain.h error.h fix.h force.h group.h improper.h
@ -683,7 +645,7 @@ if(BUILD_SHARED_LIBS)
else()
find_package(Python COMPONENTS Interpreter)
endif()
if (Python_EXECUTABLE)
if(Python_EXECUTABLE)
add_custom_target(
install-python ${CMAKE_COMMAND} -E remove_directory build
COMMAND ${Python_EXECUTABLE} install.py -v ${LAMMPS_SOURCE_DIR}/version.h
@ -716,7 +678,7 @@ if(BUILD_SHARED_LIBS OR PKG_PYTHON)
else()
find_package(Python COMPONENTS Interpreter)
endif()
if (Python_EXECUTABLE)
if(Python_EXECUTABLE)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python)
install(CODE "execute_process(COMMAND ${Python_EXECUTABLE} setup.py build -b ${CMAKE_BINARY_DIR}/python install --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR}/ WORKING_DIRECTORY ${LAMMPS_PYTHON_DIR})")
endif()
@ -730,7 +692,7 @@ get_target_property(DEFINES lammps COMPILE_DEFINITIONS)
include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
message(STATUS "<<< Build configuration >>>
Operating System: ${CMAKE_SYSTEM_NAME}
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
Build type: ${CMAKE_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
@ -761,15 +723,15 @@ if(OPTIONS)
message(" Options: ${OPTIONS}")
endif()
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
list (FIND LANGUAGES "Fortran" _index)
if(${_index} GREATER -1)
list(FIND LANGUAGES "Fortran" _index)
if(_index GREATER -1)
message(STATUS "Fortran Compiler: ${CMAKE_Fortran_COMPILER}
Type: ${CMAKE_Fortran_COMPILER_ID}
Version: ${CMAKE_Fortran_COMPILER_VERSION}
Fortran Flags:${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}")
endif()
list (FIND LANGUAGES "C" _index)
if(${_index} GREATER -1)
list(FIND LANGUAGES "C" _index)
if(_index GREATER -1)
message(STATUS "C compiler: ${CMAKE_C_COMPILER}
Type: ${CMAKE_C_COMPILER_ID}
Version: ${CMAKE_C_COMPILER_VERSION}
@ -799,9 +761,12 @@ if(BUILD_MPI)
endif()
if(PKG_GPU)
message(STATUS "<<< GPU package settings >>>
-- GPU API: ${GPU_API}")
-- GPU API: ${GPU_API}")
if(GPU_API STREQUAL "CUDA")
message(STATUS "CUDA Compiler: ${CUDA_NVCC_EXECUTABLE}")
message(STATUS "GPU default architecture: ${GPU_ARCH}")
message(STATUS "GPU binning with CUDPP: ${CUDPP_OPT}")
message(STATUS "CUDA MPS support: ${CUDA_MPS_SUPPORT}")
elseif(GPU_API STREQUAL "HIP")
message(STATUS "HIP platform: ${HIP_PLATFORM}")
message(STATUS "HIP architecture: ${HIP_ARCH}")
@ -811,7 +776,7 @@ if(PKG_GPU)
message(STATUS "HIP GPU sorting: off")
endif()
endif()
message(STATUS "GPU precision: ${GPU_PREC}")
message(STATUS "GPU precision: ${GPU_PREC}")
endif()
if(PKG_KOKKOS)
message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}")
@ -831,7 +796,7 @@ if(PKG_KSPACE)
endif()
if(PKG_KOKKOS)
if(Kokkos_ENABLE_CUDA)
if (${FFT} STREQUAL "KISS")
if(FFT STREQUAL "KISS")
message(STATUS "Kokkos FFT: KISS")
else()
message(STATUS "Kokkos FFT: cuFFT")

View File

@ -15,6 +15,11 @@ if(Python3_EXECUTABLE)
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .
WORKING_DIRECTORY ${LAMMPS_DIR}
COMMENT "Check for whitespace errors")
add_custom_target(
check-homepage
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/homepage.py .
WORKING_DIRECTORY ${LAMMPS_DIR}
COMMENT "Check for homepage URL errors")
add_custom_target(
check-permissions
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/permissions.py .
@ -25,6 +30,11 @@ if(Python3_EXECUTABLE)
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py -f .
WORKING_DIRECTORY ${LAMMPS_DIR}
COMMENT "Fix whitespace errors")
add_custom_target(
fix-homepage
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/homepage.py -f .
WORKING_DIRECTORY ${LAMMPS_DIR}
COMMENT "Fix homepage URL errors")
add_custom_target(
fix-permissions
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/permissions.py -f .

View File

@ -55,8 +55,8 @@ if(BUILD_DOC)
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "a4a6a093a89bc2ccab1452d766b98e53" CACHE STRING "MD5 checksum of MathJax tarball")
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "d1c98c746888bfd52ca8ebc10704f92f" CACHE STRING "MD5 checksum of MathJax tarball")
mark_as_advanced(MATHJAX_URL)
# download mathjax distribution and unpack to folder "mathjax"

View File

@ -0,0 +1,61 @@
include(FindPackageHandleStandardArgs)
# Check if N2P2_DIR is set manually.
if (DEFINED ENV{N2P2_DIR})
set(N2P2_DIR "${N2P2_DIR}")
# If not, try if directory "lib/hdnnp/n2p2" exists.
else()
get_filename_component(_fullpath "${LAMMPS_LIB_SOURCE_DIR}/hdnnp/n2p2" REALPATH)
if (EXISTS ${_fullpath})
set(N2P2_DIR "${_fullpath}")
endif()
endif()
# Set path to include directory.
find_path(N2P2_INCLUDE_DIR InterfaceLammps.h HINTS "${N2P2_DIR}/include")
# Two libraries need to be linked: libnnp and libnnpif.
find_library(N2P2_LIBNNP NAMES nnp HINTS "${N2P2_DIR}/lib")
find_library(N2P2_LIBNNPIF NAMES nnpif HINTS "${N2P2_DIR}/lib")
# Users could compile n2p2 with extra flags which are then also required for
# pair_hdnnp.cpp compilation. To forward them to the LAMMPS build process n2p2
# writes a file with cmake commands, e.g.
#
# target_compile_definitions(lammps PRIVATE -DN2P2_NO_SF_GROUPS)
#
# to "lib/lammps-extra.cmake" which is then included by USER-HDNNP.cmake.
find_file(N2P2_CMAKE_EXTRA NAMES lammps-extra.cmake HINTS "${N2P2_DIR}/lib")
find_package_handle_standard_args(N2P2 DEFAULT_MSG
N2P2_DIR
N2P2_INCLUDE_DIR
N2P2_LIBNNP
N2P2_LIBNNPIF
N2P2_CMAKE_EXTRA)
if(N2P2_FOUND)
if (NOT TARGET N2P2::N2P2)
# n2p2 core library "libnnp"
add_library(N2P2::LIBNNP UNKNOWN IMPORTED)
set_target_properties(N2P2::LIBNNP PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${N2P2_INCLUDE_DIR}
IMPORTED_LOCATION ${N2P2_LIBNNP})
# n2p2 interface library "libnnpif"
add_library(N2P2::LIBNNPIF UNKNOWN IMPORTED)
set_target_properties(N2P2::LIBNNPIF PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${N2P2_INCLUDE_DIR}
IMPORTED_LOCATION ${N2P2_LIBNNPIF})
# Put libnnp, libnnpif and include directory together.
add_library(N2P2::N2P2 INTERFACE IMPORTED)
set_property(TARGET N2P2::N2P2 PROPERTY
INTERFACE_LINK_LIBRARIES N2P2::LIBNNPIF N2P2::LIBNNP)
set(N2P2_CMAKE_EXTRAS ${N2P2_CMAKE_EXTRA})
endif()
endif()
mark_as_advanced(
N2P2_DIR
N2P2_INCLUDE_DIR
N2P2_LIBNNP
N2P2_LIBNNPIF
N2P2_CMAKE_EXTRA
)

View File

@ -1,6 +1,6 @@
message(STATUS "Downloading and building Google Test library")
if(CMAKE_BUILD_TYPE STREQUAL Debug)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(GTEST_LIB_POSTFIX d)
else()
set(GTEST_LIB_POSTFIX)

View File

@ -0,0 +1,3 @@
# utility script to call WriteOpenCLHeader function
include(${SOURCE_DIR}/Modules/OpenCLUtils.cmake)
WriteOpenCLHeader(${VARNAME} ${HEADER_FILE} ${SOURCE_FILES})

View File

@ -104,3 +104,13 @@ function(FetchPotentials pkgfolder potfolder)
endforeach()
endif()
endfunction(FetchPotentials)
# set CMAKE_LINUX_DISTRO and CMAKE_DISTRO_VERSION on Linux
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (EXISTS /etc/os-release))
file(STRINGS /etc/os-release distro REGEX "^NAME=")
string(REGEX REPLACE "NAME=\"?([^\"]*)\"?" "\\1" distro "${distro}")
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=")
string(REGEX REPLACE "VERSION_ID=\"?([^\"]*)\"?" "\\1" disversion "${disversion}")
set(CMAKE_LINUX_DISTRO ${distro})
set(CMAKE_DISTRO_VERSION ${disversion})
endif()

View File

@ -1,6 +1,6 @@
message(STATUS "Downloading and building OpenCL loader library")
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
set(OPENCL_LOADER_MD5 "011cdcbd41030be94f3fced6d763a52a" CACHE STRING "MD5 checksum of OpenCL loader tarball")
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")
mark_as_advanced(OPENCL_LOADER_URL)
mark_as_advanced(OPENCL_LOADER_MD5)

View File

@ -1,10 +1,8 @@
function(GenerateOpenCLHeader varname outfile files)
message("Creating ${outfile}...")
function(WriteOpenCLHeader varname outfile files)
file(WRITE ${outfile} "const char * ${varname} = \n")
math(EXPR ARG_END "${ARGC}-1")
separate_arguments(files)
foreach(IDX RANGE 2 ${ARG_END})
list(GET ARGV ${IDX} filename)
foreach(filename ${files})
file(READ ${filename} content)
string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}")
string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}")
@ -15,4 +13,16 @@ function(GenerateOpenCLHeader varname outfile files)
endforeach()
file(APPEND ${outfile} ";\n")
endfunction(WriteOpenCLHeader)
function(GenerateOpenCLHeader varname outfile files)
list(REMOVE_AT ARGV 0 1)
add_custom_command(OUTPUT ${outfile}
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-D VARNAME=${varname}
-D HEADER_FILE=${outfile}
-D SOURCE_FILES="${ARGV}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/GenerateOpenCLHeader.cmake
DEPENDS ${ARGV}
COMMENT "Generating ${outfile}...")
endfunction(GenerateOpenCLHeader)

View File

@ -48,7 +48,7 @@ if(GPU_API STREQUAL "CUDA")
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
if (GPU_LIB_OLD_CUBIN_HEADERS)
if(GPU_LIB_OLD_CUBIN_HEADERS)
message(FATAL_ERROR "########################################################################\n"
"Found file(s) generated by the make-based build system in lib/gpu\n"
"Please run\n"
@ -112,10 +112,10 @@ if(GPU_API STREQUAL "CUDA")
endif()
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
foreach(CU_OBJ ${GPU_GEN_OBJS})
get_filename_component(CU_NAME ${CU_OBJ} NAME_WE)
@ -145,9 +145,16 @@ if(GPU_API STREQUAL "CUDA")
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
elseif(GPU_API STREQUAL "OPENCL")
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ON)
# the static OpenCL loader doesn't seem to work on macOS. use the system provided
# version by default instead (for as long as it will be available)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(_opencl_static_default OFF)
else()
set(_opencl_static_default ON)
endif()
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ${_opencl_static_default})
mark_as_advanced(USE_STATIC_OPENCL_LOADER)
if (USE_STATIC_OPENCL_LOADER)
if(USE_STATIC_OPENCL_LOADER)
include(OpenCLLoader)
else()
find_package(OpenCL REQUIRED)
@ -289,18 +296,18 @@ elseif(GPU_API STREQUAL "HIP")
if(HIP_COMPILER STREQUAL "clang")
add_custom_command(OUTPUT ${CUBIN_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
DEPENDS ${CU_CPP_FILE}
COMMENT "Generating ${CU_NAME}.cubin")
else()
add_custom_command(OUTPUT ${CUBIN_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
DEPENDS ${CU_CPP_FILE}
COMMENT "Generating ${CU_NAME}.cubin")
endif()
elseif(HIP_PLATFORM STREQUAL "nvcc")
add_custom_command(OUTPUT ${CUBIN_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
DEPENDS ${CU_FILE}
COMMENT "Generating ${CU_NAME}.cubin")
endif()

View File

@ -37,8 +37,8 @@ if(DOWNLOAD_KOKKOS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
include(ExternalProject)
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "08201d1c7cf5bc458ce0f5b44a629d5a" CACHE STRING "MD5 checksum of KOKKOS tarball")
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.4.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "4c84698917c93a18985b311bb6caf84f" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
ExternalProject_Add(kokkos_build
@ -58,7 +58,7 @@ if(DOWNLOAD_KOKKOS)
target_link_libraries(lmp PRIVATE LAMMPS::KOKKOS)
add_dependencies(LAMMPS::KOKKOS kokkos_build)
elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3.3.01 REQUIRED CONFIG)
find_package(Kokkos 3.4.01 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
else()
@ -99,7 +99,7 @@ if(PKG_KSPACE)
${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
if(Kokkos_ENABLE_CUDA)
if(NOT ${FFT} STREQUAL "KISS")
if(NOT (FFT STREQUAL "KISS"))
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
target_link_libraries(lammps PRIVATE cufft)
endif()

View File

@ -1,4 +1,4 @@
if(LAMMPS_SIZES STREQUAL BIGBIG)
if(LAMMPS_SIZES STREQUAL "BIGBIG")
message(FATAL_ERROR "The MESSAGE Package is not compatible with -DLAMMPS_BIGBIG")
endif()
option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF)

View File

@ -0,0 +1,124 @@
find_package(N2P2 QUIET)
if(N2P2_FOUND)
set(DOWNLOAD_N2P2_DEFAULT OFF)
else()
set(DOWNLOAD_N2P2_DEFAULT ON)
endif()
option(DOWNLOAD_N2P2 "Download n2p2 library instead of using an already installed one)" ${DOWNLOAD_N2P2_DEFAULT})
if(DOWNLOAD_N2P2)
set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.1.4.tar.gz" CACHE STRING "URL for n2p2 tarball")
set(N2P2_MD5 "9595b066636cd6b90b0fef93398297a5" CACHE STRING "MD5 checksum of N2P2 tarball")
mark_as_advanced(N2P2_URL)
mark_as_advanced(N2P2_MD5)
# adjust settings from detected compiler to compiler platform in n2p2 library
# set compiler specific flag to turn on C++11 syntax (required on macOS and CentOS 7)
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")
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")
set(N2P2_COMP gnu)
set(N2P2_CXX_STD "--c++11")
else() # default
set(N2P2_COMP "")
endif()
# pass on archive creator command. prefer compiler specific version, if set.
# important when using cross compiler.
if(CMAKE_CXX_COMPILER_AR)
set(N2P2_AR ${CMAKE_CXX_COMPILER_AR})
else()
set(N2P2_AR ${CMAKE_AR})
endif()
# adjust compilation of n2p2 library to whether MPI is requested in LAMMPS or not
# need special care for compiling for MPICH2 with Linux-to-Windows cross compiler.
if(NOT BUILD_MPI)
set(N2P2_PROJECT_OPTIONS "-DN2P2_NO_MPI")
else()
# get path to MPI include directory when cross-compiling to windows
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES)
set(N2P2_PROJECT_OPTIONS "-I ${N2P2_MPI_INCLUDE} -DMPICH_SKIP_MPICXX=1")
set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES)
set(N2P2_PROJECT_OPTIONS "-I ${N2P2_MPI_INCLUDE} -DMPICH_SKIP_MPICXX=1")
set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
endif()
endif()
# 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
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
set(N2P2_BUILD_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}} ${N2P2_CXX_STD}")
set(N2P2_BUILD_OPTIONS INTERFACES=LAMMPS COMP=${N2P2_COMP} "PROJECT_OPTIONS=${N2P2_PROJECT_OPTIONS}" "PROJECT_DEBUG="
"PROJECT_CC=${CMAKE_CXX_COMPILER}" "PROJECT_MPICC=${MPI_CXX_COMPILER}" "PROJECT_CFLAGS=${N2P2_BUILD_FLAGS}"
"PROJECT_AR=${N2P2_AR}")
# echo final flag for debugging
message(STATUS "N2P2 BUILD OPTIONS: ${N2P2_BUILD_OPTIONS}")
# download compile n2p2 library. much patch MPI calls in LAMMPS interface to accommodate MPI-2 (e.g. for cross-compiling)
include(ExternalProject)
ExternalProject_Add(n2p2_build
URL ${N2P2_URL}
URL_MD5 ${N2P2_MD5}
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_ALWAYS YES
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
LOG_BUILD ON
SOURCE_SUBDIR src/
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libnnp.a <SOURCE_DIR>/lib/libnnpif.a
)
# create imported target LAMMPS::N2P2 from two libraries nnp and nnpif
ExternalProject_get_property(n2p2_build SOURCE_DIR)
# n2p2 core library "libnnp"
add_library(LAMMPS::N2P2::LIBNNP UNKNOWN IMPORTED)
set_target_properties(LAMMPS::N2P2::LIBNNP PROPERTIES
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libnnp.a"
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include")
# n2p2 interface library "libnnpif"
add_library(LAMMPS::N2P2::LIBNNPIF UNKNOWN IMPORTED)
set_target_properties(LAMMPS::N2P2::LIBNNPIF PROPERTIES
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libnnpif.a"
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include")
# nnpif library has MPI calls if MPI is enabled, so we must link with MPI libs
if(BUILD_MPI)
set_target_properties(LAMMPS::N2P2::LIBNNPIF PROPERTIES
INTERFACE_LINK_LIBRARIES MPI::MPI_CXX)
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
add_dependencies(LAMMPS::N2P2::LIBNNPIF MPI::MPI_CXX)
endif()
endif()
# final step to define imported target
add_library(LAMMPS::N2P2 INTERFACE IMPORTED)
set_property(TARGET LAMMPS::N2P2 PROPERTY
INTERFACE_LINK_LIBRARIES LAMMPS::N2P2::LIBNNPIF LAMMPS::N2P2::LIBNNP)
target_link_libraries(lammps PRIVATE LAMMPS::N2P2)
add_dependencies(LAMMPS::N2P2 n2p2_build)
# work around issues with older CMake versions
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
file(MAKE_DIRECTORY "${SOURCE_DIR}/lib")
else()
find_package(N2P2)
if(NOT N2P2_FOUND)
message(FATAL_ERROR "n2p2 not found, help CMake to find it by setting N2P2_DIR, or set DOWNLOAD_N2P2=ON to download it")
endif()
target_link_libraries(lammps PRIVATE N2P2::N2P2)
include(${N2P2_CMAKE_EXTRAS})
endif()

View File

@ -79,9 +79,11 @@ if(INTEL_ARCH STREQUAL "KNL")
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
include(CheckCXXCompilerFlag)
foreach(_FLAG -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
if(COMPILER_SUPPORTS${_FLAG})
foreach(_FLAG -O2 "-fp-model fast=2" -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
string(REGEX REPLACE "[ =\"]" "" _FLAGX ${_FLAG})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
if(COMPILER_SUPPORTS${_FLAGX})
separate_arguments(_FLAG UNIX_COMMAND "${_FLAG}")
target_compile_options(lammps PRIVATE ${_FLAG})
endif()
endforeach()

View File

@ -0,0 +1,118 @@
find_package(mdi QUIET)
if(${mdi_FOUND})
set(DOWNLOAD_MDI_DEFAULT OFF)
else()
set(DOWNLOAD_MDI_DEFAULT ON)
endif()
option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an already installed one" ${DOWNLOAD_MDI_DEFAULT})
if(DOWNLOAD_MDI)
message(STATUS "MDI download requested - we will build our own")
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.2.9.tar.gz" CACHE STRING "URL for MDI tarball")
set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball")
mark_as_advanced(MDI_URL)
mark_as_advanced(MDI_MD5)
enable_language(C)
# only ON/OFF are allowed for "mpi" flag when building MDI library
# so translate boolean value of BUILD_MPI
# always disable MPI when cross-compiling to Windows.
if((BUILD_MPI) AND NOT((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
set(MDI_USE_MPI ON)
else()
set(MDI_USE_MPI OFF)
endif()
# detect if we have python development support and thus can enable python plugins
set(MDI_USE_PYTHON_PLUGINS OFF)
if(CMAKE_VERSION VERSION_LESS 3.12)
find_package(PythonLibs QUIET) # Deprecated since version 3.12
if(PYTHONLIBS_FOUND)
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
else()
find_package(Python QUIET COMPONENTS Development)
if(Python_Development_FOUND)
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
endif()
# download/ build MDI library
# always build static library with -fpic
# support cross-compilation and ninja-build
include(ExternalProject)
ExternalProject_Add(mdi_build
URL ${MDI_URL}
URL_MD5 ${MDI_MD5}
CMAKE_ARGS ${CMAKE_REQUEST_PIC}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-Dlanguage=C
-Dlibtype=STATIC
-Dmpi=${MDI_USE_MPI}
-Dpython_plugins=${MDI_USE_PYTHON_PLUGINS}
UPDATE_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS "<BINARY_DIR>/MDI_Library/libmdi.a"
)
# where is the compiled library?
ExternalProject_get_property(mdi_build BINARY_DIR)
set(MDI_BINARY_DIR "${BINARY_DIR}/MDI_Library")
# workaround for older CMake versions
file(MAKE_DIRECTORY ${MDI_BINARY_DIR})
# create imported target for the MDI library
add_library(LAMMPS::MDI UNKNOWN IMPORTED)
add_dependencies(LAMMPS::MDI mdi_build)
set_target_properties(LAMMPS::MDI PROPERTIES
IMPORTED_LOCATION "${MDI_BINARY_DIR}/libmdi.a"
INTERFACE_INCLUDE_DIRECTORIES ${MDI_BINARY_DIR}
)
set(MDI_DEP_LIBS "")
# if compiling with python plugins we need
# to add python libraries as dependency.
if(MDI_USE_PYTHON_PLUGINS)
if(CMAKE_VERSION VERSION_LESS 3.12)
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
else()
list(APPEND MDI_DEP_LIBS Python::Python)
endif()
endif()
# need to add support for dlopen/dlsym, except when compiling for Windows.
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
endif()
if(MDI_DEP_LIBS)
set_target_properties(LAMMPS::MDI PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES "${MDI_DEP_LIBS}")
endif()
target_link_libraries(lammps PRIVATE LAMMPS::MDI)
target_link_libraries(lmp PRIVATE LAMMPS::MDI)
else()
find_package(mdi)
if(NOT mdi_FOUND)
message(FATAL_ERROR "MDI library not found. Help CMake to find it "
"by setting mdi_LIBRARY and mdi_INCLUDE_DIR, or set DOWNLOAD_MDI=ON "
"to download and compile it")
endif()
# Link the lammps library against MDI
target_include_directories(lammps PRIVATE ${mdi_INCLUDE_DIR})
target_link_libraries(lammps PRIVATE ${mdi_LIBRARY})
# Link the lammps executable against MDI
target_include_directories(lmp PRIVATE ${mdi_INCLUDE_DIR})
target_link_libraries(lmp PRIVATE ${mdi_LIBRARY})
endif()
target_compile_definitions(lammps PRIVATE -DLMP_USER_MDI)
target_compile_definitions(lmp PRIVATE -DLMP_USER_MDI)

View File

@ -0,0 +1,25 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.4.9.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "4db54962fbd6adcf8c18d46e1798ceb5" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
# download library sources to build folder
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz SHOW_PROGRESS EXPECTED_HASH MD5=${PACELIB_MD5})
# uncompress downloaded sources
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
file(GLOB PACE_EVALUATOR_INCLUDE_DIR ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE)
file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE/*.cpp)
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
target_link_libraries(lammps PRIVATE pace)

View File

@ -54,8 +54,9 @@ 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.0/plumed-src-2.7.0.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "95f29dd0c067577f11972ff90dfc7d12" CACHE STRING "MD5 checksum of PLUMED tarball")
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")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)

View File

@ -9,7 +9,7 @@ function(prevent_in_source_builds)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
# disallow in-source builds
if("${srcdir}" STREQUAL "${bindir}" OR "${srcdir2}" STREQUAL "${bindir}" OR "${srcdir3}" STREQUAL "${bindir}")
if(("${srcdir}" STREQUAL "${bindir}") OR ("${srcdir2}" STREQUAL "${bindir}") OR ("${srcdir3}" STREQUAL "${bindir}"))
message(FATAL_ERROR "\
CMake must not to be run in the source directory. \

View File

@ -16,11 +16,14 @@ if(ENABLE_TESTING)
set(MEMORYCHECK_COMMAND "${VALGRIND_BINARY}" CACHE FILEPATH "Memory Check Command")
set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT_OPTIONS}" CACHE STRING "Memory Check Command Options")
# check if a faster linker is available.
# only verified with GNU and Clang compilers and new CMake
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
# we need to build and link a LOT of tester executables, so it is worth checking if
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
# also only verified with Fedora Linux > 30 and Ubuntu <= 18.04 (Ubuntu 20.04 fails)
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
OR ((CMAKE_LINUX_DISTRO STREQUAL "Fedora") AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
include(CheckCXXCompilerFlag)
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
@ -53,3 +56,76 @@ if(ENABLE_TESTING)
get_filename_component(LAMMPS_UNITTEST_BIN ${CMAKE_BINARY_DIR}/unittest ABSOLUTE)
add_subdirectory(${LAMMPS_UNITTEST_DIR} ${LAMMPS_UNITTEST_BIN})
endif()
# Compiler specific features for testing
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
mark_as_advanced(ENABLE_COVERAGE)
if(ENABLE_COVERAGE)
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
endif()
else()
target_compile_options(lammps PUBLIC --coverage)
target_link_options(lammps PUBLIC --coverage)
endif()
endif()
endif()
#######################################
# add custom target for IWYU analysis
#######################################
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
mark_as_advanced(ENABLE_IWYU)
if(ENABLE_IWYU)
# enforce these settings
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable reporting compilation commands to compile_commands.json" FORCE)
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")))
message(FATAL_ERROR "IWYU is only supported with Clang or GNU compilers")
endif()
# detect the "native" header folder so we can include them first
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-search-dirs OUTPUT_VARIABLE IWYU_SEARCH_PATHS)
string(REGEX REPLACE ".*libraries: *=([^:]+):.*" "\\1/include" IWYU_EXTRA_INCLUDE_DIR ${IWYU_SEARCH_PATHS})
find_program(IWYU_EXE NAMES include-what-you-use iwyu)
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
if(IWYU_EXE AND IWYU_TOOL)
add_custom_target(
iwyu
${IWYU_TOOL} -o clang -p ${CMAKE_CURRENT_BINARY_DIR} -- -I${IWYU_EXTRA_INCLUDE_DIR} -Xiwyu --mapping_file=${CMAKE_CURRENT_SOURCE_DIR}/iwyu/iwyu-extra-map.imp
COMMENT "Running IWYU")
add_dependencies(iwyu lammps)
else()
message(FATAL_ERROR "To use IWYU you need the include-what-you-use/iwyu executable"
"and the iwyu-tool/iwyu_tool script installed in your PATH")
endif()
endif()
#######################################
# select code sanitizer options
#######################################
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
mark_as_advanced(ENABLE_SANITIZER)
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
if(NOT ENABLE_SANITIZER STREQUAL "none")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
endif()
else()
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
endif()
else()
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
set(ENABLE_SANITIZER "none")
endif()
endif()

View File

@ -45,7 +45,7 @@ if(BUILD_LAMMPS_SHELL)
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
# workaround for broken readline pkg-config file on FreeBSD
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_include_directories(lammps-shell PRIVATE /usr/local/include)
endif()
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE)

View File

@ -6,15 +6,27 @@ set(YAML_MD5 "bb15429d8fb787e7d3f1c83ae129a999" CACHE STRING "MD5 checksum of li
mark_as_advanced(YAML_URL)
mark_as_advanced(YAML_MD5)
# support cross-compilation to windows
if(CMAKE_CROSSCOMPILING AND (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
set(YAML_CROSS_HOST --host=i686-mingw64)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(YAML_CROSS_HOST --host=x86_64-mingw64)
else()
message(FATAL_ERROR "Unsupported cross-compilation "
" for ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}"
" on ${CMAKE_HOST_SYSTEM}/${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
endif()
ExternalProject_Add(libyaml
URL ${YAML_URL}
URL_MD5 ${YAML_MD5}
SOURCE_DIR "${CMAKE_BINARY_DIR}/yaml-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/yaml-build"
CONFIGURE_COMMAND <SOURCE_DIR>/configure ${CONFIGURE_REQUEST_PIC}
CXX=${CMAKE_CXX_COMPILER}
CC=${CMAKE_C_COMPILER}
--prefix=<INSTALL_DIR> --disable-shared
CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
--prefix=<INSTALL_DIR> --disable-shared ${YAML_CROSS_HOST}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX}
TEST_COMMAND "")

View File

@ -17,7 +17,7 @@ if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
ERROR_QUIET
WORKING_DIRECTORY ${LAMMPS_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
OUTPUT_VARIABLE temp_git_describe
ERROR_QUIET
WORKING_DIRECTORY ${LAMMPS_DIR}

View File

@ -24,7 +24,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: liblammps@LAMMPS_MACHINE@
Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library
URL: http://lammps.sandia.gov
URL: https://www.lammps.org
Version: @PROJECT_VERSION@
Requires:
Libs: -L${libdir} -llammps@LAMMPS_MACHINE@

View File

@ -2,16 +2,16 @@
# 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 MISC MESSAGE MLIAP
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
SNAP SPIN SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
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)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -4,16 +4,16 @@
# 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 MISC MESSAGE MLIAP
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
SNAP SPIN SRD VORONOI
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
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)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -4,10 +4,18 @@ set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" 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_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)
set(MPI_CXX "clang++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "clang" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)

View File

@ -1,7 +1,7 @@
# preset that turns on packages with automatic downloads of sources of potentials
# compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
# 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)
set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT USER-MDI USER-PACE)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
@ -9,9 +9,11 @@ endforeach()
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
set(DOWNLOAD_LATTE ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PLUMED ON CACHE BOOL "" FORCE)
set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE)

View File

@ -3,10 +3,20 @@
set(CMAKE_CXX_COMPILER "icpc" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "ifort" 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_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)
set(MPI_CXX "icpc" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "icc" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)

View File

@ -1,9 +1,9 @@
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-CGDNA USER-CGSDK
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
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

View File

@ -5,9 +5,9 @@
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-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-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)
foreach(PKG ${ALL_PACKAGES})

View File

@ -1,10 +1,11 @@
# 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 MPIIO MSCG PYTHON
VORONOI USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB
USER-MOLFILE USER-MESONT USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP
USER-SCAFACOS USER-SMD USER-VTK)
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)
foreach(PKG ${PACKAGES_WITH_LIB})
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)

View File

@ -1,12 +1,22 @@
# preset that will enable the LLVM based Intel compilers with support for MPI and OpenMP (on Linux boxes)
# preset that will enable the LLVM based Intel compilers with support for MPI and OpenMP and Fortran (on Linux boxes)
set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "ifx" 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_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)
set(MPI_CXX "icpx" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "icx" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)

View File

@ -10,7 +10,6 @@ endif
BUILDDIR = ${CURDIR}
RSTDIR = $(BUILDDIR)/src
VENV = $(BUILDDIR)/docenv
TXT2RST = $(VENV)/bin/txt2rst
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
SPHINXCONFIG = $(BUILDDIR)/utils/sphinx-config
MATHJAX = $(SPHINXCONFIG)/_static/mathjax
@ -59,7 +58,7 @@ SPHINXEXTRA = -E -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiproc
# we only want to use explicitly listed files.
DOXYFILES = $(shell sed -n -e 's/\#.*$$//' -e '/^ *INPUT \+=/,/^[A-Z_]\+ \+=/p' doxygen/Doxyfile.in | sed -e 's/@LAMMPS_SOURCE_DIR@/..\/src/g' -e 's/\\//g' -e 's/ \+/ /' -e 's/[A-Z_]\+ \+= *\(YES\|NO\|\)//')
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check xmlgen
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check char_check xmlgen
# ------------------------------------------
@ -68,7 +67,6 @@ help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html create HTML pages in html dir"
@echo " pdf create Manual.pdf in this dir"
@echo " fetch fetch HTML and PDF files from LAMMPS web site"
@echo " epub create ePUB format manual for e-book readers"
@echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)"
@echo " (requires ebook-convert tool from calibre)"
@ -185,13 +183,6 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@rm -rf latex/PDF/.[sg]*
@echo "Build finished. Manual.pdf is in this directory."
fetch:
@rm -rf html_www Manual_www.pdf
@curl -s -o Manual_www.pdf http://lammps.sandia.gov/doc/Manual.pdf
@curl -s -o lammps-doc.tar.gz http://lammps.sandia.gov/tars/lammps-doc.tar.gz
@tar xzf lammps-doc.tar.gz
@rm -f lammps-doc.tar.gz
anchor_check : $(ANCHORCHECK)
@(\
. $(VENV)/bin/activate ;\
@ -213,6 +204,9 @@ package_check : $(VENV)
deactivate ;\
)
char_check :
@( env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst && exit 1 || : )
xmlgen : doxygen/xml/index.xml
doxygen/Doxyfile: doxygen/Doxyfile.in
@ -236,9 +230,9 @@ $(VENV):
)
$(MATHJAX):
@git clone --depth 1 git://github.com/mathjax/MathJax.git $@
@git clone -b 3.1.4 -c advice.detachedHead=0 --depth 1 git://github.com/mathjax/MathJax.git $@
$(TXT2RST) $(ANCHORCHECK): $(VENV)
$(ANCHORCHECK): $(VENV)
@( \
. $(VENV)/bin/activate; \
(cd utils/converters;\

View File

@ -25,16 +25,11 @@ github-development-workflow.md notes on the LAMMPS development workflow
include-file-conventions.md notes on LAMMPS' include file conventions
documentation_conventions.md notes on writing documentation for LAMMPS
If you downloaded a LAMMPS tarball from lammps.sandia.gov, then the html
If you downloaded a LAMMPS tarball from www.lammps.org, then the html
folder and the PDF manual should be included. If you downloaded LAMMPS
from GitHub then you either need to download them or build them.
from GitHub then you either need to build them.
(a) You can "fetch" the current HTML and PDF files from the LAMMPS web
site. Just type "make fetch". This should create a html_www directory
and Manual_www.pdf file. These will always represent the latest published
patch/development version of LAMMPS.
(b) You can build the HTML and PDF files yourself, by typing "make html"
You can build the HTML and PDF files yourself, by typing "make html"
or by "make pdf", respectively. This requires various tools and files.
Some of them have to be installed (more on that below). For the rest the
build process will attempt to download and install into a python virtual
@ -78,4 +73,4 @@ the tool 'ebook-convert' from the 'calibre' e-book management software
----------------
More details this can be found in the manual itself. The online
version is at: https://lammps.sandia.gov/doc/Manual_build.html
version is at: https://docs.lammps.org/Build_manual.html

View File

@ -18,8 +18,8 @@ digraph lammps {
Up [shape=box label="Update" color=blue]
Un [shape=box label="Universe" color=blue]
Ti [shape=box label="Timer" color=blue]
Lt [label="Lattice"]
Rg [label="Region" color=red]
Lt [label="Lattice"]
Rb [shape=box label="RegionBlock"]
Rs [shape=box label="RegionSphere"]
Av [label="AtomVec" color=red]
@ -34,6 +34,7 @@ digraph lammps {
Du [label="Dump" color=red]
Fi [label="Fix" color=red]
Cp [label="Compute" color=red]
Cm [label="Command" color=red]
Th [label="Thermo"]
Va [label="Variable"]
Ew [shape=box label="Ewald"]
@ -71,16 +72,19 @@ digraph lammps {
Dg [shape=box label="DumpCFG"]
Ve [shape=box label="Verlet"]
Rr [shape=box label="Respa"]
Ru [shape=box label="Run"]
Se [shape=box label="Set"]
Pt [shape=box label="PPPMTIP4P"]
Vs [shape=box label="VerletSplit"]
Ro [shape=box label="RespaOMP"]
Mc [shape=box label="MinCG"]
Mf [shape=box label="MinFire"]
La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2]
Do -> {Lt Rg} [penwidth=2]
Do -> {Rg Lt} [penwidth=2]
Rg -> {Rb Rs} [style=dashed penwidth=2]
Co -> {Cb Ct} [style=dashed penwidth=2]
In -> Va [penwidth=2]
In -> {Va Cm} [penwidth=2]
Cm -> {Ru Se} [style=dashed penwidth=2]
Mo -> {Fi Cp} [penwidth=2]
Fo -> {Pa Bo An Di Im Ks} [penwidth=2]
Ks -> {Ew Pp} [style=dashed penwidth=2]

View File

@ -1,4 +1,4 @@
.TH LAMMPS "8 April 2021" "2021-04-08"
.TH LAMMPS "27 May 2021" "2021-05-27"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
@ -34,7 +34,7 @@ semiconductors) and coarse-grained or mesoscopic systems. It can be used to
model atoms or, more generically, as a parallel particle simulator at the
atomic, meso, or continuum scale.
See https://lammps.sandia.gov/ for more information and documentation.
See https://www.lammps.org/ for more information and documentation.
.SH EXECUTABLE NAME
The

View File

@ -1129,6 +1129,9 @@ Bibliography
**(Sutmann)**
Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013)
**(Sutmann)** G. Sutmann. ScaFaCoS - a Scalable library of Fast Coulomb Solvers for particle Systems.
In Bajaj, Zavattieri, Koslowski, Siegmund, Proceedings of the Society of Engineering Science 51st Annual Technical Meeting. 2014.
**(Swinburne)**
Swinburne and Marinica, Physical Review Letters, 120, 1 (2018)
@ -1285,9 +1288,6 @@ Bibliography
**(Wennberg)**
Wennberg, Murtola, Hess, Lindahl, J Chem Theory Comput, 9, 3527 (2013).
**(Who)**
Who, Author2, Author3, J of Long Range Solvers, 35, 164-177 (2012).
**(Wicaksono1)**
Wicaksono, Sinclair, Militzer, Computational Materials Science, 117, 397-405 (2016).

View File

@ -28,6 +28,28 @@ variable VERBOSE set to 1:
----------
.. _clang-tidy:
Enable static code analysis with clang-tidy
-------------------------------------------
The `clang-tidy tool <https://clang.llvm.org/extra/clang-tidy/>`_ is a
static code analysis tool to diagnose (and potentially fix) typical
programming errors or coding style violations. It has a modular framework
of tests that can be adjusted to help identifying problems before they
become bugs and also assist in modernizing large code bases (like LAMMPS).
It can be enabled for all C++ code with the following CMake flag
.. code-block:: bash
-D ENABLE_CLANG_TIDY=value # value = no (default) or yes
With this flag enabled all source files will be processed twice, first to
be compiled and then to be analyzed. Please note that the analysis can be
significantly more time consuming than the compilation itself.
----------
.. _iwyu_processing:
Report missing and unneeded '#include' statements
@ -447,12 +469,24 @@ The following options are available.
.. code-block:: bash
make check-whitespace # generate coverage report in HTML format
make fix-whitespace # generate coverage report in XML format
make check-permissions # delete folder with HTML format coverage report
make fix-permissions # delete all collected coverage data and HTML output
make check-whitespace # search for files with whitespace issues
make fix-whitespace # correct whitespace issues in files
make check-homepage # search for files with old LAMMPS homepage URLs
make fix-homepage # correct LAMMPS homepage URLs in files
make check-permissions # search for files with permissions issues
make fix-permissions # correct permissions issues in files
For the code in the ``unittest`` tree we are using the `clang-format`
tool (Clang version 8.0 or later is required). If available, the source
code files in the ``unittest`` tree can be updated to conform to the
formatting settings using ``make format-tests``.
For the code in the ``unittest`` and ``src`` trees we are transitioning
to use the `clang-format` tool to assist with having a consistent source
code style. The `clang-format` command bundled with Clang version 8.0
or later is required. The configuration is in files ``.clang-format``
in the respective folders. Since the modifications from `clang-format`
can be significant and - especially for "legacy style code" - also is
not always improving readability, a large number of files currently have
a ``// clang-format off`` at the top, which will disable the processing.
Over time, files will be refactored and updated to that `clang-format`
may be applied to them (at least in part).
If `clang-format` is available, the source code files in the ``unittest``
tree can be updated to conform to the formatting settings using
``make format-tests`` and the files in ``src`` with ``make format-src``.

View File

@ -48,10 +48,13 @@ This is the list of packages that may require additional steps.
* :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>`
@ -454,6 +457,9 @@ They must be specified in uppercase.
* - ZEN2
- HOST
- AMD Zen2 class CPU (AVX 2)
* - ZEN3
- HOST
- AMD Zen3 class CPU (AVX 2)
* - ARMV80
- HOST
- ARMv8.0 Compatible CPU
@ -466,6 +472,9 @@ They must be specified in uppercase.
* - ARMV8_THUNDERX2
- HOST
- ARMv8 Cavium ThunderX2 CPU
* - A64FX
- HOST
- ARMv8.2 with SVE Support
* - WSM
- HOST
- Intel Westmere CPU (SSE 4.2)
@ -538,6 +547,9 @@ They must be specified in uppercase.
* - AMPERE80
- GPU
- NVIDIA Ampere generation CC 8.0 GPU
* - AMPERE86
- GPU
- NVIDIA Ampere generation CC 8.6 GPU
* - VEGA900
- GPU
- AMD GPU MI25 GFX900
@ -546,12 +558,12 @@ They must be specified in uppercase.
- AMD GPU MI50/MI60 GFX906
* - VEGA908
- GPU
- AMD GPU GFX908
- AMD GPU MI100 GFX908
* - INTEL_GEN
- GPU
- Intel GPUs Gen9+
This list was last updated for version 3.3 of the Kokkos library.
This list was last updated for version 3.4.1 of the Kokkos library.
.. tabs::
@ -1247,6 +1259,46 @@ be built for the most part with all major versions of the C++ language.
----------
.. _user-pace:
USER-PACE package
-----------------------------
This package requires a library that can be downloaded and built
in lib/pace or somewhere else, which must be done before building
LAMMPS with this package. The code for the library can be found
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
.. tabs::
.. 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
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
archive with ``md5sum`` you may also need to set ``PACELIB_MD5``
if you provide a different library version than what is downloaded
automatically.
.. tab:: Traditional make
You can download and build the USER-PACE library
in one step from the ``lammps/src`` dir, using these commands,
which invoke the ``lib/pace/Install.py`` script.
.. code-block:: bash
$ make lib-pace # print help message
$ make lib-pace args="-b" # download and build the default version in lib/pace
You should not need to edit the ``lib/pace/Makefile.lammps`` file.
----------
.. _user-plumed:
USER-PLUMED package
@ -1422,6 +1474,60 @@ the HDF5 library.
----------
.. _user-hdnnp:
USER-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``
(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
system for detailed information.
In case of a manual installation of *n2p2* you only need to build the *n2p2* core
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>`__.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_N2P2=value # download n2p2 for build, value = no (default) or yes
-D N2P2_DIR=path # n2p2 base directory (only needed if a custom location)
If ``DOWNLOAD_N2P2`` is set, the *n2p2* library will be downloaded and
built inside the CMake build directory. If the *n2p2* library is already
on your system (in a location CMake cannot find it), set the ``N2P2_DIR``
to path where *n2p2* is located. If *n2p2* is located directly in
``lib/hdnnp/n2p2`` it will be automatically found by CMake.
.. tab:: Traditional make
You can download and build the *n2p2* library manually if you prefer;
follow the instructions in ``lib/hdnnp/README``\ . You can also do it in
one step from the ``lammps/src`` dir, using a command like these, which
simply invoke the ``lib/hdnnp/Install.py`` script with the specified args:
.. code-block:: bash
$ make lib-hdnnp # print help message
$ make lib-hdnnp args="-b" # download and build in lib/hdnnp/n2p2-...
$ make lib-hdnnp args="-b -v 2.1.4" # download and build specific version
$ make lib-hdnnp args="-p /usr/local/n2p2" # use the existing n2p2 installation in /usr/local/n2p2
Note that 3 symbolic (soft) links, ``includelink``, ``liblink`` and
``Makefile.lammps``, will be created in ``lib/hdnnp`` to point to
``n2p2/include``, ``n2p2/lib`` and ``n2p2/lib/Makefile.lammps-extra``,
respectively. When LAMMPS is built in ``src`` it will use these links.
----------
.. _user-intel:
USER-INTEL package
@ -1492,6 +1598,35 @@ TBB and MKL.
----------
.. _user-mdi:
USER-MDI package
-----------------------------
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_MDI=value # download MDI Library for build, value = no (default) or yes
.. tab:: Traditional make
Before building LAMMPS, you must build the MDI Library in
``lib/mdi``\ . You can do this by executing a command like one
of the following from the ``lib/mdi`` directory:
.. code-block:: bash
$ python Install.py -m gcc # build using gcc compiler
$ python Install.py -m icc # build using icc compiler
The build should produce two files: ``lib/mdi/includelink/mdi.h``
and ``lib/mdi/liblink/libmdi.so``\ .
----------
.. _user-mesont:
USER-MESONT package

View File

@ -28,29 +28,18 @@ If you downloaded LAMMPS as a tarball from `the LAMMPS website <lws_>`_,
the html folder and the PDF files should be included.
If you downloaded LAMMPS from the public git repository, then the HTML
and PDF files are not included. Instead you need to create them, in one
of two ways:
a. You can "fetch" the current HTML and PDF files from the LAMMPS web
site. Just type ``make fetch``. This should download a ``html_www``
directory and a ``Manual_www.pdf`` file. Note that if new LAMMPS features
have been added more recently than the date of your LAMMPS version, the
fetched documentation will include those changes (but your source code
will not, unless you update your local repository).
b. You can build the HTML or PDF files yourself, by typing ``make html``
or ``make pdf`` in the ``doc`` folder. This requires various tools
and files. Some of them have to be installed (see below). For the
rest the build process will attempt to download and install them into
a python virtual environment and local folders.
and PDF files are not included. You can build the HTML or PDF files yourself,
by typing ``make html`` or ``make pdf`` in the ``doc`` folder. This requires
various tools and files. Some of them have to be installed (see below). For
the rest the build process will attempt to download and install them into
a python virtual environment and local folders.
A current version of the manual (latest patch release, aka unstable
branch) is is available online at:
`https://lammps.sandia.gov/doc/Manual.html
<https://lammps.sandia.gov/doc/Manual.html>`_ A version of the manual
corresponding to the ongoing development (aka master branch) is
available online at: `https://docs.lammps.org/
<https://docs.lammps.org/>`_
`https://docs.lammps.org/Manual.html <https://docs.lammps.org/Manual.html>`_.
A version of the manual corresponding to the ongoing development (aka master branch)
is available online at: `https://docs.lammps.org/latest/
<https://docs.lammps.org/latest/>`_
Build using GNU make
--------------------
@ -257,4 +246,4 @@ the file ``lammps/doc/utils/sphinx-config/false_positives.txt``.
.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org

View File

@ -30,17 +30,17 @@ 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-INTEL <user-intel>` | :ref:`USER-MOLFILE <user-molfile>` |
+----------------------------------+----------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
| :ref:`USER-NETCDF <user-netcdf>` | :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:`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>` | | |
+--------------------------------------+--------------------------------------+------------------------------------+----------------------------------+--------------------------------+--------------------------------+
The mechanism for including packages is simple but different for CMake
versus make.

View File

@ -67,6 +67,7 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`lattice <lattice>`
* :doc:`log <log>`
* :doc:`mass <mass>`
* :doc:`mdi/engine <mdi_engine>`
* :doc:`message <message>`
* :doc:`minimize <minimize>`
* :doc:`min_modify <min_modify>`

View File

@ -39,6 +39,9 @@ OPT.
* :doc:`ave/time <fix_ave_time>`
* :doc:`aveforce <fix_aveforce>`
* :doc:`balance <fix_balance>`
* :doc:`brownian <fix_brownian>`
* :doc:`brownian/asphere <fix_brownian>`
* :doc:`brownian/sphere <fix_brownian>`
* :doc:`bocs <fix_bocs>`
* :doc:`bond/break <fix_bond_break>`
* :doc:`bond/create <fix_bond_create>`
@ -46,6 +49,7 @@ OPT.
* :doc:`bond/react <fix_bond_react>`
* :doc:`bond/swap <fix_bond_swap>`
* :doc:`box/relax <fix_box_relax>`
* :doc:`charge/regulation <fix_charge_regulation>`
* :doc:`client/md <fix_client_md>`
* :doc:`cmap <fix_cmap>`
* :doc:`colvars <fix_colvars>`
@ -97,6 +101,7 @@ OPT.
* :doc:`lb/viscous <fix_lb_viscous>`
* :doc:`lineforce <fix_lineforce>`
* :doc:`manifoldforce <fix_manifoldforce>`
* :doc:`mdi/engine <fix_mdi_engine>`
* :doc:`meso/move <fix_meso_move>`
* :doc:`momentum (k) <fix_momentum>`
* :doc:`momentum/chunk <fix_momentum>`

View File

@ -26,6 +26,7 @@ OPT.
* :doc:`zero <pair_zero>`
* :doc:`hybrid (k) <pair_hybrid>`
* :doc:`hybrid/overlay (k) <pair_hybrid>`
* :doc:`hybrid/scaled <pair_hybrid>`
* :doc:`kim <pair_kim>`
* :doc:`list <pair_list>`
*
@ -33,7 +34,6 @@ OPT.
*
*
*
*
* :doc:`adp (o) <pair_adp>`
* :doc:`agni (o) <pair_agni>`
* :doc:`airebo (io) <pair_airebo>`
@ -69,6 +69,7 @@ OPT.
* :doc:`comb3 <pair_comb>`
* :doc:`cosine/squared <pair_cosine_squared>`
* :doc:`coul/cut (gko) <pair_coul>`
* :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>`
@ -86,6 +87,8 @@ OPT.
* :doc:`coul/wolf/cs <pair_cs>`
* :doc:`dpd (gio) <pair_dpd>`
* :doc:`dpd/fdt <pair_dpd_fdt>`
* :doc:`dpd/ext <pair_dpd_ext>`
* :doc:`dpd/ext/tstat <pair_dpd_ext>`
* :doc:`dpd/fdt/energy (k) <pair_dpd_fdt>`
* :doc:`dpd/tstat (go) <pair_dpd>`
* :doc:`dsmc <pair_dsmc>`
@ -115,6 +118,7 @@ OPT.
* :doc:`gw/zbl <pair_gw>`
* :doc:`hbond/dreiding/lj (o) <pair_hbond_dreiding>`
* :doc:`hbond/dreiding/morse (o) <pair_hbond_dreiding>`
* :doc:`hdnnp <pair_hdnnp>`
* :doc:`ilp/graphene/hbn <pair_ilp_graphene_hbn>`
* :doc:`kolmogorov/crespi/full <pair_kolmogorov_crespi_full>`
* :doc:`kolmogorov/crespi/z <pair_kolmogorov_crespi_z>`
@ -168,7 +172,7 @@ OPT.
* :doc:`lj/sdk/coul/long (go) <pair_sdk>`
* :doc:`lj/sdk/coul/msm (o) <pair_sdk>`
* :doc:`lj/sf/dipole/sf (go) <pair_dipole>`
* :doc:`lj/smooth (o) <pair_lj_smooth>`
* :doc:`lj/smooth (go) <pair_lj_smooth>`
* :doc:`lj/smooth/linear (o) <pair_lj_smooth_linear>`
* :doc:`lj/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>`
* :doc:`lj96/cut (go) <pair_lj96>`
@ -215,6 +219,7 @@ OPT.
* :doc:`oxrna2/stk <pair_oxrna2>`
* :doc:`oxrna2/xstk <pair_oxrna2>`
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
* :doc:`pace <pair_pace>`
* :doc:`peri/eps <pair_peri>`
* :doc:`peri/lps (o) <pair_peri>`
* :doc:`peri/pmb (o) <pair_peri>`
@ -222,6 +227,7 @@ OPT.
* :doc:`polymorphic <pair_polymorphic>`
* :doc:`python <pair_python>`
* :doc:`quip <pair_quip>`
* :doc:`rann <pair_rann>`
* :doc:`reax/c (ko) <pair_reaxc>`
* :doc:`rebo (io) <pair_airebo>`
* :doc:`resquared (go) <pair_resquared>`

View File

@ -49,8 +49,8 @@ underscore character '_' to separate words. Outside of bundled libraries
which may have different conventions, all C and C++ header files have a
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
``.c`` extension. A small number of C++ classes and utility functions
are implemented with only a ``.h`` file. Examples are the Pointer class
or the MathVec functions.
are implemented with only a ``.h`` file. Examples are the Pointers and
Commands classes or the MathVec functions.
Class topology
--------------
@ -144,7 +144,7 @@ implement specific commands that can be invoked before, after, or in
between runs. For these an instance of the class is created, its
command() method called and then, after completion, the class instance
deleted. Examples for this are the create_box, create_atoms, minimize,
run, or velocity command styles.
run, set, or velocity command styles.
For all those ``styles`` certain naming conventions are employed: for
the fix nve command the class is called FixNVE and the source files are
@ -175,11 +175,11 @@ follows:
- The Input class reads and processes input input strings and files,
stores variables, and invokes :doc:`commands <Commands_all>`.
- As discussed above, command style classes are directly derived from
the Pointers class. They provide input script commands that perform
one-time operations before/after/between simulations or which invoke a
simulation. They are instantiated from within the Input class,
invoked, then immediately destructed.
- Command style classes are derived from the Command class. They provide
input script commands that perform one-time operations
before/after/between simulations or which invoke a simulation. They
are usually instantiated from within the Input class, its ``command``
method invoked, and then immediately destructed.
- The Finish class is instantiated to print statistics to the screen
after a simulation is performed, by commands like run and minimize.

View File

@ -59,31 +59,25 @@ Members of ``lammpsplugin_t``
* - author
- String with the name and email of the author
* - creator.v1
- Pointer to factory function for pair, bond, angle, dihedral, or improper styles
- Pointer to factory function for pair, bond, angle, dihedral, improper or command styles
* - creator.v2
- Pointer to factory function for compute, fix, or region styles
* - creator.v3
- Pointer to factory function for command styles
* - handle
- Pointer to the open DSO file handle
Only one of the three alternate creator entries can be used at a time
and which of those is determined by the style of plugin. The "creator.v1"
element is for factory functions of supported styles computing forces (i.e.
pair, bond, angle, dihedral, or improper styles) and the function takes
as single argument the pointer to the LAMMPS instance. The factory function
is cast to the ``lammpsplugin_factory1`` type before assignment. The
"creator.v2" element is for factory functions creating an instance of
a fix, compute, or region style and takes three arguments: a pointer to
the LAMMPS instance, an integer with the length of the argument list and
a ``char **`` pointer to the list of arguments. The factory function pointer
needs to be cast to the ``lammpsplugin_factory2`` type before assignment.
The "creator.v3" element takes the same arguments as "creator.v3" but is
specific to creating command styles: the factory function has to instantiate
the command style locally passing the LAMMPS pointer as argument and then
call its "command" member function with the number and list of arguments.
The factory function pointer needs to be cast to the
``lammpsplugin_factory3`` type before assignment.
and which of those is determined by the style of plugin. The
"creator.v1" element is for factory functions of supported styles
computing forces (i.e. command, pair, bond, angle, dihedral, or
improper styles) and the function takes as single argument the pointer
to the LAMMPS instance. The factory function is cast to the
``lammpsplugin_factory1`` type before assignment. The "creator.v2"
element is for factory functions creating an instance of a fix, compute,
or region style and takes three arguments: a pointer to the LAMMPS
instance, an integer with the length of the argument list and a ``char
**`` pointer to the list of arguments. The factory function pointer
needs to be cast to the ``lammpsplugin_factory2`` type before
assignment.
Pair style example
^^^^^^^^^^^^^^^^^^
@ -123,12 +117,12 @@ function would look like this:
The factory function in this example is called ``morse2creator()``. It
receives a pointer to the LAMMPS class as only argument and thus has to
be assigned to the *creator.v1* member of the plugin struct and cast to the
``lammpsplugin_factory1`` pointer type. It returns a
be assigned to the *creator.v1* member of the plugin struct and cast to
the ``lammpsplugin_factory1`` function pointer type. It returns a
pointer to the allocated class instance derived from the ``Pair`` class.
This function may be declared static to avoid clashes with other plugins.
The name of the derived class, ``PairMorse2``, must be unique inside
the entire LAMMPS executable.
This function may be declared static to avoid clashes with other
plugins. The name of the derived class, ``PairMorse2``, however must be
unique inside the entire LAMMPS executable.
Fix style example
^^^^^^^^^^^^^^^^^
@ -169,9 +163,9 @@ Below is an example for that:
Command style example
^^^^^^^^^^^^^^^^^^^^^
For command styles there is a third variant of factory function as
Command styles also use the first variant of factory function as
demonstrated in the following example, which also shows that the
implementation of the plugin class may also be within the same
implementation of the plugin class may be within the same source
file as the plugin interface code:
.. code-block:: C++
@ -180,15 +174,15 @@ file as the plugin interface code:
#include "comm.h"
#include "error.h"
#include "pointers.h"
#include "command.h"
#include "version.h"
#include <cstring>
namespace LAMMPS_NS {
class Hello : protected Pointers {
class Hello : public Command {
public:
Hello(class LAMMPS *lmp) : Pointers(lmp) {};
Hello(class LAMMPS *lmp) : Command(lmp) {};
void command(int, char **);
};
}
@ -202,10 +196,9 @@ file as the plugin interface code:
utils::logmesg(lmp,fmt::format("Hello, {}!\n",argv[0]));
}
static void hellocreator(LAMMPS *lmp, int argc, char **argv)
static void hellocreator(LAMMPS *lmp)
{
Hello hello(lmp);
hello.command(argc,argv);
return new Hello(lmp);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
@ -216,9 +209,9 @@ file as the plugin interface code:
plugin.version = LAMMPS_VERSION;
plugin.style = "command";
plugin.name = "hello";
plugin.info = "Hello world command v1.0";
plugin.info = "Hello world command v1.1";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v3 = (lammpsplugin_factory3 *) &hellocreator;
plugin.creator.v1 = (lammpsplugin_factory1 *) &hellocreator;
plugin.handle = handle;
(*register_plugin)(&plugin,lmp);
}

View File

@ -9,14 +9,29 @@ reading or writing to files with error checking or translation of
strings into specific types of numbers with checking for validity. This
reduces redundant implementations and encourages consistent behavior.
I/O with status check
^^^^^^^^^^^^^^^^^^^^^
I/O with status check and similar functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These are wrappers around the corresponding C library calls like
``fgets()`` or ``fread()``. They will check if there were errors
on reading or an unexpected end-of-file state was reached. In that
case, the functions will stop the calculation with an error message,
indicating the name of the problematic file, if possible.
The the first two functions are wrappers around the corresponding C
library calls ``fgets()`` or ``fread()``. They will check if there
were errors on reading or an unexpected end-of-file state was reached.
In that case, the functions will stop with an error message, indicating
the name of the problematic file, if possible unless the *error* argument
is a NULL pointer.
The :cpp:func:`fgets_trunc` function will work similar for ``fgets()``
but it will read in a whole line (i.e. until the end of line or end
of file), but store only as many characters as will fit into the buffer
including a final newline character and the terminating NULL byte.
If the line in the file is longer it will thus be truncated in the buffer.
This function is used by :cpp:func:`read_lines_from_file` to read individual
lines but make certain they follow the size constraints.
The :cpp:func:`read_lines_from_file` function will read the requested
number of lines of a maximum length into a buffer and will return 0
if successful or 1 if not. It also guarantees that all lines are
terminated with a newline character and the entire buffer with a
NULL character.
----------
@ -26,6 +41,12 @@ indicating the name of the problematic file, if possible.
.. doxygenfunction:: sfread
:project: progguide
.. doxygenfunction:: fgets_trunc
:project: progguide
.. doxygenfunction:: read_lines_from_file
:project: progguide
----------
String to number conversions with validity check
@ -164,7 +185,10 @@ Argument processing
Convenience functions
^^^^^^^^^^^^^^^^^^^^^
.. doxygenfunction:: logmesg
.. doxygenfunction:: logmesg(LAMMPS *lmp, const S &format, Args&&... args)
:project: progguide
.. doxygenfunction:: logmesg(LAMMPS *lmp, const std::string &mesg)
:project: progguide
.. doxygenfunction:: getsyserror

View File

@ -5,8 +5,8 @@ If you are confident that you have found a bug in LAMMPS, please follow
the steps outlined below:
* Check the `New features and bug fixes
<https://lammps.sandia.gov/bug.html>`_ section of the `LAMMPS WWW site
<https://lammps.sandia.gov>`_ or the
<https://www.lammps.org/bug.html>`_ section of the `LAMMPS WWW site
<https://www.lammps.org>`_ or the
`GitHub Releases page <https://github.com/lammps/lammps/releases>`_ to
see if the bug has already been addressed in a patch release.
* Check that your issue can be reproduced with the latest development
@ -17,7 +17,7 @@ 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://lammps.sandia.gov/mail.html>`_
* Check the `mailing list archives <https://www.lammps.org/mail.html>`_
to see if the issue has been discussed before.
If none of these steps yields any useful information, please file a new

View File

@ -39,7 +39,7 @@ figure out your physics or numerical mistakes, like choosing too big a
timestep, specifying erroneous force field coefficients, or putting 2
atoms on top of each other! If you run into errors that LAMMPS
does not catch that you think it should flag, please send an email to
the `developers <https://lammps.sandia.gov/authors.html>`_.
the `developers <https://www.lammps.org/authors.html>`_.
If you get an error message about an invalid command in your input
script, you can determine what command is causing the problem by

View File

@ -3871,7 +3871,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Fix orient/fcc found self twice*
The neighbor lists used by fix orient/fcc are messed up. If this
error occurs, it is likely a bug, so send an email to the
`developers <https://lammps.sandia.gov/authors.html>`_.
`developers <https://www.lammps.org/authors.html>`_.
*Fix peri neigh does not exist*
Somehow a fix that the pair style defines has been deleted.

View File

@ -18,7 +18,7 @@ files and image files.
If you uncomment the :doc:`dump <dump>` command in the input script, a
text dump file will be produced, which can be animated by various
`visualization programs <https://lammps.sandia.gov/viz.html>`_.
`visualization programs <https://www.lammps.org/viz.html>`_.
If you uncomment the :doc:`dump image <dump>` command in the input
script, and assuming you have built LAMMPS with a JPG library, JPG
@ -27,7 +27,7 @@ be quickly post-processed into a movie using commands described on the
:doc:`dump image <dump_image>` doc page.
Animations of many of the examples can be viewed on the Movies section
of the `LAMMPS web site <https://lammps.sandia.gov/movies.html>`_.
of the `LAMMPS web site <https://www.lammps.org/movies.html>`_.
There are two kinds of sub-directories in the examples folder. Lower
case named directories contain one or a few simple, quick-to-run
@ -108,6 +108,8 @@ Lowercase directories
+-------------+------------------------------------------------------------------+
| msst | MSST shock dynamics |
+-------------+------------------------------------------------------------------+
| multi | multi neighboring for systems with large interaction disparities |
+-------------+------------------------------------------------------------------+
| nb3b | use of non-bonded 3-body harmonic pair style |
+-------------+------------------------------------------------------------------+
| neb | nudged elastic band (NEB) calculation for barrier finding |
@ -164,7 +166,7 @@ Here is how you can run and visualize one of the sample problems:
Running the simulation produces the files *dump.indent* and
*log.lammps*\ . You can visualize the dump file of snapshots with a
variety of third-party tools highlighted on the
`Visualization <https://lammps.sandia.gov/viz.html>`_ page of the LAMMPS
`Visualization <https://www.lammps.org/viz.html>`_ page of the LAMMPS
web site.
If you uncomment the :doc:`dump image <dump_image>` line(s) in the input

View File

@ -3,7 +3,7 @@ Howto discussions
These doc pages describe how to perform various tasks with LAMMPS,
both for users and developers. The
`glossary <https://lammps.sandia.gov/glossary.html>`_ website page also lists MD
`glossary <https://www.lammps.org/glossary.html>`_ website page also lists MD
terminology with links to corresponding LAMMPS manual pages. The
example input scripts included in the examples directory of the LAMMPS
distribution and highlighted on the :doc:`Examples <Examples>` doc page
@ -23,6 +23,7 @@ General howto
Howto_library
Howto_couple
Howto_client_server
Howto_mdi
Settings howto
==============

View File

@ -9,6 +9,8 @@ USER-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
----------
**Overview of Drude induced dipoles**

132
doc/src/Howto_mdi.rst Normal file
View File

@ -0,0 +1,132 @@
Using LAMMPS with the MDI library for code coupling
===================================================
.. note::
This Howto doc 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"
and sends request messages (data) to a "server" code. The server
responds to each request with a reply message. This enables the two
codes to work in tandem to perform a simulation. LAMMPS can act as
either a client or server code; it does this by using the `MolSSI
Driver Interface (MDI) library
<https://molssi-mdi.github.io/MDI_Library/html/index.html>`_,
developed by the `Molecular Sciences Software Institute (MolSSI)
<https://molssi.org>`_.
Alternate methods for code coupling with LAMMPS are described on the
:doc:`Howto couple <Howto_couple>` doc page.
Some advantages of client/server coupling are that the two codes can run
as stand-alone executables; they need not be linked together. Thus
neither code needs to have a library interface. This also makes it easy
to run the two codes on different numbers of processors. If a message
protocol (format and content) is defined for a particular kind of
simulation, then in principle any code which implements the client-side
protocol can be used in tandem with any code which implements the
server-side protocol. Neither code needs to know what specific other
code it is working with.
In MDI nomenclature, a client code is the "driver", and a server code is
an "engine". One driver code can communicate with one or more instances
of one or more engine codes. Driver and engine codes can be written in
any language: C, C++, Fortran, Python, etc.
In addition to allowing driver and engine(s) running to run as
stand-alone executables, MDI also enables a server code to be a
"plugin" to the client code. In this scenario, server code(s) are
compiled as shared libraries, and one (or more) instances of the
server are instantiated by the driver code. If the driver code runs
in parallel, it can split its MPI communicator into multiple
sub-communicators, and launch each plugin engine instance on a
sub-communicator. Driver processors in that sub-communicator exchange
messages with that engine instance, and can also send MPI messages to
other processors in the driver. The driver code can also destroy
engine instances and re-instantiate them.
The way that a driver communicates with an engine is by making
MDI_Send() and MDI_Recv() calls, which are conceptually similar to
MPI_Send() and MPI_Recv() calls. Each send or receive has a string
which identifies the command name, and optionally some data, which can
be a single value or vector of values of any data type. Inside the
MDI library, data is exchanged between the driver and engine via MPI
calls or sockets. This a run-time choice by the user.
-------------
As an example, LAMMPS and the ``pw.x`` command from Quantum Espresso (a
suite of quantum DFT codes), can work together via the MDI library to
perform an ab initio MD (AIMD) simulation, where LAMMPS runs an MD
simulation and sends a message each timestep to ``pw.x`` asking it to
compute quantum forces on the current configuration of atoms. Here is
how the 2 codes are launched to communicate by MPI:
.. code-block:: bash
% mpirun -np 2 lmp_mpi -mdi "-role DRIVER -name d -method MPI" \
-in in.aimd : -np 16 pw.x -in qe.in -mdi "-role ENGINE -name e -method MPI"
In this case LAMMPS runs on 2 processors (MPI tasks), ``pw.x`` runs on 16
processors.
Here is how the 2 codes are launched to communicate by sockets:
.. code-block:: bash
% mpirun -np 2 lmp_mpi -mdi "-role DRIVER -name d -method TCP -port 8021" -in in.aimd
% mpirun -np 16 pw.x -in qe.in -mdi "-role ENGINE -name e -method TCP -port 8021 -hostname localhost"
These commands could be issued in different windows on a desktop
machine. Or in the same window, if the first command is ended with
"&" so as to run in the background. If "localhost" is replaced by an
IP address, ``pw.x`` could be run on another machine on the same network, or
even on another machine across the country.
After both codes initialize themselves to model the same system, this is
what occurs each timestep:
* LAMMPS send a ">COORDS" message to ``pw.x`` with a 3*N vector of current atom coords
* ``pw.x`` receives the message/coords and computes quantum forces on all the atoms
* LAMMPS send a "<FORCES" message to ``pw.x`` and waits for the result
* ``pw.x`` receives the message (after its computation finishes) and sends a 3*N vector of forces
* LAMMPS receives the forces and time integrates to complete a single timestep
-------------
Examples scripts for using LAMMPS as an MDI engine are in the
examples/mdi directory. See the README file in that directory for
instructions on how to run the examples.
.. note::
Work is underway to add commands that allow LAMMPS to be used as an
MDI driver, e.g. for the AIMD example discussed above. Example
scripts for this usage mode will be added the same directory when
available.
If LAMMPS is used as a stand-alone engine it should set up the system
it will be modeling in its input script, then invoke the
:doc:`mdi/engine <mdi_engine>` command. This will put LAMMPS into
"engine mode" where it waits for messages and data from the driver.
When the driver sends an "EXIT" command, LAMMPS will exit engine mode
and the input script will continue.
If LAMMPS is used as a plugin engine it operates the same way, except
that the driver will pass LAMMPS an input script to initialize itself.
Upon receiving the "EXIT" command, LAMMPS will exit engine mode and the
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
a list of these.
If those commands are not sufficient for a user-developed driver to use
LAMMPS as an engine, then new commands can be easily added. See these
two files which implement the definition of MDI commands and the logic
for responding to them:
* src/MDI/mdi_engine.cpp
* src/MDI/fix_mdi_engine.cpp

View File

@ -21,8 +21,8 @@ orientations and their associated inter-atomic distances.
The command :doc:`fix precession/spin <fix_precession_spin>` allows to
apply a constant magnetic torque on all the spins in the system. This
torque can be an external magnetic field (Zeeman interaction), or an
uniaxial magnetic anisotropy.
torque can be an external magnetic field (Zeeman interaction), and an
uniaxial or cubic magnetic anisotropy.
A Langevin thermostat can be applied to those magnetic spins using
:doc:`fix langevin/spin <fix_langevin_spin>`. Typically, this thermostat

View File

@ -201,7 +201,7 @@ build configuration and any binaries generated during compilation.
There are countless ways to compile LAMMPS. It is beyond the scope of this
tutorial. If you want to find out more about what can be enabled, please
consult the extensive `documentation <https://lammps.sandia.gov/doc/Build_cmake.html>`_.
consult the extensive `documentation <https://docs.lammps.org/Build_cmake.html>`_.
To compile a minimal version of LAMMPS, we're going to use a preset.
Presets are a way to specify a collection of CMake options using a file.

View File

@ -78,7 +78,7 @@ this is as follows.
$ git checkout tagID
Stable versions and what tagID to use for a particular stable version
are discussed on `this page <https://lammps.sandia.gov/bug.html#version>`_.
are discussed on `this page <https://www.lammps.org/bug.html#version>`_.
Note that this command will print some warnings, because in order to get
back to the latest revision and to be able to update with ``git pull``
again, you will need to do ``git checkout unstable`` (or

View File

@ -10,7 +10,7 @@ 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://lammps.sandia.gov/bug.html>`_
`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

View File

@ -4,10 +4,10 @@ Download source and documentation as a tarball
You can download a current LAMMPS tarball from the `download page <download_>`_
of the `LAMMPS website <lws_>`_.
.. _download: https://lammps.sandia.gov/download.html
.. _bug: https://lammps.sandia.gov/bug.html
.. _older: https://lammps.sandia.gov/tars
.. _lws: https://lammps.sandia.gov
.. _download: https://www.lammps.org/download.html
.. _bug: https://www.lammps.org/bug.html
.. _older: https://www.lammps.org/tars
.. _lws: https://www.lammps.org
You have two choices of tarballs, either the most recent stable
release or the most current patch release. Stable releases occur a

View File

@ -11,14 +11,14 @@ University:
* Richard Berger, richard.berger at temple.edu
.. _sjp: http://www.cs.sandia.gov/~sjplimp
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
Past developers include Paul Crozier and Mark Stevens, both at Sandia,
and Ray Shan, now at Materials Design.
----------
The `Authors page <https://lammps.sandia.gov/authors.html>`_ of the
The `Authors page <https://www.lammps.org/authors.html>`_ of the
`LAMMPS website <lws_>`_ has a comprehensive list of all the individuals
who have contributed code for a new feature or command or tool to
LAMMPS.
@ -46,7 +46,7 @@ general-purpose as it is without their expertise and efforts.
----------
As discussed on the `History page <https://lammps.sandia.gov/history.html>`_ of the website, LAMMPS
As discussed on the `History page <https://www.lammps.org/history.html>`_ of the website, LAMMPS
originated as a cooperative project between DOE labs and industrial
partners. Folks involved in the design and testing of the original
version of LAMMPS were the following:

View File

@ -38,8 +38,8 @@ In addition there are DOIs for individual stable releases. Currently there are:
Home page
^^^^^^^^^
The LAMMPS website at `https://lammps.sandia.gov/
<https://lammps.sandia.gov>`_ is the canonical location for information
The LAMMPS website at `https://www.lammps.org/
<https://www.lammps.org>`_ is the canonical location for information
about LAMMPS and its features.
Citing contributions

View File

@ -33,7 +33,7 @@ Here are suggestions on how to perform these tasks:
linear bead-spring polymer chains. The moltemplate program is a true
molecular builder that will generate complex molecular models. See
the :doc:`Tools <Tools>` doc page for details on tools packaged with
LAMMPS. The `Pre/post processing page <http:/lammps.sandia.gov/prepost.html>`_ of the LAMMPS website
LAMMPS. The `Pre/post processing page <http:/www.lammps.org/prepost.html>`_ of the LAMMPS website
describes a variety of third party tools for this task. Furthermore,
some LAMMPS internal commands allow to reconstruct, or selectively add
topology information, as well as provide the option to insert molecule
@ -67,7 +67,7 @@ Here are suggestions on how to perform these tasks:
them to an external program, `FFmpeg <https://www.ffmpeg.org>`_ to generate
movies from them. For high-quality, interactive visualization there are
many excellent and free tools available. See the
`Visualization Tools <https://lammps.sandia.gov/viz.html>`_ page of the
`Visualization Tools <https://www.lammps.org/viz.html>`_ page of the
LAMMPS website for
visualization packages that can process LAMMPS output data.
* **Plotting:** See the next bullet about Pizza.py as well as the

View File

@ -2,18 +2,20 @@ LAMMPS open-source license
--------------------------
LAMMPS is a freely-available open-source code, distributed under the
terms of the `GNU Public License <gnu_>`_, which means you can use or
modify the code however you wish.
terms of the `GNU Public License Version 2 <gpl_>`_, which means you can
use or modify the code however you wish for your own purposes, but have
to adhere to certain rules when redistributing it or software derived
from it or that includes parts of it.
LAMMPS comes with no warranty of any kind. As each source file states
in its header, it is a copyrighted code that is distributed free-of-
charge, under the terms of the `GNU Public License <gnu_>`_ (GPL). This
is often referred to as open-source distribution - see
`www.gnu.org <gnuorg_>`_ or `www.opensource.org <opensource_>`_. The legal
text of the GPL is in the LICENSE file included in the LAMMPS
charge, under the terms of the `GNU Public License Version 2 <gpl_>`_
(GPLv2). This is often referred to as open-source distribution - see
`www.gnu.org <gnuorg_>`_ or `www.opensource.org <opensource_>`_. The
legal text of the GPL is in the LICENSE file included in the LAMMPS
distribution.
.. _gnu: http://www.gnu.org/copyleft/gpl.html
.. _gpl: https://github.com/lammps/lammps/blob/master/LICENSE
.. _gnuorg: http://www.gnu.org
@ -24,14 +26,14 @@ Here is a summary of what the GPL means for LAMMPS users:
(1) Anyone is free to use, modify, or extend LAMMPS in any way they
choose, including for commercial purposes.
(2) If you distribute a modified version of LAMMPS, it must remain
open-source, meaning you distribute it under the terms of the GPL.
You should clearly annotate such a code as a derivative version of
LAMMPS.
(2) If you **distribute** a modified version of LAMMPS, it must remain
open-source, meaning you distribute **all** of it under the terms of
the GPL. You should clearly annotate such a code as a derivative version
of LAMMPS.
(3) If you release any code that includes LAMMPS source code, then it
must also be open-sourced, meaning you distribute it under the terms
of the GPL.
(3) If you release any code that includes or uses LAMMPS source code,
then it must also be open-sourced, meaning you distribute it under
the terms of the GPL.
(4) If you give LAMMPS files to someone else, the GPL LICENSE file and
source file headers (including the copyright and GPL notices) should

View File

@ -16,10 +16,10 @@ shared-memory boxes and distributed-memory clusters and
supercomputers.
.. _mpi: https://en.wikipedia.org/wiki/Message_Passing_Interface
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
LAMMPS is written in C++. Earlier versions were written in F77 and
F90. See the `History page <https://lammps.sandia.gov/history.html>`_ of
F90. See the `History page <https://www.lammps.org/history.html>`_ of
the website for details. All versions can be downloaded from the
`LAMMPS website <lws_>`_.

View File

@ -5,31 +5,31 @@ The `LAMMPS website <lws_>`_ has a variety of additional info about
LAMMPS, beyond what is in this manual. Some other useful resources
available online are listed below.
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
* `Brief intro and recently added significant features <lws_>`_
* `List of features <https://lammps.sandia.gov/doc/Intro_features.html>`_
* `List of non-features <https://lammps.sandia.gov/doc/Intro_nonfeatures.html>`_
* `Recent bug fixes and new features <https://lammps.sandia.gov/bug.html>`_
* `List of features <https://docs.lammps.org/Intro_features.html>`_
* `List of non-features <https://docs.lammps.org/Intro_nonfeatures.html>`_
* `Recent bug fixes and new features <https://www.lammps.org/bug.html>`_
* `Download info <https://lammps.sandia.gov/download.html>`_
* `Download info <https://www.lammps.org/download.html>`_
* `GitHub site <https://github.com/lammps/lammps>`_
* `SourceForge site <https://sourceforge.net/projects/lammps>`_
* `LAMMPS open-source license <https://lammps.sandia.gov/doc/Intro_opensource.html>`_
* `LAMMPS open-source license <https://docs.lammps.org/Intro_opensource.html>`_
* `Glossary of terms relevant to LAMMPS <https://lammps.sandia.gov/glossary.html>`_
* `LAMMPS highlights with images <https://lammps.sandia.gov/pictures.html>`_
* `LAMMPS highlights with movies <https://lammps.sandia.gov/movies.html>`_
* `Mail list <https://lammps.sandia.gov/mail.html>`_
* `Workshops <https://lammps.sandia.gov/workshops.html>`_
* `Tutorials <https://lammps.sandia.gov/tutorials.html>`_
* `Glossary of terms relevant to LAMMPS <https://www.lammps.org/glossary.html>`_
* `LAMMPS highlights with images <https://www.lammps.org/pictures.html>`_
* `LAMMPS highlights with movies <https://www.lammps.org/movies.html>`_
* `Mail list <https://www.lammps.org/mail.html>`_
* `Workshops <https://www.lammps.org/workshops.html>`_
* `Tutorials <https://www.lammps.org/tutorials.html>`_
* `Pre- and post-processing tools for LAMMPS <https://lammps.sandia.gov/prepost.html>`_
* `Other software usable with LAMMPS <https://lammps.sandia.gov/offsite.html>`_
* `Viz tools usable with LAMMPS <https://lammps.sandia.gov/viz.html>`_
* `Pre- and post-processing tools for LAMMPS <https://www.lammps.org/prepost.html>`_
* `Other software usable with LAMMPS <https://www.lammps.org/offsite.html>`_
* `Viz tools usable with LAMMPS <https://www.lammps.org/viz.html>`_
* `Benchmark performance <https://lammps.sandia.gov/bench.html>`_
* `Publications that have cited LAMMPS <https://lammps.sandia.gov/papers.html>`_
* `Authors of LAMMPS <https://lammps.sandia.gov/authors.html>`_
* `History of LAMMPS development <https://lammps.sandia.gov/history.html>`_
* `Funding for LAMMPS <https://lammps.sandia.gov/funding.html>`_
* `Benchmark performance <https://www.lammps.org/bench.html>`_
* `Publications that have cited LAMMPS <https://www.lammps.org/papers.html>`_
* `Authors of LAMMPS <https://www.lammps.org/authors.html>`_
* `History of LAMMPS development <https://www.lammps.org/history.html>`_
* `Funding for LAMMPS <https://www.lammps.org/funding.html>`_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

@ -15,6 +15,8 @@ This section documents the following functions:
- :cpp:func:`lammps_config_package_count`
- :cpp:func:`lammps_config_package_name`
- :cpp:func:`lammps_config_accelerator`
- :cpp:func:`lammps_has_gpu_device`
- :cpp:func:`lammps_gpu_device_info`
- :cpp:func:`lammps_has_style`
- :cpp:func:`lammps_style_count`
- :cpp:func:`lammps_style_name`
@ -132,6 +134,16 @@ approach.
-----------------------
.. doxygenfunction:: lammps_has_gpu_device
:project: progguide
-----------------------
.. doxygenfunction:: lammps_get_gpu_device_info
:project: progguide
-----------------------
.. doxygenfunction:: lammps_has_style
:project: progguide

View File

@ -1,6 +1,6 @@
######################################
LAMMPS version |version| Documentation
######################################
########################################
LAMMPS Documentation (|version| version)
########################################
LAMMPS stands for **L**\ arge-scale **A**\ tomic/**M**\ olecular
**M**\ assively **P**\ arallel **S**\ imulator.
@ -11,11 +11,12 @@ computers. It was developed originally at Sandia National
Laboratories, a US Department of Energy facility. The majority of
funding for LAMMPS has come from the US Department of Energy (DOE).
LAMMPS is an open-source code, distributed freely under the terms of
the GNU Public License (GPL).
the GNU Public License Version 2 (GPLv2).
The `LAMMPS website <lws_>`_ has a variety of information about the
code. It includes links to an on-line version of this manual, a
`mailing list <https://lammps.sandia.gov/mail.html>`_ where users can
`mailing list <https://www.lammps.org/mail.html>`_ and
`online forum <https://www.lammps.org/forum.html>`_ where users can
post questions, and a `GitHub site <https://github.com/lammps/lammps>`_
where all LAMMPS development is coordinated.
@ -30,11 +31,13 @@ please :ref:`see this note <webbrowser>`.
-----------
The manual is organized in two parts:
The manual is organized in three parts:
1) the :ref:`User Guide <user_documentation>` for how to install
and use LAMMPS and 2) the :ref:`Programmer Guide <programmer_documentation>`
and use LAMMPS, 2) the :ref:`Programmer Guide <programmer_documentation>`
for how to write programs using the LAMMPS library from different
programming languages and how to modify and extend LAMMPS.
programming languages and how to modify and extend LAMMPS, and 3) the
:ref:`Command Reference <command_reference>` which includes detailed
descriptions of all commands included in the LAMMPS code.
.. only:: html
@ -42,7 +45,7 @@ programming languages and how to modify and extend LAMMPS.
:doc:`this page <Commands_all>` since it gives quick access
the documentation for all LAMMPS commands.
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
----------
@ -89,10 +92,15 @@ Programmer Guide
Modify
Developer
*****************
Command Reference
*****************
.. _command_reference:
.. toctree::
:caption: Index
:name: index
:hidden:
:name: reference
:maxdepth: 1
:caption: Command Reference
commands_list
fixes
@ -118,10 +126,10 @@ Indices and tables
.. admonition:: Web Browser Compatibility
The HTML version of the manual makes use of advanced features present
int "modern" web browsers. This can lead to incompatibilities with older
in "modern" web browsers. This can lead to incompatibilities with older
web browsers (released more than 4 years ago) and specific vendor browsers
(e.g. Internet Explorer on Windows; Microsoft Edge works well though)
where parts of the pages are not rendered as expected (e.g. the layout is
broken or mathematical expressions not typeset). In that case we
recommend to install/use a different/newer web browser or use
the `PDF version of the manual <https://lammps.sandia.gov/doc/Manual.pdf>`_.
the `PDF version of the manual <https://docs.lammps.org/Manual.pdf>`_.

View File

@ -5,7 +5,7 @@ The LAMMPS "version" is the date when it was released, such as 1 May
2014. LAMMPS is updated continuously. Whenever we fix a bug or add a
feature, we release it in the next *patch* release, which are
typically made every couple of weeks. Info on patch releases are on
`this website page <https://lammps.sandia.gov/bug.html>`_. Every few
`this website page <https://www.lammps.org/bug.html>`_. Every few
months, the latest patch release is subjected to more thorough testing
and labeled as a *stable* version.

View File

@ -1,14 +1,15 @@
Input script command style
==========================
New commands can be added to LAMMPS input scripts by adding new
classes that have a "command" method. For example, the create_atoms,
read_data, velocity, and run commands are all implemented in this
fashion. When such a command is encountered in the LAMMPS input
script, LAMMPS simply creates a class with the corresponding name,
invokes the "command" method of the class, and passes it the arguments
from the input script. The command method can perform whatever
operations it wishes on LAMMPS data structures.
New commands can be added to LAMMPS input scripts by adding new classes
that are derived from the Command class and thus must have a "command"
method. For example, the create_atoms, read_data, velocity, and run
commands are all implemented in this fashion. When such a command is
encountered in the LAMMPS input script, LAMMPS simply creates a class
instance with the corresponding name, invokes the "command" method of
the class, and passes it the arguments from the input script. The
command method can perform whatever operations it wishes on LAMMPS data
structures.
The single method your new class must define is as follows:

View File

@ -2,7 +2,7 @@ Submitting new features for inclusion in LAMMPS
===============================================
We encourage users to submit new features or modifications for LAMMPS to
`the core developers <https://lammps.sandia.gov/authors.html>`_ so they
`the core developers <https://www.lammps.org/authors.html>`_ so they
can be added to the LAMMPS distribution. The preferred way to manage and
coordinate this is via the LAMMPS project on `GitHub
<https://github.com/lammps/lammps>`_. Please see the :doc:`GitHub
@ -10,15 +10,15 @@ Tutorial <Howto_github>` for a demonstration on how to do that. An
alternative is to contact the LAMMPS developers or the indicated
developer of a package or feature directly and send in your contribution
via e-mail, but that can add a significant delay on getting your
contribution included, depending on how busy the developer is you
contact, how complex a task it would be to integrate that code, and how
contribution included, depending on how busy the respective developer
is, how complex a task it would be to integrate that code, and how
many - if any - changes are required before the code can be included.
For any larger modifications or programming project, you are encouraged
to contact the LAMMPS developers ahead of time, in order to discuss
implementation strategies and coding guidelines, that will make it
easier to integrate your contribution and result in less work for
everybody involved. You are also encouraged to search through the list
to contact the LAMMPS developers ahead of time in order to discuss
implementation strategies and coding guidelines. That will make it
easier to integrate your contribution and results in less work for
everybody involved. You are also encouraged to search through the list
of `open issues on GitHub <https://github.com/lammps/lammps/issues>`_
and submit a new issue for a planned feature, so you would not duplicate
the work of others (and possibly get scooped by them) or have your work
@ -31,21 +31,22 @@ send an e-mail to ``slack@lammps.org`` explaining what part of LAMMPS
you are working on. Only discussions related to LAMMPS development are
tolerated, so this is **NOT** for people that look for help with compiling,
installing, or using LAMMPS. Please contact the `lammps-users mailing
list <https://lammps.sandia.gov/mail.html>`_ for those purposes instead.
list <https://www.lammps.org/mail.html>`_ for those purposes instead.
How quickly your contribution will be integrated depends largely on how
much effort it will cause to integrate and test it, how much it requires
changes to the core codebase, and of how much interest it is to the
larger LAMMPS community. Please see below for a checklist of typical
requirements. Once you have prepared everything, see the :doc:`LAMMPS GitHub
Tutorial <Howto_github>` page for instructions on
how to submit your changes or new files through a GitHub pull
request. If you prefer to submit patches or full files, you should first
make certain, that your code works correctly with the latest patch-level
version of LAMMPS and contains all bug fixes from it. Then create a
gzipped tar file of all changed or added files or a corresponding patch
file using 'diff -u' or 'diff -c' and compress it with gzip. Please only
use gzip compression, as this works well on all platforms.
much effort it will cause to integrate and test it, how many and what
kind of changes it requires to the core codebase, and of how much
interest it is to the larger LAMMPS community. Please see below for a
checklist of typical requirements. Once you have prepared everything,
see the :doc:`LAMMPS GitHub Tutorial <Howto_github>` page for
instructions on how to submit your changes or new files through a GitHub
pull request. If you prefer to submit patches or full files, you should
first make certain, that your code works correctly with the latest
patch-level version of LAMMPS and contains all bug fixes from it. Then
create a gzipped tar file of all changed or added files or a
corresponding patch file using 'diff -u' or 'diff -c' and compress it
with gzip. Please only use gzip compression, as this works well and is
available on all platforms.
If the new features/files are broadly useful we may add them as core
files to LAMMPS or as part of a :doc:`standard package <Packages_standard>`. Else we will add them as a
@ -57,13 +58,16 @@ added to the LAMMPS distribution. All the standard and user packages
are listed and described on the :doc:`Packages details <Packages_details>` doc page.
Note that by providing us files to release, you are agreeing to make
them open-source, i.e. we can release them under the terms of the GPL,
used as a license for the rest of LAMMPS. See the :doc:`LAMMPS license
<Intro_opensource>` doc page for details.
them open-source, i.e. we can release them under the terms of the GPL
(version 2), used as a license for the rest of LAMMPS. And as part of
a LGPL (version 2.1) distribution that we make available to developers
on request only and with files that are authorized for that kind of
distribution removed (e.g. interface to FFTW). See the
:doc:`LAMMPS license <Intro_opensource>` doc page for details.
With user packages and files, all we are really providing (aside from
the fame and fortune that accompanies having your name in the source
code and on the `Authors page <https://lammps.sandia.gov/authors.html>`_
code and on the `Authors page <https://www.lammps.org/authors.html>`_
of the `LAMMPS WWW site <lws_>`_), is a means for you to distribute your
work to the LAMMPS user community, and a mechanism for others to
easily try out your new feature. This may help you find bugs or make
@ -77,13 +81,13 @@ unusual event).
If you prefer to actively develop and support your add-on
feature yourself, then you may wish to make it available for download
from your own website, as a user package that LAMMPS users can add to
their copy of LAMMPS. See the `Offsite LAMMPS packages and tools <https://lammps.sandia.gov/offsite.html>`_ page of the LAMMPS web
their copy of LAMMPS. See the `Offsite LAMMPS packages and tools <https://www.lammps.org/offsite.html>`_ page of the LAMMPS web
site for examples of groups that do this. We are happy to advertise
your package and web site from that page. Simply email the
`developers <https://lammps.sandia.gov/authors.html>`_ with info about
`developers <https://www.lammps.org/authors.html>`_ with info about
your package and we will post it there.
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
The previous sections of this doc page describe how to add new "style"
files of various kinds to LAMMPS. Packages are simply collections of
@ -92,7 +96,7 @@ LAMMPS input script. If designed correctly, these additions typically
do not require changes to the main core of LAMMPS; they are simply
add-on files. If you think your new feature requires non-trivial
changes in core LAMMPS files, you should `communicate with the
developers <https://lammps.sandia.gov/authors.html>`_, since we may or
developers <https://www.lammps.org/authors.html>`_, since we may or
may not want to include those changes for some reason. An example of a
trivial change is making a parent-class method "virtual" when you derive
a new child class from it.
@ -112,7 +116,7 @@ packages in the src directory for examples. If you are uncertain, please ask.
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 lines over 80 characters. I/O is done via
level, **no tabs**\ , no lines over 100 characters. I/O is done via
the C-style stdio library (mixing of stdio and iostreams is generally
discouraged), class header files should not import any system headers
outside of <cstdio>, STL containers should be avoided in headers,
@ -131,6 +135,31 @@ packages in the src directory for examples. If you are uncertain, please ask.
LAMMPS source files, including the use of the error class for error
and warning messages.
* To simplify reformatting contributed code in a way that is compatible
with the LAMMPS formatting styles, you can use clang-format (version 8
or later). The LAMMPS distribution includes a suitable ``.clang-format``
file which will be applied if you run ``clang-format -i some_file.cpp``
on your files inside the LAMMPS src tree. Please only reformat files
that you have contributed. For header files containing a
``SomeStyle(keyword, ClassName)`` macros it is required to have this
macro embedded with a pair of ``// clang-format off``, ``// clang-format on``
commends and the line must be terminated with a semi-colon (;).
Example:
.. code-block:: c++
#ifdef COMMAND_CLASS
// clang-format off
CommandStyle(run,Run);
// clang-format on
#else
#ifndef LMP_RUN_H
[...]
You may also use ``// clang-format on/off`` throughout your file
to protect sections of the file from being reformatted.
* If you want your contribution to be added as a user-contributed
feature, and it's a single file (actually a \*.cpp and \*.h file) it can
rapidly be added to the USER-MISC directory. Send us the one-line

View File

@ -69,6 +69,7 @@ page gives those details.
* :ref:`USER-ATC <PKG-USER-ATC>`
* :ref:`USER-AWPMD <PKG-USER-AWPMD>`
* :ref:`USER-BOCS <PKG-USER-BOCS>`
* :ref:`USER-BROWNIAN <PKG-USER-BROWNIAN>`
* :ref:`USER-CGDNA <PKG-USER-CGDNA>`
* :ref:`USER-CGSDK <PKG-USER-CGSDK>`
* :ref:`USER-COLVARS <PKG-USER-COLVARS>`
@ -78,9 +79,11 @@ page gives those details.
* :ref:`USER-EFF <PKG-USER-EFF>`
* :ref:`USER-FEP <PKG-USER-FEP>`
* :ref:`USER-H5MD <PKG-USER-H5MD>`
* :ref:`USER-HDNNP <PKG-USER-HDNNP>`
* :ref:`USER-INTEL <PKG-USER-INTEL>`
* :ref:`USER-LB <PKG-USER-LB>`
* :ref:`USER-MANIFOLD <PKG-USER-MANIFOLD>`
* :ref:`USER-MDI <PKG-USER-MDI>`
* :ref:`USER-MEAMC <PKG-USER-MEAMC>`
* :ref:`USER-MESODPD <PKG-USER-MESODPD>`
* :ref:`USER-MESONT <PKG-USER-MESONT>`
@ -90,12 +93,14 @@ page gives those details.
* :ref:`USER-MOLFILE <PKG-USER-MOLFILE>`
* :ref:`USER-NETCDF <PKG-USER-NETCDF>`
* :ref:`USER-OMP <PKG-USER-OMP>`
* :ref:`USER-PACE <PKG-USER-PACE>`
* :ref:`USER-PHONON <PKG-USER-PHONON>`
* :ref:`USER-PLUMED <PKG-USER-PLUMED>`
* :ref:`USER-PTM <PKG-USER-PTM>`
* :ref:`USER-QMMM <PKG-USER-QMMM>`
* :ref:`USER-QTB <PKG-USER-QTB>`
* :ref:`USER-QUIP <PKG-USER-QUIP>`
* :ref:`USER-RANN <PKG-USER-RANN>`
* :ref:`USER-REACTION <PKG-USER-REACTION>`
* :ref:`USER-REAXC <PKG-USER-REAXC>`
* :ref:`USER-SCAFACOS <PKG-USER-SCAFACOS>`
@ -130,8 +135,8 @@ particle models including ellipsoids, 2d lines, and 3d triangles.
* `doc/PDF/pair_resquared_extra.pdf <PDF/pair_resquared_extra.pdf>`_
* examples/ASPHERE
* examples/ellipse
* https://lammps.sandia.gov/movies.html#line
* https://lammps.sandia.gov/movies.html#tri
* https://www.lammps.org/movies.html#line
* https://www.lammps.org/movies.html#tri
----------
@ -327,7 +332,7 @@ This package has :ref:`specific installation instructions <gpu>` on the :doc:`Bu
* :doc:`package gpu <package>`
* :doc:`Commands <Commands_all>` pages (:doc:`pair <Commands_pair>`, :doc:`kspace <Commands_kspace>`)
for styles followed by (g)
* `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of web site
* `Benchmarks page <https://www.lammps.org/bench.html>`_ of web site
----------
@ -353,11 +358,11 @@ potentials.
* examples/granregion
* examples/pour
* bench/in.chute
* https://lammps.sandia.gov/pictures.html#jamming
* https://lammps.sandia.gov/movies.html#hopper
* https://lammps.sandia.gov/movies.html#dem
* https://lammps.sandia.gov/movies.html#brazil
* https://lammps.sandia.gov/movies.html#granregion
* https://www.lammps.org/pictures.html#jamming
* https://www.lammps.org/movies.html#hopper
* https://www.lammps.org/movies.html#dem
* https://www.lammps.org/movies.html#brazil
* https://www.lammps.org/movies.html#granregion
----------
@ -444,7 +449,7 @@ time via the "-sf kk" or "-suffix kk" :doc:`command-line switches <Run_options>`
:ref:`USER-INTEL <PKG-USER-INTEL>`, and :ref:`USER-OMP <PKG-USER-OMP>` packages, which
have styles optimized for CPUs, KNLs, and GPUs.
You must have a C++11 compatible compiler to use this package.
You must have a C++14 compatible compiler to use this package.
KOKKOS makes extensive use of advanced C++ features, which can
expose compiler bugs, especially when compiling for maximum
performance at high optimization levels. Please see the file
@ -476,7 +481,7 @@ This package has :ref:`specific installation instructions <kokkos>` on the :doc:
* Search the :doc:`commands <Commands_all>` pages (:doc:`fix <Commands_fix>`, :doc:`compute <Commands_compute>`,
:doc:`pair <Commands_pair>`, :doc:`bond, angle, dihedral, improper <Commands_bond>`,
:doc:`kspace <Commands_kspace>`) for styles followed by (k)
* `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of web site
* `Benchmarks page <https://www.lammps.org/bench.html>`_ of web site
----------
@ -585,7 +590,7 @@ MC package
Several fixes and a pair style that have Monte Carlo (MC) or MC-like
attributes. These include fixes for creating, breaking, and swapping
bonds, for performing atomic swaps, and performing grand-canonical MC
(GCMC) in conjunction with dynamics.
(GCMC) or similar processes in conjunction with dynamics.
**Supporting info:**
@ -593,10 +598,14 @@ bonds, for performing atomic swaps, and performing grand-canonical MC
* :doc:`fix atom/swap <fix_atom_swap>`
* :doc:`fix bond/break <fix_bond_break>`
* :doc:`fix bond/create <fix_bond_create>`
* :doc:`fix bond/create/angle <fix_bond_create>`
* :doc:`fix bond/swap <fix_bond_swap>`
* :doc:`fix charge/regulation <fix_charge_regulation>`
* :doc:`fix gcmc <fix_gcmc>`
* :doc:`fix tfmc <fix_tfmc>`
* :doc:`fix widom <fix_widom>`
* :doc:`pair_style dsmc <pair_dsmc>`
* https://lammps.sandia.gov/movies.html#gcmc
* https://www.lammps.org/movies.html#gcmc
----------
@ -653,8 +662,8 @@ listing, "ls src/MISC", to see the list of commands.
* :doc:`fix viscosity <fix_viscosity>`
* examples/KAPPA
* examples/VISCOSITY
* https://lammps.sandia.gov/pictures.html#ttm
* https://lammps.sandia.gov/movies.html#evaporation
* https://www.lammps.org/pictures.html#ttm
* https://www.lammps.org/movies.html#evaporation
----------
@ -809,7 +818,7 @@ This package has :ref:`specific installation instructions <opt>` on the :doc:`Bu
* :doc:`OPT package <Speed_opt>`
* :doc:`Section 2.6 -sf opt <Run_options>`
* Search the :doc:`pair style <Commands_pair>` page for styles followed by (t)
* `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of web site
* `Benchmarks page <https://www.lammps.org/bench.html>`_ of web site
----------
@ -840,7 +849,7 @@ Foster (UTSA).
* :doc:`compute damage/atom <compute_damage_atom>`
* :doc:`compute plasticity/atom <compute_plasticity_atom>`
* examples/peri
* https://lammps.sandia.gov/movies.html#peri
* https://www.lammps.org/movies.html#peri
----------
@ -1001,8 +1010,8 @@ Also several computes which calculate properties of rigid bodies.
* examples/ASPHERE
* examples/rigid
* bench/in.rhodo
* https://lammps.sandia.gov/movies.html#box
* https://lammps.sandia.gov/movies.html#star
* https://www.lammps.org/movies.html#box
* https://www.lammps.org/movies.html#star
----------
@ -1103,9 +1112,9 @@ colloidal particles.
* :doc:`fix wall/srd <fix_wall_srd>`
* examples/srd
* examples/ASPHERE
* https://lammps.sandia.gov/movies.html#tri
* https://lammps.sandia.gov/movies.html#line
* https://lammps.sandia.gov/movies.html#poly
* https://www.lammps.org/movies.html#tri
* https://www.lammps.org/movies.html#line
* https://www.lammps.org/movies.html#poly
----------
@ -1197,7 +1206,7 @@ This package has :ref:`specific installation instructions <user-atc>` on the :do
* src/USER-ATC/README
* :doc:`fix atc <fix_atc>`
* examples/USER/atc
* https://lammps.sandia.gov/pictures.html#atc
* https://www.lammps.org/pictures.html#atc
----------
@ -1261,6 +1270,26 @@ Example inputs are in the examples/USER/bocs folder.
----------
.. _PKG-USER-BROWNIAN:
USER-BROWNIAN package
---------------------
**Contents:**
This package provides :doc:`fix brownian, fix brownian/sphere, and
fix brownian/asphere <fix_brownian>` as well as
:doc:`fix propel/self <fix_propel_self>` which allow to do Brownian
Dynamics time integration of point, spherical and aspherical particles
and also support self-propelled particles.
**Authors:** Sam Cameron (University of Bristol),
Stefan Paquay (while at Brandeis University) (initial version of fix propel/self)
Example inputs are in the examples/USER/brownian folder.
----------
.. _PKG-USER-CGDNA:
USER-CGDNA package
@ -1310,7 +1339,7 @@ acids.
* :doc:`pair_style lj/sdk/\* <pair_sdk>`
* :doc:`angle_style sdk <angle_sdk>`
* examples/USER/cgsdk
* https://lammps.sandia.gov/pictures.html#cg
* https://www.lammps.org/pictures.html#cg
----------
@ -1349,6 +1378,46 @@ This package has :ref:`specific installation instructions <user-colvars>` on the
----------
.. _PKG-USER-PACE:
USER-PACE package
-------------------
**Contents:**
A pair style for the Atomic Cluster Expansion potential (ACE).
ACE is a methodology for deriving a highly accurate classical potential
fit to a large archive of quantum mechanical (DFT) data. The USER-PACE
package provides an efficient implementation for running simulations
with ACE potentials.
**Authors:**
This package was written by Yury Lysogorskiy^1,
Cas van der Oord^2, Anton Bochkarev^1,
Sarath Menon^1, Matteo Rinaldi^1, Thomas Hammerschmidt^1, Matous Mrovec^1,
Aidan Thompson^3, Gabor Csanyi^2, Christoph Ortner^4, Ralf Drautz^1.
^1: Ruhr-University Bochum, Bochum, Germany
^2: University of Cambridge, Cambridge, United Kingdom
^3: Sandia National Laboratories, Albuquerque, New Mexico, USA
^4: University of British Columbia, Vancouver, BC, Canada
**Install:**
This package has :ref:`specific installation instructions <user-pace>` on the :doc:`Build extras <Build_extras>` page.
**Supporting info:**
* src/USER-PACE: filenames -> commands
* :doc:`pair_style pace <pair_pace>`
* examples/USER/pace
----------
.. _PKG-USER-PLUMED:
USER-PLUMED package
@ -1507,7 +1576,7 @@ tools/eff; see its README file.
* examples/USER/eff
* tools/eff/README
* tools/eff
* https://lammps.sandia.gov/movies.html#eff
* https://www.lammps.org/movies.html#eff
----------
@ -1572,6 +1641,39 @@ This package has :ref:`specific installation instructions <user-h5md>` on the :d
----------
.. _PKG-USER-HDNNP:
USER-HDNNP package
------------------
**Contents:**
A :doc:`pair_style hdnnp <pair_hdnnp>` command which allows to use
high-dimensional neural network potentials (HDNNPs), a form of machine learning
potentials. HDNNPs must be carefully trained prior to their application in a
molecular dynamics simulation.
.. _n2p2: https://github.com/CompPhysVienna/n2p2
To use this package you must have the `n2p2 <n2p2_>`_ library installed and
compiled on your system.
**Author:** Andreas Singraber
**Install:**
This package has :ref:`specific installation instructions <user-hdnnp>` on the :doc:`Build extras <Build_extras>` page.
**Supporting info:**
* src/USER-HDNNP: filenames -> commands
* src/USER-HDNNP/README
* lib/hdnnp/README
* :doc:`pair_style hdnnp <pair_hdnnp>`
* examples/USER/hdnnp
----------
.. _PKG-USER-INTEL:
USER-INTEL package
@ -1616,7 +1718,7 @@ This package has :ref:`specific installation instructions <user-intel>` on the :
* Search the :doc:`commands <Commands_all>` pages (:doc:`fix <Commands_fix>`, :doc:`compute <Commands_compute>`,
:doc:`pair <Commands_pair>`, :doc:`bond, angle, dihedral, improper <Commands_bond>`, :doc:`kspace <Commands_kspace>`) for styles followed by (i)
* src/USER-INTEL/TEST
* `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of web site
* `Benchmarks page <https://www.lammps.org/bench.html>`_ of web site
----------
@ -1721,7 +1823,29 @@ Waltham, MA, USA)
* :doc:`fix nve/manifold/rattle <fix_nve_manifold_rattle>`
* :doc:`fix nvt/manifold/rattle <fix_nvt_manifold_rattle>`
* examples/USER/manifold
* https://lammps.sandia.gov/movies.html#manifold
* https://www.lammps.org/movies.html#manifold
----------
.. _PKG-USER-MDI:
USER-MDI package
----------------
**Contents:**
A LAMMPS command and fix to allow client-server coupling of LAMMPS to
other atomic or molecular simulation codes via the `MolSSI Driver Interface
(MDI) library <https://molssi-mdi.github.io/MDI_Library/html/index.html>`_.
**Author:** Taylor Barnes - MolSSI, taylor.a.barnes at gmail.com
**Supporting info:**
* src/USER-MDI/README
* :doc:`mdi/engine <mdi_engine>`
* :doc:`fix mdi/engine <fix_mdi_engine>`
* examples/USER/mdi
----------
@ -1777,10 +1901,10 @@ algorithm.
* :doc:`pair_style tdpd <pair_mesodpd>`
* :doc:`fix mvv/dpd <fix_mvv_dpd>`
* examples/USER/mesodpd
* https://lammps.sandia.gov/movies.html#mesodpd
* https://www.lammps.org/movies.html#mesodpd
* examples/USER/meso
* http://lammps.sandia.gov/movies.html#mesodpd
* http://www.lammps.org/movies.html#mesodpd
----------
@ -1996,7 +2120,7 @@ This package has :ref:`specific installation instructions <user-omp>` on the :do
* Search the :doc:`commands <Commands_all>` pages (:doc:`fix <Commands_fix>`, :doc:`compute <Commands_compute>`,
:doc:`pair <Commands_pair>`, :doc:`bond, angle, dihedral, improper <Commands_bond>`,
:doc:`kspace <Commands_kspace>`) for styles followed by (o)
* `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of web site
* `Benchmarks page <https://www.lammps.org/bench.html>`_ of web site
----------
@ -2154,6 +2278,31 @@ This package has :ref:`specific installation instructions <user-quip>` on the :d
----------
.. _PKG-USER-RANN:
USER-RANN package
-----------------
**Contents:**
A pair style for using rapid atomistic neural network (RANN) potentials.
These neural network potentials work by first generating a series of symmetry
functions from the neighbor list and then using these values as the input layer
of a neural network.
**Authors:**
This package was written by Christopher Barrett
with contributions by Doyl Dickel, Mississippi State University.
**Supporting info:**
* src/USER-RANN: filenames -> commands
* :doc:`pair_style rann <pair_rann>`
* examples/USER/rann
----------
.. _PKG-USER-REACTION:
USER-REACTION package
@ -2179,8 +2328,8 @@ molecules, and chiral-sensitive reactions.
* src/USER-REACTION/README
* :doc:`fix bond/react <fix_bond_react>`
* examples/USER/reaction
* `2017 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug17/pdf/gissinger.pdf>`_
* `2019 LAMMPS Workshop <https://lammps.sandia.gov/workshops/Aug19/talk_gissinger.pdf>`_
* `2017 LAMMPS Workshop <https://www.lammps.org/workshops/Aug17/pdf/gissinger.pdf>`_
* `2019 LAMMPS Workshop <https://www.lammps.org/workshops/Aug19/talk_gissinger.pdf>`_
* reacter.org
----------
@ -2307,7 +2456,7 @@ This package has :ref:`specific installation instructions <user-smd>` on the :do
* src/USER-SMD/README
* doc/PDF/SMD_LAMMPS_userguide.pdf
* examples/USER/smd
* https://lammps.sandia.gov/movies.html#smd
* https://www.lammps.org/movies.html#smd
----------
@ -2364,7 +2513,7 @@ Dynamics, Ernst Mach Institute, Germany).
* src/USER-SPH/README
* doc/PDF/SPH_LAMMPS_userguide.pdf
* examples/USER/sph
* https://lammps.sandia.gov/movies.html#sph
* https://www.lammps.org/movies.html#sph
----------

View File

@ -39,13 +39,13 @@ package:
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`DIPOLE <PKG-DIPOLE>` | point dipole particles | :doc:`pair_style lj/.../dipole <pair_dipole>` | dipole | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`GPU <PKG-GPU>` | GPU-enabled styles | :doc:`Section gpu <Speed_gpu>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | int |
| :ref:`GPU <PKG-GPU>` | GPU-enabled styles | :doc:`Section gpu <Speed_gpu>` | `Benchmarks <https://www.lammps.org/bench.html>`_ | int |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`GRANULAR <PKG-GRANULAR>` | granular systems | :doc:`Howto granular <Howto_granular>` | pour | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`KIM <PKG-KIM>` | OpenKIM wrapper | :doc:`pair_style kim <pair_kim>` | kim | ext |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`KOKKOS <PKG-KOKKOS>` | Kokkos-enabled styles | :doc:`Speed kokkos <Speed_kokkos>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
| :ref:`KOKKOS <PKG-KOKKOS>` | Kokkos-enabled styles | :doc:`Speed kokkos <Speed_kokkos>` | `Benchmarks <https://www.lammps.org/bench.html>`_ | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`KSPACE <PKG-KSPACE>` | long-range Coulombic solvers | :doc:`kspace_style <kspace_style>` | peptide | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
@ -67,7 +67,7 @@ package:
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`MSCG <PKG-MSCG>` | multi-scale coarse-graining wrapper | :doc:`fix mscg <fix_mscg>` | mscg | ext |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`OPT <PKG-OPT>` | optimized pair styles | :doc:`Speed opt <Speed_opt>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
| :ref:`OPT <PKG-OPT>` | optimized pair styles | :doc:`Speed opt <Speed_opt>` | `Benchmarks <https://www.lammps.org/bench.html>`_ | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+
| :ref:`PERI <PKG-PERI>` | Peridynamics models | :doc:`pair_style peri <pair_peri>` | peri | no |
+----------------------------------+--------------------------------------+----------------------------------------------------+------------------------------------------------------+---------+

View File

@ -39,6 +39,8 @@ package:
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-BOCS <PKG-USER-BOCS>` | BOCS bottom up coarse graining | :doc:`fix bocs <fix_bocs>` | USER/bocs | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-BROWNIAN <PKG-USER-BROWNIAN>` | Brownian dynamics and self-propelled particles | :doc:`fix brownian <fix_brownian>`, :doc:`fix propel/self <fix_propel_self>` | USER/brownian | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-CGDNA <PKG-USER-CGDNA>` | coarse-grained DNA force fields | src/USER-CGDNA/README | USER/cgdna | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-CGSDK <PKG-USER-CGSDK>` | SDK coarse-graining model | :doc:`pair_style lj/sdk <pair_sdk>` | USER/cgsdk | no |
@ -57,12 +59,16 @@ package:
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-H5MD <PKG-USER-H5MD>` | dump output via HDF5 | :doc:`dump h5md <dump_h5md>` | n/a | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-INTEL <PKG-USER-INTEL>` | optimized Intel CPU and KNL styles | :doc:`Speed intel <Speed_intel>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
| :ref:`USER-HDNNP <PKG-USER-HDNNP>` | High-dimensional neural network potentials | :doc:`pair_style hdnnp <pair_hdnnp>` | USER/hdnnp | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-INTEL <PKG-USER-INTEL>` | optimized Intel CPU and KNL styles | :doc:`Speed intel <Speed_intel>` | `Benchmarks <https://www.lammps.org/bench.html>`_ | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-LB <PKG-USER-LB>` | Lattice Boltzmann fluid | :doc:`fix lb/fluid <fix_lb_fluid>` | USER/lb | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-MANIFOLD <PKG-USER-MANIFOLD>` | motion on 2d surfaces | :doc:`fix manifoldforce <fix_manifoldforce>` | USER/manifold | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-MDI <PKG-USER-MDI>` | client-server coupling | :doc:`MDI Howto <Howto_mdi>` | USER/mdi | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-MEAMC <PKG-USER-MEAMC>` | modified EAM potential (C++) | :doc:`pair_style meam/c <pair_meamc>` | meamc | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-MESODPD <PKG-USER-MESODPD>` | mesoscale DPD models | :doc:`pair_style edpd <pair_mesodpd>` | USER/mesodpd | no |
@ -79,7 +85,9 @@ package:
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-NETCDF <PKG-USER-NETCDF>` | dump output via NetCDF | :doc:`dump netcdf <dump_netcdf>` | n/a | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-OMP <PKG-USER-OMP>` | OpenMP-enabled styles | :doc:`Speed omp <Speed_omp>` | `Benchmarks <https://lammps.sandia.gov/bench.html>`_ | no |
| :ref:`USER-OMP <PKG-USER-OMP>` | OpenMP-enabled styles | :doc:`Speed omp <Speed_omp>` | `Benchmarks <https://www.lammps.org/bench.html>`_ | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-PACE <PKG-USER-PACE>` | Fast implementation of Atomic Cluster Expansion (ACE) potential | :doc:`pair pace <pair_pace>` | USER/pace | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-PHONON <PKG-USER-PHONON>` | phonon dynamical matrix | :doc:`fix phonon <fix_phonon>` | USER/phonon | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
@ -93,6 +101,8 @@ package:
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-QUIP <PKG-USER-QUIP>` | QUIP/libatoms interface | :doc:`pair_style quip <pair_quip>` | USER/quip | ext |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-RANN <PKG-USER-RANN>` | rapid atomistic neural network (RANN) potentials | :doc:`pair rann <pair_rann>` | USER/rann | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-REACTION <PKG-USER-REACTION>` | chemical reactions in classical MD | :doc:`fix bond/react <fix_bond_react>` | USER/reaction | no |
+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+
| :ref:`USER-REAXC <PKG-USER-REAXC>` | ReaxFF potential (C/C++) | :doc:`pair_style reaxc <pair_reaxc>` | reax | no |

View File

@ -10,6 +10,7 @@ letter abbreviation can be used:
* :ref:`-i or -in <file>`
* :ref:`-k or -kokkos <run-kokkos>`
* :ref:`-l or -log <log>`
* :ref:`-mdi <mdi>`
* :ref:`-m or -mpicolor <mpicolor>`
* :ref:`-c or -cite <cite>`
* :ref:`-nc or -nocite <nocite>`
@ -196,9 +197,23 @@ Option -plog will override the name of the partition log files file.N.
----------
.. _mdi:
**-mdi 'multiple flags'**
This flag is only recognized and used when LAMMPS has support for the MolSSI
Driver Interface (MDI) included as part of the :ref:`USER-MDI <PKG-USER-MDI>`
package. This flag is specific to the MDI library and controls how LAMMPS
interacts with MDI. There are usually multiple flags that have to follow it
and those have to be placed in quotation marks. For more information about
how to launch LAMMPS in MDI client/server mode please refer to the
:doc:`MDI Howto <Howto_mdi>`.
----------
.. _mpicolor:
**-mpicolor** color
**-mpicolor color**
If used, this must be the first command-line argument after the LAMMPS
executable name. It is only used when LAMMPS is launched by an mpirun
@ -223,7 +238,7 @@ links with from the lib/message directory. See the
.. _cite:
**-cite style or file name**
**-cite style** or **file name**
Select how and where to output a reminder about citing contributions
to the LAMMPS code that were used during the run. Available styles are

View File

@ -12,7 +12,7 @@ accelerator packages provided with LAMMPS that contain code optimized
for certain kinds of hardware, including multi-core CPUs, GPUs, and
Intel Xeon Phi co-processors.
The `Benchmark page <https://lammps.sandia.gov/bench.html>`_ of the LAMMPS
The `Benchmark page <https://www.lammps.org/bench.html>`_ of the LAMMPS
web site gives performance results for the various accelerator
packages discussed on the :doc:`Speed packages <Speed_packages>` doc
page, for several of the standard LAMMPS benchmark problems, as a

View File

@ -1,7 +1,7 @@
Benchmarks
==========
Current LAMMPS performance is discussed on the `Benchmarks page <https://lammps.sandia.gov/bench.html>`_ of the `LAMMPS website <lws_>`_
Current LAMMPS performance is discussed on the `Benchmarks page <https://www.lammps.org/bench.html>`_ of the `LAMMPS website <lws_>`_
where timings and parallel efficiency are listed. The page has
several sections, which are briefly described below:
@ -43,11 +43,11 @@ to build LAMMPS and run on that kind of hardware.
The bench/POTENTIALS directory has input files which correspond to the
table of results on the
`Potentials <https://lammps.sandia.gov/bench.html#potentials>`_ section of
`Potentials <https://www.lammps.org/bench.html#potentials>`_ section of
the Benchmarks web page. So you can also run those test problems on
your machine.
The `billion-atom <https://lammps.sandia.gov/bench.html#billion>`_ section
The `billion-atom <https://www.lammps.org/bench.html#billion>`_ section
of the Benchmarks web page has performance data for very large
benchmark runs of simple Lennard-Jones (LJ) models, which use the
bench/in.lj input script.
@ -73,4 +73,4 @@ estimate parallel performance for multi-node runs using the same logic
as for all-MPI mode, except that now you will typically need many more
atoms/node to achieve good scalability.
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org

View File

@ -152,7 +152,7 @@ in OpenCL mode on CPUs (which uses vectorization and multithreading) is
usually resulting in inferior performance compared to using LAMMPS' native
threading and vectorization support in the USER-OMP and USER-INTEL packages.
See the `Benchmark page <https://lammps.sandia.gov/bench.html>`_ of the
See the `Benchmark page <https://www.lammps.org/bench.html>`_ of the
LAMMPS web site for performance of the GPU package on various
hardware, including the Titan HPC platform at ORNL.

View File

@ -406,7 +406,7 @@ Generally speaking, the following rules of thumb apply:
package also can increase the vector length of vector instructions
by switching to single or mixed precision mode.
See the `Benchmark page <https://lammps.sandia.gov/bench.html>`_ of the
See the `Benchmark page <https://www.lammps.org/bench.html>`_ of the
LAMMPS web site for performance of the KOKKOS package on different
hardware.

View File

@ -145,7 +145,7 @@ sub-directories with Make.py commands and input scripts for using all
the accelerator packages on various machines. See the README files in
those directories.
As mentioned above, the `Benchmark page <https://lammps.sandia.gov/bench.html>`_ of the LAMMPS web site gives
As mentioned above, the `Benchmark page <https://www.lammps.org/bench.html>`_ of the LAMMPS web site gives
performance results for the various accelerator packages for several
of the standard LAMMPS benchmark problems, as a function of problem
size and number of compute nodes, on different hardware platforms.

View File

@ -6,15 +6,15 @@ molecular dynamics computations. Additional pre- and post-processing
steps are often necessary to setup and analyze a simulation. A list
of such tools can be found on the `LAMMPS webpage <lws_>`_ at these links:
* `Pre/Post processing <https://lammps.sandia.gov/prepost.html>`_
* `Offsite LAMMPS packages & tools <https://lammps.sandia.gov/offsite.html>`_
* `Pre/Post processing <https://www.lammps.org/prepost.html>`_
* `Offsite LAMMPS packages & tools <https://www.lammps.org/offsite.html>`_
* `Pizza.py toolkit <pizza_>`_
The last link for `Pizza.py <pizza_>`_ is a Python-based tool developed at
Sandia which provides tools for doing setup, analysis, plotting, and
visualization for LAMMPS simulations.
.. _lws: https://lammps.sandia.gov
.. _lws: https://www.lammps.org
.. _pizza: https://pizza.sandia.gov
.. _python: https://www.python.org
@ -94,6 +94,7 @@ Miscellaneous tools
* :ref:`kate <kate>`
* :ref:`LAMMPS shell <lammps_shell>`
* :ref:`LAMMPS magic patterns for file(1) <magic>`
* :ref:`Offline build tool <offline>`
* :ref:`singularity <singularity_tool>`
* :ref:`SWIG interface <swig>`
* :ref:`vim <vim>`
@ -756,6 +757,103 @@ See the README file in the tools/msi2lmp folder for more information.
----------
.. _offline:
Scripts for building LAMMPS when offline
----------------------------------------
In some situations it might be necessary to build LAMMPS on a system
without direct internet access. The scripts in ``tools/offline`` folder
allow you to pre-load external dependencies for both the documentation
build and for building LAMMPS with CMake.
It does so by
#. downloading necessary ``pip`` packages,
#. cloning ``git`` repositories
#. downloading tarballs
to a designated cache folder.
As of April 2021, all of these downloads make up around 600MB. By
default, the offline scripts will download everything into the
``$HOME/.cache/lammps`` folder, but this can be changed by setting the
``LAMMPS_CACHING_DIR`` environment variable.
Once the caches have been initialized, they can be used for building the
LAMMPS documentation or compiling LAMMPS using CMake on an offline
system.
The ``use_caches.sh`` script must be sourced into the current shell
to initialize the offline build environment. Note that it must use
the same ``LAMMPS_CACHING_DIR``. This script does the following:
#. Set up environment variables that modify the behavior of both,
``pip`` and ``git``
#. Start a simple local HTTP server using Python to host files for CMake
Afterwards, it will print out instruction on how to modify the CMake
command line to make sure it uses the local HTTP server.
To undo the environment changes and shutdown the local HTTP server,
run the ``deactivate_caches`` command.
Examples
^^^^^^^^
For all of the examples below, you first need to create the cache, which
requires an internet connection.
.. code-block:: bash
./tools/offline/init_caches.sh
Afterwards, you can disconnect or copy the contents of the
``LAMMPS_CACHING_DIR`` folder to an offline system.
Documentation Build
^^^^^^^^^^^^^^^^^^^
The documentation build will create a new virtual environment that
typically first installs dependencies from ``pip``. With the offline
environment loaded, these installations will instead grab the necessary
packages from your local cache.
.. code-block:: bash
# if LAMMPS_CACHING_DIR is different from default, make sure to set it first
# export LAMMPS_CACHING_DIR=path/to/folder
source tools/offline/use_caches.sh
cd doc/
make html
deactivate_caches
CMake Build
^^^^^^^^^^^
When compiling certain packages with external dependencies, the CMake
build system will download necessary files or sources from the web. For
more flexibility the CMake configuration allows users to specify the URL
of each of these dependencies. What the ``init_caches.sh`` script does
is create a CMake "preset" file, which sets the URLs for all of the known
dependencies and redirects the download to the local cache.
.. code-block:: bash
# if LAMMPS_CACHING_DIR is different from default, make sure to set it first
# export LAMMPS_CACHING_DIR=path/to/folder
source tools/offline/use_caches.sh
mkdir build
cd build
cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake
make -j 8
deactivate_caches
----------
.. _phonon:
phonon tool

View File

@ -69,7 +69,6 @@ parenthesized comments):
HAM (keyword is the first text on line)
N 181 FP 0 0 EQ 90.0 (N, FP, EQ parameters)
(blank line)
N 181 FP 0 0 (N, FP parameters)
1 0.0 200.5 2.5 (index, angle, energy, derivative)
2 1.0 198.0 2.5
...

View File

@ -80,7 +80,7 @@ LAMMPS commands require a map, even for atomic systems, and will
generate an error if one does not exist. The *map* keyword thus
allows you to force the creation of a map. The *yes* value will
create either an *array* or *hash* style map, as explained in the next
paragraph. The *array* and *hash* values create an atom-style or
paragraph. The *array* and *hash* values create an array-style or
hash-style map respectively.
For an *array*\ -style map, each processor stores a lookup table of

View File

@ -27,7 +27,7 @@ Syntax
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command
*hybrid* args = list of one or more sub-styles, each with their args
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk*
* accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* or *spin/kk*
Examples
""""""""

View File

@ -257,7 +257,7 @@ factor, similar to how the :doc:`fix balance shift <fix_balance>`
command operates.
The *dimstr* argument is a string of characters, each of which must be
an "x" or "y" or "z". Eacn character can appear zero or one time,
an "x" or "y" or "z". Each character can appear zero or one time,
since there is no advantage to balancing on a dimension more than
once. You should normally only list dimensions where you expect there
to be a density variation in the particles.
@ -285,7 +285,7 @@ plane gets closer to the target value.
After the balanced plane positions are determined, if any pair of
adjacent planes are closer together than the neighbor skin distance
(as specified by the :doc`neigh_modify <neigh_modify>` command), then
(as specified by the :doc:`neigh_modify <neigh_modify>` command), then
the plane positions are shifted to separate them by at least this
amount. This is to prevent particles being lost when dynamics are run
with processor sub-domains that are too narrow in one or more

View File

@ -11,13 +11,17 @@ Syntax
comm_modify keyword value ...
* zero or more keyword/value pairs may be appended
* keyword = *mode* or *cutoff* or *cutoff/multi* or *group* or *vel*
* keyword = *mode* or *cutoff* or *cutoff/multi* or *multi/reduce* or *group* or *vel*
.. parsed-literal::
*mode* value = *single* or *multi* = communicate atoms within a single or multiple distances
*mode* value = *single*, *multi*, or *multi/old* = communicate atoms within a single or multiple distances
*cutoff* value = Rcut (distance units) = communicate atoms from this far away
*cutoff/multi* type value
*cutoff/multi* collection value
collection = atom collection or collection range (supports asterisk notation)
value = Rcut (distance units) = communicate atoms for selected types from this far away
*reduce/multi* arg = none = reduce number of communicated ghost atoms for multi style
*cutoff/multi/old* type value
type = atom type or type range (supports asterisk notation)
value = Rcut (distance units) = communicate atoms for selected types from this far away
*group* value = group-ID = only communicate atoms in the group
@ -28,9 +32,9 @@ Examples
.. code-block:: LAMMPS
comm_modify mode multi
comm_modify mode multi reduce/multi
comm_modify mode multi group solvent
comm_modift mode multi cutoff/multi 1 10.0 cutoff/multi 2*4 15.0
comm_modify mode multi cutoff/multi 1 10.0 cutoff/multi 2*4 15.0
comm_modify vel yes
comm_modify mode single cutoff 5.0 vel yes
comm_modify cutoff/multi * 0.0
@ -62,12 +66,18 @@ sub-domain. The distance is by default the maximum of the neighbor
cutoff across all atom type pairs.
For many systems this is an efficient algorithm, but for systems with
widely varying cutoffs for different type pairs, the *multi* mode can
be faster. In this case, each atom type is assigned its own distance
widely varying cutoffs for different type pairs, the *multi* or *multi/old* mode can
be faster. In *multi*, each atom is assigned to a collection which should
correspond to a set of atoms with similar interaction cutoffs.
In this case, each atom collection is assigned its own distance
cutoff for communication purposes, and fewer atoms will be
communicated. See the :doc:`neighbor multi <neighbor>` command for a
neighbor list construction option that may also be beneficial for
simulations of this kind.
communicated. in *multi/old*, a similar technique is used but atoms
are grouped by atom type. See the :doc:`neighbor multi <neighbor>` and
:doc:`neighbor multi/old <neighbor>` commands for
neighbor list construction options that may also be beneficial for
simulations of this kind. The *multi* communication mode is only compatible
with the *multi* neighbor style. The *multi/old* communication mode is comparable
with both the *multi* and *multi/old* neighbor styles.
The *cutoff* keyword allows you to extend the ghost cutoff distance
for communication mode *single*\ , which is the distance from the borders
@ -87,12 +97,26 @@ warning is printed, if this bond based estimate is larger than the
communication cutoff used.
The *cutoff/multi* option is equivalent to *cutoff*\ , but applies to
communication mode *multi* instead. Since in this case the communication
cutoffs are determined per atom type, a type specifier is needed and
cutoff for one or multiple types can be extended. Also ranges of types
using the usual asterisk notation can be given. For granular pair styles,
the default cutoff is set to the sum of the current maximum atomic radii
for each type.
communication mode *multi* instead. Since the communication cutoffs are
determined per atom collections, a collection specifier is needed and
cutoff for one or multiple collections can be extended. Also ranges of
collections using the usual asterisk notation can be given. Collections
are indexed from 1 to N where N is the total number of collections.
Note that the arguments for *cutoff/multi* are parsed right before each
simulation to account for potential changes in the number of
collections. Custom cutoffs are preserved between runs but if
collections are redefined, one may want to re-specify the communication
cutoffs. For granular pair styles,the default cutoff is set to the sum
of the current maximum atomic radii for each collection. The
*cutoff/multi/old* option is similar to *cutoff/multi* except it
operates on atom types as opposed to collections.
The *reduce/multi* option applies to *multi* and sets the communication
cutoff for a particle equal to the maximum interaction distance between particles
in the same collection. This reduces the number of
ghost atoms that need to be communicated. This method is only compatible with the
*multi* neighbor style and requires a half neighbor list and Newton on.
See the :doc:`neighbor multi <neighbor>` command for more information.
These are simulation scenarios in which it may be useful or even
necessary to set a ghost cutoff > neighbor cutoff:
@ -123,7 +147,7 @@ ghost cutoff should be set.
In the last scenario, a :doc:`fix <fix>` or :doc:`compute <compute>` or
:doc:`pairwise potential <pair_style>` needs to calculate with ghost
atoms beyond the normal pairwise cutoff for some computation it
performs (e.g. locate neighbors of ghost atoms in a multibody pair
performs (e.g. locate neighbors of ghost atoms in a manybody pair
potential). Setting the ghost cutoff appropriately can insure it will
find the needed atoms.

View File

@ -59,6 +59,7 @@ Commands
lattice
log
mass
mdi_engine
message
min_modify
min_spin

View File

@ -48,6 +48,8 @@ Examples
compute 1 all fep 298 pair lj/cut epsilon 1 * v_delta pair lj/cut sigma 1 * v_delta volume yes
compute 1 all fep 300 atom charge 2 v_delta
Example input scripts available: examples/USER/fep
Description
"""""""""""

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