Compare commits

...

2751 Commits

Author SHA1 Message Date
ce756540e8 recognize STL files starting with "solid binary" as binary files 2023-09-22 08:04:25 -04:00
bb462b9ea3 plug memory leak 2023-09-22 08:04:18 -04:00
63eda98779 we don't need a lattice for creating atoms from a STL mesh 2023-09-22 08:04:09 -04:00
0ca72bb58e silence uninitialized access valgrind warning 2023-09-21 07:33:24 -04:00
a6bcf507e1 flag version as update 1 2023-09-19 14:37:13 -04:00
a1621a7229 Apply fix for hipfft paths in ROCm >= 6.0 2023-09-19 10:45:21 -04:00
62d41c6afb fix cut-n-paste issue 2023-09-14 00:29:00 -04:00
5480d25e36 add missing newline 2023-09-13 16:35:10 -04:00
a4145ec852 reorder to have sections in alphabetical order again 2023-09-13 16:34:11 -04:00
5b16f15b25 change refereces to lib/smd and smd to lib/machdyn and machdyn 2023-09-13 16:33:55 -04:00
e77aaba3a4 remove dead code 2023-09-13 16:33:33 -04:00
7f08e8d11c Initialize ADIOS dumps only the first time when
used in multiple runs (for custom/adios dump style)
2023-09-13 08:57:14 -04:00
f62b129dec update docs with settings for building tools with CMake 2023-09-01 18:54:42 -04:00
db967a5bbf there is no "thermo_extract" tool (anymore) 2023-09-01 18:54:28 -04:00
f20af66312 update some tables and comments for the current state of LAMMPS 2023-09-01 18:54:01 -04:00
01766c7631 Fix bug in MDI energy 2023-09-01 07:33:36 -04:00
7846bb59db silence compiler warning 2023-08-31 15:25:03 -04:00
c27951cb1f update unit tests for change in read_restart 2023-08-31 04:45:38 -04:00
4ab82d76ad make atom_modify map settings in restart file overridable 2023-08-30 23:52:14 -04:00
c6cbc1f965 list manual versions on Manual home page 2023-08-28 15:35:02 -04:00
88e58e9189 fix typo 2023-08-28 13:12:36 -04:00
e14005c443 must initialize typefirst now after recent changes from @dsbolin 2023-08-25 10:19:30 -04:00
9570c2fb50 must use array delete and not scalar delete on char array 2023-08-25 10:05:32 -04:00
180ce5277f A few bug fixes for fix srd 2023-08-24 12:29:27 -04:00
e81b86e114 clarify the documentation for the extract_atom numpy wrapper 2023-08-23 20:02:51 -04:00
6c6262a637 the MESONT package depends on the MOLECULE package since the last upgrade 2023-08-23 19:04:01 -04:00
062bb88561 fix element mapping bug in pair style hdnnp when used as a hybrid sub-style 2023-08-23 07:21:39 -04:00
cf5b653a9a Fix bug in Kokkos ReaxFF on GPUs when border comm is on host 2023-08-22 16:48:59 -04:00
c5a5e4a099 more fixes for file and pathnames with blanks 2023-08-21 16:11:03 -04:00
ccab900342 enable/disable VDW mode pushbutton depending on whether valid element info is present 2023-08-21 13:25:41 -04:00
fc400af724 avoid write_dump image failing when not all elements can be recognized 2023-08-21 12:27:30 -04:00
b1ea4d9601 fix write_dump command string so it can handle paths with blanks 2023-08-21 09:08:16 -04:00
2ca3be7b16 workaround for imageviewer GUI glitch on macOS 2023-08-20 19:11:37 -04:00
31b94aa1b0 fix copy-n-paste bug 2023-08-20 00:24:30 -04:00
b1b94980fa make vdwfactor consistent and speed up rendering for VDW mode by skipping bonds 2023-08-20 00:12:58 -04:00
770ad34267 speed up SSAO with OpenMP multi-threading, if available 2023-08-19 20:12:33 -04:00
10c523a950 use more consistent way to update checkboxes and labels by assigning names 2023-08-19 17:58:30 -04:00
62ef884564 use more consistent way to update checkboxes by assigning names 2023-08-19 16:44:11 -04:00
b3860a82de add missing file for embedding icons into windows executable 2023-08-19 15:22:54 -04:00
1deb3d8865 correctly extract local file name from dropped URI 2023-08-19 15:14:08 -04:00
266e519013 consistently use bool for echo and cite flags 2023-08-19 14:13:04 -04:00
fffb86cb02 automatically copy "About LAMMPS" dialog text to clipboard 2023-08-19 09:29:22 -04:00
fcaabe510e deleted one file too many 2023-08-18 01:56:53 -04:00
a6043d92cb remove obsolete files 2023-08-18 01:47:29 -04:00
ee16f6503e update LAMMPS GUI code with PR 3890 content 2023-08-17 22:50:10 -04:00
84168fc84d use fastest zlib compression settings to reduce serial overhead when writing PNG images 2023-08-17 22:44:41 -04:00
8a5fd08fa1 update documentation for LAMMPS GUI v1.2 2023-08-16 03:42:12 -04:00
8944609419 make dark gray really dark gray 2023-08-16 02:58:56 -04:00
e90478e932 update 2023-08-16 02:42:41 -04:00
52c23785c5 fix error with C++17 in AWPMD package 2023-08-16 02:42:35 -04:00
088ff4ad27 update LAMMPS GUI to version 1.2 2023-08-16 02:38:07 -04:00
e32ae65aa1 add flag used by LAMMPS GUI 2023-08-16 02:24:45 -04:00
a5bf853c35 changes to make example script in ASPHERE/tri run 2023-08-15 23:50:53 -04:00
b0a1b58c68 update clang-format detection for compatibility with Debian 2023-08-14 18:49:39 -04:00
bdaf3c64a6 silence warning about a setting that was added to silence warnings 2023-08-14 12:06:09 -04:00
ccc478ad96 flag if we are cross-compiling 2023-08-14 11:55:40 -04:00
fadb210052 clean up all created files 2023-08-14 11:54:56 -04:00
c105a187d9 fix duplicate implicit reference
# Conflicts:
#	doc/src/Speed_kokkos.rst
2023-08-14 11:54:22 -04:00
d74f86f2cd indexing bugfix for compute global/atom 2023-08-14 11:50:23 -04:00
c5b35970dc disable *all* MPI-IO related testing 2023-08-14 11:50:12 -04:00
5626836995 disable MPI-IO based restart writing (for now) 2023-08-14 11:50:02 -04:00
53111f8c0e bugfix for pair style dpd/gpu from Trung 2023-08-14 11:47:49 -04:00
e0ca512f50 avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-14 11:40:26 -04:00
e87bad43f9 flag maintenance branch 2023-08-03 14:26:47 -04:00
27d065a682 sync with develop 2023-08-03 11:33:14 -04:00
f1dd7f1415 Merge tag 'patch_2Aug2023' into maintenance
LAMMPS feature release 2 August 2023
2023-08-03 11:14:29 -04:00
554db7daaf Merge pull request #3873 from akohlmey/next_patch_release
Step version strings for next release
2023-08-03 08:14:14 -04:00
dea8050a8a Merge pull request #3870 from akohlmey/lammps-gui
Add simple LAMMPS GUI using Qt library
2023-08-03 01:02:18 -04:00
3c24e4fbf3 fix typo 2023-08-02 23:53:32 -04:00
8d5343ea23 temporary skip showing broken temp file setting on macOS 2023-08-02 23:46:44 -04:00
3f1f08d4c0 add setting support for selecting the LAMMPS plugin shared object 2023-08-02 23:33:51 -04:00
2a82ed9494 add accelerators for tabs and layout tweaks 2023-08-02 21:36:04 -04:00
f6732f028c support running with Kokkos + OpenMP 2023-08-02 21:06:30 -04:00
91fdf6918d Merge pull request #3874 from lammps/perlmutter
Add missing path to Kokkos Perlmutter Makefile
2023-08-02 19:55:18 -04:00
07b36025e2 small doc fix from @sjplimp 2023-08-02 17:56:02 -04:00
6f6eb1dbb1 update TODO list 2023-08-02 17:54:40 -04:00
c800a2c676 add menu entry to reset to default settings 2023-08-02 17:52:56 -04:00
2808a78822 more updates to preferences dialog and supporting code. almost done. 2023-08-02 17:28:34 -04:00
498ca44310 Add missing path to Kokkos Perlmutter Makefile 2023-08-02 18:43:54 +00:00
97d406f2ff update TODO list with some new ideas 2023-08-02 13:53:31 -04:00
e493519c12 more hotkeys and have Ok/Cancel on preferences dialog handled properly 2023-08-02 11:05:35 -04:00
dfcd3f945e first pieces of preferences dialog 2023-08-02 07:02:20 -04:00
2711917a6e grammar 2023-08-02 07:01:30 -04:00
dfb614bd42 fix memory leak 2023-08-02 05:40:56 -04:00
56b50d6580 ensure final newline when saving to file 2023-08-02 05:37:56 -04:00
c918bdeb07 fix a couple of bugs that would hang the app waiting for log output 2023-08-02 05:25:24 -04:00
c99d0f5452 cmake cleanups 2023-08-02 04:58:38 -04:00
1fa2060175 Merge remote-tracking branch 'github/develop' into lammps-gui 2023-08-02 04:10:19 -04:00
8a53c66bef refactor. add LammpsWrapper class to hide plugin defines and interface changes. 2023-08-02 01:49:39 -04:00
57b6543886 Merge pull request #3859 from akohlmey/opencl-intel-single-fixes
Address GPU package issues with OpenCL on Intel GPU with single-only hardware (e.g. Xe)
2023-08-02 00:49:17 -04:00
310ede65d9 apply coding standard checks 2023-08-01 20:49:38 -04:00
f76300c4f8 do not build packages automatically but use explicit targets 2023-08-01 20:42:10 -04:00
22a9f869ea change version date 2023-08-01 18:39:42 -04:00
ea5a20afc5 add missing versionchanged tags 2023-08-01 18:39:20 -04:00
f1cda322fe make it LAMMPS GUI version 1.0.0 since we're including it in the stable version 2023-08-01 18:20:44 -04:00
4f1946f307 update LAMMPS GUI docs 2023-08-01 18:19:18 -04:00
6c8291fa15 Merge pull request #3861 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-08-01 17:10:33 -04:00
f2bc41a83c we should be ok with CMake 3.16 as minimum version again. 2023-08-01 15:38:07 -04:00
fd9af7d5c9 this is packaging/install for visual studio only 2023-08-01 15:32:24 -04:00
b9682fc6fd zip file packaging for windows 2023-08-01 14:38:48 -04:00
1f829dd2e9 ignore install folder created by VS 2023-08-01 08:20:22 -04:00
b67de91feb rename script 2023-08-01 04:29:13 -04:00
d38ec56f3a more tweaks. avoid warnings. get dependencies for imageformats. 2023-08-01 04:28:54 -04:00
44cec03729 set environment variables to find potentials and frc files 2023-08-01 04:11:57 -04:00
89b205a08e must use tar to preserve symlinks 2023-08-01 03:48:57 -04:00
6b50daf5b7 Merge branch 'collected-small-fixes' into lammps-gui
# Conflicts:
#	cmake/CMakeLists.txt
2023-08-01 03:07:56 -04:00
418b2c3df0 integrate wrapper script for linux 2023-08-01 03:00:33 -04:00
488b4d46cd fix minor issues 2023-08-01 02:36:43 -04:00
0d7687cd02 strip debug info only on files, not symlinks. get deps for Qt platform plugins 2023-08-01 02:28:56 -04:00
349cf728b1 various tweaks, remove debug info, delete backward system libs 2023-08-01 02:13:48 -04:00
5fdeefe0ac Linux deployment script 2023-08-01 01:34:08 -04:00
be9d246b93 install runtime deps on Linux 2023-08-01 01:05:38 -04:00
fbf05fb9a9 copy runtime libs/dlls during install 2023-08-01 00:32:57 -04:00
33e893dbed cleanup. must include lammps-gui in install targets. windows cross-deploy 2023-07-31 17:22:26 -04:00
49d411e7c1 update 2023-07-31 14:43:09 -04:00
b5a5cf1c96 support zooming image with mousewheel 2023-07-31 14:32:10 -04:00
d41bf628c7 display number of threads in use for LAMMPS instance in status bar 2023-07-31 07:59:39 -04:00
2f159df3b7 changes for portability with Qt 5.12 on Ubuntu 20.04LTS 2023-07-31 07:04:25 -04:00
0a0184221c custom message box is more readable and wider 2023-07-31 05:09:08 -04:00
68454b3f73 small help window tweak 2023-07-31 02:12:32 -04:00
cadc45d41d implement quick help dialog 2023-07-31 01:01:00 -04:00
75254bf305 simplify. only look for Qt5 at the moment. 2023-07-31 01:00:36 -04:00
72ea2673dd update LAMMPS manual and README file 2023-07-31 00:07:32 -04:00
6d58910c5c Add new VS configuration for compiling LAMMPS GUI 2023-07-30 20:56:45 -04:00
e899a07b4c Show current working directory and share space with progress bar. Show/hide the other. 2023-07-30 20:39:48 -04:00
c95bf2c14b add image viewer dialog for write_dump image output, help can open link to manual 2023-07-30 19:23:42 -04:00
1c8b9e9467 Windos portability 2023-07-30 15:54:06 -04:00
2eca0f2634 Merge branch 'lammps-gui' of github.com:akohlmey/lammps into lammps-gui 2023-07-30 13:35:36 -04:00
93b2f24841 update installer background image 2023-07-30 13:35:08 -04:00
12fee35d78 fix bugs and typos 2023-07-30 13:32:46 -04:00
9e5dcfcf78 update for packaging a .dmg file w/o CPack (untested) 2023-07-30 13:10:11 -04:00
080d868e40 mention setting QT_FONT_DPI in README file since it has no effect in the binary 2023-07-30 11:50:00 -04:00
ac9163447c minor layout and behavior tweaks 2023-07-30 07:23:32 -04:00
05c8d260d9 use OpenMP with maximum number of threads by default
we still honor OMP_NUM_THREADS, if present.
2023-07-30 02:43:00 -04:00
e23176d633 no more rpath fixing needed. add icon to disk image 2023-07-30 02:41:35 -04:00
b3766384c3 fixup rpath for lmp executable so it can find libomp 2023-07-30 00:54:08 -04:00
2d6ae69048 include updates from @rbberger 2023-07-30 00:11:40 -04:00
81790e1c44 update DMG installer background image with instructions 2023-07-29 21:27:36 -04:00
a2503711d0 Merge branch 'lammps-gui' of github.com:akohlmey/lammps into lammps-gui
# Conflicts:
#	tools/lammps-gui/lammpsgui.cpp
2023-07-29 21:11:38 -04:00
d9f4ce04af integrate packaging related changes, build script for GUI 2023-07-29 21:03:24 -04:00
b75407684f more accurate pattern matching 2023-07-29 13:49:21 -04:00
62ec8e744a WIP on preferences dialog 2023-07-29 13:40:36 -04:00
cb5470ece3 add dialog checking whether to discard changes in a modified buffer 2023-07-28 07:36:25 -04:00
bb96707ec8 add support for "modified" indicator to window title 2023-07-28 07:12:21 -04:00
c1d690d190 implement drag-n-drop for files 2023-07-28 05:04:19 -04:00
7a9694b849 update TODO file 2023-07-28 01:15:03 -04:00
2da71bd2d6 improve cmake settings for creating an app bundle 2023-07-28 01:04:34 -04:00
739bffa5e6 accept sphinx 7.1 2023-07-27 19:20:35 -04:00
e6e5be4477 move initialization of plugin before opening input
This way we can load the shared library from the current folder
since the file opening may switch working directory.
2023-07-27 12:08:48 -04:00
034b7458bc add dummy help menu button 2023-07-27 11:53:23 -04:00
a8de49769b add missing entry 2023-07-27 10:43:20 -04:00
f170d8a56d update todo list 2023-07-27 09:13:04 -04:00
2644c064e1 update version number and "about info" to also show whether LAMMPS was loaded dynamically 2023-07-27 09:09:06 -04:00
32091d9f32 fix typo in plugin interface API 2023-07-27 08:21:17 -04:00
dd25bac428 fix typo in plugin interface API 2023-07-27 08:20:02 -04:00
a2657c67dd fix typo 2023-07-27 04:47:45 -04:00
1697d1edf6 embed font and icon and make use of them 2023-07-27 04:41:50 -04:00
056c60839c portability to macOS 2023-07-27 04:07:03 -04:00
f81ee57c97 add button to stop a run via lammps_force_timeout() 2023-07-27 03:21:34 -04:00
da0669d988 implement running LAMMPS asynchonously in a separate thread 2023-07-27 02:56:07 -04:00
a62d1be3e6 add icons to menu bar 2023-07-26 22:39:09 -04:00
f3e54cada1 small layout tweaks 2023-07-26 18:54:24 -04:00
1698587a40 add a readme file 2023-07-26 18:25:25 -04:00
e0ed11a053 add option to load LAMMPS library dynamically at runtime as plugin 2023-07-26 18:25:13 -04:00
0120c7b8b7 add permanent text field for status to status bar 2023-07-26 08:43:55 -04:00
3287d79e9d tweak/correct highlighting 2023-07-26 08:43:26 -04:00
cde3328927 update todo list 2023-07-26 08:42:08 -04:00
c96e4d59da print more config info in about dialog 2023-07-26 02:33:50 -04:00
89b92e8b13 make "warning" boxes on errors "critical" 2023-07-26 02:33:32 -04:00
e6dc5822c3 more flexible font search 2023-07-26 02:33:06 -04:00
984a311dce make compatible with windows cross-compiler 2023-07-26 01:29:30 -04:00
e548c0bde6 add todo list 2023-07-25 23:39:29 -04:00
e4dde8ebd4 fix shortcut implementation for log windows 2023-07-25 23:15:19 -04:00
368be8ac39 update list of keywords for VIM syntax highlighting 2023-07-25 21:40:54 -04:00
6e0aaab973 first stab at LAMMPS input file syntax highlighting 2023-07-25 21:35:38 -04:00
8b9174821a capture stdout and display in dialog window 2023-07-25 16:01:02 -04:00
f7881f4de5 add global error message buffer for exceptions creating a LAMMPS instance 2023-07-25 13:08:26 -04:00
5d34cc624d temporarily disable highlighting a line 2023-07-25 13:06:52 -04:00
ab792acbe5 catch errors via library interface and present dialog displaying them 2023-07-25 13:06:27 -04:00
276b89366a add global error message buffer for exceptions creating a LAMMPS instance 2023-07-25 13:05:27 -04:00
7eb2afa994 integrate syntax highlight code from example (uses c++ syntax currently) 2023-07-25 12:20:48 -04:00
5da462670f add menu hotkeys and shortcuts 2023-07-25 12:19:10 -04:00
5d1251df27 properly canonicalize filename 2023-07-25 12:18:47 -04:00
4fd648c11e add copyright message 2023-07-25 12:18:00 -04:00
a402d2c6d8 simplify, move redundant operations to functions, update coding style 2023-07-25 10:16:20 -04:00
908e925b8f add minimal about dialogs 2023-07-25 00:39:47 -04:00
a49a1b644e update main widget to CodeEditor with line numbers and highlight. Open file from command line. 2023-07-25 00:13:53 -04:00
b87ced52b4 first minimal stab at LAMMPS GUI 2023-07-24 19:07:33 -04:00
497659a4c7 consolidate use of cstdint and cinttypes, with the latter being a superset of the former 2023-07-24 16:29:54 -04:00
c2ceb0d9e4 Merge branch 'patch-5' of github.com:evoyiatzis/lammps into collected-small-fixes 2023-07-23 17:19:10 -04:00
6422565048 Update CONTRIBUTING.md
Fixing a small typo
2023-07-23 12:22:02 +03:00
732566c8a9 mention that class members should be initialized in the constructor, not the header. 2023-07-21 19:32:47 -04:00
cbee2dd86d Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-07-21 17:27:06 -04:00
a4a206e601 Merge pull request #3865 from lammps/compute-init-flags
More fine grained monitoring if computes were initialized
2023-07-21 14:58:37 -04:00
21d4be321a must lower test epsilon with single precision FFTs and pppm used 2023-07-21 12:12:53 -04:00
cccc362b3f improve error messages 2023-07-21 11:28:09 -04:00
9669bf3d3b move creation of internal computes and variables before lmp->init() so they are initialized 2023-07-21 11:25:44 -04:00
2da908190b make error messages consistent and improve their grammar 2023-07-21 11:24:57 -04:00
0b57ea246c update dump styles to use Compute::is_initialized() 2023-07-20 21:48:51 -04:00
78880c9099 update reset_atoms image to call Compute::init_flag() as a workaround 2023-07-20 21:28:45 -04:00
c7996b506a make use of Compute::is_initialized() and Compute::init_flags() 2023-07-20 20:31:48 -04:00
6c6258371b add init_flags() and is_initialized() methods 2023-07-20 20:31:16 -04:00
b725f5da28 Merge pull request #3864 from stanmoore1/kk_meam_issue
Fix compile bug in Kokkos MEAM styles
2023-07-20 18:20:52 -04:00
c441a999f1 fix typos 2023-07-20 17:59:40 -04:00
7d46165c2a Fix compile bug in Kokkos MEAM styles 2023-07-20 13:31:34 -06:00
e299fa9aab add option to skip building for multiple GPU archs 2023-07-20 14:00:21 -04:00
c42ec8a647 create toplevel README file when building for static Linux or macOS multiarch 2023-07-19 18:14:03 -04:00
f26064d9a5 also install the bench folder into ${datadir} 2023-07-19 17:46:21 -04:00
66403c93ad add preset and support for building serial multi-arch macOS executables 2023-07-18 18:55:27 -04:00
7aec563b86 building lammps-shell requires pkg-config 2023-07-18 17:02:48 -04:00
021eeae860 add workaround for failing overhead estimation test on (Intel) GPUs that only support single precision 2023-07-18 13:24:11 -04:00
34fcf1361f Merge remote-tracking branch 'github/develop' into opencl-intel-single-fixes 2023-07-18 12:16:42 -04:00
164b254602 Merge pull request #3860 from akohlmey/fix-for-fix-adapt
Small refactor to better handle diamflag in fix adapt and fix adapt/fep
2023-07-18 11:56:11 -04:00
2e2624d719 update loop over adapt fixes logic 2023-07-18 11:10:41 -04:00
cea202ebe9 include file is not needed 2023-07-18 11:09:09 -04:00
7a04e048fe make certain radvary is initialized in constructor 2023-07-18 11:08:59 -04:00
1057fa9b00 move diamflag from fix adapt and adapt/fep to base class for cleaner code 2023-07-17 22:17:05 -04:00
dba4d9ebbc Merge pull request #3855 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-07-17 19:00:40 -04:00
74c5ca0996 move definition of struct containing double to avoid failure on Intel Xe GPU 2023-07-17 18:34:03 -04:00
fa4a3a0622 using NBOR_PREFETCH=2 gives errors with Intel Xe GPUs set to 0 2023-07-17 18:33:21 -04:00
d27ab47ed9 for clarity 2023-07-17 18:32:18 -04:00
3568cced4b update comment 2023-07-17 09:52:44 -04:00
27aa6898f8 modernize access for fixes and computes 2023-07-16 20:24:22 -04:00
89d82fde22 modernize access to list of fixes 2023-07-16 15:20:36 -04:00
fd0a72eab5 modernize and consolidate style across all three temper command variants 2023-07-15 12:37:12 -04:00
77bdcb3e19 small doc style update 2023-07-15 12:36:41 -04:00
baac049aed update LAMMPS input file syntax highlighting for recent changes 2023-07-15 12:25:03 -04:00
5e1c722b10 Merge branch 'develop' into collected-small-changes 2023-07-14 20:09:27 -04:00
e6873bb7c8 modernize code 2023-07-14 20:08:34 -04:00
78d3d4948f fix off-by-one bug in argument parsing 2023-07-14 20:08:21 -04:00
2090d33d5f Merge pull request #3848 from ndtrung81/amoeba-gpu-bugfix
Bugfix for AMOEBA/HIPPO GPU
2023-07-14 18:32:58 -04:00
be2e437cec use approximation for erfc() on OpenCL for Intel since the OpenCL version seems broken 2023-07-14 10:08:59 -04:00
620c60122a should not use pow() for computing cube, use multiplication. 2023-07-14 10:08:09 -04:00
02d189fb23 avoid false positive with static code analysis 2023-07-13 10:53:56 -04:00
e2d7c54409 Merge pull request #3851 from hammondkd/doc-fixes
Documentation: swap "parsed-literal::" for "code-block:: LAMMPS" in Syntax sections
2023-07-12 23:26:17 -04:00
acb0b89833 fix typos 2023-07-12 20:48:36 -04:00
6907543e9d highlight if/then/elif/else everywhere, but revert for general keywords 2023-07-12 20:25:49 -04:00
df2cfe28c4 Merge pull request #3850 from jibril-b-coulibaly/BPM
BPM package: allow bonded atoms to be excluded from neighbor lists if BPM cannot break + doc update
2023-07-12 18:38:08 -04:00
24de6377d3 handle more commands with arguments for more consistent syntax highlighting 2023-07-12 14:43:04 -04:00
fe95dbc82f enforce all special_bonds weights to be 1.0 when overlay/pair is used 2023-07-12 11:37:17 -06:00
751dc1cfb6 improve pygments lexer to detect more text to highlight and for more consistency 2023-07-12 12:28:03 -04:00
3b859094bf there is no mandatory group-ID for both commands 2023-07-12 12:27:15 -04:00
7d88a351f5 Merge branch 'develop' into doc-fixes 2023-07-12 11:41:15 -04:00
6e65744d1a Merge pull request #3844 from akohlmey/collected-small-fixes
Collected small fixes
2023-07-12 11:40:02 -04:00
eb52112a57 Merge branch 'develop' into collected-small-fixes 2023-07-11 23:07:52 -04:00
9e049147be remove accidental commit 2023-07-11 19:50:37 -04:00
fe2a275531 update list of known commands 2023-07-11 19:40:14 -04:00
6efa8526ba work around pygments issue 2023-07-11 19:39:54 -04:00
6123883324 Replaced parsed-literal:: with code-block:: LAMMPS under "Syntax" 2023-07-11 17:57:22 -05:00
4bfffce703 merge conflict 2023-07-11 17:15:27 -05:00
0f89a8b2ca explicit special_bonds commands for 1-2 coul weight equal to zero 2023-07-11 10:42:26 -06:00
564a8e88c1 use blanks on both sides of comparison operators not only one, remove blanks next to parenthesis 2023-07-11 10:31:16 -04:00
3328389baf Merge pull request #3814 from rohskopf/jax
JAX ML-IAP Unified connection & examples
2023-07-11 07:15:18 -04:00
4d8ef552c4 remove dead code, trim namespace imports 2023-07-10 22:42:49 -04:00
c63c9711d5 update remaining ellipsoid example dump output for OVITO compatibility 2023-07-10 19:42:48 -04:00
a4b3306b7c fix error message 2023-07-10 18:48:13 -04:00
cb27cb644f Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-07-10 13:11:24 -04:00
254afdd938 Merge pull request #3849 from jibril-b-coulibaly/doclink
fix typo for broken links in doc
2023-07-10 13:10:38 -04:00
469ffc7aba Merge pull request #3845 from ndtrung81/dielectric-updates2
Update and bugfix for the DIELECTRIC package
2023-07-10 11:50:23 -04:00
55343d715c update URL 2023-07-09 21:39:51 -04:00
2607212363 update for upstream changes 2023-07-09 21:21:39 -04:00
63c28337ab Merge branch 'develop' into collected-small-fixes 2023-07-09 21:20:07 -04:00
91b16c5945 make certain conductivity class member is always initialized 2023-07-09 21:10:44 -04:00
60b45f9766 correct error message 2023-07-09 18:01:19 -06:00
0718114a67 fix typo for broken links in doc 2023-07-09 17:43:39 -06:00
75a2557e82 fix bugs where an Atom::tag value was stored in an int and not a tagint 2023-07-09 15:41:39 -04:00
d6412dc97b Attempted to resolve issues with switching from acctyp4 to acctyp3 in tep, fieldp since the changes in PR #3675, noting some changes with Intel OCL PR #3663 2023-07-08 00:50:19 -05:00
651ed1960d add per-atom data bugfix from Stan for fix ave/histo and fix ave/histo/weight 2023-07-07 18:29:28 -04:00
6a8ca34ce8 Merge pull request #3843 from dsbolin/gran_heat
Minor bug fix and enhancements for granular heat transfer
2023-07-06 21:09:23 -04:00
a3b9914f62 make error messages consistent with keyword values yes/no. Allow coul weight for 1-2 bonds to be zero for break no to eliminate bonded atoms from neighbor list when bonds cannot break 2023-07-06 17:48:49 -06:00
8665da6824 Merge pull request #3842 from lammps/rigid-gravity-doc
Add gravity keyword info to fix rigid doc page
2023-07-06 15:36:43 -04:00
6f289df980 enable and apply clang-format 2023-07-06 15:05:36 -04:00
6d8f5a38ea improve error messages 2023-07-06 15:03:38 -04:00
bf0372280e remove dead code 2023-07-06 14:59:09 -04:00
3e4b66378a typo 2023-07-06 14:06:31 -04:00
55b7b3d999 whitespace fixes 2023-07-06 14:03:07 -04:00
b66a5cd225 fix another typo 2023-07-06 13:31:00 -04:00
cac8247383 Modified doc page for pair granular to include flux as extra pairwise quantity 2023-07-06 11:19:22 -06:00
6e41ac7ead fix typo 2023-07-06 09:14:00 -07:00
02845483d2 add gravity keyword info to fix rigid doc page 2023-07-06 09:08:15 -07:00
8ae5ab57fc non-ellipsoid particles you have a 1,0,0,0 quaternion and 1,1,1 shape 2023-07-06 09:17:27 -04:00
fcf30f4c58 modernize example for dumping ellipsoid info to visualize with OVITO 2023-07-06 09:16:58 -04:00
146245e6ae Merge pull request #3834 from lammps/mdi-wrapper-tweak
Make QM wrappers more MDI-compatible with QM energy
2023-07-06 03:31:20 -04:00
afe2226797 Merge pull request #3830 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-07-06 00:39:42 -04:00
ef3de795c5 Merge pull request #3839 from stanmoore1/kk_makefiles
Kokkos Makefiles
2023-07-06 00:37:26 -04:00
ad14862cd0 Merge pull request #3827 from jtclemm/BPM
Bugfix and documentation corrections for BPM+Granular packages
2023-07-06 00:35:58 -04:00
d57e1be942 avoid division by zero in angle style dipole 2023-07-04 08:13:06 -04:00
9031d79791 Add Makefile for Perlmutter 2023-07-03 21:47:47 +00:00
9dd5ceaf4e Kokkos Makefiles 2023-07-03 15:06:23 -06:00
677ff15740 Gran/heat changes 2023-07-03 11:52:41 -06:00
268faf935b avoid overeager flagging of errors for arguments to derived classes 2023-07-03 10:32:24 -04:00
d23cebf9f1 must copy wheel to olddir when -w flag is not given 2023-07-03 09:53:59 -04:00
b7bfc86eaf remove unused files still available and used in download-build-jpeg-png branch 2023-07-02 07:07:12 -04:00
5878040f26 skip undesired 'make install' targets from bundled Kokkos library 2023-07-01 18:44:57 -04:00
900c6cf545 remove unused variable 2023-07-01 18:27:35 -04:00
c1213c5222 use dynamic/dof and extra/dof consistently. remove compatibility note in docs. 2023-06-30 16:27:07 -04:00
55918ebabf sphinx-tabs 3.4.1 is now available directly 2023-06-30 16:17:04 -04:00
83528f02e8 whitespace 2023-06-29 22:10:31 -04:00
02498925c5 only fail on too small periodic domain in z direction if 3d system. 2023-06-29 22:07:04 -04:00
ab1e090e0e neighbor list skin is added to custom cutoff automatically 2023-06-29 21:32:04 -04:00
b7024288b6 add check to disallow custom neighbor list cutoffs larger than the communication cutoff. 2023-06-29 21:20:07 -04:00
14462d8f80 join strings 2023-06-29 16:13:16 -04:00
b0b26d9d3a silence compiler warning 2023-06-29 07:32:52 -04:00
a50993dac1 update docs for create_bonds 2023-06-28 10:06:31 -04:00
5d027fc92c error out when many bonds creation cutoff is larger than periodic domain 2023-06-28 09:50:27 -04:00
a4cba99ff9 Attempted to update slabcorr() in pppm/dielectric 2023-06-27 23:55:57 -05:00
89c4d43a87 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-06-27 17:53:14 -04:00
906eecdbd7 clarify the temperature computation in compute temp 2023-06-27 17:53:06 -04:00
c347de7850 improve error messages 2023-06-26 16:12:15 -04:00
c332103938 make short read detection bugfix work in parallel 2023-06-26 15:20:29 -04:00
46a9f0a08c change QM Python wrappers to use ENERGY instead of PE as MDI command 2023-06-26 11:08:04 -07:00
d4e705b059 enable and apply clang-format 2023-06-26 10:59:03 -04:00
d813519493 make handling of masses consistent and simplify code 2023-06-26 10:52:12 -04:00
d1980031ef remove more duplicate semicolons 2023-06-25 06:02:17 -04:00
92c118b29f replace for (;;) with while (true) 2023-06-25 05:56:51 -04:00
bfa39a37ff apply clang-format 2023-06-25 05:47:21 -04:00
fab01c7d5f Remove extra semicolons 2023-06-24 20:26:08 -06:00
a38e0fb47b restore clang-format comments 2023-06-23 08:22:31 -04:00
e9a06a0654 correct and reformat error messages for short reads 2023-06-22 11:49:56 -04:00
ffda6596da detect and flag short reads with missing lines in utils::read_lines_from_file() 2023-06-22 10:48:07 -04:00
558298ac04 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-06-21 15:05:11 -04:00
e95b10f24a update VMD plugin headers to the latest version 2023-06-21 06:44:09 -04:00
e4b50a610e avoid segfaults if a dump is created and followed by run pre no 2023-06-21 06:44:08 -04:00
6d6f57aeff cosmetic 2023-06-20 16:17:11 -04:00
fcc3c99e2b avoid segfaults if a dump is created and followed by run pre no 2023-06-20 13:31:16 -04:00
6791651b62 add else branch to make coverity scan happy 2023-06-20 09:41:55 -04:00
af3d971023 allow longer argument strings to avoid failues with unit tests 2023-06-19 18:49:43 -04:00
c5d9f901d9 Merge pull request #3829 from JohnLucas1/fixpair_bugfix
fix pair bugfix
2023-06-19 15:13:39 -04:00
104d175a85 Merge pull request #3822 from ilia-nikiforov-umn/patch-1
Update lib/kim/README
2023-06-19 14:39:43 -04:00
585e47c01a Merge pull request #3826 from srtee/patch-3
debug fix_modify press for press/berendsen
2023-06-19 14:25:49 -04:00
f5d9e78659 Merge pull request #3819 from stanmoore1/kk_sycl
Pair SNAP tuning for Kokkos SYCL
2023-06-19 14:25:14 -04:00
d6f93a5253 Merge pull request #3821 from stanmoore1/kk_npair_workaround
Temporarily disable team policy for Kokkos ghost neigh list build due to kno…
2023-06-19 14:24:48 -04:00
c08182801f Merge pull request #3825 from akohlmey/remove-obsolete-fortran-interface
Remove obsolete fortran interfaces
2023-06-19 14:20:35 -04:00
0adb355001 Merge pull request #3823 from akohlmey/collected-small-fixes
Collected small fixes
2023-06-19 14:04:55 -04:00
838be24af4 Fixing argument parsing increment 2023-06-19 10:15:06 -06:00
542aa203da correct typo in fix pair documentation 2023-06-18 20:42:45 -05:00
6ccf5f107c fix a bug in fix pair 2023-06-18 20:39:18 -05:00
21fb50f37b correct logic bug 2023-06-18 07:40:04 -04:00
2cea819e7f cosmetic 2023-06-18 07:24:42 -04:00
5196e4422b debug fix_modify press for press/berendsen 2023-06-18 17:51:15 +10:00
70823cac50 remove dead code 2023-06-17 23:30:36 -04:00
e2e9170dfa protect a couple more fixes from segfaults from errors in derived classes 2023-06-17 18:52:57 -04:00
753a0bd386 remove obsolete Fortran interfaces from examples/COUPLE folder 2023-06-17 18:31:11 -04:00
5eba9d7ee3 update regex for change to version output 2023-06-17 18:04:54 -04:00
f193a87426 correct CMake syntax 2023-06-17 18:04:38 -04:00
058d817335 whitespace 2023-06-17 17:45:16 -04:00
a3de790a0d include git descriptor info when compiling develop or maintenance version 2023-06-17 15:01:17 -04:00
9231ec6dbe avoid segfault on deleting callback when there is an error in the constructor or a derived class 2023-06-17 14:39:32 -04:00
37ca3f9af8 apply clang-format 2023-06-17 14:38:59 -04:00
60d060eeb1 fix logic bug 2023-06-17 14:38:49 -04:00
ce75691eae address issues flagged by coverity scan 2023-06-17 00:35:05 -04:00
6f5e5746b3 Update lib/kim/README
Fix some typos and update to non-deprecated form of kim commands
2023-06-16 12:21:42 -05:00
2d3bbd2e72 Temporarily disable team policy for ghost neigh list build due to known bug 2023-06-16 10:52:21 -06:00
bb9dc960b7 Use updated values from @cjknight 2023-06-16 10:26:01 -06:00
a20ed8e5e4 improve error messages for dump style custom 2023-06-16 12:13:22 -04:00
59c5ed63e3 programming style 2023-06-16 12:12:23 -04:00
74c4eb1063 indicate that LAMMPS was built from a development version 2023-06-16 12:12:12 -04:00
9673c22cc7 Merge pull request #3818 from akohlmey/next_release
Update version strings for upcoming release
2023-06-15 14:30:40 -04:00
0df1542be1 Pair SNAP tuning for Kokkos SYCL 2023-06-15 10:22:35 -06:00
1144a01658 Merge pull request #3815 from akohlmey/collected_small_changes
Collected small changes and fixes for the next feature release
2023-06-15 10:01:54 -04:00
55d767e416 make sure intermediate results are 64-bit compatible, so the won't overflow 2023-06-15 01:51:12 -04:00
e01bde5be5 avoid null pointer dereference 2023-06-15 01:50:07 -04:00
4eb602e0d4 improve error messages and apply clang-format 2023-06-14 22:18:08 -04:00
b8dda7ebfe documentation formatting and spelling fixes 2023-06-14 22:08:30 -04:00
d19d12e9e1 Merge branch 'develop' into collected_small_changes 2023-06-14 21:55:16 -04:00
4d02c6f26f update version strings for upcoming release 2023-06-14 21:50:27 -04:00
162f243ebc Merge pull request #3797 from Compizfox/develop
Include bond forces in `compute stress/cartesian`
2023-06-14 21:31:41 -04:00
77898e4a86 update log files for fix widom 2023-06-14 18:28:51 -04:00
57f82924f5 Merge branch 'develop' into collected_small_changes 2023-06-14 18:24:18 -04:00
618fa815cc Merge pull request #3812 from wmbrownIntel/intel_fixes_2023Jun
Misc Fixes for Intel Package
2023-06-14 18:21:34 -04:00
634c6cdc13 Merge pull request #3632 from arghdos/eam_teampolicy_optimization
Implement a "caching in LDS" approach for EAM to improve performance in HIP
2023-06-14 15:38:54 -04:00
4faebaf4ed add log files for fix pimd/langevin 2023-06-14 14:53:06 -04:00
82f664acd4 update log files for BODY package styles 2023-06-14 14:43:29 -04:00
27908139ae whitespace 2023-06-14 14:14:47 -04:00
c83dc1ff30 fix STORE global -> fix STORE/GLOBAL 2023-06-14 13:52:54 -04:00
0564d79570 Fix SYCL compile error with GNU make, see https://github.com/kokkos/kokkos/pull/6218 2023-06-14 10:52:47 -06:00
0cd566a417 Fix compile error for HIP 2023-06-14 10:43:30 -06:00
80f3b6699e Merge pull request #3817 from jrgissing/bond/react-charge_rescale+other_small_fixes
Bond/react: rescale_charges fix
2023-06-14 12:29:07 -04:00
8a738fabcb must initialized triclinic variable in constructor 2023-06-14 12:12:18 -04:00
b225c94f59 remove variable shadowing instance in base class 2023-06-14 12:12:04 -04:00
fcd234f723 Merge branch 'develop' of github.com:lammps/lammps into eam_teampolicy_optimization 2023-06-14 09:28:44 -06:00
e27895b232 Merge pull request #3816 from ndtrung81/body_bugfix
Bugfix for body rounded polyhedron and polygon pair styles for non-lj units
2023-06-14 11:28:13 -04:00
0314c9892c silence compiler warnings 2023-06-14 10:26:38 -04:00
3b37c92b87 consistently print error when box has changed to triclinic without redefining kspace style 2023-06-14 10:06:01 -04:00
96b8bbbdc9 Merge branch 'develop' into develop 2023-06-14 15:09:51 +02:00
e6cd79e0e9 Fix doc links 2023-06-14 15:04:46 +02:00
8aeb059ce8 Update doc/src/compute_stress_cartesian.rst
Co-authored-by: Axel Kohlmeyer <akohlmey@gmail.com>
2023-06-14 15:03:35 +02:00
bc52d863b4 cosmetic 2023-06-14 08:48:01 -04:00
e831e54a21 Merge pull request #3811 from rbberger/python_and_library_fixes
PyLammps and Library interface changes
2023-06-14 08:25:32 -04:00
beabb4effe remove dead code 2023-06-14 03:48:59 -04:00
2afa07655f set code owner for fix pimd/langevin 2023-06-14 03:44:11 -04:00
dfd384eeff some more formatting and programming style improvements 2023-06-14 03:40:38 -04:00
494341ba48 error out when using barostat without pressure couple or vice versa 2023-06-14 03:40:12 -04:00
6f69e5ae02 initialized all pointers to null in initializer list 2023-06-14 03:18:37 -04:00
8984b89feb use consistent comments, apply clang-format 2023-06-14 03:18:17 -04:00
233fb67eaa Reverted the zero net induced charge constraint, updated the fix polarize doc page for q_scaled and q 2023-06-14 00:28:24 -05:00
03b25dcbaa update error checks 2023-06-13 21:25:58 -04:00
14a27e98c9 fix for when deleting atoms 2023-06-13 21:09:29 -04:00
105ef5f103 Rescaled EPSILON with a length scale (rounded radii) for contact detection 2023-06-13 14:24:12 -05:00
f128de7dd0 Bugfix from @ndtrung81 for indexing bug when tallying per-atom Coulomb energy 2023-06-13 15:13:16 -04:00
64508e08aa pylammps: use library API to return available groups 2023-06-12 22:49:40 -06:00
d7ecf41ff6 pylammps: use library API for variable access 2023-06-12 22:49:40 -06:00
2f7c3bf959 pylammps: reduce dependency to info command output 2023-06-12 22:49:34 -06:00
53f90fff3d final touch 2023-06-12 21:28:51 -04:00
603e397919 get_totalcharge routine 2023-06-12 20:20:45 -04:00
2ba83a4d8f add versionadded keyword 2023-06-12 15:31:37 -04:00
82cea7a546 small doc updates for added pppm_table keyword 2023-06-12 15:31:03 -04:00
90416faf0a Merge branch 'develop' into intel_fixes_2023Jun 2023-06-12 15:18:08 -04:00
bc87c69d60 Merge branch 'python_and_library_fixes' of github.com:rbberger/lammps into python_and_library_fixes 2023-06-11 17:48:26 -06:00
68a73f1c33 library: return atom and force styles via extract_global 2023-06-11 17:46:58 -06:00
c214f654b6 update communicated rxn instances to doubles 2023-06-11 19:27:58 -04:00
23552d4b7a refactor to carry around extra per-reaction values 2023-06-11 17:59:16 -04:00
92e069b19d add fortran unit tests for lammps_last_thermo 2023-06-10 21:36:56 -04:00
62b388b48f consolidate LAMMPS data type constants and enums and use the same names 2023-06-10 19:23:11 -04:00
0dab1910db Small updates to benchmark script in INTEL/TEST 2023-06-10 13:34:16 -07:00
da9637e94c Adding std namespace specifier to transcendentals in intel pkg 2023-06-10 13:33:10 -07:00
acaa2b7f9b pylammps: update email 2023-06-10 11:35:36 -06:00
0e7d91b611 add missing documentation 2023-06-10 07:45:52 -06:00
235e98ee6a pylammps: only capture all thermo if PYTHON package is enabled 2023-06-09 17:40:06 -06:00
fe45b766c3 pylammps: make use of lammps_last_thermo
this now avoids parsing LAMMPS output to extract thermo data, but instead uses
the new lammps_last_thermo library function
2023-06-09 17:40:06 -06:00
ecf7c24e87 Avoid static int in lammps_last_thermo 2023-06-09 17:40:06 -06:00
f6b0981474 Fixing some issues introduced into verlet_lrt_intel.cpp 2023-06-09 14:05:41 -07:00
e0cbcff1f9 Simplying normal force calculation 2023-06-09 10:43:00 -06:00
89b37396eb Merge branch 'BPM' of github.com:jtclemm/lammps into BPM 2023-06-09 09:57:39 -06:00
04a31c33e2 Changing output of fforce in pair granular single() 2023-06-09 09:57:23 -06:00
2cb87bc9a2 Intel package should not reset atom sort frequency if it is 0 (disabled). 2023-06-08 21:47:30 -07:00
54286ce4dd Merge pull request #3781 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-06-08 22:03:23 -04:00
cbf062f383 Merge pull request #3809 from jtclemm/sdpd-examples
Updating SDPD examples
2023-06-08 20:06:35 -04:00
4cad18a057 document Fortran version of lammps_last_thermo 2023-06-08 19:59:47 -04:00
ce38bb988d add lammps_last_thermo support to swig, plugin and fortran interface 2023-06-08 19:12:59 -04:00
2e1190bfee Fixing issue with when atom styles using torque are mixed with intel pair styles not using torque. Generating runtime error for mixing intel gayberne style with non-ellipsoid intel pair styles. 2023-06-08 15:02:17 -07:00
5d4f9abf5b add unit tests for c-library interface and plain python module 2023-06-08 15:15:28 -04:00
81854cd03e change type keyword to return a pointer to static location for better portability 2023-06-08 14:55:45 -04:00
b093f1aac1 move versionadded tags to the top, replace some missed TBD with version info 2023-06-08 13:11:19 -04:00
3f6032e80d add python module interface to lammps_last_thermo, small consistency fixes 2023-06-08 13:05:37 -04:00
8ddac8cf02 search through the python folders recursive to detect all pending version tags 2023-06-08 12:46:41 -04:00
a2c968386e include versionadded tag 2023-06-08 12:46:00 -04:00
36cac1e83d make sure the field_data vector size always matches the size of the keywords vector 2023-06-08 12:45:41 -04:00
dc9cefbf21 Merge pull request #4 from jibril-b-coulibaly/BPM
clean up documentation for BPM bond styles
2023-06-08 09:08:39 -06:00
d6ad52ea66 allow wildcards with "cutoff" keyword to fix reaxff/species
this also switched to using fmtlib for column aligned output formatting
and re-applies clang-format.
2023-06-08 09:46:33 -04:00
2272d8dd20 add new library interface function to documentation 2023-06-08 09:45:12 -04:00
c851c7304c Update documentation for compute stress/cartesian,
and split the doc page compute_stress_profile into compute_stress_cartesian and compute_stress_curvilinear
2023-06-08 11:03:21 +02:00
dd0bba6ac7 whitespace 2023-06-07 20:37:53 -04:00
7551219d81 correct multitype unittest for -DLAMMPS_SMALLSMALL 2023-06-07 20:16:26 -04:00
9235377b44 Merge branch 'develop' into collected-small-fixes 2023-06-07 20:05:06 -04:00
f3ff8dac66 clean up documentation for BPM bond styles 2023-06-07 16:23:06 -06:00
491e152289 add API to library interface to access last thermo data 2023-06-07 16:21:01 -04:00
de561737a3 update docs 2023-06-07 15:28:35 -04:00
af25bd87fb Merge branch 'develop' into collected-small-fixes 2023-06-07 15:23:54 -04:00
30e6b8b9b6 make more reliable with explicit loops using exported nfield value 2023-06-07 15:19:58 -04:00
620cca34d4 add accessor to nfield, make certain field types are initialized early 2023-06-07 15:19:13 -04:00
b7afe412dc Updating SDPD examples 2023-06-07 13:08:46 -06:00
6360c02daa use explicit const references 2023-06-07 14:04:41 -04:00
5fdba37492 Merge pull request #3807 from jtclemm/BPM
Misc minor patches/features in BPM/Granular packages
2023-06-07 13:55:00 -04:00
2f88153f06 Implementing feature request for runtime control of pppm_table in Intel package. 2023-06-07 10:43:51 -07:00
73693ca25b Merge pull request #3787 from oywg11/ilp-water-graphene
Registry-Dependent Potential for Interfaces of Water with Graphene
2023-06-07 11:48:43 -04:00
f2f8e139d8 Add optional keywords to arguments for ke/pair/bond forces 2023-06-07 16:03:32 +02:00
57f166670f fix versionadded macro so it is detected when actual version is added 2023-06-07 06:38:52 -04:00
37d894db51 update/clarify docs 2023-06-07 06:30:07 -04:00
bd3e7882e6 remove unused include and related statements 2023-06-07 06:25:47 -04:00
f406aa1492 Merge pull request #3792 from evoyiatzis/master
Inclusion of bond & angle contributions to "compute stress/mop"
2023-06-07 06:09:58 -04:00
53b1af7720 LAMMPS programming style/conventions updates 2023-06-07 05:11:53 -04:00
045b230587 Fix shifted coordinates:
Add `boxlo` to the bin centers
2023-06-07 10:43:57 +02:00
0f925f7a39 reformat, add versionadded marker 2023-06-07 04:33:37 -04:00
6c7a5d2f1e Using bigint for Intel package neighbor overflow detection for large local sizes. 2023-06-06 23:56:31 -07:00
bbfd909be6 Adding redundant call to sync Intel package arrays with native arrays for methods such as MC that do not need pre_reverse. 2023-06-06 23:56:16 -07:00
b81b1f5ecc switch dump yaml/netcdf thermo output to use new caching API. remove old API. 2023-06-06 22:40:13 -04:00
74a9cfc110 Merge pull request #3660 from Yi-FanLi/pimd_langevin
Add fix style pimd/langevin
2023-06-06 21:31:28 -04:00
14acb3e0ca add multitype data type and unittest (including tests for ubuf) 2023-06-06 21:29:50 -04:00
f83867787c update error message 2023-06-06 18:17:39 -04:00
5ff6fd9aad rename kBT to kt 2023-06-06 18:14:28 -04:00
a415d732fc rename Langevin init 2023-06-06 18:11:01 -04:00
ee6b12ee30 Correct reference info 2023-06-06 18:04:26 -04:00
0ec5274873 Merge branch 'develop' into BPM 2023-06-06 14:40:51 -06:00
e954d8f050 correctly indicate OPT package version of pair style 2023-06-06 16:11:03 -04:00
eafabf0fb1 update .gitignore 2023-06-06 16:10:11 -04:00
c4d49324b5 various documentation updates
- spelling fixes
- formatting conventions
- grammar fixes and clarifications
- full integration into manual build procedure
2023-06-06 16:08:50 -04:00
51b45d6830 fix small format issues 2023-06-06 22:16:41 +08:00
f85474c9ec fix a typo 2023-06-06 22:03:33 +08:00
0ef0419a98 rename function names in opt version 2023-06-06 21:45:51 +08:00
9cc6839a8b Merge branch 'develop' into collected-small-fixes 2023-06-06 08:36:25 -04:00
409bced5fd update affiliations 2023-06-06 08:35:42 +08:00
c558de3ce0 remove the fprintf debug outputs 2023-06-06 08:27:14 +08:00
0978308f5e Merge pull request #3806 from stanmoore1/kk_update_3.7.2
Update Kokkos library in LAMMPS to v3.7.2
2023-06-05 19:41:34 -04:00
966efd8bd5 Add missed changes 2023-06-05 10:33:30 -06:00
2e09ba2702 Update CMake 2023-06-05 10:08:20 -06:00
a12133ce03 Update Kokkos library in LAMMPS to v3.7.2 2023-06-05 09:59:38 -06:00
8eed55b56c Update compute_stress_mop_profile.cpp 2023-06-05 18:54:26 +03:00
ead5a28d35 Update compute_stress_mop.cpp 2023-06-05 18:53:45 +03:00
a2d58c878b Merge pull request #3803 from rohskopf/sna-kk-switchflag
Fix Kokkos SNAP cutoff factor with `switchflag = 0`
2023-06-05 11:13:00 -04:00
ed9eaadad8 Merge pull request #3804 from xwuupb/develop
Use $t variable in the reaxff HNS example
2023-06-05 10:58:39 -04:00
0cff31060b Update compute_stress_mop.cpp 2023-06-04 16:10:24 +03:00
c25999d208 Update compute_stress_mop_profile.cpp 2023-06-04 16:08:33 +03:00
3782eeee2b remove whitespace from compute_stress_mop.rst 2023-06-04 13:47:54 +03:00
51851c2f4d remove whitespace from compute_stress_mop_profile.cpp 2023-06-04 13:45:52 +03:00
d8fad4db15 remove white space from compute_stress_mop.cpp 2023-06-04 13:45:00 +03:00
a0057d674f Update compute_stress_mop_profile.cpp 2023-06-04 13:40:31 +03:00
3282470cf5 update the citation information 2023-06-04 10:19:13 +08:00
bf8a4402ce update log files in the examples 2023-06-04 10:17:21 +08:00
196641927f correct a typo in the doc file 2023-06-03 23:07:55 +08:00
b5ab173763 update the doc file 2023-06-03 23:03:12 +08:00
63f3d183fe rename log files of examples 2023-06-03 23:02:45 +08:00
f507e30d36 update input files of examples 2023-06-03 22:52:45 +08:00
a40b87b05c rename potential files 2023-06-03 22:46:33 +08:00
738a955c40 fix checkstyle issues 2023-06-03 22:37:57 +08:00
d85342cd6d Update test_compute_global.cpp 2023-06-03 16:04:40 +03:00
a25100120b update the doc file 2023-06-03 20:36:12 +08:00
8c6e2ca000 rename the opt pair style 2023-06-03 20:34:42 +08:00
2e7ca5f65c rename the pair style 2023-06-03 18:14:45 +08:00
250eac93dc fix bug in the reaxff HNS benchmark 2023-06-03 07:34:39 +02:00
a42bfb0e26 Make cutoff factor 1 instead of 0 to prevent zero valued descriptors 2023-06-02 17:26:40 -06:00
241f3b751e Unifying syntax for BPM bond options 2023-06-02 15:45:53 -06:00
40cd3bbdc4 add cache line size padding to avoid false sharing with OPENMP package 2023-06-02 17:13:39 -04:00
390888179f Update compute_stress_mop_profile.cpp 2023-06-02 20:24:32 +03:00
9dc1f45e1e Create/destroy local_contribution 2023-06-02 20:08:59 +03:00
28e3a741a8 declare local_contribution as pointer in compute_stress_mop_profile.h 2023-06-02 20:02:52 +03:00
c30762ca8b Update documentation for compute stress/mop/profile 2023-06-02 19:44:37 +03:00
e7ae02dd2a Code for bond contribution to stress/mop/profile 2023-06-02 19:33:15 +03:00
70507462e9 Include method for bond contribution & variables to compute_stress_mop_profile.h 2023-06-02 19:22:28 +03:00
8ef4e933b2 Fix bug when Kokkos border comm is on host 2023-06-02 10:17:38 -06:00
08ffd268bf remove unused symbolic constant 2023-06-02 09:43:58 +03:00
77340921ff Merge pull request #3800 from jrgissing/fix/deposit-per_atom_property_bug
fix deposit: per atom property bug
2023-06-01 14:19:53 -04:00
869780828b Merge pull request #3802 from stanmoore1/acks2_warnings
Fix (harmless) compiler warnings in Kokkos ACKS2
2023-06-01 12:57:55 -04:00
bda933e0db Merge pull request #3793 from srtee/reaxff-varstyle-efield
Enable `fix qeq/reaxff` with variable `fix efield`
2023-06-01 10:01:56 -04:00
a4f4f965e3 fix a bug in the codes 2023-06-01 21:45:52 +08:00
887534fd02 fix checkstyle 2023-06-01 21:12:11 +08:00
1189661edc revise the code files of standard version based on latest version of LAMMPS 2023-06-01 21:00:16 +08:00
c310616bb7 Update compute_stress_mop.rst to reflect the added keywords 2023-06-01 15:34:41 +03:00
c1cec45652 add keywords to specify contributions to stress/mop 2023-06-01 15:26:43 +03:00
f3bf20be8b The first three p_flags for iso should be 1. 2023-06-01 08:26:02 -04:00
6bc27db58c do not delete c_pe and c_press in destructor 2023-06-01 06:17:11 -04:00
b01db47b2d consistency in issuing errors between mop and mop/profile 2023-06-01 10:33:50 +03:00
ea6ece510e turning warning into errors for unsupported styles 2023-06-01 10:22:01 +03:00
a0461d29dd Update atom.cpp 2023-05-31 17:04:49 -04:00
5f8b0f56a5 Merge pull request #3790 from jrgissing/is_typelabel-function
add is_typelabel() variable function
2023-05-31 15:15:08 -04:00
cae2414126 Fix compiler warnings in Kokkos ACKS2 2023-05-31 13:09:07 -06:00
6138b2b1f7 fix grammar 2023-05-31 13:31:45 -04:00
90000ca166 update docs 2023-05-31 13:29:48 -04:00
cb02563d3d the potential keyword is not (yet) supported by fix efield/tip4p 2023-05-31 13:29:41 -04:00
c0602b6500 make using energy and potential keyword at the same time an error 2023-05-31 13:20:35 -04:00
4073241413 correct docs about label2type() function 2023-05-31 09:57:19 -04:00
69c5493631 silence compiler warning 2023-05-31 09:09:35 -04:00
8602ecd57f update/correct docs 2023-05-31 08:59:36 -04:00
4540427e2b add unit tests for is_typelabel() variable function 2023-05-31 08:50:21 -04:00
70709f2f08 simplify error messages 2023-05-31 08:25:45 -04:00
ddc34e03d6 Revert removal of copies of pointers 2023-05-31 09:50:50 +02:00
9ec55dcb1f silence compiler warning 2023-05-30 19:10:11 -04:00
088d870e20 check remaining per-atom initializations 2023-05-30 17:17:54 -04:00
2a799d45a9 Merge pull request #3795 from jwillma2/develop
Adding carbon SNAP potential files and example
2023-05-30 15:10:58 -04:00
da7a348089 simplify and shorten example, use symlinks, recreate logs 2023-05-30 14:24:32 -04:00
b3e9efcb50 Use system periodicity to find an equivalent position of the plane 2023-05-29 17:55:24 +03:00
3b38145d91 Update compute_stress_mop.cpp
Fixing sign issues because I was considering the theta angle to be formed by vectors x[atom2] - x[atom1] & x[atom3] - x[atom2] instead of x[atom1] - x[atom2] & x[atom3] - x[atom2] as done in lammps
2023-05-29 16:34:44 +03:00
86743bc0a6 Update compute_stress_mop.cpp
The angle was computed using the dot product of the vectors x[atom2] - x[atom1] and x[atom3] - x[atom2]. This is not consistent with the lammps convention where the angle is computed using the dot product between x[atom1]-x[atom2] and x[atom3]-x[atom2].
2023-05-29 10:59:18 +03:00
c934208a4a only update ivector if it still exists 2023-05-28 14:07:25 -04:00
f9ee2ad42b reorder thermo and dump output so dump styles include correct thermo data 2023-05-28 11:49:02 -04:00
f69b50408d improve error messages 2023-05-28 11:47:32 -04:00
4c4eb6ee1e improve error message 2023-05-28 00:49:52 -04:00
b28ee36f00 update documentation for compute stress/mop 2023-05-27 14:50:31 +03:00
458cce7699 Updating unit test for mop to reflect the contribution from bonds 2023-05-27 14:33:46 +03:00
01b481ec4f Small tweaks 2023-05-26 15:27:15 -07:00
16751b06b3 Add os env vars to allow more MPI procs 2023-05-26 12:52:51 -06:00
b5a1c6d47f Declare update per atom function 2023-05-26 11:25:29 -06:00
2e68930f2a Format readme 2023-05-26 11:21:13 -06:00
87850f31ca Add Kokkos instructions 2023-05-26 11:18:37 -06:00
fd87c1464a Merge branch 'jax' of https://github.com/rohskopf/lammps into jax 2023-05-26 10:49:30 -06:00
49b2c299a7 Add Kokkos example 2023-05-26 10:48:58 -06:00
6eb586e66f update_atom_energy initial 2023-05-25 21:03:32 -04:00
b7146c900f Add instructions 2023-05-25 18:58:56 -06:00
ff7bae1739 Add Kokkos getters 2023-05-25 18:43:18 -06:00
3d8df660c3 make rigid water examples more realistic and consistent. avoid warnings. 2023-05-25 18:08:42 -04:00
4174116014 Fix 1/2 factor in energy 2023-05-25 16:02:45 -06:00
3012426bd5 send eij to LAMMPS 2023-05-25 17:49:02 -04:00
1fd34ffac6 Update 2023-05-25 14:49:38 -06:00
edfb8cf100 Fixing double mixing of normal coeffs 2023-05-25 13:54:12 -06:00
58ee392579 Merge pull request #3 from akohlmey/pimd_langevin
Update to current develop and some cosmetic changes
2023-05-25 15:49:34 -04:00
ceed30e7c6 Fixing mistakes in doc pages 2023-05-25 12:58:57 -06:00
f26f397e08 avoid crashing when there are no bonds or no angles 2023-05-25 14:47:20 +03:00
8e6615918b avoid crashing when no bonds or no angles exist 2023-05-25 14:39:03 +03:00
35a55068d7 Add input padded rij from LAMMPS Cython side 2023-05-25 01:35:08 -06:00
29ba0e3f18 Update MLIAP JAX example to use jax.grad 2023-05-24 18:15:56 -07:00
b2e5f93d49 Use jax functions 2023-05-24 13:08:10 -06:00
d66504be81 Properly decorate energy/force compute 2023-05-24 11:39:05 -06:00
e246864682 Refactor compute_array() and compute_pressure():
Remove unnecessary copies of variables, declare variables locally so they are properly scoped
2023-05-24 17:03:57 +02:00
ecca46acf9 Include bond interactions in force 2023-05-24 17:03:33 +02:00
9ee40cceef fixing indexing issue and more sign problems for angle contributions 2023-05-24 17:01:13 +03:00
c7c8b065a2 fixing bug with sign issue for bond contribution in compute_stress_mop.cpp 2023-05-24 16:49:35 +03:00
25bff3e4ed fixing bug with sign for angle contribution in compute_stress_mop.cpp 2023-05-24 16:24:33 +03:00
df708a67a5 Code for angle contribution to stress/mop 2023-05-24 11:55:08 +03:00
0692ed3bd7 @evoyiatzis Include method for angle contribution & variables to compute_stress_mop.h 2023-05-24 11:47:15 +03:00
2855f18d02 Delete C_Willman_PRB2022.quadratic.snapparam 2023-05-23 12:58:34 -04:00
c95dcd7582 Delete C_Willman_PRB2022.quadratic.snapcoeff 2023-05-23 12:58:19 -04:00
a701a5e6cc Merge branch 'akohlmey:develop' into develop 2023-05-23 12:56:14 -04:00
0510ce7372 Carbon SNAP potential and example added 2023-05-23 12:29:25 -04:00
d190249e98 add documentation and checks 2023-05-22 00:10:01 +10:00
685255083e clean the duplicate info 2023-05-21 11:43:39 +08:00
91ac9ef3fc update doc file 2023-05-21 11:29:28 +08:00
276bc39a51 delete rst 2023-05-21 11:02:17 +08:00
3822e6ff0f add potential file that parameterized against with DMC reference data 2023-05-21 10:29:24 +08:00
28c9c274be Copy MLIAPUnified LJ example 2023-05-20 14:08:20 -06:00
6977f71eb0 Initial example 2023-05-20 13:53:22 -06:00
1d7a6f813b Update compute_stress_mop.cpp 2023-05-20 15:14:47 +03:00
90427c8750 Update compute_stress_mop.cpp 2023-05-20 15:12:42 +03:00
5da65bbd0a Code for bond contribution to stress/mop 2023-05-20 13:06:19 +03:00
36eb11f499 Include method for bond contribution & variables to compute_stress_mop.h 2023-05-20 12:59:34 +03:00
fe7a6fce29 make QEQ work with atom-style potential 2023-05-20 14:33:24 +10:00
8d0eb9b1f7 hook up efield variables to qeq/reaxff 2023-05-20 14:10:07 +10:00
5fac8f483e last typo 2023-05-19 23:51:01 -04:00
d7b7d1d323 make sure error messages not wrong 2023-05-19 23:48:41 -04:00
aaabe41b22 typo 2023-05-19 22:54:23 -04:00
ad7b27a67a correct logic 2023-05-19 22:27:28 -04:00
0a45d1f9ac Update variable.rst 2023-05-19 21:31:51 -04:00
b9f01f106e is_typelabel function 2023-05-19 21:20:34 -04:00
0dd26189d4 Adding missing factor in bpm/rotational single method 2023-05-19 13:52:35 -06:00
cb5934cbcd Adding option to doc files, clarifying normal forces in compute pair/bond local 2023-05-19 13:51:53 -06:00
7ec842d9cb Adding requested feature to normalize forces 2023-05-19 13:50:11 -06:00
0334ddb7c6 Update pair_ilp_water_2dm.rst 2023-05-19 22:57:45 +08:00
22d9c047f4 update doc file 2023-05-19 22:52:18 +08:00
7c14b750ef improve error message 2023-05-19 00:40:54 -04:00
9da310a33e spelling 2023-05-19 00:40:45 -04:00
842016e997 Merge branch 'develop' into collected-small-fixes 2023-05-19 00:13:15 -04:00
ed03d04a70 Merge pull request #3779 from lammps/fix-ttm-mod-arrays
Reorder fix ttm/mod 3d arrays to be consistent with fix ttm and fix ttm/grid
2023-05-18 18:33:25 -04:00
c73b7483b2 swtich loop order back to be consistent with rest of file 2023-05-18 11:47:20 -06:00
af71279df1 Merge branch 'fix-ttm-mod-arrays' of github.com:lammps/lammps into fix-ttm-mod-arrays 2023-05-18 11:44:31 -06:00
50858205f6 refresh log files for fix ttm/mod example 2023-05-18 11:43:54 -06:00
bbff6c25b3 add examples 2023-05-18 22:01:19 +08:00
3d35d68a4b add doc file 2023-05-18 22:00:03 +08:00
af04ecc532 add potential file 2023-05-18 21:59:07 +08:00
cc30c4478d add optmized verion of ilp_water_2dm 2023-05-18 21:58:40 +08:00
81a497adcd add standard version of ilp_water_2dm 2023-05-18 21:51:53 +08:00
6585151ce1 reorder loops to compute properties vector 2023-05-17 22:04:32 -04:00
d206f583c4 whitespace 2023-05-17 21:57:14 -04:00
f1aca8b71a formatting tweaks 2023-05-17 16:39:14 -06:00
d8ca6274e7 Merge branch 'develop' into pimd_langevin 2023-05-17 18:26:59 -04:00
10880332ed Merge pull request #3783 from Colvars/colvars-update
Update Colvars library to version 2023-05-01
2023-05-17 18:26:41 -04:00
5d66dc6659 apply clang-format 2023-05-17 17:50:15 -04:00
79f3eb6a4d remove debug code 2023-05-17 17:35:22 -04:00
8736f97792 remove dead code 2023-05-17 17:35:14 -04:00
39f61b6af3 Merge branch 'develop' into pimd_langevin 2023-05-17 17:30:49 -04:00
5be9eda905 Merge pull request #3780 from srtee/patch-3
Bugfix fix_efield.cpp for atom-style energy
2023-05-17 16:33:37 -04:00
377c652a83 Update Colvars library to version 2023-05-01
This update consists exclusively of bugfixes or maintenance-related changes.

The following is a list of pull requests in the Colvars repository since the previous update to LAMMPS:

- 532 Add XYZ trajectory reading feature
  https://github.com/Colvars/colvars/pull/532 (@jhenin, @giacomofiorin)

- 531 Delete objects quietly, unless explicitly requested via script (including VMD)
  https://github.com/Colvars/colvars/pull/531 (@giacomofiorin)

- 530 Append newline to log and error messages if not already present
  https://github.com/Colvars/colvars/pull/530 (@giacomofiorin)

- 528 Forward-declare OpenMP lock
  https://github.com/Colvars/colvars/pull/528 (@giacomofiorin)

- 527 Remove unneeded STL container
  https://github.com/Colvars/colvars/pull/527 (@giacomofiorin)

- 526 Allow collecting configuration files and strings before setting up interface
  https://github.com/Colvars/colvars/pull/526 (@giacomofiorin, @jhenin)

- 523 Fallback to linearCombination when customFunction is missing in customColvar
  https://github.com/Colvars/colvars/pull/523 (@HanatoK, @giacomofiorin)

- 522 Use iostream::fail() to check for I/O error
  https://github.com/Colvars/colvars/pull/522 (@jhenin)

- 520 Fix ref count
  https://github.com/Colvars/colvars/pull/520 (@giacomofiorin)

- 513 Set target temperature through a common code path
  https://github.com/Colvars/colvars/pull/513 (@giacomofiorin, @jhenin)

- 509 Safer detection of Windows with recent Microsoft Visual Studio versions
  https://github.com/Colvars/colvars/pull/509 (@akohlmey)

- 508 Update LAMMPS patching method to reflect Lepton availability
  https://github.com/Colvars/colvars/pull/508 (@giacomofiorin)

- 497 Increase the precision of write_multicol
  https://github.com/Colvars/colvars/pull/497 (@HanatoK)

- 496 Only perform MTS automatic enable/disable for timeStepFactor > 1
  https://github.com/Colvars/colvars/pull/496 (@giacomofiorin)

- 493 Remove unused branch of quaternion input function
  https://github.com/Colvars/colvars/pull/493 (@giacomofiorin)

- 489 Ensure there are spaces between the fields in the header
  https://github.com/Colvars/colvars/pull/489 (@HanatoK)

- 487 Use map of output streams, and return references to its elements
  https://github.com/Colvars/colvars/pull/487 (@giacomofiorin, @jhenin)

- 486 Remember first step of moving restraint
  https://github.com/Colvars/colvars/pull/486 (@jhenin)

- 485 Add decoupling option for moving restraints
  https://github.com/Colvars/colvars/pull/485 (@jhenin)

- 483 Update Lepton via patching procedure
  https://github.com/Colvars/colvars/pull/483 (@giacomofiorin)

- 481 Make file-reading operations of input data abstractable
  https://github.com/Colvars/colvars/pull/481 (@giacomofiorin)

Authors: @akohlmey, @giacomofiorin, @HanatoK, @jhenin
2023-05-17 13:29:00 -04:00
7c98d4dba3 avoid null pointer dereferences by allocating a buffer for at least 1 item 2023-05-17 10:26:33 -04:00
88d9d39bab Merge branch 'fix-ttm-mod-arrays' of github.com:lammps/lammps into fix-ttm-mod-arrays 2023-05-17 08:17:11 -06:00
d98b1e9f04 fix left/right indices 2023-05-17 08:15:42 -06:00
166301180b Merge pull request #3769 from stanmoore1/kk_optimize
Kokkos package optimizations
2023-05-17 07:13:04 -04:00
e044ccbbb3 Bugfix fix_efield.cpp for atom-style energy 2023-05-17 16:41:21 +10:00
4f57026dc0 whitespace 2023-05-16 21:15:01 -04:00
2e58a9ecf8 whitespace 2023-05-16 21:13:48 -04:00
05b8082e3c code cleanup 2023-05-16 17:03:34 -06:00
0d31ab9c88 one more change 2023-05-16 16:51:00 -06:00
2b9c65855a swap 3d array indices in fix ttm/mod 2023-05-16 16:38:12 -06:00
858fd4cc2c Small optimization 2023-05-16 15:23:31 -06:00
b1ee177c0a Must use local variable for lambda capture 2023-05-16 12:43:19 -06:00
b9256fa492 Reduce memory allocations 2023-05-16 11:09:37 -06:00
a84470383b Merge pull request #3777 from ilia-nikiforov-umn/kim_adapt
Add "scale" attribute to pair_kim to be used with fix adapt
2023-05-16 07:08:40 -04:00
2328cae55f Merge branch 'develop' of https://github.com/lammps/lammps into kk_optimize 2023-05-15 10:48:51 -06:00
91e0d0411b one more programming style tweak 2023-05-15 02:04:17 -04:00
cf51c94be0 update unit test for presence of Pair::extract() function in pair style kim 2023-05-15 02:02:36 -04:00
ed958d8aed Merge branch 'develop' into kim_adapt 2023-05-15 02:01:01 -04:00
d584f2fe50 follow LAMMMPS' programming style more closely 2023-05-15 01:58:45 -04:00
17747a3c58 moved scaling to immediately after compute and removed virial scaling 2023-05-14 15:07:31 -05:00
2d18883e8b Merge pull request #3755 from jtclemm/doc-edits
Reorganization of the programming guide
2023-05-13 17:22:41 -04:00
c76e85c445 Merge pull request #3770 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-05-13 15:19:13 -04:00
d6d825258e Merge pull request #3771 from lammps/variable-current
Change how variables check if computes are current
2023-05-12 19:26:36 -04:00
8414d23c2b use symbolic constants 2023-05-12 18:04:37 -04:00
ac4cf2dc99 Merge pull request #3776 from inflowencer/develop
Fixed read-in of initial electron temperature file
2023-05-12 18:03:50 -04:00
96af466f4a as a few details to the discussion of programming languages and their standards 2023-05-12 15:45:55 -04:00
cd79276309 small formatting tweaks 2023-05-12 15:45:24 -04:00
aa069b2cfb fix typos 2023-05-12 15:44:54 -04:00
9a8640ca1a Merge pull request #3767 from lammps/vector-variable
Vector-style variable enhancements
2023-05-12 15:18:08 -04:00
0abb217d59 whitespace 2023-05-12 15:13:29 -04:00
5f34f53ab7 also use 1-based indexing when writing out the electron temperature 2023-05-12 15:06:34 -04:00
cbb0558778 correct comments 2023-05-12 15:06:03 -04:00
b54d39adf9 minor editing changes 2023-05-12 11:18:07 -06:00
f1a3d0ce5a whitespace 2023-05-12 11:14:34 -04:00
9ef4d7f320 allow internal variables in reset_atoms to be used before first run 2023-05-12 09:06:29 -06:00
54b2a5c17a allow internal variables in reset_atoms to be used before first run 2023-05-12 09:04:42 -06:00
dd3d4e2b50 bump minimum requirement for building docs to python 3.8 2023-05-10 19:09:13 -04:00
4c65aa572d Prefer custom python interpreter set via -DPython_EXECUTABLE if possible 2023-05-10 18:48:47 -04:00
7c4883704c upgrade sphinx-tabs 2023-05-10 18:46:55 -04:00
f74947a359 Fixed read-in of initial electron temperature file 2023-05-10 15:15:10 -07:00
a92e0030e8 whitespace 2023-05-10 17:24:29 -04:00
d2361ffe7d add workaround for reset_atoms image 2023-05-10 17:23:34 -04:00
f015aaff84 compile time compatibility with swig 4.1 2023-05-10 16:54:05 -04:00
9890987eec Merge remote-tracking branch 'github/develop' into variable-current 2023-05-10 16:53:49 -04:00
ee5a300643 updated doc for kim adapt 2023-05-09 09:24:53 -05:00
4c51264b15 explain how to keep pairs in the neighbor list even if the scaling factor should be 0.0 2023-05-09 08:24:02 -04:00
c54ff43806 compile time compatibility with swig 4.1 2023-05-09 02:59:12 -04:00
9512568fd8 improve pair_coeff error message for pair styles derived from PairHybrid 2023-05-09 02:40:55 -04:00
a6310f170a streamlined scaling implementation 2023-05-08 18:37:51 -05:00
820899cd5e use more obvious pair style dpd thermostat examples 2023-05-08 11:51:30 -04:00
200f740c06 update variable doc page to explain new behavior 2023-05-08 09:48:27 -06:00
fceff845c7 Merge pull request #3754 from kawai125/bugfix-fix_ttm_mod-read_electron_temperatures
fix ttm_mod
2023-05-08 11:02:14 -04:00
49ac79fcdd change error checks for computes that are not current 2023-05-08 08:55:40 -06:00
abe238ce61 use correct spelling for semicolon 2023-05-08 05:54:33 -04:00
a6f60405b6 resolve formatting issues and add a few style tweaks from languagetool.org 2023-05-08 05:52:18 -04:00
69f60c5222 bugfix in fix_ttm 2023-05-08 10:36:29 +09:00
8ed42f6e4b remove unused communication API 2023-05-07 21:36:29 -04:00
7342f27fb1 clarify download info 2023-05-06 22:40:58 -04:00
7b46f15068 use macOS consistently (missed a few places in the last round) 2023-05-06 22:40:58 -04:00
b1d0f4afab correct timer time output format for timeouts > 24 hours 2023-05-06 22:40:58 -04:00
15116a0456 Merge pull request #3766 from stanmoore1/kk_min_bug
Fix issues with Kokkos minimize and fix addforce
2023-05-06 22:39:39 -04:00
d8584bb15a Hacky first pass at kim scaling 2023-05-06 16:31:30 -05:00
0cd95d64e2 Merge pull request #3768 from jrgissing/fix_reaxff/species-variable_Nlimit
reax/species: variable input for Nlimit keyword
2023-05-06 11:15:48 -04:00
6074303f4a whitespace 2023-05-05 19:13:49 -06:00
806af5322e Kokkos package optimizations 2023-05-05 19:08:02 -06:00
b9161843dc more robust variable error checks 2023-05-05 17:41:42 -04:00
aa62a2a9cf Merge branch 'doc-edits' of https://github.com/jtclemm/lammps into doc-edits 2023-05-05 11:44:32 -04:00
56f06bc9e0 Reordering styles by priority, misc clean ups 2023-05-05 09:41:54 -06:00
c328761c78 Merge branch 'develop' into doc-edits 2023-05-05 11:30:48 -04:00
0facd4cf66 support vector variable definitions with embedded blanks 2023-05-05 01:06:55 -04:00
1b7f9439ad simplify parse_vector() method by using Tokenizer class 2023-05-04 21:14:25 -04:00
366b64571d add a few unit tests for static vector style variables 2023-05-04 20:44:46 -04:00
0de35dee29 spelling 2023-05-04 20:34:41 -04:00
6ffa720f87 Merge branch 'develop' into vector-variable 2023-05-04 20:14:51 -04:00
b3130a2878 Merge pull request #3763 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-05-04 20:13:46 -04:00
0b71371597 reax/species: variable input for Nlimit keyword 2023-05-04 20:10:13 -04:00
67b6a1de70 fixup broken unit tests 2023-05-04 20:09:57 -04:00
0c10184a69 whitespace, simplify 2023-05-04 20:09:45 -04:00
5da1df5004 add versionadded tag 2023-05-04 20:08:36 -04:00
93100adbe0 debugging and doc pages 2023-05-04 16:24:15 -06:00
269f07a137 fix a few more sphinx issues and inconsistencies 2023-05-04 16:45:30 -04:00
d4554fc89e Merge branch 'develop' into doc-edits 2023-05-04 16:35:55 -04:00
77ea3ed215 reduce sphinx warnings 2023-05-04 16:35:49 -04:00
8fe4394ada spelling 2023-05-04 16:04:08 -04:00
042829c40d Start document about per-atom properties and atom data access 2023-05-04 15:57:11 -04:00
40f7c90474 correct underline 2023-05-04 15:56:31 -04:00
ccc1b200c0 add output option for vector-style vars 2023-05-04 12:52:11 -06:00
a0d9854e11 more thorough tests and PBC handling for compute stress/cartesian 2023-05-04 03:46:18 -04:00
de45437cc9 apply clang-format 2023-05-04 03:32:59 -04:00
b61e06a40f must initialize fp to avoid crash in destructor 2023-05-04 03:32:39 -04:00
42e090d945 replace tabs and remove trailing whitespace 2023-05-04 02:21:55 -04:00
936b24e3b0 allow vector variable to be initialized 2023-05-03 16:36:05 -06:00
c9cfc952aa polishing variable doc page and code 2023-05-03 14:06:21 -06:00
5a52369fff Reading mask too 2023-05-03 10:41:43 -06:00
b560559b0a Fix issues with Kokkos minimize 2023-05-03 10:37:41 -06:00
62858115b2 offset positions so bin indices are >= 0 even for positions < 0 2023-05-03 07:36:27 -04:00
2542a7e840 avoid integer overflow 2023-05-03 00:39:59 -04:00
89d59fad61 Merge branch 'develop' into collected-small-fixes 2023-05-02 20:47:33 -04:00
8054923941 Merge pull request #3761 from lammps/count-types
New compute count/type command
2023-05-02 20:44:55 -04:00
db38d99f3c Merge pull request #3758 from stanmoore1/kk_fuse
Fuse some Kokkos kernels to reduce launch latency for small systems
2023-05-02 20:36:48 -04:00
25bc0bd365 Merge pull request #3762 from akohlmey/phana-cmake-build
Update phonon tool (phana) and add CMake support
2023-05-02 19:49:17 -04:00
81523b7ba3 Merge branch 'patch-2' of github.com:srtee/lammps into collected-small-fixes 2023-05-02 17:42:02 -04:00
7ab30aa468 add versionadded tag 2023-05-02 17:32:57 -04:00
3e3ed89f33 avoid out-of-range access if an angle/dihedral/improper type is set to 0 2023-05-02 17:30:23 -04:00
a8dcb3987a silence compiler warning 2023-05-02 17:29:06 -04:00
7b5fecfad7 make phana installation in LAMMPS compatible with ubuntu 18.04LTS 2023-05-02 17:24:38 -04:00
36632e3356 Clarifying how BPM package works 2023-05-02 14:28:17 -06:00
6d050374c3 fix compilation with -DLAMMPS_BIGBIG 2023-05-02 16:24:43 -04:00
3f8cd4577c update unit test 2023-05-02 16:20:29 -04:00
b6e211dd62 consistently declare variables when used only 2023-05-02 16:20:20 -04:00
e8a77c61ac whitespace 2023-05-02 16:19:53 -04:00
3119434932 apply clang-format 2023-05-02 15:59:34 -04:00
8a9091595d Revert "use more obvious representation of 2^53"
This reverts commit ff29ef7d31
as it conflicts with how MSVC interprets 1L (it would require
1LL which creates issues with other compilers).
2023-05-02 15:56:45 -04:00
22eb09ee0f sunc with GHub version 2023-05-02 13:44:04 -06:00
aa4447413a expand to angles, dihedrals, impropers 2023-05-02 13:39:37 -06:00
fdf9288e52 Merge branch 'develop' into kk_fuse 2023-05-02 10:11:55 -06:00
d13096e08b improve error message 2023-05-02 12:08:55 -04:00
8ca1e2d417 add OpenMP suppression for GNU 13 compilers 2023-05-02 11:50:15 -04:00
c5e4f7c5fd modernize 2023-05-02 11:49:55 -04:00
d2bb1b420d simplify and cleanup 2023-05-02 11:49:13 -04:00
eacb420e21 whitespace 2023-05-02 10:34:36 -04:00
12135bac77 add unit tests for compute count/type 2023-05-02 10:22:37 -04:00
56f791eec2 avoid uninitialized data access for scalar data 2023-05-01 23:52:35 -04:00
c8d5b9e4d0 avoid uninitialized pointers 2023-05-01 23:52:04 -04:00
ba747e5544 suppress bogus warnings with gcc 13.0 and later 2023-05-01 21:10:18 -04:00
ff29ef7d31 use more obvious representation of 2^53 2023-05-01 20:57:32 -04:00
b38544a9e8 apply clang-format 2023-05-01 20:43:05 -04:00
73b8bb8617 fix bug that breaks compilation with -DLAMMPS_BIGBIG 2023-05-01 20:41:44 -04:00
a2b74c8466 small doc update 2023-05-01 20:23:13 -04:00
39a77064e0 update so it can be built either standalone or as subdir with LAMMPS 2023-05-01 20:14:52 -04:00
478058119b integrate CMake build procedure for tools/phonon 2023-05-01 20:14:52 -04:00
d1f64c02d8 show/explain alternate LJ potential using the minimum energy distance 2023-05-01 20:13:37 -04:00
53848be081 improve error messages 2023-05-01 19:55:14 -04:00
41a0196874 Merge pull request #3740 from stanmoore1/kk_sort
Add Kokkos support for atom sorting on device
2023-05-01 19:54:00 -04:00
dbcc19aef4 Fix uninitialized variables 2023-05-01 15:42:17 -06:00
f8058f039f Fix bug 2023-05-01 15:26:07 -06:00
fae0ef6cde update count/type doc page 2023-05-01 15:21:56 -06:00
ef9ce62aa8 update broken bond doc page 2023-05-01 15:17:19 -06:00
f1b29941fd Port changes to nve/sphere 2023-05-01 13:34:58 -06:00
76f9336de4 whitespace 2023-05-01 13:16:16 -06:00
cd972884ff Clarify with comment 2023-05-01 13:13:23 -06:00
757130f9d0 whitespace 2023-05-01 13:09:46 -06:00
fd65000afc Small refactor 2023-05-01 13:08:01 -06:00
059601734f Fix issues 2023-05-01 12:38:16 -06:00
370ec56207 Whitespace 2023-05-01 10:20:45 -06:00
e679936e0a Merge branch 'develop' into kk_sort 2023-05-01 09:43:12 -06:00
2fe423cc70 bug fix 2023-05-01 09:20:20 -06:00
c282d8d5d0 add group support to new command 2023-05-01 09:01:03 -06:00
f644f7078c doc page for new command 2023-04-29 18:50:15 -06:00
2c8a49bb26 new compute count_type 2023-04-29 18:14:24 -06:00
f66cf7c9e8 Revert testing change 2023-04-28 16:15:55 -06:00
24e7204b51 whitespace 2023-04-28 15:00:50 -06:00
29a2b58ab6 Small cleanup 2023-04-28 14:57:19 -06:00
235372d6e8 Fuse some Kokkos kernels to reduce launch latency for small systems 2023-04-28 14:40:59 -06:00
8d6c3a7536 Fix Markdown table in tools/tabulate/README.md 2023-04-28 14:50:09 +10:00
4a608dced6 Merge pull request #3756 from stanmoore1/triclinic_sort
Fix bug in atom sorting with triclinic boxes
2023-04-27 17:53:44 -04:00
b17f9ac10e Small tweak to docs 2023-04-27 15:21:30 -06:00
50adf2b340 Add a couple notes to the docs 2023-04-27 15:17:54 -06:00
7791ab728f Fix small issue 2023-04-27 11:25:34 -06:00
7c3deba4a6 whitespace 2023-04-27 11:21:31 -06:00
4705f46a30 Merge branch 'triclinic_sort' of github.com:stanmoore1/lammps into kk_sort 2023-04-27 11:10:17 -06:00
c95a349fae Small tweak 2023-04-27 11:07:04 -06:00
1f54dc3ac4 Port changes to Kokkos 2023-04-27 11:04:39 -06:00
a4d56b56ab Fix bug in atom sorting with triclinic boxes 2023-04-27 10:27:38 -06:00
787399f5e3 Reorganizing the programming manual and editing some text 2023-04-27 09:25:58 -06:00
449f5439ae fix grid index in read_electron_temperatures 2023-04-27 18:52:04 +09:00
89aa45e15c Merge branch 'develop' of github.com:lammps/lammps into kk_sort 2023-04-26 17:07:39 -06:00
717c3207d6 Merge pull request #3753 from akohlmey/tally-compute-warn
Add warning message when the callback for a /tally compute was not run
2023-04-26 18:29:40 -04:00
f68603703f add false positive 2023-04-26 15:35:03 -04:00
d4a3903ba3 improve error messages 2023-04-26 14:58:12 -04:00
367b0afb17 document additional pair style restrictions for /tally computes 2023-04-26 14:57:50 -04:00
9b9b14e614 add mechanism to record when Pair::ev_tally() was called and the corresponding callback functions 2023-04-26 14:49:57 -04:00
4aee151b0e Merge pull request #3745 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-04-24 23:52:57 -04:00
59e8b9370f plug memory leak in FixNHIntel class 2023-04-24 20:58:33 -04:00
58ec69c34a plug memory leak in FixNHIntel class 2023-04-24 20:58:18 -04:00
39fa2021e2 avoid 32-bit integer overflow when allocating memory for neighbor list copy 2023-04-24 20:45:49 -04:00
83f492a195 must initialize vest_temp to null to avoid segfaults 2023-04-24 20:44:44 -04:00
9f11cac393 updated apptainer build definitions for almalinux 8/9 2023-04-24 20:41:06 -04:00
933457acbe Templated functions calling math libraries should use type-aware calls 2023-04-24 19:55:39 -04:00
06f4099566 Vector masking is part of AVX512, not limited to Intel compiler 2023-04-24 19:54:19 -04:00
5624a78b17 Fix uninitialized memebr 2023-04-24 19:53:57 -04:00
217be1f274 improve error message handling for code shared between fix nvt/nph/npt 2023-04-24 17:32:47 -04:00
cbc635110a Merge pull request #75 from jtclemm/collected-small-fixes
Minor changes to the style/contribute modify pages
2023-04-24 16:59:38 -04:00
90496a663b Minor changes to the style/contribute modify pages 2023-04-24 14:31:18 -06:00
d76c9a198d fix spelling 2023-04-24 16:06:53 -04:00
b28e650308 add deprecation warning for cuboid and sphere keywords 2023-04-24 16:04:05 -04:00
3cd6c776e7 ignore GranSubModel styles until we have a more regularized granular pair style doc 2023-04-24 16:03:38 -04:00
a83c112e9f Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-04-24 15:41:46 -04:00
c1da9c26a1 Merge pull request #3746 from akohlmey/fix-dpd-source-region
Add support for a region keyword to fix edpd/source and fix tdpd/source
2023-04-24 12:46:42 -04:00
bbbdfd57e4 Merge pull request #74 from jtclemm/collected-small-fixes
Adding changes to doc page
2023-04-24 11:59:49 -04:00
289601e814 Adding changes to doc page 2023-04-24 09:29:25 -06:00
31a7d10756 silence compiler warning 2023-04-23 17:41:33 -04:00
07de4abc08 refactor and reformat granular submodels
- use override as needed
- delete default destructors
- make submodel data members protected and add getter functions
- remove unused constants
- import specific functions/constants from namespaces
- remove unused include files
- convert #define constants to static constexpr
- enable and apply clang-format
2023-04-23 17:41:23 -04:00
47e875142f update version string 2023-04-22 18:37:52 -04:00
b9c940926f silence compiler warnings 2023-04-22 17:50:41 -04:00
ddf801f08f add missing override properties 2023-04-22 15:10:47 -04:00
62c844d5ac update version string for stable release update 2023-04-22 14:56:44 -04:00
263b6d4d6f compilation fix for Fedora 38 from upstream 2023-04-22 14:32:11 -04:00
c6c470a2c9 compilation fix for Fedora 38 from upstream 2023-04-22 13:04:47 -04:00
4acca38a65 remove text that only applies to newer LAMMPS versions 2023-04-22 12:19:37 -04:00
4cf642b526 correct docs for fix edpd/source and fix tdpd/source 2023-04-22 12:12:38 -04:00
94f84409aa make choice of Sphinx version more conservative 2023-04-22 10:59:12 -04:00
6ca91b01a1 Merge branch 'develop' into collected-small-fixes 2023-04-22 10:59:05 -04:00
601f2bf137 Merge pull request #3747 from rbberger/doc_theme_upgrade
docs: upgrade lammps_theme based on sphinx_rtd_theme 1.2.0
2023-04-22 10:56:25 -04:00
4c0705a741 Be more specific about web browser support after tests on browserstack.com 2023-04-22 06:15:16 -04:00
2667543e0e docs: set language to en 2023-04-21 21:45:56 -06:00
f60ed39322 docs: upgrade lammps_theme based on sphinx_rtd_theme 1.2.0 2023-04-21 21:37:58 -06:00
3e05efa1f3 must initialize vest_temp to null to avoid segfaults 2023-04-21 18:13:18 -04:00
7c723b4852 add support for a region keyword to fix edpd/source and fix tdpd/source 2023-04-21 17:58:28 -04:00
77ad4fdac6 must initialize vest_temp to null to avoid segfaults 2023-04-21 17:47:06 -04:00
d1ecb206f6 fix spelling and reformat 2023-04-21 17:46:42 -04:00
4890d820f6 enable and apply clang-format 2023-04-21 12:27:14 -04:00
b7350188a4 use ubuf() to encode/decode tagints into communication buffers 2023-04-21 12:27:02 -04:00
30cdb635c2 modernize 2023-04-21 12:23:35 -04:00
8cfac6fd60 consolidate enum into header file 2023-04-21 12:23:03 -04:00
2197d62c2f Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-04-20 20:04:55 -04:00
e6e7121445 Merge pull request #3744 from jtclemm/granular-updates
Small fixes to GRANULAR
2023-04-20 19:51:52 -04:00
7c7e626097 Revert docs 2023-04-20 14:34:00 -06:00
b511681c2b Revert binsize change 2023-04-20 14:07:57 -06:00
5c8f3a0c95 avoid 32-bit integer overflow when allocating memory for neighbor list copy 2023-04-20 14:42:48 -04:00
6ef6d6f0b2 Fixing group mask bug in gran wall, clean up redundant nullptr assignments 2023-04-20 11:17:24 -06:00
b548a06270 Redefining already used variable name a->A in pair granular doc 2023-04-20 10:19:05 -06:00
c2027d7512 correct logic error when applying group masks 2023-04-20 08:51:09 -04:00
bf32d219d8 fix typo 2023-04-20 08:50:48 -04:00
313b3a6935 Fix typo 2023-04-19 14:09:55 -06:00
28d31dedc8 Add missing BinOp struct 2023-04-19 13:50:08 -06:00
b7ea2cc50c Merge branch 'develop' of https://github.com/lammps/lammps into kk_sort 2023-04-19 13:40:52 -06:00
b58368dc34 whitespace 2023-04-19 13:31:37 -06:00
cf2e55f4ac Update docs 2023-04-19 13:16:38 -06:00
f5e55bb6d9 Need to set var 2023-04-19 12:56:47 -06:00
5cb3d15ada Add Kokkos support for atom sorting on device 2023-04-19 12:47:38 -06:00
e99a41158e Merge pull request #3727 from taylor-a-barnes/taylor
Small enhancements to the mdi/qm fix
2023-04-19 14:22:11 -04:00
2cf690cc99 fix typo 2023-04-19 13:28:02 -04:00
58be6dcd52 Merge branch 'develop' into taylor 2023-04-19 13:27:36 -04:00
dab02394ce whitespace 2023-04-19 13:27:29 -04:00
29ad47cc0f cosmetic changes to comments and code structure 2023-04-19 10:22:10 -06:00
9aa8f1bfb1 Merge pull request #3739 from stanmoore1/kk_hash
Fix compile error with latest Kokkos `develop` branch
2023-04-19 12:08:53 -04:00
76afaefe45 Merge pull request #3735 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-04-19 09:50:30 -04:00
040a43b50b add false positives 2023-04-18 22:01:51 -04:00
a9e715bce8 KOKKOS updates 2023-04-18 22:01:39 -04:00
4e466d8840 whitespace 2023-04-18 21:49:55 -04:00
1404424071 Merge branch 'develop' into collected-small-changes 2023-04-18 21:49:32 -04:00
bc27e96d23 Merge pull request #3737 from athomps/gcmc-region-triclinic
Updated fix gcmc log file contents with correct species counts
2023-04-18 21:30:22 -04:00
f436bd69b5 Merge pull request #3734 from lammps/example-couple-lammps-spparks
Update examples/COUPLE for LAMMPS + SPPARKS (kMC code)
2023-04-18 21:29:52 -04:00
3b0eedeb08 Merge pull request #3731 from yury-lysogorskiy/patch-1
Update reference in pair_pace doc page
2023-04-18 20:52:46 -04:00
94c773ee03 Merge pull request #3738 from athomps/smtbq-cites
Updated SMTBQ doc page citations
2023-04-18 19:48:37 -04:00
c1eecf0b48 Fix compile error with latest Kokkos lib 2023-04-18 14:08:45 -07:00
c2a58a692a Updated SMTBQ doc-page citations 2023-04-18 14:25:32 -06:00
5547492d34 Updated log file contents with species counts 2023-04-18 14:03:04 -06:00
fcea2cc5b5 zero out fix external local data when allocated to avoid uninitialized data access 2023-04-18 09:53:01 -04:00
43cf7e9094 mention DIFFRACTION package under Restrictions 2023-04-17 08:57:02 -04:00
08bf9e2513 apply clang-format 2023-04-16 12:35:41 -04:00
a7460445bb simplify and modernize. apply clang-format. 2023-04-16 12:14:59 -04:00
7e4d180e57 silence compiler warnings 2023-04-15 22:00:42 -04:00
88dcad59af silence compiler warnings 2023-04-14 14:59:25 -04:00
213a6d8ac8 silence compiler warning 2023-04-14 14:49:59 -04:00
82e17c8aec add image outputs to both couple codes 2023-04-14 12:11:09 -06:00
32f9800943 testing new version of coupling 2023-04-14 11:00:59 -06:00
ca2222e11f update contact info 2023-04-13 20:06:35 -04:00
fbded8d8f4 include fix from @ndtrung81 2023-04-13 20:06:35 -04:00
8a3d0caffd consistently apply \vec{} macro to only the first text/character and not subscripts 2023-04-13 20:06:35 -04:00
bfe40a324a correct LaTeX formatting issues reported at https://matsci.org/t/latex-math-in-pair-amoeba-rst/47987/1 2023-04-13 20:06:35 -04:00
e506dd738b Merge pull request #3733 from stanmoore1/kk_pace_bug
Fix bug in Kokkos PACE
2023-04-13 19:15:51 -04:00
7f35ecffcc more edits 2023-04-13 12:55:38 -06:00
24365d7353 Allow UVM to compile 2023-04-13 12:33:44 -06:00
9279f6b385 Fix bug in Kokkos version of PACE 2023-04-13 12:33:31 -06:00
d685bf8962 Update pair_pace.rst 2023-04-13 11:01:04 +02:00
6e47e5284e Update reference in pair_pace.rst
Update reference to extrapolation grade paper (Phys Rev M)
2023-04-13 10:58:57 +02:00
a9c686dfcc Merge pull request #3729 from GenieTim/absmax-absmin-reduce
Introduce compute reduce minabs and maxabs
2023-04-12 18:24:15 -04:00
b3c00f3edf modernize a couple examples/COUPLE apps 2023-04-12 15:59:12 -06:00
09a9951c69 whitespace 2023-04-12 17:21:02 -04:00
56b5291529 Merge pull request #1394 from valleymouth/granular-kokkos
Kokkos exchange comm for fixes
2023-04-12 14:59:14 -04:00
4e33b1b867 Fix implementation of absmax 2023-04-12 09:28:15 +02:00
7a32152ee5 Implement maxabs and minabs atom reduction operations 2023-04-12 09:28:04 +02:00
382c09abcb Use correct var 2023-04-11 16:55:45 -06:00
12731f23a7 Fix more issues 2023-04-11 16:51:04 -06:00
4a760f5e81 Fix another bug 2023-04-11 15:05:08 -06:00
3249d9eba3 Fix bug in new code 2023-04-11 11:41:14 -06:00
dc4e4e6329 More tweaks 2023-04-10 14:01:01 -06:00
9a1250a9d7 Merge branch 'develop' of https://github.com/lammps/lammps into granular-kokkos 2023-04-10 12:46:13 -06:00
ff5b4e971d Merge pull request #3725 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-04-10 13:53:16 -04:00
96b696450c Fix GPU issues 2023-04-10 11:03:54 -06:00
96f3c88f0f Merge pull request #3714 from akohlmey/pair-lj-lepton-sphere
New pair styles lj/cut/sphere. lj/expand/sphere and lepton/sphere
2023-04-10 12:14:17 -04:00
13c4e4e8f2 Merge pull request #3728 from jtclemm/granular-updates
Patching various bugs in GRANULAR
2023-04-10 11:11:39 -04:00
415be03f6c improve dependency processing 2023-04-10 09:26:49 -04:00
52fc8f05ee update CMake script for PLUMED package to support cross-compilation to Windows 2023-04-10 09:23:19 -04:00
bc4d664f2b Fully integrate cross-compiling Plumed2 lib into CMake build system 2023-04-10 07:23:46 -04:00
f84a31dfdf change folder for patches, so we can set PLUMED_ROOT accordigly 2023-04-09 01:46:58 -04:00
71700b8765 use explicit target to update/copy precompiled plumed files 2023-04-08 18:07:03 -04:00
891c284754 avoid static code analysis warnings 2023-04-08 16:38:39 -04:00
d71de7cc38 handle exceptions in destructors 2023-04-08 16:36:52 -04:00
d5680f0c6d fix typo 2023-04-08 15:44:56 -04:00
a6a8f2c451 more tweaks for cross-compiling plumed for windows 2023-04-08 15:28:18 -04:00
a98a77041e add option to include PLUMED into cross-compiled Windows binaries 2023-04-08 15:05:46 -04:00
f7d6592aa6 avoid crash in Pair::single() test on certain inpus 2023-04-08 04:00:10 -04:00
fbf1fcc605 small corrections. remove redundant statement. 2023-04-07 23:48:58 -04:00
227e41e50b spelling 2023-04-07 23:45:47 -04:00
c03ff3b61a fix broken link 2023-04-07 23:45:40 -04:00
37eb81799e update docs, examples, and add performance numbers and version tags 2023-04-07 23:23:50 -04:00
70f1d17495 implement lj/expand/sphere 2023-04-07 18:33:06 -04:00
8085d34b40 fix cutoff argument parsing bug 2023-04-07 18:19:37 -04:00
6b2896db75 update 2023-04-07 18:19:18 -04:00
6ce9e2283e enable and apply clang-format 2023-04-07 18:19:06 -04:00
0f07c5e809 Run clang on MDI fixes 2023-04-07 18:56:40 +00:00
5d893b36c9 Add periodicity warning to MDI documentation 2023-04-07 18:41:12 +00:00
486489acd7 Add support for non-periodic calculations to MDI QMMM 2023-04-07 18:27:08 +00:00
1e531cb25d Merge pull request #3726 from rbberger/cmake_kokkos_hipfft
Add missing hipFFT dependency CMake logic
2023-04-07 11:37:59 -04:00
276e1dd12b Add support for the <KE_ELEC MDI command 2023-04-07 14:24:23 +00:00
317c7761d4 cmake: Skip OpenMP version check for (AMD)Clang 2023-04-07 00:18:55 -06:00
4e8038a4f5 Add DetectHIPInstallation.cmake
Extending CMAKE_PREFIX_PATH is needed in both GPU and KOKKOS package to
make HIP CMake available.
2023-04-06 23:17:23 -06:00
3950765e8f Add missing hipfft-dev to ROCm containers 2023-04-06 22:44:07 -06:00
ebb8eee941 cmake: use find_package for hipfft dependency 2023-04-06 21:12:25 -06:00
dd5763cd3a Fixing interation cutoff in gran wall/region, rerunning relevant examples 2023-04-06 13:58:06 -06:00
ad72e9f6ea Fixing temperature set command and adding check for neighbor size in pair granular 2023-04-06 13:16:46 -06:00
b202f7b3d5 Minor style changes 2023-04-06 12:55:45 -06:00
fbea0af29b Adding J Monti's corrections to contact area/JKR 2023-04-06 12:39:08 -06:00
5b6e8884b4 Add support for non-periodic systems in the MDI fix 2023-04-06 18:11:38 +00:00
4c403e5b71 close and finalize LAMMPS instance in MLIAP example python scripts 2023-04-06 12:58:30 -04:00
ebcb443237 correct link 2023-04-06 11:42:19 -04:00
e82fd31bd4 rename lj/sphere to lj/cut/sphere and add (yet non-functional) lj/expand/sphere 2023-04-06 08:18:56 -04:00
e44aa77403 fix copy-n-paste error 2023-04-06 07:23:49 -04:00
4e48ddb975 No need to use nvcc_wrapper globally when configuring with CMake 2023-04-06 07:21:37 -04:00
8e3ec4d567 whitespace 2023-04-05 18:56:15 -04:00
313c70f211 another tweak 2023-04-05 15:56:11 -06:00
fa1df5ffb9 doc page simplification 2023-04-05 15:54:57 -06:00
eef94ac5a8 use bimodel atom diameter distribution to demo multi-cutoff 2023-04-04 20:21:21 -04:00
6562a4eb14 whitespace 2023-04-04 13:17:29 -04:00
abb32a319e update docs and add example 2023-04-04 12:41:09 -04:00
e670a94b8a cosmetic 2023-04-04 08:09:47 -04:00
c9605e1cba update custom linker support also for "mold" (even faster than lld) 2023-04-04 06:06:26 -04:00
106f029941 improve Linux distribution detection for recent Fedora versions 2023-04-04 06:05:03 -04:00
d0b86ad612 Merge branch 'develop' into pair-lj-lepton-sphere 2023-04-04 01:38:39 -04:00
e59c9d0f67 silence compiler warning 2023-04-03 21:49:53 -04:00
dfed9bf854 improve error messages 2023-04-03 21:49:43 -04:00
27127a46cc enable and apply clang-format 2023-04-03 21:41:09 -04:00
b53a47b192 Merge branch 'develop' into collected-small-changes 2023-04-03 21:32:32 -04:00
cbf7f66a6f Merge pull request #3717 from evoyiatzis/master
Block regions with bounds defined by equal-style variables
2023-04-03 21:31:17 -04:00
5d34150bed attempty to discuss cutoffs and neighbor list bin vs. multi 2023-04-03 19:23:45 -04:00
e0f5215414 give atom style variables access to "radius" property. add check for charge. 2023-04-03 19:08:10 -04:00
dfd16c95ff Merge branch 'develop' into pair-lj-lepton-sphere 2023-04-03 17:46:34 -04:00
c9b6fad6a0 Merge pull request #3723 from stanmoore1/kk_shake_issue
Fix issue with Kokkos fix shake on GPUs from #3719
2023-04-03 17:45:32 -04:00
8e4e0e3749 whitespace 2023-04-03 10:23:15 -06:00
0bac0b4e0f Fix issue with Kokkos fix shake on GPUs from #3719 2023-04-03 10:11:04 -06:00
4e6dffc7cd silence compiler warning, reformat beginning of file. 2023-04-03 11:45:40 -04:00
d5418bd463 Merge pull request #3720 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-04-03 11:13:22 -04:00
15fb6965c1 protect more loops for fixes and computes from segfaults 2023-04-02 22:15:08 -04:00
19683ade92 avoid segfault when returning list of fixes by style 2023-04-02 20:09:25 -04:00
09deafd6d4 modernize lookup of fixes 2023-04-02 17:46:42 -04:00
eb13217498 Merge branch 'patch-4' of github.com:evoyiatzis/lammps into collected-small-changes 2023-04-02 08:51:37 -04:00
5a2160c96e Update fix_indent.rst 2023-04-02 12:55:11 +03:00
590de515e3 Merge branch 'develop' into collected-small-changes 2023-04-01 18:18:56 -04:00
2056ef4aed Merge pull request #3718 from lammps/fix-gcmc-cleanup-group
Cleanup internally created group in fix gcmc
2023-04-01 18:11:41 -04:00
3f40d1ef5d port cutoff changes to OPENMP version 2023-04-01 01:45:13 -04:00
88f3ebe63b make the cutoff distance a cutoff ratio to be multiplied by sigma 2023-03-31 19:36:02 -04:00
ec8e0f84a0 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-03-31 16:12:00 -06:00
932d54b5eb Merge branch 'shake_closest' of github.com:stanmoore1/lammps into granular-kokkos 2023-03-31 16:11:45 -06:00
03d6d54435 remove obsoleted Domain::minimum_image_once() 2023-03-31 17:53:56 -04:00
81150b7392 Merge branch 'develop' into collected-small-changes 2023-03-31 17:50:07 -04:00
02babb16cd Merge pull request #3719 from stanmoore1/shake_closest
Refactor fix shake to use `closest_image` instead of `minimum_image_once`
2023-03-31 17:46:17 -04:00
c36ae07bd1 Temp solution for Kokkos min_post_force 2023-03-31 14:25:30 -06:00
06d67756d4 Fix issue with shake stats on GPU 2023-03-31 14:15:20 -06:00
909b20c00a Fix GPU issues 2023-03-31 13:01:25 -06:00
d9fcc4b968 Port Steve's changes to Kokkos 2023-03-31 11:45:33 -06:00
60b83a5732 use Domain::minimum_image() instead of Domain::minimum_image_once()
This way the latter function can be removed once the
fix shake/rattle refactor is complete
2023-03-31 13:43:16 -04:00
4aacbfb24f refactor to silence compiler warnings 2023-03-31 13:26:04 -04:00
5dd7ad4759 Merge branch 'shake_closest' of github.com:stanmoore1/lammps into shake_closest 2023-03-31 11:13:10 -06:00
ad9db3a127 code cleanup 2023-03-31 11:13:03 -06:00
d03fc75329 Fix issues in new Kokkos code 2023-03-31 11:02:11 -06:00
e5a82bc461 Merge pull request #3716 from lammps/remove-fix-latte
Remove fix latte and LATTE package and examples and lib
2023-03-31 12:52:47 -04:00
51beb97dd0 Fix compile error with BIGBIG 2023-03-31 10:23:30 -06:00
a6576046e0 Missed change 2023-03-31 10:18:24 -06:00
31bd8ce0c8 Port changes to Kokkos 2023-03-31 09:55:17 -06:00
b6ff9f0607 Remove other instances of minimum_image 2023-03-31 09:54:09 -06:00
11dbfab4cc Need xshake values on ghosts, even for 1 proc 2023-03-31 08:39:51 -06:00
047df9aa9e mark as maintenance branch version 2023-03-31 09:52:58 -04:00
f16c8b4cc4 recognize "Maintenance" tag in addition to "Development" 2023-03-31 09:36:00 -04:00
2ac369a3e1 accommodate for Development marker in RunCouple* unit tests 2023-03-31 09:23:23 -04:00
63c86ccc61 write out and check for unit settings marker in data files 2023-03-31 08:10:50 -04:00
9021129799 accommodate for "Development" marker in simple RunLammps unit tests 2023-03-31 08:10:27 -04:00
42758d0780 delete dynamically allocated arrays in destructor 2023-03-31 03:28:09 -04:00
f444fe8fdf fix spelling error 2023-03-31 03:12:38 -04:00
c37247eb5a add restart info in doc 2023-03-31 03:09:34 -04:00
25c449df8e enable restart in fix pimd/langevin 2023-03-31 03:03:17 -04:00
18e4ed2e32 do not transform velocity to normal mode in setup 2023-03-31 00:59:35 -04:00
1c8aff1297 Fix copy/paste issue 2023-03-30 15:18:33 -06:00
f1d1e9d241 Refactor fix shake to use closest_image instead of minimum_image_once 2023-03-30 13:42:48 -06:00
3d652af44d add unit tests for lj/sphere and lepton/sphere 2023-03-30 14:44:14 -04:00
0da6d71757 initialize all pointers to null 2023-03-30 14:19:07 -04:00
8439c0e0c6 use the diameter for sigma in lj/sphere. update docs 2023-03-30 14:14:30 -04:00
664a022c46 Merge branch 'develop' into pair-lj-lepton-sphere 2023-03-30 13:52:27 -04:00
2fd5c4a192 programming style and whitespace fixups 2023-03-30 13:38:01 -04:00
beb3feb73e add exclusion group cleanup also to fix charge/regulation 2023-03-30 13:37:36 -04:00
c4fd1070b2 cleanup 2023-03-30 11:23:05 -06:00
ea5c068f5a also delete rotation group and add same operations to FixWidom 2023-03-30 11:21:41 -06:00
c3df4a9485 whitespace 2023-03-30 13:20:10 -04:00
5f45bbe243 remove allocated exclusion group 2023-03-30 10:32:57 -06:00
6b25b67a08 fix typo 2023-03-30 09:43:26 -04:00
751dbd08b6 Update region.rst 2023-03-30 15:47:36 +03:00
b1e1e85279 fix compilation issue 2023-03-30 15:39:19 +03:00
6d23551aed actual code for equal-variable block regions 2023-03-30 15:20:26 +03:00
f0b290dadc methods & variables definitions for equal-style blocks 2023-03-30 15:08:02 +03:00
75f5130f5f add missing override 2023-03-30 05:28:23 -04:00
9cd5557ac4 use the LAMMPS_UPDATE macro to indicate that this is a development version 2023-03-29 17:59:57 -04:00
6ed7d24363 Merge branch 'develop' into collected-small-changes 2023-03-29 17:57:57 -04:00
a382f4ce3c some more documentation updates 2023-03-29 17:48:16 -04:00
c68e71a24f update Purge.list and .gitignores 2023-03-29 17:33:58 -04:00
0965d9da2b remove references to LATTE packages in CMake scripts 2023-03-29 17:33:38 -04:00
2a7f3d002a sync with develop 2023-03-29 14:48:24 -06:00
44fc1c55f6 Merge branch 'develop' into remove-fix-latte 2023-03-29 14:43:45 -06:00
35121a2ed8 Merge pull request #3715 from akohlmey/update-for-sphinx
Small update for the 28 March 2023 release to recover Sphinx formatting of the Documentation website
2023-03-29 13:48:53 -04:00
e195b840f2 restrict Sphinx version to pre-6.0 to recover lost website assets 2023-03-29 12:00:25 -04:00
ea7e75798d include an additional latex package and an nsis plugin for building everything 2023-03-29 11:58:05 -04:00
1a17ecdeb8 add OPENMP package versions of pair styles lj/sphere and lepton/sphere 2023-03-28 21:03:20 -04:00
08f64e1edb add pair style lepton/sphere 2023-03-28 21:03:20 -04:00
e338c648bb add pair style lj/sphere 2023-03-28 21:03:20 -04:00
ff96eb2e84 Merge pull request #3706 from akohlmey/next_patch_release
Update version strings for feature release
2023-03-28 20:57:19 -04:00
bb01b849a9 Merge pull request #3667 from akohlmey/pair_style_tutorial
Add detailed developer information about adding pair styles and use new born/gauss style as example
2023-03-28 20:07:06 -04:00
8a77837f21 spelling 2023-03-28 18:32:50 -04:00
304778b617 cosmetic 2023-03-28 18:22:09 -04:00
68d79274cd Merge branch 'develop' into pair_style_tutorial 2023-03-28 18:18:23 -04:00
f9edd3a539 Merge pull request #3664 from hoba87/develop
simplify execution of mliap pytorch example
2023-03-28 18:05:22 -04:00
7d5d2b909f Merge pull request #3698 from yafshar/set-command-type-label
use of type labels in set commands
2023-03-28 16:07:14 -04:00
ee3c000339 Merge branch 'bugfix-doc-amoeba' of github.com:robeme/lammps into pair_style_tutorial 2023-03-28 09:20:06 -04:00
7738b67737 Adding mass to python numpy unittest of KE 2023-03-28 09:17:11 -04:00
2b9962ea68 Bugfix amoeba doc header 2023-03-28 11:15:29 +02:00
824ed3379a avoid segmentation fault when atom map is cleared before sametag is allocated 2023-03-28 01:48:16 -04:00
19da998932 add Jacobian into utils/sphinx-config/false_positives.txt 2023-03-27 23:11:24 -04:00
849933a687 add difference part in fix pimd doc 2023-03-27 23:06:05 -04:00
2610feb270 update version string for release 2023-03-27 22:48:21 -04:00
d3a766af2d Merge branch 'develop' into pair_style_tutorial 2023-03-27 22:46:57 -04:00
f6d94a95dd fix whitespace in fix pimd doc 2023-03-27 22:45:14 -04:00
42fa5b736d Remove the white space in doc 2023-03-27 19:41:45 -07:00
aa918d3d1e Fix a typo 2023-03-27 19:34:34 -07:00
cbcba31d47 Fix the typestr replacement with arg issue 2023-03-27 19:23:29 -07:00
561f80ccc7 add example for fix pimd/langevin with reduced units 2023-03-27 22:21:38 -04:00
4e4ae34de6 update doc with output info and reduced unit instructions 2023-03-27 22:16:41 -04:00
53c452506f Merge pull request #3705 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-03-27 21:34:04 -04:00
89ceb1688f Merge pull request #3712 from stanmoore1/kk_pppm
Remove duplicated code in Kokkos PPPM
2023-03-27 21:23:00 -04:00
28acbdb4fc Also rename function to prevent future bugs 2023-03-27 16:53:23 -06:00
7460cc682d rewording of doc page 2023-03-27 16:39:37 -06:00
165b40b22a Remove duplicated code in Kokkos PPPM 2023-03-27 16:29:17 -06:00
47e3230186 apply logic fix from @jtclemm 2023-03-27 15:52:52 -04:00
5b37ff8160 Clarify the doc for type label 2023-03-27 09:13:45 -07:00
b8ff478d78 Merge pull request #3709 from GenieTim/minor-fixes-pr-27032023
Minor fixes that might be of interest...
2023-03-27 11:45:06 -04:00
8e8bb0d2b3 Document the useage of variable vectors in fix ave/correlate/long 2023-03-27 09:11:52 +02:00
58b9466852 Fix typo in berendsen 2023-03-27 09:10:00 +02:00
0334dcaf57 Fix issue where after expanding wrong argument errors were thrown 2023-03-27 09:09:44 +02:00
317ce28538 ensure that the atom map is initialized. Fixes #3708 2023-03-27 02:53:27 -04:00
bc5e45af6c remove redundant line 2023-03-26 23:22:13 -04:00
4244e458f5 silence compiler warnings about unused variables and parameters 2023-03-26 21:50:29 -04:00
584f526e71 use emplace instead of push 2023-03-26 21:40:49 -04:00
4234c04e6d use powint() where possible; simplify 2023-03-26 21:40:41 -04:00
0d8623c3f2 simplified logic from clang-tidy 2023-03-26 21:33:37 -04:00
7787734496 move check for non-ellipsoid atoms to compute function so it is compatible with hybrid pair styles 2023-03-26 17:28:18 -04:00
a1a0186438 move initialization of all pointers to null to initializer list 2023-03-26 17:26:47 -04:00
d31f754451 simplify 2023-03-26 17:26:03 -04:00
6facb8d424 use override instead of virtual as per style conventions 2023-03-26 17:19:33 -04:00
5390b2b0aa fix typo in test 2023-03-25 22:01:17 -04:00
41e13e99fb avoid uninitialized data access 2023-03-25 21:50:02 -04:00
e446b950d9 silence compiler warnings 2023-03-25 19:10:28 -04:00
315d0733f7 improve error messages and remove redundant fmt::format() calls 2023-03-25 19:07:23 -04:00
cfac692012 plug memory leaks in fix electrode/conp 2023-03-25 18:58:38 -04:00
47e3da2c7b fix uninitialized data access bug 2023-03-25 18:09:23 -04:00
5074d589fe delete created typestr 2023-03-25 08:25:56 -07:00
5c4dd6d5a3 plug memory leaks 2023-03-25 10:31:00 -04:00
c667b5d8dc complete documentation of version change 2023-03-25 10:26:07 -04:00
4de0cd762f use powint() instead of pow() for faster and more accurate results 2023-03-25 10:12:05 -04:00
8cd34af4f0 enable and apply clang-format to a whole bunch of small .cpp files in src/ 2023-03-25 09:59:25 -04:00
22a1cf935e enable and apply clang-format, remove redundant code, improve error message for EAM potential pair styles 2023-03-25 06:48:59 -04:00
7edb42f190 remove redundant code 2023-03-25 06:30:30 -04:00
974d560453 enable and apply clang-format 2023-03-25 06:30:19 -04:00
0d145f317f update version strings to 28 March 2023 for upcoming release 2023-03-25 06:14:52 -04:00
f906aeee9b spelling 2023-03-25 06:08:43 -04:00
19df5ff811 fix typo 2023-03-25 06:06:58 -04:00
529e81e142 enable and apply clang-format 2023-03-25 06:04:36 -04:00
1d13af8057 check is already done in Input::pair_coeff() 2023-03-25 06:04:23 -04:00
c0f0edfaba tweak sphinx config that PDF and HTML manual have the same chapter numbers 2023-03-25 06:04:06 -04:00
7ec1d1e330 discuss derived pair style classes that only modify some minor detail 2023-03-24 21:43:51 -04:00
1a234a4351 update pair style writing docs according to suggestions by @sjplimp 2023-03-24 21:43:13 -04:00
72783d6cfd Merge branch 'develop' into pair_style_tutorial 2023-03-24 19:28:04 -04:00
131173d062 Merge branch 'develop' into granular-kokkos 2023-03-24 19:23:04 -04:00
ddaa008ede Merge pull request #3691 from akohlmey/refactor-compute-chunk
Refactor per-chunk computes to use ComputeChunk class with shared functionality
2023-03-24 19:07:41 -04:00
a09013986a update docs for python package installation and building of wheel file 2023-03-24 18:02:01 -04:00
ab48b834f7 refactor python module wheel building and installation to be less prone to race conditions 2023-03-24 17:43:52 -04:00
45fabe74b9 Add TBD to inform the users for the new addition not available in older versions 2023-03-24 08:52:16 -07:00
2a6a21eba3 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-03-24 09:05:57 -06:00
aec41d60de Merge branch 'granular-kokkos' of github.com:valleymouth/lammps into granular-kokkos 2023-03-24 09:05:38 -06:00
294f8c0d80 Fix a few more issues 2023-03-24 09:04:45 -06:00
ff622f10ea Remove extra space 2023-03-24 07:13:54 -07:00
d83386de56 ATOM_SELECT uses numerical id for atom ID 2023-03-24 07:12:09 -07:00
23524c6655 use of type labels in set commands 2023-03-24 06:55:52 -07:00
83b4e18704 update doc 2023-03-23 21:05:07 -04:00
bd59c3ea69 remove dead code 2023-03-23 18:45:25 -04:00
fb3bd20dff update fmtlib to version 9.1.0 to avoid compilation issues with PGI/NVHPC compilers 2023-03-23 18:34:42 -04:00
1666f5f903 Merge branch 'develop' into refactor-compute-chunk 2023-03-23 18:34:00 -04:00
ee9c7cbe3a Merge pull request #3701 from stanmoore1/kk_4.0_deprecated
Remove deprecated Kokkos code
2023-03-23 18:07:56 -04:00
f1b0e911e1 support using old fix wall/gran files with KOKKOS in CMake 2023-03-23 17:56:26 -04:00
47c2103930 Merge pull request #3652 from athomps/gcmc-region-triclinic
Moved region check from constructor to init()
2023-03-23 17:48:07 -04:00
5be5d8be7c Merge pull request #3703 from lammps/drude-mpi-wait-error
bug fix for fix rigid nh/npt small error in MPI message sizes
2023-03-23 17:42:37 -04:00
487bb24896 Temporarily preserve old version of fix wall/gran for Kokkos 2023-03-23 15:42:21 -06:00
51e3db6a6d Updated LJ reference logfile because reported atom counts were mysteriously wrong 2023-03-23 14:02:40 -06:00
0a5f523eae whitespace 2023-03-23 13:51:59 -06:00
313c86af6a Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-03-23 13:50:01 -06:00
1654b74fb6 Fix a few more issues 2023-03-23 13:38:31 -06:00
1ee2a7bff4 correct check for incompatible rigid fixes 2023-03-23 15:34:54 -04:00
bb1f1a7593 modernize check for fix drude. print warning about order of fixes with rigid. 2023-03-23 15:19:51 -04:00
3b3325076a whitespace 2023-03-23 14:31:08 -04:00
d846b1b952 Merge branch 'develop' into drude-mpi-wait-error 2023-03-23 14:30:47 -04:00
92b78d6804 Merge pull request #3702 from lammps/voronoi-tilt-bug
bug fix for compute voronoi with triclinic simulation boxes
2023-03-23 14:23:14 -04:00
3da45d2f9e miscount of comm forward values in fix_rigid_nh_small 2023-03-23 11:28:17 -06:00
ed8b06a756 Merge pull request #3628 from lammps/fix-mdi-qmmm
Add a fix mdi/qmmm command for running QMMM via MDI code coupling
2023-03-23 12:33:00 -04:00
b669c793fc compute bounding box on Voronoi sub-domain correctly for triclinic tilted domains 2023-03-23 09:27:09 -06:00
19efa08778 Remove unused volatile overloads 2023-03-23 09:06:08 -06:00
8d0de74d5c Remove deprecated code 2023-03-23 09:05:48 -06:00
5c94806a1d update doc 2023-03-23 01:59:38 -04:00
0007b7c9fe Merge branch 'develop' into pair_style_tutorial 2023-03-23 01:23:36 -04:00
c7d62c4709 fix ids once bug in compute chunk/atom 2023-03-22 22:21:13 -04:00
b18008c58d add useful comments 2023-03-22 22:18:29 -04:00
9469321e3d Fixed bug in fep tools 2023-03-22 22:18:04 -04:00
a4a9efeefc Fixed bug in fep tools 2023-03-22 22:17:55 -04:00
70744f10e0 backport fix property/atom bugfix for KOKKOS 2023-03-22 22:17:10 -04:00
7587eaf763 Logic tweak 2023-03-22 19:58:57 -06:00
12e0131abf Merge pull request #3693 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-03-22 21:56:22 -04:00
667ba0febb update README files to have more conventional options and settings 2023-03-22 20:42:54 -04:00
8149386aec Merge pull request #3699 from lammps/compute-chunk-atom-bug
fix ids once bug in compute chunk/atom
2023-03-22 20:17:24 -04:00
9470169d2f Merge pull request #3696 from jtclemm/BPM
Minor updates/patches for BPM, rigid, and multi
2023-03-22 19:14:47 -04:00
737ef160d2 one more file 2023-03-22 13:47:07 -06:00
5e85baf919 update of quantum code repos and instructions and log files 2023-03-22 13:46:20 -06:00
872a4e2999 cosmetic. remove commented out debug code. 2023-03-22 15:03:52 -04:00
56ac387e6f synchronize Kokkos version of grow_atoms() with base version 2023-03-22 15:02:49 -04:00
b5e1bbfa6f move fix property/atom property type enumerator to class definition in header 2023-03-22 15:02:14 -04:00
1463e2c52b Merge branch 'develop' of https://github.com/lammps/lammps into pimd_langevin 2023-03-22 13:44:53 -04:00
1370f05714 Elaborating on the scaling of multi 2023-03-22 11:33:17 -06:00
cc2106397a fix ids once bug in compute chunk/atom 2023-03-22 10:18:50 -06:00
06d6c183fb Merge branch 'BPM' of github.com:jtclemm/lammps into BPM 2023-03-22 09:36:47 -06:00
669397b092 fixing exponent in multi documentation 2023-03-22 09:36:29 -06:00
375eb46450 README edits 2023-03-22 09:24:04 -06:00
91eb544979 address spelling and grammar issues flagged by languagetool.org 2023-03-22 01:52:44 -04:00
91f3edb63b Merge pull request #73 from jtclemm/pair_style_tutorial
Fix some typos and grammar issues. Thanks @jtclemm.
2023-03-22 01:26:34 -04:00
a6c7eef624 a few possible typos 2023-03-21 21:32:20 -06:00
115c9ee3af Add files via upload 2023-03-21 23:14:18 -04:00
bd9ea586a7 Delete C_Willman_PRB2022.quadratic.snapcoeff 2023-03-21 23:13:49 -04:00
6fc17bfa17 Add files via upload
Coefficient and parameter files for carbon SNAP potential as described in Phys. Rev. B 106, L180101  (2022)
2023-03-21 22:50:17 -04:00
3c5083d75d implement suggestions from @jtclemm 2023-03-21 21:36:27 -04:00
af8d4788b8 fix doc errors 2023-03-21 10:11:37 -04:00
2c0ac82996 update doc press -> iso 2023-03-21 09:54:29 -04:00
32efa1a3af update fix pimd/langevin doc 2023-03-21 09:23:22 -04:00
2cb9d2784b add false_positive for fix pimd/langevin doc 2023-03-21 09:23:04 -04:00
f94bea8d97 correct fix pimd/langevin example file permission 2023-03-21 09:22:37 -04:00
3d47c5c6f0 add x/y/z barostating options 2023-03-21 08:38:14 -04:00
1101383b51 add versionadded tags 2023-03-20 22:07:02 -04:00
4351ada794 improve error message throughout fix adap 2023-03-20 21:05:11 -04:00
badfd0bc40 Specifying dimensions, lamda->lambda 2023-03-20 15:34:52 -06:00
d15e13d475 Reverting mistakenly deleted line, fixing duplicated text in granular doc 2023-03-20 14:56:39 -06:00
ac9389f5cb Slight rewrite 2023-03-20 14:24:21 -06:00
7876fb7ee7 Fixing merge conflicts 2023-03-20 14:19:58 -06:00
0dd8a6aea2 add document for keywords of fix pimd/langevin 2023-03-20 14:27:58 -04:00
7a38f49a21 add lj example for fix pimd/langevin 2023-03-20 14:10:09 -04:00
be8c0b9835 enable fixcom feature of fix pimd/langevin 2023-03-20 14:08:42 -04:00
ecc6269648 add useful comments 2023-03-20 10:52:20 -04:00
9f22974209 Merge branch 'develop' of github.com:agiliopadua/lammps into collected-small-changes 2023-03-20 10:50:05 -04:00
3280d6b786 Fixed bug in fep tools 2023-03-20 14:47:40 +01:00
a320f24247 Fixed bug in fep tools 2023-03-20 14:46:01 +01:00
e317b0eb7e update kim unit tests for recent changes, make variable for extended test an option 2023-03-20 07:11:47 -04:00
f4314076ae address scoping issues, use constexpr for unit constants, modernize 2023-03-20 06:18:17 -04:00
b0e7d9702b modernize and simplify 2023-03-20 01:02:22 -04:00
57e86346a6 fix bug where floating point data was formatted as integer since the second column was assumed to be the type 2023-03-19 18:20:31 -04:00
03b63de588 update .gitignore for recently added styles 2023-03-19 16:05:53 -04:00
ece7697f6a cosmetic 2023-03-18 23:16:59 -04:00
a2a4dcba06 complete sections about variants of potentials 2023-03-18 23:16:42 -04:00
c9af040be9 improve error message 2023-03-18 20:00:58 -04:00
26941e4a2e complete first draft of full pair style explanation and start with many-body 2023-03-18 20:00:41 -04:00
29e724b810 add unit test for compute dipole/tip4p/chunk 2023-03-18 11:14:32 -04:00
d8f41a9032 support sp in fix pimd/nvt 2023-03-18 10:25:05 -04:00
7beec96dd3 support sp in fix pimd/langevin 2023-03-18 10:23:09 -04:00
fd21a584bf update fmass part of fix pimd/langevin document 2023-03-18 10:17:01 -04:00
1ccb0f8d8d Introduce ComputeChunk class with shared functionality of all /chunk computes 2023-03-18 05:55:03 -04:00
29a68c37c5 Refactor atom list fill to reduce GPU/CPU data transfer 2023-03-17 17:11:43 -06:00
76c19410c7 correct fmass input of fix pimd/langevin 2023-03-17 17:44:48 -04:00
008147d1f3 correct mass preconditioning of fix pimd/langevin 2023-03-17 17:41:29 -04:00
0e22e36b94 add method nmpimd note for fix pimd/langevin document 2023-03-17 15:38:48 -04:00
ad25af56a9 add reference in fix pimd/langevin document 2023-03-17 15:29:26 -04:00
06e9163e65 Add missing data movement flags for GPUs 2023-03-17 12:52:59 -06:00
68d01429ea Fix error message 2023-03-17 11:50:07 -06:00
882a72987b Port compute_erotate_sphere to Kokkos 2023-03-17 11:49:42 -06:00
fceb9a6925 Error out if using onesided or newton on 2023-03-17 10:04:29 -06:00
aeb3b92148 Fix issues 2023-03-17 09:45:23 -06:00
14e30d61cf more content 2023-03-17 08:36:10 -04:00
aca8bc4ea9 Merge branch 'develop' into pair_style_tutorial 2023-03-17 05:42:08 -04:00
fce1f8e0af Merge pull request #3687 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-03-17 03:56:35 -04:00
21c71bf35d mention project boards. remove reference to milestones. 2023-03-16 23:36:13 -04:00
4a7ab34568 lift restriction to Sphinx version < 6.0, enable jquery extension 2023-03-16 23:07:18 -04:00
a232915e71 update example logs for changed granular pair style 2023-03-16 22:37:58 -04:00
073f21c0d9 spelling 2023-03-16 22:35:25 -04:00
c9b383d3f0 grammar 2023-03-16 22:18:35 -04:00
e7b7d5804e Update URL for EPEL 2023-03-16 21:23:02 -04:00
08153b7b4d trim list of known plumed source packages. 2023-03-16 21:01:32 -04:00
4e221803b0 Merge branch 'develop' into collected-small-changes 2023-03-16 20:53:04 -04:00
7c0fdbe2d9 Merge pull request #3512 from jtclemm/gran-temp
Refactoring the GRANULAR package
2023-03-16 20:47:40 -04:00
ea20c934ea print warning when using fix efield with a TIP4P pair style 2023-03-16 18:33:23 -04:00
bf94448843 simplify and avoid segfault without pair style 2023-03-16 18:32:54 -04:00
5e6004961d Merge branch 'develop' into collected-small-changes 2023-03-16 18:00:36 -04:00
224b1369a1 Merge pull request #3685 from akohlmey/more-tip4p-support
Add TIP4P versions for compute dipole, compute dipole/chunk and fix efield
2023-03-16 17:59:58 -04:00
f1539d0ef5 silence compiler warnings 2023-03-16 17:53:58 -04:00
b41d826e0a Merge branch 'develop' into gran-temp 2023-03-16 17:44:36 -04:00
d3a23817f1 disable purging old wheel files 2023-03-16 17:25:11 -04:00
120f5cf7f1 Minor patches to BPM, multi, and rigid 2023-03-16 15:20:18 -06:00
4a66389bf1 purge build folder from within install.py script 2023-03-16 16:39:34 -04:00
9bea55bd77 update fix mscg example 2023-03-16 14:55:20 -04:00
73525b3bbc Download the latest MSCG snapshot to address bug in library. 2023-03-16 14:55:05 -04:00
feb1b9e029 fix whitespace 2023-03-16 12:55:30 -04:00
180ed2553c Merge branch 'develop' into collected-small-changes 2023-03-16 12:54:48 -04:00
9cf67699cc include fixes and updates from upstream 2023-03-16 12:44:18 -04:00
666fe4cfbe fix two bugs in the ndx2group command 2023-03-16 12:35:53 -04:00
6069e8cb14 Merge pull request #3684 from jrgissing/encode_improper_symmetries
Encode improper symmetries
2023-03-16 12:33:15 -04:00
d71a78449a fix two bugs in the ndx2group command 2023-03-16 12:29:51 -04:00
45a3e30f6c Merge pull request #3689 from rbberger/cmake_optional_python_install
cmake: remove pip install from install target
2023-03-16 10:46:15 -04:00
f63befc80f consolidate replicated commands to single location 2023-03-16 10:29:00 -04:00
5c5e7b7e48 update fix mscg example 2023-03-16 08:39:23 -04:00
0e3dc6fefa Download the latest MSCG snapshot to address bug in library. 2023-03-16 08:01:26 -04:00
a8c27a2275 clarify symmatoms convention 2023-03-15 23:55:13 -04:00
4940bda15f remove references to "make install" for Python package installation 2023-03-15 23:08:46 -04:00
0bf0fd98cc explicitly specify central atom 2023-03-15 21:29:14 -04:00
56f4aaff47 explicitly specify central atom 2023-03-15 21:28:05 -04:00
fa9062a87e make Force::special_lj and Force::special_coul accessible through the library interface 2023-03-15 18:39:32 -04:00
5071b2f016 update document notes part 2023-03-15 17:25:25 -04:00
4e0af69b67 update documentation keyword part 2023-03-15 17:06:28 -04:00
aa84548002 set mapflag=0 if there is only 1 bead 2023-03-15 16:45:18 -04:00
0aca0435ef delete mapflag input script interface 2023-03-15 16:43:44 -04:00
3f965a1c33 format the specification of external pressure 2023-03-15 16:25:56 -04:00
f7bc270c00 Do not initialized random number generator when there is no thermostat 2023-03-15 14:51:04 -04:00
77b9fe37ba delete dead code 2023-03-15 14:00:56 -04:00
2c6fe1e8bc add p_md calculation 2023-03-15 13:57:42 -04:00
32c695a7d4 tag all TIP4P related pair style tests as unstable 2023-03-15 12:17:57 -04:00
c472821d67 remove outdated MDI example folder 2023-03-14 23:31:16 -04:00
730e5d2e64 Merge pull request #3671 from akohlmey/bond-harmonic-restrain
Add new bond style harmonic/restrain
2023-03-14 16:40:28 -04:00
d459c3763d whitespace 2023-03-14 13:53:04 -04:00
c3dba53040 update for more recent MDI and PySCF versions 2023-03-14 13:52:56 -04:00
04dfda9952 update MDI LAMMPS-on-LAMMPS examples 2023-03-14 12:00:20 -04:00
d8d1235773 update MDI library version to 1.4.16 2023-03-14 11:59:19 -04:00
88c8781396 silence compiler warnings 2023-03-14 10:17:20 -04:00
5dc9a570fa Merge branch 'develop' into pair_style_tutorial 2023-03-14 10:10:52 -04:00
14180774b7 mention OpenMP support in the GPU library 2023-03-14 07:00:34 -04:00
a328537ee3 Merge branch 'develop' of https://github.com/lammps/lammps into pimd_langevin 2023-03-14 02:48:29 -04:00
b4dc074638 delete global variable inv_volume 2023-03-14 02:46:31 -04:00
d2faf86214 Merge branch 'develop' into bond-harmonic-restrain 2023-03-14 00:41:28 -04:00
266f8fb67e clean up fix pimd/langevin 2023-03-13 23:42:25 -04:00
03454aeefb compile GPU library with thread support when BUILD_OMP is enabled 2023-03-13 23:07:11 -04:00
0e2b2eb266 Merge branch 'develop' into collected-small-changes 2023-03-13 22:47:08 -04:00
17f39d9d2c rename fix STORE/PERATOM to STORE/ATOM 2023-03-13 22:33:47 -04:00
e4ad330c2b Merge pull request #3675 from wmbrownIntel/mar2023_gpu_misc
Misc Improvements to GPU Package
2023-03-13 21:43:08 -04:00
1031110d93 update docs 2023-03-13 19:55:52 -04:00
ef67f790a2 whitespace 2023-03-13 19:43:44 -04:00
3ba37fc954 Merge branch 'develop' into bond-harmonic-restrain 2023-03-13 19:43:16 -04:00
c369c0252f fix issues with changes in fix STORE/PERATOM 2023-03-13 19:43:08 -04:00
92302d0f22 Merge branch 'develop' into mar2023_gpu_misc 2023-03-13 19:02:20 -04:00
3815c0ef76 modify fix STORE/PERATOM and callers to allow ghost comm 2023-03-13 17:00:54 -06:00
2d8936068e Merge pull request #3679 from ndtrung81/dielectric-bugfixes
Dielectric package doc update and bugfix
2023-03-13 18:27:50 -04:00
6bec23e7db Merge pull request #3668 from evoyiatzis/master
Implementation of analytical expressions for Born matrix
2023-03-13 17:19:05 -04:00
8353c8336c small tweaks 2023-03-13 15:31:45 -04:00
961c847c00 Merge branch 'develop' into pair_style_tutorial 2023-03-13 15:21:15 -04:00
21293f1c08 update links and hashes for new plumed2 releases 2023-03-13 12:10:41 -04:00
ed7bd50500 must recompile main.o when MDI package is installed/uninstalled 2023-03-12 22:31:06 -04:00
ac848c91e9 add versionadded tag for fix mdi/qmmm 2023-03-12 17:19:50 -04:00
6cb45a5e0f update minimal MDI test/demo for current code 2023-03-12 17:08:17 -04:00
11d220e956 update .gitignore 2023-03-12 16:49:45 -04:00
c34f398b5c spelling and formatting fixes and improved consistency. fix broken/missing links. 2023-03-12 16:48:21 -04:00
a6185fa0b2 fixup whitespace 2023-03-12 00:56:17 -05:00
1887495434 Merge branch 'develop' into fix-mdi-qmmm 2023-03-12 00:53:40 -05:00
a8c1359c54 make energy handling consistent for variable field 2023-03-11 18:56:29 -05:00
251fac2c60 add unit tests for fix efield/tip4p 2023-03-11 18:43:46 -05:00
91aae79fdc add docs for fix efield/tip4p 2023-03-11 18:13:44 -05:00
da9559d92c rewrite TIP4P molecule handling to process each force contribution only once 2023-03-11 18:13:44 -05:00
cf6f6829ae cosmetic 2023-03-11 18:13:44 -05:00
6b6f8087d3 output potential energy with fix efield with equal style variables 2023-03-11 18:13:44 -05:00
37b7ba7cae all functionality of fix efield/tip4p present (untested) 2023-03-11 18:13:44 -05:00
2de3f4d261 implementation for fix efield/tip4p for static field (untested) 2023-03-11 18:13:43 -05:00
b5804b320c update/improve/correct error messages in fix efield and make compatible with derived class 2023-03-11 18:13:36 -05:00
2a6515f765 use consistent names in error messages 2023-03-11 18:12:09 -05:00
02854c1d5c add compute dipole/tip4p and compute dipole/tip4p/chunk 2023-03-11 18:12:09 -05:00
416df96c1b add extract support for TIP4P parameters to cutoff versions 2023-03-11 18:12:09 -05:00
7b07fe04c8 Merge pull request #3663 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-03-10 22:24:56 -05:00
2b6c2e07a4 add -help flag and help message output. step version number. update docs. 2023-03-10 21:26:40 -05:00
80233f353f port UTF-8 to ASCII substitution to msi2lmp and apply to reading .frc files 2023-03-10 20:56:55 -05:00
2dad2586f1 update help message 2023-03-10 20:16:39 -05:00
b75a8e5d31 Merge branch 'develop' into collected-small-changes 2023-03-10 19:10:44 -05:00
d28c3cf674 Merge pull request #3680 from akohlmey/cmake-fixup-linking
Address double linking issue with Kokkos libraries
2023-03-10 19:07:55 -05:00
233c55337c fix typo 2023-03-10 12:35:17 -05:00
e8871d990a clarify 2023-03-10 09:16:00 -05:00
45da03340a update package info; delete unused code 2023-03-10 02:56:44 -05:00
f301c00406 delete unused nmpimd_transform 2023-03-10 02:37:15 -05:00
da6d3de48e correct planck's constant for lj units 2023-03-10 02:06:40 -05:00
5a593f06f6 apply make fix-whitespace 2023-03-10 02:00:18 -05:00
882df6ad23 typo 2023-03-09 22:08:03 -05:00
53056f47ed encode improper symmetries 2023-03-09 22:04:08 -05:00
b6756c0319 update docs about using data files 2023-03-09 13:00:59 -05:00
d5f6c7e0be Implement born_matrix in pair_lj_cut_coul_cut.cpp 2023-03-09 10:06:04 +02:00
544a4e3d7f Include method declaration in pair_lj_cut_coul_cut.h 2023-03-09 10:03:57 +02:00
7da2f62bf6 Implement born_matrix in pair_nm_cut_coul_cut.cpp 2023-03-09 08:33:57 +02:00
0088607bc7 Include method declaration in pair_nm_cut_coul_cut.h 2023-03-09 08:31:44 +02:00
4b434c9a03 remove ifdefs 2023-03-08 18:40:29 -05:00
189be4625e improve/correct error messages for fix efield 2023-03-08 18:25:58 -05:00
2a3f753c41 Merge branch 'pimd_langevin' of github.com:Yi-FanLi/lammps into pimd_langevin 2023-03-08 17:09:16 -05:00
bbed5adeac fix merge conflict 2023-03-08 17:08:56 -05:00
c3c99b701c correct underline 2023-03-08 07:21:21 -05:00
7e1a21ad6e Merge branch 'patch-1' of github.com:alanhsieh4444/lammps into collected-small-changes 2023-03-08 07:19:55 -05:00
c96ac858bf GPU Package: Adding JIT test for OpenCL prefetch support. 2023-03-07 21:43:19 -08:00
451f3f71b8 Update molecule.rst 2023-03-08 13:37:46 +08:00
4220944ace cosmetic 2023-03-08 00:25:08 -05:00
fc8a048662 add unit test 2023-03-07 21:22:57 -05:00
9a8b5ebae0 use more unusual name for per-atom property 2023-03-07 20:36:28 -05:00
fd2cda66bb handle the case when the bond style is recreated after a restart 2023-03-07 20:18:41 -05:00
381d0445ed fix spelling issues 2023-03-07 19:41:50 -05:00
68ed9ec85e Merge branch 'develop' into collected-small-changes 2023-03-07 19:39:26 -05:00
010b030b56 update docs and mention alternatives and describe differences 2023-03-07 19:38:34 -05:00
e2aa948fac Fix more issues 2023-03-07 16:30:18 -07:00
d32411f61a recover restart ability and avoid memory leak 2023-03-07 16:37:14 -05:00
323248faef Merge branch 'develop' into bond-harmonic-restrain 2023-03-07 15:49:42 -05:00
01c03bddf6 improve style mismatch warning messages in read_data 2023-03-07 15:27:29 -05:00
c2d0734bc4 rerun updated examples and record log files 2023-03-07 14:36:56 -05:00
b21d915a7c simplify 2023-03-07 13:52:34 -05:00
2aa0e76ad9 avoid linking errors due to nvcc wrapper warning silencing. 2023-03-07 13:52:12 -05:00
2a3d0458d5 simplify 2023-03-07 13:47:39 -05:00
19a3e2f6b3 CUDA 12 is now tested 2023-03-07 13:47:09 -05:00
4ed49d2f21 make Input::file(const char *) function safe for passing a null pointer 2023-03-07 13:44:34 -05:00
ce1956e60b avoid linking errors due to nvcc wrapper warning silencing. 2023-03-07 13:43:27 -05:00
a3c9029664 Reverted the cutoff to 20.0 for in.nopbc 2023-03-07 12:02:56 -06:00
b65623ef1f Added back comments to data.sphere 2023-03-07 11:57:49 -06:00
9e57bedea2 Fixed bugs when mistakenly replacing all "NULL" with "nullptr" with FixPolarizeFunctional, reduced the number of induced charges so that in.nopbc with dof finishes in a reasonable time 2023-03-07 11:51:14 -06:00
41c5ba98ab Merge pull request #3672 from lammps/update_codeowners
Update CODEOWNERS
2023-03-07 12:30:57 -05:00
353e0820e3 capture log files for dielectric examples 2023-03-07 12:26:43 -05:00
4265b7379e update precomputed constants. apply clang-format 2023-03-07 12:07:56 -05:00
710baff14d use finalize wrappers from the LAMMPS library interface 2023-03-07 08:24:03 -05:00
6c1ed6a9b5 use finalize wrappers from the LAMMPS library interface 2023-03-07 08:23:36 -05:00
6d7d0f78d5 Merge pull request #3674 from rbberger/gpu_rocm_bugfix
GPU package bugfix / cmake improvement
2023-03-07 07:39:48 -05:00
d7c783560a GPU Package: Fixing out of bounds memory access issues with special kernel unroll optimizations. 2023-03-06 22:11:10 -08:00
40790f6c45 fix up non-KOKKOS case 2023-03-06 22:57:31 -05:00
642dccceb5 fix up non-KOKKOS case 2023-03-06 22:57:06 -05:00
0b204c8cb3 avoid including accelerator_kokkos.h in main.cpp 2023-03-06 22:40:35 -05:00
76cbc6f48d whitespace 2023-03-06 22:40:27 -05:00
3645ad9582 Merge branch 'develop' into collected-small-changes 2023-03-06 22:40:08 -05:00
21b2bf0253 avoid including accelerator_kokkos.h in main.cpp 2023-03-06 22:17:12 -05:00
5e4714b41e Fix some issues with new code in fix shake 2023-03-06 16:31:19 -07:00
795227d376 Merge pull request #3677 from lammps/fix-balance-sort-option
Add sort option for load balancing commands
2023-03-06 17:03:08 -05:00
d13f8c6701 Merge pull request #3676 from gtow-MD/develop
Updated fix_deposit documentation
2023-03-06 15:47:12 -05:00
2af1949a92 whitespace 2023-03-06 13:42:45 -05:00
5909a0527b update list of packages included into the Windows builds. 2023-03-06 13:39:50 -05:00
4f420f8454 incorporate changes to fix alchemy from @sjplimp 2023-03-06 12:14:57 -05:00
f63eec6953 gpu: drop hcc as platform and inherit compile defs
hip::host already adds the __HIP_PLATFORM_AMD__ definition

See https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/hip-config.cmake.in#L180
2023-03-06 09:49:00 -07:00
376c7899ab add user option for performing message sorting during load balancing 2023-03-06 09:48:33 -07:00
31fc26a8ee Merge pull request #1 from gtow-MD/gtow-MD-patch-1
Updated fix_deposit documentation
2023-03-06 11:23:11 -05:00
4089b7bd37 Updated fix_deposit documentation 2023-03-06 11:11:49 -05:00
2627f60a39 fix cut-n-paste error 2023-03-06 08:10:30 -05:00
37f22c8627 Misc Improvements to GPU Package
- Optimizations for molecular systems
-   Improved kernel performance and greater CPU overlap
- Reduced GPU to CPU communications for discrete devices
- Switch classic Intel makefiles to use LLVM-based compilers
- Prefetch optimizations supported for OpenCL
- Optimized data repack for quaternions
2023-03-05 21:03:12 -08:00
f658a947c6 gpu: fix broken HIP code path 2023-03-05 19:35:32 -07:00
b11049ba1a CMake: Use hip::host and hip::hipcub targets 2023-03-05 19:03:38 -07:00
646ef15d83 more consistent way to disable fast math for Intel OpenCL with double precision 2023-03-05 07:18:12 -05:00
2aff321187 Revert "use sin(x+pi/2) instead of cos(x) on Intel OpenCL with double precision"
This reverts commit fa38047749
It is no longer needed since we disable fast math with
Intel OpenCL and double precision setting.
2023-03-05 07:04:20 -05:00
7f934e3b25 add check for broken doc links to doc makefile 2023-03-04 17:09:17 -05:00
8aad97ca4a fix broken doc links 2023-03-04 17:03:07 -05:00
fcf8fc503f fix broken links 2023-03-04 16:24:58 -05:00
dcb58a94b4 Merge branch 'lammps:develop' into master 2023-03-04 18:16:50 +02:00
02f36f4e72 whitespace 2023-03-04 06:30:47 -05:00
6640e8b647 address some spelling and grammar issues flagged by languagetool.org 2023-03-04 00:43:43 -05:00
3df51305df integrate updates for fix alchemy documentation from @sjplimp 2023-03-04 00:32:18 -05:00
76387d003b fine tune package check directory matching to not match bogus entries 2023-03-03 23:12:17 -05:00
142876a59b Merge pull request #3669 from Bibobu/tool_tabulate
Adding boltzmann inversion like pair tabulation to tools/tabulate
2023-03-03 22:39:38 -05:00
11aa922a6c Merge remote-tracking branch 'github/update_codeowners' into collected-small-changes 2023-03-03 22:38:26 -05:00
444a5daac5 Merge branch 'develop' into collected-small-changes 2023-03-03 22:37:20 -05:00
fc4ca0503e make --rdffile, --units, and --temperature required arguments 2023-03-03 20:51:28 -05:00
c3c6c5f154 python2 compatibility (or rather scipy of python2) and avoid NaNs 2023-03-03 20:50:56 -05:00
e373aa39e7 Update CODEOWNERS 2023-03-03 16:44:34 -07:00
de182aeeed fix issues due to incomplete conversion form txt2html markup 2023-03-03 17:25:28 -05:00
a136283312 update/correct section header (this is not a fix) 2023-03-03 17:17:07 -05:00
77ae215047 add versionadded tag 2023-03-03 17:16:12 -05:00
b2c636af75 Another refactor, port fix shake 2023-03-03 15:04:44 -07:00
c9e300f76f implementation of bond style harmonic/restrain /w docs 2023-03-03 16:54:47 -05:00
e73776240c Fix memory leak 2023-03-03 13:46:23 -07:00
6f27357630 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-03-03 10:46:44 -07:00
e4b1a33ced Corrected error in temperature argument managment, added unit as a
command-line parameter
2023-03-03 15:32:46 +01:00
eb750f0217 Adde temperature for BI as a command-line argument 2023-03-03 15:22:49 +01:00
13f82be035 fix typo 2023-03-03 09:12:57 -05:00
4612cd94f0 Removed bits of useless force computation. 2023-03-03 15:12:27 +01:00
67d4893f6e Added Warning section to pair_bi_tabulate.py file. 2023-03-03 15:10:36 +01:00
ed11cbd2c7 Updated tools/tabulate/README.md file to include pair_bi_tabulate.py 2023-03-03 15:04:46 +01:00
f23c2494ea Created tool file tools/tabulate/pair_bi_tabulate.py 2023-03-03 14:49:38 +01:00
0e03569def Merge branch 'develop' of github.com:/lammps/lammps into develop 2023-03-03 14:10:36 +01:00
9cdb9283ca another workaround for Intel GPU with OpenCL and double precision 2023-03-03 03:08:03 -05:00
cfb967d309 silence static code analysis warnings 2023-03-03 02:01:25 -05:00
df9bf18ed2 Merge pull request #3659 from stanmoore1/kk_deform_rigid
Allow `fix deform/kk` to use rigid bodies, fix logic issues with Kokkos neigh list
2023-03-02 19:04:13 -05:00
fa38047749 use sin(x+pi/2) instead of cos(x) on Intel OpenCL with double precision 2023-03-02 18:47:34 -05:00
c4f095f9df Updated the doc page of fix polarize to note that polarize/functional not supporting charged interfaces yet 2023-03-02 15:17:32 -06:00
b08fe855a1 Increased the default max iterations to 50, put a note on setting the local epsilon for charged interface particles to be the mean dielectric value 2023-03-02 15:12:59 -06:00
9b1afd7145 more description. address typos. 2023-03-02 15:54:30 -05:00
4a8aaf9f46 Added the missing factor 4\pi in epsilon0e2q to other units 2023-03-02 14:52:01 -06:00
663d57cc8f Prevent segfault 2023-03-02 10:13:52 -07:00
c2205266f0 Refactor FixWallGranKokkos 2023-03-02 09:48:01 -07:00
2f0aff7b78 Merge remote-tracking branch 'github/develop' into pair_style_tutorial 2023-03-02 10:34:31 -05:00
12f5bc9c77 Merge branch 'lammps:develop' into master 2023-03-02 16:10:21 +02:00
da79aadc8d spelling 2023-03-02 07:31:38 -05:00
de466cf998 improve documentation of the use of verlet/split run style. reformat. 2023-03-02 07:31:33 -05:00
63a391a649 replace leftover -DCUDA_PROXY 2023-03-01 21:05:22 -05:00
765d792f40 Merge remote-tracking branch 'github/develop' into collected-small-changes 2023-03-01 21:03:03 -05:00
2979296c02 Merge pull request #3666 from ndtrung81/gpu-cuda-mps
Fixed GPU library builds with CUDA MPS
2023-03-01 21:02:27 -05:00
c8696478b7 Merge pull request #3648 from jrgissing/bond/react-updates+tests
Bond/react updates
2023-03-01 21:01:59 -05:00
e4e994f1b1 add missing versionadded tags 2023-03-01 20:59:48 -05:00
8a1771aa61 implement documented pair style requirements for DPD-MESO intgreation fixes 2023-03-01 20:52:23 -05:00
c5c787ca5c better align with docs bundled with the MSCG library 2023-03-01 20:41:36 -05:00
04d3032914 improve error messages 2023-03-01 20:41:13 -05:00
a715a56afe fix typo 2023-03-01 20:41:00 -05:00
87a9695c64 Merge remote-tracking branch 'github/develop' into collected-small-changes 2023-03-01 20:37:50 -05:00
c2fe2b4360 Merge pull request #3661 from bathmatt/hippy-fixes
Hippy fixes
2023-03-01 20:36:37 -05:00
d44ba14030 Merge pull request #3657 from akohlmey/custom-wall-fixes
Add fix wall/table and fix wall/lepton for customizable wall fixes
2023-03-01 20:16:56 -05:00
993aba288a whitespace 2023-03-01 16:30:02 -07:00
7d0a28ec43 Remove unused var 2023-03-01 16:25:16 -07:00
6d29e9209d Another refactor 2023-03-01 15:48:04 -07:00
2ccfe635ce Removed the outdated CUDA_PROXY flag, using CUDA_MPS_SUPPORT consistently in CMake and traditional builds 2023-03-01 16:38:50 -06:00
c1e14e09f3 add more source code. remove remnants of the fix page 2023-03-01 17:16:36 -05:00
ef6f4465af Need to keep check for newton on 2023-03-01 13:05:22 -07:00
512eead15a Fix logic issues in Kokkos neigh build 2023-03-01 12:08:33 -07:00
35a9771e23 Implement born_matrix in pair_coul_debye.cpp 2023-03-01 18:33:37 +02:00
fa57857cc0 Implement born_matrix in pair_coul_cut.cpp 2023-03-01 18:32:11 +02:00
b8922ffe07 Include method declaration in pair_coul_debye.h 2023-03-01 18:30:51 +02:00
060976bb26 Include method declaration in pair_coul_cut.h 2023-03-01 18:29:56 +02:00
45009c8c66 Implement born_matrix in pair_buck_coul_cut.cpp 2023-03-01 12:38:23 +02:00
e0cc7aad97 Include method declaration in pair_buck_coul_cut.h 2023-03-01 12:36:35 +02:00
85f3d6eaef Implement born_matrix in pair_lj_class2_coul_cut.cpp 2023-03-01 10:24:22 +02:00
e59d08ee8b Include method declaration in pair_lj_class2_coul_cut.h 2023-03-01 10:22:07 +02:00
11172c1949 make biga0 and r0 accessible via Pair::extract() and add pair style to table in fix adapt 2023-02-28 21:50:44 -05:00
bc4da2afef roll back change causing unittest failures 2023-02-28 19:26:18 -05:00
103e63eca5 more careful checks and print error messages to global root. 2023-02-28 18:58:57 -05:00
2507e414d9 fix broken link 2023-02-28 18:11:05 -05:00
a98c497dbb redesign the Howto pages on water models and add inputs and molecule files 2023-02-28 18:10:45 -05:00
202a22ea68 Merge branch 'develop' into collected-small-changes 2023-02-28 11:27:26 -05:00
02190b82c2 link pair style hybrid/scaled to fix adapt and fix alchemy 2023-02-28 11:22:28 -05:00
a6eac92cd5 update list of pair styles that support fix adapt 2023-02-28 11:20:33 -05:00
36ce91c634 Merge branch 'develop' of github.com:lammps/lammps into kk_deform_rigid 2023-02-28 08:53:52 -07:00
3cd881f0b9 Implement born_matrix in bond_nonlinear.cpp 2023-02-28 17:29:50 +02:00
7aeccd9a6d Include method declaration in bond_nonlinear.h 2023-02-28 17:28:02 +02:00
3ab4735aa4 Implement born_matrix in bond_morse.cpp 2023-02-28 12:00:31 +02:00
22998f43ae Include method declaration in bond_morse.h 2023-02-28 11:59:06 +02:00
f866c1d961 Merge branch 'lammps:develop' into master 2023-02-28 11:54:23 +02:00
88760170bf python-mliap: consider abi flags for python lib 2023-02-28 10:34:36 +01:00
64d5317d19 hint to generate needed file for mliap pytorch example 2023-02-28 10:07:46 +01:00
2511872823 Updated GPU.cmake and Makefile.cuda_mps to not error out with exclusive process mode with the CUDA MPS server in use 2023-02-28 00:41:47 -06:00
a67d82c183 Merge pull request #3662 from akohlmey/fix-alchemy
New fix command for alchemical transformations using multiple partitions
2023-02-27 21:07:21 -05:00
02c26f4b87 add version tag 2023-02-27 16:53:43 -05:00
81a2d47c16 print warning about not checking lambda variable 2023-02-27 16:50:17 -05:00
446913f2f3 make ramp more flexible by defining lambda through a variable 2023-02-27 16:01:17 -05:00
3667382067 Add missing copy operation 2023-02-27 12:14:37 -07:00
83f936f31b Update fix_alchemy.rst 2023-02-27 11:00:11 -07:00
095f1d328e make non-polymorph functions and all data members protected. 2023-02-27 12:12:39 -05:00
bbd275a4e3 Merge pull request #2 from akohlmey/pimd_langevin 2023-02-27 10:01:47 -05:00
93b42f14e9 start document describing the implementation of a pair style 2023-02-27 01:58:59 -05:00
c8f3f4b173 add born/gauss pair style (for modeling liquid mercury) 2023-02-27 01:58:36 -05:00
8368b78f23 document the change in mass handling 2023-02-26 13:52:31 -05:00
0b5acdca51 convert hard error about invalid atom masses from EAM potentials to warning 2023-02-26 13:47:11 -05:00
2bd6cde4e8 add reference output 2023-02-26 00:19:39 -05:00
76c879c388 make sure that output variables are initialized 2023-02-26 00:16:03 -05:00
3e2b5dd9d3 small cleanup 2023-02-25 23:47:46 -05:00
666be5c3d9 add log files for example run 2023-02-25 23:47:34 -05:00
6b1cad1e3d programming style updates 2023-02-25 23:16:51 -05:00
25a1996ece some formatting and programming style updates 2023-02-25 22:40:30 -05:00
f84765f29e update document for fix pimd/langevin 2023-02-25 20:34:10 -05:00
c950df2ede delete commented-out code 2023-02-25 19:53:19 -05:00
00a5930d4c delete default seed 2023-02-25 18:58:56 -05:00
c9b22ba04f mention pair style hybrid/scaled as alternative 2023-02-25 17:17:41 -05:00
27067beabc Merge pull request #1 from akohlmey/pimd_langevin
Add infrastructure to docs for fix pimd/langevin
2023-02-25 16:50:47 -05:00
0911565660 prepare for inclusion of fix pimd/langevin 2023-02-25 16:36:01 -05:00
3737b5f774 whitespace fixes and clang-format on the header 2023-02-25 16:22:27 -05:00
bb17541c30 add simple example for transforming a pure metal into an alloy 2023-02-25 16:01:26 -05:00
2bad63c68e add documentation 2023-02-25 14:09:14 -05:00
828b70fbfa silence warning 2023-02-25 13:58:58 -05:00
60129958c8 refactor how properties computed by the fix are accessed
lambda is no an (intensive) scalar property
and the vector property only has the potential energies.
pressure is accessed via compute pressure/alchemy.
2023-02-25 12:47:49 -05:00
d691d1db78 synchronize box dimensions at the beginning and when needed 2023-02-25 12:42:10 -05:00
d241e26d03 allow dynamic groups with fix oneway 2023-02-25 12:03:40 -05:00
81b0bb47be allow dynamic groups with fix oneway 2023-02-25 12:03:05 -05:00
c288a20077 add progress information to screen or universe logfile 2023-02-25 11:14:56 -05:00
7242186045 add compute pressure/alchemy so it can be used with fix npt 2023-02-25 10:43:49 -05:00
73e7163ed6 don't store topology information with ghost atoms. they will be ignored. 2023-02-24 22:56:17 -05:00
fdf5148238 don't store topology information with ghost atoms. they will be ignored. 2023-02-24 22:55:23 -05:00
6d12f7925b first working implementation of fix alchemy. still w/o support for pressure and variable cell. 2023-02-24 19:02:11 -05:00
7a4b23938e update example so we can use the simpler communication pattern 2023-02-24 19:00:12 -05:00
7d3b9e4dda another doc page change 2023-02-24 16:27:15 -07:00
6abc32efe8 Remove extra file 2023-02-24 16:19:22 -07:00
ea73ddcb59 remove all files and dirs relevant to the fix latte command 2023-02-24 16:13:50 -07:00
0e6be96de1 cleanup 2023-02-24 16:07:22 -07:00
fae0442130 rerun examples with latest version 2023-02-24 15:50:03 -07:00
7b66238eb2 sync with GH version 2023-02-24 14:51:42 -07:00
ea6ec5c70f more doc updates 2023-02-24 13:41:59 -07:00
ed822f8002 WIP 2023-02-24 15:41:04 -05:00
37d6014f40 updated doc pages and README files 2023-02-24 13:32:58 -07:00
c351b63919 fix pimd/langevin put properties and functions below protected 2023-02-24 11:48:28 -05:00
de98704e1e more syncing of fix mdi/qm and mdi/qmmm 2023-02-24 07:46:56 -07:00
b0b14bd1d1 add fix pimd/langevin 2023-02-24 07:48:34 -05:00
4d78d987c6 add unmap_inv function 2023-02-24 07:34:58 -05:00
d831562e1f Fixing typo in equation for fene/nm 2023-02-24 12:27:53 +02:00
8ba61e11a2 Implement born_matrix in pair_nm_cut.cpp 2023-02-24 12:25:55 +02:00
f264631267 Include method declaration in pair_nm_cut.h 2023-02-24 12:24:45 +02:00
a32440cdef Implement born_matrix in bond_fene_nm.cpp 2023-02-24 11:58:42 +02:00
885c4d7609 Include method declaration in bond_fene_nm.h 2023-02-24 11:56:22 +02:00
3ea0447715 Implement born_matrix in dihedral_multi_harmonic.cpp 2023-02-24 09:41:52 +02:00
c4bf0f0ab5 Include method declaration in dihedral_multi_harmonic.h 2023-02-24 09:39:38 +02:00
c35b32961b Implement born_matrix in dihedral_opls.cpp 2023-02-24 08:51:25 +02:00
e610924641 Include method declaration in dihedral_opls.h 2023-02-24 08:48:40 +02:00
6886f37188 Merge branch 'lammps:develop' into master 2023-02-24 08:46:27 +02:00
c5f29dee39 Merge pull request #3658 from akohlmey/collected-small-changes
Collected small changes and bug fixes
2023-02-23 23:10:52 -05:00
54a4bde88b Port changes to fix qeq/reaxff/kk 2023-02-23 17:37:26 -07:00
7548dc3e04 Another refactor 2023-02-23 17:19:14 -07:00
2d4f2532ae Allow fix_deform/kk to use rigid bodies 2023-02-23 14:58:59 -07:00
5a5a86684a Fix the adios2::ADIOS constructor calls that were deprecated in adios 2.8 and removed in 2.9. The fix is backward compatible with older adios2 versions as well. 2023-02-23 15:39:01 -05:00
ae3f57e89a fix bug in fix wall/morse that was computing forces incorrectly 2023-02-23 15:38:20 -05:00
fff7b2a859 update unit test for correct fix wall/morse 2023-02-23 15:37:58 -05:00
6b9911dd74 update unit test for correct fix wall/morse 2023-02-23 15:28:21 -05:00
d3ac4a728d fix bug in fix wall/morse that was computing the force incorrectly 2023-02-23 15:22:38 -05:00
6ae177f37e rename fix pimd to fix pimd/nvt (with backward compatibility) 2023-02-23 12:26:42 -05:00
bb75ed5071 Implement born_matrix in bond_fene.cpp 2023-02-23 18:15:43 +02:00
5fb11e3f06 Include method declaration in bond_fene.h 2023-02-23 18:14:23 +02:00
1a520325b2 Merge branch 'lammps:develop' into master 2023-02-23 18:12:00 +02:00
cad3c5ba95 Fixed code to run with hippynn 2023-02-23 15:53:43 +01:00
fc0efd43fc added kokkos functinos to the list of functions registered for ML-IAP 2023-02-23 15:53:43 +01:00
e422ae9477 improve error messages and make them consistent across variants 2023-02-23 09:40:51 -05:00
2e5bc2f6b7 add test example for validating custom potentials 2023-02-23 01:09:44 -05:00
34430c1047 add unit tests for fix wall/lepton and fix wall/table 2023-02-23 00:57:41 -05:00
b314f73ef4 update .gitignore and fix typo in doc makefile 2023-02-23 00:40:07 -05:00
ec87c71064 add documentation for fix wall/lepton, fix wall/table and WallTabulate() 2023-02-23 00:35:25 -05:00
0dcb591ee8 add support to create tables for fix wall/table 2023-02-22 23:31:04 -05:00
a3ff40ccf0 fixes to avoid uninitialized or out-of-bounds memory accesses 2023-02-22 23:29:46 -05:00
a92c9e3b91 cmake: remove pip install from install target 2023-02-22 20:15:59 -07:00
8b16301e5f doc pages and sync qm vs qmmm fixes 2023-02-22 17:21:40 -07:00
b12facbd54 add fix wall/table 2023-02-22 19:06:07 -05:00
36ec4a098b add fix wall/lepton 2023-02-22 19:06:07 -05:00
f4d8b2a57a remove unused namespace import 2023-02-22 19:06:07 -05:00
94ac3895f9 enable and apply clang-format, improve error messages. 2023-02-22 19:06:07 -05:00
1411d48d9e prepare fix wall argument parser to support wall/lepton and wall/table 2023-02-22 19:06:06 -05:00
fc0d23965b small cleanup 2023-02-22 16:48:01 -05:00
d24952ad0a Fix compile 2023-02-22 13:47:31 -07:00
2542778fa8 Merge pull request #3656 from pnorbert/fix-deprecated-adios-init
Fix the adios2::ADIOS constructor calls that were deprecated in adios…
2023-02-22 15:32:05 -05:00
54a18be0ff More cleanup 2023-02-22 13:26:32 -07:00
c6c5a157f1 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-02-22 11:48:32 -07:00
4814578d85 Fixing missing semicolon 2023-02-22 17:22:17 +02:00
c1a37ac00f Implement born_matrix in angle_harmonic.cpp 2023-02-22 17:16:56 +02:00
27f07206f6 Include method declaration in angle_harmonic.h 2023-02-22 17:15:13 +02:00
febaf55afe Fix the adios2::ADIOS constructor calls that were deprecated in adios 2.8 and removed in 2.9. The fix is backward compatible with older adios2 versions as well. 2023-02-22 07:28:00 -05:00
c647be0287 avoid segfault when atom style peri is used in a hybrid atom style 2023-02-21 18:11:59 -05:00
4c36702546 whitespace fixes 2023-02-21 16:31:45 -05:00
e86e67e8cd Merge pull request #3655 from evoyiatzis/master
More implementations of analytical expressions for compute born/matrix
2023-02-21 16:19:35 -05:00
1aa7a6c8b8 update from Aidan 2023-02-21 15:47:59 -05:00
6c5c93438c update for ROCm 5.4.3 and CUDA 12.0 2023-02-21 15:00:48 -05:00
633ae8bc40 Revert "add 'atom type' test option to force style tests"
This reverts commit 7709dfa118.
2023-02-21 12:59:32 -05:00
cdcc33aebc Revert "add simple bond/react unit test"
This reverts commit f2713aad94.
2023-02-21 12:59:32 -05:00
e3003ce294 Revert change in angle_cosine_shift.h 2023-02-21 16:09:58 +02:00
ea9a498fcf Include method declaration in angle_cosine_shift.h 2023-02-21 15:54:13 +02:00
9611347d1b Implement born_matrix in angle_cosine_delta.cpp 2023-02-21 15:47:59 +02:00
ee2b6315ec Include method declaration in angle_cosine_delta.h 2023-02-21 15:46:34 +02:00
ca8a1b80d9 Implement born_matrix in angle_fourier_simple.cpp 2023-02-21 10:25:04 +02:00
994745bd53 Include method declaration in angle_fourier_simple.h 2023-02-21 10:23:18 +02:00
a86302beb7 Merge branch 'lammps:develop' into master 2023-02-21 10:20:44 +02:00
095e00e3e9 Merge pull request #3649 from akohlmey/collected-small-fixes
Collected small fixes
2023-02-20 15:23:20 -05:00
2ea29affb8 Merge pull request #3653 from rohskopf/mliap-gradforce
Eliminate gradforce loops in ML-IAP pair style
2023-02-20 14:09:30 -05:00
d5ba6f70f2 enable and apply clang-format 2023-02-20 12:48:39 -05:00
f7aae84cf6 make gradgradflag a compile time constant 2023-02-20 12:48:23 -05:00
c7eaee117e eliminate gradgradflag class member and use flag from data class instead 2023-02-20 12:48:03 -05:00
a59e4a961b Implement born_matrix in pair_lj96_cut.cpp 2023-02-20 16:38:41 +02:00
e1d013bf7b Include method declaration in pair_lj96_cut.h 2023-02-20 16:36:59 +02:00
dfc9da8020 add link_check target calling linkchecker to manual build makefile 2023-02-19 21:12:22 -05:00
9220ea5695 fix a bunch more broken links 2023-02-19 20:48:54 -05:00
7149143df8 fix outdated or broken URLs and typos in URLs 2023-02-19 16:11:22 -05:00
472d32ee17 Implement born_matrix in pair_harmonic_cut.cpp 2023-02-19 17:59:53 +02:00
7383daa23e Include method declaration in pair_harmonic_cut.h 2023-02-19 17:57:30 +02:00
29c5c1a0d3 Implement born_matrix in bond_harmonic_shift.cpp 2023-02-19 17:27:23 +02:00
d300225f78 Include method declaration in bond_harmonic_shift.h 2023-02-19 17:25:28 +02:00
8a5ee84901 Implement born_matrix in angle_fourier.cpp 2023-02-19 16:31:42 +02:00
42b7c40020 Include method declaration in angle_fourier.h 2023-02-19 16:27:03 +02:00
ff72268430 rate_limit keyword speedup
was previously checking for reactions when even one reaction would exceed rate limit
2023-02-18 16:33:57 -05:00
a875ef77cd Implement born_matrix in pair_lj_class2.cpp 2023-02-18 20:23:40 +02:00
863aec4c79 Include method declaration in pair_lj_class2.h 2023-02-18 20:21:44 +02:00
ac506255a6 Implement born_matrix in pair_born.cpp 2023-02-18 11:18:27 +02:00
c020aba17c Include method declaration in pair_born.h 2023-02-18 11:16:55 +02:00
ca7cb7bd0e Implement born_matrix in pair_buck.cpp 2023-02-18 10:24:08 +02:00
aa209e621d Include method declaration in pair_buck.h 2023-02-18 10:21:23 +02:00
0ead219a8b backward compatibility with restart
keep new maxline limit (1024 chars), but old react-ID length limit (256 chars)
2023-02-18 00:37:28 -05:00
83ba1c9d20 Merge pull request #3645 from akohlmey/more-backports-to-stable
More backports of fixes to stable release
2023-02-17 16:27:13 -05:00
9c73f32121 increase MAXLINE to match other parts of lammps
'custom' constraint could exceed 256 chars fairly easily
2023-02-17 13:01:47 -05:00
ce10614cab backport region check move to init() function for fix gcmc and fix widom 2023-02-17 12:44:58 -05:00
facbeac052 move definition of MAXBIGINT_DOUBLE to variable.cpp 2023-02-17 12:29:17 -05:00
ba80af3bd9 Update Kokkos and confirm computes work 2023-02-16 19:59:25 -07:00
af4c45a52b Confirm computes still work and use gradgradflag = -1 for pair style 2023-02-16 15:43:44 -07:00
621283bb78 Enclose gradforce loops in gradgradflag conditional
Co-authored-by: Nicholas Lubbers <nlubbers@lanl.gov>
2023-02-16 12:16:53 -07:00
17e1ed4869 updates to README 2023-02-16 10:27:45 -07:00
33056a4fd3 Merge pull request #3651 from stanmoore1/kk_3.7.1_update
Fix Kokkos compile error with NVIDIA Hopper GPU
2023-02-15 16:51:49 -05:00
8d3b06623e Merge pull request #3650 from evoyiatzis/master
Implementation of analytical expressions for Born matrix in bond_class2 & bond_gromos
2023-02-15 16:11:09 -05:00
76c00fe2ed fix MPI issue in PySCF wrapper 2023-02-15 12:14:38 -07:00
bdfc49f88f Moved region check from constructor to init() 2023-02-15 11:17:06 -07:00
329dbd0485 Updating doc/examples, moving forward comm to pre_force 2023-02-15 11:00:19 -07:00
f775de1884 Fix Kokkos compile error with NVIDIA Hopper GPU 2023-02-15 10:02:25 -07:00
5f5c7624f2 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2023-02-15 09:45:19 -07:00
4a5d7c671c Switching from new atom style to property/atom 2023-02-14 15:02:12 -07:00
d13634cd6b move definition of MAXBIGINT_DOUBLE to variable.cpp 2023-02-14 15:37:59 -05:00
553a98036c Implement analytical expression for born_matrix in bond_gromos.cpp 2023-02-14 10:19:49 +02:00
7c951d60da Include method declaration in bond_gromos.h 2023-02-14 10:17:27 +02:00
864488adbb Implement analytical expression for born_matrix in bond_class2.cpp 2023-02-14 09:39:39 +02:00
115c09ce23 Include method declaration in bond_class2.h 2023-02-14 09:37:12 +02:00
4bf9024c17 tweak comments 2023-02-13 16:27:37 -07:00
4dac68ef72 Merge pull request #3644 from ndtrung81/gpu-gauss-bugfix
Fixed issues with gauss/gpu in bonded systems
2023-02-13 16:07:01 -05:00
f06d783497 add mc_active to header 2023-02-13 11:38:24 -07:00
04c22e86cd disable PySCF support for independent MDI coupling for now 2023-02-13 11:16:56 -07:00
f1fde259e7 make new/incremental quantum trigger more robust, including fix GCMC and atom/swap 2023-02-13 11:10:50 -07:00
9c7ba5a329 remove debug printf() 2023-02-13 10:56:02 -05:00
a0760d0ca6 improve error message 2023-02-13 10:56:02 -05:00
fbe30ffec6 use MAXBIGINT_DOUBLE which does not overflow when casting back to bigint 2023-02-13 10:56:02 -05:00
e99ec32b4b enable and apply clang-format 2023-02-13 10:56:02 -05:00
401ac8c4f7 make fallback url function available to plugin compilations 2023-02-13 10:56:01 -05:00
575dfd9b21 Merge branch 'develop' of github.com:lammps/lammps into develop 2023-02-13 10:36:33 +01:00
eab3c4d382 better map file error handling 2023-02-12 15:08:46 -05:00
188ee5af15 use MAXBIGINT_DOUBLE which does not overflow when casting back to bigint 2023-02-12 04:08:11 -05:00
f2713aad94 add simple bond/react unit test 2023-02-12 00:36:58 -05:00
b465594aec bond/react restarts bugfix
introduced with recent 'rate_limit' keyword
2023-02-12 00:05:07 -05:00
c0e147dc57 make bond/react examples more accurate 2023-02-11 23:38:55 -05:00
7709dfa118 add 'atom type' test option to force style tests 2023-02-11 16:11:35 -05:00
46ea4843c1 Refactor and small cleanup 2023-02-10 14:28:43 -07:00
403e88b25f Fix style issues 2023-02-10 14:28:32 -07:00
f135771ddf Fix compile error 2023-02-10 14:11:21 -07:00
89510e793d Merge pull request #3643 from akohlmey/feature-release-maintenance-branch
Update documentation for revised release and branch names
2023-02-10 15:36:25 -05:00
4f4a67fb45 make fix md/qm more robust 2023-02-10 12:38:55 -07:00
e80bfa4a95 Merge branch 'develop' of https://github.com/lammps/lammps into granular-kokkos 2023-02-10 11:41:52 -07:00
d0c6c310d9 Port changes to other EAM flavors 2023-02-10 10:50:36 -07:00
23bfc1666c Use range_policy if running on host, small cleanup 2023-02-10 09:24:18 -07:00
26333c28ab fix grammar and spelling issues 2023-02-10 11:22:13 -05:00
f176b8b14c consistently support special_bonds settings in pair style gauss 2023-02-10 05:09:58 -05:00
4d5d04aba3 cosmetic 2023-02-10 05:09:22 -05:00
2396b2feea Fixed bugs with gauss/gpu in bonded systems, including factor_lj in forces and energies 2023-02-10 05:02:43 -05:00
7fa298f2ef consistently support special_bonds settings in pair style gauss 2023-02-10 04:47:19 -05:00
88ccd546d8 Fixed bugs with gauss/gpu in bonded systems, including factor_lj in forces and energies 2023-02-09 23:55:14 -06:00
58a90d613b update manual for revised release and branch names 2023-02-10 00:50:36 -05:00
4399c1b6c1 Merge pull request #3593 from akohlmey/maintenance-2022-06-23
Third round of maintenance fixes and backports for the stable release
2023-02-09 22:53:11 -05:00
c37c752d36 update markdown files for revised branch structure and development workflow 2023-02-09 21:21:51 -05:00
fd046c8fd8 Merge branch 'maintenance' into maintenance-2022-06-23 2023-02-09 20:17:06 -05:00
09b7694601 Merge pull request #3595 from akohlmey/maintenance-many-files
Additional non-functional maintenance changes for the stable version
2023-02-09 20:09:28 -05:00
32186b98f5 more debugging 2023-02-09 14:05:47 -07:00
b4b3d47783 variable substitution memory leak 2023-02-09 11:14:16 -07:00
df20503434 make fallback url function available to plugin compilations 2023-02-09 08:14:23 -05:00
b635465154 Merge pull request #3633 from akohlmey/next_patch_release
Update versions strings for the next patch release
2023-02-09 00:16:26 -05:00
2ee81bfe1e Merge pull request #3638 from akohlmey/collected-fixes
Final fixes for the next patch release
2023-02-08 23:08:16 -05:00
af231a1327 explicitly request parallel compilation with 2 parallel processes on Windows 2023-02-08 21:20:46 -05:00
f4aa24a36a roll back changes for vec3_scale() and vec3_scaleadd() and use temporary vector 2023-02-08 20:33:38 -05:00
04bed1a6e0 roll back changes for vec3_scale() and vec3_scaleadd() and use temporary vector 2023-02-08 20:32:47 -05:00
f9be11ac8a enable variables in MDI commands 2023-02-08 16:10:45 -07:00
618e766d5f organize NWChem examples 2023-02-08 16:06:45 -07:00
007c04bc97 correct preprocessor logic for non-Linux machines 2023-02-08 16:45:48 -05:00
09099dd29f correct preprocessor logic for non-Linux machines 2023-02-08 16:45:16 -05:00
0ae72ce36d update for recent doc updates 2023-02-08 16:44:32 -05:00
d7d0bc12af cosmetic 2023-02-08 15:25:46 -05:00
2cd32d7e76 clean up 2023-02-08 12:54:34 -07:00
10b20ec647 more examples in QUANTUM/LATTE 2023-02-08 12:48:50 -07:00
f67d378230 update comment and architecture name 2023-02-08 14:45:50 -05:00
19bcf6b43c revert to simple ParReduce policy for reductions
Change-Id: Ib3018e85f7bc6c97ce9c0320d0ea43c743addacf
2023-02-08 14:05:29 -05:00
418d1e16e1 recover compilation of tersoff kernels with CUDA 2023-02-08 11:17:09 -05:00
912f046cd7 recover compilation of tersoff kernels with CUDA 2023-02-08 11:16:46 -05:00
1882dc2e8c ensure local q pointer is initialized to NULL 2023-02-08 10:24:29 -05:00
6471d781d0 recover kernel failure for tersoff with mixed and single precision 2023-02-08 09:14:37 -05:00
30abe68c82 recover kernel failure for tersoff with mixed and single precision 2023-02-08 09:13:04 -05:00
97ddc5917c another OpenCL bugfix attempt from Trung 2023-02-08 08:26:22 -05:00
3b4c873beb another OpenCL bugfix attempt from Trung 2023-02-07 17:31:43 -05:00
3419bfa3f2 LATTE examples dir 2023-02-07 15:21:43 -07:00
d170f83c6d add experimental Ada CUDA architecture support for conventional make builds. 2023-02-07 13:31:55 -05:00
324a5aa727 Merge remote-tracking branch 'github/develop' into collected-fixes 2023-02-07 10:38:40 -05:00
bde2867251 Make Kokkos configuration compatible with RTX40x0 generation consumer GPUs
@stanmoore1 is this the correct way add this?
2023-02-07 08:40:04 -05:00
a95ff20647 swap nvcc default arch from Maxwell to Pascal
This is to avoid deprecation warnings with CUDA 11.6 and later
2023-02-07 08:34:01 -05:00
b9981ac51e update list of KOKKOS supported architectures for Kokkos 3.7.1 2023-02-07 07:18:40 -05:00
9e0a9e2601 correct logic 2023-02-07 00:00:17 -05:00
8b34d65970 add download fallback handling 2023-02-07 00:00:07 -05:00
d63d918dc5 correct logic 2023-02-06 23:59:24 -05:00
f4974f1518 add download fallback handling 2023-02-06 23:59:15 -05:00
c60fd6f89d more debugging and examples with NWChem 2023-02-06 18:06:04 -07:00
e5b067d1ab Merge branch 'develop' of github.com:lammps/lammps into eam_teampolicy_optimization 2023-02-06 16:48:03 -07:00
acf7f9184d fix failing unit tests with OpenCL 2023-02-06 18:40:59 -05:00
0a1c2bcccc fix failing unit tests with OpenCL 2023-02-06 18:40:07 -05:00
08b9af89bb more work with NWChem 2023-02-06 14:46:40 -07:00
2dad11b36d Merge pull request #3635 from akohlmey/grammar-review
Review grammar in Developer guide and Howto pages
2023-02-06 14:48:11 -05:00
b501d4226a Merge branch 'develop' of github.com:srtee/lammps into collected-fixes 2023-02-06 14:45:52 -05:00
fb0af756eb Merge branch 'patch-1' of github.com:srtee/lammps into collected-fixes 2023-02-06 14:45:32 -05:00
9c2fe48a7b Update Howto_mdi.rst 2023-02-06 10:55:18 -07:00
83831ca222 Update variable.cpp
I remembered that I forgot to remove these commented printf() calls.
2023-02-06 10:23:22 -07:00
cd093d94b9 add versionadded tag to "maxtry" option 2023-02-06 11:12:02 -05:00
955004afc5 Align fix_controller.cpp with documentation
Documentation for `fix controller` says that the first calculation of error contributes to the integral term (in equation 2, at $n = 1$). Either the code should be changed to reflect this, or the documentation should be changed to reflect what the code currently does (i.e. start from $n = 2$ in the finite-difference integral term).
2023-02-06 15:42:41 +10:00
fb5c0a4c87 Correct typos and clarify fix_controller.rst
Fixes some typos and adds math expression c_0 for the initial control variable value; removes the "E-hat" term from equations (which doesn't appear elsewhere in the support doc or the source code)
2023-02-06 15:34:58 +10:00
3955bc8bfe revise a chunk of Howto pages with the help of languagetool.org 2023-02-05 18:09:36 -05:00
ddc23bb3bf refactor step 2: reorder when to dedup reactions 2023-02-05 15:14:57 -05:00
162ee16825 refactor step 1: delay check for ghosts 2023-02-05 13:46:29 -05:00
e7fc590f91 simplify and correct dedup routine 2023-02-05 12:00:33 -05:00
0885edc154 re-enable new neighbor lists with CUDA 12.0 and later 2023-02-05 03:02:19 -05:00
c9442c591c re-enable new neighbor lists for CUDA 12.0 and later 2023-02-05 03:01:46 -05:00
d1550bf9f6 starting grammar, punctuation, and spelling review for developer info sections 2023-02-04 22:00:35 -05:00
b7d316031d nullify freed pointers in list of dump data 2023-02-03 20:39:47 -05:00
5ace12e3ef nullify freed pointers in list of dump data 2023-02-03 20:35:47 -05:00
361e9f3ea5 avoid illegal memory access in destructor after variables have been deleted 2023-02-03 20:26:42 -05:00
6707ab6182 avoid illegal memory access in destructor after variables have been deleted 2023-02-03 20:23:41 -05:00
b7ed8828e7 start adding QE support to exampes/QUANTUM 2023-02-03 18:14:50 -07:00
c45b9a5301 more debugging 2023-02-03 15:20:18 -07:00
1c77ffc288 catch missing static extents
Change-Id: I456282b172053a3566b1ce9a36bc33d377bd801a
2023-02-03 14:57:56 -05:00
55f454db2d Addressed feedback from LAMMPS developers:
- moved policyInstance into the EAM class
  - eliminated MAX_CACHE_COLS define, in favor of the static_extent of the spline view type
  - made inum a protected member var that allows range checking inside TeamPolicy kernels
  - added range checking after initializing the cached table in TeamPolicy kernels
  - correctness and perf checks pass

Change-Id: Iaaf34f7560c37e0a2a34e980761246d3ef42be99
2023-02-03 14:53:34 -05:00
a0a7e76cc3 Merge pull request #3623 from ndtrung81/kokkos-dipole-lj-expand
Adding the kokkos variants for lj/cut/dipole/cut and lj/expand/coul/long
2023-02-03 13:52:47 -05:00
e28ff8a8aa Fix bug in full logic 2023-02-03 09:59:24 -07:00
9520be6aae update versions strings for the next feature release 2023-02-03 11:39:50 -05:00
afdc500379 Small tweaks 2023-02-03 09:27:15 -07:00
1f9aaa345f Add logic for full list 2023-02-03 09:21:30 -07:00
7fbb6095c6 Merge pull request #3614 from evoyiatzis/master
Extending the C library and the python interface
2023-02-03 11:02:40 -05:00
0823117ec5 Corrected per-atom energy and stress tally, removed the redundant kernel in lj/cut/dipole/cut/kk 2023-02-03 09:57:17 -06:00
fd1823a890 more debugging 2023-02-03 08:00:58 -07:00
8994633dab fix broken link 2023-02-02 23:25:57 -05:00
c8f0ca4556 Merge pull request #3631 from stanmoore1/kk_overlap
Disable Kokkos GPU <--> CPU overlap when using pair hybrid with non-K…
2023-02-02 22:23:04 -05:00
28120793b8 backport PR #3631 2023-02-02 22:21:15 -05:00
f717debbd4 use same main() function as with c-library interface. 2023-02-02 21:16:20 -05:00
8a0e9f6018 add tests for gathering angles, dihedrals, impropers from fortran 2023-02-02 20:58:47 -05:00
751e33c70e more LATTE refactoring and debugging 2023-02-02 18:16:45 -07:00
5797ba5bcf convert Fortran version of lammps_gather_bonds() test to be similar to C version 2023-02-02 19:10:51 -05:00
914b40f4bf LJ forces must be scaled with factor_lj 2023-02-02 17:30:32 -05:00
a91ae836a9 Fix Kokkos GPU bug in pair_mliap_kokkos 2023-02-02 14:35:35 -07:00
56ca901cdb Implement a "caching in LDS" approach for EAM to improve performance on HIP
- Use a TeamPolicy rather than a RangePolicy to expose scratch
	- Team cooperates to load row-zero of spline into LDS
	- At runtime, decide whether value can be 'cached' in LDS, and conditionally load from LDS based on this

Should be easily extendable / tunable for other architectures if ever required.

Change-Id: Ie4254c8db1a7b14abafffe2b581014c5137bf7ed
2023-02-02 16:35:28 -05:00
44ff363169 Removed the class member variable mu in the AtomVecDipoleKokkos that shadows the parent's variable mu, now as protected 2023-02-02 15:31:10 -06:00
96e94c74da Merge branch 'develop' of https://github.com/lammps/lammps into kk_overlap 2023-02-02 13:34:28 -07:00
72da6007d2 Another tweak 2023-02-02 13:32:56 -07:00
ea9f5abc4a Tweak logic for CPU 2023-02-02 13:23:59 -07:00
12079c32de Merge branch 'develop' into fix-mdi-qmmm 2023-02-02 13:10:55 -07:00
5cf1bbff7c Merge branch 'develop' 2023-02-02 15:07:05 -05:00
180dcf4459 add missing index entries 2023-02-02 15:06:22 -05:00
dd0398b7f2 Merge branch 'develop' into kokkos-dipole-lj-expand 2023-02-02 14:49:53 -05:00
11871ceb2e Merge pull request #3620 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-02-02 14:37:39 -05:00
a70efd9a1b Small cleanup 2023-02-02 12:19:55 -07:00
9b7e4478b3 Update docs 2023-02-02 12:00:42 -07:00
d7d6cb2328 Add new files to Kokkos Install.sh 2023-02-02 11:52:23 -07:00
e19f873f49 Added the missing source files for AtomVecDipoleKokkos 2023-02-02 12:31:21 -06:00
ffdca466e9 Merge branch 'develop' of https://github.com/lammps/lammps into kokkos-dipole-lj-expand 2023-02-02 11:10:56 -07:00
c9b23b8a03 Remove this-> 2023-02-02 10:25:31 -07:00
3d3bd0d7f2 Merge branch 'develop' into collected-small-fixes 2023-02-02 02:40:50 -05:00
b3262684af more LATTE debugging 2023-02-01 17:15:25 -07:00
c0c5c34290 Disable Kokkos GPU <--> CPU overlap when using pair hybrid with non-Kokkos styles 2023-02-01 16:13:09 -07:00
c53ea66f39 debgging for LATTE 2023-02-01 14:20:27 -07:00
b8b5e385b6 Merge pull request #3630 from akohlmey/download-fallback
Fallback URLs for downloading external libraries
2023-02-01 14:40:13 -05:00
090e61f0ec more debugging 2023-02-01 11:31:15 -07:00
a81e6693cd more work on LATTE interface 2023-02-01 10:53:08 -07:00
f32ce8377e change default arch in nvcc_wrapper, so it can still run with cuda 12 2023-02-01 11:35:59 -05:00
9021b8bc6a implement download fallback for traditional make build 2023-02-01 06:53:53 -05:00
89b37c51df implement download fallback for traditional make build 2023-02-01 06:47:25 -05:00
7172d1bdd1 correct syntax error 2023-02-01 03:53:32 -05:00
6ed526c95b Merge branch 'develop' 2023-02-01 03:42:34 -05:00
dade985558 skip tests for lepton pair styles with INTEL package 2023-01-31 23:17:50 -05:00
6776c4215d add support for building a static lammps-shell executable with Linux/MUSL 2023-01-31 22:24:02 -05:00
838fe3020d add support for building a static lammps-shell executable with Linux/MUSL 2023-01-31 22:23:41 -05:00
957f98ddb7 Merge branch 'develop' into collected-small-fixes 2023-01-31 20:42:05 -05:00
b4d4dcbcbc simplify 2023-01-31 20:35:18 -05:00
52a892ec46 simplify 2023-01-31 20:32:41 -05:00
0ee3d9da5d port triclinic region vs box check from fix gcmc to fix widom 2023-01-31 20:29:18 -05:00
50afb292b0 compare region extent with box bounds for triclinic 2023-01-31 20:28:25 -05:00
275ef9da17 update n2p2 lib version for traditional make, too. 2023-01-31 20:28:15 -05:00
b6a87390a3 revert MD5 hash to current value after GitHub reversed its change 2023-01-31 20:28:04 -05:00
72178631c5 update N2P2 library to version 2.2.0 2023-01-31 20:27:57 -05:00
f8859c5fca implement download fallback URLs pointing to download.lammps.org for CMake 2023-01-31 20:22:06 -05:00
454c77e874 Merge pull request #3621 from lammps/small_bugfixes
Small bugfixes for KOKKOS
2023-01-31 20:20:05 -05:00
979119a29b backport fixes to KOKKOS and REAXFF from PR #3621 2023-01-31 20:18:38 -05:00
bc66572275 Fix out of bounds access in pair_vashishta_kokkos with skip list 2023-01-31 20:00:45 -05:00
609231675f Allow neighbor class to set newton flag in Kokkos neigh list 2023-01-31 19:55:07 -05:00
0e4f917847 Merge pull request #3629 from yury-lysogorskiy/bugfix/kokkos-gpu-compilation
BUGFIX: update ML_PACE library version
2023-01-31 18:59:24 -05:00
2b5ef8d93e add plugin input script 2023-01-31 16:04:59 -07:00
018a815398 start work on LATTE wrapper 2023-01-31 16:02:55 -07:00
5d16bea899 implement download fallback URLs pointing to download.lammps.org for CMake 2023-01-31 16:35:06 -05:00
7c9068c34a correct nonPBC vs PBC calls to PySCF 2023-01-31 13:31:42 -07:00
83b578f604 BUGFIX: update ML_PACE library version (that fix compilation issue with nvcc)
extra update doc/src/pair_pace.rst
2023-01-31 21:08:32 +01:00
b4ac95b225 add support for NWChem in examples/QUANTUM 2023-01-31 12:40:54 -07:00
dc5980ab7e coments 2023-01-31 08:04:25 -07:00
be22256765 edits 2023-01-31 07:44:23 -07:00
e7bcdc63e5 add instructions for running 2-water QMMM PySCF problem 2023-01-31 07:43:20 -07:00
6b44d93eac port triclinic region vs box check from fix gcmc to fix widom 2023-01-31 09:08:58 -05:00
daf23068df update n2p2 lib version for traditional make, too. 2023-01-31 07:40:13 -05:00
e5d921585b cosmetic/whitespace 2023-01-31 06:49:21 -05:00
6bf5fc734e revert MD5 hash to current value after GitHub reversed its change 2023-01-31 06:40:15 -05:00
e5615f2579 Fix bug in ReaxFF with pair hybrid 2023-01-30 17:20:23 -07:00
0870bc3046 Allow neighbor class to set newton flag in Kokkos neigh list 2023-01-30 16:14:39 -07:00
3b2647917f add PySCF to renamed examples/QUANTUM dir 2023-01-30 15:45:07 -07:00
092a67ab93 debug 2023-01-30 15:41:25 -07:00
243fcbf47d more debugging 2023-01-30 14:08:18 -07:00
0d8ba92b4d update N2P2 library to version 2.2.0 2023-01-30 14:44:20 -05:00
b54cdc48e2 whitespace 2023-01-30 12:34:29 -07:00
a74e57cfc1 Revert 69e7dd9 2023-01-30 12:31:27 -07:00
a92a3ec50b Try again to fix memory leak 2023-01-30 12:27:54 -07:00
5c5bc2026d compare region extent with box bounds for triclinic 2023-01-30 12:17:55 -05:00
d9675b5da4 Fix QUIP compilation with Intel compilers. 2023-01-30 08:11:52 -05:00
5a89c69285 Merge branch 'patch-1' of github.com:RemiLacroix-IDRIS/lammps into collected-small-fixes 2023-01-30 08:10:34 -05:00
b115229dd2 Fix QUIP compilation with Intel compilers. 2023-01-30 13:30:34 +01:00
41e834d27f pair style gauss *does* support pair_modify shift 2023-01-30 06:12:45 -05:00
4637072a26 simplify 2023-01-30 00:08:51 -05:00
2a18c76361 preparations for unit tests of the Fortran module 2023-01-30 00:06:30 -05:00
f653ad7990 add unit tests for c-library interface 2023-01-29 14:13:28 -05:00
370c701f89 whitespace 2023-01-29 13:42:36 -05:00
f0578bbf63 Merge branch 'develop' 2023-01-29 13:27:54 -05:00
9c46f4dd39 Updated doc pages 2023-01-28 11:22:45 -06:00
7b0153eee6 Added lj/cut/dipole/cut/kk and lj/expand/coul/long/kk, added AtomVecKokkos, enabled FixNVESphereKokkos to update dipole 2023-01-28 00:34:55 -06:00
2e52afbd86 consistently skip over computing interactions with atoms set to NULL in hybrid styles 2023-01-27 22:12:33 -05:00
66e3d8c564 recover failing unit tests 2023-01-27 21:48:31 -05:00
373b578dc0 this is already checked for in Input class due to setting one_coeff = 1 2023-01-27 21:39:26 -05:00
7e6333fdd1 remove dead code 2023-01-27 20:48:32 -05:00
03c8b0ff89 use correct type for memset byte and avoid potential memory leaks 2023-01-27 20:42:37 -05:00
e0f090aa9e Fix invalid memory read, from @akohlmey 2023-01-27 14:43:16 -07:00
0677c1c3f5 Fix logic for neigh/trim yes and multiple runs 2023-01-27 14:29:00 -07:00
69e7dd9fd6 Change default for pair_modify neigh/trim 2023-01-27 14:28:40 -07:00
a31af4f46e Fix compile for OPENMP, remove unused var 2023-01-27 12:28:21 -07:00
8bc8f3eb4c debugging 2023-01-27 12:20:30 -07:00
b954c3ef86 Fix memory leak in pair_lj_cut_kokkos 2023-01-27 11:29:02 -07:00
db22961d49 Fix memory leak in Kokkos ReaxFF 2023-01-27 11:28:41 -07:00
b6f98244dc Fix out of bounds access in pair_vashishta_kokkos with skip list 2023-01-27 11:28:17 -07:00
7d32b4f42a make Kokkos lib compatible with musl-libc
Note: this was adapted from https://github.com/kokkos/kokkos/pull/5678
to be usable without requiring C++17
2023-01-27 12:21:39 -05:00
4f0245d542 make Kokkos lib compatible with musl-libc
Note: this was adapted from https://github.com/kokkos/kokkos/pull/5678
to be usable without requiring C++17
2023-01-27 12:21:13 -05:00
34e8a74989 apply changes suggested by clang-tidy 2023-01-27 11:49:43 -05:00
d31595a36c fixing unit tests in python-scatter-gather.py 2023-01-27 15:27:13 +02:00
697e5b15ec forcibly disable COMPRESS package is zlib is not found 2023-01-27 07:29:25 -05:00
ade0718c11 make compatible to non-glibc Linux 2023-01-27 07:26:23 -05:00
755766220c Include tests for gather_angles, gather_dihedrals & gather_impropers in python-scatter-gather.py 2023-01-27 10:28:28 +02:00
10ab0ffe19 Include tests for gather_angles, gather_dihedrals & gather_impropers in python-numpy.py 2023-01-27 09:59:28 +02:00
e7ea5e8bf5 enable and (mostly) apply clang-format 2023-01-26 22:02:12 -05:00
3756520078 Merge branch 'develop' into collected-small-fixes 2023-01-26 21:48:42 -05:00
4cb29ce413 Merge pull request #3608 from rohskopf/msmeam-adr
Multi-state MEAM with Kokkos support
2023-01-26 21:47:46 -05:00
3bcb59b284 Minor typo in docs 2023-01-26 18:24:39 -07:00
3be1dd0488 update PIMD examples 2023-01-26 18:48:30 -05:00
31033ff6e0 must initialize "np" in constructor 2023-01-26 18:34:21 -05:00
ba0d24d028 must initialize "np" in constructor 2023-01-26 18:33:48 -05:00
7f810ff59c update PIMD example1 2023-01-26 18:27:58 -05:00
f145e855ec initialized pointer 2023-01-26 18:07:56 -05:00
2f8ba9dd32 cleanup 2023-01-26 15:47:22 -07:00
6c8aec1ff4 whitespace 2023-01-26 15:35:08 -07:00
3a418290be Merge branch 'develop' into collected-small-fixes 2023-01-26 17:33:08 -05:00
f99853fab8 Update example with new syntax 2023-01-26 15:30:12 -07:00
b7dfa3db05 Whack extra files from #3532 2023-01-26 15:12:34 -07:00
866cf8ae60 Merge branch 'develop' of https://github.com/lammps/lammps into msmeam-adr 2023-01-26 15:10:30 -07:00
a7b357b951 Rename example 2023-01-26 15:10:01 -07:00
3e334fe10c Remove 'this->' in device code 2023-01-26 15:03:20 -07:00
1ded632010 Add new files to Kokkos Install.sh 2023-01-26 15:02:52 -07:00
b6a9e47494 update false positives 2023-01-26 16:22:40 -05:00
9a598ba5a8 backport fix pimd bugfix from develop 2023-01-26 15:59:26 -05:00
b48d483fd6 Merge branch 'develop' into msmeam-adr
# Conflicts:
#	src/MEAM/pair_meam.cpp
2023-01-26 15:46:34 -05:00
4d27b5480d Merge pull request #3612 from yotamfe/develop
Fix PIMD: bugfix in spring energy, and adding virial estimator
2023-01-26 15:42:28 -05:00
18171af1ea add a unit test for MS-MEAM 2023-01-26 15:28:34 -05:00
b7f2c3feda convert "ms" pair style flag for MEAM into meam/ms pair style 2023-01-26 15:23:31 -05:00
30f459da92 Merge pull request #3606 from bathmatt/kokkos-mliap-unified
Add MLIAP-KOKKOS version of the Unified model/descriptor
2023-01-26 13:57:42 -05:00
3713185b37 must use fmt::format() for universe errors. 2023-01-26 12:05:51 -05:00
210ec9d164 reformat 2023-01-26 11:59:20 -05:00
b905f6a239 Merge branch 'develop' into yotamfe/develop 2023-01-26 11:47:32 -05:00
ff20448b1d add image to the cover page of the PDF version of the manual 2023-01-26 11:23:46 -05:00
49b639acd0 Changed author 2023-01-26 17:01:15 +01:00
469c4e8c7a Whitespace 2023-01-26 08:57:33 -07:00
83fc0f16f5 rephrasings for output information 2023-01-26 17:10:45 +02:00
af5229ba58 swap constexpr back to const 2023-01-26 09:58:26 -05:00
07566abc8f Replacing arbitrary LAMMPS version with TBD in numpy_wrapper.py 2023-01-26 16:50:05 +02:00
14e9bb0033 Replacing arbitrary LAMMPS version with TBD in core.py 2023-01-26 16:48:49 +02:00
047e4eeebc Auxiliary test methods for angles, dihedrals and impropers in python-numpy 2023-01-26 16:41:47 +02:00
f7ee47f47f Auxiliary test methods for angles, dihedrals and impropers 2023-01-26 16:33:57 +02:00
fca553d1c2 document the Fortran module calls 2023-01-26 15:58:00 +02:00
15316f8e5e add documentation for the vector values fix_pimd returns, and the rest of the restart, modify etc. section 2023-01-26 15:57:47 +02:00
b180200c48 check if variable value is a valid number before converting it 2023-01-26 07:10:50 -05:00
5d941da4e9 check if variable value is a valid number before converting it 2023-01-26 07:10:20 -05:00
915544e76d add Fortran wrappers to fortran/lammps.f90 2023-01-26 12:22:08 +02:00
d2539f45ae add doxygen style comments to document the new C library functions added 2023-01-26 11:40:58 +02:00
e4b2fd318f Update Library_scatter.rst 2023-01-26 11:00:26 +02:00
094be08e64 bugfix in testing of fix_pimd input variables. fmass should be between 0 and np, not 1. check for sp mistakenly was testing fmass again. 2023-01-26 10:04:25 +02:00
19dab05b45 Update liblammpsplugin.c 2023-01-26 09:35:10 +02:00
3714abec24 Update liblammpsplugin.h 2023-01-26 09:34:01 +02:00
2620726c96 Update lammps.i 2023-01-26 09:27:13 +02:00
27441cf2ea update developer contact info in a few more files 2023-01-25 22:24:22 -05:00
db61bf609b plug memory leaks in couple examples 2023-01-25 21:48:29 -05:00
015fa4cb0a update embedded docs 2023-01-25 21:44:04 -05:00
62f6f91146 minor typo and rewording 2023-01-25 21:42:37 -05:00
e163b0b1d7 portability improvements for Solaris/OpenIndiana 2023-01-25 21:40:23 -05:00
169a886898 cannot test PYTHON package if it is not installed 2023-01-25 21:37:22 -05:00
cbd276c49d correct prototype for documentation 2023-01-25 21:32:03 -05:00
183c6c06ff small tweaks to the "breadcrumbs" part of the theme to avoid double inserting a separation character 2023-01-25 21:28:18 -05:00
93a46da58e add image to the cover page of the PDF version of the manual 2023-01-25 21:24:27 -05:00
6b6a47bd3c Small tweaks 2023-01-25 21:21:08 -05:00
4a0a98a0fd Small bugfixes for Kokkos 2023-01-25 21:20:59 -05:00
369ea4fd26 Add this 2023-01-25 21:17:30 -05:00
d63c002bf5 Use group for Kokkos nvt temp compute 2023-01-25 21:17:22 -05:00
bc567ac406 added more MM suppport for direct method 2023-01-25 16:23:17 -07:00
f7725242fa Merge pull request #3615 from stanmoore1/kk_small_fixes
Small bugfixes for Kokkos
2023-01-25 18:18:47 -05:00
d88a4a768d Style changes 2023-01-25 14:52:02 -07:00
2fdf0ae3b3 Add this 2023-01-25 14:11:49 -07:00
f58aeecec0 Use bin neighbor list with Kokkos 2023-01-25 14:05:55 -07:00
16225acd05 Use group for Kokkos nvt temp compute 2023-01-25 14:01:21 -07:00
34a5123e29 Kokkos fix out-of-bounds access 2023-01-25 13:56:52 -07:00
624c95b164 Merge pull request #3617 from lammps/gpu-amoeba-cmake
Only added amoeba_convolution_gpu.* to the list of GPU source files w…
2023-01-25 15:35:18 -05:00
91ef7c22fa reindent 2023-01-25 15:29:13 -05:00
16354d0262 fix out-of-bounds access 2023-01-25 15:28:22 -05:00
7e5e5c1b6f Only added amoeba_convolution_gpu.* to the list of GPU source files when PKG_AMOEBA is on 2023-01-25 13:30:29 -06:00
171b182d42 Small tweaks 2023-01-25 11:51:35 -07:00
5bd7b95e60 Merge pull request #3613 from lammps/gpu-neigh-macos
Attempted to allow GPU acceleration on MacOS with neighbor builds on …
2023-01-25 13:34:52 -05:00
e048aed1b4 Small bugfixes for Kokkos 2023-01-25 11:28:16 -07:00
8e9d0e7fca Merge pull request #3610 from akohlmey/cmake-enable-pkg-deps
Auto-enable packages with CMake if needed
2023-01-25 13:26:36 -05:00
83f6b6aa40 Merge pull request #3603 from jrgissing/reaxff-species-delete-rate
reaxff/species delete rate limit
2023-01-25 13:25:34 -05:00
67a0c4e1a2 Merge pull request #3599 from lammps/amoeba-gpu
Adding support for the AMOEBA and HIPPO pair styles to the GPU package
2023-01-25 13:11:39 -05:00
fae750391d Update core.py 2023-01-25 19:53:41 +02:00
d5121bf2ee Update numpy_wrapper.py 2023-01-25 19:50:31 +02:00
954dbacf82 Update library.cpp 2023-01-25 19:48:23 +02:00
4af5ce3f96 Update library.h 2023-01-25 19:46:18 +02:00
6fefd8821a Attempted to allow GPU acceleration on MacOS with neighbor builds on the device by enforcing the old neighbor list code path (will revisit) 2023-01-25 10:42:55 -06:00
c6ff688c18 Merge branch 'lammps:develop' into develop 2023-01-25 16:00:10 +02:00
0204f942d2 support for reporting the virial estimator for the kinetic energy of the quantum system in PIMD. Based on f6f8aa346b 2023-01-25 15:15:58 +02:00
fcea881d3e programming style 2023-01-25 06:16:48 -05:00
c87b4c5887 must initialize msmeamflag 2023-01-25 06:16:36 -05:00
93b96f7cbf Merge branch 'develop' into reaxff-species-delete-rate 2023-01-25 05:31:04 -05:00
722e583b59 use available introspection API to get accumulator data type. update name of flag. 2023-01-25 05:22:49 -05:00
e068b14969 make consistent and simplify 2023-01-25 02:56:05 -05:00
c29012e85d fix segfault from accessing float array as double. use introspection to detect 2023-01-25 02:35:10 -05:00
adf43d7fee Fixed the issues with some OpenCL implementation to avoid errors casting changing the pointer address spaces 2023-01-25 00:02:25 -06:00
b206b4d1f6 Fixed bugs with hippo/gpu for single- and mixed- precisions 2023-01-24 23:55:30 -06:00
4c996eed3b auto-enabling prerequisite packages with CMake 2023-01-24 23:22:55 -05:00
c744be7060 forcibly disable COMPRESS package is zlib is not found 2023-01-24 23:18:04 -05:00
862c7180bb Enclose create/destroy in msmeam conditional 2023-01-24 21:11:33 -07:00
1e78254000 Merge pull request #3598 from stanmoore1/kk_atomvec
Fix some issues with Kokkos hybrid `atom_vec`
2023-01-24 23:04:06 -05:00
6c63d7dcb9 single precision FFTs are now supported on the CPU 2023-01-24 22:54:47 -05:00
8786819993 use FFT_SCALAR more consistently to perhaps support single precision FFT some time
also, use "override" instead of virtual and add a forgotten virtual
2023-01-24 22:32:40 -05:00
b17689af6b doc fixes 2023-01-24 21:28:08 -05:00
dec3afe595 make synchronization for timers optional. only enable with "timer sync" 2023-01-24 21:15:37 -05:00
40c8fcb03a disallow using single precision FFTs with AMOEBA package 2023-01-24 21:05:36 -05:00
64b5ad8966 Merge branch 'develop' into amoeba-gpu 2023-01-24 20:22:59 -05:00
aaa918cbe7 Fixed bugs with access mode on the host side of thetai[1-3] 2023-01-24 17:05:48 -06:00
647172bfe1 Clean up 2023-01-24 14:56:27 -07:00
d0a614b1fe Remove unnecessary conditional 2023-01-24 14:53:00 -07:00
9560fe2dd1 Fix logic for Kokkos hybrid atomvec 2023-01-24 14:15:58 -07:00
7f2e34ff57 Merge branch 'develop' of https://github.com/lammps/lammps into kk_atomvec 2023-01-24 14:15:44 -07:00
ab83b31ce2 Document changes 2023-01-24 13:05:47 -07:00
8f554a3b1c Clean up 2023-01-24 12:30:18 -07:00
f1ae427ee0 Format and organize pair MEAM 2023-01-24 12:04:47 -07:00
de32abeace Merge with Kokkos updates 2023-01-24 11:21:58 -07:00
f3f8613437 Debug final stage of dens setup 2023-01-24 11:21:04 -07:00
533af97d8e Format and clean Kokkos MEAM 2023-01-24 11:02:14 -07:00
79d8b98ab7 A correct calculation of the spring energy sould contain a prefactor (the spring contant) that transforms units of area to units of energy.
Also, we have replaced dx,dy,dz with delx2,dely2,delz3.
2023-01-24 16:41:43 +02:00
5014e04341 Removed commented out code, ensured that ic_kspace is not nullptr when call precompute_kspace for hippo/gpu 2023-01-24 08:40:08 -06:00
a82b028b72 Finish porting MS-MEAM to Kokkos; obtain agreement in forces and energies 2023-01-23 19:43:31 -07:00
554257ca63 Merge pull request #3607 from akohlmey/no-inn-sewer-ants
Getting out of the insurance business :-)
2023-01-23 21:02:53 -05:00
8b897e1fed fix spelling errors 2023-01-23 17:46:33 -05:00
917151f695 Update fix_reaxff_species.cpp 2023-01-23 17:30:42 -05:00
70012131b6 Update dihedral_table.cpp
Tweaked grammar and comment style
2023-01-23 15:11:09 -07:00
1812cf6264 Begin kokkos implementation up to calc_rho1 function 2023-01-23 15:10:59 -07:00
1e9d6def77 Update Developer_grid.rst
Fixed butchered sentence.
2023-01-23 14:58:00 -07:00
27da716852 getting out of the insurance business :-) 2023-01-23 16:45:41 -05:00
6148ee7ba4 Merge pull request #3604 from lammps/collected-small-changes
Collected small changes and fixes
2023-01-23 14:12:22 -05:00
0e1e8161ef Developed MLIAP-KOKKOS version of the Unified model/descriptor 2023-01-23 18:01:26 +01:00
379c88b5af Merge branch 'develop' into collected-small-changes 2023-01-23 11:52:06 -05:00
c367f37e56 Merge pull request #3605 from akohlmey/remove-mesont-fortran
Remove Fortran library and corresponding styles from MESONT package
2023-01-23 11:50:34 -05:00
39f776ae86 some more languagtool.org suggested updates 2023-01-23 05:15:34 -05:00
8e79e2efa5 More cleanup, fixed bugs with hippo fphi kernels for mixed precision 2023-01-23 00:18:42 -06:00
11d0449fec make compatible to non-glibc Linux 2023-01-22 18:25:32 -05:00
658328dd9d Added a note in the amoeba doc page on the not-yet resolved issue with integrated GPUs, removed commented out and debugging stuffs in the AM/HP kernels 2023-01-22 17:24:15 -06:00
c06470ca33 more revisions based on suggestions from languagetool.org 2023-01-22 16:53:39 -05:00
f65f79ef82 revise based on suggestions from languagetool.org 2023-01-22 09:50:27 -05:00
57349b042e one more pass at revising the introductory pages of the LAMMPS manual 2023-01-21 16:23:23 -05:00
af8c091ed5 add image to the cover page of the PDF version of the manual 2023-01-21 15:58:10 -05:00
ebe234d4e2 turn off automatic potential download for github actions 2023-01-21 11:33:33 -05:00
c42926feb0 add CMake option to skip automatic download of large potential files 2023-01-21 11:22:54 -05:00
8537ccb840 add CMake option to skip automatic download of large potential files 2023-01-21 11:22:29 -05:00
6f3c8fc48e add CMake option to skip automatic download of large potential files 2023-01-21 11:21:02 -05:00
a95f6d7aa0 update header 2023-01-21 11:19:04 -05:00
7eab385bb3 add CMake option to skip automatic download of large potential files 2023-01-21 11:18:51 -05:00
671b2b80fc fix typo 2023-01-21 07:59:09 -05:00
650caa356f update atom style tester for removed Atom class members 2023-01-21 05:28:14 -05:00
d5a8674c00 avoid creating __pycache__ folders outside of the docenv tree 2023-01-21 05:02:09 -05:00
682bb7c391 fix cut-n-paste error 2023-01-21 05:00:56 -05:00
ac09c5c7c9 add MESONT package to the "yes-most" selection for traditional make build 2023-01-21 04:35:49 -05:00
49b354bb6a small update for Installation overview 2023-01-21 04:24:04 -05:00
c3b1c661a8 small tweaks to the "breadcrumbs" part of the theme to avoid double inserting a separation character 2023-01-21 04:18:24 -05:00
3f34f54847 add page about portability 2023-01-20 23:40:41 -05:00
03b532db4a add false positive 2023-01-20 22:53:29 -05:00
ca1a8eb933 clarify, mention versionadd/changed markers 2023-01-20 22:50:39 -05:00
aab02da72d remove obsolete links, links to point back to the manual, updates 2023-01-20 22:50:18 -05:00
29689d6902 some more updates for LAMMPS features 2023-01-20 22:49:44 -05:00
e2773ea3d2 some updates 2023-01-20 22:48:36 -05:00
a6667f1b2c Minor tweaks to potentials 2023-01-20 18:45:19 -07:00
7ce59e775a Minor tweaks to potentials 2023-01-20 18:43:36 -07:00
3911f1e3ec Resolved merge conflict 2023-01-20 18:01:47 -07:00
cf033780cc add false positive 2023-01-20 19:15:20 -05:00
694b1b5748 remove Fortran library based MESONT styles and the library itself 2023-01-20 19:12:42 -05:00
02ab9bc67c add deprecation handler for removed/renamed minimizer styles 2023-01-20 19:05:50 -05:00
fd48702797 update some overview doc pages 2023-01-20 19:05:13 -05:00
4d545b3539 remove Fortran library and the styles based on it from MESONT package 2023-01-20 18:29:54 -05:00
ef692258b4 Merge pull request #3532 from stanmoore1/kk_occupancy
Update Kokkos version in LAMMPS to 3.7.1
2023-01-20 17:52:05 -05:00
07c17d4e63 debugging on coupled mode 2023-01-20 15:49:29 -07:00
f6ded5a7d7 reduce unnecessary communication 2023-01-20 17:36:46 -05:00
375fad6d2a parallel version 2023-01-20 17:13:56 -05:00
846f00ce32 add citation 2023-01-20 16:58:19 -05:00
ff709f5897 'include' for std::shuffle 2023-01-20 16:29:16 -05:00
2695ecbc07 updates to fix mdi/qmmm 2023-01-20 14:22:20 -07:00
3430ffbe5a Merge branch 'msmeam-adr' of https://github.com/rohskopf/lammps into msmeam-adr 2023-01-20 13:58:37 -07:00
617d70dd1c Replaced MPI_Wtime() with platform::walltime(), put the low-level timing breakdown inside #if DEBUG_AMOEBA 2023-01-20 14:19:16 -06:00
dfe3436e9c Merge pull request #3602 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-01-20 15:03:46 -05:00
bb2553b079 Set comm size outside constructor 2023-01-20 13:02:50 -07:00
6477b19702 Backport kokkos 4dab4e0 from @weinbe2 2023-01-20 11:12:09 -07:00
4ee8cd8bf5 fix broken Lepton library compilation for traditional make build system 2023-01-20 12:13:31 -05:00
7ff98c6374 add one case to code maintainers list 2023-01-20 11:45:38 -05:00
996b542ea1 remove '.' 2023-01-20 10:37:09 -05:00
936ef7f92a Backport more Kokkos changes 2023-01-20 07:40:52 -07:00
13d4344999 Merge branch 'develop' of github.com:lammps/lammps into kk_occupancy 2023-01-20 07:32:46 -07:00
3e032c6b73 remove unused private class members 2023-01-20 07:04:37 -05:00
bebf79ec92 reaxff species delete_rate_limit keyword docs 2023-01-20 00:41:56 -05:00
096e0a14f0 off-by-one fix 2023-01-20 00:38:06 -05:00
bdf8dd4e54 serial version 2023-01-20 00:32:31 -05:00
827d0218db avoid that print_mode is uninitialized when called from TAD calculation 2023-01-19 23:56:10 -05:00
973190fef6 Merge remote-tracking branch 'upstream/develop' into msmeam-adr 2023-01-19 19:26:49 -07:00
3eb22313ed Default nvcc wrapper 2023-01-19 19:26:42 -07:00
cf8414d2e4 cannot test PYTHON package if it is not installed 2023-01-19 21:00:54 -05:00
31024f4b0e swap constexpr back to const 2023-01-19 18:16:14 -05:00
819ab9f2ff portability improvements for Solaris/OpenIndiana 2023-01-19 17:36:02 -05:00
8eb722a32a Enforced synchronous host-device transfers for cgrid_brick and fdip arrays 2023-01-19 13:22:27 -06:00
03ab42fd52 correct calling sequence for matching argument types 2023-01-19 08:57:24 -05:00
4244d2e6cd silence compiler warnings about unused parameters and variables 2023-01-19 08:56:54 -05:00
3ae2805316 add option variable to CMake build to select GPU library debug 2023-01-19 07:06:29 -05:00
75bd5b3d99 update podstruct initializer lists with SNAP default parameters 2023-01-18 22:56:43 -05:00
eddd3d6f25 Fixed a bug with extra being nullptr when _host_view is true: always allocate extra
(Note that BaseAmoeba has its own cast_extra_data() that doesn't know if extra is allocated properly, it is the case when _host_view is false for dedicated GPUs for example)
2023-01-18 20:04:45 -06:00
4d7a5fb225 support two modes of QMMM coupling 2023-01-18 16:19:19 -07:00
25a8e08703 Merge branch 'develop' into fix-mdi-qmmm 2023-01-18 15:19:57 -07:00
8f2c3cfda9 improve error messages for group command and more unit tests 2023-01-18 16:06:02 -05:00
62d5ffd5c9 add versionadded not to fix reaxff/species delete keyword 2023-01-18 16:06:01 -05:00
79cadef4ba Re-running CMake is now automatic for almost anybody. 2023-01-18 16:06:01 -05:00
7cf9b30943 Confirm agreement with old meam example 2023-01-17 21:27:21 -07:00
f98a2357fd Merge remote-tracking branch 'upstream/develop' into msmeam-adr 2023-01-17 21:18:58 -07:00
ff9ccc96bf Clean up 2023-01-17 21:11:07 -07:00
d14f070bef Fix segfault with normal meam 2023-01-17 20:46:54 -07:00
f86375c992 Attempted to ensure that extra gets allocated in the exactly same way as other added fields (charge, quat and vel) 2023-01-17 09:47:09 -06:00
71931d1d44 Cleaned up, and added missing zero timers for extra fields transfers 2023-01-17 09:39:03 -06:00
420606658b Merge branch 'develop' into granular-kokkos 2023-01-17 08:20:35 -07:00
b59ee8d16c silence compiler warnings 2023-01-17 03:54:49 -05:00
28fbc2631b Fixed another bug with ic_kspace being nullptr 2023-01-16 22:33:21 -06:00
9ab7f792e1 Fixed nullptr bug in the mutual fft timer 2023-01-16 22:29:04 -06:00
0fd665c6f3 reformat 2023-01-16 21:39:07 -05:00
9ee9508365 Merge branch 'develop' of github.com:srtee/lammps into collected-small-changes 2023-01-16 21:37:32 -05:00
e8be2dfba8 Merge branch 'develop' into collected-small-changes 2023-01-16 21:37:24 -05:00
f8cbc777ce minor typo and rewording 2023-01-17 11:04:34 +10:00
3871918916 Store first, not last AtomVec created for hybrid 2023-01-16 17:53:47 -07:00
0a5f97c327 Merge pull request #3596 from tomswinburne/energy_spacing_neb
NEB routine to target equal energy difference between knots
2023-01-16 14:20:43 -05:00
b3e45c29ca Removed whitespaces 2023-01-16 10:30:03 -06:00
973b46a907 Attempted to resolve the memory access runtime errors when acquiring single and mixed precision arrays from the GPU lib 2023-01-16 10:12:42 -06:00
665b877063 Update msmeam example and clean up code 2023-01-16 07:37:32 -07:00
503c51c070 whitespace 2023-01-16 08:37:52 -05:00
a8d0f94a5a small clean up 2023-01-16 14:21:31 +01:00
07da78dfe8 Documentation update after suggestions of @athomps 2023-01-16 14:12:52 +01:00
9dc0369cee Attempted to resolve the address space change issue when casting for OpenCL 2.0 (ref: https://www.intel.com/content/www/us/en/developer/articles/technical/the-generic-address-space-in-opencl-20.html#06_address_space_casting) 2023-01-15 23:28:48 -06:00
62c010a7de add note to insert LAMMPS version when GPU acceleration was added 2023-01-15 18:11:33 -05:00
6ce7ea2f4b remove obsolete commands 2023-01-15 17:43:15 -05:00
88e1ce3379 flag GPU acceleration 2023-01-15 17:42:16 -05:00
637e12cd01 correct sphinx command 2023-01-15 17:41:27 -05:00
c9ae41246d Ran the four make commands in the src folder: make fix-whitespace; make fix-homepage; make fix-errordocs; make fix-permissions 2023-01-15 16:05:36 -06:00
d5b878d047 Updated the doc page of amoeba/hippo styles to indicate that their gpu versions are supported 2023-01-15 15:56:40 -06:00
67574601ed Cleaned up commented-out and debugging stuffs, removed irrelevant changes to lj/cut/dipole/cut, reverted unwanted changes in the PPPMGPU destructor, fixed unresolved conflicts in tinker.py, updated the userbinsize==0 case in atom.cpp and using Force::pair_match() as suggested. Internal timing stuffs need work. 2023-01-15 15:41:54 -06:00
a09540eb55 update embedded docs 2023-01-15 10:57:00 -05:00
c21f2faa1f Cleaned up debug statements and unused sections in the amoeba and hippo gpu styles 2023-01-14 20:02:36 -06:00
03e48f2658 Fixed memory leak in hippo/gpu 2023-01-14 19:51:42 -06:00
212da7f109 Merge branch 'develop' into amoeba-gpu 2023-01-14 18:36:26 -06:00
e1a8a70a6c replace individual *verbose* / *terse* keywords with *verbosity* setting 2023-01-14 07:06:26 -05:00
102934565e Merge branch 'develop' into energy_spacing_neb 2023-01-14 06:57:48 -05:00
24fec6bdbd Merge pull request #3592 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch release
2023-01-14 00:44:48 -05:00
c415385ab4 Merge pull request #3594 from akohlmey/abc-fire-alternative
Alternative implementation of ABC-FIRE
2023-01-13 21:28:25 -05:00
e522ddaf99 Set nmax for Kokkos hybrid atom_vec 2023-01-13 17:12:27 -07:00
b4d6f37c10 Fix some issues with Kokkos hybrid atom_vec 2023-01-13 16:33:44 -07:00
e931d3153b small improvements from upstream 2023-01-13 17:52:28 -05:00
acb59c8b74 Merge pull request #3597 from lammps/dump-grid-dimension
Add ITEM: DIMENSION to dump grid output
2023-01-13 17:42:35 -05:00
882f155d94 whitespace 2023-01-13 14:51:40 -05:00
2913c063d4 whitespace 2023-01-13 14:51:21 -05:00
50cc866081 sync with stable branch 2023-01-13 14:47:51 -05:00
651e95654c more details on dump snapshot header values 2023-01-13 12:34:05 -07:00
5606b57646 Update SECURITY.md
I found the overlapping meanings of release/update/patch a bit confusing, especially when sometimes referring to a branch name and sometimes used as a general description.  So I reworked it, trying to preserve meaning. I deleted the last sentence, because I did not understand it, it may need to be added again.
2023-01-13 11:30:07 -07:00
652a8804e2 enable and apply clang-format 2023-01-13 12:31:47 -05:00
9169d88090 add ITEM: DIMENSION to dump grid src/doc 2023-01-13 09:42:11 -07:00
8e138161af add more thorough checks on Fortran and MPI support for Fortran.
also works around issue with GNU Fortran 12 and later
2023-01-13 11:02:24 -05:00
a1f5d8420a compile test for coupling to the LAMMPS library via fortran, check if it runs 2023-01-13 06:26:06 -05:00
aa2d2509d8 plug memory leaks in coupling examples 2023-01-13 05:40:28 -05:00
b03e9609ce synchronize API with library.h, zero struct on allocation, determine exception support at runtime. 2023-01-13 05:30:49 -05:00
0fafe34008 import updates to library plugin loader from upstream 2023-01-13 05:21:33 -05:00
59a9161435 add bugfix for plugin wrapper of library interface from Stan 2023-01-13 03:54:22 -05:00
a155ef8695 add MEAM example to fire minimizer examples 2023-01-12 23:26:30 -05:00
b97a0c62e4 whitespace 2023-01-12 23:00:52 -05:00
f27c7a9135 rework neb docs to use .. math:: and :math: in sphinx 2023-01-12 22:58:16 -05:00
03838f06f8 Zero arrays in dens setup to prevent forces from growing each timestep 2023-01-12 19:28:10 -07:00
7ac611b671 enable and apply clang-format 2023-01-12 18:51:45 -05:00
a6234ab3be move enum to .cpp file and away from header 2023-01-12 18:50:34 -05:00
a9a1640d67 reorder 2023-01-12 18:28:17 -05:00
692bdaea37 reorder 2023-01-12 18:28:01 -05:00
812363fb99 lammpsplugin bugfix from Stan 2023-01-12 18:24:04 -05:00
c8f380ffbb small changes- still not compiling on Windows... 2023-01-12 21:24:40 +01:00
bdf6cdd327 found two or -> || 2023-01-12 18:34:54 +01:00
b7db402c2d post-axel updates 2023-01-12 18:30:15 +01:00
a68fca43e5 make error message consistent with name of executable 2023-01-12 12:09:59 -05:00
b40e0be1c9 reset to current state of the library interface and remove parts from upstream that have crept in 2023-01-12 12:08:00 -05:00
5a8d191a4a Correct force rho and arho parameters; need to fix get_densref function 2023-01-12 09:26:19 -07:00
e3afc99c3a Merge branch 'lammps:develop' into energy_spacing_neb 2023-01-12 13:50:35 +01:00
8d42212f38 remove bogus tags 2023-01-12 05:33:51 -05:00
1be973da07 update from upstream 2023-01-11 22:31:06 -05:00
34e54dbfc9 grammar 2023-01-11 22:30:06 -05:00
aca2c52795 update LAMMPS developer contact info 2023-01-11 22:25:25 -05:00
536b2ab7e5 restore accidentally deleted file 2023-01-11 22:16:31 -05:00
ccef293161 remove obsolete comment 2023-01-11 22:11:53 -05:00
4b0de87813 silence compiler warning 2023-01-11 21:59:35 -05:00
fa22aef31b Fix obscure bug in Kokkos neigh list build 2023-01-11 21:53:16 -05:00
cb7544a615 import modernization from upstream 2023-01-11 21:41:58 -05:00
a9be4906b7 import safer ghost cutoff determination for manybody GPU styles from upstream 2023-01-11 21:41:43 -05:00
6f36d21a04 GPU library updates 2023-01-11 21:34:42 -05:00
27961907ad small doc tweaks 2023-01-11 21:23:57 -05:00
c55a15c4dc make AWPMD compatible with MSVC and c++-linalg on Windows 2023-01-11 21:23:03 -05:00
8f01dad1a9 add tools/tabulate 2023-01-11 21:21:51 -05:00
db6e1aa20d some more documentation updates 2023-01-11 21:21:03 -05:00
3cee69a077 correct Kokkos device/arch info ouput in CMake summary 2023-01-11 18:15:56 -05:00
00908fef17 gather Kokkos device/arch settings and print in summary 2023-01-11 18:14:58 -05:00
69ffe71595 update unit tests for code corrections 2023-01-11 07:45:50 -05:00
0104824727 remove min style fire/old 2023-01-11 07:33:16 -05:00
ee77055e49 make consistent 2023-01-11 06:46:02 -05:00
16fa033111 fix issues with bundled meam/spline potentials 2023-01-11 06:40:54 -05:00
8e494aa771 updates and bugfixes for liblammpsplugin plugin loader for LAMMPS shared lib 2023-01-11 06:11:46 -05:00
d203cce8b5 documentation updates from upstream 2023-01-11 06:07:19 -05:00
f8de1b1a75 use official API for utils::logmesg(), stricter/consistent checking for integer and floats 2023-01-11 05:54:35 -05:00
de89a25a25 final CMake sync with upstream 2023-01-11 05:03:00 -05:00
f982e95267 update developer info in unittest tree 2023-01-11 01:28:52 -05:00
293d0cdb58 fix typo 2023-01-11 01:26:54 -05:00
011f2651ee update 2023-01-11 01:26:48 -05:00
a8d3c43a77 update version 2023-01-11 01:26:35 -05:00
91cfe90aa3 add missing tracking of updated file lists from globbing in the LEPTON package 2023-01-11 01:09:54 -05:00
c19641f8b3 synchronize CMake scripting with upstream 2023-01-11 01:04:32 -05:00
6596b343ff sync docs with fire minimizer code features 2023-01-10 21:55:56 -05:00
b6dbb0330c update list of commands in pygments LAMMPS lexer 2023-01-10 21:55:56 -05:00
0dd138666a update for accelerated versions 2023-01-10 21:55:56 -05:00
33b9fec150 synchronize sphinx configuration with upstream 2023-01-10 21:55:56 -05:00
32b020a165 Increase communication cutoff for TIP4P pair styles, if needed
This avoids error of H atom not found when the O atom is a ghost.
2023-01-10 21:55:56 -05:00
c1db230331 Fix bug in Kokkos ReaxFF on GPUs 2023-01-10 21:55:56 -05:00
254c052ecc Fix GPU tag issues in other Kokkos styles 2023-01-10 21:55:56 -05:00
8e889dfa7c offset is not used (by construction of the potential) 2023-01-10 21:55:55 -05:00
5b6a52a646 correct suffix handling with compute fep 2023-01-10 21:55:55 -05:00
55f56deb63 bugfix for minimization with KOKKOS when using fix box/relax 2023-01-10 21:55:55 -05:00
bfe127a720 cosmetic 2023-01-10 21:55:55 -05:00
d95c8911a3 tweak intel compiler settings 2023-01-10 21:55:55 -05:00
0380f9d854 consistently prefix deep_copy() with Kokkos:: 2023-01-10 21:55:55 -05:00
71b1d60363 bugfix for gaussian bond/angle styles to avoid premature truncation of potential 2023-01-10 21:55:55 -05:00
8b1f92fabd better error handling when reading table files 2023-01-10 21:55:55 -05:00
419af0cf28 dead code removal 2023-01-10 21:55:45 -05:00
9030c59932 bugfix for nm/cut argument parsing 2023-01-10 21:55:21 -05:00
ee88078150 bugfix for DPD with exclusions other than 0.0 or 1.0 2023-01-10 21:55:21 -05:00
04451f6072 recover compilation 2023-01-10 21:55:21 -05:00
2364f7f08b bugfix for incorrect stress tally in dihedral style table 2023-01-10 21:55:21 -05:00
7f82a58f51 auto loop optimizations 2023-01-10 21:55:21 -05:00
1caf074ba1 avoid excess string copy in auto loops 2023-01-10 21:55:20 -05:00
34677f78c2 initialize ADIOS dumps only the first time when used in multiple runs 2023-01-10 21:55:20 -05:00
e095609ac6 update lammps theme base theme from read-the-docs version 1.0.0 to 1.1.1 2023-01-10 21:54:35 -05:00
1122408957 dynamic cast whitespace 2023-01-10 21:53:53 -05:00
5f9b78ca01 update developer reference text 2023-01-10 21:53:09 -05:00
5dd8a33abe improve error message 2023-01-10 21:07:45 -05:00
d5e29864ab Allocate meam arrays and fully implement force calculation 2023-01-10 15:14:14 -07:00
f5a8a0c398 update examples. add abcfire variants 2023-01-10 16:28:18 -05:00
8800adf1cd fully integrate ABC-FIRE and make it a min_modify option 2023-01-10 16:20:00 -05:00
fe138fc75c add support for building/using the ADIOS package without MPI
This needs the ADIOS2 installation being configured accordingly.
2023-01-10 12:38:20 -05:00
31c324ff61 remove references to long obsolete .d dependency files 2023-01-10 12:32:22 -05:00
f42fa9c565 remove references to long obsolete .d dependency files 2023-01-10 12:32:01 -05:00
30564ed8b7 import traditional build system updates and fixes from develop branch 2023-01-10 12:16:59 -05:00
f175a15627 Merge branch 'develop' into gran-temp 2023-01-10 09:58:50 -07:00
f05bfe45a8 Synchronize GitHub related files and settings with develop branch 2023-01-10 11:50:49 -05:00
58097b2e5f fold abcfire code into MinFire class 2023-01-09 20:49:57 -05:00
49792fd984 improve error checking and error messages when a pair style was use multiple times 2023-01-09 19:55:43 -05:00
b3396f109b Merge pull request #3589 from akohlmey/collected-small-fixes
Collected small fixes and changes
2023-01-09 19:07:03 -05:00
f3b14bc39c Merge pull request #3576 from ndtrung81/dielectric-updates
Updates to the DIELECTRIC package
2023-01-09 16:25:24 -05:00
f88bfbb6af use enumerators for symbolic constants to flag integrator and linesearch styles
also a small update to error, warning, and info output
2023-01-09 13:32:04 -05:00
d907baac83 sync docs with fire minimizer code features 2023-01-09 13:30:29 -05:00
36fbf05ac0 Merge pull request #3590 from akohlmey/lepton-zbl
Add a custom zbl() function to lepton pair styles
2023-01-09 11:30:38 -05:00
0d815a09a7 add unit test for custom zbl() function 2023-01-09 07:20:44 -05:00
8e2f2922d6 throw exception in case an unexpected derivative is requested 2023-01-09 07:16:16 -05:00
f34fd96185 Fixed typos in compute efield/atom and bug with set charge for atom_style dieletric 2023-01-09 00:26:30 -06:00
954f6ed1f3 fix double word 2023-01-08 15:51:22 -05:00
52b84c9776 use_qscaled must be initialized in the constructor 2023-01-08 14:07:46 -05:00
4ab1ce5d7d consistently use Kokkos:: namespace prefix when calling deep_copy() 2023-01-08 11:07:47 -05:00
caa7940b34 fix typo 2023-01-08 11:03:32 -05:00
f832a7ed46 Merge branch 'develop' into dielectric-updates 2023-01-08 10:52:30 -05:00
32a6b70b01 whitespace 2023-01-08 10:52:23 -05:00
5e837d23cc make sure member pointer is initialized and apply clang-format 2023-01-08 04:43:43 -05:00
3e06512418 plug small memory leak 2023-01-08 04:43:14 -05:00
6c914a7e37 add support for a custom zbl() function to lepton pair styles 2023-01-08 01:26:41 -05:00
d75e417a32 modernize error message creation 2023-01-07 16:39:28 -05:00
334643b300 avoid sprintf() 2023-01-07 16:13:27 -05:00
79820945f6 correct computation of number of packages for unit test 2023-01-07 15:55:04 -05:00
d572d8f051 avoid sprintf() through C++ features and libfmt 2023-01-07 15:47:46 -05:00
1556460b8f silence bogus warning about atom IDs with dump image/movie 2023-01-07 15:18:29 -05:00
141a6208a9 avoid sprintf 2023-01-07 07:45:11 -05:00
fb3180eae8 silence compiler warning 2023-01-07 07:18:25 -05:00
fc10c9d354 MESONT package needs explicit dependencies because mesocnt bond depends on harmonic 2023-01-06 22:18:50 -05:00
d4e2200c8c restore building of simple bundled libraries 2023-01-06 22:18:50 -05:00
f1471725e9 allow to always build the C++-only parts of the MESONT package 2023-01-06 22:18:50 -05:00
3036f8d4c6 Conditionally support the CONFIGURE_DEPENDS flag for globbing of CMake 3.12 and later.
# Conflicts:
#	cmake/Modules/Packages/COLVARS.cmake
2023-01-06 22:18:50 -05:00
a7ba11fee9 mliappy fixes for kokkos support 2023-01-06 22:18:49 -05:00
b419a98f0f Identify segfault with arho params 2023-01-06 15:49:09 -07:00
e815bea894 Setup global function with msmeam parameters 2023-01-06 13:16:21 -07:00
f28b0e491c Optionally read msmeam parameters 2023-01-06 12:37:38 -07:00
80ea94ae24 Envelope msmeam calculations in conditional 2023-01-06 11:10:52 -07:00
8644a6601d Merge branch 'develop' of https://github.com/lammps/lammps into kk_occupancy 2023-01-04 19:59:32 +00:00
aee3ba7c6b Backport kokkos/kokkos@f64e5a6 2023-01-03 12:32:30 -07:00
ac42068c89 Updated compute efield/atom with additional compatible pair styles, and fixed bugs with comm_reverse and the class name 2023-01-03 12:54:39 -06:00
d5e897ccbb Updated pppm/disp/dielectric for long-range energy calculation (eflag_global is true) 2022-12-30 16:02:26 -06:00
652c237b5e Merge branch 'upstream' into dielectric-updates 2022-12-25 15:13:46 -06:00
f091233d7d Did some cleanup 2022-12-24 15:25:04 -06:00
cebb97e790 Merge branch 'develop' after the distributed-grids PR was merged into amoeba-gpu, noted some API changes in reverse_comm 2022-12-24 00:41:07 -06:00
9099f7b7a5 Use minimal scope for args 2022-12-23 11:09:03 -07:00
adb27c6e3c Update CMake 2022-12-23 08:56:00 -07:00
ea0a91f2bc Merge branch 'develop' of https://github.com/lammps/lammps into kk_occupancy 2022-12-23 08:54:23 -07:00
ae1dc7b52c Backport https://github.com/kokkos/kokkos/pull/5624 to Kokkos version bundled with LAMMPS 2022-12-23 07:41:33 -07:00
01c2bca67d Merge branch 'fix-kokkos-4' of github.com:crtrott/lammps into kk_occupancy 2022-12-22 09:24:21 -07:00
25df28292f Update Kokkos library in LAMMPS to v3.7.1 2022-12-22 09:20:35 -07:00
33f3adf85c Merge branch 'develop' of github.com:lammps/lammps into kk_occupancy 2022-12-22 09:18:24 -07:00
60b9bfd217 Updated pppm/dielectric for elong to match with regular pppm 2022-12-21 15:47:38 -06:00
1234f7d16d more work on fix mdi/qmmm 2022-12-21 11:50:58 -07:00
6edcd995af Merge branch 'develop' into fix-kokkos-4 2022-12-21 12:31:50 -05:00
3137122476 remove kokkos numa option and its documentation 2022-12-21 12:31:32 -05:00
8b22b22203 remove conditional compatibility code for pre-3.7 Kokkos versions 2022-12-21 12:28:49 -05:00
249773e08c adding fix mdi/qmmm command 2022-12-21 10:11:20 -07:00
d98026a473 Added important restriction on number of atom types 2022-12-20 11:49:08 -07:00
1d7e627aa0 Added important restriction on number of atom types 2022-12-20 11:41:02 -07:00
9973c01f4c Added important restriction on number of atom types 2022-12-20 11:30:53 -07:00
63d7b87bc1 Match the number of grid points in pppm/dielectric with that in pppm, found out that elong cannot match because energy is not linearly dependent on charge density, which are qscaled for pppm/dielectric, needs a way to resolve this issue 2022-12-18 00:40:16 -06:00
e137240909 Fix init arguments fnd some join stuff for Kokkos 4 2022-12-16 12:36:11 -07:00
9713a552e9 Reimplemented qsum_qsq() for pppm/dielectric for local dielectric constants 2022-12-16 00:10:21 -06:00
9d149a4734 Updated polarize fixes for eflag and evflag settings 2022-12-15 17:42:37 -06:00
8b12ab04e0 Cleaned up and added comments 2022-12-15 00:03:19 -06:00
8df01b2a73 Fixed bugs with two fixes polarize icc and gmres for induced charges 2022-12-14 15:32:21 -06:00
8af77c690c Merge branch 'develop' into amoeba-gpu 2022-12-14 13:16:41 -06:00
34cc36176a Working on fix polarize, the induced charges are not correct for spherical interfaces yet 2022-12-14 10:02:18 -06:00
96f5e046e5 Made progress on fix polarize functional, need to review the induced charge-neutral constraint 2022-12-13 00:13:44 -06:00
32f2acd1a1 Updated polarize bem/gmres and bem/icc, note that charge in the dump files are now unscaled values, polarize/functional needs work 2022-12-12 17:55:36 -06:00
6113bd5aa4 small clean up 2022-12-12 11:30:21 +01:00
2d804937c1 Working on polarize fixes and kspace styles for q_scaled and q, need tests for nonzero q_free (unscaled) for interface particles 2022-12-11 00:08:10 -06:00
86c2ae6dab Switched to using q_scaled, keeping q as the real, unscaled charges 2022-12-09 23:34:49 -06:00
249ac0b34e ignore 2022-12-09 16:52:01 +01:00
1d601f23b1 terse screen output 2022-12-09 16:49:30 +01:00
434685f439 small addition 2022-12-09 16:35:51 +01:00
0f9a36a171 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-12-09 10:40:54 +01:00
531912a3c8 Merge branch 'gran-temp' of github.com:jtclemm/lammps into gran-temp 2022-12-07 11:42:48 -07:00
f2d866420a Updated examples 2022-12-07 11:41:53 -07:00
0007788e01 cleaner, minimal changes 2022-12-07 14:20:45 +01:00
21dd804819 Merge branch 'lammps:develop' into energy_spacing_neb 2022-12-07 13:41:56 +01:00
0fc9bb2cdf Add optional msmeam flag 2022-12-06 18:56:58 -07:00
18af945f4d added documentation 2022-12-05 16:59:26 +01:00
3c08bbb790 added documentation 2022-12-05 16:57:39 +01:00
5f735467fe added documentation 2022-12-05 16:53:50 +01:00
8dd9682ce2 remove iostream 2022-12-05 15:28:35 +01:00
978db4b737 even simpler, still works 2022-12-05 15:19:33 +01:00
d69f22176f a version which works in initial tests 2022-12-05 15:16:40 +01:00
1048c26900 working but not always optimal.. 2022-12-05 14:07:03 +01:00
0d2e0f5b36 working ? 2022-12-05 13:58:05 +01:00
c8545154b8 Merge branch 'lammps:develop' into newmaster 2022-12-05 11:12:38 +01:00
7b818ace88 NEARLY working E_neb 2022-12-04 17:20:41 +01:00
6c3ebc19b7 Merge branch 'develop' into gran-temp 2022-11-30 08:54:19 -05:00
e8c271cc16 update python to version to 3.11 and disable png/jpeg for now 2022-11-29 17:54:27 -05:00
1a467233fb adding examples, fixing wall algebra, updating labels 2022-11-29 12:24:43 -07:00
a21a09f6d3 Backport https://github.com/kokkos/kokkos/pull/5624 to Kokkos version bundled with LAMMPS 2022-11-21 14:57:55 -07:00
8026845346 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-11-21 15:26:17 +01:00
f51ab2c440 Restarting limit_damping, other minor simplifications/cleanups 2022-11-16 16:36:22 -07:00
5f0fff58ac fixing broken doc references 2022-11-14 21:16:03 -07:00
b2c5c1fda4 Fixing cmake style header 2022-11-10 21:06:47 -07:00
d6b5878dce Adding/removing underscores 2022-11-10 16:25:34 -07:00
d1dd8d3c11 Renaming files/classes, other small, misc updates 2022-11-10 16:06:36 -07:00
ea8ded470b Removing vectors to avoid resizing issues with coeff redefinitions 2022-11-09 10:17:07 -07:00
971b932387 Adding area flag for submodels 2022-11-07 17:39:40 -07:00
959b9c220f Cleaned up unused member functions and hd_balancer calls 2022-11-07 15:49:37 -06:00
a1db5fda70 Simplifying variables and logic 2022-11-07 11:30:12 -07:00
cd658e6779 Fixing few bugs with histories, removing indices from granular model 2022-11-07 10:41:09 -07:00
a3cc0e8432 Reverted the block size tuning, which caused bugs for low atom counts (will revisit later) 2022-11-04 13:45:59 -05:00
2f1f7ee0fa Cleaned up code 2022-11-03 23:45:40 -05:00
88c8b6ec6f Merge pull request #3460 from akohlmey/maintenance-2022-06-23
Second round of maintenance fixes and backports for the stable release
2022-11-03 12:21:59 -04:00
bc74fef3f4 Fixing memory leaks, misc clean ups, adding cohesive flag to Tsuji 2022-11-02 21:11:30 -06:00
871efda589 a few formal changes and spelling updates 2022-11-02 20:39:10 -04:00
b5d57531d9 complete integration into the manual build process 2022-11-02 20:38:43 -04:00
3561bbe887 simplify 2022-11-02 20:20:56 -04:00
74122040a3 add cmake support for generating gsm style header file 2022-11-02 20:20:06 -04:00
4dcf8c99de Merge branch 'develop' into gran-temp 2022-11-02 19:53:27 -04:00
95a8d2cc25 Patching pair tracker 2022-11-02 15:38:12 -06:00
f671cd7765 Merge branch 'develop' into gran-temp 2022-11-01 14:10:28 -06:00
88be5a3781 Minor fixes to doc pages 2022-11-01 14:01:07 -06:00
c8347df494 Removing knfac from documentation 2022-11-01 13:34:07 -06:00
dca901617e Removing knfac, removing unnecessary global variables, updating dev ref text 2022-11-01 13:30:57 -06:00
5dcbbc084b Adding developers documentation page 2022-11-01 13:30:24 -06:00
f66179f336 Removing old contact files, fixing capitalization in dump_custom.cpp 2022-10-28 16:38:32 -06:00
1eb048ef93 Adding granular sub model style creator 2022-10-28 16:00:04 -06:00
f01e28f574 add missing parts to ELECTRODE package docs for traditional make. sync with upstream. 2022-10-27 16:29:28 -04:00
96627d27b1 add support to detect the BuildID of Windows 10 22H2 2022-10-27 12:56:30 -04:00
955fbe46d1 Renaming classes, adjusting initialization 2022-10-26 22:25:58 -06:00
b3fc574a6a use googletest aliased targets consistently 2022-10-26 22:46:31 -04:00
8a3f7560c9 drop special OpenMP flags from presets. Will be detected by FindOpenMP. 2022-10-26 22:46:21 -04:00
8406e92a9a downgrade KOKKOS OpenMP check to version 3.1
need to apply special exception for NVHPC/PGI compilers
2022-10-26 22:46:13 -04:00
3b376b4448 modernize OpenMP detection and check for omp.h in CMake 2022-10-26 22:46:03 -04:00
ca3b7be623 add compatibility to VTK version 9.0 and above 2022-10-24 16:25:25 -04:00
c825c52d2f update required version 2022-10-23 03:45:57 -04:00
0ea0e4ce59 modernize calls to access the list of fixes in the Modify class 2022-10-23 03:16:26 -04:00
d53d4b4d99 use inline insertion sort for short array 2022-10-23 03:16:13 -04:00
b37cd14dd1 avoid superfluous calls to utils::strdup and improve error messages 2022-10-23 03:15:58 -04:00
a921a6bdc1 silence compiler warning about not copying the final null byte 2022-10-23 03:15:47 -04:00
51a0345941 Update fix_bond_react.rst 2022-10-23 03:15:35 -04:00
8d70960e2d bond/react: create atoms error check
check that post-reaction template has 'Coords' section if it has 'CreateIDs' section
2022-10-23 03:15:12 -04:00
5661703b30 Update pair_threebody_table.cpp
Correcting for hard coded ntheta = 79 in the extreme case that theta is exactly equal to 180.0 degrees.
2022-10-23 03:13:50 -04:00
bc30304f72 update plumed package version to 2.8.1 2022-10-22 23:01:47 -04:00
c76da483fb must bootstrap centos 7 from dockerhub now 2022-10-22 22:59:52 -04:00
036a1e47d2 replace one more suffix 2022-10-22 22:28:35 -04:00
20fd34a55c Fix swapped buffer 2022-10-21 21:13:05 -06:00
5430c3b592 add workaround for missing links to fortran functions in sphinx output 2022-10-21 19:01:31 -04:00
9b7cb8200c small sphinx tweaks. require sphinx 5.2 or later. 2022-10-21 19:01:24 -04:00
550eedbb1f make Linux behavior default for loading Python shared lib
This adds portability to platforms like FreeBSD
2022-10-21 15:52:26 -04:00
3a058f278d Python support in ML-IAP requires NumPy. Check for it if CMake supports it. 2022-10-21 15:50:08 -04:00
0f7f0b5f86 find cythonize executable on recent FreeBSD versions 2022-10-21 11:39:02 -04:00
3de7534b84 try to make more portable (in case this ever gets ported to windows) 2022-10-21 11:38:50 -04:00
7065462faf add md5sums for plumed 2.7.5 and 2.8.1, update default version to 2.8.1 2022-10-21 11:38:40 -04:00
9d962363a6 Enforced net induced charges to be zero 2022-10-21 00:12:40 -05:00
5639820702 Fixed an issue with fieldforce_ad() in pppm/dielectric 2022-10-20 23:35:56 -05:00
a1b915e469 Merge branch 'upstream' into dielectric-updates 2022-10-20 23:28:58 -05:00
ca34dccec0 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2022-10-20 15:03:54 -06:00
2e9d8e1ccb preserve pair/only package setting during clear command 2022-10-19 14:50:27 -04:00
19b84f7cbd delete atomfile variables when using the clear command 2022-10-19 14:44:10 -04:00
9b7c445a15 include non-buffered flag 2022-10-19 14:44:04 -04:00
4f2e0147e0 Merge branch 'doc-fixes' of github.com:hammondkd/lammps into doc-fixes 2022-10-19 10:29:30 -05:00
c07f5e8339 Temporary(?) fix for highlighting overflow in labelmap.rst 2022-10-19 10:29:18 -05:00
91e56444ce add CMake check that will refuse compilation of unit tests or skip tests
This is mainly because the default compilers on RHEL/CentOS 7.x are
not sufficient to compile googletest. Also some Fortran module test
requires a working F90 module and others are more recent Fortran compiler.
2022-10-17 18:12:21 -04:00
9b3c8c36bd update version 2022-10-14 21:35:16 -04:00
e73d27cfa4 Fix runtime error 2022-10-14 15:56:22 -06:00
8242559377 A few more optimizations to pair_gran_hooke_history_kokkos 2022-10-14 15:22:18 -06:00
85726b7ce2 Optimize FixNeighHistoryKokkos 2022-10-14 14:22:08 -06:00
bf42f06a39 Optimizations for pair_gran_hooke_history_kokkos 2022-10-14 12:35:32 -06:00
dc6fc3ec03 Fix compile error 2022-10-13 12:35:13 -06:00
2f4fd62aed Whack errordocs 2022-10-12 17:23:57 -06:00
76220727c8 Whitespace, etc. 2022-10-12 17:20:16 -06:00
ba468fffcc Update to latest develop, fix merge conflicts 2022-10-12 17:08:48 -06:00
a3839cd07a Merge branch 'develop' of github.com:lammps/lammps into develop 2022-10-12 13:20:09 +02:00
3403520967 Fix issue with KSpace slab correction energy with non-neutral systems 2022-10-11 16:37:45 -04:00
00f46120c7 Removed max_cus() from Device, used device->gpu->cus() instead 2022-10-07 15:50:30 -05:00
6b9e83fe20 Added timing for the induced dipole spreading part, computed the block size to ensure all the CUs are occupied by the fphi_uind and fphi_mpole kernels 2022-10-06 15:03:58 -05:00
009ed36301 Updated src/GPU Install.sh to include amoeba_convolution_gpu.* 2022-10-01 11:16:30 -05:00
2ef6a59c0a Merge branch 'develop' into amoeba-gpu 2022-10-01 00:38:24 -05:00
d8f969f1df update python package requirements for building the manual 2022-09-30 20:18:05 -04:00
9a1f23a079 Cosmetic changes and cleanup 2022-09-30 17:32:25 -05:00
1d75ca3b20 Moved precompute() out of the terms in amoeba and hippo, to be involed in the first term in a time step: multipole for amoeba and repulsion for hippo 2022-09-30 16:31:13 -05:00
e6d2582642 Updated fphi_mpole, renamed precompute_induce to precompute_kspace 2022-09-28 15:08:18 -05:00
57d2086a5c Merge branch 'develop' of github.com:lammps/lammps into develop 2022-09-28 10:04:00 +02:00
d7c799a09a Merge pull request #2 from aliehlen/dielectric-docs
update of DIELECTRIC package documentation and examples
2022-09-27 14:29:58 -05:00
6b74d04a57 Merge branch 'dielectric-updates' into dielectric-docs 2022-09-27 14:29:10 -05:00
3487deccb6 update broken URLs 2022-09-27 08:03:11 -04:00
cca7a53132 Patching heat implementation and adding example 2022-09-25 14:53:53 -06:00
0926fc627d step update counter 2022-09-25 09:04:45 -04:00
7999778d94 initialize sllod fixes consistently 2022-09-25 07:02:35 -04:00
b4ef4c1ff2 correct indentation 2022-09-25 07:02:35 -04:00
72b08e4b87 backport dump fixes from develop 2022-09-25 07:02:28 -04:00
166701f13a Fixed missing commas in the argument list of the macros in amoeba and hippo cu files, added amoeba_convolution_gpu.cpp and .h to the source file list in GPU.cmake 2022-09-23 11:53:09 -05:00
dc1b7d4cfe Fixing mathematical errors in force/torque calculations 2022-09-21 16:31:18 -06:00
785131932c Added fphi_mpole in amoeba/gpu, fixed a bug in the kernel when indexing grid 2022-09-20 13:58:17 -05:00
13be68aece Fixing argument errors and adding note on datafiles to doc 2022-09-19 22:14:59 -06:00
356c46c913 Replaced mem allocation/deallocation inside moduli() with using member variables and mem resize if needed 2022-09-18 16:28:30 -05:00
caa66d904e Cleaned up GPU lib functions 2022-09-18 15:54:12 -05:00
f9f777b099 Refactored precompute_induce to overlap data transfers with kernel launches 2022-09-18 15:09:26 -05:00
7f16225ffb Removing leftover file 2022-09-16 16:57:32 -06:00
c9ba3f4157 Adding classic tangential models 2022-09-16 16:56:20 -06:00
71db9f5e75 Fixing tangential damping coefficient 2022-09-16 14:16:34 -06:00
62ecf98cda Enabled fphi_uind in hippo/gpu, really need to refactor hippo and amoeba in the GPU lib to remove kernel duplicates 2022-09-16 14:47:16 -05:00
b61cfb7480 Fixing errors in gran/wall reff calculation and adding heat capabilities 2022-09-16 09:06:52 -06:00
880f20c285 Cleaned up kernels 2022-09-15 15:29:14 -05:00
038f4a5210 Adding variable temperature to fix gran/wall, misc fixes/updates 2022-09-14 21:40:00 -06:00
0359d40580 Added interpolation timing for the cpu version 2022-09-14 16:11:43 -05:00
cd3a00c2c4 Added timing breakdown for fphi_uind 2022-09-14 15:28:44 -05:00
9c4d3db558 Cleaned up and converted arrays to ucl_vector of numtyp4 2022-09-13 16:48:39 -05:00
31047b4a31 Removed mem alloc in precompute_induce, used buffer for packing, and switched to using ucl_vector 2022-09-13 12:53:48 -05:00
17e54c9390 Updated the GPU API in the gpu pair style 2022-09-11 19:00:40 -05:00
7f4efa380a Re-arranged memory allocation for cgrid_brick, some issues need to be fixed 2022-09-11 18:58:34 -05:00
5e59c95be4 Moved temp variables inside loops 2022-09-10 02:45:06 -05:00
363b6c51d0 Used local arrays and re-arranged for coalesced global memory writes 2022-09-10 02:31:39 -05:00
faa64a84e8 bugfixes and updates to the DIELECTRIC package from upstream 2022-09-09 19:42:01 -04:00
06953bd67a Adding none submodels, further cleaning up mixing, misc edits 2022-09-09 17:12:51 -06:00
6a6291827f Simplifying mixing coeffs, other misc clean ups 2022-09-09 15:11:24 -06:00
3df0abd081 Debugging restarts 2022-09-09 14:13:52 -06:00
ali
47e33002ef first attempt at adding a default kspaceflag to gmres 2022-09-09 15:09:38 -05:00
ali
6f3bac3336 quick doc updates 2022-09-09 14:56:55 -05:00
c58343b2e2 Cleaned up debugging stuffs, need more refactoring and add to hippo 2022-09-09 13:50:41 -05:00
b72b71837e Moved first_induce_iteration in induce() to the right place 2022-09-09 13:34:57 -05:00
4b8caac727 Made some progress with fphi_uind in the gpu pair style 2022-09-09 12:14:36 -05:00
32b67fff2b print an error if the filename before '*' is too long for the regex matcher 2022-09-07 21:06:19 -04:00
f3dbf4122d extend the length to which the regex matcher checks strings to 256 chars. 2022-09-07 20:47:16 -04:00
a0af9627e5 Fixed memory bugs with device array allocations 2022-09-06 16:19:17 -05:00
e25ac786da must apply bond/angle offsets when determining shake bond/angle types 2022-09-05 10:52:06 -04:00
f30fba0061 support paths with blanks and avoid race condition when updating potentials 2022-09-02 21:33:30 -04:00
21b7fb2fcf Exposing fphi_uind to the gpu pair style, still keeping the part not ready though 2022-09-02 14:55:20 -05:00
cad7e1b364 Moved fphi_uind up to BaseAmoeba 2022-09-02 10:18:59 -05:00
03f319604f recover dump_modify every behavior 2022-08-31 17:26:09 -04:00
aac264f2e2 Working on the fphi_uind kernel and array allocations 2022-08-30 23:40:04 -05:00
0782dab1ec properly initialize result storage for per-chunk arrays 2022-08-29 13:04:40 -04:00
c5c3c697df Adding fphi_uind kernel, working on the arrays allocation 2022-08-29 00:13:30 -05:00
c43cce54ab re-initialize neighbor lists at end to clear out the occasional list entry 2022-08-28 11:47:27 -04:00
281a368702 correct pair coeff mixing diagnostic for CLASS2 pair styles 2022-08-28 05:51:38 -04:00
9e7bbad4d4 Working on fphi_uind in the GPU lib 2022-08-27 13:19:52 -05:00
b160460dcc Added preprocessors to comment out cufft entirely for now 2022-08-26 12:55:46 -05:00
b2d6df5bfb Re-arranged some for loops in umutual1 to improve cache-friendly memory access; made placeholder for grid_uind on the GPU lib, maybe FFT is not that heavy to be put on the device. 2022-08-25 23:18:13 -05:00
1cd18d2b37 Replacing # of models with macro, may revise... 2022-08-24 14:47:10 -06:00
c5da64ccea Fixing merge conflicts 2022-08-24 12:22:00 -06:00
92c10cc210 Fixing memory issues, passing lmp ptr to submodels, and other misc fixes/changes 2022-08-24 12:19:27 -06:00
f4a90c62c0 First attempt to port the forward FFT in the k-space induce term to the GPU, not working yet 2022-08-23 15:42:05 -05:00
f28d69b429 bugfix for writing data files with atom style dielectric 2022-08-19 16:18:38 -04:00
921796a15f Cleaned up unused variables in the hippo kernels 2022-08-16 16:29:38 -05:00
28dabb9687 Cleaned up unused variables in the amoeba kernels, made room for convolution gpu 2022-08-16 15:37:49 -05:00
46b8b00a4f Working on fft on the device 2022-08-15 15:51:43 -05:00
f1112ab6b6 Working on the gpu kspace induce term: dipole spreading and/or fft calls 2022-08-15 14:28:46 -05:00
e674e0c927 correctly handle the case where there are no atoms in the fix group 2022-08-14 03:53:02 -04:00
12c1923511 Updating mixing 2022-08-12 17:36:53 -06:00
c13f825648 Added AmoebaConvolutionGPU class: need to replace fft compute with the GPU-accelerated backend 2022-08-10 16:24:20 -05:00
538aa13693 Only transfer data that is needed for umutual2b; allowed convolution and kspace term umutual1 to be overridden by the gpu counterparts 2022-08-10 16:21:30 -05:00
454f6b6c0d Merge branch 'develop' of github.com:lammps/lammps into develop 2022-08-09 15:05:41 +02:00
df22b91ac3 Updating coeff parsing, first pass on fix wall/gran, misc fixes 2022-08-08 08:01:48 -06:00
eebabf99b8 adjust location of local ref targets for recent sphinx versions 2022-08-05 22:09:01 -04:00
23a19f4431 need new CSS hack to hide duplicate headers derived from the navigation bar 2022-08-05 21:46:38 -04:00
d618b0ffc0 Merge pull request #3324 from akohlmey/maintenance-2022-06-23
First round of maintenance fixes for the stable release
2022-08-05 16:57:43 -04:00
ali
b05dc17c09 update of DIELECTRIC package documentation and examples 2022-08-05 11:25:03 -05:00
ffc71b8733 energy is not an array 2022-08-05 08:23:23 -04:00
564df78698 fix typo 2022-08-05 08:22:59 -04:00
8db0b5ca39 fix index copy-n-paste error 2022-08-05 08:22:09 -04:00
79e26fe829 correct bond style bpm/rotational example 2022-08-05 03:24:29 -04:00
523d4b0242 correct issues in fix adapt and fix adapt/fep related to using fix STORE 2022-08-04 10:19:26 -04:00
fe39a3e581 Documentation updates for simulations including dipoles 2022-08-03 16:47:29 -04:00
aad4e417f9 Moved temp variables inside neighbor loops 2022-08-03 12:33:48 -05:00
a54f0b684d Moved temp variables inside the loop over neighbors 2022-08-03 10:56:52 -05:00
081cc1f992 clarification on what constituets single, double, and triple quotes. 2022-08-03 01:51:43 -04:00
e980838ae2 Added timings for real-space and k-space portions for the terms 2022-08-02 16:45:06 -05:00
22de863da9 Fixing compilation errors and finishing model classes 2022-08-01 13:12:44 -06:00
53c80c2c00 match pow(0,0) = 1.0 behavior in powint() 2022-07-31 18:52:08 -04:00
673823dd82 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-07-31 12:52:52 +02:00
554b64a147 avoid deprecation warning and update PyPy package requirements 2022-07-30 17:37:35 -04:00
a6066bab4d Called the induce real-space term before the kspace term 2022-07-29 13:01:57 -05:00
dc08dba592 update embedded search box 2022-07-28 18:58:58 -04:00
0eaa2775cd document missing call 2022-07-27 22:13:33 -04:00
852673ce41 fix off-by-one bug 2022-07-27 21:44:22 -04:00
8c711e405a correct make command line example 2022-07-27 08:38:37 -04:00
25b9f95061 add check on extracting elements twice from the library to avoid opaque error later 2022-07-26 15:01:03 -04:00
ee66a6f8c1 correct formatting 2022-07-26 12:34:05 -04:00
b694a5f582 add reference 2022-07-26 12:33:57 -04:00
7ab3fce93f correct typos 2022-07-26 12:33:48 -04:00
93784f35e3 Added ucl_erfc to the opencl, cuda and hip backends; reverted to using erfc instead of approximation to ensure double-precision matches 2022-07-25 15:34:44 -05:00
288fd5add4 Updated the python scripts under tools/tinker to the latest version in develop 2022-07-19 15:18:17 -05:00
1f9509cb6f strip off -pendantic-errors flag when compiling with nvcc_wrapper to fix error compiling ML-PACE 2022-07-18 14:00:53 -04:00
cad1d8ece4 correct unit tests for dump local 2022-07-17 12:16:01 -04:00
b709d75f80 add support for dump_modify colname to dump local 2022-07-17 11:52:15 -04:00
5839909061 fix cut-n-paste error and improve error message 2022-07-17 11:46:51 -04:00
30f374de58 clarify 2022-07-16 06:42:19 -04:00
0f9fec05fb disallow use of variable functions vdisplace(), swiggle(), and cwiggle() with fix dt/reset 2022-07-16 06:42:11 -04:00
8557ce7c97 Adding normal, damping, and tangential sub models 2022-07-15 17:57:38 -06:00
972a86f0ec fix cut-n-paste typo 2022-07-15 19:06:14 -04:00
8b40ecff4c Debugging prints 2022-07-15 16:39:02 -06:00
6a1a06d76c Take 2 2022-07-15 12:30:30 -06:00
7338ebfc94 Update Errors_warnings.rst 2022-07-15 12:28:07 -04:00
7132152693 Update Errors_messages.rst 2022-07-15 12:27:57 -04:00
c9925f64f7 cosmetic changes, silence warnings, avoid temporary char buffers 2022-07-15 12:27:48 -04:00
6da523c8b8 very-small-templates bugfix 2022-07-15 12:27:36 -04:00
0522284589 bugfix: specials update corner case 2022-07-15 12:27:26 -04:00
e10a66dabc allow ramp(x,y) to be used in between runs (returning x) and avoid division by zero on run 0 2022-07-15 05:41:12 -04:00
51dd631a76 Fix bug in vtk dump 2022-07-15 04:29:54 -04:00
6dae78f900 Merge pull request #2 from dsbolin/gran-modular
Pulling in Dan's re-refactor
2022-07-14 12:40:06 -06:00
6b40ae29e4 First stab 2022-07-14 11:29:13 -06:00
66ee2bf989 Cleaned up 2022-07-14 11:01:30 -05:00
d37249787e work around issues with Intel compilers compiling the GPU package 2022-07-12 00:38:51 -04:00
a6bfcf838a First attempt 2022-07-08 15:43:06 -06:00
0c44bd1086 Rearranged the order of real-space and kspace part of ufield0c(), delayed device-host transfer from umutual2b() to overlap with kspace part 2022-07-08 14:45:31 -05:00
f44841de69 update unit test 2022-07-07 10:32:47 -04:00
54c5337d2d apply clang-format 2022-07-07 10:32:32 -04:00
efb0e63bf6 correct force and energy for excluded pairs 2022-07-07 10:32:20 -04:00
78d6df5ba9 Removed temporary arrays in hippo/gpu induce, flipped sign of the viriral terms in torque2force in hippo/gpu 2022-07-06 11:17:08 -05:00
675c2d38a3 Flipped sign of forces and virial terms in the hippo kernels 2022-07-05 14:37:26 -05:00
bb92dae6d3 Simplying conduction 2022-07-05 10:12:12 -06:00
8328866611 Added checks for the gpu variant of pair amoeba/hippo in improper/amoeba and fix amoeba/bitorsion 2022-07-05 11:02:31 -05:00
ee5afdc146 Updated all the gpu ready terms 2022-07-04 23:24:31 -05:00
13d78c3afa Update Kokkos version in CMake 2022-07-04 10:49:03 -04:00
f2910b1d9c Update Kokkos library in LAMMPS to v3.6.1 2022-07-04 10:48:51 -04:00
5dab809522 Flipped force sign in polar_real, made sure that multipole_real is true for precompute() to be invoked, ubdirect2b() is segfault and needs work 2022-07-04 01:38:22 -05:00
f4900d131a Working on the multipole term on the gpu side, incorrect virials 2022-07-01 16:26:25 -05:00
78b22a64aa formatting corrections and minor tweaks to the Argon viscosity howto 2022-07-01 09:27:43 -04:00
8bb1880c9d Fixed temperature in argon GK example 2022-07-01 09:27:36 -04:00
e7b36c7b90 make certain to switch to the expected source folder when building n2p2 lib 2022-07-01 05:49:07 -04:00
d7804e3770 MPI may need to include multiple folders (e.g. on Ubuntu with OpenMPI) 2022-06-30 23:53:57 -04:00
8d0f9695d2 update googletest to version 1.12.1 2022-06-30 14:57:22 -04:00
52b2e4f364 add Update 1 string to version info 2022-06-29 17:44:29 -04:00
ba1c4e8e81 Defining conduction from area, a 2022-06-29 15:34:39 -06:00
41140149ea whitespace 2022-06-29 17:06:11 -04:00
85e556ac8f add more unit tests for boolean expressions 2022-06-29 17:05:37 -04:00
cd5437a7e2 fix bug in recent bugfix 2022-06-29 17:05:27 -04:00
00cc82ac94 update and expand unit tests for if() command boolean evaluation 2022-06-29 17:04:49 -04:00
20f87e3f1d change boolean = single string to an error 2022-06-29 17:04:34 -04:00
97e34f0667 better error strings 2022-06-29 17:04:23 -04:00
3e5da9b09a more consistency checks 2022-06-29 17:04:12 -04:00
a62fcca7a4 Boolean expression corner case 2022-06-29 17:04:01 -04:00
222c40ebcf Fixing memory errors 2022-06-29 15:02:05 -06:00
778d59fa6b whitespace 2022-06-29 05:19:10 -04:00
3833a85d7a Add missing grow to Kokkos unpack_exchange 2022-06-29 05:17:55 -04:00
6d961ab29f Fix small memory leak in SNAP 2022-06-29 05:17:46 -04:00
001824e0f6 Small tweaks 2022-06-29 05:17:36 -04:00
953d32f9b3 Prevent view bounds error when a proc has no atoms 2022-06-29 05:17:26 -04:00
edba922665 Add missing GPU <--> CPU data transfer in minimize Kokkos 2022-06-29 05:17:17 -04:00
53806d4601 Add more missing Kokkos data movement 2022-06-29 05:17:06 -04:00
a14f0cfd6c Merge branch 'amoeba' into amoeba-gpu, update the gpu pair styles with the base class 2022-06-28 12:54:27 -05:00
67597722d5 intergrate references to dump cfg/uef into the dump command docs 2022-06-25 06:19:04 -04:00
337794a9e9 add crosscompiling with MPI support to plugins package 2022-06-24 06:52:08 -04:00
5f5fb895ff add "package" target to support building a windows installer with NSIS 2022-06-24 01:25:54 -04:00
0302d03bc6 must set thirdparty download URL variable for downloading MPICH4Win 2022-06-23 23:20:49 -04:00
0a4fef369f may check for MPI library Fortran support only if MPI is enabled 2022-06-23 15:57:54 -04:00
7d5fc356fe Merge pull request #3311 from akohlmey/next-stable-release
Update stable branch to next stable release
2022-06-22 17:33:34 -04:00
8103e5a18f Merge branch 'release' into next-stable-release 2022-06-22 16:29:19 -04:00
e5b56b67fe Merge branch 'next_patch_release' into next-stable-release 2022-06-21 09:00:40 -04:00
8ffb7e5f89 Merge branch 'collected-small-fixes' into next-stable-release 2022-06-21 09:00:31 -04:00
cb9ab48ce7 Merge branch 'develop' into next-stable-release 2022-06-21 09:00:12 -04:00
1faa7397d3 Fixing complier issues, adding dump options, initail conduction 2022-06-18 10:11:57 -06:00
468a6d9f29 creating ContactModel class 2022-06-16 14:27:57 -06:00
68e00a60bd Fixing rare bug in writing restart files with history 2022-06-15 12:37:02 -06:00
c0078fda05 Begin refactoring of pair granular 2022-06-14 09:27:14 -06:00
66188d9d57 unified naming scheme 2022-06-13 09:00:15 -06:00
c6d59fc526 adding documentation and integration fix 2022-06-12 10:09:26 -06:00
e01ef14025 Adding documentation and integration fix 2022-06-12 10:06:16 -06:00
783cb117c5 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-06-09 14:21:27 +02:00
1ebb1cee40 Merge branch 'release' into next-stable-release 2022-06-02 21:49:47 -04:00
f0e7101bd2 Merge branch 'develop' into next-stable-release 2022-05-18 06:35:57 -04:00
cb7db85096 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-13 13:44:04 +02:00
15f0a63260 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-06 10:04:49 +02:00
662cfca43b Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-02 13:07:26 +02:00
3d3cca2964 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-04-28 22:50:54 +02:00
531e553162 Merge branch 'amoeba' into amoeba-gpu 2022-04-22 16:10:24 -05:00
6fd8b2b177 Merge pull request #3122 from akohlmey/maintenance-2021-09-29
Third round of maintenance fixes for the stable release
2022-03-24 14:20:52 -04:00
6edaf42b3d fix temperature initialization bug in KOKKOS nose-hoover code 2022-03-24 11:44:24 -04:00
79c047487d fix parallel execution bug for shell command 2022-03-24 07:38:44 -04:00
ac5acb9abf update threebody example 2022-03-24 07:31:02 -04:00
87fbbd3b13 small kokkos fixes from upstream 2022-03-24 07:18:24 -04:00
8ac0ec6473 Changes needed to compile LAMMPS with latest Kokkos develop 2022-03-24 06:09:03 -04:00
8acba74c4d correct input to load potential file from local folder 2022-03-22 22:32:39 -04:00
34bcbdf41d update extep potential file 2022-03-22 22:31:48 -04:00
d519ca0213 add missing reaxff files to purge list 2022-03-21 14:34:14 -04:00
a392e8dc09 accept infile with 0 lines, so we can create a template from the restart 2022-03-21 00:33:40 -04:00
a4d4f77bc2 run setup_bodies_dynamic() before processing infile in case that is not resetting all data 2022-03-21 00:32:49 -04:00
83a8f72d83 fix off-by-one bug when writing restart files for rigid bodies 2022-03-20 19:14:13 -04:00
3c54b56cfe update overlooked date stamp 2022-03-19 21:00:14 -04:00
ff1a08f148 fixes to CMake build for ML-QUIP package from upstream 2022-03-17 18:07:12 -04:00
5a53b0fc03 import python3 compatibility changes to tools/python from upstream 2022-03-16 13:24:53 -04:00
e550600ebe Error fixed. Epsilon and sigma must also be symmetric 2022-03-16 09:09:52 -04:00
7cb13be52a fix bug where it was not possible to use an absolute path for write_coeff 2022-03-16 09:08:47 -04:00
81bf2eb9b2 Merge branch 'amoeba' into amoeba-gpu 2022-03-16 00:16:48 -05:00
ab56d7ecd7 augment cmake library search path to include the CUDA stubs library folder
this will help configuring and compiling LAMMPS with CUDA support on
machines where there is no CUDA driver installed
2022-03-10 23:02:57 -05:00
bd6ac3ee6d for 2d systems, rigid bodies always have a moment of inertia and no DOFs need to be subtracted 2022-03-02 16:41:35 -05:00
27ca0a8f41 trigger building an "intel" style neighbor list so that buffers are allocated 2022-02-27 14:50:48 -05:00
f688b9b6b5 use consistent names, avoid memory leaks, fix off-by-1 error in fourier dihedral 2022-02-27 12:25:32 -05:00
16c61b3cc0 add support for plumed 2.6.5, 2.6.6, 2.7.3, 2.7.4, and 2.8.0 (default 2.7.4) 2022-02-25 16:37:00 -05:00
fb480f22fc make cythonize detection compatible with /bin/dash on ubunutu 2022-02-24 21:24:04 -05:00
d0507559a4 when updating ML-IAP due to adding/removing PYTHON we need to delete and re-add cythonize support 2022-02-24 20:40:55 -05:00
ali
58eb331b08 Python 3 compatibility for log commands in tools/python 2022-02-23 10:22:29 -05:00
c68015ca87 Bug fix for Intel package skip lists with multiple runs. 2022-02-18 05:11:34 -05:00
583c22d6e0 update tools/eam_database from upstream 2022-02-16 11:46:11 -05:00
e0c0739b11 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-02-15 15:15:59 +01:00
21c0702917 Merge pull request #1 from Bibobu/EAM_alloy_python_script
Added Python version of Zhou04_create_v2.f: create_eam.py and eamData…
2022-02-12 12:51:17 +01:00
58a4694d92 Remove incorrect error check in ReaxFF 2022-02-11 16:19:00 -05:00
97cf345528 don't allow exceptions to "escape" a destructor 2022-02-10 21:13:26 -05:00
0658abbdd4 silence possible warnings about missing files on "make clean-all" 2022-02-10 21:10:34 -05:00
72026a58bf make certain that "offset" is always initialized 2022-02-10 21:05:12 -05:00
7152231a10 plug memory leak 2022-02-10 20:56:51 -05:00
8fe8a667b6 update create.f with changes from NIST database
also add parameters for Cr and document in README file and change
the code to create output files with .eam.alloy extension
2022-02-10 20:45:16 -05:00
560c543e69 add extra communication of special neighbors when using angle constraints 2022-02-10 20:44:39 -05:00
c5e6650924 import bugfixes for crashes and memory leaks in MSM kspace style from develop 2022-02-10 20:36:35 -05:00
10373ea5c9 avoid failures with "most" presets 2022-02-10 20:11:00 -05:00
992b1cf582 label as update #3 2022-01-25 07:42:00 -05:00
1505f3de06 fix tag caching issue in INTEL package 2022-01-25 07:41:37 -05:00
566efe04f2 always fall back to using the .so extension if available in the LAMMPS module folder 2022-01-19 10:12:50 -05:00
7586adbb6a Merge pull request #3029 from akohlmey/maintenance-2021-09-29
Second round of maintenance fixes for the stable release
2022-01-06 19:58:51 -05:00
69d6ddccc5 create missing de,df table elements from linear extrapolation 2022-01-05 15:34:30 -05:00
5ae496dcef backport array dimension bugfix for NETCDF package in simplified form 2022-01-03 19:55:23 -05:00
bc5d742623 explain that the computed force in python pair is force/r same as in Pair:single() 2022-01-03 10:12:38 -05:00
882e699163 Incorporate bugfixes from issue #3074, a few additional cleanups 2022-01-03 10:11:18 -05:00
9c725d79d6 correct code example for current code 2022-01-01 16:42:28 -05:00
79fbf437a3 correct format string for Error::one() 2021-12-29 16:19:10 -05:00
d130aa4289 address segfault issue with fix nve/gpu when group is not "all" 2021-12-29 14:06:52 -05:00
5d8b83a251 backport GPU package build system updates from upstream 2021-12-27 20:30:43 -05:00
5a2548a83d have internal fix/compute ids include the fix id for fix reaxff/species
this allows using the fix multiple times
also remove code and warning that checks for multiple fix instances

# Conflicts:
#	src/REAXFF/fix_reaxff_species.cpp
2021-12-23 11:36:28 -05:00
a85b310e1f add missing fclose() 2021-12-23 11:28:24 -05:00
e51fd40547 correct names of the pack/unpack routines for forward communication 2021-12-09 18:33:13 -05:00
62f271658b correct setting forward/reverse buffer size info 2021-12-08 13:58:12 -05:00
0aa742934f correct docs for pair style local/density 2021-12-08 00:51:52 -05:00
a26a709a7b correct handling of data packing for forward and reverse communication 2021-12-08 00:51:52 -05:00
027293d285 whitespace 2021-11-24 15:47:05 -05:00
f7d049ac2d generate atom tags for newly created atoms, if tags are enabled. triclinic support. 2021-11-24 15:36:16 -05:00
ea0ff1c8f7 Update CMake utility function get_lammps_version()
With the introduction of LAMMPS_UPDATE, version.h is no longer a single line
file. With this change the CMake utility will only process the LAMMPS_VERSION
line. Fixes issue #3038
2021-11-23 10:44:40 -05:00
5c1bb5f13a Write dump header after sort to fix incorrect atom count for multiproc 2021-11-22 15:52:27 -05:00
24d9b4b611 Update lebedeva potential file and docs based on email on mailing list
https://matsci.org/t/lammps-users-webpage-and-parameter-file-for-the-lebedeva-potential/39059
2021-11-17 08:45:55 -05:00
a0e75c9006 correct unit description of eta_n0 parameters. fixes #3016 2021-11-17 08:38:09 -05:00
2435b953e1 increment update counter 2021-11-17 07:04:44 -05:00
c042e12323 clarifications and corrections for the discussion of the main git branches 2021-11-17 07:04:13 -05:00
e9efe46db9 update branch names 2021-11-17 07:03:56 -05:00
ecc14b7308 update documentation to refer to the new branch names (develop, release) 2021-11-17 07:03:27 -05:00
0152fe5cdf fix segfault when using atom style smd as part of a hybrid style
also remove redundant for clearing
2021-11-16 21:49:56 -05:00
892d17af22 plug memory leaks 2021-11-16 21:49:41 -05:00
2cca00203e Avoid file name collisions in dump unit tests
# Conflicts:
#	unittest/formats/test_dump_atom.cpp
2021-11-16 15:08:27 -05:00
9f4626a62a correct uninitialized data access bug due to shadowing of a base class member 2021-11-16 10:51:46 -05:00
e890a0b45e Merge pull request #2999 from akohlmey/maintenance-2021-09-29
Maintenance fixes for the stable release
2021-11-09 15:11:19 -05:00
68223f0385 mention that dump sorting is limited to less than 2 billion atoms 2021-11-07 08:31:15 -05:00
1291a88bff skip MPI tests if they would be oversubscribing the available processors 2021-11-07 08:30:19 -05:00
d9b687450a account for increased floating point errors when summing numbers to zero 2021-11-07 08:30:04 -05:00
bd950b37d7 change git:// protocol for accessing github to https:// protocol
https://github.blog/2021-09-01-improving-git-protocol-security-github/
2021-11-02 15:30:27 -04:00
21fcdf8c56 Fix bug in Kokkos neighborlist where stencil wasn't updated for occasional list 2021-11-02 13:17:28 -04:00
6b400fb4bf fix indexing bug 2021-10-31 16:19:17 -04:00
d982298ab2 update new LAMMPS paper citation info 2021-10-28 10:09:01 -04:00
765fd7f763 Use correct sizeof in memset 2021-10-27 17:46:37 -04:00
0325047c01 update a few GPU kernels so they can be compiled on GPUs without double precisions support 2021-10-21 07:34:05 -04:00
2dce8923ee more direct version of clearing out loaded plugins 2021-10-19 08:28:19 -04:00
8d1ba074be wipe out all loaded plugins before destroying the LAMMPS instance 2021-10-18 18:06:09 -04:00
4675a3b560 Only check for GPU double precision support if a GPU is present 2021-10-18 13:44:37 -04:00
8999b1f69f add a LAMMPS_UPDATE string define to signal updates to stable releases 2021-10-17 18:06:04 -04:00
6c2b19c11b Add support for an "Update #" appendix to the version string
This is for informative output only, so that any code depending
on the LAMMPS_VERSION define will not have to be changed and no
warnings will be printed etc.
2021-10-17 18:05:29 -04:00
a425334928 port dump vtk to correctly support custom per-atom arrays and fix some bugs 2021-10-17 11:00:33 -04:00
db2faf2789 fix bugs related to custom per-atom properties in dump style custom 2021-10-17 11:00:21 -04:00
fdbb7d0da4 Report only compatible GPU, i.e. no GPU if mixed/double precision is requested by the hardware does not support it 2021-10-15 20:26:47 -04:00
52cd99918f pppm kspace styles also require -DFFT_SINGLE when using GPUs in single precision 2021-10-15 20:24:47 -04:00
a3e6a95ffb allow single precision FFT introspection 2021-10-15 20:24:47 -04:00
5b65169997 correct expansion of fix/compute/variable arguments to avoid bogus thermo outpu 2021-10-15 20:23:57 -04:00
5f3bf69e30 plug memory leaks 2021-10-15 17:00:46 -04:00
507c02b9af must set define to "see" the lammps_open() library function 2021-10-09 10:21:31 -04:00
b7fe47ba48 Fix bugs and compilation issues in KOKKOS 2021-10-08 09:39:53 -04:00
7dfd11da4b re-freeze Sphinx and other pip installed packages for doc build
The change relative to the stable release fixes a bug with python 3.10 support
2021-10-05 10:52:34 -04:00
97ba95f30e fix a couple more bugs like in 5246cedda6 2021-10-05 10:39:03 -04:00
79fbbd4f33 Cleaned up the API of amoeba and hippo to remove unncessary arguments 2021-10-04 14:40:58 -05:00
c1945b4ec9 Fix misplaced MPI calls bug in pair style drip 2021-10-04 07:12:50 -04:00
c4291a4b8e unfreeze versions of python packages used to build the documentation 2021-10-02 23:57:23 -04:00
5b5dfa86c5 also update eigen download for traditional build 2021-10-02 23:56:28 -04:00
3ca3f6959f update eigen3 to the latest release and move download to our own server 2021-10-02 22:55:06 -04:00
0f0f6a51de Renamed sp_polar to sp_amoeba, and replaced special_wscale with special_hal for amoeba 2021-10-02 16:02:44 -05:00
5a6426bf96 Only transfer data arrays that are needed in each kernel 2021-10-02 00:56:15 -05:00
f4d3d3a2b5 Gradually cleaned up and removed redundancy in amoeba and hippo 2021-10-02 00:09:53 -05:00
f7b7bfa406 Avoid assertions in PythonCapabilities check when using external KOKKOS 2021-10-01 12:05:59 -04:00
f126f785a4 Removed duplicates in the amoeba kernels 2021-10-01 10:19:17 -05:00
3328ac0df2 Attempted to remove some redundancy in data transfers in the amoeba kernels; keeping HIPPO independent of AMOEBA for now 2021-10-01 09:58:21 -05:00
3d2f29c92d fix memory allocation bug causing memory corruption on 32-bit arches 2021-10-01 01:16:45 -04:00
e0f91b96fe Cleaned up and added necessary comments 2021-09-29 13:07:20 -05:00
ad9d45639e Fixed bugs with damprep where ucl_powr in mixed precision failed with a negative single-reprecision base 2021-09-29 12:32:08 -05:00
01381b7f54 Fixed bugs in the repulsion kernel, now working correctly with the double precision mode 2021-09-29 11:57:25 -05:00
4be44c386f Added necessary arguments to the hippo repulsion kernel 2021-09-29 09:40:33 -05:00
17edd797a7 Adding API for the repulsion term to hippo/gpu 2021-09-28 23:42:04 -05:00
b95508125b Adding the repulsion kernel for hippo 2021-09-28 23:24:34 -05:00
6286a119b3 Removed precompute() in hippo 2021-09-28 23:12:07 -05:00
98a2b67292 Changed to the API of BaseAmoeba to reduce duplicates in hippo 2021-09-28 17:39:55 -05:00
b874feb127 Removed trailing spaces 2021-09-28 17:28:33 -05:00
bf88ab77fa Cleaned up unused variables in kernel (to be continued) 2021-09-28 15:06:30 -05:00
e80eea56ba Added udirect2b and umutual2b for hippo 2021-09-28 14:59:39 -05:00
8d54547bc0 Commented out debugging commands in the hippo kernels, added (numtyp) to numerics in hippo_extra, replaced fabs with explicit func 2021-09-28 00:50:33 -05:00
d27836952a Fixed a bug in neighbor.cpp to make special_flag consistent between amoeba and hippo (to be 2 instead of 0), that caused missing neighbors with hippo 2021-09-27 16:12:49 -05:00
c6148938e5 Debugging the neighbor list in hippo vs amoeba 2021-09-27 12:36:11 -05:00
136cf581d6 Merge remote-tracking branch 'origin/amoeba' into amoeba-gpu 2021-09-27 12:22:33 -05:00
2efd841a7e Trying to find the difference in the neighbor list build in hippo vs amoeba 2021-09-27 11:35:35 -05:00
7437c98628 Fixed bugs in the polar real kernel in hippo, getting closer.. 2021-09-26 09:11:09 -05:00
5193dcf8c5 Working on the polar real-space term of hippo 2021-09-26 00:56:29 -05:00
edbed9c9c9 Fixed bugs in HippoT::compute_dispersion_real and compute_multipole_real to ensure that answers only get copied back from device in the last kernel activated. 2021-09-26 00:13:40 -05:00
f8bc091cb8 Kept working on the multipole real-space term of hippo 2021-09-25 13:17:06 -05:00
78ef0d631f Working on the multipole real-space term of hippo 2021-09-25 12:25:34 -05:00
e77df80ce2 Working hippo multipole real-space term, added helper functions in a separate file 2021-09-24 16:44:43 -05:00
ad8164dfc0 Fixed bugs in the dispersion real-space term for hippo. NOTE: CPU version filter out neighbors with zero special_disp 2021-09-24 00:21:25 -05:00
830b5fa2dd Started working on hippo/gpu 2021-09-23 09:21:55 -05:00
2428f1f4d5 Updated hippo kernels 2021-09-22 11:44:41 -05:00
bebef18495 Cleaned up and minor changes 2021-09-21 23:46:21 -05:00
d77d5b7f0a Added classes for hippo/gpu, refactored BaseAmoeba and made room for the dispersion real-space term in hippo 2021-09-21 15:40:06 -05:00
a2fd784034 Added the dispersion real space term, which is for HIPPO. 2021-09-21 10:55:38 -05:00
42034bd1c9 Fixed bugs for undefined tagint and ucl_powr ambiguity in kernels for OpenCL builds 2021-09-20 12:48:29 -05:00
4e88cd158e Fixed bugs with _tep and _fieldp to allow mixed-precision builds, being defensive with acctyp for these variables 2021-09-20 11:38:50 -05:00
0228867d8e Added the dispersion real space kernel and transfer special coeffs to the device 2021-09-19 23:40:43 -05:00
1166845fcf Prepared data structure for the dispersion real-space term 2021-09-18 10:22:22 -05:00
5d801e985f More cleanup 2021-09-17 23:24:23 -05:00
78045d8f76 Cleaned up debugging stuffs and unused variables 2021-09-17 23:13:51 -05:00
f5713a52b3 Added another kernel to accumulate forces, energies and virial on the device (similar to the tersoff kernels) as multiple kernels all added to those quantities; also only copy answers back to the host in the last kernel in a time step; cleaned up debugging messages 2021-09-17 16:39:57 -05:00
2e6df83b9b Fixed bugs in the multipole real-space part on the GPU; separately multipole real and polar real work correctly (along with udirect2b and umutual2b), but
together they are conflicting due to the use of ans to copy forces back from device to host. The other 2 kernels (induce part) do not touch forces and energies.
2021-09-17 15:24:36 -05:00
d926705950 Short neighbor list for multipole real-space should be built with off2_mpole 2021-09-17 01:32:00 -05:00
003bebd31e Working on the multipole real-space term, not ready yet 2021-09-17 01:19:33 -05:00
6293da7661 Cleaned up a bit 2021-09-16 17:30:56 -05:00
c0b967054e Fixed bugs with zero local atoms (similar to what has been done to PPPM interp) 2021-09-16 17:27:44 -05:00
98c1a0178c Refactored the API so that different off2 values are used for different kernels 2021-09-16 17:14:36 -05:00
a21095fded More cleaning up 2021-09-13 13:47:15 -05:00
76794bef58 Removed some of the debugging stuffs 2021-09-13 01:16:42 -05:00
bc665999d5 Fixed bugs with the umutual2b kernel, now the field and fieldp seems correct 2021-09-13 01:11:03 -05:00
edd76733a1 Working on umutual2b, tdipdip are correct, but incorrect results for field and fieldp 2021-09-12 00:51:48 -05:00
94d6f7219c Attempted to reduce the memory footprint of the per-atom arrays 2021-09-11 11:22:17 -05:00
c765861851 Cleaned up and re-arranged the functions to reflect the order of calling in a time step 2021-09-11 01:00:58 -05:00
7f5a82dc54 Switched to the short neighbor list implementation in the pre-10Feb21 version (the recent version enforces tpa = 1 for short nbor) 2021-09-11 00:34:43 -05:00
4ebe5833d3 Working on short nbor list for the amoeba kernels (based on what has been done with tersoff and ellipsod, nbor dev_packed needs to be allocated properly) 2021-09-10 16:51:16 -05:00
a22923aee2 Added the API for the umutual kernel, needs work for storing the tdiptdip array 2021-09-09 17:22:09 -05:00
b654f293ee Working on the umutual2b kernel, the tdipdip values are computed on the fly for now, maybe a seprate neigh list as in the CPU version will be more efficient 2021-09-09 16:52:27 -05:00
efe0bf593f Adding the umutual2b kernel, need to create another array for tdipdip on the GPU 2021-09-09 15:19:43 -05:00
4a75a9bdd2 Removed dfield0c from ameoba/gpu (no need to override this one) 2021-09-09 14:47:29 -05:00
6f6fd0999c Both udirect2b and polar_real are working correctly on the GPU 2021-09-09 00:57:21 -05:00
8c5a116d30 Made dfield0c work to compute uind and uinp correctly; need to make sure they are correct for polar_real() 2021-09-08 16:43:33 -05:00
1c5d235f12 Working on the field and fieldp values from GPU back to the host for dfield0c 2021-09-07 16:15:08 -05:00
4e346c2de6 Refactored neighbor list builds and per-atom reallocation parts 2021-09-07 13:05:57 -05:00
be5aa46df8 Re-arranged the binsize call from the GPU lib in Atom so that the box bounds and bininv[xyz] are computed on the CPU side intact 2021-09-03 17:32:41 -05:00
8f5f65e68d Declared virtual to relevant functions in PairAmoeba, added the overridden versions in PairAmoebaGPU 2021-09-03 16:42:58 -05:00
7d69a870a4 Reverted the binsize function call from the GPU package in Atom, instead added atom_modify sort with a binsize to ensure matching virial values, enabled the udirect2b kernel, need more work to override dfield0c, and induce() to bypass reverse_comm() for field and fieldp (line amoeba_induce.cpp:111-112) 2021-09-03 13:43:22 -05:00
745c7089f0 Temporarily commented out the section in the Atom class where FixGPU finds the optimal bin size. This section makes ev_tally4() in Angle different from CPU-only runs, even with a single command "package gpu 1" without any gpu pair style. Need more effort to understand why. 2021-09-03 01:00:29 -05:00
7e0c77f1cb Added fallback flags to indicate which terms are ready from the GPU lib 2021-09-01 14:51:36 -05:00
785a794d39 Added and renamed API to make room for additional kernels (udirect2b only computes the field and fieldp, not accumulating forces, energies, nor virials) 2021-09-01 14:37:11 -05:00
07b60827c4 Working on the udirect2b kernel for the induce real space term, need to add the API for the GPU library 2021-09-01 12:30:41 -05:00
5ffae6ed23 Limited to neigh yes for amoeba/gpu for now 2021-08-30 09:14:46 -05:00
03a96521a3 Merge latest chages from branch 'amoeba' into amoeba-gpu 2021-08-26 16:22:28 -05:00
42048ee73f Activated the fix store/state commands in one of the example input scripts 2021-08-26 11:23:21 -05:00
6a998fcb8e Added fix store/state commands to the example input scripts 2021-08-26 11:17:49 -05:00
88f3dd334c Some changes in PPPMGPU due to the API changes in the GridComm class 2021-08-26 09:35:43 -05:00
91317b2879 Added changes to Atom and Device classes for allocation of extra fields and SBBITS15 and NEIGHMASK15 2021-08-26 09:33:20 -05:00
db92844228 Added recent changes to FixGPU to enable newton_pair on 2021-08-25 23:22:23 -05:00
3825fee8e9 Added work on amoeba/gpu, some minor changes to PairAmoeba to allow function overriding in PairAmoebaGPU, added the package AMOEBA to cmake/CMakeLists.txt 2021-08-25 22:57:37 -05:00
7a457c143c Fixing missing template keyword when calling method. 2019-03-28 21:40:23 +00:00
661cfef0fb Merge branch 'master' of https://github.com/lammps/lammps into granular-kokkos 2019-03-28 19:34:17 +00:00
4349750e31 Fixing issue with destructor not verifying if pointer was null. 2019-03-28 19:20:49 +00:00
eb38f7404c Adding fix wall/gran for kokkos. Just hooke/history style for now. 2019-03-28 19:19:50 +00:00
4908f7f93a Fixing issue with FixNeighHistoryKokkos::unpack_exchange_kokkos not considering arbitrary pack sizes. 2019-03-28 19:18:03 +00:00
01399a4f09 Merge tag 'patch_28Feb2019' of https://github.com/lammps/lammps into granular-kokkos
patch 28Feb19
2019-03-15 14:33:50 +00:00
0bf48ac47f Implementing comm exchange on device for fixes. 2018-10-19 17:14:01 +01:00
93f149951e Merge branch 'granular-kokkos' of https://github.com/valleymouth/lammps into granular-kokkos 2018-10-15 15:34:28 +01:00
55cc76bac7 Merge branch 'comm_kokkos' into granular-kokkos 2018-10-15 15:33:59 +01:00
9cc72ab3a0 Implementing FixNeighHistoryKokkos using Kokkos communication. 2018-10-15 15:33:23 +01:00
2931 changed files with 158845 additions and 196347 deletions

8
.github/CODEOWNERS vendored
View File

@ -63,9 +63,11 @@ src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk
src/REPLICA/*_grem.* @dstelter92
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
src/MISC/*_tracker.* @jtclemm
src/MC/fix_gcmc.* @athomps
src/MC/fix_sgcmc.* @athomps
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
# core LAMMPS classes
src/lammps.* @sjplimp
@ -149,12 +151,12 @@ tools/vim/* @hammondkd
unittest/* @akohlmey
# cmake
cmake/* @junghans @rbberger
cmake/* @rbberger
cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey
cmake/Modules/MPI4WIN.cmake @akohlmey
cmake/Modules/OpenCLLoader.cmake @akohlmey
cmake/Modules/Packages/COLVARS.cmake @junghans @rbberger @giacomofiorin
cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167
cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin
cmake/Modules/Packages/KIM.cmake @rbberger @ellio167
cmake/presets/*.cmake @akohlmey
# python

View File

@ -1,6 +1,6 @@
# Contributing to LAMMPS via GitHub
Thank your for considering to contribute to the LAMMPS software project.
Thank you for considering to contribute to the LAMMPS software project.
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.

View File

@ -49,7 +49,9 @@ jobs:
shell: bash
working-directory: build
run: |
cmake -C ../cmake/presets/most.cmake ../cmake
cmake -C ../cmake/presets/most.cmake \
-D DOWNLOAD_POTENTIALS=off \
../cmake
cmake --build . --parallel 2
- name: Perform CodeQL Analysis

View File

@ -36,6 +36,7 @@ jobs:
nuget install MSMPIsdk
nuget install MSMPIDIST
cmake -C cmake/presets/windows.cmake \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_PYTHON=on \
-D WITH_PNG=off \
-D WITH_JPEG=off \
@ -43,7 +44,7 @@ jobs:
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on \
-D ENABLE_TESTING=on
cmake --build build --config Release
cmake --build build --config Release --parallel 2
- name: Run LAMMPS executable
shell: bash

View File

@ -47,6 +47,7 @@ jobs:
python3 -m pip install pyyaml
cmake -C ../cmake/presets/clang.cmake \
-C ../cmake/presets/most.cmake \
-D DOWNLOAD_POTENTIALS=off \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D ENABLE_TESTING=on \

5
.gitignore vendored
View File

@ -55,3 +55,8 @@ out/RelWithDebInfo
out/Release
out/x86
out/x64
src/Makefile.package-e
src/Makefile.package.settings-e
/cmake/build/x64-Debug-Clang
/install/x64-GUI-MSVC
/install

View File

@ -30,18 +30,23 @@ for unicode characters and only all-ASCII source code is accepted.
# Version Updates
LAMMPS follows continuous release development model. We aim to keep to
keep the development version (develop branch) always fully functional
and employ a variety of automatic testing procedures to detect failures
of existing functionality from adding or modifying features. Most of
those tests are run on pull requests *before* merging to the development
branch. The develop branch is protected, so all changes *must* be
submitted as a pull request and thus cannot avoid the automated tests.
LAMMPS follows a continuous release development model. We aim to keep
the development version (`develop` branch) always fully functional and
employ a variety of automatic testing procedures to detect failures of
existing functionality from adding or modifying features. Most of those
tests are run on pull requests and must be passed *before* merging to
the `develop` branch. The `develop` branch is protected, so all changes
*must* be submitted as a pull request and thus cannot avoid the
automated tests.
Additional tests are run *after* merging. Before releases are made
*all* tests must have cleared. Then a release tag is applied and the
release branch fast-forwarded to that tag. Bug fixes and updates are
applied to the current development branch and thus will be available in
the next (patch) release. For stable releases, selected bug fixes are
back-ported and occasionally published as update releases. There are
only updates to the latest stable release.
`release` branch is fast-forwarded to that tag. This is referred to to
as a "feature release". Bug fixes and updates are applied first to the
`develop` branch. Later, they appear in the `release` branch when the
next patch release occurs. For stable releases, backported bug fixes
and infrastructure updates are first applied to the `maintenance` branch
and then merged to `stable` and published as "updates". For a new
stable release the `stable` branch is updated to the corresponding state
of the `release` branch and a new stable tag is applied in addition to
the release tag.

View File

@ -1,25 +1,25 @@
# FENE beadspring benchmark
units lj
atom_style bond
units lj
atom_style bond
special_bonds fene
read_data data.chain
read_data data.chain
neighbor 0.4 bin
neigh_modify every 1 delay 1
neighbor 0.4 bin
neigh_modify every 1 delay 1
bond_style fene
bond_coeff 1 30.0 1.5 1.0 1.0
bond_coeff 1 30.0 1.5 1.0 1.0
pair_style lj/cut 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 1.12
pair_style lj/cut 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 1.12
fix 1 all nve
fix 2 all langevin 1.0 1.0 10.0 904297
fix 1 all nve
fix 2 all langevin 1.0 1.0 10.0 904297
thermo 100
timestep 0.012
timestep 0.012
run 100
run 100

View File

@ -1,32 +1,32 @@
# FENE beadspring benchmark
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
units lj
atom_style bond
atom_modify map hash
units lj
atom_style bond
atom_modify map hash
special_bonds fene
read_data data.chain
read_data data.chain
replicate $x $y $z
replicate $x $y $z
neighbor 0.4 bin
neigh_modify every 1 delay 1
neighbor 0.4 bin
neigh_modify every 1 delay 1
bond_style fene
bond_coeff 1 30.0 1.5 1.0 1.0
bond_coeff 1 30.0 1.5 1.0 1.0
pair_style lj/cut 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 1.12
pair_style lj/cut 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 1.12
fix 1 all nve
fix 2 all langevin 1.0 1.0 10.0 904297
fix 1 all nve
fix 2 all langevin 1.0 1.0 10.0 904297
thermo 100
timestep 0.012
timestep 0.012
run 100
run 100

View File

@ -1,33 +1,33 @@
# LAMMPS benchmark of granular flow
# chute flow of 32000 atoms with frozen base at 26 degrees
units lj
atom_style sphere
boundary p p fs
newton off
comm_modify vel yes
units lj
atom_style sphere
boundary p p fs
newton off
comm_modify vel yes
read_data data.chute
read_data data.chute
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
pair_coeff * *
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
pair_coeff * *
neighbor 0.1 bin
neigh_modify every 1 delay 0
neighbor 0.1 bin
neigh_modify every 1 delay 0
timestep 0.0001
timestep 0.0001
group bottom type 2
group active subtract all bottom
neigh_modify exclude group bottom bottom
group bottom type 2
group active subtract all bottom
neigh_modify exclude group bottom bottom
fix 1 all gravity 1.0 chute 26.0
fix 2 bottom freeze
fix 3 active nve/sphere
fix 1 all gravity 1.0 chute 26.0
fix 2 bottom freeze
fix 3 active nve/sphere
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo_modify norm no
thermo 100
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo_modify norm no
thermo 100
run 100
run 100

View File

@ -1,38 +1,38 @@
# LAMMPS benchmark of granular flow
# chute flow of 32000 atoms with frozen base at 26 degrees
variable x index 1
variable y index 1
variable x index 1
variable y index 1
units lj
atom_style sphere
boundary p p fs
newton off
comm_modify vel yes
units lj
atom_style sphere
boundary p p fs
newton off
comm_modify vel yes
read_data data.chute
read_data data.chute
replicate $x $y 1
replicate $x $y 1
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
pair_coeff * *
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
pair_coeff * *
neighbor 0.1 bin
neigh_modify every 1 delay 0
neighbor 0.1 bin
neigh_modify every 1 delay 0
timestep 0.0001
timestep 0.0001
group bottom type 2
group active subtract all bottom
neigh_modify exclude group bottom bottom
group bottom type 2
group active subtract all bottom
neigh_modify exclude group bottom bottom
fix 1 all gravity 1.0 chute 26.0
fix 2 bottom freeze
fix 3 active nve/sphere
fix 1 all gravity 1.0 chute 26.0
fix 2 bottom freeze
fix 3 active nve/sphere
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo_modify norm no
thermo 100
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo_modify norm no
thermo 100
run 100
run 100

View File

@ -1,32 +1,32 @@
# bulk Cu lattice
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
units metal
atom_style atomic
units metal
atom_style atomic
lattice fcc 3.615
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc 3.615
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
pair_style eam
pair_coeff 1 1 Cu_u3.eam
pair_style eam
pair_coeff 1 1 Cu_u3.eam
velocity all create 1600.0 376847 loop geom
velocity all create 1600.0 376847 loop geom
neighbor 1.0 bin
neighbor 1.0 bin
neigh_modify every 1 delay 5 check yes
fix 1 all nve
fix 1 all nve
timestep 0.005
thermo 50
timestep 0.005
thermo 50
run 100
run 100

View File

@ -1,30 +1,30 @@
# 3d Lennard-Jones melt
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
units lj
atom_style atomic
units lj
atom_style atomic
lattice fcc 0.8442
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
mass 1 1.0
lattice fcc 0.8442
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 1.44 87287 loop geom
velocity all create 1.44 87287 loop geom
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
neighbor 0.3 bin
neigh_modify delay 0 every 20 check no
fix 1 all nve
fix 1 all nve
run 100
run 100

View File

@ -1,27 +1,27 @@
# Rhodopsin model
units real
neigh_modify delay 5 every 1
units real
neigh_modify delay 5 every 1
atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic
pair_style lj/charmm/coul/long 8.0 10.0
pair_modify mix arithmetic
kspace_style pppm 1e-4
atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic
pair_style lj/charmm/coul/long 8.0 10.0
pair_modify mix arithmetic
kspace_style pppm 1e-4
read_data data.rhodo
fix 1 all shake 0.0001 5 0 m 1.0 a 232
fix 2 all npt temp 300.0 300.0 100.0 &
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
special_bonds charmm
thermo 50
thermo_style multi
thermo_style multi
timestep 2.0
run 100
run 100

View File

@ -1,34 +1,34 @@
# Rhodopsin model
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
units real
neigh_modify delay 5 every 1
units real
neigh_modify delay 5 every 1
atom_style full
atom_modify map hash
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic
pair_style lj/charmm/coul/long 8.0 10.0
pair_modify mix arithmetic
kspace_style pppm 1e-4
atom_style full
atom_modify map hash
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic
pair_style lj/charmm/coul/long 8.0 10.0
pair_modify mix arithmetic
kspace_style pppm 1e-4
read_data data.rhodo
replicate $x $y $z
replicate $x $y $z
fix 1 all shake 0.0001 5 0 m 1.0 a 232
fix 2 all npt temp 300.0 300.0 100.0 &
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
special_bonds charmm
thermo 50
thermo_style multi
thermo_style multi
timestep 2.0
run 100
run 100

View File

@ -1,615 +0,0 @@
cmake_minimum_required(VERSION 3.10)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
if(CMAKE_EXECUTABLE_SUFFIX)
set(CMAKE_EXECUTABLE_SUFFIX_TMP ${CMAKE_EXECUTABLE_SUFFIX})
endif()
project(libjpeg-turbo C)
set(VERSION 2.1.3)
set(COPYRIGHT_YEAR "1991-2022")
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
list(GET VERSION_TRIPLET 2 VERSION_REVISION)
function(pad_number NUMBER OUTPUT_LEN)
string(LENGTH "${${NUMBER}}" INPUT_LEN)
if(INPUT_LEN LESS OUTPUT_LEN)
math(EXPR ZEROES "${OUTPUT_LEN} - ${INPUT_LEN} - 1")
set(NUM ${${NUMBER}})
foreach(C RANGE ${ZEROES})
set(NUM "0${NUM}")
endforeach()
set(${NUMBER} ${NUM} PARENT_SCOPE)
endif()
endfunction()
pad_number(VERSION_MINOR 3)
pad_number(VERSION_REVISION 3)
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})
# CMake 3.14 and later sets CMAKE_MACOSX_BUNDLE to TRUE by default when
# CMAKE_SYSTEM_NAME is iOS, tvOS, or watchOS, which breaks the libjpeg-turbo
# build. (Specifically, when CMAKE_MACOSX_BUNDLE is TRUE, executables for
# Apple platforms are built as application bundles, which causes CMake to
# complain that our install() directives for executables do not specify a
# BUNDLE DESTINATION. Even if CMake did not complain, building executables as
# application bundles would break our iOS packages.)
set(CMAKE_MACOSX_BUNDLE FALSE)
string(TIMESTAMP DEFAULT_BUILD "%Y%m%d")
set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})")
# NOTE: On Windows, this does nothing except when using MinGW or Cygwin.
# CMAKE_BUILD_TYPE has no meaning in Visual Studio, and it always defaults to
# Debug when using NMake.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
include(cmakescripts/PackageInfo.cmake)
# Detect CPU type and whether we're building 64-bit or 32-bit code
math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8")
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC)
set(COUNT 1)
foreach(ARCH ${CMAKE_OSX_ARCHITECTURES})
if(COUNT GREATER 1)
message(FATAL_ERROR "The libjpeg-turbo build system does not support multiple values in CMAKE_OSX_ARCHITECTURES.")
endif()
math(EXPR COUNT "${COUNT}+1")
endforeach()
if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "amd64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i[0-9]86" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "ia32")
if(BITS EQUAL 64 OR CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(CPU_TYPE x86_64)
else()
set(CPU_TYPE i386)
endif()
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ${CPU_TYPE})
set(CMAKE_SYSTEM_PROCESSOR ${CPU_TYPE})
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "aarch64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^arm")
if(BITS EQUAL 64)
set(CPU_TYPE arm64)
else()
set(CPU_TYPE arm)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^ppc" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^powerpc")
set(CPU_TYPE powerpc)
else()
set(CPU_TYPE ${CMAKE_SYSTEM_PROCESSOR_LC})
endif()
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR
CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR
CMAKE_OSX_ARCHITECTURES MATCHES "i386")
set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES})
endif()
if(CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
set(CPU_TYPE powerpc)
endif()
if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64")
set(CPU_TYPE arm64)
endif()
message(STATUS "${BITS}-bit build (${CPU_TYPE})")
macro(report_directory var)
if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}}")
else()
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}} (${CMAKE_INSTALL_FULL_${var}})")
endif()
mark_as_advanced(CLEAR CMAKE_INSTALL_${var})
endmacro()
set(DIRLIST "BINDIR;DATAROOTDIR;DOCDIR;INCLUDEDIR;LIBDIR")
if(UNIX)
list(APPEND DIRLIST "MANDIR")
endif()
foreach(dir ${DIRLIST})
report_directory(${dir})
endforeach()
###############################################################################
# CONFIGURATION OPTIONS
###############################################################################
macro(boolean_number var)
if(${var})
set(${var} 1 ${ARGN})
else()
set(${var} 0 ${ARGN})
endif()
endmacro()
option(ENABLE_SHARED "Build shared libraries" FALSE)
boolean_number(ENABLE_SHARED)
option(ENABLE_STATIC "Build static libraries" TRUE)
boolean_number(ENABLE_STATIC)
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
boolean_number(REQUIRE_SIMD)
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
boolean_number(WITH_12BIT)
option(WITH_ARITH_DEC "Include arithmetic decoding support when emulating the libjpeg v6b API/ABI" TRUE)
boolean_number(WITH_ARITH_DEC)
option(WITH_ARITH_ENC "Include arithmetic encoding support when emulating the libjpeg v6b API/ABI" TRUE)
boolean_number(WITH_ARITH_ENC)
if(CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(WITH_JAVA 0)
else()
option(WITH_JAVA "Build Java wrapper for the TurboJPEG API library (implies ENABLE_SHARED=1)" FALSE)
boolean_number(WITH_JAVA)
endif()
option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
boolean_number(WITH_JPEG7)
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
boolean_number(WITH_JPEG8)
option(WITH_MEM_SRCDST "Include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI" TRUE)
boolean_number(WITH_MEM_SRCDST)
option(WITH_SIMD "Include SIMD extensions, if available for this platform" FALSE)
boolean_number(WITH_SIMD)
option(WITH_TURBOJPEG "Include the TurboJPEG API library and associated test programs" FALSE)
boolean_number(WITH_TURBOJPEG)
option(WITH_FUZZ "Build fuzz targets" FALSE)
macro(report_option var desc)
if(${var})
message(STATUS "${desc} enabled (${var} = ${${var}})")
else()
message(STATUS "${desc} disabled (${var} = ${${var}})")
endif()
endmacro()
if(WITH_JAVA)
set(ENABLE_SHARED 1)
endif()
# Explicitly setting CMAKE_POSITION_INDEPENDENT_CODE=FALSE disables PIC for all
# targets, which will cause the shared library builds to fail. Thus, if shared
# libraries are enabled and CMAKE_POSITION_INDEPENDENT_CODE is explicitly set
# to FALSE, we need to unset it, thus restoring the default behavior
# (automatically using PIC for shared library targets.)
if(DEFINED CMAKE_POSITION_INDEPENDENT_CODE AND
NOT CMAKE_POSITION_INDEPENDENT_CODE AND ENABLE_SHARED)
unset(CMAKE_POSITION_INDEPENDENT_CODE CACHE)
endif()
report_option(ENABLE_SHARED "Shared libraries")
report_option(ENABLE_STATIC "Static libraries")
if(ENABLE_SHARED)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
if(WITH_JPEG8 OR WITH_JPEG7)
set(WITH_ARITH_ENC 1)
set(WITH_ARITH_DEC 1)
endif()
if(WITH_JPEG8)
set(WITH_MEM_SRCDST 0)
endif()
if(WITH_12BIT)
set(WITH_ARITH_DEC 0)
set(WITH_ARITH_ENC 0)
set(WITH_JAVA 0)
set(WITH_SIMD 0)
set(WITH_TURBOJPEG 0)
set(BITS_IN_JSAMPLE 12)
else()
set(BITS_IN_JSAMPLE 8)
endif()
report_option(WITH_12BIT "12-bit JPEG support")
if(WITH_ARITH_DEC)
set(D_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_DEC "Arithmetic decoding support")
endif()
if(WITH_ARITH_ENC)
set(C_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_ENC "Arithmetic encoding support")
endif()
if(NOT WITH_12BIT)
report_option(WITH_TURBOJPEG "TurboJPEG API library")
report_option(WITH_JAVA "TurboJPEG Java wrapper")
endif()
if(WITH_MEM_SRCDST)
set(MEM_SRCDST_SUPPORTED 1)
set(MEM_SRCDST_FUNCTIONS "global: jpeg_mem_dest; jpeg_mem_src;")
endif()
if(NOT WITH_JPEG8)
report_option(WITH_MEM_SRCDST "In-memory source/destination managers")
endif()
set(SO_AGE 2)
if(WITH_MEM_SRCDST)
set(SO_AGE 3)
endif()
if(WITH_JPEG8)
set(JPEG_LIB_VERSION 80)
elseif(WITH_JPEG7)
set(JPEG_LIB_VERSION 70)
else()
set(JPEG_LIB_VERSION 62)
endif()
math(EXPR JPEG_LIB_VERSION_DIV10 "${JPEG_LIB_VERSION} / 10")
math(EXPR JPEG_LIB_VERSION_MOD10 "${JPEG_LIB_VERSION} % 10")
if(JPEG_LIB_VERSION STREQUAL "62")
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION})
else()
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION_DIV10})
endif()
if(JPEG_LIB_VERSION STREQUAL "80")
set(DEFAULT_SO_MINOR_VERSION 2)
else()
set(DEFAULT_SO_MINOR_VERSION 0)
endif()
# This causes SO_MAJOR_VERSION/SO_MINOR_VERSION to reset to defaults if
# WITH_JPEG7 or WITH_JPEG8 has changed.
if((DEFINED WITH_JPEG7_INT AND NOT WITH_JPEG7 EQUAL WITH_JPEG7_INT) OR
(DEFINED WITH_JPEG8_INT AND NOT WITH_JPEG8 EQUAL WITH_JPEG8_INT))
set(FORCE_SO_VERSION "FORCE")
endif()
set(WITH_JPEG7_INT ${WITH_JPEG7} CACHE INTERNAL "")
set(WITH_JPEG8_INT ${WITH_JPEG8} CACHE INTERNAL "")
set(SO_MAJOR_VERSION ${DEFAULT_SO_MAJOR_VERSION} CACHE STRING
"Major version of the libjpeg API shared library (default: ${DEFAULT_SO_MAJOR_VERSION})"
${FORCE_SO_VERSION})
set(SO_MINOR_VERSION ${DEFAULT_SO_MINOR_VERSION} CACHE STRING
"Minor version of the libjpeg API shared library (default: ${DEFAULT_SO_MINOR_VERSION})"
${FORCE_SO_VERSION})
set(JPEG_LIB_VERSION_DECIMAL "${JPEG_LIB_VERSION_DIV10}.${JPEG_LIB_VERSION_MOD10}")
message(STATUS "Emulating libjpeg API/ABI v${JPEG_LIB_VERSION_DECIMAL} (WITH_JPEG7 = ${WITH_JPEG7}, WITH_JPEG8 = ${WITH_JPEG8})")
message(STATUS "libjpeg API shared library version = ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}")
# Because the TurboJPEG API library uses versioned symbols and changes the
# names of functions whenever they are modified in a backward-incompatible
# manner, it is always backward-ABI-compatible with itself, so the major and
# minor SO versions don't change. However, we increase the middle number (the
# SO "age") whenever functions are added to the API.
set(TURBOJPEG_SO_MAJOR_VERSION 0)
set(TURBOJPEG_SO_AGE 2)
set(TURBOJPEG_SO_VERSION 0.${TURBOJPEG_SO_AGE}.0)
###############################################################################
# COMPILER SETTINGS
###############################################################################
if(MSVC)
option(WITH_CRT_DLL
"Link all ${CMAKE_PROJECT_NAME} libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
FALSE)
if(NOT WITH_CRT_DLL)
# Use the static C library for all build types
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
endif()
endforeach()
endif()
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
# Use the maximum optimization level for release builds
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "-O2")
string(REGEX REPLACE "-O2" "-O3" ${var} "${${var}}")
endif()
endforeach()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
# Use the maximum optimization level for release builds
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "-xO3")
string(REGEX REPLACE "-xO3" "-xO5" ${var} "${${var}}")
endif()
if(${var} MATCHES "-xO2")
string(REGEX REPLACE "-xO2" "-xO5" ${var} "${${var}}")
endif()
endforeach()
endif()
endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
set(EFFECTIVE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message(STATUS "Compiler flags = ${EFFECTIVE_C_FLAGS}")
set(EFFECTIVE_LD_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message(STATUS "Linker flags = ${EFFECTIVE_LD_FLAGS}")
include(CheckCSourceCompiles)
include(CheckIncludeFiles)
include(CheckTypeSize)
check_type_size("size_t" SIZE_T)
check_type_size("unsigned long" UNSIGNED_LONG)
if(SIZE_T EQUAL UNSIGNED_LONG)
check_c_source_compiles("int main(int argc, char **argv) { unsigned long a = argc; return __builtin_ctzl(a); }"
HAVE_BUILTIN_CTZL)
endif()
if(MSVC)
check_include_files("intrin.h" HAVE_INTRIN_H)
endif()
if(UNIX)
if(CMAKE_CROSSCOMPILING)
set(RIGHT_SHIFT_IS_UNSIGNED 0)
else()
include(CheckCSourceRuns)
check_c_source_runs("
#include <stdio.h>
#include <stdlib.h>
int is_shifting_signed (long arg) {
long res = arg >> 4;
if (res == -0x7F7E80CL)
return 1; /* right shift is signed */
/* see if unsigned-shift hack will fix it. */
/* we can't just test exact value since it depends on width of long... */
res |= (~0L) << (32-4);
if (res == -0x7F7E80CL)
return 0; /* right shift is unsigned */
printf(\"Right shift isn't acting as I expect it to.\\\\n\");
printf(\"I fear the JPEG software will not work at all.\\\\n\\\\n\");
return 0; /* try it with unsigned anyway */
}
int main (void) {
exit(is_shifting_signed(-0x7F7E80B1L));
}" RIGHT_SHIFT_IS_UNSIGNED)
endif()
endif()
if(MSVC)
set(INLINE_OPTIONS "__inline;inline")
else()
set(INLINE_OPTIONS "__inline__;inline")
endif()
option(FORCE_INLINE "Force function inlining" TRUE)
boolean_number(FORCE_INLINE)
if(FORCE_INLINE)
if(MSVC)
list(INSERT INLINE_OPTIONS 0 "__forceinline")
else()
list(INSERT INLINE_OPTIONS 0 "inline __attribute__((always_inline))")
list(INSERT INLINE_OPTIONS 0 "__inline__ __attribute__((always_inline))")
endif()
endif()
foreach(inline ${INLINE_OPTIONS})
check_c_source_compiles("${inline} static int foo(void) { return 0; } int main(void) { return foo(); }"
INLINE_WORKS)
if(INLINE_WORKS)
set(INLINE ${inline})
break()
endif()
endforeach()
if(NOT INLINE_WORKS)
message(FATAL_ERROR "Could not determine how to inline functions.")
endif()
message(STATUS "INLINE = ${INLINE} (FORCE_INLINE = ${FORCE_INLINE})")
if(WITH_TURBOJPEG)
if(MSVC)
set(THREAD_LOCAL "__declspec(thread)")
else()
set(THREAD_LOCAL "__thread")
endif()
check_c_source_compiles("${THREAD_LOCAL} int i; int main(void) { i = 0; return i; }" HAVE_THREAD_LOCAL)
if(HAVE_THREAD_LOCAL)
message(STATUS "THREAD_LOCAL = ${THREAD_LOCAL}")
else()
message(WARNING "Thread-local storage is not available. The TurboJPEG API library's global error handler will not be thread-safe.")
unset(THREAD_LOCAL)
endif()
endif()
if(UNIX AND NOT APPLE)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map "VERS_1 { global: *; };")
set(CMAKE_REQUIRED_FLAGS
"-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_VERSION_SCRIPT)
message(STATUS "Linker supports GNU-style version scripts")
set(MAPFLAG "-Wl,--version-script,")
set(TJMAPFLAG "-Wl,--version-script,")
else()
message(STATUS "Linker does not support GNU-style version scripts")
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# The Solaris linker doesn't like our version script for the libjpeg API
# library, but the version script for the TurboJPEG API library should
# still work.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map
"VERS_1 { global: foo; local: *; }; VERS_2 { global: foo2; } VERS_1;")
set(CMAKE_REQUIRED_FLAGS "-Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/conftest.map -shared")
check_c_source_compiles("int foo() { return 0; } int foo2() { return 2; }"
HAVE_MAPFILE)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_MAPFILE)
message(STATUS "Linker supports mapfiles")
set(TJMAPFLAG "-Wl,-M,")
else()
message(STATUS "Linker does not support mapfiles")
endif()
endif()
endif()
endif()
# Generate files
if(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win/jconfig.h.in jconfig.h)
else()
configure_file(jconfig.h.in jconfig.h)
endif()
configure_file(jconfigint.h.in jconfigint.h)
configure_file(jversion.h.in jversion.h)
if(UNIX)
configure_file(libjpeg.map.in libjpeg.map)
endif()
# Include directories and compiler definitions
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
###############################################################################
# TARGETS
###############################################################################
if(CMAKE_EXECUTABLE_SUFFIX_TMP)
set(CMAKE_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX_TMP})
endif()
message(STATUS "CMAKE_EXECUTABLE_SUFFIX = ${CMAKE_EXECUTABLE_SUFFIX}")
set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c jdinput.c
jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c
jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c
jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
endif()
if(WITH_ARITH_ENC)
set(JPEG_SOURCES ${JPEG_SOURCES} jcarith.c)
endif()
if(WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
endif()
if(WITH_SIMD)
add_subdirectory(simd)
if(NEON_INTRINSICS)
add_definitions(-DNEON_INTRINSICS)
endif()
elseif(NOT WITH_12BIT)
message(STATUS "SIMD extensions: None (WITH_SIMD = ${WITH_SIMD})")
endif()
if(WITH_SIMD)
message(STATUS "SIMD extensions: ${CPU_TYPE} (WITH_SIMD = ${WITH_SIMD})")
if(MSVC_IDE OR XCODE)
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
endif()
else()
add_library(simd OBJECT jsimd_none.c)
if(NOT WIN32 AND (CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED))
set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)
endif()
endif()
if(WITH_JAVA)
add_subdirectory(java)
endif()
if(ENABLE_SHARED)
add_subdirectory(sharedlib)
endif()
if(ENABLE_STATIC)
add_library(jpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
${SIMD_OBJS})
if(NOT MSVC)
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
endif()
endif()
if(WITH_TURBOJPEG)
if(ENABLE_SHARED)
set(TURBOJPEG_SOURCES ${JPEG_SOURCES} $<TARGET_OBJECTS:simd> ${SIMD_OBJS}
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c rdppm.c
wrbmp.c wrppm.c)
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile)
if(WITH_JAVA)
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile.jni)
endif()
if(MSVC)
configure_file(${CMAKE_SOURCE_DIR}/win/turbojpeg.rc.in
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES}
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
endif()
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
set_property(TARGET turbojpeg PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
if(WIN32)
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
endif()
if(MINGW)
set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at)
endif()
if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4))
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG)
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
endif()
set_target_properties(turbojpeg PROPERTIES MACOSX_RPATH 1)
endif()
set_target_properties(turbojpeg PROPERTIES
SOVERSION ${TURBOJPEG_SO_MAJOR_VERSION} VERSION ${TURBOJPEG_SO_VERSION})
if(TJMAPFLAG)
set_target_properties(turbojpeg PROPERTIES
LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}")
endif()
endif()
if(ENABLE_STATIC)
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
${SIMD_OBJS} turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c
rdppm.c wrbmp.c wrppm.c)
set_property(TARGET turbojpeg-static PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
if(NOT MSVC)
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
endif()
endif()
endif()
if(WIN32)
set(USE_SETMODE "-DUSE_SETMODE")
endif()
if(WITH_12BIT)
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
else()
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif()

View File

@ -1,741 +0,0 @@
# CMakeLists.txt
# Copyright (C) 2018 Cosmin Truta
# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
# Written by Christian Ehrlicher, 2007
# Revised by Roger Lowman, 2009-2010
# Revised by Clifford Yapp, 2011-2012,2017
# Revised by Roger Leigh, 2016
# Revised by Andreas Franek, 2016
# Revised by Sam Serrels, 2017
# Revised by Vadim Barkov, 2017
# Revised by Vicky Pfau, 2018
# Revised by Cameron Cawley, 2018
# Revised by Cosmin Truta, 2018
# Revised by Kyle Bentley, 2018
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
cmake_minimum_required(VERSION 3.10)
cmake_policy(VERSION 3.1)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(libpng C ASM)
enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 37)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
include(GNUInstallDirs)
# needed packages
# Allow users to specify location of Zlib.
# Useful if zlib is being built alongside this as a sub-project.
option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" ON)
if(NOT PNG_BUILD_ZLIB)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
find_library(M_LIBRARY m)
else()
# libm is not needed and/or not available
set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
option(PNG_SHARED "Build shared lib" OFF)
option(PNG_STATIC "Build static lib" ON)
option(PNG_TESTS "Build libpng tests" OFF)
# Many more configuration options could be added here
option(PNG_FRAMEWORK "Build OS X framework" OFF)
option(PNG_DEBUG "Build with debug output" OFF)
option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" OFF)
set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
if(PNG_HARDWARE_OPTIMIZATIONS)
# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
check: (default) use internal checking code;
off: disable the optimizations;
on: turn on unconditionally.")
set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
${PNG_ARM_NEON_POSSIBLE_VALUES})
list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_ARM_NEON} STREQUAL "off")
set(libpng_arm_sources
arm/arm_init.c
arm/filter_neon.S
arm/filter_neon_intrinsics.c
arm/palette_neon_intrinsics.c)
if(${PNG_ARM_NEON} STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(${PNG_ARM_NEON} STREQUAL "check")
add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
endif()
else()
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
endif()
# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
off: disable the optimizations.")
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off")
set(libpng_powerpc_sources
powerpc/powerpc_init.c
powerpc/filter_vsx_intrinsics.c)
if(${PNG_POWERPC_VSX} STREQUAL "on")
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
endif()
else()
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
endif()
endif()
# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
off: disable the optimizations")
set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
${PNG_INTEL_SSE_POSSIBLE_VALUES})
list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off")
set(libpng_intel_sources
intel/intel_init.c
intel/filter_sse2_intrinsics.c)
if(${PNG_INTEL_SSE} STREQUAL "on")
add_definitions(-DPNG_INTEL_SSE_OPT=1)
endif()
else()
add_definitions(-DPNG_INTEL_SSE_OPT=0)
endif()
endif()
# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
off: disable the optimizations")
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
${PNG_MIPS_MSA_POSSIBLE_VALUES})
list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off")
set(libpng_mips_sources
mips/mips_init.c
mips/filter_msa_intrinsics.c)
if(${PNG_MIPS_MSA} STREQUAL "on")
add_definitions(-DPNG_MIPS_MSA_OPT=2)
endif()
else()
add_definitions(-DPNG_MIPS_MSA_OPT=0)
endif()
endif()
else(PNG_HARDWARE_OPTIMIZATIONS)
# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
endif()
# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
add_definitions(-DPNG_INTEL_SSE_OPT=0)
endif()
# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
add_definitions(-DPNG_MIPS_MSA_OPT=0)
endif()
endif(PNG_HARDWARE_OPTIMIZATIONS)
# SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
include(CheckCSourceCompiles)
option(ld-version-script "Enable linker version script" ON)
if(ld-version-script AND NOT APPLE)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
global: sym;
local: *;
};
VERS_2 {
global: sym2;
main;
} VERS_1;
")
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'")
check_c_source_compiles("void sym(void) {}
void sym2(void) {}
int main(void) {return 0;}
" HAVE_LD_VERSION_SCRIPT)
if(NOT HAVE_LD_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("void sym(void) {}
void sym2(void) {}
int main(void) {return 0;}
" HAVE_SOLARIS_LD_VERSION_SCRIPT)
endif()
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
endif()
# Find symbol prefix. Likely obsolete and unnecessary with recent
# toolchains (it's not done in many other projects).
function(symbol_prefix)
set(SYMBOL_PREFIX)
execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-"
INPUT_FILE /dev/null
OUTPUT_VARIABLE OUT
RESULT_VARIABLE STATUS)
if(CPP_FAIL)
message(WARNING "Failed to run the C preprocessor")
endif()
string(REPLACE "\n" ";" OUT "${OUT}")
foreach(line ${OUT})
string(REGEX MATCH "^PREFIX=" found_match "${line}")
if(found_match)
string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}")
string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}")
if(found_match)
string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}")
endif()
set(SYMBOL_PREFIX "${prefix}")
endif()
endforeach()
message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}")
set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE)
endfunction()
if(UNIX)
symbol_prefix()
endif()
find_program(AWK NAMES gawk awk)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT AWK OR ANDROID)
# No awk available to generate sources; use pre-built pnglibconf.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
add_custom_target(genfiles) # Dummy
else()
include(CMakeParseArguments)
# Generate .chk from .out with awk
# generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_chk)
set(options)
set(oneValueArgs INPUT OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GC_INPUT)
message(FATAL_ERROR "generate_chk: Missing INPUT argument")
endif()
if(NOT _GC_OUTPUT)
message(FATAL_ERROR "generate_chk: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${_GC_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DINPUT=${_GC_INPUT}"
"-DOUTPUT=${_GC_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake"
DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Generate .out from .c with awk
# generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_out)
set(options)
set(oneValueArgs INPUT OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GO_INPUT)
message(FATAL_ERROR "generate_out: Missing INPUT argument")
endif()
if(NOT _GO_OUTPUT)
message(FATAL_ERROR "generate_out: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${_GO_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DINPUT=${_GO_INPUT}"
"-DOUTPUT=${_GO_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake"
DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Generate specific source file with awk
# generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_source)
set(options)
set(oneValueArgs OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GSO_OUTPUT)
message(FATAL_ERROR "generate_source: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DOUTPUT=${_GSO_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
DEPENDS ${_GSO_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Copy file
function(generate_copy source destination)
add_custom_command(OUTPUT "${destination}"
COMMAND "${CMAKE_COMMAND}" -E remove "${destination}"
COMMAND "${CMAKE_COMMAND}" -E copy "${source}"
"${destination}"
DEPENDS "${source}")
endfunction()
# Generate scripts/pnglibconf.h
generate_source(OUTPUT "scripts/pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
# Generate pnglibconf.c
generate_source(OUTPUT "pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
if(PNG_PREFIX)
set(PNGLIBCONF_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst")
set(PNGPREFIX_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
endif()
generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
# Generate pnglibconf.h
generate_source(OUTPUT "pnglibconf.h"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
${PNGLIBCONF_H_EXTRA_DEPENDS})
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
# Generate pngprefix.h
generate_source(OUTPUT "pngprefix.h"
DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS})
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def")
add_custom_target(symbol-check DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
add_custom_target("genprebuilt"
COMMAND "${CMAKE_COMMAND}"
"-DOUTPUT=scripts/pnglibconf.h.prebuilt"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
# A single target handles generation of all generated files. If
# they are depended upon separately by multiple targets, this
# confuses parallel make (it would require a separate top-level
# target for each file to track the dependencies properly).
add_custom_target(genfiles DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
"${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
endif(NOT AWK OR ANDROID)
# OUR SOURCES
set(libpng_public_hdrs
png.h
pngconf.h
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
)
set(libpng_private_hdrs
pngpriv.h
pngdebug.h
pnginfo.h
pngstruct.h
)
if(AWK AND NOT ANDROID)
list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
endif()
set(libpng_sources
${libpng_public_hdrs}
${libpng_private_hdrs}
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
${libpng_arm_sources}
${libpng_intel_sources}
${libpng_mips_sources}
${libpng_powerpc_sources}
)
set(pngtest_sources
pngtest.c
)
set(pngvalid_sources
contrib/libtests/pngvalid.c
)
set(pngstest_sources
contrib/libtests/pngstest.c
)
set(pngunknown_sources
contrib/libtests/pngunknown.c
)
set(pngimage_sources
contrib/libtests/pngimage.c
)
set(pngfix_sources
contrib/tools/pngfix.c
)
set(png_fix_itxt_sources
contrib/tools/png-fix-itxt.c
)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif()
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif()
# NOW BUILD OUR TARGET
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
unset(PNG_LIB_TARGETS)
if(PNG_STATIC)
# does not work without changing name
set(PNG_LIB_NAME_STATIC png_static)
add_library(png_static STATIC ${libpng_sources})
add_dependencies(png_static genfiles)
# MSVC doesn't use a different file extension for shared vs. static
# libs. We are able to change OUTPUT_NAME to remove the _static
# for all other platforms.
if(NOT MSVC)
set_target_properties(png_static PROPERTIES
OUTPUT_NAME "${PNG_LIB_NAME}"
CLEAN_DIRECT_OUTPUT 1)
else()
set_target_properties(png_static PROPERTIES
OUTPUT_NAME "${PNG_LIB_NAME}_static"
CLEAN_DIRECT_OUTPUT 1)
endif()
list(APPEND PNG_LIB_TARGETS png_static)
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(png_static PROPERTIES PREFIX "lib")
endif()
target_link_libraries(png_static ${M_LIBRARY})
endif()
if(NOT PNG_LIB_TARGETS)
message(SEND_ERROR
"No library variant selected to build. "
"Please enable at least one of the following options: "
"PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK")
endif()
# Set a variable with CMake code which:
# Creates a symlink from src to dest (if possible) or alternatively
# copies if different.
include(CMakeParseArguments)
function(create_symlink DEST_FILE)
cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN})
if(NOT S_TARGET AND NOT S_FILE)
message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument")
endif()
if(S_TARGET AND S_FILE)
message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.")
endif()
if(S_FILE)
# If we don't need to symlink something that's coming from a build target,
# we can go ahead and symlink/copy at configure time.
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
else()
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()
endif()
if(S_TARGET)
# We need to use generator expressions, which can be a bit tricky, so for
# simplicity make the symlink a POST_BUILD step and use the TARGET
# signature of add_custom_command.
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
add_custom_command(TARGET ${S_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
else()
add_custom_command(TARGET ${S_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E create_symlink $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
endif()
endif()
endfunction()
# Create source generation scripts.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY)
# libpng is a library so default to 'lib'
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
endif()
# CREATE PKGCONFIG FILES
# We use the same files like ./configure, so we have to set its vars.
# Only do this on Windows for Cygwin - the files don't make much sense outside
# of a UNIX look-alike.
if(NOT WIN32 OR CYGWIN OR MINGW)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
create_symlink(libpng-config FILE ${PNGLIB_NAME}-config)
endif()
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.37
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
install(TARGETS ${PNG_LIB_TARGETS}
EXPORT libpng
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(PNG_SHARED)
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(CYGWIN OR MINGW)
create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT WIN32)
create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
if(PNG_STATIC)
if(NOT WIN32 OR CYGWIN OR MINGW)
create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
install(FILES ${libpng_public_hdrs} DESTINATION include)
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
if(NOT WIN32 OR CYGWIN OR MINGW)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
endif()
endif()
if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
install(TARGETS ${PNG_BIN_TARGETS}
RUNTIME DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
# Install man pages
if(NOT PNG_MAN_DIR)
set(PNG_MAN_DIR "share/man")
endif()
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
# Install pkg-config files
if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
endif()
# Create an export file that CMake users can include() to import our targets.
if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
# what's with libpng-manual.txt and all the extra files?
# UNINSTALL
# do we need this?
# DIST
# do we need this?
# to create msvc import lib for mingw compiled shared lib
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86

View File

@ -1,8 +1,10 @@
# -*- CMake -*- master configuration file for building LAMMPS
########################################
# CMake build system
# This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10)
########################################
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
@ -11,16 +13,17 @@ endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 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()
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
########################################
# Use CONFIGURE_DEPENDS as option for file(GLOB...) when available
if(CMAKE_VERSION VERSION_LESS 3.12)
unset(CONFIGURE_DEPENDS)
else()
set(CONFIGURE_DEPENDS CONFIGURE_DEPENDS)
endif()
########################################
project(lammps CXX)
@ -161,8 +164,8 @@ endif()
########################################################################
# User input options #
########################################################################
# set path to python interpreter and thus enforcing python version if
# when in a virtual environment and PYTHON_EXECUTABLE is not set on command line
# set path to python interpreter and thus enforcing python version when
# in a virtual environment and PYTHON_EXECUTABLE is not set on command line
if(DEFINED ENV{VIRTUAL_ENV} AND NOT PYTHON_EXECUTABLE)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
@ -185,6 +188,7 @@ option(BUILD_SHARED_LIBS "Build shared library" OFF)
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
option(BUILD_LAMMPS_GUI "Build and install the LAMMPS GUI" OFF)
# Support using clang-tidy for C++ files with selected options
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
@ -195,8 +199,8 @@ else()
endif()
include(GNUInstallDirs)
file(GLOB ALL_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp)
file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp)
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
add_library(lammps ${ALL_SOURCES})
@ -250,7 +254,6 @@ set(STANDARD_PACKAGES
KIM
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD
@ -397,6 +400,7 @@ pkg_depends(CG-DNA MOLECULE)
pkg_depends(CG-DNA ASPHERE)
pkg_depends(ELECTRODE KSPACE)
pkg_depends(EXTRA-MOLECULE MOLECULE)
pkg_depends(MESONT MOLECULE)
# detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF)
@ -434,14 +438,14 @@ if(BUILD_OMP)
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
endif()
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_LATTE OR PKG_ELECTRODE)
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
enable_language(C)
if (NOT USE_INTERNAL_LINALG)
find_package(LAPACK)
find_package(BLAS)
endif()
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
file(GLOB LINALG_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
file(GLOB LINALG_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
add_library(linalg STATIC ${LINALG_SOURCES})
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
@ -514,7 +518,7 @@ else()
endif()
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MSCG COMPRESS ML-PACE LEPTON)
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -531,7 +535,10 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine
separate_arguments(CMAKE_TUNE_FLAGS)
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
target_compile_options(lammps PRIVATE ${_FLAG})
target_compile_options(lmp PRIVATE ${_FLAG})
# skip these flags when linking the main executable
if(NOT (("${_FLAG}" STREQUAL "-Xcudafe") OR (("${_FLAG}" STREQUAL "--diag_suppress=unrecognized_pragma"))))
target_compile_options(lmp PRIVATE ${_FLAG})
endif()
endforeach()
########################################################################
# Basic system tests (standard libraries, headers, functions, types) #
@ -559,6 +566,8 @@ RegisterStyles(${LAMMPS_SOURCE_DIR})
########################################################
# Fetch missing external files and archives for packages
########################################################
option(DOWNLOAD_POTENTIALS "Automatically download large potential files" ON)
mark_as_advanced(DOWNLOAD_POTENTIALS)
foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES})
if(PKG_${PKG})
FetchPotentials(${LAMMPS_SOURCE_DIR}/${PKG} ${LAMMPS_POTENTIALS_DIR})
@ -571,8 +580,8 @@ endforeach()
foreach(PKG ${STANDARD_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/[^.]*.h)
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -599,8 +608,8 @@ endforeach()
foreach(PKG ${SUFFIX_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/[^.]*.h)
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -611,18 +620,11 @@ endforeach()
##############################################
# add lib sources of (simple) enabled packages
############################################
foreach(PKG_LIB POEMS ATC AWPMD H5MD MESONT)
foreach(PKG_LIB POEMS ATC AWPMD H5MD)
if(PKG_${PKG_LIB})
string(TOLOWER "${PKG_LIB}" PKG_LIB)
if(PKG_LIB STREQUAL "mesont")
enable_language(Fortran)
file(GLOB_RECURSE ${PKG_LIB}_SOURCES
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.f90)
else()
file(GLOB_RECURSE ${PKG_LIB}_SOURCES
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
endif()
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${CONFIGURE_DEPENDS}
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
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})
@ -791,9 +793,11 @@ include(Tools)
include(Documentation)
###############################################################################
# Install potential and force field files in data directory
# Install bench, potential and force field files in data directory
###############################################################################
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps)
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/lammps)
install(DIRECTORY ${LAMMPS_DIR}/bench DESTINATION ${LAMMPS_INSTALL_DATADIR})
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
if(BUILD_TOOLS)
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
@ -836,9 +840,8 @@ if(BUILD_SHARED_LIBS)
set(LIBLAMMPS_SHARED_BINARY ${MY_BUILD_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
if(Python_EXECUTABLE)
add_custom_target(
install-python ${CMAKE_COMMAND} -E remove_directory build
COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR}
install-python ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR} -v ${LAMMPS_SOURCE_DIR}/version.h
COMMENT "Installing LAMMPS Python module")
else()
add_custom_target(
@ -851,35 +854,6 @@ else()
${CMAKE_COMMAND} -E echo "Must build LAMMPS as a shared library to use the Python module")
endif()
###############################################################################
# Add LAMMPS python module to "install" target. This is taylored for building
# LAMMPS for package managers and with different prefix settings.
# This requires either a shared library or that the PYTHON package is included.
###############################################################################
if(BUILD_SHARED_LIBS OR PKG_PYTHON)
if(CMAKE_VERSION VERSION_LESS 3.12)
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
find_package(PythonInterp) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
else()
# backward compatibility
if(PYTHON_EXECUTABLE)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
find_package(Python COMPONENTS Interpreter)
endif()
if(Python_EXECUTABLE)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/lib)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/src)
file(COPY ${LAMMPS_SOURCE_DIR}/version.h DESTINATION ${CMAKE_BINARY_DIR}/python/src)
file(COPY ${LAMMPS_PYTHON_DIR}/README ${LAMMPS_PYTHON_DIR}/pyproject.toml ${LAMMPS_PYTHON_DIR}/setup.py ${LAMMPS_PYTHON_DIR}/lammps DESTINATION ${CMAKE_BINARY_DIR}/python/lib)
install(CODE "if(\"\$ENV{DESTDIR}\" STREQUAL \"\")\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX})\n else()\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR})\n endif()")
endif()
endif()
include(Testing)
include(CodeCoverage)
include(CodingStandard)
@ -891,6 +865,23 @@ if(ClangFormat_FOUND)
WORKING_DIRECTORY ${LAMMPS_SOURCE_DIR})
endif()
# extract Kokkos compilation settings
get_cmake_property(_allvars VARIABLES)
foreach(_var ${_allvars})
if(${_var})
string(REGEX MATCH "Kokkos_ENABLE_(SERIAL|THREADS|OPENMP|CUDA|HIP|SYCL|OPENMPTARGET|HPX)" _match ${_var})
if(_match)
string(REGEX REPLACE "Kokkos_ENABLE_(OPENMP|SERIAL|CUDA|HIP|SYCL)" "\\1" _match ${_var})
list(APPEND KOKKOS_DEVICE ${_match})
endif()
string(REGEX MATCH "Kokkos_ARCH" _match ${_var})
if(_match)
string(REGEX REPLACE "Kokkos_ARCH_(.*)" "\\1" _match ${_var})
list(APPEND KOKKOS_ARCH ${_match})
endif()
endif()
endforeach()
get_target_property(DEFINES lammps COMPILE_DEFINITIONS)
if(BUILD_IS_MULTI_CONFIG)
set(LAMMPS_BUILD_TYPE "Multi-Config")
@ -899,13 +890,23 @@ else()
endif()
include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
OUTPUT_VARIABLE GIT_DESCRIBE
ERROR_QUIET
WORKING_DIRECTORY ${LAMMPS_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message(STATUS "<<< Build configuration >>>
LAMMPS Version: ${PROJECT_VERSION}
LAMMPS Version: ${PROJECT_VERSION} ${GIT_DESCRIBE}
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
CMake Version: ${CMAKE_VERSION}
Build type: ${LAMMPS_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
endif()
###############################################################################
# Print package summary
###############################################################################
@ -988,6 +989,12 @@ if(PKG_GPU)
endif()
message(STATUS "GPU precision: ${GPU_PREC}")
endif()
if(PKG_KOKKOS)
message(STATUS "Kokkos Devices: ${KOKKOS_DEVICE}")
if(KOKKOS_ARCH)
message(STATUS "Kokkos Architecture: ${KOKKOS_ARCH}")
endif()
endif()
if(PKG_KSPACE)
message(STATUS "<<< FFT settings >>>
-- Primary FFT lib: ${FFT}")
@ -1028,6 +1035,14 @@ endif()
if(BUILD_LAMMPS_SHELL)
message(STATUS "<<< Building LAMMPS Shell >>>")
endif()
if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS GUI >>>")
if(LAMMPS_GUI_USE_PLUGIN)
message(STATUS "Loading LAMMPS library as plugin at run time")
else()
message(STATUS "Linking LAMMPS library at compile time")
endif()
endif()
if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>")
if(ENABLE_COVERAGE)

View File

@ -1,195 +0,0 @@
cmake_minimum_required(VERSION 3.10)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(zlib C)
set(VERSION "1.2.11")
option(ASM686 "Enable building i686 assembly implementation" OFF)
option(AMD64 "Enable building amd64 assembly implementation" OFF)
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stddef.h HAVE_STDDEF_H)
#
# Check to see if we have large file support
#
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# We add these other definitions here because CheckTypeSize.cmake
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif()
if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif()
if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
#
# Check for fseeko
#
check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO)
endif()
#
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
endif()
endif()
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
${ZLIB_PC} @ONLY)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
#============================================================================
# zlib
#============================================================================
set(ZLIB_PUBLIC_HDRS
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
zlib.h
)
set(ZLIB_PRIVATE_HDRS
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zutil.h
)
set(ZLIB_SRCS
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c
)
if(NOT MINGW)
set(ZLIB_DLL_SRCS
win32/zlib1.rc # If present will override custom build rule below.
)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
if(ASM686)
set(ZLIB_ASMS contrib/asm686/match.S)
elseif (AMD64)
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
endif ()
if(ZLIB_ASMS)
add_definitions(-DASMV)
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
endif()
endif()
if(MSVC)
if(ASM686)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx86/inffas32.asm
contrib/masmx86/match686.asm
)
elseif (AMD64)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx64/gvmat64.asm
contrib/masmx64/inffasx64.asm
)
endif()
if(ZLIB_ASMS)
add_definitions(-DASMV -DASMINF)
endif()
endif()
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
if(MINGW)
# This gets us DLL resource information when compiling on MinGW.
if(NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER windres.exe)
endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
COMMAND ${CMAKE_RC_COMPILER}
-D GCC_WINDRES
-I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
endif()

View File

@ -63,6 +63,11 @@
"name": "ENABLE_TESTING",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_LAMMPS_GUI",
"value": "False",
"type": "BOOL"
}
]
},
@ -303,6 +308,54 @@
"type": "STRING"
}
]
},
{
"name": "x64-GUI-MSVC",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}\\build\\${name}",
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake -D QT_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5 -D Qt5_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5",
"buildCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [
{
"name": "BUILD_SHARED_LIBS",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_TOOLS",
"value": "True",
"type": "BOOL"
},
{
"name": "LAMMPS_EXCEPTIONS",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "False",
"type": "BOOL"
},
{
"name": "BUILD_MPI",
"value": "False",
"type": "BOOL"
},
{
"name": "WITH_PNG",
"value": "False",
"type": "BOOL"
},
{
"name": "BUILD_LAMMPS_GUI",
"value": "True",
"type": "BOOL"
}
]
}
]
}

View File

@ -5,6 +5,10 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
set(Python3_VERSION ${PYTHON_VERSION_STRING})
endif()
else()
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.5)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 COMPONENTS Interpreter QUIET)
endif()

View File

@ -0,0 +1,16 @@
if(NOT DEFINED HIP_PATH)
if(NOT DEFINED ENV{HIP_PATH})
message(FATAL_ERROR "HIP support requires HIP_PATH to be defined.\n"
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
else()
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
endif()
endif()
if(NOT DEFINED ROCM_PATH)
if(NOT DEFINED ENV{ROCM_PATH})
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
endif()
endif()
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})

View File

@ -4,20 +4,24 @@
option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
if(BUILD_DOC)
# Sphinx 3.x requires at least Python 3.5
# Current Sphinx versions require at least Python 3.8
if(CMAKE_VERSION VERSION_LESS 3.12)
find_package(PythonInterp 3.5 REQUIRED)
find_package(PythonInterp 3.8 REQUIRED)
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m venv)
else()
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)
if(Python3_VERSION VERSION_LESS 3.5)
message(FATAL_ERROR "Python 3.5 and up is required to build the HTML documentation")
if(Python3_VERSION VERSION_LESS 3.8)
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
endif()
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
endif()
find_package(Doxygen 1.8.10 REQUIRED)
file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
file(GLOB DOC_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
add_custom_command(
@ -56,16 +60,27 @@ if(BUILD_DOC)
)
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")
set(MATHJAX_MD5 "b81661c6e6ba06278e6ae37b30b0c492" CACHE STRING "MD5 checksum of MathJax tarball")
mark_as_advanced(MATHJAX_URL)
GetFallbackURL(MATHJAX_URL MATHJAX_FALLBACK)
# download mathjax distribution and unpack to folder "mathjax"
if(NOT EXISTS ${DOC_BUILD_STATIC_DIR}/mathjax/es5)
file(DOWNLOAD ${MATHJAX_URL}
"${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz"
EXPECTED_MD5 ${MATHJAX_MD5})
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz)
file(MD5 ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz)
endif()
if(NOT "${DL_MD5}" STREQUAL "${MATHJAX_MD5}")
file(DOWNLOAD ${MATHJAX_URL} "${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz" STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_CURRENT_BINARY_DIR}/mathjax.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${MATHJAX_MD5}"))
message(WARNING "Download from primary URL ${MATHJAX_URL} failed\nTrying fallback URL ${MATHJAX_FALLBACK}")
file(DOWNLOAD ${MATHJAX_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${MATHJAX_MD5} SHOW_PROGRESS)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB MATHJAX_VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
file(GLOB MATHJAX_VERSION_DIR ${CONFIGURE_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
endif()

View File

@ -9,8 +9,22 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
get_filename_component(archive ${url} NAME)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/_deps/src)
message(STATUS "Downloading ${url}")
file(DOWNLOAD ${url} ${CMAKE_BINARY_DIR}/_deps/${archive} EXPECTED_HASH MD5=${hash} SHOW_PROGRESS)
if(EXISTS ${CMAKE_BINARY_DIR}/_deps/${archive})
file(MD5 ${CMAKE_BINARY_DIR}/_deps/${archive} DL_MD5)
endif()
if(NOT "${DL_MD5}" STREQUAL "${hash}")
message(STATUS "Downloading ${url}")
file(DOWNLOAD ${url} ${CMAKE_BINARY_DIR}/_deps/${archive} STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/_deps/${archive} DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${hash}"))
set(${target}_URL ${url})
GetFallbackURL(${target}_URL fallback)
message(WARNING "Download from primary URL ${url} failed\nTrying fallback URL ${fallback}")
file(DOWNLOAD ${fallback} ${CMAKE_BINARY_DIR}/_deps/${archive} EXPECTED_HASH MD5=${hash} SHOW_PROGRESS)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/_deps/${archive}")
endif()
message(STATUS "Unpacking and configuring ${archive}")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/_deps/${archive}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/_deps/src)

View File

@ -1,5 +1,7 @@
# Find clang-format
find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-17.0
clang-format-16.0
clang-format-15.0
clang-format-14.0
clang-format-13.0
@ -19,7 +21,7 @@ if(ClangFormat_EXECUTABLE)
OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*")
if(clang_format_version MATCHES "^(Ubuntu |Debian |)clang-format version .*")
# Arch Linux output:
# clang-format version 10.0.0
#
@ -32,9 +34,15 @@ if(ClangFormat_EXECUTABLE)
# Ubuntu 22.04 LTS output:
# Ubuntu clang-format version 14.0.0-1ubuntu1
#
# Debian 11 output:
# Debian clang-format version 11.0.1-2
#
# Debian 12 output:
# Debian clang-format version 14.0.6
#
# Fedora 36 output:
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*"
string(REGEX REPLACE "^(Ubuntu |Debian |)clang-format version ([0-9.]+).*"
"\\2"
ClangFormat_VERSION
"${clang_format_version}")

View File

@ -65,7 +65,7 @@ endfunction(validate_option)
# helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable)
file(GLOB _dirs ${path})
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
set(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>")
foreach(_dir ${_dirs})
@ -88,6 +88,18 @@ function(get_lammps_version version_header variable)
set(${variable} "${date}" PARENT_SCOPE)
endfunction()
# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty
function(GetFallbackURL input output)
string(REPLACE "_URL" "" _tmp ${input})
string(TOLOWER ${_tmp} libname)
string(REGEX REPLACE "^https://.*/([^/]+gz)" "${LAMMPS_THIRDPARTY_URL}/${libname}-\\1" newurl "${${input}}")
if ("${newurl}" STREQUAL "${${input}}")
set(${output} "" PARENT_SCOPE)
else()
set(${output} ${newurl} PARENT_SCOPE)
endif()
endfunction(GetFallbackURL)
#################################################################################
# LAMMPS C++ interface. We only need the header related parts except on windows.
add_library(lammps INTERFACE)

View File

@ -41,7 +41,7 @@ endfunction()
# helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable)
file(GLOB _dirs ${path})
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
set(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>")
foreach(_dir ${_dirs})
@ -80,8 +80,8 @@ endfunction()
function(check_for_autogen_files source_dir)
message(STATUS "Running check for auto-generated files from make-based build system")
file(GLOB SRC_AUTOGEN_FILES ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${source_dir}/packages_*.h)
file(GLOB SRC_AUTOGEN_FILES ${CONFIGURE_DEPENDS} ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
foreach(_SRC ${SRC_AUTOGEN_FILES})
@ -99,8 +99,15 @@ function(check_for_autogen_files source_dir)
endfunction()
macro(pkg_depends PKG1 PKG2)
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
message(FATAL_ERROR "The ${PKG1} package needs LAMMPS to be built with the ${PKG2} package")
if(DEFINED BUILD_${PKG2})
if(PKG_${PKG1} AND NOT BUILD_${PKG2})
message(FATAL_ERROR "The ${PKG1} package needs LAMMPS to be built with -D BUILD_${PKG2}=ON")
endif()
elseif(DEFINED PKG_${PKG2})
if(PKG_${PKG1} AND NOT PKG_${PKG2})
message(WARNING "The ${PKG1} package depends on the ${PKG2} package. Enabling it.")
set(PKG_${PKG2} ON CACHE BOOL "" FORCE)
endif()
endif()
endmacro()
@ -118,34 +125,48 @@ endfunction(GenerateBinaryHeader)
# fetch missing potential files
function(FetchPotentials pkgfolder potfolder)
if(EXISTS "${pkgfolder}/potentials.txt")
file(STRINGS "${pkgfolder}/potentials.txt" linelist REGEX "^[^#].")
foreach(line ${linelist})
string(FIND ${line} " " blank)
math(EXPR plusone "${blank}+1")
string(SUBSTRING ${line} 0 ${blank} pot)
string(SUBSTRING ${line} ${plusone} -1 sum)
if(EXISTS "${LAMMPS_POTENTIALS_DIR}/${pot}")
file(MD5 "${LAMMPS_POTENTIALS_DIR}/${pot}" oldsum)
endif()
if(NOT sum STREQUAL oldsum)
message(STATUS "Downloading external potential ${pot} from ${LAMMPS_POTENTIALS_URL}")
string(MD5 TMP_EXT "${CMAKE_BINARY_DIR}")
file(DOWNLOAD "${LAMMPS_POTENTIALS_URL}/${pot}.${sum}" "${CMAKE_BINARY_DIR}/${pot}.${TMP_EXT}"
EXPECTED_HASH MD5=${sum} SHOW_PROGRESS)
file(COPY "${CMAKE_BINARY_DIR}/${pot}.${TMP_EXT}" DESTINATION "${LAMMPS_POTENTIALS_DIR}")
file(RENAME "${LAMMPS_POTENTIALS_DIR}/${pot}.${TMP_EXT}" "${LAMMPS_POTENTIALS_DIR}/${pot}")
endif()
endforeach()
if(DOWNLOAD_POTENTIALS)
if(EXISTS "${pkgfolder}/potentials.txt")
file(STRINGS "${pkgfolder}/potentials.txt" linelist REGEX "^[^#].")
foreach(line ${linelist})
string(FIND ${line} " " blank)
math(EXPR plusone "${blank}+1")
string(SUBSTRING ${line} 0 ${blank} pot)
string(SUBSTRING ${line} ${plusone} -1 sum)
if(EXISTS "${LAMMPS_POTENTIALS_DIR}/${pot}")
file(MD5 "${LAMMPS_POTENTIALS_DIR}/${pot}" oldsum)
endif()
if(NOT sum STREQUAL oldsum)
message(STATUS "Downloading external potential ${pot} from ${LAMMPS_POTENTIALS_URL}")
string(RANDOM LENGTH 10 TMP_EXT)
file(DOWNLOAD "${LAMMPS_POTENTIALS_URL}/${pot}.${sum}" "${CMAKE_BINARY_DIR}/${pot}.${TMP_EXT}"
EXPECTED_HASH MD5=${sum} SHOW_PROGRESS)
file(COPY "${CMAKE_BINARY_DIR}/${pot}.${TMP_EXT}" DESTINATION "${LAMMPS_POTENTIALS_DIR}")
file(RENAME "${LAMMPS_POTENTIALS_DIR}/${pot}.${TMP_EXT}" "${LAMMPS_POTENTIALS_DIR}/${pot}")
endif()
endforeach()
endif()
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}")
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()
# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty
function(GetFallbackURL input output)
string(REPLACE "_URL" "" _tmp ${input})
string(TOLOWER ${_tmp} libname)
string(REGEX REPLACE "^https://.*/([^/]+gz)" "${LAMMPS_THIRDPARTY_URL}/${libname}-\\1" newurl "${${input}}")
if ("${newurl}" STREQUAL "${${input}}")
set(${output} "" PARENT_SCOPE)
else()
set(${output} ${newurl} PARENT_SCOPE)
endif()
endfunction(GetFallbackURL)

View File

@ -1,6 +1,6 @@
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars)
file(GLOB COLVARS_SOURCES ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB COLVARS_SOURCES ${CONFIGURE_DEPENDS} ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)
@ -25,11 +25,11 @@ target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR})
target_link_libraries(lammps PRIVATE colvars)
if(COLVARS_DEBUG)
# Need to export the macro publicly to be valid in interface code
# Need to export the define publicly to be valid in interface code
target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG)
endif()
if(COLVARS_LEPTON)
target_compile_definitions(colvars PRIVATE -DLEPTON)
target_link_libraries(colvars PRIVATE lepton)
target_link_libraries(colvars PUBLIC lepton)
endif()

View File

@ -1,4 +1,9 @@
find_package(ZLIB REQUIRED)
find_package(ZLIB)
if(NOT ZLIB_FOUND)
message(WARNING "No Zlib development support found. Disabling COMPRESS package...")
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
return()
endif()
target_link_libraries(lammps PRIVATE ZLIB::ZLIB)
find_package(PkgConfig QUIET)

View File

@ -26,7 +26,20 @@ elseif(GPU_PREC STREQUAL "SINGLE")
set(GPU_PREC_SETTING "SINGLE_SINGLE")
endif()
file(GLOB GPU_LIB_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
option(GPU_DEBUG "Enable debugging code of the GPU package" OFF)
mark_as_advanced(GPU_DEBUG)
if(PKG_AMOEBA AND FFT_SINGLE)
message(FATAL_ERROR "GPU acceleration of AMOEBA is not (yet) compatible with single precision FFT")
endif()
if (PKG_AMOEBA)
list(APPEND GPU_SOURCES
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.h
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
endif()
file(GLOB GPU_LIB_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(GPU_API STREQUAL "CUDA")
@ -47,15 +60,17 @@ if(GPU_API STREQUAL "CUDA")
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
if(CUDA_MPS_SUPPORT)
if(CUDPP_OPT)
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DGPU_CUDA_MPS_SUPPORT=ON")
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DCUDA_MPS_SUPPORT=ON")
endif()
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
endif()
option(CUDA_BUILD_MULTIARCH "Enable building CUDA kernels for all supported GPU architectures" ON)
mark_as_advanced(GPU_BUILD_MULTIARCH)
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
# 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)
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
if(GPU_LIB_OLD_CUBIN_HEADERS)
message(FATAL_ERROR "########################################################################\n"
"Found file(s) generated by the make-based build system in lib/gpu\n"
@ -65,69 +80,73 @@ if(GPU_API STREQUAL "CUDA")
"########################################################################")
endif()
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(CUDPP_OPT)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
file(GLOB GPU_LIB_CUDPP_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
file(GLOB GPU_LIB_CUDPP_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
file(GLOB GPU_LIB_CUDPP_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
file(GLOB GPU_LIB_CUDPP_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
endif()
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
# only the Kepler achitecture and beyond is supported
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
if(CUDA_VERSION VERSION_LESS 8.0)
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
set(GPU_CUDA_GENCODE "-arch=all")
else()
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
endif()
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
endif()
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
endif()
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
endif()
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
endif()
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
endif()
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
endif()
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
endif()
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
if(CUDA_BUILD_MULTIARCH)
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
# only the Kepler achitecture and beyond is supported
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
if(CUDA_VERSION VERSION_LESS 8.0)
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0")
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
set(GPU_CUDA_GENCODE "-arch=all")
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
set(GPU_CUDA_GENCODE "-arch=all")
else()
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
endif()
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
endif()
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
endif()
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
endif()
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
endif()
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
endif()
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
endif()
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
endif()
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
endif()
endif()
@ -151,14 +170,17 @@ if(GPU_API STREQUAL "CUDA")
add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS})
target_compile_definitions(gpu PRIVATE -DUSE_CUDA -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
target_compile_definitions(gpu PRIVATE -DUSE_CUDA -D_${GPU_PREC_SETTING} ${GPU_CUDA_MPS_FLAGS})
if(GPU_DEBUG)
target_compile_definitions(gpu PRIVATE -DUCL_DEBUG -DGERYON_KERNEL_DUMP)
else()
target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DUCL_NO_EXIT)
endif()
if(CUDPP_OPT)
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
endif()
target_link_libraries(lammps PRIVATE gpu)
add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR)
target_link_libraries(nvc_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
@ -183,7 +205,7 @@ elseif(GPU_API STREQUAL "OPENCL")
include(OpenCLUtils)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
@ -192,6 +214,7 @@ elseif(GPU_API STREQUAL "OPENCL")
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_hippo.cu
)
foreach(GPU_KERNEL ${GPU_LIB_CU})
@ -208,6 +231,7 @@ elseif(GPU_API STREQUAL "OPENCL")
GenerateOpenCLHeader(tersoff ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu)
GenerateOpenCLHeader(tersoff_zbl ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu)
GenerateOpenCLHeader(tersoff_mod ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu)
GenerateOpenCLHeader(hippo ${CMAKE_CURRENT_BINARY_DIR}/gpu/hippo_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_hippo_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_hippo.cu)
list(APPEND GPU_LIB_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h
@ -217,37 +241,26 @@ elseif(GPU_API STREQUAL "OPENCL")
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/hippo_cl.h
)
add_library(gpu STATIC ${GPU_LIB_SOURCES})
target_link_libraries(gpu PRIVATE OpenCL::OpenCL)
target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu)
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT)
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL)
target_link_libraries(lammps PRIVATE gpu)
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL -D_${GPU_PREC_SETTING})
if(GPU_DEBUG)
target_compile_definitions(gpu PRIVATE -DUCL_DEBUG -DGERYON_KERNEL_DUMP)
else()
target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT)
endif()
add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL)
target_link_libraries(ocl_get_devices PRIVATE OpenCL::OpenCL)
add_dependencies(ocl_get_devices OpenCL::OpenCL)
elseif(GPU_API STREQUAL "HIP")
if(NOT DEFINED HIP_PATH)
if(NOT DEFINED ENV{HIP_PATH})
message(FATAL_ERROR "GPU_API=HIP requires HIP_PATH to be defined.\n"
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
else()
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
endif()
endif()
if(NOT DEFINED ROCM_PATH)
if(NOT DEFINED ENV{ROCM_PATH})
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
endif()
endif()
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})
include(DetectHIPInstallation)
find_package(hip REQUIRED)
option(HIP_USE_DEVICE_SORT "Use GPU sorting" ON)
@ -261,7 +274,7 @@ elseif(GPU_API STREQUAL "HIP")
set(ENV{HIP_PLATFORM} ${HIP_PLATFORM})
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
if(HIP_PLATFORM STREQUAL "amd")
set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture")
elseif(HIP_PLATFORM STREQUAL "spirv")
set(HIP_ARCH "spirv" CACHE STRING "HIP target architecture")
@ -322,7 +335,7 @@ elseif(GPU_API STREQUAL "HIP")
endif()
endif()
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
set(GPU_LIB_CU_HIP "")
@ -334,7 +347,7 @@ elseif(GPU_API STREQUAL "HIP")
set(CUBIN_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}.cubin")
set(CUBIN_H_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h")
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
if(HIP_PLATFORM STREQUAL "amd")
configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY)
if(HIP_COMPILER STREQUAL "clang")
@ -374,8 +387,12 @@ elseif(GPU_API STREQUAL "HIP")
add_library(gpu STATIC ${GPU_LIB_SOURCES})
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu)
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT)
target_compile_definitions(gpu PRIVATE -DUSE_HIP)
target_compile_definitions(gpu PRIVATE -DUSE_HIP -D_${GPU_PREC_SETTING})
if(GPU_DEBUG)
target_compile_definitions(gpu PRIVATE -DUCL_DEBUG -DGERYON_KERNEL_DUMP)
else()
target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DUCL_NO_EXIT)
endif()
target_link_libraries(gpu PRIVATE hip::host)
if(HIP_USE_DEVICE_SORT)
@ -384,7 +401,8 @@ elseif(GPU_API STREQUAL "HIP")
set_property(TARGET gpu PROPERTY CXX_STANDARD 14)
endif()
# add hipCUB
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
find_package(hipcub REQUIRED)
target_link_libraries(gpu PRIVATE hip::hipcub)
target_compile_definitions(gpu PRIVATE -DUSE_HIP_DEVICE_SORT)
if(HIP_PLATFORM STREQUAL "nvcc")
@ -400,15 +418,17 @@ elseif(GPU_API STREQUAL "HIP")
if(DOWNLOAD_CUB)
message(STATUS "CUB download requested")
set(CUB_URL "https://github.com/NVlabs/cub/archive/1.12.0.tar.gz" CACHE STRING "URL for CUB tarball")
# TODO: test update to current version 1.17.2
set(CUB_URL "https://github.com/nvidia/cub/archive/1.12.0.tar.gz" CACHE STRING "URL for CUB tarball")
set(CUB_MD5 "1cf595beacafff104700921bac8519f3" CACHE STRING "MD5 checksum of CUB tarball")
mark_as_advanced(CUB_URL)
mark_as_advanced(CUB_MD5)
GetFallbackURL(CUB_URL CUB_FALLBACK)
include(ExternalProject)
ExternalProject_Add(CUB
URL ${CUB_URL}
URL ${CUB_URL} ${CUB_FALLBACK}
URL_MD5 ${CUB_MD5}
PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
CONFIGURE_COMMAND ""
@ -431,35 +451,25 @@ elseif(GPU_API STREQUAL "HIP")
add_executable(hip_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(hip_get_devices PRIVATE -DUCL_HIP)
target_link_libraries(hip_get_devices hip::host)
target_link_libraries(hip_get_devices PRIVATE hip::host)
if(HIP_PLATFORM STREQUAL "nvcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_NVCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_include_directories(gpu PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_NVCC__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/include)
target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
elseif(HIP_PLATFORM STREQUAL "hcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
elseif(HIP_PLATFORM STREQUAL "amd")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_AMD__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_AMD__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
endif()
target_link_libraries(lammps PRIVATE gpu)
endif()
if(BUILD_OMP)
find_package(OpenMP COMPONENTS CXX REQUIRED)
target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX)
endif()
target_link_libraries(lammps PRIVATE gpu)
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
# detect styles which have a GPU version
RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)

View File

@ -19,7 +19,7 @@ if(CURL_FOUND)
target_compile_definitions(lammps PRIVATE -DLMP_NO_SSL_CHECK)
endif()
endif()
set(KIM_EXTRA_UNITTESTS OFF CACHE STRING "Set extra unit tests verbose mode on/off. If on, extra tests are included.")
option(KIM_EXTRA_UNITTESTS "Enable extra unit tests for the KIM package." OFF)
mark_as_advanced(KIM_EXTRA_UNITTESTS)
find_package(PkgConfig QUIET)
set(DOWNLOAD_KIM_DEFAULT ON)

View File

@ -16,8 +16,8 @@ if(Kokkos_ENABLE_OPENMP)
if(NOT BUILD_OMP)
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
else()
# NVHPC does not seem to provide a detectable OpenMP version, but is far beyond version 3.1
if((OpenMP_CXX_VERSION VERSION_LESS 3.1) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC"))
# NVHPC/(AMD)Clang does not seem to provide a detectable OpenMP version, but is far beyond version 3.1
if((OpenMP_CXX_VERSION VERSION_LESS 3.1) AND NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
message(FATAL_ERROR "Compiler must support OpenMP 3.1 or later with Kokkos_ENABLE_OPENMP")
endif()
endif()
@ -49,12 +49,14 @@ 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.7.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "84991eca9f066383abe119a5bc7a11c4" CACHE STRING "MD5 checksum of KOKKOS tarball")
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "34d7860d548c06a4040236d959c9f99a" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
ExternalProject_Add(kokkos_build
URL ${KOKKOS_URL}
URL ${KOKKOS_URL} ${KOKKOS_FALLBACK}
URL_MD5 ${KOKKOS_MD5}
CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a <INSTALL_DIR>/lib/libkokkoscontainers.a
@ -70,13 +72,11 @@ if(DOWNLOAD_KOKKOS)
set_target_properties(LAMMPS::KOKKOSCONTAINERS PROPERTIES
IMPORTED_LOCATION "${INSTALL_DIR}/lib/libkokkoscontainers.a")
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS)
target_link_libraries(lmp PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS)
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3.7.00 REQUIRED CONFIG)
find_package(Kokkos 3.7.02 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
else()
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
@ -88,7 +88,7 @@ else()
if(CMAKE_REQUEST_PIC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR} EXCLUDE_FROM_ALL)
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src
${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src
@ -96,7 +96,6 @@ else()
${LAMMPS_LIB_KOKKOS_BIN_DIR})
target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS})
target_link_libraries(lammps PRIVATE kokkos)
target_link_libraries(lmp PRIVATE kokkos)
if(BUILD_SHARED_LIBS_WAS_ON)
set(BUILD_SHARED_LIBS ON)
endif()
@ -122,6 +121,11 @@ set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/domain_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp)
# fix wall/gran has been refactored in an incompatible way. Use old version of base class for now
if(PKG_GRANULAR)
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fix_wall_gran_old.cpp)
endif()
if(PKG_KSPACE)
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
@ -133,8 +137,10 @@ if(PKG_KSPACE)
endif()
elseif(Kokkos_ENABLE_HIP)
if(NOT (FFT STREQUAL "KISS"))
include(DetectHIPInstallation)
find_package(hipfft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
target_link_libraries(lammps PRIVATE hipfft)
target_link_libraries(lammps PRIVATE hip::hipfft)
endif()
endif()
endif()
@ -144,11 +150,12 @@ if(PKG_ML-IAP)
${KOKKOS_PKG_SOURCES_DIR}/mliap_descriptor_so3_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/mliap_model_linear_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/mliap_model_python_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/mliap_unified_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/mliap_so3_kokkos.cpp)
# Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included
if(MLIAP_ENABLE_PYTHON AND Cythonize_EXECUTABLE)
file(GLOB MLIAP_KOKKOS_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
file(GLOB MLIAP_KOKKOS_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h

View File

@ -1,53 +0,0 @@
enable_language(Fortran)
# using lammps in a super-build setting
if(TARGET LATTE::latte)
target_link_libraries(lammps PRIVATE LATTE::latte)
return()
endif()
find_package(LATTE 1.2.2 CONFIG)
if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF)
else()
set(DOWNLOAD_LATTE_DEFAULT ON)
endif()
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
if(DOWNLOAD_LATTE)
message(STATUS "LATTE download requested - we will build our own")
set(LATTE_URL "https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz" CACHE STRING "URL for LATTE tarball")
set(LATTE_MD5 "820e73a457ced178c08c71389a385de7" CACHE STRING "MD5 checksum of LATTE tarball")
mark_as_advanced(LATTE_URL)
mark_as_advanced(LATTE_MD5)
# CMake cannot pass BLAS or LAPACK library variable to external project if they are a list
list(LENGTH BLAS_LIBRARIES} NUM_BLAS)
list(LENGTH LAPACK_LIBRARIES NUM_LAPACK)
if((NUM_BLAS GREATER 1) OR (NUM_LAPACK GREATER 1) AND NOT USE_INTERNAL_LINALG)
message(FATAL_ERROR "Cannot compile downloaded LATTE library due to a technical limitation. "
"Try to configure LAMMPS with '-D USE_INTERNAL_LINALG=on' added as a workaround.")
endif()
include(ExternalProject)
ExternalProject_Add(latte_build
URL ${LATTE_URL}
URL_MD5 ${LATTE_MD5}
SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}
-DCMAKE_Fortran_FLAGS_${BTYPE}=${CMAKE_Fortran_FLAGS_${BTYPE}} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/liblatte.a
)
ExternalProject_get_property(latte_build INSTALL_DIR)
add_library(LAMMPS::LATTE UNKNOWN IMPORTED)
set_target_properties(LAMMPS::LATTE PROPERTIES
IMPORTED_LOCATION "${INSTALL_DIR}/lib/liblatte.a"
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
target_link_libraries(lammps PRIVATE LAMMPS::LATTE)
add_dependencies(LAMMPS::LATTE latte_build)
else()
find_package(LATTE 1.2.2 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE LATTE::latte)
endif()

View File

@ -4,7 +4,7 @@ if(LEPTON_SOURCE_DIR)
endif()
set(LEPTON_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/lepton)
file(GLOB LEPTON_SOURCES ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
file(GLOB LEPTON_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") OR
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR
@ -15,7 +15,7 @@ else()
endif()
if(LEPTON_ENABLE_JIT)
file(GLOB ASMJIT_SOURCES ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
file(GLOB ASMJIT_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
endif()
add_library(lepton STATIC ${LEPTON_SOURCES} ${ASMJIT_SOURCES})

View File

@ -8,10 +8,11 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al
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.4.12.tar.gz" CACHE STRING "URL for MDI tarball")
set(MDI_MD5 "7a222353ae8e03961d5365e6cd48baee" CACHE STRING "MD5 checksum for MDI tarball")
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz" CACHE STRING "URL for MDI tarball")
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball")
mark_as_advanced(MDI_URL)
mark_as_advanced(MDI_MD5)
GetFallbackURL(MDI_URL MDI_FALLBACK)
enable_language(C)
# only ON/OFF are allowed for "mpi" flag when building MDI library
@ -63,7 +64,7 @@ if(DOWNLOAD_MDI)
# support cross-compilation and ninja-build
include(ExternalProject)
ExternalProject_Add(mdi_build
URL ${MDI_URL}
URL ${MDI_URL} ${MDI_FALLBACK}
URL_MD5 ${MDI_MD5}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/mdi_build_ext
CMAKE_ARGS

View File

@ -6,10 +6,11 @@ else()
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")
set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.2.0.tar.gz" CACHE STRING "URL for n2p2 tarball")
set(N2P2_MD5 "a2d9ab7f676b3a74a324fc1eda0a911d" CACHE STRING "MD5 checksum of N2P2 tarball")
mark_as_advanced(N2P2_URL)
mark_as_advanced(N2P2_MD5)
GetFallbackURL(N2P2_URL N2P2_FALLBACK)
# 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)
@ -72,7 +73,7 @@ if(DOWNLOAD_N2P2)
# 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 ${N2P2_URL} ${N2P2_FALLBACK}
URL_MD5 ${N2P2_MD5}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""

View File

@ -34,7 +34,7 @@ if(MLIAP_ENABLE_PYTHON)
endif()
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
file(GLOB MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
file(GLOB MLIAP_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)

View File

@ -1,11 +1,25 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "f418d32b60e531063ac4285bf702b468" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)
# download library sources to build folder
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5}) #SHOW_PROGRESS
if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
endif()
if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")
message(STATUS "Downloading ${PACELIB_URL}")
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}"))
message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}")
file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()
# uncompress downloaded sources
execute_process(

View File

@ -16,6 +16,7 @@ if(DOWNLOAD_QUIP)
set(temp "${temp}DEFINES += -DGETARG_F2003 -DFORTRAN_UNDERSCORE\n")
set(temp "${temp}F95FLAGS += -fpp -free -fPIC\n")
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n")
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")

View File

@ -7,8 +7,8 @@ else()
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "8c45e269ee13f60b303edd7823866a91" CACHE STRING "MD5 checksum of MSCG tarball")
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
mark_as_advanced(MSCG_URL)
mark_as_advanced(MSCG_MD5)

View File

@ -1,105 +1,169 @@
set(PLUMED_MODE "static" CACHE STRING "Linkage mode for Plumed2 library")
set(PLUMED_MODE_VALUES static shared runtime)
set_property(CACHE PLUMED_MODE PROPERTY STRINGS ${PLUMED_MODE_VALUES})
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
# Plumed2 support for PLUMED package
set(PLUMED_LINK_LIBS)
if(PLUMED_MODE STREQUAL "STATIC")
find_package(LAPACK REQUIRED)
find_package(BLAS REQUIRED)
find_package(GSL REQUIRED)
list(APPEND PLUMED_LINK_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} GSL::gsl)
find_package(ZLIB QUIET)
if(ZLIB_FOUND)
list(APPEND PLUMED_LINK_LIBS ZLIB::ZLIB)
endif()
find_package(FFTW3 QUIET)
if(FFTW3_FOUND)
list(APPEND PLUMED_LINK_LIBS FFTW3::FFTW3)
endif()
if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
set(PLUMED_CONFIG_CPP "-I ${MPI_CXX_INCLUDE_PATH}")
set(PLUMED_CONFIG_LIB "${MPI_CXX_LIBRARIES}")
set(PLUMED_CONFIG_DEP "mpi4win_build")
else()
set(PLUMED_CONFIG_MPI "--disable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
set(PLUMED_CONFIG_CPP "")
set(PLUMED_CONFIG_LIB "")
set(PLUMED_CONFIG_DEP "")
endif()
if(BUILD_OMP)
set(PLUMED_CONFIG_OMP "--enable-openmp")
else()
set(PLUMED_CONFIG_OMP "--disable-openmp")
endif()
find_package(PkgConfig QUIET)
set(DOWNLOAD_PLUMED_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PLUMED QUIET plumed)
if(PLUMED_FOUND)
set(DOWNLOAD_PLUMED_DEFAULT OFF)
endif()
endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz"
CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball")
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
if(DOWNLOAD_PLUMED)
if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)
GetFallbackURL(PLUMED_URL PLUMED_FALLBACK)
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(CROSS_CONFIGURE mingw64-configure)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
set(CROSS_CONFIGURE mingw32-configure)
else()
set(PLUMED_CONFIG_MPI "--disable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
message(FATAL_ERROR "Unsupported target system: ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}")
endif()
if(BUILD_OMP)
set(PLUMED_CONFIG_OMP "--enable-openmp")
else()
set(PLUMED_CONFIG_OMP "--disable-openmp")
endif()
message(STATUS "PLUMED download requested - we will build our own")
if(PLUMED_MODE STREQUAL "STATIC")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "SHARED")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}")
endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.1/plumed-src-2.8.1.tgz" CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "6bfe72ebdae63dc38a9ca27d9b0e08f8" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5)
message(STATUS "Downloading and cross-compiling Plumed2 for ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR} with ${CROSS_CONFIGURE}")
include(ExternalProject)
ExternalProject_Add(plumed_build
URL ${PLUMED_URL}
URL ${PLUMED_URL} ${PLUMED_FALLBACK}
URL_MD5 ${PLUMED_MD5}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
CONFIGURE_COMMAND ${CROSS_CONFIGURE} --disable-shared --disable-bsymbolic
--disable-python --enable-cxx=11
--enable-modules=-adjmat:+crystallization:-dimred:+drr:+eds:-fisst:+funnel:+logmfd:+manyrestraints:+maze:+opes:+multicolvar:-pamm:-piv:+s2cm:-sasa:-ves
${PLUMED_CONFIG_OMP}
${PLUMED_CONFIG_MPI}
CXX=${PLUMED_CONFIG_CXX}
CC=${PLUMED_CONFIG_CC}
CPPFLAGS=${PLUMED_CONFIG_CPP}
LIBS=${PLUMED_CONFIG_LIB}
INSTALL_COMMAND ""
BUILD_BYPRODUCTS "<SOURCE_DIR>/src/lib/install/libplumed.a" "<SOURCE_DIR>/src/lib/install/plumed.exe"
DEPENDS "${PLUMED_MPI_CONFIG_DEP}"
)
ExternalProject_Get_Property(plumed_build SOURCE_DIR)
set(PLUMED_BUILD_DIR ${SOURCE_DIR})
set(PLUMED_INSTALL_DIR ${PLUMED_BUILD_DIR}/src/lib/install)
file(MAKE_DIRECTORY ${PLUMED_BUILD_DIR}/src/include)
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
add_dependencies(LAMMPS::PLUMED plumed_build)
set_target_properties(LAMMPS::PLUMED PROPERTIES
IMPORTED_LOCATION "${PLUMED_INSTALL_DIR}/libplumed.a"
INTERFACE_LINK_LIBRARIES "-Wl,--image-base -Wl,0x10000000 -lfftw3 -lz -fstack-protector -lssp -fopenmp"
INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_BUILD_DIR}/src/include")
add_custom_target(plumed_copy ALL ${CMAKE_COMMAND} -E rm -rf ${CMAKE_BINARY_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/plumed_patches
COMMAND ${CMAKE_COMMAND} -E copy ${PLUMED_INSTALL_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/plumed.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLUMED_BUILD_DIR}/patches ${CMAKE_BINARY_DIR}/patches
BYPRODUCTS ${CMAKE_BINARY_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/patches
DEPENDS plumed_build
COMMENT "Copying Plumed files"
)
else()
set(PLUMED_MODE "static" CACHE STRING "Linkage mode for Plumed2 library")
set(PLUMED_MODE_VALUES static shared runtime)
set_property(CACHE PLUMED_MODE PROPERTY STRINGS ${PLUMED_MODE_VALUES})
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
set(PLUMED_LINK_LIBS)
if(PLUMED_MODE STREQUAL "STATIC")
find_package(LAPACK REQUIRED)
find_package(BLAS REQUIRED)
find_package(GSL REQUIRED)
list(APPEND PLUMED_LINK_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} GSL::gsl)
find_package(ZLIB QUIET)
if(ZLIB_FOUND)
list(APPEND PLUMED_LINK_LIBS ZLIB::ZLIB)
endif()
find_package(FFTW3 QUIET)
if(FFTW3_FOUND)
list(APPEND PLUMED_LINK_LIBS FFTW3::FFTW3)
endif()
endif()
find_package(PkgConfig QUIET)
set(DOWNLOAD_PLUMED_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PLUMED QUIET plumed)
if(PLUMED_FOUND)
set(DOWNLOAD_PLUMED_DEFAULT OFF)
endif()
endif()
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
if(DOWNLOAD_PLUMED)
message(STATUS "PLUMED download requested - we will build our own")
if(PLUMED_MODE STREQUAL "STATIC")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "SHARED")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}")
endif()
include(ExternalProject)
ExternalProject_Add(plumed_build
URL ${PLUMED_URL} ${PLUMED_FALLBACK}
URL_MD5 ${PLUMED_MD5}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
${CONFIGURE_REQUEST_PIC}
--enable-modules=all
--enable-cxx=11
--disable-python
${PLUMED_CONFIG_MPI}
${PLUMED_CONFIG_OMP}
CXX=${PLUMED_CONFIG_CXX}
CC=${PLUMED_CONFIG_CC}
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
)
ExternalProject_get_property(plumed_build INSTALL_DIR)
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
add_dependencies(LAMMPS::PLUMED plumed_build)
if(PLUMED_MODE STREQUAL "STATIC")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "SHARED")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
)
ExternalProject_get_property(plumed_build INSTALL_DIR)
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
add_dependencies(LAMMPS::PLUMED plumed_build)
if(PLUMED_MODE STREQUAL "STATIC")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "SHARED")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed)
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
if(PLUMED_MODE STREQUAL "STATIC")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed)
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
if(PLUMED_MODE STREQUAL "STATIC")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
endif()
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)

View File

@ -18,6 +18,8 @@ if(DOWNLOAD_SCAFACOS)
set(SCAFACOS_MD5 "bd46d74e3296bd8a444d731bb10c1738" CACHE STRING "MD5 checksum of SCAFACOS tarball")
mark_as_advanced(SCAFACOS_URL)
mark_as_advanced(SCAFACOS_MD5)
GetFallbackURL(SCAFACOS_URL SCAFACOS_FALLBACK)
# version 1.0.1 needs a patch to compile and linke cleanly with GCC 10 and later.
file(DOWNLOAD ${LAMMPS_THIRDPARTY_URL}/scafacos-1.0.1-fix.diff ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff
@ -30,7 +32,7 @@ if(DOWNLOAD_SCAFACOS)
include(ExternalProject)
ExternalProject_Add(scafacos_build
URL ${SCAFACOS_URL}
URL ${SCAFACOS_URL} ${SCAFACOS_FALLBACK}
URL_MD5 ${SCAFACOS_MD5}
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-doc

View File

@ -1,5 +1,5 @@
function(FindStyleHeaders path style_class file_pattern headers)
file(GLOB files "${path}/${file_pattern}*.h")
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
get_property(hlist GLOBAL PROPERTY ${headers})
foreach(file_name ${files})
@ -95,73 +95,76 @@ function(RegisterIntegrateStyle path)
endfunction(RegisterIntegrateStyle)
function(RegisterStyles search_path)
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body
FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force
FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input
FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify
FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force
FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump
FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify
FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force
FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update
FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force
FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update
FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor
FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor
FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force
FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body
FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force
FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input
FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify
FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force
FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump
FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify
FindStyleHeaders(${search_path} GRAN_SUB_MOD_CLASS gran_sub_mod_ GRAN_SUB_MOD ) # gran_sub_mod ) # granular_model
FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force
FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update
FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force
FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update
FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor
FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor
FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force
FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
endfunction(RegisterStyles)
function(RegisterStylesExt search_path extension sources)
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources})
FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources})
FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources})
FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources})
FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources})
FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources})
FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources})
FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources})
FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources})
FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources})
FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources})
FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources})
FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources})
FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources})
FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources})
FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources})
FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources})
FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources})
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources})
FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources})
FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources})
FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources})
FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources})
FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources})
FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources})
FindStyleHeadersExt(${search_path} GRAN_SUB_MOD_CLASS ${extension} GRAN_SUB_MOD ${sources})
FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources})
FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources})
FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources})
FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources})
FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources})
FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources})
FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources})
FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources})
FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources})
FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources})
FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources})
endfunction(RegisterStylesExt)
function(GenerateStyleHeaders output_path)
message(STATUS "Generating style headers...")
GenerateStyleHeader(${output_path} ANGLE angle ) # force
GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid
GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body
GenerateStyleHeader(${output_path} BOND bond ) # force
GenerateStyleHeader(${output_path} COMMAND command ) # input
GenerateStyleHeader(${output_path} COMPUTE compute ) # modify
GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force
GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump
GenerateStyleHeader(${output_path} FIX fix ) # modify
GenerateStyleHeader(${output_path} IMPROPER improper ) # force
GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update
GenerateStyleHeader(${output_path} KSPACE kspace ) # force
GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update
GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor
GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor
GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor
GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor
GenerateStyleHeader(${output_path} PAIR pair ) # force
GenerateStyleHeader(${output_path} READER reader ) # read_dump
GenerateStyleHeader(${output_path} REGION region ) # domain
GenerateStyleHeader(${output_path} ANGLE angle ) # force
GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid
GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body
GenerateStyleHeader(${output_path} BOND bond ) # force
GenerateStyleHeader(${output_path} COMMAND command ) # input
GenerateStyleHeader(${output_path} COMPUTE compute ) # modify
GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force
GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump
GenerateStyleHeader(${output_path} FIX fix ) # modify
GenerateStyleHeader(${output_path} GRAN_SUB_MOD gran_sub_mod ) # granular_model
GenerateStyleHeader(${output_path} IMPROPER improper ) # force
GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update
GenerateStyleHeader(${output_path} KSPACE kspace ) # force
GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update
GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor
GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor
GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor
GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor
GenerateStyleHeader(${output_path} PAIR pair ) # force
GenerateStyleHeader(${output_path} READER reader ) # read_dump
GenerateStyleHeader(${output_path} REGION region ) # domain
endfunction(GenerateStyleHeaders)
function(DetectBuildSystemConflict lammps_src_dir)
@ -184,7 +187,7 @@ endfunction(DetectBuildSystemConflict)
function(FindPackagesHeaders path style_class file_pattern headers)
file(GLOB files "${path}/${file_pattern}*.h")
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
get_property(plist GLOBAL PROPERTY ${headers})
foreach(file_name ${files})

View File

@ -6,7 +6,7 @@ if(ENABLE_TESTING)
find_program(VALGRIND_BINARY NAMES valgrind)
# generate custom suppression file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
file(GLOB VALGRIND_SUPPRESSION_FILES ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
file(GLOB VALGRIND_SUPPRESSION_FILES ${CONFIGURE_DEPENDS} ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
file(READ ${SUPP} SUPPRESSIONS)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
@ -18,29 +18,33 @@ if(ENABLE_TESTING)
# 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)
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
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))
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_DISTRO_VERSION VERSION_GREATER_EQUAL 22.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=mold HAVE_MOLD_LINKER_FLAG)
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
check_cxx_compiler_flag(-fuse-ld=bfd HAVE_BFD_LINKER_FLAG)
find_program(HAVE_MOLD_LINKER_BIN ld.mold)
find_program(HAVE_LLD_LINKER_BIN lld ld.lld)
find_program(HAVE_GOLD_LINKER_BIN ld.gold)
find_program(HAVE_BFD_LINKER_BIN ld.bfd)
if(HAVE_LLD_LINKER_FLAG AND HAVE_LLD_LINKER_BIN)
if(HAVE_MOLD_LINKER_FLAG AND HAVE_MOLD_LINKER_BIN)
set(CMAKE_CUSTOM_LINKER_DEFAULT mold)
elseif(HAVE_LLD_LINKER_FLAG AND HAVE_LLD_LINKER_BIN)
set(CMAKE_CUSTOM_LINKER_DEFAULT lld)
elseif(HAVE_GOLD_LINKER_FLAG AND HAVE_GOLD_LINKER_BIN)
set(CMAKE_CUSTOM_LINKER_DEFAULT gold)
elseif(HAVE_BFD_LINKER_FLAG AND HAVE_BFD_LINKER_BIN)
set(CMAKE_CUSTOM_LINKER_DEFAULT bfd)
endif()
set(CMAKE_CUSTOM_LINKER_VALUES lld gold bfd default)
set(CMAKE_CUSTOM_LINKER ${CMAKE_CUSTOM_LINKER_DEFAULT} CACHE STRING "Choose a custom linker for faster linking (lld, gold, bfd, default)")
set(CMAKE_CUSTOM_LINKER_VALUES mold lld gold bfd default)
set(CMAKE_CUSTOM_LINKER ${CMAKE_CUSTOM_LINKER_DEFAULT} CACHE STRING "Choose a custom linker for faster linking (mold, lld, gold, bfd, default)")
validate_option(CMAKE_CUSTOM_LINKER CMAKE_CUSTOM_LINKER_VALUES)
mark_as_advanced(CMAKE_CUSTOM_LINKER)
if(NOT "${CMAKE_CUSTOM_LINKER}" STREQUAL "default")

View File

@ -26,16 +26,22 @@ if(BUILD_TOOLS)
enable_language(C)
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE)
file(GLOB MSI2LMP_SOURCES ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
file(GLOB MSI2LMP_SOURCES ${CONFIGURE_DEPENDS} ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
add_executable(msi2lmp ${MSI2LMP_SOURCES})
if(STANDARD_MATH_LIB)
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
endif()
install(TARGETS msi2lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${LAMMPS_DOC_DIR}/msi2lmp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
endif()
find_package(PkgConfig QUIET)
if(BUILD_LAMMPS_SHELL)
if(NOT PkgConfig_FOUND)
message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell")
endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
if(NOT LAMMPS_EXCEPTIONS)
@ -50,15 +56,23 @@ if(BUILD_LAMMPS_SHELL)
add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp ${ICON_RC_FILE})
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE)
# workaround for broken readline pkg-config file on 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)
if(CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL")
pkg_check_modules(TERMCAP IMPORTED_TARGET REQUIRED termcap)
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::TERMCAP)
endif()
install(TARGETS lammps-shell EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/lammps-shell/icons DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/)
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
endif()
if(BUILD_LAMMPS_GUI)
get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
add_subdirectory(${LAMMPS_GUI_DIR} ${LAMMPS_GUI_BIN})
endif()

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en-US</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleDisplayName</key>
<string>The LAMMPS Molecular Dynamics Software</string>
<key>CFBundleIconFile</key>
<string>lammps</string>
<key>CFBundleIdentifier</key>
<string>org.lammps.gui</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>LAMMPS</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
</dict>
</plist>

View File

@ -0,0 +1,69 @@
LAMMPS and LAMMPS GUI universal binaries for macOS (arm64/x86_64)
=================================================================
This package provides universal binaries of LAMMPS and LAMMPS GUI that should
run on macOS systems running running macOS version 11 (Big Sur) or newer. Note
the binaries are compiled without MPI support and contain a compatible subset
of the available packages.
The following individual commands are included:
binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt
After copying the lammps-gui folder into your Applications folder, please follow
these steps:
1. Open the Terminal app
2. Type the following command and press ENTER:
open ~/.zprofile
This will open a text editor for modifying the .zprofile file in your home
directory.
3. Add the following lines to the end of the file, save it, and close the editor
LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents
LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials
LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench
MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files
PATH=${LAMMPS_INSTALL_DIR}/bin:$PATH
export LAMMPS_POTENTIALS LAMMPS_BENCH_DIR PATH
4. In your existing terminal, type the following command make the settings active
source ~/.zprofile
Note, you don't have to type this in new terminals, since they will apply
the changes from .zprofile automatically.
Note: the above assumes you use the default shell (zsh) that comes with
MacOS. If you customized MacOS to use a different shell, you'll need to modify
that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands
to modify the same environment variables.
5. Try running LAMMPS (which might fail, see step 7)
lmp -in ${LAMMPS_BENCH_DIR}/in.lj
6. Try running the LAMMPS GUI
lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo
Depending on the size and resolution of your screen, the fonts may
be too small to read. This can be adjusted by setting the environment
variable QT_FONT_DPI. The default value would be 72, so to increase
the fonts by a third one can add to the .zprofile file the line
export QT_FONT_DPI=96
and reload as shown above.
7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt)
MacOS will likely block the initial run of the executables, since they
were downloaded from the internet and are missing a known signature from an
identified developer. Go to "Settings" and search for "Security settings". It
should display a message that an executable like "lmp" was blocked. Press
"Open anyway", which might prompt you for your admin credentials. Afterwards
"lmp" and the other executables should work as expected.

View File

@ -0,0 +1,77 @@
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI
echo "Delete old files, if they exist"
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
echo "Remove debug info"
for s in ${DESTDIR}/bin/* ${DESTDIR}/lib/liblammps*
do \
test -f $s && strip --strip-debug $s
done
echo "Remove libc, gcc, and X11 related shared libs"
rm -f ${DESTDIR}/lib/ld*.so ${DESTDIR}/lib/ld*.so.[0-9]
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}.so.?
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}-[0-9].[0-9]*.so
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb*
rm -f ${DESTDIR}/lib/libgcc_s*
rm -f ${DESTDIR}/lib/libstdc++*
# get qt dir
QTDIR=$(ldd ${DESTDIR}/bin/lammps-gui | grep libQt5Core | sed -e 's/^.*=> *//' -e 's/libQt5Core.so.*$/qt5/')
cat > ${DESTDIR}/bin/qt.conf <<EOF
[Paths]
Plugins = ../qt5plugins
EOF
# platform plugin
mkdir -p ${DESTDIR}/qt5plugins/platforms
cp ${QTDIR}/plugins/platforms/libqxcb.so ${DESTDIR}/qt5plugins/platforms
# get platform plugin dependencies
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd ${QTDIR}/plugins/platforms/libqxcb.so | grep -v ${DESTDIR} | grep libQt5 | sed -e 's/^.*=> *//' -e 's/\(libQt5.*.so.*\) .*$/\1/')
for dep in ${QTDEPS}
do \
cp ${dep} ${DESTDIR}/lib
done
echo "Add additional plugins for Qt"
for dir in styles imageformats
do \
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qt5plugins/
done
# get imageplugin dependencies
for s in ${DESTDIR}/qt5plugins/imageformats/*.so
do \
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd $s | grep -v ${DESTDIR} | grep -E '(libQt5|jpeg)' | sed -e 's/^.*=> *//' -e 's/\(lib.*.so.*\) .*$/\1/')
for dep in ${QTDEPS}
do \
cp ${dep} ${DESTDIR}/lib
done
done
echo "Set up wrapper script"
MYDIR=$(dirname "$0")
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
for s in ${DESTDIR}/bin/*
do \
EXE=$(basename $s)
test ${EXE} = linux_wrapper.sh && continue
test ${EXE} = qt.conf && continue
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
done
pushd ..
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
popd
echo "Cleanup dir"
rm -r ${DESTDIR}
exit 0

View File

@ -0,0 +1,111 @@
#!/bin/bash
APP_NAME=lammps-gui
echo "Delete old files, if they exist"
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg
echo "Create initial dmg file with macdeployqt"
macdeployqt lammps-gui.app -dmg
echo "Create writable dmg file"
hdiutil convert ${APP_NAME}.dmg -format UDRW -o ${APP_NAME}-rw.dmg
echo "Mount writeable DMG file in read-write mode. Keep track of device and volume names"
DEVICE=$(hdiutil attach -readwrite -noverify ${APP_NAME}-rw.dmg | grep '^/dev/' | sed 1q | awk '{print $1}')
VOLUME=$(df | grep ${DEVICE} | sed -e 's/^.*\(\/Volumes\/\)/\1/')
sleep 2
echo "Create link to Application folder and move README and background image files"
pushd "${VOLUME}"
ln -s /Applications .
mv ${APP_NAME}.app/Contents/Resources/README.txt .
mkdir .background
mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png
mv ${APP_NAME}.app LAMMPS.app
cd LAMMPS.app/Contents
echo "Attach icons to LAMMPS console and GUI executables"
echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o bin/lmp
SetFile -a C bin/lmp
Rez -a icon.rsrc -o MacOS/lammps-gui
SetFile -a C MacOS/lammps-gui
rm icon.rsrc
popd
echo 'Tell the Finder to resize the window, set the background,'
echo 'change the icon size, place the icons in the right position, etc.'
echo '
tell application "Finder"
tell disk "'${APP_NAME}'"
-- wait for the image to finish mounting
set open_attempts to 0
repeat while open_attempts < 4
try
open
delay 1
set open_attempts to 5
close
on error errStr number errorNumber
set open_attempts to open_attempts + 1
delay 10
end try
end repeat
delay 5
-- open the image the first time and save a .DS_Store
-- just the background and icon setup
open
set current view of container window to icon view
set theViewOptions to the icon view options of container window
set background picture of theViewOptions to file ".background:background.png"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 64
delay 5
close
-- next set up the position of the app and Applications symlink
-- plus hide all window decorations
open
update without registering applications
tell container window
set sidebar width to 0
set statusbar visible to false
set toolbar visible to false
set the bounds to { 100, 40, 868, 640 }
set position of item "'LAMMPS'.app" to { 190, 216 }
set position of item "Applications" to { 576, 216 }
set position of item "README.txt" to { 190, 400 }
end tell
update without registering applications
delay 5
close
-- one last open and close to check the results
open
delay 5
close
end tell
delay 1
end tell
' | osascript
sync
echo "Unmount modified disk image and convert to compressed read-only image"
hdiutil detach "${DEVICE}"
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg"
echo "Attach icon to .dmg file"
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
SetFile -a C LAMMPS-macOS-multiarch.dmg
rm icon.rsrc
echo "Delete temporary disk images"
rm -f "${APP_NAME}-rw.dmg"
rm -f "${APP_NAME}.dmg"
exit 0

View File

@ -0,0 +1,64 @@
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/LAMMPS_GUI
SYSROOT="$1"
echo "Delete old files, if they exist"
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
# no static libs needed
rm -rvf ${DESTDIR}/lib
# but the LAMMPS lib
echo "Copying required DLL files"
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
echo "Copy required Qt plugins"
mkdir -p ${DESTDIR}/qt5plugins
for plugin in imageformats platforms styles
do \
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
done
echo "Check dependencies of DLL files"
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
cat > ${DESTDIR}/bin/qt.conf <<EOF
[Paths]
Plugins = ../qt5plugins
EOF
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI

View File

@ -0,0 +1,28 @@
# CMake script to be run post installation to build zipped package
# clean up old zipfile and deployment tree
file(REMOVE LAMMPS-Win10-amd64.zip)
file(REMOVE_RECURSE LAMMPS_GUI)
file(RENAME ${INSTNAME} LAMMPS_GUI)
# move all executables and dlls to main folder and delete bin folder
file(GLOB BINFILES LIST_DIRECTORIES FALSE LAMMPS_GUI/bin/*.exe LAMMPS_GUI/bin/*.dll)
foreach(bin ${BINFILES})
get_filename_component(exe ${bin} NAME)
file(RENAME ${bin} LAMMPS_GUI/${exe})
endforeach()
file(REMOVE_RECURSE LAMMPS_GUI/bin)
# create qt.conf so Qt will find its plugins
file(WRITE LAMMPS_GUI/qt.conf "[Paths]\r\nPlugins = qt5plugins\r\n")
# initialize environment and then run windeployqt to populate folder with missing dependencies and Qt plugins
file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r\nset PATH=${QT5_BIN_DIR};%PATH%\r\nwindeployqt --plugindir LAMMPS_GUI/qt5plugins --release LAMMPS_GUI/lammps-gui.exe --no-quick-import --no-webkit2 --no-translations --no-system-d3d-compiler --no-angle --no-opengl-sw\r\n")
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
file(REMOVE qtdeploy.bat)
# create zip archive
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip")
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
file(REMOVE makearchive.ps1)
file(REMOVE_RECURSE LAMMPS_GUI)

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 KiB

BIN
cmake/packaging/lammps.icns Normal file

Binary file not shown.

View File

@ -0,0 +1,18 @@
#!/bin/sh
# wrapper for bundled executables
# reset locale to avoid problems with decimal numbers
export LC_ALL=C
BASEDIR=$(dirname "$0")
EXENAME=$(basename "$0")
# append to LD_LIBRARY_PATH to prefer local (newer) libs
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
# set some environment variables for LAMMPS etc.
LAMMPS_POTENTIALS=${BASEDIR}/share/lammps/potentials
MSI2LMP_LIBRARY=${BASEDIR}/share/lammps/frc_files
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY
exec "${BASEDIR}/bin/${EXENAME}" "$@"

30
cmake/packaging/png2iconset.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
if [ $# != 2 ]
then
echo "usage: $0 <pngfile> <iconset name>"
exit 1
fi
png="$1"
ico="$2"
if [ ! -f ${png} ]
then
echo "PNG Image $1 not found"
fi
rm -rf ${ico}.iconset
mkdir ${ico}.iconset
sips -z 16 16 ${png} --out ${ico}.iconset/icon_16x16.png
sips -z 32 32 ${png} --out ${ico}.iconset/icon_16x16@2x.png
sips -z 32 32 ${png} --out ${ico}.iconset/icon_32x32.png
sips -z 64 64 ${png} --out ${ico}.iconset/icon_32x32@2x.png
sips -z 128 128 ${png} --out ${ico}.iconset/icon_128x128.png
sips -z 256 256 ${png} --out ${ico}.iconset/icon_128x128@2x.png
sips -z 256 256 ${png} --out ${ico}.iconset/icon_256x256.png
sips -z 512 512 ${png} --out ${ico}.iconset/icon_256x256@2x.png
sips -z 512 512 ${png} --out ${ico}.iconset/icon_512x512.png
sips -z 1024 1024 ${png} --out ${ico}.iconset/icon_512x512@2x.png
iconutil -c icns ${ico}.iconset
rm -rf ${ico}.iconset

View File

@ -43,7 +43,6 @@ set(ALL_PACKAGES
KOKKOS
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD

View File

@ -45,7 +45,6 @@ set(ALL_PACKAGES
KOKKOS
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD

View File

@ -1,14 +1,13 @@
# 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 PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
set(ALL_PACKAGES KIM MSCG VORONOI PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
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)

View File

@ -0,0 +1,14 @@
# preset that will build portable multi-arch binaries on macOS without MPI
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0 CACHE STRING "" FORCE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(BUILD_MPI FALSE CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE)
set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE)

View File

@ -35,7 +35,6 @@ set(WIN_PACKAGES
INTEL
INTERLAYER
KSPACE
LATTE
LEPTON
MACHDYN
MANIFOLD

View File

@ -40,6 +40,7 @@ set(ALL_PACKAGES
MANYBODY
MC
MEAM
MESONT
MISC
ML-IAP
ML-POD

View File

@ -12,11 +12,9 @@ set(PACKAGES_WITH_LIB
KIM
KOKKOS
LATBOLTZ
LATTE
LEPTON
MACHDYN
MDI
MESONT
ML-HDNNP
ML-PACE
ML-QUIP

View File

@ -32,10 +32,12 @@ set(WIN_PACKAGES
INTERLAYER
KSPACE
LEPTON
MACHDYN
MANIFOLD
MANYBODY
MC
MEAM
MESONT
MISC
ML-IAP
ML-POD
@ -44,6 +46,7 @@ set(WIN_PACKAGES
MOLECULE
MOLFILE
OPENMP
OPT
ORIENT
PERI
PHONON

View File

@ -86,18 +86,19 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build -E $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
touch $(RSTDIR)/Fortran.rst ;\
touch $(RSTDIR)/Fortran.rst ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
ln -sf Manual.html html/index.html;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
echo "############################################" ;\
echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
rst_anchor_check src/*.rst ;\
python $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\
$(PYTHON) $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
python $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@ -114,9 +115,9 @@ fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@$(MAKE) $(MFLAGS) -C graphviz all
@mkdir -p fasthtml
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/fasthtml/doctrees $(RSTDIR) fasthtml ;\
touch $(RSTDIR)/Fortran.rst ;\
touch $(RSTDIR)/Fortran.rst ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build $(SPHINXEXTRA) -b html -c $(SPHINXCONFIG) -d $(BUILDDIR)/fasthtml/doctrees $(RSTDIR) fasthtml ;\
deactivate ;\
)
@ -131,8 +132,8 @@ fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \
cp $(SPHINXCONFIG)/false_positives.txt $(RSTDIR)/ ; env PYTHONWARNINGS= \
. $(VENV)/bin/activate ; \
cp $(SPHINXCONFIG)/false_positives.txt $(RSTDIR)/; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build -b spelling -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) spelling ;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
deactivate ;\
@ -146,9 +147,9 @@ epub: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@rm -f LAMMPS.epub
@cp src/JPG/*.* epub/JPG
@(\
. $(VENV)/bin/activate ;\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build -E $(SPHINXEXTRA) -b epub -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) epub ;\
touch $(RSTDIR)/Fortran.rst ;\
touch $(RSTDIR)/Fortran.rst ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build $(SPHINXEXTRA) -b epub -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) epub ;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
deactivate ;\
@ -167,17 +168,18 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@$(MAKE) $(MFLAGS) -C graphviz all
@if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= \
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build -E $(SPHINXEXTRA) -b latex -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
touch $(RSTDIR)/Fortran.rst ;\
touch $(RSTDIR)/Fortran.rst ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
sphinx-build $(SPHINXEXTRA) -b latex -c $(SPHINXCONFIG) -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
echo "############################################" ;\
echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
rst_anchor_check src/*.rst ;\
python utils/check-packages.py -s ../src -d src ;\
$(PYTHON) utils/check-packages.py -s ../src -d src ;\
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
python utils/check-styles.py -s ../src -d src ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@ -200,22 +202,22 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
anchor_check : $(ANCHORCHECK)
@(\
. $(VENV)/bin/activate ;\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
rst_anchor_check src/*.rst ;\
deactivate ;\
)
style_check : $(VENV)
@(\
. $(VENV)/bin/activate ;\
python utils/check-styles.py -s ../src -d src ;\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
deactivate ;\
)
package_check : $(VENV)
@(\
. $(VENV)/bin/activate ;\
python utils/check-packages.py -s ../src -d src ;\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
$(PYTHON) utils/check-packages.py -s ../src -d src ;\
deactivate ;\
)
@ -224,6 +226,14 @@ char_check :
role_check :
@( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
link_check : $(VENV) html
@(\
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
linkchecker -F html --check-extern html/Manual.html ;\
deactivate ;\
)
xmlgen : doxygen/xml/index.xml
@ -252,7 +262,7 @@ $(MATHJAX):
$(ANCHORCHECK): $(VENV)
@( \
. $(VENV)/bin/activate; \
. $(VENV)/bin/activate; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
pip $(PIP_OPTIONS) install -e utils/converters;\
deactivate;\
)

View File

@ -1,12 +1,12 @@
# Outline of the GitHub Development Workflow
This purpose of this document is to provide a point of reference for the
The purpose of this document is to provide a point of reference for the
core LAMMPS developers and other LAMMPS contributors to understand the
choices the LAMMPS developers have agreed on. Git and GitHub provide the
tools, but do not set policies, so it is up to the developers to come to
an agreement as to how to define and interpret policies. This document
is likely to change as our experiences and needs change and we try to
adapt accordingly. Last change 2021-09-02.
is likely to change as our experiences and needs change, and we try to
adapt it accordingly. Last change 2023-02-10.
## Table of Contents
@ -22,47 +22,50 @@ adapt accordingly. Last change 2021-09-02.
## GitHub Merge Management
In the interest of consistency, ONLY ONE of the core LAMMPS developers
should doing the merging itself. This is currently
should do the merging. This is currently
[@akohlmey](https://github.com/akohlmey) (Axel Kohlmeyer). If this
assignment needs to be changed, it shall be done right after a stable
release. If the currently assigned developer cannot merge outstanding
pull requests in a timely manner, or in other extenuating circumstances,
other core LAMMPS developers with merge rights can merge pull requests,
when necessary.
other core LAMMPS developers with merge permission may merge pull
requests.
## Pull Requests
ALL changes to the LAMMPS code and documentation, however trivial, MUST
be submitted as a pull request to GitHub. All changes to the "develop"
branch must be made exclusively through merging pull requests. The
"release" and "stable" branches, respectively are only to be updated
upon patch or stable releases with fast-forward merges based on the
associated tags. Pull requests may also be submitted to (long-running)
feature branches created by LAMMPS developers inside the LAMMPS project,
if needed. Those are not subject to the merge and review restrictions
discussed in this document, though, but get managed as needed on a
case-by-case basis.
*ALL* changes to the LAMMPS code and documentation, however trivial,
MUST be submitted as a pull request to GitHub. All changes to the
"develop" branch must be made exclusively through merging pull requests.
The "release" and "stable" branches, respectively, are only to be
updated upon feature or stable releases based on the associated
tags. Updates to the stable release in between stable releases
(for example, back-ported bug fixes) are first merged into the "maintenance"
branch and then into the "stable" branch as update releases.
Pull requests may also be submitted to (long-running) feature branches
created by LAMMPS developers inside the LAMMPS project, if needed. Those
are not subject to the merge and review restrictions discussed in this
document, though, but get managed as needed on a case-by-case basis.
### Pull Request Assignments
Pull requests can be "chaperoned" by one of the LAMMPS core developers.
This is indicated by who the pull request is assigned to. LAMMPS core
developers can self-assign or they can decide to assign a pull request
This is indicated by whom the pull request is assigned to. LAMMPS core
developers can self-assign, or they can decide to assign a pull request
to a different LAMMPS developer. Being assigned to a pull request means,
that this pull request may need some work and the assignee is tasked to
determine whether this might be needed or not, and may either implement
the required changes or ask the submitter of the pull request to implement
them. Even though, all LAMMPS developers may have write access to pull
requests (if enabled by the submitter, which is the default), only the
submitter or the assignee of a pull request may do so. During this
period the `work_in_progress` label may be applied to the pull
request. The assignee gets to decide what happens to the pull request
next, e.g. whether it should be assigned to a different developer for
additional checks and changes, or is recommended to be merged. Removing
the `work_in_progress` label and assigning the pull request to the
developer tasked with merging signals that a pull request is ready to be
merged. In addition, a `ready_for_merge` label may also be assigned
to signal urgency to merge this pull request quickly.
determine whether this might be needed or not. The assignee may either
choose to implement required changes or ask the submitter of the pull
request to implement them. Even though, all LAMMPS developers may have
write access to pull requests (if enabled by the submitter, which is the
default), only the submitter or the assignee of a pull request should do
so. During this period, the `work_in_progress` label may be applied to
the pull request. The assignee gets to decide what happens to the pull
request next, e.g. whether it should be assigned to a different
developer for additional checks and changes, or is recommended to be
merged. Removing the `work_in_progress` label and assigning the pull
request to the developer tasked with merging signals that a pull request
is ready to be merged. In addition, a `ready_for_merge` label may also
be assigned to signal urgency to merge this pull request quickly.
### Pull Request Reviews
@ -70,32 +73,33 @@ People can be assigned to review a pull request in two ways:
* They can be assigned manually to review a pull request
by the submitter or a LAMMPS developer
* They can be automatically assigned, because a developers matches
a file pattern in the `.github/CODEOWNERS` file, which associates
developers with the code they contributed and maintain.
* They can be automatically assigned, because a developer's GitHub
handle matches a file pattern in the `.github/CODEOWNERS` file,
which associates developers with the code they contributed and
maintain.
Reviewers are requested to state their appraisal of the proposed changes
and either approve or request changes. People may unassign themselves
from review, if they feel not competent about the changes proposed. At
least two approvals from LAMMPS developers with write access are required
before merging in addition to the automated compilation tests.
Merging counts as implicit approval, so does submission of a pull request
(by a LAMMPS developer). So the person doing the merge may not also submit
an approving review. The feature, that reviews from code owners are "hard"
reviews (i.e. they must all be approved before merging is allowed), is
currently disabled and it is in the discretion of the merge maintainer to
assess when a sufficient degree of approval, especially from external
contributors, has been reached in these cases. Reviews may be
(automatically) dismissed, when the reviewed code has been changed,
and then approval is required a second time.
least two approvals from LAMMPS developers with write access are
required before merging, in addition to passing all automated
compilation and unit tests. Merging counts as implicit approval, so
does submission of a pull request (by a LAMMPS developer). So the person
doing the merge may not also submit an approving review. The GitHub
feature, that reviews from code owners are "hard" reviews (i.e. they
must all approve before merging is allowed), is currently disabled.
It is in the discretion of the merge maintainer to assess when a
sufficient degree of approval has been reached, especially from external
collaborators. Reviews may be (automatically) dismissed, when the
reviewed code has been changed. Review may be requested a second time.
### Pull Request Discussions
All discussions about a pull request should be kept as much as possible
on the pull request discussion page on GitHub, so that other developers
can later review the entire discussion after the fact and understand the
rationale behind choices made. Exceptions to this policy are technical
discussions, that are centered on tools or policies themselves
rationale behind choices that were made. Exceptions to this policy are
technical discussions, that are centered on tools or policies themselves
(git, GitHub, c++) rather than on the content of the pull request.
## GitHub Issues
@ -109,39 +113,47 @@ marker in the subject. This is automatically done when using the
corresponding template for submitting an issue. Issues may be assigned
to one or more developers, if they are working on this feature or
working to resolve an issue. Issues that have nobody working
on them at the moment or in the near future, have the label
on them at the moment, or in the near future, have the label
`volunteer needed` attached.
When an issue, say `#125` is resolved by a specific pull request,
the comment for the pull request shall contain the text `closes #125`
or `fixes #125`, so that the issue is automatically deleted when
the pull request is merged. The template for pull requests includes
a header where connections between pull requests and issues can be listed
and thus were this comment should be placed.
When an issue, say `#125` is resolved by a specific pull request, the
comment for the pull request shall contain the text `closes #125` or
`fixes #125`, so that the issue is automatically deleted when the pull
request is merged. The template for pull requests includes a header
where connections between pull requests and issues can be listed, and
thus where this comment should be placed.
## Milestones and Release Planning
## Release Planning
LAMMPS uses a continuous release development model with incremental
changes, i.e. significant effort is made - including automated pre-merge
testing - that the code in the branch "develop" does not get easily
changes, i.e. significant effort is made -- including automated pre-merge
testing -- that the code in the branch "develop" does not get easily
broken. These tests are run after every update to a pull request. More
extensive and time consuming tests (including regression testing) are
performed after code is merged to the "develop" branch. There are patch
releases of LAMMPS every 3-5 weeks at a point, when the LAMMPS
developers feel, that a sufficient amount of changes have happened, and
the post-merge testing has been successful. These patch releases are
extensive and time-consuming tests (including regression testing) are
performed after code is merged to the "develop" branch. There are feature
releases of LAMMPS made about every 4-6 weeks at a point, when the LAMMPS
developers feel, that a sufficient number of changes have been included
and all post-merge testing has been successful. These feature releases are
marked with a `patch_<version date>` tag and the "release" branch
follows only these versions (and thus is always supposed to be of
production quality, unlike "develop", which may be temporary broken, in
the case of larger change sets or unexpected incompatibilities or side
effects.
follows only these versions with fast-forward merges. While "develop" may
be temporarily broken through issues only detected by the post-merge tests,
The "release" branch is always supposed to be of production quality.
About 1-2 times each year, there are going to be "stable" releases of
LAMMPS. These have seen additional, manual testing and review of
results from testing with instrumented code and static code analysis.
Also, the last 1-3 patch releases before a stable release are "release
candidate" versions which only contain bugfixes and documentation
updates. For release planning and the information of code contributors,
issues and pull requests being actively worked on are assigned a
"milestone", which corresponds to the next stable release or the stable
release after that, with a tentative release date.
About once each year, there is a "stable" release of LAMMPS. These have
seen additional, manual testing and review of results from testing with
instrumented code and static code analysis. Also, the last few feature
releases before a stable release are "release candidate" versions which
only contain bug fixes, feature additions to peripheral functionality,
and documentation updates. In between stable releases, bug fixes and
infrastructure updates are back-ported from the "develop" branch to the
"maintenance" branch and occasionally merged into "stable" and published
as update releases.
## Project Management
For release planning and the information of code contributors, issues
and pull requests are being managed with GitHub Project Boards. There
are currently three boards: LAMMPS Feature Requests, LAMMPS Bug Reports,
and LAMMPS Pull Requests. Each board is organized in columns where
submissions are categorized. Within each column the entries are
(manually) sorted according their priority.

View File

@ -1,7 +1,7 @@
.TH LAMMPS "1" "22 December 2022" "2022-12-22"
.TH LAMMPS "1" "2 August 2023" "2023-08-2"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator. Version 22 December 2022
\- Molecular Dynamics Simulator. Version 2 August 2023
.SH SYNOPSIS
.B lmp

View File

@ -1,11 +1,11 @@
.TH MSI2LMP "1" "v3.9.9" "2018-11-05"
.TH MSI2LMP "1" "v3.9.10" "2023-03-10"
.SH NAME
.B MSI2LMP
\- Converter for Materials Studio files to LAMMPS
.SH SYNOPSIS
.B msi2lmp
<ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
[-help] <ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
.SH DESCRIPTION
.PP
@ -22,6 +22,9 @@ needed between .frc and .car/.mdf files are the atom types.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-help\fR,
Print detailed help message to the screen and stop.
.TP
\fB\<ROOTNAME>\fR
This has to be the first argument and is a
.B mandatory

View File

@ -63,7 +63,7 @@ In the src directory, there is one top-level Makefile and several
low-level machine-specific files named Makefile.xxx where xxx = the
machine name. If a low-level Makefile exists for your platform, you do
not need to edit the top-level Makefile. However you should check the
system-specific section of the low-level Makefile to insure the
system-specific section of the low-level Makefile to ensure the
various paths are correct for your environment. If a low-level
Makefile does not exist for your platform, you will need to add a
suitable target to the top-level Makefile. You will also need to

View File

@ -1206,7 +1206,7 @@ this command is not typically needed if the &quot;nonbond style&quot; and &quot;
an exception to this is if a short cutoff is used initially,
but a longer cutoff will be used for a subsequent run (in the same
input script), in this case the &quot;maximum cutoff&quot; command should be
used to insure enough memory is allocated for the later run
used to ensure enough memory is allocated for the later run
note that a restart file contains nonbond cutoffs (so it is not necessary
to use a &quot;nonbond style&quot; command before &quot;read restart&quot;), but LAMMPS
still needs to know what the maximum cutoff will be before the

View File

@ -203,7 +203,7 @@ Bibliography
A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005)
**(CasP)**
CasP webpage: https://www.helmholtz-berlin.de/people/gregor-schiwietz/casp_en.html
CasP webpage: http://www.casp-program.org/
**(Cawkwell2012)**
A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).

View File

@ -6,9 +6,9 @@ either traditional makefiles for use with GNU make (which may require
manual editing), or using a build environment generated by CMake (Unix
Makefiles, Ninja, Xcode, Visual Studio, KDevelop, CodeBlocks and more).
As an alternative you can download a package with pre-built executables
or automated build trees as described on the :doc:`Install <Install>`
page.
As an alternative, you can download a package with pre-built executables
or automated build trees, as described in the :doc:`Install <Install>`
section of the manual.
.. toctree::
:maxdepth: 1

View File

@ -44,7 +44,7 @@ standard. A more detailed discussion of that is below.
The executable created by CMake (after running make) is named
``lmp`` unless the ``LAMMPS_MACHINE`` option is set. When setting
``LAMMPS_MACHINE=name`` the executable will be called
``LAMMPS_MACHINE=name``, the executable will be called
``lmp_name``. Using ``BUILD_MPI=no`` will enforce building a
serial executable using the MPI STUBS library.
@ -60,7 +60,7 @@ standard. A more detailed discussion of that is below.
Any ``make machine`` command will look up the make settings from a
file ``Makefile.machine`` in the folder ``src/MAKE`` or one of its
sub-directories ``MINE``, ``MACHINES``, or ``OPTIONS``, create a
subdirectories ``MINE``, ``MACHINES``, or ``OPTIONS``, create a
folder ``Obj_machine`` with all objects and generated files and an
executable called ``lmp_machine``\ . The standard parallel build
with ``make mpi`` assumes a standard MPI installation with MPI
@ -107,9 +107,9 @@ MPI and OpenMP support in LAMMPS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you are installing MPI yourself to build a parallel LAMMPS
executable, we recommend either MPICH or OpenMPI which are regularly
executable, we recommend either MPICH or OpenMPI, which are regularly
used and tested with LAMMPS by the LAMMPS developers. MPICH can be
downloaded from the `MPICH home page <https://www.mpich.org>`_ and
downloaded from the `MPICH home page <https://www.mpich.org>`_, and
OpenMPI can be downloaded correspondingly from the `OpenMPI home page
<https://www.open-mpi.org>`_. Other MPI packages should also work. No
specific vendor provided and standard compliant MPI library is currently
@ -128,14 +128,14 @@ and adds vectorization support when compiled with compatible compilers,
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
package can be compiled to include OpenMP threading.
In addition, there are a few commands in LAMMPS that have native OpenMP
support included as well. These are commands in the ``MPIIO``,
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. In addition
some packages support OpenMP threading indirectly through the libraries
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``COLVARS``.
See the :doc:`Packages details <Packages_details>` page for more
info on these packages and the pages for their respective commands
for OpenMP threading info.
In addition, there are a few commands in LAMMPS that have native
OpenMP support included as well. These are commands in the ``MPIIO``,
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages.
Furthermore, some packages support OpenMP threading indirectly through
the libraries they interface to: e.g. ``KSPACE``, and ``COLVARS``.
See the :doc:`Packages details <Packages_details>` page for more info
on these packages, and the pages for their respective commands for
OpenMP threading info.
For CMake, if you use ``BUILD_OMP=yes``, you can use these packages
and turn on their native OpenMP support and turn on their native OpenMP
@ -144,9 +144,9 @@ variable before you launch LAMMPS.
For building via conventional make, the ``CCFLAGS`` and ``LINKFLAGS``
variables in Makefile.machine need to include the compiler flag that
enables OpenMP. For GNU compilers it is ``-fopenmp``\ . For (recent) Intel
compilers it is ``-qopenmp``\ . If you are using a different compiler,
please refer to its documentation.
enables OpenMP. For the GNU compilers or Clang, it is ``-fopenmp``\ .
For (recent) Intel compilers, it is ``-qopenmp``\ . If you are using a
different compiler, please refer to its documentation.
.. _default-none-issues:
@ -174,15 +174,16 @@ Choice of compiler and compile/link options
The choice of compiler and compiler flags can be important for maximum
performance. Vendor provided compilers for a specific hardware can
produce faster code than open-source compilers like the GNU compilers.
On the most common x86 hardware most popular C++ compilers are quite
similar in performance of C/C++ code at high optimization levels. When
using the ``INTEL`` package, there is a distinct advantage in using
the `Intel C++ compiler <intel_>`_ due to much improved vectorization
through SSE and AVX instructions on compatible hardware as the source
code includes changes and Intel compiler specific directives to enable
high degrees of vectorization. This may change over time as equivalent
vectorization directives are included into OpenMP standard revisions and
other compilers adopt them.
On the most common x86 hardware, the most popular C++ compilers are
quite similar in their ability to optimize regular C/C++ source code at
high optimization levels. When using the ``INTEL`` package, there is a
distinct advantage in using the `Intel C++ compiler <intel_>`_ due to
much improved vectorization through SSE and AVX instructions on
compatible hardware. The source code in that package conditionally
includes compiler specific directives to enable these high degrees of
vectorization. This may change over time as equivalent vectorization
directives are included into the OpenMP standard and other compilers
adopt them.
.. _intel: https://software.intel.com/en-us/intel-compilers
@ -196,7 +197,7 @@ LAMMPS.
.. tab:: CMake build
By default CMake will use the compiler it finds according to
internal preferences and it will add optimization flags
internal preferences, and it will add optimization flags
appropriate to that compiler and any :doc:`accelerator packages
<Speed_packages>` you have included in the build. CMake will
check if the detected or selected compiler is compatible with the
@ -250,9 +251,9 @@ LAMMPS.
and `-C ../cmake/presets/pgi.cmake`
will switch the compiler to the PGI compilers.
In addition you can set ``CMAKE_TUNE_FLAGS`` to specifically add
compiler flags to tune for optimal performance on given hosts. By
default this variable is empty.
Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add
compiler flags to tune for optimal performance on given hosts.
This variable is empty by default.
.. note::
@ -368,10 +369,10 @@ running LAMMPS from Python via its library interface.
# no default value
The compilation will always produce a LAMMPS library and an
executable linked to it. By default this will be a static library
named ``liblammps.a`` and an executable named ``lmp`` Setting
``BUILD_SHARED_LIBS=yes`` will instead produce a shared library
called ``liblammps.so`` (or ``liblammps.dylib`` or
executable linked to it. By default, this will be a static
library named ``liblammps.a`` and an executable named ``lmp``
Setting ``BUILD_SHARED_LIBS=yes`` will instead produce a shared
library called ``liblammps.so`` (or ``liblammps.dylib`` or
``liblammps.dll`` depending on the platform) If
``LAMMPS_MACHINE=name`` is set in addition, the name of the
generated libraries will be changed to either ``liblammps_name.a``
@ -429,7 +430,7 @@ You may need to use ``sudo make install`` in place of the last line if
you do not have write privileges for ``/usr/local/lib`` or use the
``--prefix`` configuration option to select an installation folder,
where you do have write access. The end result should be the file
``/usr/local/lib/libmpich.so``. On many Linux installations the folder
``/usr/local/lib/libmpich.so``. On many Linux installations, the folder
``${HOME}/.local`` is an alternative to using ``/usr/local`` and does
not require superuser or sudo access. In that case the configuration
step becomes:
@ -438,9 +439,10 @@ step becomes:
./configure --enable-shared --prefix=${HOME}/.local
Avoiding to use "sudo" for custom software installation (i.e. from source
and not through a package manager tool provided by the OS) is generally
recommended to ensure the integrity of the system software installation.
Avoiding the use of "sudo" for custom software installation (i.e. from
source and not through a package manager tool provided by the OS) is
generally recommended to ensure the integrity of the system software
installation.
----------
@ -487,8 +489,9 @@ using CMake or Make.
.. code-block:: bash
-D BUILD_TOOLS=value # yes or no (default)
-D BUILD_LAMMPS_SHELL=value # yes or no (default)
-D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt
-D BUILD_LAMMPS_SHELL=value # yes or no (default). Build lammps-shell
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build lammps-gui
The generated binaries will also become part of the LAMMPS installation
(see below).
@ -502,7 +505,6 @@ using CMake or Make.
make binary2txt # build only binary2txt tool
make chain # build only chain tool
make micelle2d # build only micelle2d tool
make thermo_extract # build only thermo_extract tool
cd lammps/tools/lammps-shell
make # build LAMMPS shell
@ -514,11 +516,11 @@ using CMake or Make.
Install LAMMPS after a build
------------------------------------------
After building LAMMPS, you may wish to copy the LAMMPS executable of
library, along with other LAMMPS files (library header, doc files) to
a globally visible place on your system, for others to access. Note
that you may need super-user privileges (e.g. sudo) if the directory
you want to copy files to is protected.
After building LAMMPS, you may wish to copy the LAMMPS executable or
library, along with other LAMMPS files (library header, doc files), to a
globally visible place on your system, for others to access. Note that
you may need super-user privileges (e.g. sudo) if the directory you want
to copy files to is protected.
.. tabs::
@ -536,7 +538,7 @@ you want to copy files to is protected.
environment variable, if you are installing LAMMPS into a non-system
location and/or are linking to libraries in a non-system location that
depend on such runtime path settings.
As an alternative you may set the CMake variable ``LAMMPS_INSTALL_RPATH``
As an alternative, you may set the CMake variable ``LAMMPS_INSTALL_RPATH``
to ``on`` and then the runtime paths for any linked shared libraries
and the library installation folder for the LAMMPS library will be
embedded and thus the requirement to set environment variables is avoided.

View File

@ -9,10 +9,10 @@ page.
The following text assumes some familiarity with CMake and focuses on
using the command line tool ``cmake`` and what settings are supported
for building LAMMPS. A more detailed tutorial on how to use ``cmake``
itself, the text mode or graphical user interface, change the generated
output files for different build tools and development environments is
on a :doc:`separate page <Howto_cmake>`.
for building LAMMPS. A more detailed tutorial on how to use CMake
itself, the text mode or graphical user interface, to change the
generated output files for different build tools and development
environments is on a :doc:`separate page <Howto_cmake>`.
.. note::
@ -22,12 +22,12 @@ on a :doc:`separate page <Howto_cmake>`.
.. warning::
You must not mix the :doc:`traditional make based <Build_make>`
LAMMPS build procedure with using CMake. Thus no packages may be
LAMMPS build procedure with using CMake. No packages may be
installed or a build been previously attempted in the LAMMPS source
directory by using ``make <machine>``. CMake will detect if this is
the case and generate an error. To remove conflicting files from the
``src`` you can use the command ``make no-all purge`` which will
un-install all packages and delete all auto-generated files.
uninstall all packages and delete all auto-generated files.
Advantages of using CMake
@ -44,9 +44,9 @@ software or for people that want to modify or extend LAMMPS.
and adapt the LAMMPS default build configuration accordingly.
- CMake can generate files for different build tools and integrated
development environments (IDE).
- CMake supports customization of settings with a text mode or graphical
user interface. No knowledge of file formats or and complex command
line syntax required.
- CMake supports customization of settings with a command line, text
mode, or graphical user interface. No knowledge of file formats or
complex command line syntax is required.
- All enabled components are compiled in a single build operation.
- Automated dependency tracking for all files and configuration options.
- Support for true out-of-source compilation. Multiple configurations
@ -55,23 +55,23 @@ software or for people that want to modify or extend LAMMPS.
source tree.
- Simplified packaging of LAMMPS for Linux distributions, environment
modules, or automated build tools like `Homebrew <https://brew.sh/>`_.
- Integration of automated regression testing (the LAMMPS side for that
is still under development).
- Integration of automated unit and regression testing (the LAMMPS side
of this is still under active development).
.. _cmake_build:
Getting started
^^^^^^^^^^^^^^^
Building LAMMPS with CMake is a two-step process. First you use CMake
to generate a build environment in a new directory. For that purpose
you can use either the command-line utility ``cmake`` (or ``cmake3``),
the text-mode UI utility ``ccmake`` (or ``ccmake3``) or the graphical
utility ``cmake-gui``, or use them interchangeably. The second step is
then the compilation and linking of all objects, libraries, and
executables. Here is a minimal example using the command line version of
CMake to build LAMMPS with no add-on packages enabled and no
customization:
Building LAMMPS with CMake is a two-step process. In the first step,
you use CMake to generate a build environment in a new directory. For
that purpose you can use either the command-line utility ``cmake`` (or
``cmake3``), the text-mode UI utility ``ccmake`` (or ``ccmake3``) or the
graphical utility ``cmake-gui``, or use them interchangeably. The
second step is then the compilation and linking of all objects,
libraries, and executables using the selected build tool. Here is a
minimal example using the command line version of CMake to build LAMMPS
with no add-on packages enabled and no customization:
.. code-block:: bash
@ -96,17 +96,17 @@ Compilation can take a long time, since LAMMPS is a large project with
many features. If your machine has multiple CPU cores (most do these
days), you can speed this up by compiling sources in parallel with
``make -j N`` (with N being the maximum number of concurrently executed
tasks). Also installation of the `ccache <https://ccache.dev/>`_ (=
Compiler Cache) software may speed up repeated compilation even more,
e.g. during code development.
tasks). Installation of the `ccache <https://ccache.dev/>`_ (= Compiler
Cache) software may speed up repeated compilation even more, e.g. during
code development, especially when repeatedly switching between branches.
After the initial build, whenever you edit LAMMPS source files, enable
or disable packages, change compiler flags or build options, you must
re-compile and relink the LAMMPS executable with ``cmake --build .`` (or
``make``). If the compilation fails for some reason, try running
``cmake .`` and then compile again. The included dependency tracking
should make certain that only the necessary subset of files are
re-compiled. You can also delete compiled objects, libraries and
should make certain that only the necessary subset of files is
re-compiled. You can also delete compiled objects, libraries, and
executables with ``cmake --build . --target clean`` (or ``make clean``).
After compilation, you may optionally install the LAMMPS executable into
@ -132,12 +132,12 @@ file called ``CMakeLists.txt`` (for LAMMPS it is located in the
``CMakeCache.txt``, which is generated at the end of the CMake
configuration step. The cache file contains all current CMake settings.
To modify settings, enable or disable features, you need to set *variables*
with either the *-D* command line flag (``-D VARIABLE1_NAME=value``) or
change them in the text mode of graphical user interface. The *-D* flag
can be used several times in one command.
To modify settings, enable or disable features, you need to set
*variables* with either the *-D* command line flag (``-D
VARIABLE1_NAME=value``) or change them in the text mode of the graphical
user interface. The *-D* flag can be used several times in one command.
For your convenience we provide :ref:`CMake presets <cmake_presets>`
For your convenience, we provide :ref:`CMake presets <cmake_presets>`
that combine multiple settings to enable optional LAMMPS packages or use
a different compiler tool chain. Those are loaded with the *-C* flag
(``-C ../cmake/presets/basic.cmake``). This step would only be needed
@ -155,22 +155,23 @@ specific CMake version is given when running ``cmake --help``.
Multi-configuration build systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Throughout this manual it is mostly assumed that LAMMPS is being built
Throughout this manual, it is mostly assumed that LAMMPS is being built
on a Unix-like operating system with "make" as the underlying "builder",
since this is the most common case. In this case the build "configuration"
is chose using ``-D CMAKE_BUILD_TYPE=<configuration>`` with ``<configuration>``
being one of "Release", "Debug", "RelWithDebInfo", or "MinSizeRel".
Some build tools, however, can also use or even require to have a so-called
multi-configuration build system setup. For those the built type (or
configuration) is chosen at compile time using the same build files. E.g.
with:
since this is the most common case. In this case the build
"configuration" is chose using ``-D CMAKE_BUILD_TYPE=<configuration>``
with ``<configuration>`` being one of "Release", "Debug",
"RelWithDebInfo", or "MinSizeRel". Some build tools, however, can also
use or even require having a so-called multi-configuration build system
setup. For a multi-configuration build, the built type (or
configuration) is selected at compile time using the same build
files. E.g. with:
.. code-block:: bash
cmake --build build-multi --config Release
In that case the resulting binaries are not in the build folder directly
but in sub-directories corresponding to the build type (i.e. Release in
but in subdirectories corresponding to the build type (i.e. Release in
the example from above). Similarly, for running unit tests the
configuration is selected with the *-C* flag:
@ -184,7 +185,7 @@ particular applicable to compiling packages that require additional libraries
that would be downloaded and compiled by CMake. The "windows" preset file
tries to keep track of which packages can be compiled natively with the
MSVC compilers out-of-the box. Not all of those external libraries are
portable to Windows either.
portable to Windows, either.
Installing CMake

View File

@ -46,7 +46,7 @@ It can be enabled for all C++ code with the following CMake flag
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.
significantly more time-consuming than the compilation itself.
----------
@ -523,6 +523,8 @@ The following options are available.
These should help to make source and documentation files conforming
to some the coding style preferences of the LAMMPS developers.
.. _clang-format:
Clang-format support
--------------------

View File

@ -43,11 +43,9 @@ This is the list of packages that may require additional steps.
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`LEPTON <lepton>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MDI <mdi>`
* :ref:`MESONT <mesont>`
* :ref:`ML-HDNNP <ml-hdnnp>`
* :ref:`ML-IAP <mliap>`
* :ref:`ML-PACE <ml-pace>`
@ -127,10 +125,11 @@ CMake build
-D GPU_API=value # value = opencl (default) or cuda or hip
-D GPU_PREC=value # precision setting
# value = double or mixed (default) or single
-D HIP_PATH # path to HIP installation. Must be set if GPU_API=HIP
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is sm_50
# value = sm_XX (see below, default is sm_50)
-D GPU_DEBUG=value # enable debug code in the GPU package library, mostly useful for developers
# value = yes or no (default)
-D HIP_PATH=value # value = path to HIP installation. Must be set if GPU_API=HIP
-D HIP_ARCH=value # primary GPU hardware choice for GPU_API=hip
# value depends on selected HIP_PLATFORM
# default is 'gfx906' for HIP_PLATFORM=amd and 'sm_50' for HIP_PLATFORM=nvcc
@ -141,6 +140,8 @@ CMake build
# value = yes or no (default)
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
# value = yes or no (default)
-D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU architectures
# value = yes (default) or no
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
# value = yes (default) or no
@ -159,38 +160,49 @@ CMake build
A more detailed list can be found, for example,
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
CMake can detect which version of the CUDA toolkit is used and thus will try
to include support for **all** major GPU architectures supported by this toolkit.
Thus the GPU_ARCH setting is merely an optimization, to have code for
the preferred GPU architecture directly included rather than having to wait
for the JIT compiler of the CUDA driver to translate it.
CMake can detect which version of the CUDA toolkit is used and thus will
try to include support for **all** major GPU architectures supported by
this toolkit. Thus the GPU_ARCH setting is merely an optimization, to
have code for the preferred GPU architecture directly included rather
than having to wait for the JIT compiler of the CUDA driver to translate
it. This behavior can be turned off (e.g. to speed up compilation) by
setting :code:`CUDA_ENABLE_MULTIARCH` to :code:`no`.
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the CUDA toolkit
is required and a GPU architecture of Kepler or later, which must *also* be
supported by the CUDA toolkit in use **and** the CUDA driver in use.
When compiling for OpenCL, OpenCL version 1.2 or later is required and the
GPU must be supported by the GPU driver and OpenCL runtime bundled with the driver.
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the
CUDA toolkit is required and a GPU architecture of Kepler or later,
which must *also* be supported by the CUDA toolkit in use **and** the
CUDA driver in use. When compiling for OpenCL, OpenCL version 1.2 or
later is required and the GPU must be supported by the GPU driver and
OpenCL runtime bundled with the driver.
When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
using the traditional build procedure. CMake will detect files generated by that
process and will terminate with an error and a suggestion for how to remove them.
When building with CMake, you **must NOT** build the GPU library in
``lib/gpu`` using the traditional build procedure. CMake will detect
files generated by that process and will terminate with an error and a
suggestion for how to remove them.
If you are compiling for OpenCL, the default setting is to download, build, and
link with a static OpenCL ICD loader library and standard OpenCL headers. This
way no local OpenCL development headers or library needs to be present and only
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
If you are compiling for OpenCL, the default setting is to download,
build, and link with a static OpenCL ICD loader library and standard
OpenCL headers. This way no local OpenCL development headers or library
needs to be present and only OpenCL compatible drivers need to be
installed to use OpenCL. If this is not desired, you can set
:code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
If you are compiling with HIP, note that before running CMake you will have to
set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
and the linker to work correctly.
The GPU library has some multi-thread support using OpenMP. If LAMMPS
is built with ``-D BUILD_OMP=on`` this will also be enabled.
Using CHIP-SPV implementation of HIP is now supported. It allows one to run HIP
code on Intel GPUs via the OpenCL or Level Zero backends. To use CHIP-SPV, you must
set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake command line as CHIP-SPV does not
yet support hipCUB. The use of HIP for Intel GPUs is still experimental so you
should only use this option in preparations to run on Aurora system at ANL.
If you are compiling with HIP, note that before running CMake you will
have to set appropriate environment variables. Some variables such as
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are
necessary for :code:`hipcc` and the linker to work correctly.
.. versionadded:: 3Aug2022
Using the CHIP-SPV implementation of HIP is supported. It allows one to
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
CHIP-SPV, you must set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
the use of HIP for Intel GPUs is experimental. You should only use this
option in preparations to run on Aurora system at Argonne.
.. code:: bash
@ -274,10 +286,13 @@ To enable GPU binning via CUDA performance primitives set the Makefile variable
most modern GPUs.
To support the CUDA multiprocessor server you can set the define
``-DCUDA_PROXY``. Please note that in this case you must **not** use
``-DCUDA_MPS_SUPPORT``. Please note that in this case you must **not** use
the CUDA performance primitives and thus set the variable ``CUDPP_OPT``
to empty.
The GPU library has some multi-thread support using OpenMP. You need to add
the compiler flag that enables OpenMP to the ``CUDR_OPTS`` Makefile variable.
If the library build is successful, 3 files should be created:
``lib/gpu/libgpu.a``\ , ``lib/gpu/nvc_get_devices``\ , and
``lib/gpu/Makefile.lammps``\ . The latter has settings that enable LAMMPS
@ -288,7 +303,7 @@ your machine are not correct, the LAMMPS build will fail, and
.. note::
If you re-build the GPU library in ``lib/gpu``, you should always
un-install the GPU package in ``lammps/src``, then re-install it and
uninstall the GPU package in ``lammps/src``, then re-install it and
re-build LAMMPS. This is because the compilation of files in the GPU
package uses the library settings from the ``lib/gpu/Makefile.machine``
used to build the GPU library.
@ -606,6 +621,12 @@ They must be specified in uppercase.
* - AMPERE86
- GPU
- NVIDIA Ampere generation CC 8.6 GPU
* - ADA89
- GPU
- NVIDIA Ada Lovelace generation CC 8.9 GPU
* - HOPPER90
- GPU
- NVIDIA Hopper generation CC 9.0 GPU
* - VEGA900
- GPU
- AMD GPU MI25 GFX900
@ -640,7 +661,7 @@ They must be specified in uppercase.
- GPU
- Intel GPU Ponte Vecchio
This list was last updated for version 3.7.0 of the Kokkos library.
This list was last updated for version 3.7.1 of the Kokkos library.
.. tabs::
@ -672,20 +693,11 @@ This list was last updated for version 3.7.0 of the Kokkos library.
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
-D Kokkos_ENABLE_CUDA=yes
-D Kokkos_ENABLE_OPENMP=yes
-D CMAKE_CXX_COMPILER=wrapper # wrapper = full path to Cuda nvcc wrapper
This will also enable executing FFTs on the GPU, either via the
internal KISSFFT library, or - by preference - with the cuFFT
library bundled with the CUDA toolkit, depending on whether CMake
can identify its location. The *wrapper* value for
``CMAKE_CXX_COMPILER`` variable is the path to the CUDA nvcc
compiler wrapper provided in the Kokkos library:
``lib/kokkos/bin/nvcc_wrapper``\ . The setting should include the
full path name to the wrapper, e.g.
.. code-block:: bash
-D CMAKE_CXX_COMPILER=${HOME}/lammps/lib/kokkos/bin/nvcc_wrapper
can identify its location.
For AMD or NVIDIA GPUs using HIP, set these variables:
@ -820,63 +832,6 @@ will thus always enable it.
----------
.. _latte:
LATTE package
-------------------------
To build with this package, you must download and build the LATTE
library.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes
-D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
If ``DOWNLOAD_LATTE`` is set, the LATTE library will be downloaded
and built inside the CMake build directory. If the LATTE library
is already on your system (in a location CMake cannot find it),
``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library
file, not the directory the library file is in.
The LATTE library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the LATTE build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
You can download and build the LATTE library manually if you
prefer; follow the instructions in ``lib/latte/README``\ . You
can also do it in one step from the ``lammps/src`` dir, using a
command like these, which simply invokes the
``lib/latte/Install.py`` script with the specified args:
.. code-block:: bash
make lib-latte # print help message
make lib-latte args="-b" # download and build in lib/latte/LATTE-master
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
# copy Makefile.lammps.gfortran to Makefile.lammps
Note that 3 symbolic (soft) links, ``includelink`` and ``liblink``
and ``filelink.o``, are created in ``lib/latte`` to point to
required folders and files in the LATTE home directory. When
LAMMPS itself is built it will use these links. You should also
check that the ``Makefile.lammps`` file you create is appropriate
for the compiler you use on your system to build LATTE.
----------
.. _lepton:
LEPTON package
@ -915,9 +870,9 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
.. code-block:: bash
$ make lib-lepton # print help message
$ make lib-lepton args="-m serial" # build with GNU g++ compiler (settings as with "make serial")
$ make lib-lepton args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-lepton # print help message
make lib-lepton args="-m serial" # build with GNU g++ compiler (settings as with "make serial")
make lib-lepton args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
The "machine" argument of the "-m" flag is used to find a
Makefile.machine to use as build recipe.
@ -926,6 +881,50 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/machdyn/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/machdyn/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-machdyn # print help message
make lib-machdyn args="-b" # download to lib/machdyn/eigen3
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/machdyn/Makefile.lammps`` file.
----------
.. _mliap:
ML-IAP package
@ -1129,7 +1128,7 @@ VORONOI package
-----------------------------
To build with this package, you must download and build the
`Voro++ library <https://math.lbl.gov/voro++>`_ or install a
`Voro++ library <https://math.lbl.gov/voro++/>`_ or install a
binary package provided by your operating system.
.. tabs::
@ -1359,7 +1358,7 @@ module included in the LAMMPS source distribution.
auto-generated consistent with those used in the core LAMMPS makefiles.
.. versionchanged:: TBD
.. versionchanged:: 8Feb2023
Please note that Colvars uses the Lepton library, which is now
included with the LEPTON package; if you use anything other than
@ -1391,8 +1390,21 @@ This package depends on the KSPACE package.
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_KSPACE=yes`` and
``-D PKG_ELECTRODE=yes``.
.. code-block:: bash
-D PKG_ELECTRODE=yes # enable the package itself
-D PKG_KSPACE=yes # the ELECTRODE package requires KSPACE
-D USE_INTERNAL_LINALG=value #
Features in the ELECTRODE package are dependent on code in the
KSPACE package so the latter one *must* be enabled.
The ELECTRODE package also requires LAPACK (and BLAS) and CMake
can identify their locations and pass that info to the ELECTRODE
build script. But on some systems this may cause problems when
linking or the dependency is not desired. Try enabling
``USE_INTERNAL_LINALG`` in those cases to use the bundled linear
algebra library and work around the limitation.
.. tab:: Traditional make
@ -1511,6 +1523,55 @@ ML-POD package
----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _plumed:
PLUMED package
@ -1839,48 +1900,6 @@ MDI package
----------
.. _mesont:
MESONT package
-------------------------
This package includes a library written in Fortran 90 in the
``lib/mesont`` folder, so a working Fortran 90 compiler is required to
compile it. Also, the files with the force field data for running the
bundled examples are not included in the source distribution. Instead
they will be downloaded the first time this package is installed.
.. tabs::
.. tab:: CMake build
No additional settings are needed besides ``-D PKG_MESONT=yes``
.. tab:: Traditional make
Before building LAMMPS, you must build the *mesont* library in
``lib/mesont``\ . You can also do it in one step from the
``lammps/src`` dir, using a command like these, which simply
invokes the ``lib/mesont/Install.py`` script with the specified
args:
.. code-block:: bash
make lib-mesont # print help message
make lib-mesont args="-m gfortran" # build with GNU g++ compiler (settings as with "make serial")
make lib-mesont args="-m ifort" # build with Intel icc compiler
The build should produce two files: ``lib/mesont/libmesont.a`` and
``lib/mesont/Makefile.lammps``\ . The latter is copied from an
existing ``Makefile.lammps.\*`` and has settings needed to build
LAMMPS with the *mesont* library (though typically the settings
contain only the Fortran runtime library). If necessary, you can
edit/create a new ``lib/mesont/Makefile.machine`` file for your
system, which should define an ``EXTRAMAKE`` variable to specify a
corresponding ``Makefile.lammps.machine`` file.
----------
.. _molfile:
MOLFILE package
@ -1987,10 +2006,10 @@ OPENMP package
Apple offers the `Xcode package and IDE
<https://developer.apple.com/xcode/>`_ for compiling software on
macOS, so you have likely installed it to compile LAMMPS. Their
compiler is based on `Clang <https://clang.llvm.org/>`, but while it
compiler is based on `Clang <https://clang.llvm.org/>`_, but while it
is capable of processing OpenMP directives, the necessary header
files and OpenMP runtime library are missing. The `R developers
<https://www.r-project.org/>` have figured out a way to build those
<https://www.r-project.org/>`_ have figured out a way to build those
in a compatible fashion. One can download them from
`https://mac.r-project.org/openmp/
<https://mac.r-project.org/openmp/>`_. Simply adding those files as
@ -2074,55 +2093,6 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _scafacos:
SCAFACOS package
@ -2170,50 +2140,6 @@ To build with this package, you must download and build the
----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/smd/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/smd/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-smd # print help message
make lib-smd args="-b" # download to lib/smd/eigen3
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/smd/Makefile.lammps`` file.
----------
.. _vtk:
VTK package

View File

@ -1,33 +1,32 @@
Link LAMMPS as a library to another code
========================================
LAMMPS is designed as a library of C++ objects that can be
integrated into other applications including Python scripts.
The files ``src/library.cpp`` and ``src/library.h`` define a
C-style API for using LAMMPS as a library. See the
:doc:`Howto_library` page
for a description of the interface and how to use it for your needs.
LAMMPS is designed as a library of C++ objects that can be integrated
into other applications, including Python scripts. The files
``src/library.cpp`` and ``src/library.h`` define a C-style API for using
LAMMPS as a library. See the :doc:`Howto_library` page for a
description of the interface and how to use it for your needs.
The :doc:`Build_basics` page explains how to build
LAMMPS as either a shared or static library. This results in a file
in the compilation folder called ``liblammps.a`` or ``liblammps_<name>.a``
in case of building a static library. In case of a shared library
the name is the same only that the suffix is going to be either ``.so``
or ``.dylib`` or ``.dll`` instead of ``.a`` depending on the OS.
In some cases the ``.so`` file may be a symbolic link to a file with
the suffix ``.so.0`` (or some other number).
The :doc:`Build_basics` page explains how to build LAMMPS as either a
shared or static library. This results in a file in the compilation
folder called ``liblammps.a`` or ``liblammps_<name>.a`` in case of
building a static library. In case of a shared library, the name is the
same only that the suffix is going to be either ``.so`` or ``.dylib`` or
``.dll`` instead of ``.a`` depending on the OS. In some cases, the
``.so`` file may be a symbolic link to a file with the suffix ``.so.0``
(or some other number).
.. note::
Care should be taken to use the same MPI library for the calling code
and the LAMMPS library unless LAMMPS is to be compiled without (real)
MPI support using the include STUBS MPI library.
and the LAMMPS library, unless LAMMPS is to be compiled without (real)
MPI support using the included STUBS MPI library.
Link with LAMMPS as a static library
------------------------------------
The calling application can link to LAMMPS as a static library with
compilation and link commands as in the examples shown below. These
compilation and link commands, as in the examples shown below. These
are examples for a code written in C in the file ``caller.c``.
The benefit of linking to a static library is, that the resulting
executable is independent of that library since all required
@ -142,10 +141,10 @@ Link with LAMMPS as a shared library
When linking to LAMMPS built as a shared library, the situation becomes
much simpler, as all dependent libraries and objects are either included
in the shared library or registered as a dependent library in the shared
library file. Thus those libraries need not to be specified when
linking the calling executable. Only the *-I* flags are needed. So the
example case from above of the serial version static LAMMPS library with
the POEMS package installed becomes:
library file. Thus, those libraries need not be specified when linking
the calling executable. Only the *-I* flags are needed. So the example
case from above of the serial version static LAMMPS library with the
POEMS package installed becomes:
.. tabs::

View File

@ -20,21 +20,22 @@ with :doc:`CMake <Build_cmake>`. The makefiles of the traditional
make based build process and the scripts they are calling expect a few
additional tools to be available and functioning.
* a working C/C++ compiler toolchain supporting the C++11 standard; on
Linux these are often the GNU compilers. Some older compilers
* A working C/C++ compiler toolchain supporting the C++11 standard; on
Linux, these are often the GNU compilers. Some older compiler versions
require adding flags like ``-std=c++11`` to enable the C++11 mode.
* a Bourne shell compatible "Unix" shell program (often this is ``bash``)
* a few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname``
* python (optional, required for ``make lib-<pkg>`` in the src folder).
python scripts are currently tested with python 2.7 and 3.6. The procedure
for :doc:`building the documentation <Build_manual>` requires python 3.5 or later.
* A Bourne shell compatible "Unix" shell program (frequently this is ``bash``)
* A few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname``
* Python (optional, required for ``make lib-<pkg>`` in the src
folder). Python scripts are currently tested with python 2.7 and
3.6 to 3.11. The procedure for :doc:`building the documentation
<Build_manual>` *requires* Python 3.5 or later.
Getting started
^^^^^^^^^^^^^^^
To include LAMMPS packages (i.e. optional commands and styles) you must
enable (or "install") them first, as discussed on the :doc:`Build
package <Build_package>` page. If a packages requires (provided or
package <Build_package>` page. If a package requires (provided or
external) libraries, you must configure and build those libraries
**before** building LAMMPS itself and especially **before** enabling
such a package with ``make yes-<package>``. :doc:`Building LAMMPS with
@ -56,36 +57,36 @@ Compilation can take a long time, since LAMMPS is a large project with
many features. If your machine has multiple CPU cores (most do these
days), you can speed this up by compiling sources in parallel with
``make -j N`` (with N being the maximum number of concurrently executed
tasks). Also installation of the `ccache <https://ccache.dev/>`_ (=
Compiler Cache) software may speed up repeated compilation even more,
e.g. during code development.
tasks). Installation of the `ccache <https://ccache.dev/>`_ (= Compiler
Cache) software may speed up repeated compilation even more, e.g. during
code development, especially when repeatedly switching between branches.
After the initial build, whenever you edit LAMMPS source files, or add
or remove new files to the source directory (e.g. by installing or
uninstalling packages), you must re-compile and relink the LAMMPS
executable with the same ``make <machine>`` command. The makefile's
dependency tracking should insure that only the necessary subset of
files are re-compiled. If you change settings in the makefile, you have
to recompile *everything*. To delete all objects you can use ``make
dependency tracking should ensure that only the necessary subset of
files is re-compiled. If you change settings in the makefile, you have
to recompile *everything*. To delete all objects, you can use ``make
clean-<machine>``.
.. note::
Before the actual compilation starts, LAMMPS will perform several
steps to collect information from the configuration and setup that
is then embedded into the executable. When you build LAMMPS for
the first time, it will also compile a tool to quickly assemble
a list of dependencies, that are required for the make program to
correctly detect which parts need to be recompiled after changes
were made to the sources.
steps to collect information from the configuration and setup that is
then embedded into the executable. When you build LAMMPS for the
first time, it will also compile a tool to quickly determine a list
of dependencies. Those are required for the make program to
correctly detect, which files need to be recompiled or relinked
after changes were made to the sources.
Customized builds and alternate makefiles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``src/MAKE`` directory tree contains the ``Makefile.<machine>``
files included in the LAMMPS distribution. Typing ``make example`` uses
``Makefile.example`` from one of those folders, if available. Thus the
``make serial`` and ``make mpi`` lines above use
``Makefile.example`` from one of those folders, if available. The
``make serial`` and ``make mpi`` lines above, for example, use
``src/MAKE/Makefile.serial`` and ``src/MAKE/Makefile.mpi``,
respectively. Other makefiles are in these directories:
@ -106,17 +107,18 @@ a new name, please edit the first line with the description and machine
name, so you will not confuse yourself, when looking at the machine
summary.
Makefiles you may wish to try include these (some require a package
first be installed). Many of these include specific compiler flags
for optimized performance. Please note, however, that some of these
customized machine Makefile are contributed by users. Since both
compilers, OS configurations, and LAMMPS itself keep changing, their
settings may become outdated:
Makefiles you may wish to try out, include those listed below (some
require a package first be installed). Many of these include specific
compiler flags for optimized performance. Please note, however, that
some of these customized machine Makefile are contributed by users, and
thus may have modifications specific to the systems of those users.
Since compilers, OS configurations, and LAMMPS itself keep changing,
their settings may become outdated, too:
.. code-block:: bash
make mac # build serial LAMMPS on a Mac
make mac_mpi # build parallel LAMMPS on a Mac
make mac # build serial LAMMPS on macOS
make mac_mpi # build parallel LAMMPS on macOS
make intel_cpu # build with the INTEL package optimized for CPUs
make knl # build with the INTEL package optimized for KNLs
make opt # build with the OPT package optimized for CPUs

View File

@ -2,7 +2,7 @@ Build the LAMMPS documentation
==============================
Depending on how you obtained LAMMPS and whether you have built the
manual yourself, this directory has a number of sub-directories and
manual yourself, this directory has a number of subdirectories and
files. Here is a list with descriptions:
.. code-block:: bash
@ -33,7 +33,7 @@ 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, that is the state
A current version of the manual (latest feature release, that is the state
of the *release* branch) is is available online at:
`https://docs.lammps.org/ <https://docs.lammps.org/>`_.
A version of the manual corresponding to the ongoing development (that is
@ -48,15 +48,15 @@ Build using GNU make
The LAMMPS manual is written in `reStructuredText <rst_>`_ format which
can be translated to different output format using the `Sphinx
<https://sphinx-doc.org>`_ document generator tool. It also
<https://www.sphinx-doc.org/>`_ document generator tool. It also
incorporates programmer documentation extracted from the LAMMPS C++
sources through the `Doxygen <https://doxygen.nl>`_ program. Currently
sources through the `Doxygen <https://doxygen.nl/>`_ program. Currently
the translation to HTML, PDF (via LaTeX), ePUB (for many e-book readers)
and MOBI (for Amazon Kindle readers) are supported. For that to work a
Python 3 interpreter, the ``doxygen`` tools and internet access to
download additional files and tools are required. This download is
usually only required once or after the documentation folder is returned
to a pristine state with ``make clean-all``.
Python interpreter version 3.8 or later, the ``doxygen`` tools and
internet access to download additional files and tools are required.
This download is usually only required once or after the documentation
folder is returned to a pristine state with ``make clean-all``.
For the documentation build a python virtual environment is set up in
the folder ``doc/docenv`` and various python packages are installed into
@ -87,6 +87,7 @@ folder. The following ``make`` commands are available:
make anchor_check # check for duplicate anchor labels
make style_check # check for complete and consistent style lists
make package_check # check for complete and consistent package lists
make link_check # check for broken or outdated URLs
make spelling # spell-check the manual
----------

View File

@ -4,13 +4,14 @@ Include packages in build
In LAMMPS, a package is a group of files that enable a specific set of
features. For example, force fields for molecular systems or
rigid-body constraints are in packages. In the src directory, each
package is a sub-directory with the package name in capital letters.
package is a subdirectory with the package name in capital letters.
An overview of packages is given on the :doc:`Packages <Packages>` doc
page. Brief overviews of each package are on the :doc:`Packages details <Packages_details>` page.
page. Brief overviews of each package are on the :doc:`Packages details
<Packages_details>` page.
When building LAMMPS, you can choose to include or exclude each
package. In general there is no need to include a package if you
package. Generally, there is no need to include a package if you
never plan to use its features.
If you get a run-time error that a LAMMPS command or style is
@ -45,11 +46,9 @@ packages:
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`LEPTON <lepton>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MDI <mdi>`
* :ref:`MESONT <mesont>`
* :ref:`ML-HDNNP <ml-hdnnp>`
* :ref:`ML-IAP <mliap>`
* :ref:`ML-PACE <ml-pace>`
@ -94,7 +93,7 @@ versus make.
If you switch between building with CMake and make builds, no
packages in the src directory can be installed when you invoke
``cmake``. CMake will give an error if that is not the case,
indicating how you can un-install all packages in the src dir.
indicating how you can uninstall all packages in the src dir.
.. tab:: Traditional make
@ -103,7 +102,7 @@ versus make.
cd lammps/src
make ps # check which packages are currently installed
make yes-name # install a package with name
make no-name # un-install a package with name
make no-name # uninstall a package with name
make mpi # build LAMMPS with whatever packages are now installed
Examples:
@ -119,13 +118,13 @@ versus make.
.. note::
You must always re-build LAMMPS (via make) after installing or
un-installing a package, for the action to take effect. The
uninstalling a package, for the action to take effect. The
included dependency tracking will make certain only files that
are required to be rebuilt are recompiled.
.. note::
You cannot install or un-install packages and build LAMMPS in a
You cannot install or uninstall packages and build LAMMPS in a
single make command with multiple targets, e.g. ``make
yes-colloid mpi``. This is because the make procedure creates
a list of source files that will be out-of-date for the build
@ -150,7 +149,7 @@ other files dependent on that package are also excluded.
if you downloaded a tarball, 3 packages (KSPACE, MANYBODY, MOLECULE)
were pre-installed via the traditional make procedure in the ``src``
directory. That is no longer the case, so that CMake will build
as-is without needing to un-install those packages.
as-is without needing to uninstall those packages.
----------
@ -167,9 +166,9 @@ control flow constructs for more complex operations.
LAMMPS includes several of these files to define configuration
"presets", similar to the options that exist for the Make based
system. Using these files you can enable/disable portions of the
available packages in LAMMPS. If you need a custom preset you can take
one of them as a starting point and customize it to your needs.
system. Using these files, you can enable/disable portions of the
available packages in LAMMPS. If you need a custom preset, you can
make a copy of one of them and modify it to suit your needs.
.. code-block:: bash
@ -183,7 +182,7 @@ one of them as a starting point and customize it to your needs.
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake # change settings to use the PGI compilers by default
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross compilers
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers
Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and
@ -227,7 +226,7 @@ The following commands are useful for managing package source files
and their installation when building LAMMPS via traditional make.
Just type ``make`` in lammps/src to see a one-line summary.
These commands install/un-install sets of packages:
These commands install/uninstall sets of packages:
.. code-block:: bash
@ -243,40 +242,40 @@ These commands install/un-install sets of packages:
make yes-ext # install packages that require external libraries
make no-ext # uninstall packages that require external libraries
which install/un-install various sets of packages. Typing ``make
which install/uninstall various sets of packages. Typing ``make
package`` will list all the these commands.
.. note::
Installing or un-installing a package for the make based build process
Installing or uninstalling a package for the make based build process
works by simply copying files back and forth between the main source
directory src and the sub-directories with the package name (e.g.
directory src and the subdirectories with the package name (e.g.
src/KSPACE, src/ATC), so that the files are included or excluded
when LAMMPS is built. Only source files in the src folder will be
compiled.
The following make commands help manage files that exist in both the
src directory and in package sub-directories. You do not normally
src directory and in package subdirectories. You do not normally
need to use these commands unless you are editing LAMMPS files or are
updating LAMMPS via git.
Type ``make package-status`` or ``make ps`` to show which packages are
currently installed. For those that are installed, it will list any
files that are different in the src directory and package
sub-directory.
subdirectory.
Type ``make package-installed`` or ``make pi`` to show which packages are
currently installed, without listing the status of packages that are
not installed.
Type ``make package-update`` or ``make pu`` to overwrite src files with
files from the package sub-directories if the package is installed. It
files from the package subdirectories if the package is installed. It
should be used after the checkout has been :doc:`updated or changed
withy git <Install_git>`, this will only update the files in the package
sub-directories, but not the copies in the src folder.
with git <Install_git>`, this will only update the files in the package
subdirectories, but not the copies in the src folder.
Type ``make package-overwrite`` to overwrite files in the package
sub-directories with src files.
subdirectories with src files.
Type ``make package-diff`` to list all differences between pairs of
files in both the source directory and the package directory.

View File

@ -1,8 +1,8 @@
Optional build settings
=======================
LAMMPS can be built with several optional settings. Each sub-section
explain how to do this for building both with CMake and make.
LAMMPS can be built with several optional settings. Each subsection
explains how to do this for building both with CMake and make.
* `C++11 standard compliance`_ when building all of LAMMPS
* `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command
@ -41,7 +41,7 @@ FFT library
When the KSPACE package is included in a LAMMPS build, the
:doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which
require use of an FFT library to compute 1d FFTs. The KISS FFT
library is included with LAMMPS but other libraries can be faster.
library is included with LAMMPS, but other libraries can be faster.
LAMMPS can use them if they are available on your system.
.. tabs::
@ -63,9 +63,9 @@ LAMMPS can use them if they are available on your system.
Usually these settings are all that is needed. If FFTW3 is
selected, then CMake will try to detect, if threaded FFTW
libraries are available and enable them by default. This setting
is independent of whether OpenMP threads are enabled and a
packages like KOKKOS or OPENMP is used. If CMake cannot detect
the FFT library, you can set these variables to assist:
is independent of whether OpenMP threads are enabled and a package
like KOKKOS or OPENMP is used. If CMake cannot detect the FFT
library, you can set these variables to assist:
.. code-block:: bash
@ -141,18 +141,18 @@ The Intel MKL math library is part of the Intel compiler suite. It
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
above).
Performing 3d FFTs in parallel can be time consuming due to data
access and required communication. This cost can be reduced by
performing single-precision FFTs instead of double precision. Single
precision means the real and imaginary parts of a complex datum are
4-byte floats. Double precision means they are 8-byte doubles. Note
that Fourier transform and related PPPM operations are somewhat less
sensitive to floating point truncation errors and thus the resulting
error is less than the difference in precision. Using the ``-DFFT_SINGLE``
setting trades off a little accuracy for reduced memory use and
parallel communication costs for transposing 3d FFT data.
Performing 3d FFTs in parallel can be time-consuming due to data access
and required communication. This cost can be reduced by performing
single-precision FFTs instead of double precision. Single precision
means the real and imaginary parts of a complex datum are 4-byte floats.
Double precision means they are 8-byte doubles. Note that Fourier
transform and related PPPM operations are somewhat less sensitive to
floating point truncation errors, and thus the resulting error is
generally less than the difference in precision. Using the
``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory
use and parallel communication costs for transposing 3d FFT data.
When using ``-DFFT_SINGLE`` with FFTW3 you may need to build the FFTW
When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW
library a second time with support for single-precision.
For FFTW3, do the following, which should produce the additional
@ -177,11 +177,11 @@ ARRAY mode.
Size of LAMMPS integer types and size limits
--------------------------------------------
LAMMPS has a few integer data types which can be defined as either
4-byte (= 32-bit) or 8-byte (= 64-bit) integers at compile time.
This has an impact on the size of a system that can be simulated
or how large counters can become before "rolling over".
The default setting of "smallbig" is almost always adequate.
LAMMPS uses a few custom integer data types, which can be defined as
either 4-byte (= 32-bit) or 8-byte (= 64-bit) integers at compile time.
This has an impact on the size of a system that can be simulated, or how
large counters can become before "rolling over". The default setting of
"smallbig" is almost always adequate.
.. tabs::
@ -254,7 +254,7 @@ topology information, though IDs are enabled by default. The
:doc:`atom_modify id no <atom_modify>` command will turn them off. Atom
IDs are required for molecular systems with bond topology (bonds,
angles, dihedrals, etc). Similarly, some force or compute or fix styles
require atom IDs. Thus if you model a molecular system or use one of
require atom IDs. Thus, if you model a molecular system or use one of
those styles with more than 2 billion atoms, you need the "bigbig"
setting.
@ -264,7 +264,7 @@ systems and 500 million for systems with bonds (the additional
restriction is due to using the 2 upper bits of the local atom index
in neighbor lists for storing special bonds info).
Image flags store 3 values per atom in a single integer which count the
Image flags store 3 values per atom in a single integer, which count the
number of times an atom has moved through the periodic box in each
dimension. See the :doc:`dump <dump>` manual page for a discussion. If
an atom moves through the periodic box more than this limit, the value
@ -285,7 +285,7 @@ Output of JPG, PNG, and movie files
--------------------------------------------------
The :doc:`dump image <dump_image>` command has options to output JPEG or
PNG image files. Likewise the :doc:`dump movie <dump_image>` command
PNG image files. Likewise, the :doc:`dump movie <dump_image>` command
outputs movie files in a variety of movie formats. Using these options
requires the following settings:
@ -354,7 +354,7 @@ Read or write compressed files
If this option is enabled, large files can be read or written with
compression by ``gzip`` or similar tools by several LAMMPS commands,
including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and
:doc:`dump <dump>`. Currently supported compression tools are:
:doc:`dump <dump>`. Supported compression tools are currently
``gzip``, ``bzip2``, ``zstd``, and ``lzma``.
.. tabs::
@ -394,7 +394,7 @@ Memory allocation alignment
---------------------------------------
This setting enables the use of the "posix_memalign()" call instead of
"malloc()" when LAMMPS allocates large chunks or memory. Vector
"malloc()" when LAMMPS allocates large chunks of memory. Vector
instructions on CPUs may become more efficient, if dynamically allocated
memory is aligned on larger-than-default byte boundaries. On most
current operating systems, the "malloc()" implementation returns
@ -496,7 +496,7 @@ Trigger selected floating-point exceptions
------------------------------------------
Many kinds of CPUs have the capability to detect when a calculation
results in an invalid math operation like a division by zero or calling
results in an invalid math operation, like a division by zero or calling
the square root with a negative argument. The default behavior on
most operating systems is to continue and have values for ``NaN`` (= not
a number) or ``Inf`` (= infinity). This allows software to detect and

View File

@ -42,6 +42,7 @@ OPT.
* :doc:`gaussian <bond_gaussian>`
* :doc:`gromos (o) <bond_gromos>`
* :doc:`harmonic (iko) <bond_harmonic>`
* :doc:`harmonic/restrain <bond_harmonic_restrain>`
* :doc:`harmonic/shift (o) <bond_harmonic_shift>`
* :doc:`harmonic/shift/cut (o) <bond_harmonic_shift_cut>`
* :doc:`lepton (o) <bond_lepton>`

View File

@ -46,12 +46,15 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`com/chunk <compute_com_chunk>`
* :doc:`contact/atom <compute_contact_atom>`
* :doc:`coord/atom (k) <compute_coord_atom>`
* :doc:`count/type <compute_count_type>`
* :doc:`damage/atom <compute_damage_atom>`
* :doc:`dihedral <compute_dihedral>`
* :doc:`dihedral/local <compute_dihedral_local>`
* :doc:`dilatation/atom <compute_dilatation_atom>`
* :doc:`dipole <compute_dipole>`
* :doc:`dipole/chunk <compute_dipole_chunk>`
* :doc:`dipole/tip4p <compute_dipole>`
* :doc:`dipole/tip4p/chunk <compute_dipole_chunk>`
* :doc:`displace/atom <compute_displace_atom>`
* :doc:`dpd <compute_dpd>`
* :doc:`dpd/atom <compute_dpd_atom>`
@ -61,7 +64,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`entropy/atom <compute_entropy_atom>`
* :doc:`erotate/asphere <compute_erotate_asphere>`
* :doc:`erotate/rigid <compute_erotate_rigid>`
* :doc:`erotate/sphere <compute_erotate_sphere>`
* :doc:`erotate/sphere (k) <compute_erotate_sphere>`
* :doc:`erotate/sphere/atom <compute_erotate_sphere_atom>`
* :doc:`event/displace <compute_event_displace>`
* :doc:`fabric <compute_fabric>`
@ -88,7 +91,6 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`ke/atom/eff <compute_ke_atom_eff>`
* :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`mesont <compute_mesont>`
* :doc:`mliap <compute_mliap>`
* :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>`
@ -105,6 +107,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`pe/tally <compute_tally>`
* :doc:`plasticity/atom <compute_plasticity_atom>`
* :doc:`pressure <compute_pressure>`
* :doc:`pressure/alchemy <compute_pressure_alchemy>`
* :doc:`pressure/uef <compute_pressure_uef>`
* :doc:`property/atom <compute_property_atom>`
* :doc:`property/chunk <compute_property_chunk>`
@ -150,11 +153,11 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`sph/t/atom <compute_sph_t_atom>`
* :doc:`spin <compute_spin>`
* :doc:`stress/atom <compute_stress_atom>`
* :doc:`stress/cartesian <compute_stress_profile>`
* :doc:`stress/cylinder <compute_stress_profile>`
* :doc:`stress/cartesian <compute_stress_cartesian>`
* :doc:`stress/cylinder <compute_stress_curvilinear>`
* :doc:`stress/mop <compute_stress_mop>`
* :doc:`stress/mop/profile <compute_stress_mop>`
* :doc:`stress/spherical <compute_stress_profile>`
* :doc:`stress/spherical <compute_stress_curvilinear>`
* :doc:`stress/tally <compute_tally>`
* :doc:`tdpd/cc/atom <compute_tdpd_cc_atom>`
* :doc:`temp (k) <compute_temp>`

View File

@ -29,6 +29,7 @@ OPT.
* :doc:`adapt/fep <fix_adapt_fep>`
* :doc:`addforce <fix_addforce>`
* :doc:`addtorque <fix_addtorque>`
* :doc:`alchemy <fix_alchemy>`
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
* :doc:`amoeba/pitorsion <fix_amoeba_pitorsion>`
* :doc:`append/atoms <fix_append_atoms>`
@ -44,9 +45,6 @@ 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>`
@ -54,6 +52,9 @@ OPT.
* :doc:`bond/react <fix_bond_react>`
* :doc:`bond/swap <fix_bond_swap>`
* :doc:`box/relax <fix_box_relax>`
* :doc:`brownian <fix_brownian>`
* :doc:`brownian/asphere <fix_brownian>`
* :doc:`brownian/sphere <fix_brownian>`
* :doc:`charge/regulation <fix_charge_regulation>`
* :doc:`cmap <fix_cmap>`
* :doc:`colvars <fix_colvars>`
@ -69,6 +70,7 @@ OPT.
* :doc:`dt/reset (k) <fix_dt_reset>`
* :doc:`edpd/source <fix_dpd_source>`
* :doc:`efield <fix_efield>`
* :doc:`efield/tip4p <fix_efield>`
* :doc:`ehex <fix_ehex>`
* :doc:`electrode/conp (i) <fix_electrode>`
* :doc:`electrode/conq (i) <fix_electrode>`
@ -92,6 +94,7 @@ OPT.
* :doc:`grem <fix_grem>`
* :doc:`halt <fix_halt>`
* :doc:`heat <fix_heat>`
* :doc:`heat/flow <fix_heat_flow>`
* :doc:`hyper/global <fix_hyper_global>`
* :doc:`hyper/local <fix_hyper_local>`
* :doc:`imd <fix_imd>`
@ -101,13 +104,13 @@ OPT.
* :doc:`langevin/drude <fix_langevin_drude>`
* :doc:`langevin/eff <fix_langevin_eff>`
* :doc:`langevin/spin <fix_langevin_spin>`
* :doc:`latte <fix_latte>`
* :doc:`lb/fluid <fix_lb_fluid>`
* :doc:`lb/momentum <fix_lb_momentum>`
* :doc:`lb/viscous <fix_lb_viscous>`
* :doc:`lineforce <fix_lineforce>`
* :doc:`manifoldforce <fix_manifoldforce>`
* :doc:`mdi/qm <fix_mdi_qm>`
* :doc:`mdi/qmmm <fix_mdi_qmmm>`
* :doc:`meso/move <fix_meso_move>`
* :doc:`mol/swap <fix_mol_swap>`
* :doc:`momentum (k) <fix_momentum>`
@ -168,7 +171,8 @@ OPT.
* :doc:`pafi <fix_pafi>`
* :doc:`pair <fix_pair>`
* :doc:`phonon <fix_phonon>`
* :doc:`pimd <fix_pimd>`
* :doc:`pimd/langevin <fix_pimd>`
* :doc:`pimd/nvt <fix_pimd>`
* :doc:`planeforce <fix_planeforce>`
* :doc:`plumed <fix_plumed>`
* :doc:`poems <fix_poems>`
@ -257,12 +261,13 @@ OPT.
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
* :doc:`wall/colloid <fix_wall>`
* :doc:`wall/ees <fix_wall_ees>`
* :doc:`wall/gran <fix_wall_gran>`
* :doc:`wall/gran (k) <fix_wall_gran>`
* :doc:`wall/gran/region <fix_wall_gran_region>`
* :doc:`wall/harmonic <fix_wall>`
* :doc:`wall/lj1043 <fix_wall>`
* :doc:`wall/lj126 <fix_wall>`
* :doc:`wall/lj93 (k) <fix_wall>`
* :doc:`wall/lepton <fix_wall>`
* :doc:`wall/morse <fix_wall>`
* :doc:`wall/piston <fix_wall_piston>`
* :doc:`wall/reflect (k) <fix_wall_reflect>`
@ -270,4 +275,5 @@ OPT.
* :doc:`wall/region <fix_wall_region>`
* :doc:`wall/region/ees <fix_wall_ees>`
* :doc:`wall/srd <fix_wall_srd>`
* :doc:`wall/table <fix_wall>`
* :doc:`widom <fix_widom>`

View File

@ -37,9 +37,10 @@ OPT.
*
* :doc:`adp (ko) <pair_adp>`
* :doc:`agni (o) <pair_agni>`
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
* :doc:`airebo (io) <pair_airebo>`
* :doc:`airebo/morse (io) <pair_airebo>`
* :doc:`amoeba <pair_amoeba>`
* :doc:`amoeba (g) <pair_amoeba>`
* :doc:`atm <pair_atm>`
* :doc:`awpmd/cut <pair_awpmd>`
* :doc:`beck (go) <pair_beck>`
@ -55,6 +56,7 @@ OPT.
* :doc:`born/coul/msm (o) <pair_born>`
* :doc:`born/coul/wolf (go) <pair_born>`
* :doc:`born/coul/wolf/cs (g) <pair_cs>`
* :doc:`born/gauss <pair_born_gauss>`
* :doc:`bpm/spring <pair_bpm_spring>`
* :doc:`brownian (o) <pair_brownian>`
* :doc:`brownian/poly (o) <pair_brownian>`
@ -126,7 +128,7 @@ OPT.
* :doc:`hbond/dreiding/lj (o) <pair_hbond_dreiding>`
* :doc:`hbond/dreiding/morse (o) <pair_hbond_dreiding>`
* :doc:`hdnnp <pair_hdnnp>`
* :doc:`hippo <pair_amoeba>`
* :doc:`hippo (g) <pair_amoeba>`
* :doc:`ilp/graphene/hbn (t) <pair_ilp_graphene_hbn>`
* :doc:`ilp/tmd (t) <pair_ilp_tmd>`
* :doc:`kolmogorov/crespi/full <pair_kolmogorov_crespi_full>`
@ -136,6 +138,7 @@ OPT.
* :doc:`lennard/mdf <pair_mdf>`
* :doc:`lepton (o) <pair_lepton>`
* :doc:`lepton/coul (o) <pair_lepton>`
* :doc:`lepton/sphere (o) <pair_lepton>`
* :doc:`line/lj <pair_line_lj>`
* :doc:`lj/charmm/coul/charmm (giko) <pair_charmm>`
* :doc:`lj/charmm/coul/charmm/implicit (ko) <pair_charmm>`
@ -166,16 +169,18 @@ OPT.
* :doc:`lj/cut/coul/msm (go) <pair_lj_cut_coul>`
* :doc:`lj/cut/coul/msm/dielectric <pair_dielectric>`
* :doc:`lj/cut/coul/wolf (o) <pair_lj_cut_coul>`
* :doc:`lj/cut/dipole/cut (go) <pair_dipole>`
* :doc:`lj/cut/dipole/cut (gko) <pair_dipole>`
* :doc:`lj/cut/dipole/long (g) <pair_dipole>`
* :doc:`lj/cut/dipole/sf (go) <pair_dipole>`
* :doc:`lj/cut/soft (o) <pair_fep_soft>`
* :doc:`lj/cut/sphere (o) <pair_lj_cut_sphere>`
* :doc:`lj/cut/thole/long (o) <pair_thole>`
* :doc:`lj/cut/tip4p/cut (o) <pair_lj_cut_tip4p>`
* :doc:`lj/cut/tip4p/long (got) <pair_lj_cut_tip4p>`
* :doc:`lj/cut/tip4p/long/soft (o) <pair_fep_soft>`
* :doc:`lj/expand (gko) <pair_lj_expand>`
* :doc:`lj/expand/coul/long (g) <pair_lj_expand>`
* :doc:`lj/expand/coul/long (gk) <pair_lj_expand>`
* :doc:`lj/expand/sphere (o) <pair_lj_expand_sphere>`
* :doc:`lj/gromacs (gko) <pair_gromacs>`
* :doc:`lj/gromacs/coul/gromacs (ko) <pair_gromacs>`
* :doc:`lj/long/coul/long (iot) <pair_lj_long>`
@ -200,11 +205,11 @@ OPT.
* :doc:`mdpd <pair_mesodpd>`
* :doc:`mdpd/rhosum <pair_mesodpd>`
* :doc:`meam (k) <pair_meam>`
* :doc:`meam/ms (k) <pair_meam>`
* :doc:`meam/spline (o) <pair_meam_spline>`
* :doc:`meam/sw/spline <pair_meam_sw_spline>`
* :doc:`mesocnt <pair_mesocnt>`
* :doc:`mesocnt/viscous <pair_mesocnt>`
* :doc:`mesont/tpm <pair_mesont_tpm>`
* :doc:`mgpt <pair_mgpt>`
* :doc:`mie/cut (g) <pair_mie>`
* :doc:`mliap (k) <pair_mliap>`

View File

@ -38,6 +38,20 @@ been folded into the :doc:`reset_atoms <reset_atoms>` command. If
present, LAMMPS will replace the commands accordingly and print a
warning.
LATTE package
-------------
.. deprecated:: 15Jun2023
The LATTE package with the fix latte command was removed from LAMMPS.
This functionality has been superseded by :doc:`fix mdi/qm <fix_mdi_qm>`
and :doc:`fix mdi/qmmm <fix_mdi_qmmm>` from the :ref:`MDI package
<PKG-MDI>`. These fixes are compatible with several quantum software
packages, including LATTE. See the ``examples/QUANTUM`` dir and the
:doc:`MDI coupling HOWTO <Howto_mdi>` page. MDI supports running LAMMPS
with LATTE as a plugin library (similar to the way fix latte worked), as
well as on a different set of MPI processors.
MEAM package
------------
@ -50,6 +64,27 @@ for some optimizations leading to better performance. The pair style
period the C++ version of MEAM was called USER-MEAMC so it could
coexist with the Fortran version.
Minimize style fire/old
-----------------------
.. deprecated:: 8Feb2023
Minimize style *fire/old* has been removed. Its functionality can be
reproduced with *fire* with specific options. Please see the
:doc:`min_modify command <min_modify>` documentation for details.
Pair style mesont/tpm, compute style mesont, atom style mesont
--------------------------------------------------------------
.. deprecated:: 8Feb2023
Pair style *mesont/tpm*, compute style *mesont*, and atom style
*mesont* have been removed from the :ref:`MESONT package <PKG-MESONT>`.
The same functionality is available through
:doc:`pair style mesocnt <pair_mesocnt>`,
:doc:`bond style mesocnt <bond_mesocnt>` and
:doc:`angle style mesocnt <angle_mesocnt>`.
REAX package
------------

View File

@ -13,6 +13,7 @@ of time and requests from the LAMMPS user community.
Developer_org
Developer_code_design
Developer_parallel
Developer_atom
Developer_comm_ops
Developer_flow
Developer_write

View File

@ -0,0 +1,88 @@
Accessing per-atom data
-----------------------
This page discusses how per-atom data is managed in LAMMPS, how it can
be accessed, what communication patters apply, and some of the utility
functions that exist for a variety of purposes.
Owned and ghost atoms
^^^^^^^^^^^^^^^^^^^^^
As described on the :doc:`parallel partitioning algorithms
<Developer_par_part>` page, LAMMPS uses a domain decomposition of the
simulation domain, either in a *brick* or *tiled* manner. Each MPI
process *owns* exactly one subdomain and the atoms within it. To compute
forces for tuples of atoms that are spread across sub-domain boundaries,
also a "halo" of *ghost* atoms are maintained within a the communication
cutoff distance of its subdomain.
The total number of atoms is stored in `Atom::natoms` (within any
typical class this can be referred to at `atom->natoms`. The number of
*owned* (or "local" atoms) are stored in `Atom::nlocal`; the number of
*ghost* atoms is stored in `Atom::nghost`. The sum of `Atom::nlocal`
over all MPI processes should be `Atom::natoms`. This is by default
regularly checked by the Thermo class, and if the sum does not match,
LAMMPS stops with a "lost atoms" error. For convenience also the
property `Atom::nmax` is available, this is the maximum of
`Atom::nlocal + Atom::nghost` across all MPI processes.
Per-atom properties are either managed by the atom style, or individual
classes. or as custom arrays by the individual classes. If only access
to *owned* atoms is needed, they are usually allocated to be of size
`Atom::nlocal`, otherwise of size `Atom::nmax`. Please note that not all
per-atom properties are available or updated on *ghost* atoms. For
example, per-atom velocities are only updated with :doc:`comm_modify vel
yes <comm_modify>`.
Atom indexing
^^^^^^^^^^^^^
When referring to individual atoms, they may be indexed by their local
*index*, their index in their `Atom::x` array. This is densely populated
containing first all *owned* atoms (index < `Atom::nlocal`) and then all
*ghost* atoms. The order of atoms in these arrays can change due to
atoms migrating between between subdomains, atoms being added or
deleted, or atoms being sorted for better cache efficiency. Atoms are
globally uniquely identified by their *atom ID*. There may be multiple
atoms with the same atom ID present, but only one of them may be an
*owned* atom.
To find the local *index* of an atom, when the *atom ID* is known, the
`Atom::map()` function may be used. It will return the local atom index
or -1. If the returned value is between 0 (inclusive) and `Atom::nlocal`
(exclusive) it is an *owned* or "local" atom; for larger values the atom
is present as a ghost atom; for a value of -1, the atom is not present
on the current subdomain at all.
If multiple atoms with the same tag exist in the same subdomain, they
can be found via the `Atom::sametag` array. It points to the next atom
index with the same tag or -1 if there are no more atoms with the same
tag. The list will be exhaustive when starting with an index of an
*owned* atom, since the atom IDs are unique, so there can only be one
such atom. Example code to count atoms with same atom ID in subdomain:
.. code-block:: c++
for (int i = 0; i < atom->nlocal; ++i) {
int count = 0;
while (sametag[i] >= 0) {
i = sametag[i];
++count;
}
printf("Atom ID: %ld is present %d times\n", atom->tag[i], count);
}
Atom class versus AtomVec classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The `Atom` class contains all kinds of flags and counters about atoms in
the system and that includes pointers to **all** per-atom properties
available for atoms. However, only a subset of these pointers are
non-NULL and which those are depends on the atom style. For each atom
style there is a corresponding `AtomVecXXX` class derived from the
`AtomVec` base class, where the XXX indicates the atom style. This
`AtomVecXXX` class will update the counters and per-atom pointers if
atoms are added or removed to the system or migrate between subdomains.

View File

@ -1,52 +1,53 @@
Code design
-----------
This section explains some of the code design choices in LAMMPS with
the goal of helping developers write new code similar to the existing
code. Please see the section on :doc:`Requirements for contributed
code <Modify_style>` for more specific recommendations and guidelines.
While that section is organized more in the form of a checklist for
code contributors, the focus here is on overall code design strategy,
choices made between possible alternatives, and discussing some
relevant C++ programming language constructs.
This section explains some code design choices in LAMMPS with the goal
of helping developers write new code similar to the existing code.
Please see the section on :doc:`Requirements for contributed code
<Modify_style>` for more specific recommendations and guidelines. While
that section is organized more in the form of a checklist for code
contributors, the focus here is on overall code design strategy, choices
made between possible alternatives, and discussing some relevant C++
programming language constructs.
Historically, the basic design philosophy of the LAMMPS C++ code was a
"C with classes" style. The motivation was to make it easy to modify
LAMMPS for people without significant training in C++ programming.
Data structures and code constructs were used that resemble the
previous implementation(s) in Fortran. A contributing factor to this
choice also was that at the time, C++ compilers were often not mature
and some of the advanced features contained bugs or did not function
as the standard required. There were also disagreements between
compiler vendors as to how to interpret the C++ standard documents.
LAMMPS for people without significant training in C++ programming. Data
structures and code constructs were used that resemble the previous
implementation(s) in Fortran. A contributing factor to this choice was
that at the time, C++ compilers were often not mature and some advanced
features contained bugs or did not function as the standard required.
There were also disagreements between compiler vendors as to how to
interpret the C++ standard documents.
However, C++ compilers have now advanced significantly. In 2020 we
decided to to require the C++11 standard as the minimum C++ language
standard for LAMMPS. Since then we have begun to also replace some of
the C-style constructs with equivalent C++ functionality, either from
the C++ standard library or as custom classes or functions, in order
to improve readability of the code and to increase code reuse through
abstraction of commonly used functionality.
However, C++ compilers and the C++ programming language have advanced
significantly. In 2020, the LAMMPS developers decided to require the
C++11 standard as the minimum C++ language standard for LAMMPS. Since
then, we have begun to replace C-style constructs with equivalent C++
functionality. This was taken either from the C++ standard library or
implemented as custom classes or functions. The goal is to improve
readability of the code and to increase code reuse through abstraction
of commonly used functionality.
.. note::
Please note that as of spring 2022 there is still a sizable chunk
of legacy code in LAMMPS that has not yet been refactored to
reflect these style conventions in full. LAMMPS has a large code
base and many different contributors and there also is a hierarchy
of precedence in which the code is adapted. Highest priority has
been the code in the ``src`` folder, followed by code in packages
in order of their popularity and complexity (simpler code is
adapted sooner), followed by code in the ``lib`` folder. Source
code that is downloaded from external packages or libraries during
compilation is not subject to the conventions discussed here.
Please note that as of spring 2023 there is still a sizable chunk of
legacy code in LAMMPS that has not yet been refactored to reflect
these style conventions in full. LAMMPS has a large code base and
many contributors. There is also a hierarchy of precedence in which
the code is adapted. Highest priority has been the code in the
``src`` folder, followed by code in packages in order of their
popularity and complexity (simpler code gets adapted sooner), followed
by code in the ``lib`` folder. Source code that is downloaded from
external packages or libraries during compilation is not subject to
the conventions discussed here.
Object oriented code
Object-oriented code
^^^^^^^^^^^^^^^^^^^^
LAMMPS is designed to be an object oriented code. Each simulation is
LAMMPS is designed to be an object-oriented code. Each simulation is
represented by an instance of the LAMMPS class. When running in
parallel each MPI process creates such an instance. This can be seen
parallel, each MPI process creates such an instance. This can be seen
in the ``main.cpp`` file where the core steps of running a LAMMPS
simulation are the following 3 lines of code:
@ -67,14 +68,14 @@ other special features.
The basic LAMMPS class hierarchy which is created by the LAMMPS class
constructor is shown in :ref:`class-topology`. When input commands
are processed, additional class instances are created, or deleted, or
replaced. Likewise specific member functions of specific classes are
replaced. Likewise, specific member functions of specific classes are
called to trigger actions such creating atoms, computing forces,
computing properties, time-propagating the system, or writing output.
Compositing and Inheritance
===========================
LAMMPS makes extensive use of the object oriented programming (OOP)
LAMMPS makes extensive use of the object-oriented programming (OOP)
principles of *compositing* and *inheritance*. Classes like the
``LAMMPS`` class are a **composite** containing pointers to instances
of other classes like ``Atom``, ``Comm``, ``Force``, ``Neighbor``,
@ -83,7 +84,7 @@ functionality by storing and manipulating data related to the
simulation and providing member functions that trigger certain
actions. Some of those classes like ``Force`` are themselves
composites, containing instances of classes describing different force
interactions. Similarly the ``Modify`` class contains a list of
interactions. Similarly, the ``Modify`` class contains a list of
``Fix`` and ``Compute`` classes. If the input commands that
correspond to these classes include the word *style*, then LAMMPS
stores only a single instance of that class. E.g. *atom_style*,
@ -100,19 +101,18 @@ derived class variant was instantiated. In LAMMPS these derived
classes are often referred to as "styles", e.g. pair styles, fix
styles, atom styles and so on.
This is the origin of the flexibility of LAMMPS. For example pair
This is the origin of the flexibility of LAMMPS. For example, pair
styles implement a variety of different non-bonded interatomic
potentials functions. All details for the implementation of a
potential are stored and executed in a single class.
As mentioned above, there can be multiple instances of classes derived
from the ``Fix`` or ``Compute`` base classes. They represent a
different facet of LAMMPS flexibility as they provide methods which
can be called at different points in time within a timestep, as
explained in `Developer_flow`. This allows the input script to tailor
how a specific simulation is run, what diagnostic computations are
performed, and how the output of those computations is further
processed or output.
different facet of LAMMPS' flexibility, as they provide methods which
can be called at different points within a timestep, as explained in
`Developer_flow`. This allows the input script to tailor how a specific
simulation is run, what diagnostic computations are performed, and how
the output of those computations is further processed or output.
Additional code sharing is possible by creating derived classes from the
derived classes (e.g., to implement an accelerated version of a pair
@ -164,15 +164,15 @@ The difference in behavior of the ``normal()`` and the ``poly()`` member
functions is which of the two member functions is called when executing
`base1->call()` versus `base2->call()`. Without polymorphism, a
function within the base class can only call member functions within the
same scope, that is ``Base::call()`` will always call
``Base::normal()``. But for the `base2->call()` case the call of the
same scope: that is, ``Base::call()`` will always call
``Base::normal()``. But for the `base2->call()` case, the call of the
virtual member function will be dispatched to ``Derived::poly()``
instead. This mechanism means that functions are called within the
scope of the class type that was used to *create* the class instance are
invoked; even if they are assigned to a pointer using the type of a base
class. This is the desired behavior and this way LAMMPS can even use
styles that are loaded at runtime from a shared object file with the
:doc:`plugin command <plugin>`.
instead. This mechanism results in calling functions that are within
the scope of the class that was used to *create* the instance, even if
they are assigned to a pointer for their base class. This is the
desired behavior, and this way LAMMPS can even use styles that are loaded
at runtime from a shared object file with the :doc:`plugin command
<plugin>`.
A special case of virtual functions are so-called pure functions. These
are virtual functions that are initialized to 0 in the class declaration
@ -189,12 +189,12 @@ This has the effect that an instance of the base class cannot be
created and that derived classes **must** implement these functions.
Many of the functions listed with the various class styles in the
section :doc:`Modify` are pure functions. The motivation for this is
to define the interface or API of the functions but defer their
to define the interface or API of the functions, but defer their
implementation to the derived classes.
However, there are downsides to this. For example, calls to virtual
functions from within a constructor, will not be in the scope of the
derived class and thus it is good practice to either avoid calling them
functions from within a constructor, will *not* be in the scope of the
derived class, and thus it is good practice to either avoid calling them
or to provide an explicit scope such as ``Base::poly()`` or
``Derived::poly()``. Furthermore, any destructors in classes containing
virtual functions should be declared virtual too, so they will be
@ -208,8 +208,8 @@ dispatch.
that are intended to replace a virtual or pure function use the
``override`` property keyword. For the same reason, the use of
overloads or default arguments for virtual functions should be
avoided as they lead to confusion over which function is supposed to
override which and which arguments need to be declared.
avoided, as they lead to confusion over which function is supposed to
override which, and which arguments need to be declared.
Style Factories
===============
@ -219,10 +219,10 @@ uses a programming pattern called `Factory`. Those are functions that
create an instance of a specific derived class, say ``PairLJCut`` and
return a pointer to the type of the common base class of that style,
``Pair`` in this case. To associate the factory function with the
style keyword, an ``std::map`` class is used with function pointers
style keyword, a ``std::map`` class is used with function pointers
indexed by their keyword (for example "lj/cut" for ``PairLJCut`` and
"morse" for ``PairMorse``). A couple of typedefs help keep the code
readable and a template function is used to implement the actual
readable, and a template function is used to implement the actual
factory functions for the individual classes. Below is an example
of such a factory function from the ``Force`` class as declared in
``force.h`` and implemented in ``force.cpp``. The file ``style_pair.h``
@ -279,26 +279,26 @@ from and writing to files and console instead of C++ "iostreams".
This is mainly motivated by better performance, better control over
formatting, and less effort to achieve specific formatting.
Since mixing "stdio" and "iostreams" can lead to unexpected
behavior. use of the latter is strongly discouraged. Also output to
the screen should not use the predefined ``stdout`` FILE pointer, but
rather the ``screen`` and ``logfile`` FILE pointers managed by the
LAMMPS class. Furthermore, output should generally only be done by
MPI rank 0 (``comm->me == 0``). Output that is sent to both
``screen`` and ``logfile`` should use the :cpp:func:`utils::logmesg()
convenience function <LAMMPS_NS::utils::logmesg>`.
Since mixing "stdio" and "iostreams" can lead to unexpected behavior,
use of the latter is strongly discouraged. Output to the screen should
*not* use the predefined ``stdout`` FILE pointer, but rather the
``screen`` and ``logfile`` FILE pointers managed by the LAMMPS class.
Furthermore, output should generally only be done by MPI rank 0
(``comm->me == 0``). Output that is sent to both ``screen`` and
``logfile`` should use the :cpp:func:`utils::logmesg() convenience
function <LAMMPS_NS::utils::logmesg>`.
We also discourage the use of stringstreams because the bundled {fmt}
library and the customized tokenizer classes can provide the same
functionality in a cleaner way with better performance. This also
helps maintain a consistent programming syntax with code from many
different contributors.
We discourage the use of stringstreams because the bundled {fmt} library
and the customized tokenizer classes provide the same functionality in a
cleaner way with better performance. This also helps maintain a
consistent programming syntax with code from many different
contributors.
Formatting with the {fmt} library
===================================
The LAMMPS source code includes a copy of the `{fmt} library
<https://fmt.dev>`_ which is preferred over formatting with the
<https://fmt.dev>`_, which is preferred over formatting with the
"printf()" family of functions. The primary reason is that it allows
a typesafe default format for any type of supported data. This is
particularly useful for formatting integers of a given size (32-bit or
@ -313,17 +313,16 @@ been included into the C++20 language standard, so changes to adopt it
are future-proof.
Formatted strings are frequently created by calling the
``fmt::format()`` function which will return a string as a
``std::string`` class instance. In contrast to the ``%`` placeholder
in ``printf()``, the {fmt} library uses ``{}`` to embed format
descriptors. In the simplest case, no additional characters are
needed as {fmt} will choose the default format based on the data type
of the argument. Otherwise the ``fmt::print()`` function may be
used instead of ``printf()`` or ``fprintf()``. In addition, several
LAMMPS output functions, that originally accepted a single string as
argument have been overloaded to accept a format string with optional
arguments as well (e.g., ``Error::all()``, ``Error::one()``,
``utils::logmesg()``).
``fmt::format()`` function, which will return a string as a
``std::string`` class instance. In contrast to the ``%`` placeholder in
``printf()``, the {fmt} library uses ``{}`` to embed format descriptors.
In the simplest case, no additional characters are needed, as {fmt} will
choose the default format based on the data type of the argument.
Otherwise, the ``fmt::print()`` function may be used instead of
``printf()`` or ``fprintf()``. In addition, several LAMMPS output
functions, that originally accepted a single string as argument have
been overloaded to accept a format string with optional arguments as
well (e.g., ``Error::all()``, ``Error::one()``, ``utils::logmesg()``).
Summary of the {fmt} format syntax
==================================
@ -332,10 +331,11 @@ The syntax of the format string is "{[<argument id>][:<format spec>]}",
where either the argument id or the format spec (separated by a colon
':') is optional. The argument id is usually a number starting from 0
that is the index to the arguments following the format string. By
default these are assigned in order (i.e. 0, 1, 2, 3, 4 etc.). The most
common case for using argument id would be to use the same argument in
multiple places in the format string without having to provide it as an
argument multiple times. In LAMMPS the argument id is rarely used.
default, these are assigned in order (i.e. 0, 1, 2, 3, 4 etc.). The
most common case for using argument id would be to use the same argument
in multiple places in the format string without having to provide it as
an argument multiple times. The argument id is rarely used in the LAMMPS
source code.
More common is the use of a format specifier, which starts with a colon.
This may optionally be followed by a fill character (default is ' '). If
@ -347,18 +347,19 @@ width, which may be followed by a dot '.' and a precision for floating
point numbers. The final character in the format string would be an
indicator for the "presentation", i.e. 'd' for decimal presentation of
integers, 'x' for hexadecimal, 'o' for octal, 'c' for character etc.
This mostly follows the "printf()" scheme but without requiring an
This mostly follows the "printf()" scheme, but without requiring an
additional length parameter to distinguish between different integer
widths. The {fmt} library will detect those and adapt the formatting
accordingly. For floating point numbers there are correspondingly, 'g'
for generic presentation, 'e' for exponential presentation, and 'f' for
fixed point presentation.
Thus "{:8}" would represent *any* type argument using at least 8
characters; "{:<8}" would do this as left aligned, "{:^8}" as centered,
"{:>8}" as right aligned. If a specific presentation is selected, the
argument type must be compatible or else the {fmt} formatting code will
throw an exception. Some format string examples are given below:
The format string "{:8}" would thus represent *any* type argument and be
replaced by at least 8 characters; "{:<8}" would do this as left
aligned, "{:^8}" as centered, "{:>8}" as right aligned. If a specific
presentation is selected, the argument type must be compatible or else
the {fmt} formatting code will throw an exception. Some format string
examples are given below:
.. code-block:: c++
@ -392,12 +393,12 @@ documentation <https://fmt.dev/latest/syntax.html>`_ website.
Memory management
^^^^^^^^^^^^^^^^^
Dynamical allocation of small data and objects can be done with the
the C++ commands "new" and "delete/delete[]. Large data should use
the member functions of the ``Memory`` class, most commonly,
``Memory::create()``, ``Memory::grow()``, and ``Memory::destroy()``,
which provide variants for vectors, 2d arrays, 3d arrays, etc.
These can also be used for small data.
Dynamical allocation of small data and objects can be done with the C++
commands "new" and "delete/delete[]". Large data should use the member
functions of the ``Memory`` class, most commonly, ``Memory::create()``,
``Memory::grow()``, and ``Memory::destroy()``, which provide variants
for vectors, 2d arrays, 3d arrays, etc. These can also be used for
small data.
The use of ``malloc()``, ``calloc()``, ``realloc()`` and ``free()``
directly is strongly discouraged. To simplify adapting legacy code
@ -408,26 +409,24 @@ perform additional error checks for safety.
Use of these custom memory allocation functions is motivated by the
following considerations:
- memory allocation failures on *any* MPI rank during a parallel run
will trigger an immediate abort of the entire parallel calculation
instead of stalling it
- a failing "new" will trigger an exception which is also captured by
LAMMPS and triggers a global abort
- allocation of multi-dimensional arrays will be done in a C compatible
fashion but so that the storage of the actual data is stored in one
large contiguous block. Thus when MPI communication is needed,
- Memory allocation failures on *any* MPI rank during a parallel run
will trigger an immediate abort of the entire parallel calculation.
- A failing "new" will trigger an exception, which is also captured by
LAMMPS and triggers a global abort.
- Allocation of multidimensional arrays will be done in a C compatible
fashion, but such that the storage of the actual data is stored in one
large contiguous block. Thus, when MPI communication is needed,
the data can be communicated directly (similar to Fortran arrays).
- the "destroy()" and "sfree()" functions may safely be called on NULL
pointers
- the "destroy()" functions will nullify the pointer variables making
"use after free" errors easy to detect
- it is possible to use a larger than default memory alignment (not on
- The "destroy()" and "sfree()" functions may safely be called on NULL
pointers.
- The "destroy()" functions will nullify the pointer variables, thus
making "use after free" errors easy to detect.
- It is possible to use a larger than default memory alignment (not on
all operating systems, since the allocated storage pointers must be
compatible with ``free()`` for technical reasons)
compatible with ``free()`` for technical reasons).
In the practical implementation of code this means that any pointer
variables that are class members should be initialized to a
``nullptr`` value in their respective constructors. That way it is
safe to call ``Memory::destroy()`` or ``delete[]`` on them before
*any* allocation outside the constructor. This helps prevent memory
leaks.
In the practical implementation of code this means, that any pointer
variables, that are class members should be initialized to a ``nullptr``
value in their respective constructors. That way, it is safe to call
``Memory::destroy()`` or ``delete[]`` on them before *any* allocation
outside the constructor. This helps prevent memory leaks.

View File

@ -14,8 +14,8 @@ Owned and ghost atoms
As described on the :doc:`parallel partitioning algorithms
<Developer_par_part>` page, LAMMPS spatially decomposes the simulation
domain, either in a *brick* or *tiled* manner. Each processor (MPI
task) owns atoms within its sub-domain and additionally stores ghost
atoms within a cutoff distance of its sub-domain.
task) owns atoms within its subdomain and additionally stores ghost
atoms within a cutoff distance of its subdomain.
Forward and reverse communication
=================================
@ -28,7 +28,7 @@ The need to do this communication arises when data from the owned atoms
is updated (e.g. their positions) and this updated information needs to
be **copied** to the corresponding ghost atoms.
And second, *reverse communication* which sends ghost atom information
And second, *reverse communication*, which sends ghost atom information
from each processor to the owning processor to **accumulate** (sum)
the values with the corresponding owned atoms. The need for this
arises when data is computed and also stored with ghost atoms
@ -58,7 +58,7 @@ embedded-atom method (EAM) which compute intermediate values in the
first part of the compute() function that need to be stored by both
owned and ghost atoms for the second part of the force computation.
The *Comm* class methods perform the MPI communication for buffers of
per-atom data. They "call back" to the *Pair* class so it can *pack*
per-atom data. They "call back" to the *Pair* class, so it can *pack*
or *unpack* the buffer with data the *Pair* class owns. There are 4
such methods that the *Pair* class must define, assuming it uses both
forward and reverse communication:
@ -70,22 +70,22 @@ forward and reverse communication:
The arguments to these methods include the buffer and a list of atoms
to pack or unpack. The *Pair* class also must set the *comm_forward*
and *comm_reverse* variables which store the number of values stored
and *comm_reverse* variables, which store the number of values stored
in the communication buffers for each operation. This means, if
desired, it can choose to store multiple per-atom values in the
buffer, and they will be communicated together to minimize
communication overhead. The communication buffers are defined vectors
containing ``double`` values. To correctly store integers that may be
64-bit (bigint, tagint, imageint) in the buffer, you need to use the
`ubuf union <Communication buffer coding with ubuf>`_ construct.
:ref:`ubuf union <communication_buffer_coding_with_ubuf>` construct.
The *Fix*, *Compute*, and *Dump* classes can also invoke the same kind
of forward and reverse communication operations using the same *Comm*
class methods. Likewise the same pack/unpack methods and
class methods. Likewise, the same pack/unpack methods and
comm_forward/comm_reverse variables must be defined by the calling
*Fix*, *Compute*, or *Dump* class.
For *Fix* classes there is an optional second argument to the
For *Fix* classes, there is an optional second argument to the
*forward_comm()* and *reverse_comm()* call which can be used when the
fix performs multiple modes of communication, with different numbers
of values per atom. The fix should set the *comm_forward* and
@ -150,7 +150,7 @@ latter case, when the *ring* operation is complete, each processor can
examine its original buffer to extract modified values.
Note that the *ring* operation is similar to an MPI_Alltoall()
operation where every processor effectively sends and receives data to
operation, where every processor effectively sends and receives data to
every other processor. The difference is that the *ring* operation
does it one step at a time, so the total volume of data does not need
to be stored by every processor. However, the *ring* operation is
@ -184,8 +184,8 @@ The *exchange_data()* method triggers the communication to be
performed. Each processor provides the vector of *N* datums to send,
and the size of each datum. All datums must be the same size.
The *create_atom()* and *exchange_atom()* methods are similar except
that the size of each datum can be different. Typically this is used
The *create_atom()* and *exchange_atom()* methods are similar, except
that the size of each datum can be different. Typically, this is used
to communicate atoms, each with a variable amount of per-atom data, to
other processors.

View File

@ -45,9 +45,9 @@ other methods in the class.
zero before each timestep, so that forces (torques, etc) can be
accumulated.
Now for the ``Verlet::run()`` method. Its basic structure in hi-level pseudo
code is shown below. In the actual code in ``src/verlet.cpp`` some of
these operations are conditionally invoked.
Now for the ``Verlet::run()`` method. Its basic structure in hi-level
pseudocode is shown below. In the actual code in ``src/verlet.cpp``
some of these operations are conditionally invoked.
.. code-block:: python
@ -105,17 +105,17 @@ need it. These flags are passed to the various methods that compute
particle interactions, so that they either compute and tally the
corresponding data or can skip the extra calculations if the energy and
virial are not needed. See the comments for the ``Integrate::ev_set()``
method which document the flag values.
method, which document the flag values.
At various points of the timestep, fixes are invoked,
e.g. ``fix->initial_integrate()``. In the code, this is actually done
via the Modify class which stores all the Fix objects and lists of which
via the Modify class, which stores all the Fix objects and lists of which
should be invoked at what point in the timestep. Fixes are the LAMMPS
mechanism for tailoring the operations of a timestep for a particular
simulation. As described elsewhere, each fix has one or more methods,
each of which is invoked at a specific stage of the timestep, as show in
the timestep pseudo-code. All the active fixes defined in an input
script, that are flagged to have an ``initial_integrate()`` method are
the timestep pseudocode. All the active fixes defined in an input
script, that are flagged to have an ``initial_integrate()`` method, are
invoked at the beginning of each timestep. Examples are :doc:`fix nve
<fix_nve>` or :doc:`fix nvt or fix npt <fix_nh>` which perform the
start-of-timestep velocity-Verlet integration operations to update
@ -131,15 +131,15 @@ can be changed using the :doc:`neigh_modify every/delay/check
<neigh_modify>` command. If not, coordinates of ghost atoms are
acquired by each processor via the ``forward_comm()`` method of the Comm
class. If neighbor lists need to be built, several operations within
the inner if clause of the pseudo-code are first invoked. The
the inner if clause of the pseudocode are first invoked. The
``pre_exchange()`` method of any defined fixes is invoked first.
Typically this inserts or deletes particles from the system.
Typically, this inserts or deletes particles from the system.
Periodic boundary conditions are then applied by the Domain class via
its ``pbc()`` method to remap particles that have moved outside the
simulation box back into the box. Note that this is not done every
timestep, but only when neighbor lists are rebuilt. This is so that
each processor's sub-domain will have consistent (nearby) atom
each processor's subdomain will have consistent (nearby) atom
coordinates for its owned and ghost atoms. It is also why dumped atom
coordinates may be slightly outside the simulation box if not dumped
on a step where the neighbor lists are rebuilt.
@ -148,15 +148,15 @@ The box boundaries are then reset (if needed) via the ``reset_box()``
method of the Domain class, e.g. if box boundaries are shrink-wrapped to
current particle coordinates. A change in the box size or shape
requires internal information for communicating ghost atoms (Comm class)
and neighbor list bins (Neighbor class) be updated. The ``setup()``
and neighbor list bins (Neighbor class) to be updated. The ``setup()``
method of the Comm class and ``setup_bins()`` method of the Neighbor
class perform the update.
The code is now ready to migrate atoms that have left a processor's
geometric sub-domain to new processors. The ``exchange()`` method of
geometric subdomain to new processors. The ``exchange()`` method of
the Comm class performs this operation. The ``borders()`` method of the
Comm class then identifies ghost atoms surrounding each processor's
sub-domain and communicates ghost atom information to neighboring
subdomain and communicates ghost atom information to neighboring
processors. It does this by looping over all the atoms owned by a
processor to make lists of those to send to each neighbor processor. On
subsequent timesteps, the lists are used by the ``Comm::forward_comm()``
@ -217,20 +217,21 @@ file, and restart files. See the :doc:`thermo_style <thermo_style>`,
:doc:`dump <dump>`, and :doc:`restart <restart>` commands for more
details.
The the flow of control during energy minimization iterations is
similar to that of a molecular dynamics timestep. Forces are computed,
neighbor lists are built as needed, atoms migrate to new processors, and
atom coordinates and forces are communicated to neighboring processors.
The only difference is what Fix class operations are invoked when. Only
a subset of LAMMPS fixes are useful during energy minimization, as
The flow of control during energy minimization iterations is similar to
that of a molecular dynamics timestep. Forces are computed, neighbor
lists are built as needed, atoms migrate to new processors, and atom
coordinates and forces are communicated to neighboring processors. The
only difference is what Fix class operations are invoked when. Only a
subset of LAMMPS fixes are useful during energy minimization, as
explained in their individual doc pages. The relevant Fix class methods
are ``min_pre_exchange()``, ``min_pre_force()``, and ``min_post_force()``.
Each fix is invoked at the appropriate place within the minimization
iteration. For example, the ``min_post_force()`` method is analogous to
the ``post_force()`` method for dynamics; it is used to alter or constrain
forces on each atom, which affects the minimization procedure.
are ``min_pre_exchange()``, ``min_pre_force()``, and
``min_post_force()``. Each fix is invoked at the appropriate place
within the minimization iteration. For example, the
``min_post_force()`` method is analogous to the ``post_force()`` method
for dynamics; it is used to alter or constrain forces on each atom,
which affects the minimization procedure.
After all iterations are completed there is a ``cleanup`` step which
After all iterations are completed, there is a ``cleanup`` step which
calls the ``post_run()`` method of fixes to perform operations only required
at the end of a calculations (like freeing temporary storage or creating
at the end of a calculation (like freeing temporary storage or creating
final outputs).

View File

@ -28,9 +28,9 @@ grid.
More specifically, a grid point is defined for each cell (by default
the center point), and a processor owns a grid cell if its point is
within the processor's spatial sub-domain. The union of processor
sub-domains is the global simulation box. If a grid point is on the
boundary of two sub-domains, the lower processor owns the grid cell. A
within the processor's spatial subdomain. The union of processor
subdomains is the global simulation box. If a grid point is on the
boundary of two subdomains, the lower processor owns the grid cell. A
processor may also store copies of ghost cells which surround its
owned cells.
@ -62,7 +62,7 @@ y-dimension. It is even possible to define a 1x1x1 3d grid, though it
may be inefficient to use it in a computational sense.
Note that the choice of grid size is independent of the number of
processors or their layout in a grid of processor sub-domains which
processors or their layout in a grid of processor subdomains which
overlays the simulations domain. Depending on the distributed grid
size, a single processor may own many 1000s or no grid cells.
@ -70,7 +70,7 @@ A command can define multiple grids, each of a different size. Each
grid is an instantiation of the Grid2d or Grid3d class.
The command also defines what data it will store for each grid it
creates and it allocates the multi-dimensional array(s) needed to
creates and it allocates the multidimensional array(s) needed to
store the data. No grid cell data is stored within the Grid2d or
Grid3d classes.
@ -92,8 +92,8 @@ Arguments for these methods can be values returned by the
*setup_grid()* method (described below), which define the extent of
the grid cells (owned+ghost) the processor owns. These 4 methods
allocate memory for 2d (first two) and 3d (second two) grid data. The
two methods that end in "_one" allocate an array which stores a single
value per grid cell. The two that end in "_multi" allocate an array
two methods that end in "_offset" allocate an array which stores a single
value per grid cell. The two that end in "_last" allocate an array
which stores *Nvalues* per grid cell.
.. code-block:: c++
@ -115,7 +115,7 @@ which stores *Nvalues* per grid cell.
nyhi_out, nxlo_out, nxhi_out, nvalues,
"data3d_multi");
Note that these multi-dimensional arrays are allocated as contiguous
Note that these multidimensional arrays are allocated as contiguous
chunks of memory where the x-index of the grid varies fastest, then y,
and the z-index slowest. For multiple values per grid cell, the
Nvalues are contiguous, so their index varies even faster than the
@ -160,7 +160,7 @@ cells (the entire allocated grid).
Grid class constructors
^^^^^^^^^^^^^^^^^^^^^^^
The following sub-sections describe the public methods of the Grid3d
The following subsections describe the public methods of the Grid3d
class which a style command can invoke. The Grid2d methods are
similar; simply remove arguments which refer to the z-dimension.
@ -235,7 +235,7 @@ invoked, because they influence its operation.
void set_zfactor(double factor);
Processors own a grid cell if a point within the grid cell is inside
the processor's sub-domain. By default this is the center point of the
the processor's subdomain. By default this is the center point of the
grid cell. The *set_shift_grid()* method can change this. The *shift*
argument is a value from 0.0 to 1.0 (inclusive) which is the offset of
the point within the grid cell in each dimension. The default is 0.5
@ -245,9 +245,9 @@ typically no need to change the default as it is optimal for
minimizing the number of ghost cells needed.
If a processor maps its particles to grid cells, it needs to allow for
its particles being outside its sub-domain between reneighboring. The
its particles being outside its subdomain between reneighboring. The
*distance* argument of the *set_distance()* method sets the furthest
distance outside a processor's sub-domain which a particle can move.
distance outside a processor's subdomain which a particle can move.
Typically this is half the neighbor skin distance, assuming
reneighboring is done appropriately. This distance is used in
determining how many ghost cells a processor needs to store to enable
@ -295,7 +295,7 @@ to the Grid class via the *set_zfactor()* method (*set_yfactor()* for
2d grids). The Grid class will then assign ownership of the 1/3 of
grid cells that overlay the simulation box to the processors which
also overlay the simulation box. The remaining 2/3 of the grid cells
are assigned to processors whose sub-domains are adjacent to the upper
are assigned to processors whose subdomains are adjacent to the upper
z boundary of the simulation box.
----------
@ -533,7 +533,7 @@ processor's ghost cells extend further than nearest neighbor
processors.
This can be checked by callers who have the option to change the
global grid size to insure more efficient nearest-neighbor-only
global grid size to ensure more efficient nearest-neighbor-only
communication if they wish. In this case, they instantiate a grid of
a given size (resolution), then invoke *setup_comm()* followed by
*ghost_adjacent()*. If the ghost cells are not adjacent, they destroy
@ -549,13 +549,13 @@ Grid class remap methods for load balancing
The following methods are used when a load-balancing operation,
triggered by the :doc:`balance <balance>` or :doc:`fix balance
<fix_balance>` commands, changes the partitioning of the simulation
domain into processor sub-domains.
domain into processor subdomains.
In order to work with load-balancing, any style command (compute, fix,
pair, or kspace style) which allocates a grid and stores per-grid data
should define a *reset_grid()* method; it takes no arguments. It will
be called by the two balance commands after they have reset processor
sub-domains and migrated atoms (particles) to new owning processors.
subdomains and migrated atoms (particles) to new owning processors.
The *reset_grid()* method will typically perform some or all of the
following operations. See the src/fix_ave_grid.cpp and
src/EXTRA_FIX/fix_ttm_grid.cpp files for examples of *reset_grid()*
@ -564,7 +564,7 @@ functions.
First, the *reset_grid()* method can instantiate new grid(s) of the
same global size, then call *setup_grid()* to partition them via the
new processor sub-domains. At this point, it can invoke the
new processor subdomains. At this point, it can invoke the
*identical()* method which compares the owned and ghost grid cell
index bounds between two grids, the old grid passed as a pointer
argument, and the new grid whose *identical()* method is being called.
@ -753,7 +753,7 @@ their input script syntax, as described on the :doc:`Howto_grid
* f_ID:gname:dname
* f_ID:gname:dname[I]
Each grid a command instantiates has a unique *gname*, defined by the
Each grid command instantiates has a unique *gname*, defined by the
command. Likewise each grid cell data structure (scalar or vector)
associated with a grid has a unique *dname*, also defined by the
command.
@ -784,8 +784,7 @@ The *get_grid_by_index()* method is called after the
*get_grid_by_name()* method, using the grid index it returned as its
argument. This method will return a pointer to the Grid2d or Grid3d
class. The caller can use this to query grid attributes, such as the
global size of the grid. The :doc:`dump grid <dump>` to insure each
its grid reference arguments are for grids of the same size.
global size of the grid, to ensure it is of the expected size.
The *get_griddata_by_name()* method takes a grid index *igrid* and a
data name as input. It returns two values. The *ncol* argument is
@ -799,7 +798,7 @@ A value of -1 is returned if the data name is not recognized.
The *get_griddata_by_index()* method is called after the
*get_griddata_by_name()* method, using the data index it returned as
its argument. This method will return a pointer to the
multi-dimensional array which stores the requested data.
multidimensional array which stores the requested data.
As in the discussion above of the Memory class *create_offset()*
methods, the dimensionality of the array associated with the returned

View File

@ -11,6 +11,7 @@ Available topics are:
- `Reading and parsing of text and text files`_
- `Requesting and accessing neighbor lists`_
- `Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM`_
- `Fix contributions to instantaneous energy, virial, and cumulative energy`_
- `KSpace PPPM FFT grids`_
@ -73,6 +74,8 @@ when converting "12.5", while the ValueTokenizer class will throw an
:cpp:func:`ValueTokenizer::next_int()
<LAMMPS_NS::ValueTokenizer::next_int>` is called on the same string.
.. _request-neighbor-list:
Requesting and accessing neighbor lists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -102,7 +105,7 @@ build is then :doc:`processed in parallel <Developer_par_neigh>`.
The most commonly required neighbor list is a so-called "half" neighbor
list, where each pair of atoms is listed only once (except when the
:doc:`newton command setting <newton>` for pair is off; in that case
pairs straddling sub-domains or periodic boundaries will be listed twice).
pairs straddling subdomains or periodic boundaries will be listed twice).
Thus these are the default settings when a neighbor list request is created in:
.. code-block:: c++
@ -216,6 +219,30 @@ command:
neighbor->add_request(this, "delete_atoms", NeighConst::REQ_FULL);
Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are multiple ways to manage per-atom data within LAMMPS. Often
the per-atom storage is only used locally and managed by the class that
uses it. If the data has to persist between multiple time steps and
migrate with atoms when they move from sub-domain to sub-domain or
across periodic boundaries, then using a custom atom style, or :doc:`fix
property/atom <fix_property_atom>`, or the internal fix STORE/ATOM are
possible options.
- Using the atom style is usually the most programming effort and mostly
needed when the per-atom data is an integral part of the model like a
per-atom charge or diameter and thus should be part of the Atoms
section of a :doc:`data file <read_data>`.
- Fix property/atom is useful if the data is optional or should be
entered by the user, or accessed as a (named) custom property. In this
case the fix should be entered as part of the input (and not
internally) which allows to enter and store its content with data files.
- Fix STORE/ATOM should be used when the data should be accessed internally
only and thus the fix can be created internally.
Fix contributions to instantaneous energy, virial, and cumulative energy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -361,7 +388,7 @@ allocated as a 1d vector or 3d array. Either way, the ordering of
values within contiguous memory x fastest, then y, z slowest.
For the ``3d decomposition`` of the grid, the global grid is
partitioned into bricks that correspond to the sub-domains of the
partitioned into bricks that correspond to the subdomains of the
simulation box that each processor owns. Often, this is a regular 3d
array (Px by Py by Pz) of bricks, where P = number of processors =
Px * Py * Pz. More generally it can be a tiled decomposition, where

View File

@ -7,7 +7,7 @@ but there are small a number of files in several other languages like C,
Fortran, Shell script, or Python.
The core of the code is located in the ``src`` folder and its
sub-directories. A sizable number of these files are in the ``src``
subdirectories. A sizable number of these files are in the ``src``
directory itself, but there are plenty of :doc:`packages <Packages>`,
which can be included or excluded when LAMMPS is built. See the
:doc:`Include packages in build <Build_package>` section of the manual
@ -15,42 +15,42 @@ for more information about that part of the build process. LAMMPS
currently supports building with :doc:`conventional makefiles
<Build_make>` and through :doc:`CMake <Build_cmake>`. Those procedures
differ in how packages are enabled or disabled for inclusion into a
LAMMPS binary so they cannot be mixed. The source files for each
package are in all-uppercase sub-directories of the ``src`` folder, for
LAMMPS binary, so they cannot be mixed. The source files for each
package are in all-uppercase subdirectories of the ``src`` folder, for
example ``src/MOLECULE`` or ``src/EXTRA-MOLECULE``. The ``src/STUBS``
sub-directory is not a package but contains a dummy MPI library, that is
subdirectory is not a package but contains a dummy MPI library, that is
used when building a serial version of the code. The ``src/MAKE``
directory and its sub-directories contain makefiles with settings and
directory and its subdirectories contain makefiles with settings and
flags for a variety of configuration and machines for the build process
with traditional makefiles.
The ``lib`` directory contains the source code for several supporting
libraries or files with configuration settings to use globally installed
libraries, that are required by some of the optional packages. They may
libraries, that are required by some optional packages. They may
include python scripts that can transparently download additional source
code on request. Each sub-directory, like ``lib/poems`` or ``lib/gpu``,
code on request. Each subdirectory, like ``lib/poems`` or ``lib/gpu``,
contains the source files, some of which are in different languages such
as Fortran or CUDA. These libraries included in the LAMMPS build,
if the corresponding package is installed.
as Fortran or CUDA. These libraries included in the LAMMPS build, if the
corresponding package is installed.
LAMMPS C++ source files almost always come in pairs, such as
``src/run.cpp`` (implementation file) and ``src/run.h`` (header file).
Each pair of files defines a C++ class, for example the
:cpp:class:`LAMMPS_NS::Run` class which contains the code invoked by the
:doc:`run <run>` command in a LAMMPS input script. As this example
:cpp:class:`LAMMPS_NS::Run` class, which contains the code invoked by
the :doc:`run <run>` command in a LAMMPS input script. As this example
illustrates, source file and class names often have a one-to-one
correspondence with a command used in a LAMMPS input script. Some
source files and classes do not have a corresponding input script
command, e.g. ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force`
command, for example ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force`
class. They are discussed in the next section.
The names of all source files are in lower case and may use the
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 Pointers and
Commands classes or the MathVec functions.
underscore character '_' to separate words. Apart from bundled,
externally maintained 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 few C++ classes
and utility functions are implemented with only a ``.h`` file. Examples
are the Pointers and Commands classes or the MathVec functions.
Class topology
--------------
@ -62,35 +62,36 @@ associated source files in the ``src`` folder, for example the class
:cpp:class:`LAMMPS_NS::Memory` corresponds to the files ``memory.cpp``
and ``memory.h``, or the class :cpp:class:`LAMMPS_NS::AtomVec`
corresponds to the files ``atom_vec.cpp`` and ``atom_vec.h``. Full
lines in the figure represent compositing: that is the class at the base
of the arrow holds a pointer to an instance of the class at the tip.
Dashed lines instead represent inheritance: the class to the tip of the
arrow is derived from the class at the base. Classes with a red boundary
are not instantiated directly, but they represent the base classes for
"styles". Those "styles" make up the bulk of the LAMMPS code and only
a few representative examples are included in the figure so it remains
readable.
lines in the figure represent compositing: that is, the class at the
base of the arrow holds a pointer to an instance of the class at the
tip. Dashed lines instead represent inheritance: the class at the tip
of the arrow is derived from the class at the base. Classes with a red
boundary are not instantiated directly, but they represent the base
classes for "styles". Those "styles" make up the bulk of the LAMMPS
code and only a few representative examples are included in the figure,
so it remains readable.
.. _class-topology:
.. figure:: JPG/lammps-classes.png
LAMMPS class topology
This figure shows some of the relations of the base classes of the
LAMMPS simulation package. Full lines indicate that a class holds an
instance of the class it is pointing to; dashed lines point to
derived classes that are given as examples of what classes may be
instantiated during a LAMMPS run based on the input commands and
accessed through the API define by their respective base classes. At
the core is the :cpp:class:`LAMMPS <LAMMPS_NS::LAMMPS>` class, which
holds pointers to class instances with specific purposes. Those may
hold instances of other classes, sometimes directly, or only
temporarily, sometimes as derived classes or derived classes of
derived classes, which may also hold instances of other classes.
This figure shows relations of base classes of the LAMMPS
simulation package. Full lines indicate that a class holds an
instance of the class it is pointing to; dashed lines point to
derived classes that are given as examples of what classes may be
instantiated during a LAMMPS run based on the input commands and
accessed through the API define by their respective base classes.
At the core is the :cpp:class:`LAMMPS <LAMMPS_NS::LAMMPS>` class,
which holds pointers to class instances with specific purposes.
Those may hold instances of other classes, sometimes directly, or
only temporarily, sometimes as derived classes or derived classes
of derived classes, which may also hold instances of other
classes.
The :cpp:class:`LAMMPS_NS::LAMMPS` class is the topmost class and
represents what is generally referred to an "instance" of LAMMPS. It is
a composite holding pointers to instances of other core classes
represents what is generally referred to as an "instance of LAMMPS". It
is a composite holding pointers to instances of other core classes
providing the core functionality of the MD engine in LAMMPS and through
them abstractions of the required operations. The constructor of the
LAMMPS class will instantiate those instances, process the command line
@ -102,42 +103,44 @@ LAMMPS while passing it the command line flags and input script. It
deletes the LAMMPS instance after the method reading the input returns
and shuts down the MPI environment before it exits the executable.
The :cpp:class:`LAMMPS_NS::Pointers` is not shown in the
The :cpp:class:`LAMMPS_NS::Pointers` class is not shown in the
:ref:`class-topology` figure for clarity. It holds references to many
of the members of the `LAMMPS_NS::LAMMPS`, so that all classes derived
from :cpp:class:`LAMMPS_NS::Pointers` have direct access to those
reference. From the class topology all classes with blue boundary are
references. From the class topology all classes with blue boundary are
referenced in the Pointers class and all classes in the second and third
columns, that are not listed as derived classes are instead derived from
:cpp:class:`LAMMPS_NS::Pointers`. To initialize the pointer references
in Pointers, a pointer to the LAMMPS class instance needs to be passed
to the constructor and thus all constructors for classes derived from it
must do so and pass this pointer to the constructor for Pointers.
columns, that are not listed as derived classes, are instead derived
from :cpp:class:`LAMMPS_NS::Pointers`. To initialize the pointer
references in Pointers, a pointer to the LAMMPS class instance needs to
be passed to the constructor. All constructors for classes derived from
it, must do so and thus pass that pointer to the constructor for
:cpp:class:`LAMMPS_NS::Pointers`. The default constructor for
:cpp:class:`LAMMPS_NS::Pointers` is disabled to enforce this.
Since all storage is supposed to be encapsulated (there are a few
exceptions), the LAMMPS class can also be instantiated multiple times by
a calling code. Outside of the aforementioned exceptions, those LAMMPS
a calling code. Outside the aforementioned exceptions, those LAMMPS
instances can be used alternately. As of the time of this writing
(early 2021) LAMMPS is not yet sufficiently thread-safe for concurrent
(early 2023) LAMMPS is not yet sufficiently thread-safe for concurrent
execution. When running in parallel with MPI, care has to be taken,
that suitable copies of communicators are used to not create conflicts
between different instances.
The LAMMPS class currently (early 2021) holds instances of 19 classes
representing the core functionality. There are a handful of virtual
parent classes in LAMMPS that define what LAMMPS calls ``styles``. They
are shaded red in the :ref:`class-topology` figure. Each of these are
parents of a number of child classes that implement the interface
defined by the parent class. There are two main categories of these
``styles``: some may only have one instance active at a time (e.g. atom,
pair, bond, angle, dihedral, improper, kspace, comm) and there is a
dedicated pointer variable for each of them in the composite class.
The LAMMPS class currently holds instances of 19 classes representing
the core functionality. There are a handful of virtual parent classes
in LAMMPS that define what LAMMPS calls ``styles``. These are shaded
red in the :ref:`class-topology` figure. Each of these are parents of a
number of child classes that implement the interface defined by the
parent class. There are two main categories of these ``styles``: some
may only have one instance active at a time (e.g. atom, pair, bond,
angle, dihedral, improper, kspace, comm) and there is a dedicated
pointer variable for each of them in the corresponding composite class.
Setups that require a mix of different such styles have to use a
*hybrid* class that takes the place of the one allowed instance and then
manages and forwards calls to the corresponding sub-styles for the
designated subset of atoms or data. The composite class may also have
lists of class instances, e.g. Modify handles lists of compute and fix
styles, while Output handles a list of dump class instances.
*hybrid* class instance that acts as a proxy, and manages and forwards
calls to the corresponding sub-style class instances for the designated
subset of atoms or data. The composite class may also have lists of
class instances, e.g. ``Modify`` handles lists of compute and fix
styles, while ``Output`` handles a list of dump class instances.
The exception to this scheme are the ``command`` style classes. These
implement specific commands that can be invoked before, after, or in
@ -146,19 +149,19 @@ command() method called and then, after completion, the class instance
deleted. Examples for this are the create_box, create_atoms, minimize,
run, set, or velocity command styles.
For all those ``styles`` certain naming conventions are employed: for
For all those ``styles``, certain naming conventions are employed: for
the fix nve command the class is called FixNVE and the source files are
``fix_nve.h`` and ``fix_nve.cpp``. Similarly for fix ave/time we have
``fix_nve.h`` and ``fix_nve.cpp``. Similarly, for fix ave/time we have
FixAveTime and ``fix_ave_time.h`` and ``fix_ave_time.cpp``. Style names
are lower case and without spaces or special characters. A suffix or
words are appended with a forward slash '/' which denotes a variant of
the corresponding class without the suffix. To connect the style name
and the class name, LAMMPS uses macros like: ``AtomStyle()``,
``PairStyle()``, ``BondStyle()``, ``RegionStyle()``, and so on in the
corresponding header file. During configuration or compilation files
corresponding header file. During configuration or compilation, files
with the pattern ``style_<name>.h`` are created that consist of a list
of include statements including all headers of all styles of a given
type that are currently active (or "installed).
type that are currently enabled (or "installed").
More details on individual classes in the :ref:`class-topology` are as
@ -172,8 +175,8 @@ follows:
that one or multiple simulations can be run, on the processors
allocated for a run, e.g. by the mpirun command.
- The Input class reads and processes input input strings and files,
stores variables, and invokes :doc:`commands <Commands_all>`.
- The Input class reads and processes input (strings and files), stores
variables, and invokes :doc:`commands <Commands_all>`.
- Command style classes are derived from the Command class. They provide
input script commands that perform one-time operations
@ -192,7 +195,7 @@ follows:
- The Atom class stores per-atom properties associated with atom styles.
More precisely, they are allocated and managed by a class derived from
the AtomVec class, and the Atom class simply stores pointers to them.
The classes derived from AtomVec represent the different atom styles
The classes derived from AtomVec represent the different atom styles,
and they are instantiated through the :doc:`atom_style <atom_style>`
command.
@ -206,18 +209,22 @@ follows:
class stores a single list (for all atoms). A NeighRequest class
instance is created by pair, fix, or compute styles when they need a
particular kind of neighbor list and use the NeighRequest properties
to select the neighbor list settings for the given request. There can
be multiple instances of the NeighRequest class and the Neighbor class
will try to optimize how they are computed by creating copies or
sub-lists where possible.
to select the neighbor list settings for the given request. There can
be multiple instances of the NeighRequest class. The Neighbor class
will try to optimize how the requests are processed. Depending on the
NeighRequest properties, neighbor lists are constructed from scratch,
aliased, or constructed by post-processing an existing list into
sub-lists.
- The Comm class performs inter-processor communication, typically of
ghost atom information. This usually involves MPI message exchanges
with 6 neighboring processors in the 3d logical grid of processors
mapped to the simulation box. There are two :doc:`communication styles
<comm_style>` enabling different ways to do the domain decomposition.
Sometimes the Irregular class is used, when atoms may migrate to
arbitrary processors.
<comm_style>`, enabling different ways to perform the domain
decomposition.
- The Irregular class is used, when atoms may migrate to arbitrary
processors.
- The Domain class stores the simulation box geometry, as well as
geometric Regions and any user definition of a Lattice. The latter
@ -246,7 +253,7 @@ follows:
file, dump file snapshots, and restart files. These correspond to the
:doc:`Thermo <thermo_style>`, :doc:`Dump <dump>`, and
:doc:`WriteRestart <write_restart>` classes respectively. The Dump
class is a base class with several derived classes implementing
class is a base class, with several derived classes implementing
various dump style variants.
- The Timer class logs timing information, output at the end

View File

@ -1,22 +1,22 @@
Communication
^^^^^^^^^^^^^
Following the partitioning scheme in use all per-atom data is
Following the selected partitioning scheme, all per-atom data is
distributed across the MPI processes, which allows LAMMPS to handle very
large systems provided it uses a correspondingly large number of MPI
processes. Since The per-atom data (atom IDs, positions, velocities,
types, etc.) To be able to compute the short-range interactions MPI
processes need not only access to data of atoms they "own" but also
information about atoms from neighboring sub-domains, in LAMMPS referred
types, etc.) To be able to compute the short-range interactions, MPI
processes need not only access to the data of atoms they "own" but also
information about atoms from neighboring subdomains, in LAMMPS referred
to as "ghost" atoms. These are copies of atoms storing required
per-atom data for up to the communication cutoff distance. The green
dashed-line boxes in the :ref:`domain-decomposition` figure illustrate
the extended ghost-atom sub-domain for one processor.
the extended ghost-atom subdomain for one processor.
This approach is also used to implement periodic boundary
conditions: atoms that lie within the cutoff distance across a periodic
boundary are also stored as ghost atoms and taken from the periodic
replication of the sub-domain, which may be the same sub-domain, e.g. if
replication of the subdomain, which may be the same subdomain, e.g. if
running in serial. As a consequence of this, force computation in
LAMMPS is not subject to minimum image conventions and thus cutoffs may
be larger than half the simulation domain.
@ -28,10 +28,10 @@ be larger than half the simulation domain.
ghost atom communication
This figure shows the ghost atom communication patterns between
sub-domains for "brick" (left) and "tiled" communication styles for
subdomains for "brick" (left) and "tiled" communication styles for
2d simulations. The numbers indicate MPI process ranks. Here the
sub-domains are drawn spatially separated for clarity. The
dashed-line box is the extended sub-domain of processor 0 which
subdomains are drawn spatially separated for clarity. The
dashed-line box is the extended subdomain of processor 0 which
includes its ghost atoms. The red- and blue-shaded boxes are the
regions of communicated ghost atoms.
@ -42,7 +42,7 @@ atom communication is performed in two stages for a 2d simulation (three
in 3d) for both a regular and irregular partitioning of the simulation
box. For the regular case (left) atoms are exchanged first in the
*x*-direction, then in *y*, with four neighbors in the grid of processor
sub-domains.
subdomains.
In the *x* stage, processor ranks 1 and 2 send owned atoms in their
red-shaded regions to rank 0 (and vice versa). Then in the *y* stage,
@ -55,11 +55,11 @@ For the irregular case (right) the two stages are similar, but a
processor can have more than one neighbor in each direction. In the
*x* stage, MPI ranks 1,2,3 send owned atoms in their red-shaded regions to
rank 0 (and vice versa). These include only atoms between the lower
and upper *y*-boundary of rank 0's sub-domain. In the *y* stage, ranks
and upper *y*-boundary of rank 0's subdomain. In the *y* stage, ranks
4,5,6 send atoms in their blue-shaded regions to rank 0. This may
include ghost atoms they received in the *x* stage, but only if they
are needed by rank 0 to fill its extended ghost atom regions in the
+/-*y* directions (blue rectangles). Thus in this case, ranks 5 and
+/-*y* directions (blue rectangles). Thus, in this case, ranks 5 and
6 do not include ghost atoms they received from each other (in the *x*
stage) in the atoms they send to rank 0. The key point is that while
the pattern of communication is more complex in the irregular
@ -78,14 +78,14 @@ A "reverse" communication is when computed ghost atom attributes are
sent back to the processor who owns the atom. This is used (for
example) to sum partial forces on ghost atoms to the complete force on
owned atoms. The order of the two stages described in the
:ref:`ghost-atom-comm` figure is inverted and the same lists of atoms
:ref:`ghost-atom-comm` figure is inverted, and the same lists of atoms
are used to pack and unpack message buffers with per-atom forces. When
a received buffer is unpacked, the ghost forces are summed to owned atom
forces. As in forward communication, forces on atoms in the four blue
corners of the diagrams are sent, received, and summed twice (once at
each stage) before owning processors have the full force.
These two operations are used many places within LAMMPS aside from
These two operations are used in many places within LAMMPS aside from
exchange of coordinates and forces, for example by manybody potentials
to share intermediate per-atom values, or by rigid-body integrators to
enable each atom in a body to access body properties. Here are
@ -105,16 +105,16 @@ performed in LAMMPS:
atom pairs when building neighbor lists or computing forces.
- The cutoff distance for exchanging ghost atoms is typically equal to
the neighbor cutoff. But it can also chosen to be longer if needed,
the neighbor cutoff. But it can also set to a larger value if needed,
e.g. half the diameter of a rigid body composed of multiple atoms or
over 3x the length of a stretched bond for dihedral interactions. It
can also exceed the periodic box size. For the regular communication
pattern (left), if the cutoff distance extends beyond a neighbor
processor's sub-domain, then multiple exchanges are performed in the
processor's subdomain, then multiple exchanges are performed in the
same direction. Each exchange is with the same neighbor processor,
but buffers are packed/unpacked using a different list of atoms. For
forward communication, in the first exchange a processor sends only
forward communication, in the first exchange, a processor sends only
owned atoms. In subsequent exchanges, it sends ghost atoms received
in previous exchanges. For the irregular pattern (right) overlaps of
a processor's extended ghost-atom sub-domain with all other processors
a processor's extended ghost-atom subdomain with all other processors
in each dimension are detected.

View File

@ -20,7 +20,7 @@ e) electric field values from grid points near each atom are interpolated to com
For any of the spatial-decomposition partitioning schemes each processor
owns the brick-shaped portion of FFT grid points contained within its
sub-domain. The two interpolation operations use a stencil of grid
subdomain. The two interpolation operations use a stencil of grid
points surrounding each atom. To accommodate the stencil size, each
processor also stores a few layers of ghost grid points surrounding its
brick. Forward and reverse communication of grid point values is
@ -40,31 +40,31 @@ orthogonal boxes.
.. _fft-parallel:
.. figure:: img/fft-decomp-parallel.png
:align: center
parallel FFT in PPPM
Parallel FFT in PPPM
Stages of a parallel FFT for a simulation domain overlaid
with an 8x8x8 3d FFT grid, partitioned across 64 processors.
Within each of the 4 diagrams, grid cells of the same color are
owned by a single processor; for simplicity only cells owned by 4
or 8 of the 64 processors are colored. The two images on the left
illustrate brick-to-pencil communication. The two images on the
right illustrate pencil-to-pencil communication, which in this
case transposes the *y* and *z* dimensions of the grid.
Stages of a parallel FFT for a simulation domain overlaid with an
8x8x8 3d FFT grid, partitioned across 64 processors. Within each
of the 4 diagrams, grid cells of the same color are owned by a
single processor; for simplicity, only cells owned by 4 or 8 of
the 64 processors are colored. The two images on the left
illustrate brick-to-pencil communication. The two images on the
right illustrate pencil-to-pencil communication, which in this
case transposes the *y* and *z* dimensions of the grid.
Parallel 3d FFTs require substantial communication relative to their
computational cost. A 3d FFT is implemented by a series of 1d FFTs
along the *x-*, *y-*, and *z-*\ direction of the FFT grid. Thus the FFT
grid cannot be decomposed like atoms into 3 dimensions for parallel
along the *x-*, *y-*, and *z-*\ direction of the FFT grid. Thus, the
FFT grid cannot be decomposed like atoms into 3 dimensions for parallel
processing of the FFTs but only in 1 (as planes) or 2 (as pencils)
dimensions and in between the steps the grid needs to be transposed to
have the FFT grid portion "owned" by each MPI process complete in the
direction of the 1d FFTs it has to perform. LAMMPS uses the
pencil-decomposition algorithm as shown in the :ref:`fft-parallel` figure.
pencil-decomposition algorithm as shown in the :ref:`fft-parallel`
figure.
Initially (far left), each processor owns a brick of same-color grid
cells (actually grid points) contained within in its sub-domain. A
cells (actually grid points) contained within in its subdomain. A
brick-to-pencil communication operation converts this layout to 1d
pencils in the *x*-dimension (center left). Again, cells of the same
color are owned by the same processor. Each processor can then compute
@ -97,7 +97,7 @@ across all $P$ processors with a single call to ``MPI_Alltoall()``, but
this is typically much slower. However, for the specialized brick and
pencil tiling illustrated in :ref:`fft-parallel` figure, collective
communication across the entire MPI communicator is not required. In
the example an :math:`8^3` grid with 512 grid cells is partitioned
the example, an :math:`8^3` grid with 512 grid cells is partitioned
across 64 processors; each processor owns a 2x2x2 3d brick of grid
cells. The initial brick-to-pencil communication (upper left to upper
right) only requires collective communication within subgroups of 4
@ -132,7 +132,7 @@ grid/particle operations that LAMMPS supports:
- The fftMPI library allows each grid dimension to be a multiple of
small prime factors (2,3,5), and allows any number of processors to
perform the FFT. The resulting brick and pencil decompositions are
thus not always as well-aligned but the size of subgroups of
thus not always as well-aligned, but the size of subgroups of
processors for the two modes of communication (brick/pencil and
pencil/pencil) still scale as :math:`O(P^{\frac{1}{3}})` and
:math:`O(P^{\frac{1}{2}})`.
@ -143,26 +143,28 @@ grid/particle operations that LAMMPS supports:
in memory. This reordering can be done during the packing or
unpacking of buffers for MPI communication.
- For large systems and particularly a large number of MPI processes,
the dominant cost for parallel FFTs is often the communication, not
the computation of 1d FFTs, even though the latter scales as :math:`N
\log(N)` in the number of grid points *N* per grid direction. This is
due to the fact that only a 2d decomposition into pencils is possible
while atom data (and their corresponding short-range force and energy
computations) can be decomposed efficiently in 3d.
- For large systems and particularly many MPI processes, the dominant
cost for parallel FFTs is often the communication, not the computation
of 1d FFTs, even though the latter scales as :math:`N \log(N)` in the
number of grid points *N* per grid direction. This is due to the fact
that only a 2d decomposition into pencils is possible while atom data
(and their corresponding short-range force and energy computations)
can be decomposed efficiently in 3d.
This can be addressed by reducing the number of MPI processes involved
in the MPI communication by using :doc:`hybrid MPI + OpenMP
parallelization <Speed_omp>`. This will use OpenMP parallelization
inside the MPI domains and while that may have a lower parallel
efficiency, it reduces the communication overhead.
Reducing the number of MPI processes involved in the MPI communication
will reduce this kind of overhead. By using a :doc:`hybrid MPI +
OpenMP parallelization <Speed_omp>` it is still possible to use all
processes for parallel computation. It will use OpenMP
parallelization inside the MPI domains. While that may have a lower
parallel efficiency for some part of the computation, that can be less
than the communication overhead in the 3d FFTs.
As an alternative it is also possible to start a :ref:`multi-partition
As an alternative, it is also possible to start a :ref:`multi-partition
<partition>` calculation and then use the :doc:`verlet/split
integrator <run_style>` to perform the PPPM computation on a
dedicated, separate partition of MPI processes. This uses an integer
"1:*p*" mapping of *p* sub-domains of the atom decomposition to one
sub-domain of the FFT grid decomposition and where pairwise non-bonded
"1:*p*" mapping of *p* subdomains of the atom decomposition to one
subdomain of the FFT grid decomposition and where pairwise non-bonded
and bonded forces and energies are computed on the larger partition
and the PPPM kspace computation concurrently on the smaller partition.
@ -172,10 +174,10 @@ grid/particle operations that LAMMPS supports:
- LAMMPS implements a ``GridComm`` class which overlays the simulation
domain with a regular grid, partitions it across processors in a
manner consistent with processor sub-domains, and provides methods for
manner consistent with processor subdomains, and provides methods for
forward and reverse communication of owned and ghost grid point
values. It is used for PPPM as an FFT grid (as outlined above) and
also for the MSM algorithm which uses a cascade of grid sizes from
also for the MSM algorithm, which uses a cascade of grid sizes from
fine to coarse to compute long-range Coulombic forces. The GridComm
class is also useful for models where continuum fields interact with
particles. For example, the two-temperature model (TTM) defines heat

View File

@ -3,12 +3,12 @@ Neighbor lists
To compute forces efficiently, each processor creates a Verlet-style
neighbor list which enumerates all pairs of atoms *i,j* (*i* = owned,
*j* = owned or ghost) with separation less than the applicable
neighbor list cutoff distance. In LAMMPS the neighbor lists are stored
in a multiple-page data structure; each page is a contiguous chunk of
memory which stores vectors of neighbor atoms *j* for many *i* atoms.
This allows pages to be incrementally allocated or deallocated in blocks
as needed. Neighbor lists typically consume the most memory of any data
*j* = owned or ghost) with separation less than the applicable neighbor
list cutoff distance. In LAMMPS, the neighbor lists are stored in a
multiple-page data structure; each page is a contiguous chunk of memory
which stores vectors of neighbor atoms *j* for many *i* atoms. This
allows pages to be incrementally allocated or deallocated in blocks as
needed. Neighbor lists typically consume the most memory of any data
structure in LAMMPS. The neighbor list is rebuilt (from scratch) once
every few timesteps, then used repeatedly each step for force or other
computations. The neighbor cutoff distance is :math:`R_n = R_f +
@ -16,20 +16,20 @@ computations. The neighbor cutoff distance is :math:`R_n = R_f +
the interatomic potential for computing short-range pairwise or manybody
forces and :math:`\Delta_s` is a "skin" distance that allows the list to
be used for multiple steps assuming that atoms do not move very far
between consecutive time steps. Typically the code triggers
between consecutive time steps. Typically, the code triggers
reneighboring when any atom has moved half the skin distance since the
last reneighboring; this and other options of the neighbor list rebuild
can be adjusted with the :doc:`neigh_modify <neigh_modify>` command.
On steps when reneighboring is performed, atoms which have moved outside
their owning processor's sub-domain are first migrated to new processors
their owning processor's subdomain are first migrated to new processors
via communication. Periodic boundary conditions are also (only)
enforced on these steps to ensure each atom is re-assigned to the
correct processor. After migration, the atoms owned by each processor
are stored in a contiguous vector. Periodically each processor
are stored in a contiguous vector. Periodically, each processor
spatially sorts owned atoms within its vector to reorder it for improved
cache efficiency in force computations and neighbor list building. For
that atoms are spatially binned and then reordered so that atoms in the
that, atoms are spatially binned and then reordered so that atoms in the
same bin are adjacent in the vector. Atom sorting can be disabled or
its settings modified with the :doc:`atom_modify <atom_modify>` command.
@ -39,12 +39,12 @@ its settings modified with the :doc:`atom_modify <atom_modify>` command.
neighbor list stencils
A 2d simulation sub-domain (thick black line) and the corresponding
A 2d simulation subdomain (thick black line) and the corresponding
ghost atom cutoff region (dashed blue line) for both orthogonal
(left) and triclinic (right) domains. A regular grid of neighbor
bins (thin lines) overlays the entire simulation domain and need not
align with sub-domain boundaries; only the portion overlapping the
augmented sub-domain is shown. In the triclinic case it overlaps the
align with subdomain boundaries; only the portion overlapping the
augmented subdomain is shown. In the triclinic case, it overlaps the
bounding box of the tilted rectangle. The blue- and red-shaded bins
represent a stencil of bins searched to find neighbors of a particular
atom (black dot).
@ -52,13 +52,13 @@ its settings modified with the :doc:`atom_modify <atom_modify>` command.
To build a local neighbor list in linear time, the simulation domain is
overlaid (conceptually) with a regular 3d (or 2d) grid of neighbor bins,
as shown in the :ref:`neighbor-stencil` figure for 2d models and a
single MPI processor's sub-domain. Each processor stores a set of
neighbor bins which overlap its sub-domain extended by the neighbor
single MPI processor's subdomain. Each processor stores a set of
neighbor bins which overlap its subdomain, extended by the neighbor
cutoff distance :math:`R_n`. As illustrated, the bins need not align
with processor boundaries; an integer number in each dimension is fit to
the size of the entire simulation box.
Most often LAMMPS builds what it calls a "half" neighbor list where
Most often, LAMMPS builds what is called a "half" neighbor list where
each *i,j* neighbor pair is stored only once, with either atom *i* or
*j* as the central atom. The build can be done efficiently by using a
pre-computed "stencil" of bins around a central origin bin which
@ -67,18 +67,18 @@ is simply a list of integer offsets in *x,y,z* of nearby bins
surrounding the origin bin which are close enough to contain any
neighbor atom *j* within a distance :math:`R_n` from any atom *i* in the
origin bin. Note that for a half neighbor list, the stencil can be
asymmetric since each atom only need store half its nearby neighbors.
asymmetric, since each atom only need store half its nearby neighbors.
These stencils are illustrated in the figure for a half list and a bin
size of :math:`\frac{1}{2} R_n`. There are 13 red+blue stencil bins in
2d (for the orthogonal case, 15 for triclinic). In 3d there would be
63, 13 in the plane of bins that contain the origin bin and 25 in each
of the two planes above it in the *z* direction (75 for triclinic). The
reason the triclinic stencil has extra bins is because the bins tile the
bounding box of the entire triclinic domain and thus are not periodic
with respect to the simulation box itself. The stencil and logic for
determining which *i,j* pairs to include in the neighbor list are
altered slightly to account for this.
triclinic stencil has extra bins because the bins tile the bounding box
of the entire triclinic domain, and thus are not periodic with respect
to the simulation box itself. The stencil and logic for determining
which *i,j* pairs to include in the neighbor list are altered slightly
to account for this.
To build a neighbor list, a processor first loops over its "owned" plus
"ghost" atoms and assigns each to a neighbor bin. This uses an integer
@ -95,7 +95,7 @@ supports:
been found to be optimal for many typical cases. Smaller bins incur
additional overhead to loop over; larger bins require more distance
calculations. Note that for smaller bin sizes, the 2d stencil in the
figure would be more semi-circular in shape (hemispherical in 3d),
figure would be of a more semicircular shape (hemispherical in 3d),
with bins near the corners of the square eliminated due to their
distance from the origin bin.
@ -111,8 +111,8 @@ supports:
symmetric stencil. It also includes lists with partial enumeration of
ghost atom neighbors. The full and ghost-atom lists are used by
various manybody interatomic potentials. Lists may also use different
criteria for inclusion of a pair interaction. Typically this simply
depends only on the distance between two atoms and the cutoff
criteria for inclusion of a pairwise interaction. Typically, this
simply depends only on the distance between two atoms and the cutoff
distance. But for finite-size coarse-grained particles with
individual diameters (e.g. polydisperse granular particles), it can
also depend on the diameters of the two particles.
@ -121,11 +121,11 @@ supports:
of the master neighbor list for the full system need to be generated,
one for each sub-style, which contains only the *i,j* pairs needed to
compute interactions between subsets of atoms for the corresponding
potential. This means not all *i* or *j* atoms owned by a processor
potential. This means, not all *i* or *j* atoms owned by a processor
are included in a particular sub-list.
- Some models use different cutoff lengths for pairwise interactions
between different kinds of particles which are stored in a single
between different kinds of particles, which are stored in a single
neighbor list. One example is a solvated colloidal system with large
colloidal particles where colloid/colloid, colloid/solvent, and
solvent/solvent interaction cutoffs can be dramatically different.
@ -144,7 +144,7 @@ supports:
- For small and sparse systems and as a fallback method, LAMMPS also
supports neighbor list construction without binning by using a full
:math:`O(N^2)` loop over all *i,j* atom pairs in a sub-domain when
:math:`O(N^2)` loop over all *i,j* atom pairs in a subdomain when
using the :doc:`neighbor nsq <neighbor>` command.
- Dependent on the "pair" setting of the :doc:`newton <newton>` command,
@ -153,7 +153,7 @@ supports:
For the newton pair *on* setting the atom *j* is only added to the
list if its *z* coordinate is larger, or if equal the *y* coordinate
is larger, and that is equal, too, the *x* coordinate is larger. For
homogeneously dense systems that will result in picking neighbors from
homogeneously dense systems, that will result in picking neighbors from
a same size sector in always the same direction relative to the
"owned" atom and thus it should lead to similar length neighbor lists
and thus reduce the chance of a load imbalance.
"owned" atom, and thus it should lead to similar length neighbor lists
and reduce the chance of a load imbalance.

View File

@ -6,7 +6,7 @@ thread parallelism to predominantly distribute loops over local data
and thus follow an orthogonal parallelization strategy to the
decomposition into spatial domains used by the :doc:`MPI partitioning
<Developer_par_part>`. For clarity, this section discusses only the
implementation in the OPENMP package as it is the simplest. The INTEL
implementation in the OPENMP package, as it is the simplest. The INTEL
and KOKKOS package offer additional options and are more complex since
they support more features and different hardware like co-processors
or GPUs.
@ -14,7 +14,7 @@ or GPUs.
One of the key decisions when implementing the OPENMP package was to
keep the changes to the source code small, so that it would be easier to
maintain the code and keep it in sync with the non-threaded standard
implementation. this is achieved by a) making the OPENMP version a
implementation. This is achieved by a) making the OPENMP version a
derived class from the regular version (e.g. ``PairLJCutOMP`` from
``PairLJCut``) and overriding only methods that are multi-threaded or
need to be modified to support multi-threading (similar to what was done
@ -26,13 +26,13 @@ into three separate classes ``ThrOMP``, ``ThrData``, and ``FixOMP``.
available in the corresponding base class (e.g. ``Pair`` for
``PairLJCutOMP``) like multi-thread aware variants of the "tally"
functions. Those functions are made available through multiple
inheritance so those new functions have to have unique names to avoid
inheritance, so those new functions have to have unique names to avoid
ambiguities; typically ``_thr`` is appended to the name of the function.
``ThrData`` is a classes that manages per-thread data structures.
It is used instead of extending the corresponding storage to per-thread
arrays to avoid slowdowns due to "false sharing" when multiple threads
update adjacent elements in an array and thus force the CPU cache lines
to be reset and re-fetched. ``FixOMP`` finally manages the "multi-thread
``ThrData`` is a class that manages per-thread data structures. It is
used instead of extending the corresponding storage to per-thread arrays
to avoid slowdowns due to "false sharing" when multiple threads update
adjacent elements in an array and thus force the CPU cache lines to be
reset and re-fetched. ``FixOMP`` finally manages the "multi-thread
state" like settings and access to per-thread storage, it is activated
by the :doc:`package omp <package>` command.
@ -46,24 +46,24 @@ involve multiple atoms and thus there are race conditions when multiple
threads want to update per-atom data of the same atoms. Five possible
strategies have been considered to avoid this:
1) restructure the code so that there is no overlapping access possible
1. Restructure the code so that there is no overlapping access possible
when computing in parallel, e.g. by breaking lists into multiple
parts and synchronizing threads in between.
2) have each thread be "responsible" for a specific group of atoms and
2. Have each thread be "responsible" for a specific group of atoms and
compute these interactions multiple times, once on each thread that
is responsible for a given atom and then have each thread only update
is responsible for a given atom, and then have each thread only update
the properties of this atom.
3) use mutexes around functions and regions of code where the data race
could happen
4) use atomic operations when updating per-atom properties
5) use replicated per-thread data structures to accumulate data without
3. Use mutexes around functions and regions of code where the data race
could happen.
4. Use atomic operations when updating per-atom properties.
5. Use replicated per-thread data structures to accumulate data without
conflicts and then use a reduction to combine those results into the
data structures used by the regular style.
Option 5 was chosen for the OPENMP package because it would retain the
performance for the case of 1 thread and the code would be more
performance for the case of a single thread and the code would be more
maintainable. Option 1 would require extensive code changes,
particularly to the neighbor list code; options 2 would have incurred a
particularly to the neighbor list code; option 2 would have incurred a
2x or more performance penalty for the serial case; option 3 causes
significant overhead and would enforce serialization of operations in
inner loops and thus defeat the purpose of multi-threading; option 4
@ -80,7 +80,7 @@ equivalent to the number of CPU cores per CPU socket on high-end
supercomputers.
Thus arrays like the force array are dimensioned to the number of atoms
times the number of threads when enabling OpenMP support and inside the
times the number of threads when enabling OpenMP support, and inside the
compute functions a pointer to a different chunk is obtained by each thread.
Similarly, accumulators like potential energy or virial are kept in
per-thread instances of the ``ThrData`` class and then only reduced and
@ -91,7 +91,7 @@ Loop scheduling
"""""""""""""""
Multi-thread parallelization is applied by distributing (outer) loops
statically across threads. Typically this would be the loop over local
statically across threads. Typically, this would be the loop over local
atoms *i* when processing *i,j* pairs of atoms from a neighbor list.
The design of the neighbor list code results in atoms having a similar
number of neighbors for homogeneous systems and thus load imbalances

View File

@ -7,39 +7,39 @@ distributed-memory parallelism is set with the :doc:`comm_style command
.. _domain-decomposition:
.. figure:: img/domain-decomp.png
:align: center
domain decomposition
Domain decomposition schemes
This figure shows the different kinds of domain decomposition used
for MPI parallelization: "brick" on the left with an orthogonal
(left) and a triclinic (middle) simulation domain, and a "tiled"
decomposition (right). The black lines show the division into
sub-domains and the contained atoms are "owned" by the corresponding
MPI process. The green dashed lines indicate how sub-domains are
extended with "ghost" atoms up to the communication cutoff distance.
This figure shows the different kinds of domain decomposition used
for MPI parallelization: "brick" on the left with an orthogonal
(left) and a triclinic (middle) simulation domain, and a "tiled"
decomposition (right). The black lines show the division into
subdomains, and the contained atoms are "owned" by the
corresponding MPI process. The green dashed lines indicate how
subdomains are extended with "ghost" atoms up to the communication
cutoff distance.
The LAMMPS simulation box is a 3d or 2d volume, which can be orthogonal
or triclinic in shape, as illustrated in the :ref:`domain-decomposition`
figure for the 2d case. Orthogonal means the box edges are aligned with
the *x*, *y*, *z* Cartesian axes, and the box faces are thus all
rectangular. Triclinic allows for a more general parallelepiped shape
in which edges are aligned with three arbitrary vectors and the box
faces are parallelograms. In each dimension box faces can be periodic,
or non-periodic with fixed or shrink-wrapped boundaries. In the fixed
case, atoms which move outside the face are deleted; shrink-wrapped
means the position of the box face adjusts continuously to enclose all
the atoms.
The LAMMPS simulation box is a 3d or 2d volume, which can be of
orthogonal or triclinic shape, as illustrated in the
:ref:`domain-decomposition` figure for the 2d case. Orthogonal means
the box edges are aligned with the *x*, *y*, *z* Cartesian axes, and the
box faces are thus all rectangular. Triclinic allows for a more general
parallelepiped shape in which edges are aligned with three arbitrary
vectors and the box faces are parallelograms. In each dimension, box
faces can be periodic, or non-periodic with fixed or shrink-wrapped
boundaries. In the fixed case, atoms which move outside the face are
deleted; shrink-wrapped means the position of the box face adjusts
continuously to enclose all the atoms.
For distributed-memory MPI parallelism, the simulation box is spatially
decomposed (partitioned) into non-overlapping sub-domains which fill the
decomposed (partitioned) into non-overlapping subdomains which fill the
box. The default partitioning, "brick", is most suitable when atom
density is roughly uniform, as shown in the left-side images of the
:ref:`domain-decomposition` figure. The sub-domains comprise a regular
grid and all sub-domains are identical in size and shape. Both the
:ref:`domain-decomposition` figure. The subdomains comprise a regular
grid, and all subdomains are identical in size and shape. Both the
orthogonal and triclinic boxes can deform continuously during a
simulation, e.g. to compress a solid or shear a liquid, in which case
the processor sub-domains likewise deform.
the processor subdomains likewise deform.
For models with non-uniform density, the number of particles per
@ -50,14 +50,14 @@ load. For such models, LAMMPS supports multiple strategies to reduce
the load imbalance:
- The processor grid decomposition is by default based on the simulation
cell volume and tries to optimize the volume to surface ratio for the sub-domains.
cell volume and tries to optimize the volume to surface ratio for the subdomains.
This can be changed with the :doc:`processors command <processors>`.
- The parallel planes defining the size of the sub-domains can be shifted
- The parallel planes defining the size of the subdomains can be shifted
with the :doc:`balance command <balance>`. Which can be done in addition
to choosing a more optimal processor grid.
- The recursive bisectioning algorithm in combination with the "tiled"
communication style can produce a partitioning with equal numbers of
particles in each sub-domain.
particles in each subdomain.
.. |decomp1| image:: img/decomp-regular.png
@ -76,14 +76,14 @@ the load imbalance:
The pictures above demonstrate different decompositions for a 2d system
with 12 MPI ranks. The atom colors indicate the load imbalance of each
sub-domain with green being optimal and red the least optimal.
subdomain, with green being optimal and red the least optimal.
Due to the vacuum in the system, the default decomposition is unbalanced
with several MPI ranks without atoms (left). By forcing a 1x12x1
processor grid, every MPI rank does computations now, but number of
atoms per sub-domain is still uneven and the thin slice shape increases
the amount of communication between sub-domains (center left). With a
2x6x1 processor grid and shifting the sub-domain divisions, the load
imbalance is further reduced and the amount of communication required
between sub-domains is less (center right). And using the recursive
bisectioning leads to further improved decomposition (right).
Due to the vacuum in the system, the default decomposition is
unbalanced, with several MPI ranks without atoms (left). By forcing a
1x12x1 processor grid, every MPI rank does computations now, but the
number of atoms per subdomain is still uneven, and the thin slice shape
increases the amount of communication between subdomains (center
left). With a 2x6x1 processor grid and shifting the subdomain divisions,
the load imbalance is further reduced and the amount of communication
required between subdomains is less (center right). And using the
recursive bisectioning leads to further improved decomposition (right).

View File

@ -7,7 +7,7 @@ decomposition. The parallelization aims to be efficient, and resulting
in good strong scaling (= good speedup for the same system) and good
weak scaling (= the computational cost of enlarging the system is
proportional to the system size). Additional parallelization using GPUs
or OpenMP can also be applied within the sub-domain assigned to an MPI
or OpenMP can also be applied within the subdomain assigned to an MPI
process. For clarity, most of the following illustrations show the 2d
simulation case. The underlying algorithms in those cases, however,
apply to both 2d and 3d cases equally well.

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